I’m here to stay.
You mean alignment of arguments or multiline strings in example? If they are not on their own line, then it does not matter to me. If they start on their own line, then mixing spaces and tabs isn’t a good idea to me. In example for function calls with a bit more complex calls and multiple arguments, I put them in their own line each. They are indented and therefore indentation level plays. If they are on the same line, I never align them and if I would, it would be spaces. In general:
function() {
....var = 1
....another_var = 2
....indented(arg, arg2, arg3)
....indented(arg,
.............arg2,
.............arg3)
}
BTW, my personal note about the tabstops for indentation is, I wish everyone would use it over spaces. Because it would make it much easier to display the file differently without changing it. Also parsing it would make it easier too probably. But since spaces are the standard, I exclusively use space for indentation.
^(update: just added a new link)^
The way you describe and show it, is called foldmethod “marker”. The advantage of markers are, that they are built into the file. The disadvantage is, its built into the file. I rather like having the source independent from folding markers. The good news is, you can change the foldingmethod in Neovim and ignore the marker comments and instead use your own method.
A simple one is just “manual”, where you set what is foldable and not. There are some automatic ones, like based on indentation and such. I was never a folding guy anyway, so don’t really know all the differences when to use and how they differ. Neovim has following foldmethod: manual, indent, expr, syntax, diff, marker. The “expr” method even allows you a custom code and logic.
But this can lead to over engineering simple stuff. Which makes the code harder to read and maintain and more error prone. Especially if you don’t need all the other stuff for the class. Worse, if you define a class then you also tend to add more stuff you don’t use, just in case it might be useful.
A simple variable name is sometimes the better solution. But it depends on the situation off course. Sometimes a new class make things more clear, as it abstracts some complexity away. Yeah, we need to find a balance and that is different for every program.
My rule of thumb is, use short names if the context makes it clear. But do not make names too long and complicated (especially with Python :D). For me having unique names is also important, so I don’t get confused. So not only too similar names are bad, especially if they all start like “path_aaa”, “path_bbb” and such, then the eye can’t distinguish them quickly and clearly. And searching (and maybe replace) without an IDE is easier with unique and descriptive names.
Sometimes its better to come up with a new name, instead adding a modification and make the name longer. This could be in a for loop, where inner loops edit variables and create a variation of it. Instead adding something like “_modified”, try to find what the modification is and change from “date” to “now” instead “date_current”.
Lemmy is a far better platform for discussions than Discourse in my opinion. The tree like sub-reply threads in each post (the Reddit concept) is preferable over a single thread of replies. You don’t need to cross quote and for readers no need to read the quote to see who and to what the reply is about. I don’t like Discourse discussion platforms at all.
However, Discourse has a few features that fits well for a discussion platform. I like the tags and Trust system of it.
this as a way for them to say it’s safer to use, somehow.
And it probably is, because they use a lot of Ai for code generation too. And having Rust is a bit safer I assume, because its way stricter and the error message also way more helpful. Having not programmed in TypeScript, this is just an assumption and I just realized it gives you even right here. Oh the irony. :D
I remember MNG and never understood why APNG wasn’t officially recognized. I didn’t know it was widely supported already. Why do people still create and use GIF in the internet, if there is a superior format?
The first thing that comes to my mind is, it might be a scam. Confirm the mail is from Github. Can’t help otherwise, but this is what I think first.
Oh now this looks so obvious! Thank you and it works. Man Python might has its shortcomings, but it can be so elegant and easy to do so complex stuff in short time.
Just as a side note, after I created this topic, was curious to ask a local programming LLM Ai model. I usually don’t use Ai, but was curious to if it could help here finding the solution. I provided the entire post and it gave me the correct answer, basically the same as yours. Just a curiosity.
Right, but the other fork became its own project. I have no problem with it. As long as the original code license is not changed.
I don’t see a problem. If someone forks it and changes the license to some proprietary, then their fork is proprietary. The original software is still Open Source. People act like as if the original license changed.
I looked at it, its on the todo list. I also use sudoedit
(or sudo -e
). I can’t find the todo list, but here is the issue for: https://github.com/trifectatechfoundation/sudo-rs/issues/762
What issue do people have with the sudo-rs license? Its Free and Open Source. I think its more like people having an issue with the language Rust and just search excuses to be mad at.
The COSMOS collaboration has worked tirelessly for the past two years to convert raw data into broadly usable images and catalogs. In creating these products and releasing them, the researchers hope that even undergraduate astronomers could dig into the material and learn something new.
“Because the best science is really done when everyone thinks about the same data set differently,” Casey said. “It’s not just for one group of people to figure out the mysteries.”
What I love about science is, it brings everyone together. It does not matter where you are in the world, if the nations are fighting against each other. When it comes to science, everyone works together.
Rewrite in Rust is not harmful.
Lol, from the title I thought this would gonna be about Ai and so called “Vibe Coding” (what a dumb term BTW).
Only sunshine and roses allowed? For all the Ai hype in the media and lot of people blindly following, its good to see and remind us the shortcomings. As long as it is done properly and honest, I have nothing against a “Pro” and a “Contra” article.
There are couple of factors that makes this a confusing topic.
Vim: On a high level, normally Vim (and Neovim) have their own clipboard system. Vim has multiple internal clipboards that can be used like variables and accessed with other commands. So its kind of sandboxed from your system. But you can explicitly use the commands to access the system clipboard. There is a configuration you can set to use the system clipboard by default.
Linux: Unlike Windows, in Linux we also have two kind of clipboards: the “system” clipboard as you know and the “primary” clipboard. This has nothing to do with Vim and is a feature on Linux systems itself. If you in example in your browser mark a text without copying, it is automatically copied into the “primary” clipboard. Then you should be able to access and paste it with middle mouse button in example. The system clipboard where you explicitly copy stuff is not affected by it.
You should read following documentation: 09.3 The clipboard - Neovim