Hacker Newsnew | past | comments | ask | show | jobs | submit | harha_'s commentslogin

I can't believe this is what hackernews has become. This kind of stuff is at the top.


I recall having to maintain an integration to some obscure SOAP API that ate and spit out XML with strict schemas and while I can't remember much about it, I think the integration broke quite easily if the other end changed their API somehow.


Blood tests can't measure concentrations in other tissues.


It's just an API that utilizes DNS, not that interesting imo.


I'd like to have high speed railways in my country, not some decades long political conversion project. If we need railways that can go across the borders of our neighboring countries, build new ones instead of upgrading existing ones.


Upgrading is magnitudes faster than building new. Apparently the current Finnisch idea is to actually build new tracks next to the old one, which requires wider beds, which requires more land, which requires more negotiations. Replacing in situ would be faster, but you would cripple your whole network for the duration.

It's a tradeoff and worthy of deliberation.


You can run multiple linux distros on linux just fine via KVM/QEMU, there is nothing special WSL offers except that it is a must if you're doomed to use windows.


Regardless of language, really? I highly doubt that, you don't generally see such problems with C or even C++ because dependencies are more cumbersome to add, especially in a way that's cross-platform.


With C++ it's hilarious because the C++ community is so allergic to proper dependency management and also so desperate for stuff from third party libraries that the committee spends large amounts of its time basically doing dependency management for the community by baking in large features you'd ordinarily take as a dependency into the mandatory standard library.

I'm sure I'll miss some, but IIRC C++ 26 is getting the entire BLAS, two distinct delayed reclamation systems and all of the accompanying infrastructure, new container types, and a very complicated universal system of units.

All of these things are cool, but it's doubtful whether any of them could make sense in a standard library, however for C++ programers that's the easiest way to use them...

It's bedlam in there and of course the same C++ programmers who claim to be "worried" that maybe somebody hid something awful in Rust's crates.io are magically unconcerned that copy-pasting tens of millions of lines of untested code from a third party into absolutely every C++ program to be written in the future could be a bad idea.


> copy-pasting tens of millions of lines of untested code from a third party into absolutely every C++ program to be written in the future could be a bad idea.

Is it really that bad? (By my count, as a point of reference, the Python 3.13 standard library is just under 900k lines for the .py files.)


If something is in the standard library, then it’s written and vetted by the standard library provider, not by a random third party like you make it sound.

With Rust, it’s literally a random third party.


Maintainers of all open source standard libraries are effectively "random third parties". With heavily used ecosystem dependencies (such as Tokio, but also swaths of small libraries, such as `futures` or `regex`), the number of people who have looked at the code and battle-tested it is also huge.

On crates.io, a good heuristic is to look at two numbers: the number of dependents and the number of downloads. If both are high, it's _probably_ fine. Otherwise, I'll manually audit the code.

That's not a complete solution, especially not if you're worried about this from a security perspective, but it's a good approximation if you're worried about the general quality of your dependencies.


People are paid to work on standard libraries and there’s a whole process behind developing and releasing this software.

Tokio on the other hand is the library whose maintainer decided to download a binary blob during build: https://github.com/tokio-rs/prost/issues/562 https://github.com/tokio-rs/prost/issues/575

Good luck catching such issues across dozens of crates.


The issue you linked is a perfect example in support of my argument. Lots of people noticed the problem, and it was quickly rectified.


what other “quality” is there to worry about besides security?


Stability, correctness, test coverage, performance.

You can lump anything under "security" for particular use cases, but what's the point of words then.


> it’s written and vetted by the standard library provider, not by a random third party

All three modern C++ standard libraries are of course Free Software. They are respectively the GNU libstdc++, Clang's libc++ and the Microsoft STL. Because it's a huge sprawling library, you quickly leave the expertise of the paid maintainers and you're into code that some volunteer wrote for them and says it's good. Sounds like random third parties to me.

Now, I'm sure that Stephan T. Lavavej (the Microsoft employee who looks after the STL, yes, nominative determinism) is a smart and attentive maintainer, and so if you provide a contribution with a function named "_Upload_admin_creds_to_drop_box" he's not going to apply that but equally Stephen isn't inhumanly good, so subtle tricks might well get past him. Similar thoughts apply to the GNU and Clang maintainers who don't have funny names.


One Stephan T. Lavavej is worth more than 1000 random github rustaceans, some of which will be bots, AIs, rank amateurs, bought or North Korean spies. Any of the libraries has one or more Stephans.

Having paid maintainers, code review, test suites, strict contribution guidelines, etc is state of the art for open source software that some transitive crate dependency can only dream to achieve.


> With Rust, it’s literally a random third party.

No, tons of the foundational Rust crates that show up in every dependency tree are first-party crates provided by the Rust project itself.


Because most dependencies are either manually installed by the user, or are dynamic libraries that are provided and audited by the distro maintainers. The dependencies are there, they're just harder to see - https://wiki.alopex.li/LetsBeRealAboutDependencies


Sure, there are various dependencies, but it's nothing like "cargo install crate-name". Cargo makes it so effortless to joink the dumbest dependency for the simplest thing.


On the other hand, C/C++ makes it attractive to reinvent the wheel, or vendor the dependency instead. Rather than a single well-tested implementation in the ecosystem for something like sha256, you end up with every application having its own slightly-different, mostly untested, and essentially unmaintained version.

Applications still need the functionality. The need doesn't magically disappear when installing dependencies is a pain. If a crate has a bug, the entire ecosystem can trivially get the fixed version. If the Stackoverflow snippet a C app is vendoring has a bug, that fix is never getting in the app.


That does not help you if the bug is one of many unmaintained crates and never noticed. Linux distributions aim to make sure that C application dynamically link to the right libraries instead of vendoring the code. Then the library can be updated once. IMHO this is the only reasonable approach.


It's trivial to see on crates.io whether a crate is unmaintained.


Maybe if it is completely unmaintained, but this is not enough to solve the problem and maybe also not really the point.


is it trivial to see if a third level dependency is unmaintained?


> Sure, there are various dependencies, but it's nothing like "cargo install crate-name".

You don't install a Rust crate to use it. We have enough people in this thread trying to authoritatively talk about Rust without having any experience with it, please don't bother leaving a comment if you're just going to argue from ignorance.


Sure, I think software that's easy to use is a good thing and Rust dependency management is 100x nicer to work with than C++.


so what's the option??? I don't think this is only cargo-rust problem since you can do it too in another language


Kind of true, when not using vcpkg/conan.


Don’t forget cmake. (It makes adding dependencies easy, and everything else basically impossible)


Sure, despite all the hate it gets, except for IDE project files, it is the best experience in C and C++ build tools since forever, including IDE integration just like those project files.

I thought the whole UNIX mentality was worse is better.

No build tool is without issues, my pain points with cargo, are always compiling from source, build caching requires additional work to setup, as soon as it is more than pure Rust, we get a build.rs file that can get quite creative.


And from Internals discussion (https://internals.rust-lang.org/t/add-some-form-of-precompil...) it seems this causes more problems than it solves.

It requires huge storage, for each combination of targets, and even if it is was solved some members of Rust community would see it as a step back.

Me included. They are hard to audit and are step back to OSS nature of Rust.


A systems programming language is supposed to support all deployment scenarios, not to be religious.


Wdym? The language supports it, how else could have serde done it?

The issue here is getting storage and compute for build artifacs for cargo. Cargo isn't the language though.


I also don't understand the CMake hate. Modern CMake (3.14+) is just around 10 lines to build basic sources/libraries/executables. And you can either use CMake FetchContent or use CPM https://github.com/cpm-cmake/CPM.cmake to fetch dependencies. No third-party tool like vcpkg or conan is needed.


I think CMake is the perfect balance. You need to write few lines and think about few things before adding a dependency, but usually nothing too crazy. It might not work the first try but that's okay.


Yeah, it feels like nothing but a little trick. Why would anyone want to actually use this? The exe simply calls docker, it can embed an image into the exe but even then it first calls docker to load the embedded image.


I see a use case. The other day I wished that I could pack CLI commands as docker containers and execute them as CLI commands and get return codes.

I haven't tried this stuff, but maybe this is something in that direction.


> I see a use case. The other day I wished that I could pack CLI commands as docker containers and execute them as CLI commands and get return codes

I don't understand this requirement/specification; presumably this use-case will not be satisfied by a shell script, but I don't see how.

What are you wanting from this use-case that can't be done with a shell script?


Presumably, they don’t want to write/maintain a shell script wrapper for every time they want to do this, when they could use a tool which does it for them.


> Presumably, they don’t want to write/maintain a shell script wrapper for every time they want to do this, when they could use a tool which does it for them.

How's "packing" cli commands into a shell script any different from "packing" CLI commands into a container?


Calling a container on the CLI is a pain in the ass.

People generally don’t put stuff that works in whatever environment you’re in on the CLI already into contains. Stuff that doesn’t, of course they do.

Having a convenient shell script wrapper to make that not a pain in the ass, while letting all the environment management stuff still work correctly in a container is convenient.

Writing said wrapper each time, however is a pain in the ass.

Generating one, makes it not such a pain in the ass to use.

So then you get convenient CLI usage of something that needs a container to not be a pain in the ass to install/use.


An icon a non-technical user can click to run it.


A non-technical user that has docker installed?


I do that for a lot of stuff. Got a bit annoyed with internal tools that was so difficult to set up (needed this exact version of global python, expected this and that to be in the path, constantly needed to be updated and then stuff broke again). So I built a docker image instead where everything is managed, and when I need to update or change stuff I can do it from a clean slate without affecting anything else on my computer.

To use it, it's basically just scripts loaded into my shell. So if I do "toolname command args" it will spin up the container, mount the current folder and some config folders some tools expect, forward some ports, then pass the command and args to the container which runs them.

99% of the time it works smooth. The annoying part is if some tool depends on some other tool on the host machine. Like for instance it wants to do some git stuff. I will then have to have git installed and my keys copied in as well for instance.


CoreOS had a toolbox container that worked similarly to the one you have (the Podman people took over its maintenance): https://github.com/containers/toolbox


> my keys copied in as well for instance.

Tip: you could also forward your ssh agent. I remember it was a bit of a pain in the ass on macos and a windows WSL2 setup, but likely worth it for your setup.


Basically the same as Python’s zipapps which have some niche use cases.

Before zipapp came out I built superzippy to do it. Needed to distribute some python tooling to users in a university where everyone was running Linux in lab computers. Worked perfectly for it.


Could be ease of use for end users who don't docker.


But now you have two problems.


The first of which can be p90 solved by "Okay, type 'apt install dash capital why docker return,' tell me what happens...okay, and 'docker dash vee' says...great! Now..."

Probably takes a couple minutes, maybe less if you've got a good fast distro mirror nearby. More if you're trying to explain it to a biologist - love those folks, they do great work, incredible parties, not always at home in the digital domain.


I'm so tired of generative AI. I can't take anyone who uses them seriously anymore.


Cool, I love that there are ways to utilize RAM and VRAM as filesystems. Sometimes you just don't need all that pure RAM/VRAM.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: