News for hackers. Stuff that matters.
Re:Rolldown: Rollup compatible bundler written in Rust by maleldil on Friday March 08, 2024 @05:52PM (#39647486)
Using external libraries is important because it lets you focus on what's important for your project. C++'s lack of a proper package manager means we're all reinventing the wheel because adding dependencies is non-trivial.

Cargo/Rust and Go show how compiled languages can have drastically superior development experiences. CMake is primitive in comparison. Its only upside is its flexibility, which I reckon isn't worth it for most cases.

Re:Rolldown: Rollup compatible bundler written in Rust by zigzag312 on Friday March 08, 2024 @06:49PM (#39647941)
A while back I needed to write a small library in C++.

It took me about the same amount of time to write few dozen lines of CMake (to get build working with all the external libraries), as it took me to write few thousands lines of C++.

I wasted way too much time dealing with CMake.

Re:Rolldown: Rollup compatible bundler written in Rust by FpUser on Friday March 08, 2024 @08:35PM (#39648616)
>"few dozen lines of CMake (to get build working with all the external libraries), as it took me to write few thousands lines of C++."

I claim BS unless those "thousands lines" were cut'n paste.

Re:Rolldown: Rollup compatible bundler written in Rust by zigzag312 on Saturday March 09, 2024 @03:56AM (#39650430)
No, but it was a rewrite of C# code. Using MSVC compiler, targeting Windows and Linux. C++20 with modules. External libraries: libsodium, lmdb, roaring & rocksdb. First time using CMake.
Re:Rolldown: Rollup compatible bundler written in Rust by FpUser on Friday March 08, 2024 @08:34PM (#39648604)
>"Using external libraries is important because it lets you focus on what's important for your project"

Well thank you. I just trying to guess where did you get the idea that I am not using 3rd party libs.

>"C++'s lack of a proper package manager means we're all reinventing the wheel because adding dependencies is non-trivial."

I think it is trivial. Here is particular example for cpp-http library that I use in some of my projects:

  a) download from github
  b) add add_subdirectory("./3rd-party/cpp-httplib") into CMakeLists.txt file
That is it. Ready for use.
Re:Rolldown: Rollup compatible bundler written in Rust by wredue on Saturday March 09, 2024 @12:30PM (#39653211)
That’s fine, but most modern tooling “automates” this for you and gives you easy tooling to manage versions as well.

Additionally, you get a nice list in a simple spot of exactly what you need that isn’t just documentation. Anyone can easily pull your project and contribute.

Being able to easily manage deps has issues (such as a tendency to trend toward left-pad), but there’s also significant benefits as well that become readily apparent when you compare cargo with CMake (I understand they’re not completely comparable)