💾 Archived View for thrig.me › blog › 2023 › 05 › 16 › going-in-circles.gmi captured on 2023-07-22 at 16:52:54. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-05-24)
-=-=-=-=-=-=-
This might be the start of a company logo from the 1980s or so? (A totally unscientific skim of BYTE magazine vol. 8, no. 8 shows various instances of horizontal lines in e.g. the IBM logo, BASF floppy drive artwork, and a few other places.)
Maybe you could draw a face below it.
It's a Pokémon ball... or something.
This got pretty abstract.
Back to the half-circle.
Last I left it, anyways.
Go does not really suit quick prototyping, but the compiles are fast. In particular you have to leave in a placeholder "fmt" line so that if you remove all the debug lines the compiler does not yell at you about the import line, a time-wasting twiddle. Maybe there's, like, a debugger somewhere? But that would yank me out of the usual edit-save-review cycle, and probably I'd forget how to use the debugger, and the debugger probably won't show me what I'm interested in, like the length of some line calculation or whatever. Hence,
ab PUFF fmt.Fprintf(os.Stderr, "dbg
to print a line with some values or calculations or whatever in it. (That's a vi abbreviation for the ~/.exrc.go file.)
vi of course does not support images, so what is the quick loop to build an image and review it? Here entr and an image viewer can be wired up to preview the image for a few seconds on every write. From the shell history, the following hairball sufficed.
echo circle.go | entr sh -c 'go build circle.go && ./circle && solitary . timeout 4s feh -g 1280x960 -Z out.gif'
If used often this would be hidden off in a script. If you have a fancy shell you could &| to disown the feh away, but I have a solitary script that does similar and works anywhere a command can be run. The "run something on file write" pattern works pretty well for all sorts things—previewing a gemini file in amfora, building music from LilyPond input, etc.
If we're going in circles, a canon might help.
These are pretty easy to construct if you know counterpoint and maybe a little about harmony. Basically the end of the loop needs to "fit" back around with the beginning, though some types of canons will spiral up or down and not repeat on the same note. Lots of different variations are possible here.
On the IDE front, the same method is used as for the Go code; on file write entr(1) wakes up and runs a script that runs lilypond, opens the PDF, and if mute is off a little fluidsynth (it used to be timidity) wrapper plays the file, or the enabled MIDI sections of it, anyways.
Circles, everywhere!