• 2 Posts
  • 26 Comments
Joined 1 year ago
cake
Cake day: September 7th, 2023

help-circle
  • What is so bad about virtual environments? I found them to be really nice and useful when I developed in Python over about 5-ish years. It was really nice being able to have separate clean environments for installing libraries and executing things.

    Granted, I only used Python as a solo developer, so if there are shortcomings that emerge when working with other developers, then I would not be aware of them…

    Edit: also, performance is a bit more of a subtle topic. For numerical logic, Python actually is (probably) much better than a lot of its competitors thanks to numpy and numexpr. For conditional logic, I would agree that it’s not the best, but when you consider developer velocity, it’s a clearly worthwhile tradeoff since frameworks like Django are so popular.



  • This has always been the whole point behind the Trojan Horse that is systemd. Now that Poettering/Red Hat control the entire userspace across virtually all distros, he/they can use it as a vehicle to force all of them to adopt whatever bullshit he thinks of next.

    This is what the Linux ecosystem gave away when they tossed their simple init system to adopt the admittedly convenient solution that is systemd. But in reality, the best solution was always to drop init, and instead replace it with an alternative that was still simple to replace if the need should arise. But now that everyone is stuck on systemd, they’re all at the mercy of Poettering’s Next Stupid Idea.

    Convenience comes at a price. systemd is the Google Chrome of Linux userspace. Get out while you can.




  • I haven’t done too much work with WASM myself, but when I did, the only languages I saw recommended were Rust, C++, or TinyGo. From what I’ve heard, Rust and C++ are smoother than TinyGo. Garbage collected languages usually aren’t great choices for compiling to wasm because wasm doesn’t have any native garbage collection support. That limits your selection down a lot.

    But another option you may want to consider is Nim. As I understand, it compiles to C, so any C->Wasm compiler should theoretically work for you as well. I did a quick search and wasn’t able to find any great resources on how to do this, but you might get a bit more lucky. Good luck!



  • This is quite cool. I always find it interesting to see how optimization algorithms play games and to see how their habits can change how we would approach the game.

    I notice that the AI does some unnatural moves. Humans would usually try to find the safest area on the screen and leave generous amounts of space in their dodges, whereas the AI here seems happy to make minimal motions and cut dodges as closely as possible.

    I also wonder if the AI has any concept of time or ability to predict the future. If not, I imagine it could get cornered easily if it dodges into an area where all of its escape routes are about to get closed off.




  • Agreed overall, you will still be competent switching from one language to another, but intricacies and nuance matter a lot here. You may have enough knowledge to solve problems, but will you have enough knowledge to avoid creating new ones too? Like performance issues, or memory leaks, or other unwanted behavior? C++ is a great example here: someone that’s smart but inexperienced might just be dangerous enough to start writing classes with dumb pointers without overriding the copy constructors, and this is just a recipe for disaster.

    I think it would take more than a few months to develop the kinds of experience that you need to be aware of these issues and avoid them. And while C++ is a very easy example to point out here, pretty much all languages have their share of footguns to be aware of, and it just takes time to learn them. A “deep knowledge” of a language is not just about being faster and more productive; it’s also about not creating more issues than the ones your solving.


  • This one might be a bit controversial, but has rung true in my general experience. Probably a lot of exceptions to these rules, but here goes:

    You don’t really know a programming language until you understand a fair amount of the standard library and how packages/modules/dependencies work. Syntax is pretty easy, and any mainstream language will work just fine for solving basic leet-code style problems. But when you really spend a lot of time working with a language, you’re going to spend more time learning about common libraries and how to manage dependencies. If you’re working with a language like C++ or Java, this could also include build systems and how to use them.

    Another precursor to being able to say that you know a language is that you should also be familiar with best practices (ie. how to name modules, how to write documentation, etc.) and common pitfalls (undefined behavior, etc.). This is one of the hardest parts about learning a new language in my opinion, because the language may not necessarily enforce these things, but doing them the wrong way can make your life very difficult.






  • Same here. Sure, KDE and Gnome may have great Wayland support by now, but what about other DEs? The situation in XFCE seems to be pretty grim:

    It is not clear yet which Xfce release will target a complete Xfce Wayland transition (or if such a transition will happen at all).

    MATE seems to have piecemeal support. No idea what the status of LXDE/LXQT are. And there are plenty of other window managers that don’t have the manpower to support wayland either.

    The deprecation of X is going to leave a lot of dead software in its wake.


  • namingthingsiseasy@programming.devtoMemes@lemmy.mlYouTube
    link
    fedilink
    arrow-up
    3
    arrow-down
    13
    ·
    10 months ago

    Why is it your responsibility to pay the creators? Google is a trillion dollar company and makes billions off of what people post on youtube. Shouldn’t they be paying them instead and not you?

    Besides, it’s only a matter of time before Google takes more and more of the cut that you think you’re paying them.



  • namingthingsiseasy@programming.devtoMemes@lemmy.mlYouTube
    link
    fedilink
    arrow-up
    56
    arrow-down
    2
    ·
    10 months ago

    when it means they will not sell my data and will allow me control over my algorithm to prevent it from playing to my vulerabilities

    The problem is that this will never happen. That boat has sailed - companies will never give up on their existing revenue streams. They may say that paying today will exempt you from the ads, but it’s only a matter of time before they ramp up the cost and start showing ads anyway. That’s how cable television started, and it’s how internet streaming will end as well. And as for the not selling data/controlling the algorithm, well you have no way of proving that they don’t do that so they’ll do it no matter what they say.

    There’s no reason for google to do this whatsoever. They have their business model - any new revenue streams will 100% definitely not reduce the other ones at all. It’s just gonna be another giant dump into the pile of enshittification.



  • First thing is to not mount it at all. Any writes to the overwritten partition will corrupt your data.

    Second thing: install system rescue cd to a live usb and boot it. Look into testdisk and photorec. It’s been a while since I’ve had to use these tools, but I believe testdisk can restore the partition and photorec can find files in a file system that has been deleted. I would try running photorec first to save the recovered files to an external hard disk, and then testdisk to try restoring them. But disclaimer: it’s been a while since I’ve had to do this, so my memory is foggy here.

    Good luck!