News for hackers. Stuff that matters.
Re:Ada Programming Language by galangalalgol on Sunday September 18, 2022 @03:39PM (#32890752)
Seconded, having to grab 9 crates just to get random numbers in rust is my least favorite thing about the language. As adacore and ferrous systems work on the safety critical rust (ferrocene), I'm hoping they create a vetted and well tested subset of crates.io that I can just install from a tgz.

The fine granularity of dependencies that package managers have facilitated has made air-gapped devlopment logistically very difficult. And it makes safety or security certifications impossible.

Re:Ada Programming Language by rascul on Sunday September 18, 2022 @05:56PM (#32891868)
> Seconded, having to grab 9 crates just to get random numbers in rust is my least favorite thing about the language.

I've noticed that crates can often include default features I don't want or need. If you don't include the default features ('cargo add --no-default-features rand' is what I did) then the only other crate pulled in is rand_core. I've gotten into the habit of reviewing the features and only including the ones I need. I don't know if there's a better solution that could be implemented somewhere upstream but this works for me.

Re:Ada Programming Language by galangalalgol on Sunday September 18, 2022 @09:45PM (#32893342)
Thanks that is a great tip!
Re:Ada Programming Language by sanxiyn on Sunday September 18, 2022 @09:26PM (#32893247)
If you don't like rand, don't use it. Frankly, if your goal is "just to get random numbers" rand is a wrong crate. Use fastrand instead, it has zero dependencies.
Re:Ada Programming Language by smaddox on Sunday September 18, 2022 @04:55PM (#32891427)
> The fine granularity of dependencies that package managers have facilitated has made air-gapped devlopment logistically very difficult. And it makes safety or security certifications impossible.

Cargo has a vendor feature: https://doc.rust-lang.org/cargo/commands/cargo-vendor.html

Is there some language ecosystem that is better?

Re:Ada Programming Language by galangalalgol on Sunday September 18, 2022 @09:53PM (#32893397)
Vendoring is kind of a pain. You start with a tomlnthat has everything you think you'll need then you grab all that, run it by legal and the it team and copy it over. You find a new dependency and start again.

Before package managers you ended up with giant pseudo stdlib libraries like boost or eigen and you only needed a tiny piece but once you brought it over you had it all, and it had no sub dependencies to worry about. Monolithic was easier from a lot of standpoints. Crates.io is exactly what I'd want if I wasnttroo worried about safety or security. It is far more productive. But if you make software that other companies use to help make themselves secure, then you are wearing a bullseye these days and it is kind of your job to be paranoid about deep dependency trees.

Re:Ada Programming Language by pjmlp on Monday September 19, 2022 @02:57AM (#32895153)
Maven and NuGET, specially the ability to ship binary libraries (including C and C++ ones), and have internal company repos where only IT and Legal vetted libraries are made available.
Re:Ada Programming Language by sanxiyn on Sunday September 18, 2022 @09:34PM (#32893294)
Python is better. You "import random" to get random numbers.