eqvinox
10 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
10 months ago
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
10 months ago
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
10 months ago
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
10 months ago
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
10 months ago
> a proper package manager
Those are a thing? Wasn't aware.
raymond_goo
10 months ago
Isn't the one from Rust pretty good?
perching_aix
10 months ago
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
10 months ago
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
10 months ago
Nope, most people using it know how to link and compile libraries. :)
pjmlp
10 months ago
Maybe, but those providing it apparently not.
linkdd
10 months ago
scoop? chocolatey? pacman in msys2? winget?
flohofwoe
10 months ago
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
10 months ago
Remind me please, which of these is shipped with a default Windows install?
wis
10 months ago
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-...
user
10 months ago
kreetx
10 months ago
It's an adoption barrier.
Conscat
10 months ago
I know very non-technical people who use Chocolatey for acquiring ffmpeg.
1oooqooq
10 months ago
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
10 months ago
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
10 months ago
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
10 months ago
The same that shipped with a default UNIX install.
doctorpangloss
10 months ago
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.