News for hackers. Stuff that matters.
Re:Httpserver.h: Single header library for writing non-block... by bfrog on Thursday December 12, 2019 @09:17PM (#21778608)
C/C++ lack the niceties of npm/cargo/pip/etc, so headers only is like wget something.h and gcc mystuff.c, viola magic.

It's a symptom of the tooling that this is even a thing.

Re:Httpserver.h: Single header library for writing non-block... by smartmic on Friday December 13, 2019 @03:06AM (#21779921)
There are mature solutions for building C/C++ programs which check for dependencies and provide a high quality configuration setup. Think of GNU Autotools. It is often blamed to be too complex, but this complexity is essential, not accidental. You do not want to abstract away details a C/C++ maintainer cares about.
Re:Httpserver.h: Single header library for writing non-block... by trasz on Friday December 13, 2019 @03:17AM (#21779961)
It’s not that autotools is complex - rather, most of what it does hasn’t been useful since nineties, and when it doesn’t work - which is quite often when it’s being used on a platform a given piece of software hasn’t been tested on - makes fixing the build harder compared to hand-written makefiles.
Re:Httpserver.h: Single header library for writing non-block... by q3k on Friday December 13, 2019 @06:44AM (#21780785)
Right, but that still doesn't solve the problem of actually distributing the library in the first place.

As a library author you basically have to wait for distributions to start shipping it, or make users manually install dependencies (and then make the build work with libraries installed into /usr/local).

Re:Httpserver.h: Single header library for writing non-block... by bfrog on Friday December 13, 2019 @11:06AM (#21782755)
Right, this is an extraordinary pain point as a library author which writes libraries in C or C++.

That's assuming the distro even does package it up. Because beyond Archlinux packaging, packaging up a DEB is painful. RPM is somewhat less painful, but you still need to contend with N distros. Your lib depends on lets say 4 other libraries, perhaps some of the GTK ecosystem of libraries. Good Luck!

Re:Httpserver.h: Single header library for writing non-block... by bfrog on Friday December 13, 2019 @11:03AM (#21782725)
Autotools doesn't help you solve the issue of you needing version X.Y when Z.X is installed, neither do RPM/DPKG/etc.

When you go to build C projects, there's usually a long list of instructions, per distro/os to set the environment up correctly.

Compare that to a Rust project where you git clone and cargo build to get going. No instructions needed, no insanely complicated esoteric m4 macro system, or ad-hoc programming language (looking at you CMake), and snowflake package manager needed.

Meson is the only C/C++ build tool I know of that solves the issue of building complex C/C++ programs with dependencies sanely. Especially in the case where both your application and your dependencies are unreleased as of yet, as is the case with Gnome and KDE applications as they are developed.

Re:Httpserver.h: Single header library for writing non-block... by otabdeveloper4 on Friday December 13, 2019 @05:18AM (#21780471)
> niceties of npm

Shudder

Re:Httpserver.h: Single header library for writing non-block... by pjmlp on Friday December 13, 2019 @06:54AM (#21780823)
It seems more like being lazy not to create an RPM/DEB/MSI/PKG/DEPOT,... to me.

Or even plain old tarball with any sort of build script.

And vcpkg, cargo are already good options for those that need cross-os package manager.

Re:Httpserver.h: Single header library for writing non-block... by zelly on Thursday December 12, 2019 @09:57PM (#21778779)
npm for C is apt/brew
Re:Httpserver.h: Single header library for writing non-block... by Matthias247 on Friday December 13, 2019 @01:47AM (#21779633)
Not really, because the amount of provided package versions is very limited. You won't get an update unless the package maintainer (who is likely not the library owner) provides an update.
Re:Httpserver.h: Single header library for writing non-block... by eeZah7Ux on Friday December 13, 2019 @06:11AM (#21780683)
That's a feature, not a bug. I want to rely on well tested, stable, mature libraries that receive security updates and don't change for the next 3 to 5 years.
Re:Httpserver.h: Single header library for writing non-block... by de_watcher on Friday December 13, 2019 @02:07AM (#21779704)
Re:Httpserver.h: Single header library for writing non-block... by rootlocus on Friday December 13, 2019 @04:31AM (#21780277)
npm for js is apt/brew for os
Re:Httpserver.h: Single header library for writing non-block... by rwmj on Friday December 13, 2019 @05:22AM (#21780495)
"dnf install" or "apt-get install" work fine.
Re:Httpserver.h: Single header library for writing non-block... by adgasf on Friday December 13, 2019 @09:06AM (#21781579)
System package managers rarely offer all of the packages you need.
Re:Httpserver.h: Single header library for writing non-block... by rwmj on Friday December 13, 2019 @12:58PM (#21783765)
So .. add them? They can even be added automatically, as we do for Perl and Tex packages in Fedora.