Left this place, as I don’t like the moderation. Deleting replies with opinions they disagree with.
- 105 Posts
- 1.5K Comments
thingsiplay@beehaw.orgOPto
Programming@programming.dev•Can't decide if end user index access should be 0 or 1 based and if END index should be inclusive
2·9 个月前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:and1:(meaning everything)0is equivalent to0:0and:0(meaning empty)1:0still empty, because it starts after it ended, which reads like “start by 1, give me 0 elements”1:1gives 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?
thingsiplay@beehaw.orgOPto
Programming@programming.dev•Can't decide if end user index access should be 0 or 1 based and if END index should be inclusive
1·9 个月前Now that you ask, I don’t have any example of this. I know program
headhas negative numbers to access from the last element backwardsls -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.
thingsiplay@beehaw.orgOPto
Programming@programming.dev•Can't decide if end user index access should be 0 or 1 based and if END index should be inclusive
1·9 个月前No, that’s not an option here. This is a commandline program, something like
grepin example. And this slice is just one of the many features the user could use to refine the output.
thingsiplay@beehaw.orgOPto
Programming@programming.dev•Can't decide if end user index access should be 0 or 1 based and if END index should be inclusive
2·9 个月前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).
thingsiplay@beehaw.orgOPto
Programming@programming.dev•Can't decide if end user index access should be 0 or 1 based and if END index should be inclusive
4·9 个月前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 as2, then I could convert it into2: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.
thingsiplay@beehaw.orgOPto
Free and Open Source Software@beehaw.org•GPU Screen Recorder for Linux / Wayland as Flatpak
3·9 个月前I’m skeptical, because of the huge fps differences they claim. I mean OBS dropping from 30 to 7, compared to stay at 30 for GSR sounds like either the hardware or drivers are not fully supported on OBS and its dependencies, or maybe a misconfiguration. Maybe OBS + Nvidia does not support Wayland fully yet (or at the time of writing the statement from him/her) and that caused issues? At this point, who knows, without more information we can only guess.
thingsiplay@beehaw.orgOPto
Free and Open Source Software@beehaw.org•GPU Screen Recorder for Linux / Wayland as Flatpak
3·9 个月前I have the same doubts as you and wondered the same when reading those paragraphs about performance claims. I will most likely do my own comparisons, but I have AMD hardware here. The claims talk about Nvidia, so maybe its not applicable to me. I’ll do my comparisons in the next few days, because currently working on something else.
From my research, I found an old gamingonlinux article, with a quote explaining this on a high level: https://www.gamingonlinux.com/2022/04/a-developer-made-a-shadowplay-like-high-performance-recording-tool-for-linux/
OBS only uses the gpu for video encoding, but the window image that is encoded is sent from the GPU to the CPU and then back to the GPU. These operations are very slow and causes all of the fps drops when using OBS. OBS only uses the GPU efficiently on Windows 10 and Nvidia. This gpu-screen-recorder keeps the window image on the GPU and sends it directly to the video encoding unit on the GPU by using CUDA. This means that CPU usage remains at around 0% when using this screen recorder.
Have in mind, these claims maybe not true anymore, because OBS improved over the last 3 years too. Always take claims like these with grain of salt (that is healthy).
thingsiplay@beehaw.orgOPto
Free and Open Source Software@beehaw.org•GPU Screen Recorder for Linux / Wayland as Flatpak
6·9 个月前Inspired is a bit an understatementf :D I don’t see this as a bad thing, because people used to like it on Windows now get a similar GUI. However you should know that there are two different user interfaces. The Nvidia like one is in experimental phase and you have to opt into it. It looks very familiar:

thingsiplay@beehaw.orgOPto
Free and Open Source Software@beehaw.org•GPU Screen Recorder for Linux / Wayland as Flatpak
3·9 个月前The only little thing that bugs me in the moment is, that I don’t get a tray icon to show if its recording or not. The icon appears with the old GTK gui, but not when using the Nvidia like gui. Do you have any such issues? If that is an issue at all or is this a design choice?
thingsiplay@beehaw.orgOPto
Free and Open Source Software@beehaw.org•GPU Screen Recorder for Linux / Wayland as Flatpak
5·9 个月前No problem. I’m just fast and furious. :p BTW if you play on Steam, you don’t need this, because Steam already has such a functionality builtin now. Just sayin here. For all other cases, this is an excellent tool. It seems like, I’m new to it too.
thingsiplay@beehaw.orgOPto
Free and Open Source Software@beehaw.org•GPU Screen Recorder for Linux / Wayland as Flatpak
4·9 个月前There is a setting for exactly this. It defaults to writing to RAM, but you can change it to drive, which they do not recommend. I did not try it out yet. Edit: BTW, it should be noted that this background recording only works in the new Nvidia like GUI. I could not find it in the classic GTK GUI.
I wish it was a bit more aggressive. For that I have an additional plugin ClearURLs (as linked by someone else in the replies BTW), but don’t know if its actually better or not.
Hmm thinking about it, maybe it does not run the updated code. Ah, got it. Normally when you update Firefox, then try to open a webpage in the “old version” that is currently running in memory, then you can’t show the page; one MUST restart in order to use Firefox further. So this change maybe changes this “forced restart”. This is probably more inline with the other programs in your system, that you can still use and need to restart in order to use the new version. Which makes totally sense. It’s not what I thought, but it probably is.
thingsiplay@beehaw.orgto
Firefox@lemmy.ml•Firefox 141 Release Brings Lower RAM Usage On Linux
29·9 个月前Firefox 141.0 also no longer requires a forced restart after an update has been applied by a package manager.
As an Archlinux based user, I appreciate this.
thingsiplay@beehaw.orgto
Technology@beehaw.org•Amazon cuts hundreds of AWS cloud jobs after strategic review, says AI wasn’t the main factor
7·9 个月前says AI wasn’t the main factor
That’s exactly what an Ai would say.
Would be so nice if Meta will be seen as hostile and blocked Europe wide. The problem is, this can be interpreted as blocking Free Speech. But is it really Free Speech to misuse peoples rights and steal their privacy, that is against the law?
In the 60s it was the atom bomb regulation they had to sign. A “few hours later” in 2025 it’s the Ai regulation. My prediction 60 years from now, there will be a regulation of who an what you can do on Mars. But I’m getting ahead of myself.
thingsiplay@beehaw.orgto
Programming@programming.dev•In neovim under wayland how do you guys copy and paste things?
4·9 个月前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
thingsiplay@beehaw.orgto
Linux@lemmy.ml•Does this mean 6.5 KDE Plasma will support pip any window?
3·9 个月前Unless its coded with JavaScript (me mocking the
datefunction). Not that I am a JavaScript programmer, I just happen to know its totally broken.






A dash is a bit problematic from practical point of view. In example I allow single numbers without a colon like just
6which would be interpreted as6:6. And each element is optional as well, which would make-6either 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.