RSSAmplifier

Blog

lynn's house

look!! a strange bug

lynn.github.ioRSS feed ↗9 posts

Latest posts

Setting timers in simple games (feat. the frame rule)

Lately I’ve been reading the disassembled source code to Super Mario Bros. , and I learned that, in its code, events are scheduled for the future in much the same way I do it when making a quick game-jam game in Lua, such as o moku e mun . It’s so simple it’s barely a system! But I like how understandable-yet-flexible it is. I’ll describe it in Lua, for use in a PICO-8 or Picotron game. It’s two…

TOMLing my Discord servers

I am in far too many Discord servers. I wanted to organize the folders they’re grouped in. This is really annoying to do in Discord itself, because it only lets you drag and drop them around one at a time in the left sidebar. So I did a little bit of messing around in Firefox’s Developer Tools to extract and reinsert my folder data. I’m not sure if I saved time doing all this. It would have been…

Late acceptance hill-climbing, a snake with a camera

It’s a Saturday morning, and suddenly I wonder: what’s the most compressible list of eight distinct 8-letter English words? Let’s write some Python code. import random , re , zlib words = open ( "/usr/share/dict/words" ). read (). split () words = [ w for w in words if re . match ( "^[a-z]{8}$" , w )] N = 8 def compress ( w ): return zlib . compress ( " " . join ( w ). encode ( "utf-8" ), level =…

Adding compose key rules from the clipboard

I wrote a small Bash (plus Python) script for adding my current clipboard contents to my compose key . It’s made for my combination of GNOME + Wayland + XCompose + ibus, so you may have to tweak it. But here’s the idea: #!/usr/bin/env bash symbol = $( wl-paste ) code = $( zenity --entry --title = "Adding compose rule from clipboard" --text = "Which keys should make ' $symbol '?" ) if [[ -z " $code…

NetHack 5.0.0 (is still guidecore)

NetHack is the strangest game that I regularly get sucked back into. Recently, the DevTeam released version 5.0.0. The version I’m most familiar with is 3.4.3, which seemed to be the “definitive” version when I started playing as a teenager (c. 2008) and development had already long slowed to a crawl. I long considered the changes in 3.6.0 and beyond to be a bit disappointing: they mostly served…

Some Strudel tips

I’ve been doing a bunch of livecoding/algorave stuff in Strudel , and it’s great fun. You can make all kinds of fun sounds through experimentation, and the docs are fantastic, but I’ve been itching to make a kind of “guide” that catalogues certain winning formulas for electronic music that I frequently turn to. Here are some scattered thoughts that would make it into such a guide. Each code block…

Days Since `pacman -Syu`

Sometimes I wake up in a cold sweat and realize it’s been three weeks since I ran pacman -Syu . No more. I use GNOME (btw), so I made a little GNOME shell extension for myself, constantly showing how long it’s been in the top bar. That 1d means I updated my packages one day ago. If it’s been ten days or more, the number turns yellow. As far as engineering goes, the process was pretty unremarkable.…

Cute beeps for your terminal

I think computers should beep. Put this in ~/.local/bin/bip if you agree: #/usr/bin/bash notes =() times =() t = 0 for arg in $@ ; do if [[ $arg != 0 ]] ; then notes+ =( sine $arg ) times + =( ${ t } s ) fi t = $(( t + 3500 )) done play -qn -c1 synth 1 ${ notes [*] } \ fade 0.01 0.1 0.06 delay ${ times [*] } gain -20 The play command is provided by sox . Now you can run long_command && bip C4 D4…

Reader-style Uiua

Lately I’ve been playing with Uiua , an APL-like programming language that has no local variables on purpose. Instead, you describe how data flows through your function using combinators. One can also think of the language as stack-based, though the official documentation has recently started to discourage this perspective. I appreciate the die-hard commitment to tacit, point-free programming on…