Show HN: Blink my keyboard lights when you visit this page
lelandbatey.com
lelandbatey.com
There's a command-line tool to turn the LEDs on or off (I forget what it's called), so I integrated that into a test script we used that measures timer latency with various background loads. (We had our own high-resolution timer implementation based on the APIC.)
For some reason this discussion reminds me of the way the ZX spectrum handled tape input by using a single bit of a register that was shared with the three bits of screen border colour. Because the default tape loader accumulated bits there by shifting the register along at timed intervals, the data loaded produced patterns in the screen border.
It didn't have any keyboard LEDs, but the Spectrum did have at least five different input "shift" states - the keyboard was modal and auto-tokenizing.
In general, this sort of problem is less of an issue now since the transition to multi-core processors means that a long-held spinlock doesn't actually block all progress on the machine. There are usually plenty of other available cores and it's unlikely that unrelated processes are all stuck at the same time.
I created an Erlang script that allows you to send messages by morse code to the keyboard like this:
./remote_morse "HI,IAMSAM."
(Spaces don't appear to be used in morse code?)The messages won't be differentiable while the site is under HN-level traffic, but in a few months, you should be able to send arbitrary messages to @lelandbatey using this.
The code is available here: https://gist.github.com/samcamwilliams/19339ea2d8431f27728ec...
go install github.com/lelandbatey/watchserver/...
sudo watchclient --host lelandbatey.com
You have to run sudo for that binary to function correctly, since the syscall to light up keyboard buttons requires root.XT had only 640K memory. Borland managed to fit IDE into this memory with code assistant and interactive debugger. But if your program consumed too much memory, IDE would not fit and you had to use other means for debugging; there was speaker, printer and keyboard lights.
The idea of having a light go off when your network sees certain packets sounds like it could be an art project for a Raspberry Pi :-)
ssh user@example.com tail -n0 -f /var/log/nginx/access.log | while read; do aplay click.wav & done
Works best with a short wav file.EDIT: Might be fun to run a separate pipeline that plays a cash register noise every time someone pays :)
http://www.daskeyboard.com/p/5q-cloud-connected-rgb-mechanic...
this is a prime example of a product that looks really nice in theory, but would really suck in practice.