• 22 Posts
  • 566 Comments
Joined 1 year ago
cake
Cake day: September 1st, 2023

help-circle



  • Difficult? How so? I find compiling C and C++ stuff much more difficult than anything python. It never works on the first try whereas with python the chances are much much higher.

    What’s is so difficult to understand about virtual envs? You have global python packages, you can also have per user python packages, and you can create virtual environments to install packages into. Why do people struggle to understand this?

    The global packages are found thanks to default locations, which can be overridden with environment variables. Virtual environments set those environment variables to be able to point to different locations.

    python -m venv .venv/ means python will execute the module venv and tell it to create a virtual environment in the .venv folder in the current directory. As mentioned above, the environment variables have to be set to actually use it. That’s when source .venv/bin/activate comes into play (there are other scripts for zsh and fish). Now you can run pip install $package and then run the package’s command if it has one.

    It’s that simple. If you want to, you can make it difficult by doing sudo pip install $package and fucking up your global packages by possibly updating a dependency of another package - just like the equivalent of updating glibc from 1.2 to 1.3 and breaking every application depending on 1.2 because glibc doesn’t fucking follow goddamn semver.

    As for old versions of python, bro give me a break. There’s pyenv for that if whatever old ass package you’re installing depends on an ancient 10 year old python version. You really think building a C++ package from 10 years ago will work more smoothly than python? Have fun tracking down all the unlocked dependency versions that “Worked On My Machine 🏧” at the start of the century.

    The only python packages I have installing are those with C/C++ dependencies which have to be compiled at install time.

    Y’all have got to be meme’ing.

    Anti Commercial-AI license








  • Is zig memory safe by design? If not, rust will “win”. Large companies aren’t going to hire for an unknown or unpopular memory unsafe language when they already have C or C++ - there’s just no contest.

    Last I read, zig didn’t even have a standard string library. Unless that changes, it won’t even be a viable alternative to C/C++.

    Edit: I checked and got this

    the Zig language, like C, entrusts memory management to humans, placing full trust in human development. Zig then provides some memory safety checks to ensure memory safety. However, it still lacks the strict compile-time guarantees of Rust’s ownership system and borrow checker. Therefore, when writing Zig code, developers need to pay more attention to potential memory safety issues and ensure that errors and exceptional situations are handled correctly.

    Rust Magazine

    Anti Commercial-AI license





  • You’re missing the point. I don’t really care about Winamp. It’s ancient and probably used by about 15 grandpas. The point is the behavior of the people in the issues and pull requests. It’s possible to be polite, but firm and bring a point across. Right now it looks like a pack of dogs barking around thinking they’re witty and clever for doing so.

    Projects are not entitled to be received gratefully and respectfully if you treat open source devs like a disposable source of free labour.

    Nobody’s forcing anybody to do anything. You’re not forced to contribute in any way shape or form. Winamp hasn’t hired anybody there to write code under bad conditions. Justifying bad behavior “because the other side is doing it” (which isn’t true btw) is just weak.

    Anti Commercial-AI license






  • onlinepersona@programming.devtoProgramming@programming.devSafe C++
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    8
    ·
    edit-2
    2 months ago

    auto isn’t dynamic typing it’s just type inference.

    I’m aware, but one of the big arguments I’ve heard about dynamic typing is “I don’t know which type it has when I read the code”. Well, auto looks just like var in that regard.

    Lambdas are just a way of defining methods in place. It has nothing to do with callbacks.

    Callback definition from wikipedia:

    In computer programming, a callback is a function that is stored as data (a reference) and designed to be called by another function – often back to the original abstraction layer.

    This is exactly what lambdas are often used for in C++.

    Anti Commercial-AI license