@shinyoukai@neko.laidback.moe Because you might not want to commit all changed files in a single commit. I very often make use of this and create several commits. In fact, I like to git add --patch to interactively select which parts of a file go in the next commit. This happens most likely when refactoring during a feature implementation or bug fix. I couldn’t live without that anymore. :-)

If you have a much more organized way of working where this does not come up, you can just git commit --all to include all changed files in the next commit without git adding them first. But new files still have to be git added manually once.

⤋ Read More
In-reply-to » Hmm, mine also resolves a leading tilde in these variables. And if $HOME is not specified it tries to resolve the user's home directory by user.Current().HomeDir. Maybe that's overkill, I have to check the XDG spec.

Ok, the standard library implementation is wonky at best, at least in regards to XDG, because it really doesn’t implement it properly. https://github.com/golang/go/issues/62382 I stick to my own code then. It doesn’t properly support anything else than Linux or Unixes that use XDG, but personally, I don’t care about them anyway. And the cross-platform situation is a giant mess. Unsurprisingly.

⤋ Read More
In-reply-to » (#dkvkbra) @shinyoukai Cool, I didn't know about os.UserConfigDir() up until a few seconds ago! I always implemented that myself.

Hmm, mine also resolves a leading tilde in these variables. And if $HOME is not specified it tries to resolve the user’s home directory by user.Current().HomeDir. Maybe that’s overkill, I have to check the XDG spec.

But I’m definitely missing os.UserDataDir(). That’s a bummer.

⤋ Read More
In-reply-to » @lyse Well, I used SnipMate years ago (until 2012). IIRC, it’s more than just ā€œinsert a bit of text hereā€, it can also jump to the correct next location(s) and stuff like that. Don’t remember why I stopped using it.

@movq@www.uninformativ.de Thanks! I’ll have a look at SnipMate. Currently, I’m (mis)using the abbreviation mechanism to expand a code snippet inplace, e.g.

autocmd FileType go inoreab <buffer> testfunc func Test(t *testing.T) {<CR>}<ESC>k0wwi

or this monstrosity:

autocmd FileType go inoreab <buffer> tabletest for _, tt := range []struct {<CR>    name string<CR><CR><BS>}{<CR>   {<CR>   name: "",<CR><BS>},<CR><BS>} {<CR>  t.Run(tt.name, func(t *testing.T) {<CR><CR>})<CR><BS>}<ESC>9ki<TAB>

But this of course has the disadvantage that I still have to remove the last space or tab to trigger the expansion by hand again. It’s a bit annoying, but better than typing it out by hand.

⤋ Read More
In-reply-to » Question to my fellow Vimers: Which snippet insertion mechanism are you using or can you (not) recommend?

@lyse@lyse.isobeef.org Well, I used SnipMate years ago (until 2012). IIRC, it’s more than just ā€œinsert a bit of text hereā€, it can also jump to the correct next location(s) and stuff like that. Don’t remember why I stopped using it.

Then I used nothing for a long time. Just before Christmas, I made my own plugin (… of course …), which does everything I need at the moment (and nothing more).

It can insert simple templates and then jump to the next location:

https://movq.de/v/67cdf7c827/sisni%2Dpython.mp4

And replace a string after insertion:

https://movq.de/v/67cdf7c827/sisni%2Dheader.mp4

(It’s not public (yet?) and it also uses vim9script, so I guess it wouldn’t work on your system.)

⤋ Read More
In-reply-to » @lyse I can tell you this right now, writing assembly / machine code is fucking hard workā„¢ šŸ˜“ I'm sure @movq can affirm 🤣 And when it all goes to shitā„¢ (which it does often), man is debugging fucking hard as hell! Without debug symbols I can't use the regular tools like lldb or gdb šŸ˜‚

@prologic@twtxt.net Debugging this stuff on bare metal hardware (without an underlying OS) is a nightmare. 🤣

⤋ Read More
In-reply-to » @lyse I’m toying with the idea of making a widget/window system on top of Python’s ncurses. I’ve never really been happy with the existing ones (like urwid, textual, pytermgui, …). I mean, they’re not horrible, it’s mostly the performance that’s bugging me – I don’t want to wait an entire second for a terminal program to start up.

@movq@www.uninformativ.de I see. Yeah, all the Unicode stuff certainly doesn’t help here, that’s for sure.

Maybe ā€œspeedcursesā€ could be a name. Or just select any Palatinate curse. ;-)

⤋ Read More
In-reply-to » @lyse I can tell you this right now, writing assembly / machine code is fucking hard workā„¢ šŸ˜“ I'm sure @movq can affirm 🤣 And when it all goes to shitā„¢ (which it does often), man is debugging fucking hard as hell! Without debug symbols I can't use the regular tools like lldb or gdb šŸ˜‚

@prologic@twtxt.net Oh yeah, I bet it is horrible to troubleshoot.

⤋ Read More
In-reply-to » Trying to come up with a name for a new project and every name is already taken. 🤣 The internet is full!

@lyse@lyse.isobeef.org I’m toying with the idea of making a widget/window system on top of Python’s ncurses. I’ve never really been happy with the existing ones (like urwid, textual, pytermgui, …). I mean, they’re not horrible, it’s mostly the performance that’s bugging me – I don’t want to wait an entire second for a terminal program to start up.

Not sure if I’ll actually see it through, though. Unicode makes this kind of thing extremely hard. 🫤

⤋ Read More
In-reply-to » @lyse Yeah I remember you said some days back that your interest in compilers was rekindled by my work on mu (µ) šŸ˜…

@lyse@lyse.isobeef.org I can tell you this right now, writing assembly / machine code is fucking hard workā„¢ šŸ˜“ I’m sure @movq@www.uninformativ.de can affirm 🤣 And when it all goes to shitā„¢ (which it does often), man is debugging fucking hard as hell! Without debug symbols I can’t use the regular tools like lldb or gdb šŸ˜‚

⤋ Read More
In-reply-to » @lyse Yeah I remember you said some days back that your interest in compilers was rekindled by my work on mu (µ) šŸ˜…

@prologic@twtxt.net Yeah, the parser part is what I typically enjoy. Haven’t really looked into code generation itself.

I’m currently looking at your µ commits from the last few days. Holy cow! :-)

⤋ Read More
In-reply-to » Whoo! I fixed one of the hardest bugs in mu (µ) I think I've had to figure out. Took me several days in fact to figure it out. The basic problem was, println(1, 2) was bring printed as 1 2 in the bytecode VM and 1 nil when natively compiled to machine code on macOS. In the end it turned out the machine code being generated / emitted meant that the list pointers for the rest... of the variadic arguments was being slot into a register that was being clobbered by the mu_retain and mu_release calls and effectively getting freed up on first use by the RC (reference counting) garbage collector šŸ¤¦ā€ā™‚ļø

@lyse@lyse.isobeef.org Yeah I remember you said some days back that your interest in compilers was rekindled by my work on mu (µ) šŸ˜…

⤋ Read More
In-reply-to » Whoo! I fixed one of the hardest bugs in mu (µ) I think I've had to figure out. Took me several days in fact to figure it out. The basic problem was, println(1, 2) was bring printed as 1 2 in the bytecode VM and 1 nil when natively compiled to machine code on macOS. In the end it turned out the machine code being generated / emitted meant that the list pointers for the rest... of the variadic arguments was being slot into a register that was being clobbered by the mu_retain and mu_release calls and effectively getting freed up on first use by the RC (reference counting) garbage collector šŸ¤¦ā€ā™‚ļø

@prologic@twtxt.net Tada, congratulations! I find that rather interesting, thanks for telling us. :-)

⤋ Read More
In-reply-to » Trying to come up with a name for a new project and every name is already taken. 🤣 The internet is full!

@movq@www.uninformativ.de How about ā€œQuongsiā€? I generated the first five letters with pwgen --no-capitalize --no-numerals 5 and since that already showed up in DDG search results, I simply appended the last two, which yielded nothing on DDG and Google).

What kind of project is it? Maybe we can help you find a name or nudge you in the right direction.

⤋ Read More

The tt URLs View now automatically selects the first URL that I probably are going to open. In decreasing order, the URL types are:

  1. markdown media URLs (images, videos, etc.)
  2. markdown or plaintext URLs
  3. subjects
  4. mentions

I might differentiate between mentions of subscribed and unsubscribed feeds in the future. The odds of opening a new feed over an already existing one are higher.

⤋ Read More

Whoo! I fixed one of the hardest bugs in mu (µ) I think I’ve had to figure out. Took me several days in fact to figure it out. The basic problem was, println(1, 2) was bring printed as 1 2 in the bytecode VM and 1 nil when natively compiled to machine code on macOS. In the end it turned out the machine code being generated / emitted meant that the list pointers for the rest... of the variadic arguments was being slot into a register that was being clobbered by the mu_retain and mu_release calls and effectively getting freed up on first use by the RC (reference counting) garbage collector šŸ¤¦ā€ā™‚ļø

⤋ Read More