

I believe it, if I see it with my own eyes.
I’m here to stay.
I believe it, if I see it with my own eyes.
I think that I’m going with these approaches. For the ‘0’, I’m now accepting it as the 0 element. Which is not 0 based index, but it really means before the first element. So any slice with an END of 0 is always nothing. Anything that starts at 0 will basically give you as many elements as END points to.
0:
is equivalent to :
and 1:
(meaning everything)0
is equivalent to 0:0
and :0
(meaning empty)1:0
still empty, because it starts after it ended, which reads like “start by 1, give me 0 elements”1:1
gives one element, the first, which reads like “start by 1, give me 1 element”I feel confident about this solution. And thanks for everyone here, this was really what I needed. After trying it out in the test data I have, I personally like this model. This isn’t anything surprising, right?
Now that you ask, I don’t have any example of this. I know program head
has negative numbers to access from the last element backwards ls -1 | head -n -1
, but it does not start by 0. So yeah, the 0 as last element might be not as common as I thought to be.
No, that’s not an option here. This is a commandline program, something like grep
in example. And this slice is just one of the many features the user could use to refine the output.
But contrary to that, often ‘0’ is also used as the last element or points to “the entire match” in example. Whatever that is. I feel like outside of programming languages, for the end user, its not that clear of an answer. Why I created this topic.
I’ll read the linked article and rethink this topic. Maybe introducing another option to make the index 0 based (or the other way 1 based).
First, thanks for the answer. As for the user base, its actually gaming oriented and they typically do not interact with 0 base. So I guess that makes for an obvious choice. And at the moment its also “inclusive”. To get one element user needs to 2:2
. If user gives only one element, such as 2
, then I could convert it into 2:2
, to get one element. Sounds logical, right? Sorry for having so many follow up questions, my head is currently spinning.
Do you think this interferes somehow with the logic of a “missing” slice element, which would default to “the rest of the list”. In example 2:
would then get the second element and until rest. This is the default behavior in Rust.
If I have a 1 based index, how would you interpret the 0
? Currently program panics at Argument interpretation phase.
Another maybe is they might outsource some work heavy stuff.
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
Unless its coded with JavaScript (me mocking the date
function). Not that I am a JavaScript programmer, I just happen to know its totally broken.
Could someone explain what’s going on with this comment and why its upvoted so much? It’s a genuine question. What’s wrong with his phone (and how do you know what he uses)?
I just hope they don’t get burned out and there is no crunch. The only other company that did so much in short time I can think of is Insomniac Games. It’s actually how it was used to be with how frequent we got games from single studios. But since they are so big and expensive nowadays, it seems a bit unreal for how fast some companies are able to pump out so many high quality games in relatively short time.
One should not make the mistake to just judge a single photograph, for a role in a film. Its also important how they move and talk, and what the perception of the person based on existing films is. I’m not in the position to judge about any of these castings or your suggestion, just wanted bring in this point into the discussion.
Dolphin filemanager from KDE. Nowadays I default to “compact” view without “preview” enabled. This is similar to “Icon” view, but the icons are small. Lot of files scrolls horizontal instead vertical.
That’s my default. Occasionally I enable preview image and switch to bigger “icon” view when I look into images or videos. Or sometimes I enable “details” view when needed. In normal usage I don’t need the details anyway.
Yes, I use shellcheck in the editor. Its pretty useful. But running (a little bit more complex commands) in the terminal directly won’t help with shellcheck. That’s why I also have a functionality to directly load and edit the current command in the terminal in (Neo)vim and edit and when closing Vim the command gets executed. The benefit doing this is getting checked by shellcheck in the editor and also it makes it easier to one-off complex commands.
Thanks to shellcheck I got in the habbit to always enclose variables in ${var}
. And recently learned from a community member that using [[ expr ]]
style has basically no downsides against using [ expr ]
directly.
If you want to do a Bash like management and programming, that is not dramatically different but fixes some irritations, then Fish is an alternative. Obviously it will not fix all issues, but there is no paradigm shift in handling streams. nushell is dramatically different and at that point, I would rather use a programming language to do the stuff. Speaking of programming language, there is also Xonsh (basically Python+Bash like combination as a system shell).
All these alternatives have a singular big flaw to me: they are not the standard tools on the system, which defeats the purpose of a system shell to me. In the end, without changing the core system that these shells are built on, I don’t think its possible to make a really well made language that interoperates on system level like a shell does at the moment.
That’s the reason why I got a bit more into Bash to understand some flaws, to understand how to use regexes inside Bash and variable substitutions and a few other concepts that are very useful to know. But man… there are so many traps… like looping over a wildcard for files (such as for file in *.txt
) and if the wildcard does not match, then the loop consists of the wildcard as a literal word as if “*.txt
” was a filename. What a stupid idea. There is an option to change that, but that’s the issue. The language is filled with traps and optional options and you have to know all of them.
Edit: Added example code why default behavior sucks:
$ for file in *.ABCD; do echo "${file}"; done
*.ABCD
shopt -s nullglob
$ for file in *.ABCD; do echo "${file}"; done
The difference is:
The quoted image does not say so, they do not say the native packaging from your distribution is borderline unusable. That judgement was added by YOU. The devs just state the package on Archlinux is not officially supported, without making a judgement (at least in the quoted image).
As for the Fedora issue, that is a completely different thing. That is also Flatpak, so its not the package format itself the issue. Fedora did package the application in Flatpak their own way and presented it as the official product. That is a complete different issue! That has nothing to do with Archlinux packaging their own native format. Archlinux never said or presented it as the official package either and it does not look like the official Flatpak version.
So where does the developers say that anything that is not their official Flatpak package is “borderline unusable”?
And then there is software like OBS, which is known for being borderline unusable when not using the only officially supported way to use it on Linux outside of Ubuntu – which is Flatpak.
But why is that? I mean just because it is packaged by someone else does not mean its unusable. So its not the package formats issue, but your distribution packaging it wrong. Right? In installed the Flatpak version, because they developers recommended it to me. I’m not sure why the Archlinux package should be unusable (and I don’t want to mess around with it, because I don’t know what part is unusable).
Those mystical average people would probably stay on Windows, if they don’t care or cannot learn basics of other systems. Its really not hard to explain and understand, even for “average person” that there is an universal source for applications and there are packages designed and managed by your operating system. I think its important for people to learn basics and we should teach them, not dumb them down like on Windows. Soon people won’t be able to eat themselves anymore…
A dash is a bit problematic from practical point of view. In example I allow single numbers without a colon like just
6
which would be interpreted as6:6
. And each element is optional as well, which would make-6
either be a negative number, an commandline option or a range? Some languages also use dots..
instead. If I want ever support negative numbers, then the hypen, dash or minus character would be in the way.I mean I could just do a duck typing like stuff, where I accept “any” non digit character (maybe except the minus and plus characters) with regex. Hell even a space could be used… But I think in general a standardized character is the better option for something like this. Because from practical point of view, there is no real benefit for the end user using a different character in my opinion. Initially I even thought about what format to use and a colon is pretty much set in stone for me.