Linus Åkesson
linusakesson.net · Personal blog · on HN since 2008
Linus Åkesson writes about programming, Unix internals, music and retro hardware, including The TTY Demystified and Kernighan's Lever.
What HN saysCommenters recommend The TTY Demystified as a long but necessary read, and call Kernighan's Lever the best breakdown of that quote.
290HN people shared it
163linked it in comments
202stories submitted
6.7Kstory points
5 months agolast shared
2008people per year2026
Most-shared posts
- 1The TTY demystified (2008)38 people · 935 points · first shared 2011 · 46 comments on HN
- 2A Mind Is Born (2017)33 people · 630 points · first shared 2017 · 64 comments on HN
- 3The TTY demystified26 people · 852 points · first shared 2009 · 40 comments on HN
- 4A case against syntax highlighting (2007)19 people · 68 points · first shared 2013 · 88 comments on HN
- 5Kernighan's Lever (2012)15 people · 180 points · first shared 2012 · 18 comments on HN
- 6/dev/zero has infinite electrons and /dev/null has an infinite appetite for them13 people · 506 points · first shared 2011 · 23 comments on HN
- 7Assembly Routine for Realtime Decoding of Floppy Data12 people · 206 points · first shared 2013 · 11 comments on HN
- 8A case against syntax highlighting10 people · 27 points · first shared 2008 · 24 comments on HN
- 9A Mind Is Born, the making of a 256 byte demo10 people · 20 points · first shared 2017 · 1 comments on HN
- 10Safe VSP – 30 year old Commodore 64 bug demystified (2013)9 people · 266 points · first shared 2014 · 22 comments on HN
- 11The Chipophone – A homemade 8-bit synthesizer (2010)9 people · 97 points · first shared 2010 · 12 comments on HN
- 12Kernighan's lever, the secret to becoming a better programmer8 people · 3 points · first shared 2013 · discussion on HN
- 13The Commodordion6 people · 519 points · first shared 2022 · 65 comments on HN
- 14Craft6 people · first shared 2011
- 15Massively Interleaved Sprite Crunch – C64 Demo Effect (2016)5 people · 155 points · first shared 2016 · 25 comments on HN
What HN people wrote when they linked it
awkward · 2026-02-02
Kernighan's Lever - https://linusakesson.net/programming/kernighans-lever/index.php
This article is perennially posted here and is probably the best breakdown of this quote.
sivers · 2025-12-19
And don't miss the Qweremin:
https://linusakesson.net/qweremin/
Brilliant.
verytrivial · 2025-11-11
Another worthy mention in this space is Linus Åkesson's dialog language[1]. From its description:
Dialog is a domain-specific language for creating works of interactive fiction. It is heavily inspired by Inform 7 (Graham Nelson et al. 2006) and Prolog (Alain Colmerauer et al. 1972). An optimizing compiler, dialogc, translates high-level Dialog code into Z-code, a platform-independent runtime format originally created by Infocom in 1979. Development seems dormant at the moment, but it feels more like Inform 7 'done right' to me. If my brain was a little bigger and calmer I'd be all over it. It has excellent documentation too. Very portable -- I compiled it locally under Termux on my phone with nothing but Clang.
[1] https://www.linusakesson.net/dialog/index.php
onetom · 2025-06-17
@shiomiru
What's the best resource (paid or free) in your opinion for learning about these TTY related concepts?
I'm aware of https://www.linusakesson.net/programming/tty/index.php for example, but that doesn't go into termcap/terminfo/curses.
one of the comments mentions http://www.amazon.com/termcap-terminfo-OReilly-Nutshell-Linda/dp/09371… though (online https://www.scribd.com/document/831486848/Termcap-and-Terminfo-Oreilly…
cstrahan · 2025-05-10
The sibling comments are great; to add to those, I highly recommend giving “The TTY Demystified” a read:
https://www.linusakesson.net/programming/tty/
It’s a long read, but necessarily so: there is considerable complexity (and unfortunate overloading of terms) as a consequence of the transition from physical terminals as a separate hardware component to the emulated (warts and all) counterparts we have in modern OSes.
Luc · 2025-02-05
> Linus has an article on sprite-crunching (mind-blowingly complex).
https://www.linusakesson.net/scene/lunatico/misc.php
Great article.
siltcakes · 2025-02-05
As soon as I saw who made this, I cranked my speakers and wasn't disappointed! Linus is amazing. I recommend his cover of The Moon from DuckTales:
https://linusakesson.net/chipophone/ducktalesmoon.php
jetbalsa · 2025-02-05
I'm a huge fan of his A Mind is born demo 256 byte demo he did awhile back, freaking amazing
https://linusakesson.net/scene/a-mind-is-born/index.php
2mlWQbCK · 2025-01-19
The creator of Dialog, Linus Åkesson, went ahead and used it to create the winning entry for the IF Comp 2019. Does not look as if the source code was published, but I think winning that contest is the best indicator that a language for I-F is good enough to use in practice that I can imagine.
https://www.linusakesson.net/games/the-impossible-bottle/index.php https://ifcomp.org/comp/2020?compact=0
ethagknight · 2025-01-17
So many other videos are amazing as well. I am blown away.
https://www.linusakesson.net/music/vivaldi-summer-presto/index.php https://www.linusakesson.net/music/withering-bytes/index.php
amiga386 · 2024-11-04
For anybody wondering "why couldn't they just...", there is a lot of complexity in TTYs and PTYs. The kernel is even involved in line discipline and job control. Those Ctrl+Z or Ctrl+C keys you press? The kernel gets involved.
It may seem strange that there's a process signal for window-size changes, but that's what was needed back in 1985. There's a similar dance with the Amiga's console.device, but both Unix and Amiga TTYs are better than Windows' terminals where there was no such thing as a PTY until Windows 10, you had to make direct API calls, and even now it's still pretty slow: https://devblogs.microsoft.com/commandline/windows-command-line-introd…
This page is a great overview pf the Unix TTY/PTY subsystem: https://www.linusakesson.net/programming/tty/
userbinator · 2024-07-09
Whenever someone brings up this subject, I'm reminded of this classic article from Linus which has appeared many times on HN: http://www.linusakesson.net/programming/tty/index.php
5e92cb50239222b · 2024-05-22
If you can get through this, I highly recommend it.
https://www.linusakesson.net/programming/tty
TacticalCoder · 2024-01-20
I see "linusakesson", I upvote.
A mind is born, 256 bytes, is my favorite:
https://www.linusakesson.net/scene/a-mind-is-born/
enriquto · 2023-08-07
This does not appear to be a "radical" redesign, it looks quite similar to a regular piano.
I would love to see different key arrangements connected to regular hammers and strings, allowing for a wider span for each hand, opening a new era of virtuosism. Something akin to the buttons of a chromatic accordion [0], but with rectangular piano-like keys. We are used to the common arrangement of white and black keys centered around the major C scale, but this is just an arbitrary choice.
[0] http://www.linusakesson.net/sixtyforgan/
janvdberg · 2022-12-28
This is great! I’ve been remotely logging into systems for all of my adult life and last week I went on a bit of a bender because I realized didn’t really grasp how these things actually work.
I am not sure I do now (specifically how SSH ties in to this).
But at least I now know more about terminals, shells, rawmode and ptms/ptx and more.
This link right here fits right in with the following ones:
[0] https://biriukov.dev/docs/fd-pipe-session-terminal/4-terminals-and-pse…
[1] https://www.sobyte.net/post/2022-05/tty/
[2] http://www.linusakesson.net/programming/tty/index.php
dkozel · 2022-12-16
Thanks Fabien!
Also I love all your retro work. I have a NeXTStation Turbo Color that's my retro pride and joy. Have you seen or been involved in any of the Demoscene activities? It's amazing the graphics that people are able to squeeze and abuse out of older hardware.
Off topic, but folks might enjoy Poems for Bugs, a talk where Linus Åkesson talks about cycle accurate coding to exploit GPU bugs in the C64.
https://www.linusakesson.net/programming/poems-for-bugs/index.php
jayFellows · 2022-09-19
> One Dark Pro Darker
Oh, nice. Will be testing out this one.
> [...] I just randomly pick on ones in a while
Oh, interesting. Do you find that it takes a period of time after switching before your eyes become accustomed to the change (from a quick-code-readability perspective)?
> Some themes work better with one language than the other.
Yeah, this is the most annoying part for me.
---
I remember reading a post a long time ago praising the benefits of not using syntax highlighting while coding (I'm not sure, but it may have been this one: https://www.linusakesson.net/programming/syntaxhighlighting/). Not sure if I could ever get used to not having syntax highlighting, but so much of what I like/dislike about themes revolves around syntax highlighting... perhaps it's worth testing for a period of time with syntax highlighting disabling (I assume this is even possible?).
episode0x01 · 2022-09-01
Everything Linus produces just blows me a way. Especially loved his C64 organ [0] and also maybe the only "cool" NFT I've ever seen [1] (basically the source code for the demo is encoded in the token so it's on the blockchain forever instead of just being some link to an image hosted on some server that could disappear at any point.)
[0] https://www.linusakesson.net/sixtyforgan/index.php
[1] https://www.linusakesson.net/scene/a-mind-is-born/nft.php
RamRodification · 2022-09-01
My favorite thing of his is the Chipophone
https://www.linusakesson.net/chipophone/index.php
https://www.youtube.com/watch?v=gAuPIgD-TM0
georgia_peach · 2022-02-26
An excellent article in his "Further Reading" section:
https://www.linusakesson.net/programming/tty/
Hackbraten · 2022-02-16
Here’s also an amazingly detailed writeup of one such optimization attempt, GCR on-the-fly decoding:
https://www.linusakesson.net/programming/gcr-decoding/index.php
crispyambulance · 2021-09-16
The same person also wrote "The TTY Demystified" also a very good read: https://www.linusakesson.net/programming/tty/index.php
Tistron · 2021-08-11
I love it when art is used to point to the absurdity of some social or legal absurdity.
Another example is Linus Åkesson's http://www.linusakesson.net/pages/binart.php
twic · 2020-03-20
There's an amazing demo called 'A Mind Is Born':
https://www.youtube.com/watch?v=sWblpsLZ-O8
Amazing principally because the whole thing is 256 bytes:
https://linusakesson.net/scene/a-mind-is-born/
I never meet anyone who has even heard of the demoscene, let alone come seen this particular work.
I was at a film festival watching a programme of short films, one of which was the well-made AI-box escape romp 'Watch Room':
https://www.youtube.com/watch?v=th5uJNB7VU8
And similarly found my interface with my seat disrupted by the closing credits using the music from 'A Mind Is Born'. This being a festival, the director was there, so i could tell him how much i appreciated the reference!
kwoff · 2019-10-29
If we define "elegant" as getting a lot done with a little, another BASIC (kinda..) one: https://linusakesson.net/scene/a-mind-is-born/ (The last part of the song is so great, too.)
wyldfire · 2019-09-17
It's really comical: I paused and had a chuckle when I read this sentence too.
But to everyone else who wonders: this is an interactive fiction component/library. Like classics from infocom (Zork et al), but modern.
I tried briefly playing the author's game, "Tethered" [1] but gave up quickly because after sacrificing Judith I couldn't figure out how to summon any light or move anywhere. Supposedly I'm 'working' this morning... ;)
[1] http://www.linusakesson.net/games/tethered/tethered-aa/play.html
kylek · 2019-09-17
Åkesson's work always blows my mind away.
One of my favorites is Paralellogram [0]
[0] https://www.linusakesson.net/scene/parallelogram/index.php
edit: name correction! (indeed that is a cool name!)
pdkl95 · 2019-07-10
You might be interested in lft's talk[1] - "Poems For Bugs" - about why people are still writing very impressive demos for the C64 and other highly limited platforms. Instead of thinking about programming as functions and objects that divide the problem into simple mostly-independent modules. It's more like trying to write a highly-constrained poem of asm instructions that fit together in incredibly clever ways[2].
[1] https://www.linusakesson.net/programming/poems-for-bugs/index.php
[2] e.g. https://www.linusakesson.net/scene/a-mind-is-born/index.php
edit:
I love the Zachtronics games "Shenzhen I/O" (easier) and "TIS-100" (MUCH harder/esoteric). They are a great (and fun) way to try asm/microcontroller programming.
jepler · 2019-04-19
Best explanation of vsp (or, vsp-induced crashing) I'm aware of: https://www.linusakesson.net/scene/safevsp/index.php