• 0 Posts
  • 108 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle



  • It’s weird to have something that verbose for using in the shell. I don’t want to use verbose commands when just doing stuff interactively, so I never learn how to really use its features as a concequence. Bash, while it has more footguns, is more readable to me because I’m more familiar with the individual commands. For most programing you spend more time reading it than writing it, but that’s not the case for the shell so there it’s the wrong tradeoff imo.




  • This might not be what you mean when you say “addictive”, but since I’ve been addicted to it for the last half year or so, I’m gonna suggest it anyway: Morrowind.

    While the original came out in 2002 for Windows and later Xbox, there’s been a fan remake of the engine which runs on linux (and windows and macos) called OpenMW.

    It’s an open world role playing game about exploring the island of Vvardenfell, which is a strange and alien place that’s easy to lose yourself in. Most of the wildlife is made up of insect- or dinosaur like creatures. There are forests made up of giant mushrooms, and ancient wizard lords who use magic to grow mushrooms into buildings that you have to be able to fly to navigate. It’s a world with a rich history, featuring several different religions, cultures and overlapping and competing political structures.

    Despite its age, it is to this day a game with a very active modding community which can extend and improve the games mechanics and visuals. It also features what is probably the longest running active modding project, Tamriel rebuilt which seeks to add the rest of the province of Morrowind to the game. It’s about half way done and has basically another game worth of content in it at this point.






  • Since the diffs are tree-sitter based, it’s interesting to think about what a tree-sitter based patch would look like. Probably wouldn’t double as a human and computer friendly format like normals diffs. I suppose that you could create patches that are more robust to the source code changing since it wouldn’t care about linebreaks and maybe you could have it so it doesn’t care if you move code around since you could have it so its going by e.g. what the parent function is and not the line number. I gotta wonder how useful that actually is though.


  • There is a lot of fanboying in discussions like these, so I understand if you’re weary of that. That said I don’t think static analysis tools are a very good point of comparison for (what I’m assuming that you’re referring to) Rusts ownership system.

    While static analysis tools certainly can be useful for some classes of errors, there are types of errors that they can’t catch that the borrowchecker can. This is because the language are built around them in Rust. Rusts lifetime analysis is dependent on the user adding lifetime annotations in certain situations, so since c++ doesn’t have these annotations static analysis tools for c++ can’t benefit from the information these annotations provide.

    Furthermore, c++ suffers from being an old language with a lot of features. Legacy features can allow for various loopholes that are hard for a static analysis tool to reason about.

    C++ static analysis tools can find errors, but Rusts borrowchecker can prove the absence of errors modulo unsafe code.

    That said, I don’t have any good data on how much of a problem this is in practice. Modern c++ with a CI-pipeline doing static analysis and forbidding certain footguns is safe enough for most contexts. Personally, I’m exited about Rust more because I think that it’s a nicely designed language than because of its safety guarantees, but it doesn’t really have the ecosystem support for a lot of things, like gamedev or ui at the moment.


  • There will be plenty of jobs in c++ in the foreseeable future, so it’s not a bad language to know from that perspective. I don’t know if it’s the most pedagogical language to learn otoh, python is a better language for getting comfortable with the basics, c is better when it comes to learning a (slightly wrong but close enough) mental model of how a computer works under the hood, and there are many better languages to learn if you want to learn good approaches to thinking about problems.

    Maybe you are leaning c++ because you want to work on something specific that c++ is primarily used in, and in that case go ahead with that project. I think having something tangible that you want to work on is great when it comes to learning programing and that’s worth more than picking the “best” language. Besides, you can always learn different languages later in your career if you want/have to.


  • Part of Linux culture is customizing your system. Linux allows you to do much more with your computer, but some of these things require tinkering or might cause you to break your setup. If you don’t tinker much things will most likely be stable, but having the ability to tinker is for me a major part of the appeal. What are you hoping to get out of using linux? It’s a good alternative if you wanna make an old computer run more smoothly, if you care about privacy or if you don’t want to have to pay for your operating system, and if any of those are your main reason go for it and it will probably work out smoothly. If you’re interested in linux because it seems “cool” or “fun” you’re probably gonna have to do some tinkering so in that case you should be prepared to edit some files, read some instructions and possibly ask for help online.



  • The benefit with rebase is if you want to have maybe 4 commits insteadd of 10. When reviewing a large pr, I find that it’s helpfull if it’s broken up into a couple of coherent commits so that I can review it commit by commit. It’s easier to follow the logic of why something is being changed if it’s associated with a specific commit.

    Sometimes squashing the entire commit is the right choice, in which case you can do what you’re doing or use some built in feature to do that.




  • Pair coding with vim is a skill in itself (for the vim user). You can make things a bit easier to follow by making liberal use of visual mode for example. I have a CoworkerMode command that turns on smooth scrolling via vim-smoothie and cursorline, and I’ve also added some stuff to the neovim right-click menu so that I can explicitly right click go to definition for example. It can be worth switching editor sometimes, but it’s not always worth it if you’re in the middle of something.