The Donald Trump

Saturday 27 April 2024

New top story on Hacker News: Show HN: Is_ready – Wait for many services to become available – 0 Dependencies

Show HN: Is_ready – Wait for many services to become available – 0 Dependencies
11 by stavepan | 2 comments on Hacker News.


New top story on Hacker News: Ask HN: Any fun ways to learn Emacs?

Ask HN: Any fun ways to learn Emacs?
34 by yawpitch | 19 comments on Hacker News.
I’ve been using vim for years, but after a traumatic brain injury my muscle memory for typing got a bit scrambled at the same time my need for something that was always installed everywhere dwindled. I’d kind of like to finally see what the deal is with emacs, but as holding down multiple keys simultaneously is now more than a bit hard (and so is memorizing all the chords) I’m looking for a game or typing tutor or similar sort of experience that can help me pick up emacs gradually and help me build a new muscle memory without having to actually work on anything important. Over the years I’ve seen a bunch of games aimed at getting used to vim-style navigation, but not come across anything emacs-centric. Alternatively I suppose I could just got evil, but as I’ve not used emacs practically I’m a bit confused how you don’t end up with a hybrid of home row touch typing plus having to wander about for whatever chords remain, which seems more like the worst of both worlds rather than the best.

Thursday 25 April 2024

New top story on Hacker News: Ask HN: Any tool for managing large and variable command lines?

Ask HN: Any tool for managing large and variable command lines?
12 by bjackman | 13 comments on Hacker News.
I often find myself building up big complex command lines for testing my code, which live in my shell history. Sometimes it's possible to just wrap these up in scripts but often my invocations of that script get so variable that I need many flags etc and now the commandline gets really long and I'm back at square one. A little hard to describe in the abstract so here's a present example: - I wanna compile a kernel and boot it up in QEMU, then SSH into it. - But sometimes, I wanna skip the build (it takes a few seconds to detect that the tree is unchanged) - Sometimes, I wanna boot with a different special disk file. - Sometimes, I wanna change the networking setup. Sometimes this requires me to charge the part of the commandline that SHH's into the VM, to match the changes I made to the QEMU commandline. - etc etc So I just have a huge command line in my shell history and I bring it up and manually edit it each time. But I think it's possible to make this process more convenient. An inspiration for this is Magit, an Emacs plugin that allows (among many other things) building up and stringing together lots of complex git commandlines with varying flags, via a few keypresses in a discoverable text UI. I wonder if something like this already exists? If not I think it could be a fun design challenge. By looking at the shell history and using heuristics about common CLI design patterns perhaps you could automatically create keyboard shortcuts.