• 1 Post
  • 30 Comments
Joined 5 months ago
cake
Cake day: September 26th, 2024

help-circle
    1. Is a modern language with a good build system (It’s like night and day compared to CMake)

    Meson exists … as do others.

    But they are not the default option. And your new job may not use them.

    1. And I just like how the language works (errors as values etc.)

    Fair enough; though why? What’s wrong with exceptions?

    Exceptions is a non standard exit point. And by “non standard” I’m not talking about the language but about its surprise appearance not specified in the prototype. Calling double foo(); you don’t know if you should try/catch it, against which exceptions, is it an internal function that may throw 10 level deep ?

    By contrast fn foo() -> Result<f64, Error> in rRst tell you the function may fail. You can inspect the error type if you want to handle it. But the true power of Result in Rust (and Option) is that you have a lot of ergonomic ways to handle the bad case and you are forced to plan for it so you cannot use a bad value thinking it’s good:

    • foo().unwrap() panic in case of error (see also expect)
    • foo().unwrap_or_default() to ignore the error and continue the happy path with 0.0
    • foo().unwrap_or(13.37) to use your default
    • foo()? to return with the error and let the parent handle it, maybe







  • I only have to “quotes” strings that contains globs. The rest mostly work or use the newer/recommanded way to do things for posix shells.

    But I must admit, I only use it interactively. For scripts I #!/bin/{,ba}sh. I will use something else once it won some/most the distro preinstalls (either nu, elvish, fish, but for now it’s sadly python).



  • I don’t know elvish, but I can’t get into nu. It is too different than what I learned (bash). I’m not sure I understand what they want to accomplish… Maybe I’m not the target, I use the shell to start commands as a dev, not as a devops or data guy…

    I also had a hard time using fish the first time I tried it. But since the version on Debian 10 I re-tried and now the only thing to know is “put the arguments in quotes if you want the command to do globbing”. With that you can use 99% of the commands you find on internet as is.




    1. You need a license
    2. usage should just be help (avoid extra step)
    3. connect does not exist (see add and cmd list)
    4. You can git clone <REPO> <DEST FOLDER>, no need to cd
    5. maybeCreateDir is not used each time, there are some mkdir
    6. “changes” is not a helpfull commit message. Accept an optional argument string and {MESSAGE:=change}
    7. Accept a different repo path
    8. set -euxo pipefail at the start of the script if you want to exit at any error. Some sort of bash strict mode
    9. shellcheck does not like iterating over ls’s output

    I’m too lazy to open issues/PR for all that, and I still need to learn stow. Hopfully this might help me ? (I don’t really need help with git that this sçript look to abstract too much for me.)








  • Sadly I can’t recommand pop-os. In 2 years, the updates broke twice on me.

    The resolutions where simple enough if you can use the command line to run sudo apt update, sudo apt upgrade. But the GUI shop updater just crashed on me without the apt error message visible.

    It is a nice distro overall with which you can even try tiled windows without commiting to it.

    -> pop-os is nice but it may break from times to times. So if (like me or most dev) you are ok with the CLI and just a bit of fixes from times to times then go for it. But if you are affraid of the CLI or never want to fix anything, then some other distro may be a better choice.


  • Just use this one… or any of this 4 others.

    This is the issue for us, python outsiders. Each time we try we get a different answer with new tools. We are outside of the comtunity, we don’t know the trend, old and new, pro and cons.

    Your first recommandation is hatch… first time I’ve heard of it. Uv seems trendy in this thread, but before that it was unknown to me too.

    As I understands it, it should be pip’s job. When it detect I’m in a project it install packages in it and python use them. It can use any tool under the hood, but the default package manager shoud be able to do it on its own.