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