Live data from Hacker News

Moving SciPy to the Meson Build System

labs.quansight.org

31–34 of 34 posts

Re: Moving SciPy to the Meson Build System

#31
post #24
post #3

I'm using Meson for a project using C++ with Gtkmm, Libmicrohttpd, catch2 and other libraries. My experience is good neglecting some minor issues. Meson is fast, well readable if written well, uses system libraries by default and allows flexible usage. On the other side I'm using Java with Maven and it is - a big burden. It's build in dependency retrieval system also isn't helping. Maybe I just don't like XML - becau…

I find pom.xml much more readable than deciphering a giant script file like build.gradle or CMakeLists.txt. 99% of the time I automatically know how the build works because its convention.

For me, Gradle's readability depends heavily on how you use it.

If you use it Maven-style, with relatively simple build scripts and all the complexity pushed out to plugins, it's very readable. A fair bit more readable than Maven, in my opinion, but I wouldn't care to argue that point in particular.

If you use it the way Stack Overflow tells you to do it, so that your build scripts are basically glorified ad-hoc Groovy programs, then, yeah, it's just impossible.

Unfortunately, since the only way to really understand any of Gradle is to understand all of Gradle, and understanding all of Gradle is a huge effort, it's kind of a catch-22. For most people, the only really sensible way to use it is to Google for advice and then do what Stack Overflow tells you to do. But that invariably leads to a result that is not even remotely sensible.

Long story short, my hot take is this. Maven is write-only. Gradle (ideal usage) is read-only. Gradle (normal usage) can be neither read nor written.

Re: Moving SciPy to the Meson Build System

#32
post #24

Earlier quoted context omitted.

I find pom.xml much more readable than deciphering a giant script file like build.gradle or CMakeLists.txt. 99% of the time I automatically know how the build works because its convention.

For me, Gradle's readability depends heavily on how you use it. If you use it Maven-style, with relatively simple build scripts and all the complexity pushed out to plugins, it's very readable. A fair bit more readable than Maven, in my opinion, but I wouldn't care to argue that point in particular. If you use it the way Stack Overflow tells you to do it, so that your build scripts are basically glorified ad-hoc Groo…

On top of that each Gradle release changes a couple of DSL stuff, and the Android plugin is an hopeless case.

Re: Moving SciPy to the Meson Build System

#33
post #10

> Really there were only two viable candidates: CMake and Meson. Would be great to hear why those were the only two candidates that they considered (and not e.g. Bazel or Nix).

nix-build relies on symlinks, which seemingly can't work on Windows. And it's not really a build system. Bazel relies on a JVM and it's really nice to not have one of those on your system if you don't absolutely need it.

Depending on how minimal you want to get, I think native build systems where you're not just building for yourself, but distributing source bundles that need to be built by others, have to start the discussion with Autotools, CMake, and Meson. The reason is just that they're already required by everything else anyway, so you're not adding any burden to the downstream packagers by using them.

If you're just building for yourself, have at it, get as bespoke and obscure as you want, but SciPy isn't being built and deployed primarily on NumFOCUS's own servers. It's being distributed as a tarball to its users who mostly build it themselves. You should make every effort to use a build system they're likely to already have and already be familiar with.

In particular, much of the focus here seems aimed at users who want to cross-compile for embedded Linuxes running on ARM. I doubt those people want to pull in a JVM.

Kind of reminds me of when I was working for a geointelligence agency charged with building and integrating third-party ground processing algorithms into a user-facing web tasking framework. We have to retrieve and build the dependencies, too. xerces-c, Armadillo, MKL, no problem. Just keeping downloading, either cmake .. or configure, make, then make install, over and over.

Then one of them requires TensorFlow and it becomes a two-month research project trying to figure out how to build it (sorry Google, but the military does not trust your pre-built binaries).

Re: Moving SciPy to the Meson Build System

#34
post #12

It would be great to port Meson from Python to pure C for portability. There is Boson[1] attempt to do exactly this but it's just a first step towards the goal. [1] https://sr.ht/~bl4ckb0ne/boson/

Why is Python not portable, as in, on which systems is "build Python and then use that to run Meson" not a reasonable option?

The CI for boson seems like it runs on platforms where Python definitely is available, but also I notice the CI uses samurai, a reimplementation of ninja with a similar motivation: https://github.com/michaelforney/samurai

Ninja is in C++ so I am even more confused at Sanurai.

Is this just an implementation-diversity thing? (which is great!)

Post reply on HN