• 0 Posts
  • 7 Comments
Joined 3 years ago
cake
Cake day: July 1st, 2023

help-circle


  • Thank you for the answer!

    I have not previously heard Meson described as a reinvention of Cmake or a CMake clone, nor that it was meant to be. I would think that Meson being as opinionated as it is, including for example the fact that it does not and will not support user-defined functions, precludes it from being a CMake clone. It seems instead to be a build-system with a rather different philosophy and feature-set compared to Cmake. But if that philosophy or that feature-set does not match your needs, then there’s obviously no reason to pick it over CMake


  • Out of curiosity, why do you consider CMake to be the better choice compared to Meson?

    Personally I landed on Meson a few years ago, from what I remember chiefly due to simply not liking CMake’s DSL and finding Meson easier to work with, despite needing to target a pretty old version for the sake of compatibility. Though Meson is definitely not perfect either; it’s highly opinionated, and for example only recently got support for custom build targets putting stuff in sub-directories (as I discovered while writing this comment), so I’ll personally be stuck with my workarounds for a good while longer



  • Recently had to develop a Python project, the tests took at least ten seconds to start each single time. This is while I made over a hundred tests for my module and re-ran them after every change.

    Python is dog slow, but if your tests are taking 10 seconds to start (not even run!), then something is catastrophically wrong with your setup. For comparison, for one of my projects, it takes a total of 12 seconds to run nox on a clean slate, which involves setting up venvs for five major versions of Python, installing the package and its dependencies in each, and finally running the 1500 test test-suite five times


  • What about the fact that runtime startup alone auto-disqualifies python for all short-lived process use-cases?

    While Python’s start-up time is a lot slower than a corresponding compiled program, in most cases it’s not slow enough to matter even if the process itself is short-lived:

    $ hyperfine 'python3 -c "pass"'
    Benchmark 1: python3 -c "pass" (412 runs)
                    mean     ±       σ          min     …     max
      Wall Time      7.1 ms  ±     0.2 ms       6.7 ms  …     8.4 ms
      Memory         9.4 MiB ±     0.1 MiB      9.1 MiB …     9.5 MiB
    

    If you are running a small program so often that this kind of start-up time matters, then the loop should probably already be implemented in the program itself. In line with the article’s thesis