Live data from Hacker News

Sl: a steam locomotive in your terminal

aasen.in

21–30 of 58 posts

Re: Sl: a steam locomotive in your terminal

#22
On the Sun/Solaris machines where I first worked, the `sl` command had an added bonus: it played a really loud "choo-choo" sound from the workstation's internal speaker, regardless of volume or mute settings, so you always knew when someone fat-fingered their file listings, and much laughing was had by all.

I very quickly learned to alias sl=ls in my shell rc, and it's still in there to this day, just in case...

Re: Sl: a steam locomotive in your terminal

#24

    > The following code changes the default behaviour of ls from listing
    > files to turning your terminal into an unstoppable steam locomotive.
    > The only way to end it is closing the terminal, so use this with caution.
erm, that's easily stopped:

    [ctrl]+z
    $ pkill -9 sl

Re: Sl: a steam locomotive in your terminal

#26

Great, excellent, fun. But, clearly, it should run 'ls' after doing its choo choo?

That is optimizing for the short term. "When I've run sl, I clearly wanted ls, so you should give me that (even if you also punish me)."

Optimizing for the long term is also plausible. "Don't reward me for making mistakes (even if you also punish me) because it'll dilute my muscle-memory training, and I'll be more likely to make mistakes in the future."

Neither of these is inherently more correct than the other. The long term has more uncertainty, but greater potential rewards. We just have to make a judgment call.

I tend to favor the long-term approach for sl. I can't easily quantify how valuable my stricter muscle-memory training will be, but I can imagine the possibility of a significant upside if I actually become a more precise typer. Also, the worst-case downside just isn't that bad -- retyping ls just isn't that hard.

Re: Sl: a steam locomotive in your terminal

#27

We need one for "got"

Got,

Got Milk?, Displays Got Milk? Advert. Boring

GOThic, Changes terminal font to Gothic?

GoT, Game of Thrones, Decapitates user?, Automatically fires up BitTorrent client and grabs latest episode? Plays ASCII art GoT episode? Cat's all of GRRM's GoT novels into your terminal? (That'll teach you).

Re: Sl: a steam locomotive in your terminal

#28
post #24

> The following code changes the default behaviour of ls from listing > files to turning your terminal into an unstoppable steam locomotive. > The only way to end it is closing the terminal, so use this with caution. erm, that's easily stopped: [ctrl]+z $ pkill -9 sl

erm, no? "while true; sl; done"

Re: Sl: a steam locomotive in your terminal

#29
The one bad thing about switching to the Dvorak layout is that in Dvorak, ls is really cumbersome to type. The l isn't on the home-row, and both of them are on the right pinky. The way I do it now, it's virtually impossible to type sl instead of ls.

Typing dc instead of cd, though is still very common. And dc just mockingly tells me: "will not attempt to process directory."

(I now have `no` aliased to ls. Maybe I should alias `on` to sl.)

Post reply on HN