Remix.run Logo
eqvinox 7 months ago

Every time I see a "single-header C library", I wonder to myself where we'd be if only Windows had a proper package manager.

(Especially since that'd force the POSIX world to de-fracture itself too.)

colleagueRiley 7 months ago | parent | next [-]

We'd be at the same spot, single-header files are still useful.

A single-header file is not a 'full-sized' library compressed into one file it's codebase is designed to actually be minimalist. Many libraries have single files that are the same size as their alternative single-header.

Philpax 7 months ago | parent | prev | next [-]

I wonder where we'd be if we'd stopped relying on system packages to provide dependencies for C / C++. It is positively miserable to have to pollute your system when a codebase written in Go / Rust / your favourite modern language Just Works out of the box.

linkdd 7 months ago | parent [-]

With a central, curated, audited package repository where publishing rights are given to absolutely everyone then supply chain attacks in C and C++ would be even easier.

IshKebab 7 months ago | parent | prev | next [-]

We'd be in exactly the same place because nobody wants to use an OS-dependent package manager for an OS-agnostic project.

I don't know if you noticed but no modern languages use Linux packages to provide dependencies, because that obviously sucks balls for many reasons.

perching_aix 7 months ago | parent | prev | next [-]

> a proper package manager

Those are a thing? Wasn't aware.

raymond_goo 7 months ago | parent [-]

Isn't the one from Rust pretty good?

perching_aix 7 months ago | parent [-]

Haven't worked with it much yet, not really my point either. They were talking about OS package managers, most likely the typical Linux package managers, and so did I.

pjmlp 7 months ago | parent | prev | next [-]

Windows is no excuse, because many of "single-header C library" sinners are UNIX only folks, targeting only UNIX platforms.

For me it only reveals lack of willingness to learn how to use their tools.

I learned how to use C and C++ build systems at the age of 12 years old, when most of the information was on libraries, or whatever folks down at computer club could explain.

In a computing landscape much more fragmented than it is today?

Do you think combining Windows and UNIX is hard? Try on the glory days of 16 bit home computers.

Here we are in the age of information, and some people couldn't be less bothered.

colleagueRiley 7 months ago | parent [-]

Nope, most people using it know how to link and compile libraries. :)

pjmlp 7 months ago | parent [-]

Maybe, but those providing it apparently not.

linkdd 7 months ago | parent | prev [-]

scoop? chocolatey? pacman in msys2? winget?

flohofwoe 7 months ago | parent | next [-]

Most of those are for installing applications, not system-wide C library source distributions (e.g. you'll need to figure out the path of the source and header files in build scripts since there's no standard location for that on Windows).

The closest thing to a C/C++ package manager standard on Windows is probably vcpkg: https://vcpkg.io/en/

eqvinox 7 months ago | parent | prev [-]

Remind me please, which of these is shipped with a default Windows install?

wis 7 months ago | parent | next [-]

I realize you asked sarcastically, but as of relatively recently WinGet is shipped by default with the latest versions of Windows 10 and in Windows 11. [1]

But why is being installed by default important?

[1] https://www.petergirnus.com/blog/how-to-use-windows-package-...

7 months ago | parent | next [-]
[deleted]
kreetx 7 months ago | parent | prev | next [-]

It's an adoption barrier.

Conscat 7 months ago | parent | next [-]

I know very non-technical people who use Chocolatey for acquiring ffmpeg.

1oooqooq 7 months ago | parent | prev [-]

meh. it's not.

If you are convincing people to run commands to install packages:

- they care about trust, they will already have their package manager from the ecosystem they trust (which should be msys+pacman on windows, btw)

- they couldn't care less and will trust your `curl | bash` or `Invoke-RestMethod -Uri http://hacker.com/totallysafe.exe`

on both cases, not having a default package manager shipped caused zero adoption attrition, I mean, besides the attrition of needing a non-standard package to begin with.

frizlab 7 months ago | parent [-]

IMHO it is though. I have a windows VM I rarely use and tried using a package manager at some point, but end up not succeeding until winget was part of the system and was a no-brainer.

Too many possibilities made me choose none.

eqvinox 7 months ago | parent | prev [-]

It was only partially sarcastic (yeah that didn't communicate at all, bad habit on my end), I had googled them but didn't quite understand the winget situation at glance. Thanks for the answer, actually appreciated!

pjmlp 7 months ago | parent | prev | next [-]

The same that shipped with a default UNIX install.

doctorpangloss 7 months ago | parent | prev [-]

I don't know why you're being downvoted, but distributions for Windows would be really popular. A server distribution of Windows would help its adoption a lot.