Apr 6, 2022
I just did a fun bit of retrocomputing archeology.
I wanted to give the kids a Paint program, so I did a quick Google in my current favorite framework and found https://love2d.org/forums/viewtopic.php?t=87469. Ran great and was loads of fun, but looked a bit.. off. Some of the colors were missing, and clicking on the black rectangles sometimes abruptly changed the color. Turns out:
“In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.”
— https://love2d.org/wiki/love.graphics.setColor
Before:
After:
permalink
* *
Apr 3, 2022
We have an old computer the kids use to watch Cocomelon. It runs Windows. We've also been playing with some Love2D programs on my Linux computer. Today I installed Love2D on the Windows computer. Now they can run programs on their computer. Programs I can tweak over time, that they may peek at.
I'd always felt bad that my Linux-only programs excluded Windows users. But I didn't realize they were excluding me as well. In this way I come back face to face with the oneness of all things.
permalink
* *
Apr 1, 2022
On the positive side, the kids enjoyed playing with those Game of Life apps today. The question they asked me later:
Is this Mu or Teliva?
So now they know that there are other programmers on the planet.
permalink
* *
Mar 31, 2022
It's not just a matter of deleting features. Any time I innovate a feature even slightly, I find myself doing something I don't have the skills for. I lost the first version of this comment thread, writing it on my Teliva-based editor (which provides character counts for chunks). Fucking stupid bug, and it was all me.
Software benefits from testing. If you use software with few users, it's almost certain to be under-tested.
I also can't just ignore all the considerations of industrial software.
I can't just do it from scratch because I don't have all the skills. Deciding what to depend on is also thorny. Pulling in irrelevancies vs excluding people.
5% of software lasts a long time. (Analogy with food breaks down there.) Hard to tell which 5% it is. (Analogy with building roads/bridges breaks down there.)
If I were to ever have any success, I'll be dealing with awkward requests, the risk of burnout.
One thing is clear: the dream/temptation to "scale up" is poison. But it's unclear what's left. We end up with a few people scattered in a humongous state space mostly building stuff for ourselves, nibbling at the margins of the software industrial complex, while unable to actually extricate ourselves from it.
You can have both kinds of software, the kind that's unreliable because the authors are indifferent/malicious or the kind that's unreliable because the authors don't have enough support.
permalink
* *
Mar 29, 2022
Is "situated software"[1, 2] just another rationalization for tweaking our text editors, ricing our desktops, etc.?
[1] https://www.gwern.net/docs/technology/2004-03-30-shirky-situatedsoftware.html
[2] https://www.robinsloan.com/notes/home-cooked-app
permalink
* *
Mar 18, 2022
"The more living patterns there are in a place -- a room, a building, or a town -- the more it comes to life as an entirety, the more it glows, the more it has that self-maintaining fire which is the quality without a name.
"And when a building has this fire, then it becomes a part of nature. Like ocean waves, or blades of grass, its parts are governed by the endless play of repetition and variety created in the presence of the fact that all things pass. This is the quality itself."
RIP CA
permalink
* *
Mar 17, 2022
Has anybody played with this folk algorithm to generate prime numbers using the Sieve of Eratosthenes, creating a coroutine for each prime? Examples:
using fork()
and pipe()
: https://www.cs.dartmouth.edu/~doug/sieve/sieve.pdf
in C using tasks and channels: https://swtch.com/libtask
in Lua using tasks and channels: https://github.com/majek/lua-channels/blob/master/examples/sieve.lua
in Python using a more efficient but less interesting algo because Python lacks full coroutines: https://github.com/majek/lua-channels/blob/master/examples/sieve.lua
It might be fun to try this in Wireworld.
permalink
* *
Mar 13, 2022
Beginnings of a way to link to arbitrary lines in a text file.
One thing Zettelkasten and Roam provide that my system of text files doesn't is the ability to hyperlink to an arbitrary line in any file in the corpus. I don't think Org-mode has that either.
Line numbers break if I go back and edit above them. I could maintain a table of line hashes somewhere, but that'll get thrown off by small changes to the line, or even reformatting a paragraph.
Idea: just pick the first letter of each word.
Here's how you turn a line of text into an id:
$ echo ' The quick brown fox jumped over' | sed 's/^\s*//' | sed 's/\([^ ]\)[^ ]* */\1/g'
Tqbfjo
And here's how you search for the file containing a given id:
$ grep "$(echo Tqbfjo |sed 's/./\\<&.*/g')" . -rl
If the line gets reformatted and the line gets split between two others, just search for prefixes or suffixes of the id.
As a fork of Lua, Teliva has always had a copy of the Lua manual. I finally brought it up to date.
https://akkartik.github.io/teliva/doc/manual.html
Sections for capabilities Teliva takes away (mostly the C API which compromises sandboxing) are deleted. New sections are highlighted in magenta.
The table of contents should give a sense of the new parts.
In particular I'm kinda proud of Teliva's new File I/O primitives
Main project page
permalink
* *
Mar 7, 2022
Heck, Teliva has a big issue 😞
Apps ship with source. To let you run without reading the source, apps run without any privileges by default. No files, no network.
You can grant broad privileges to a single function after reading just its source.
The issue: functions can be over-ridden, so you end up accidentally granting privileges to malicious nooks and crannies.
I need to go back to app-level permissions. Grant narrow privileges to the whole app, without regard to what function uses them.
A concrete use case for permissions by caller (now removed from Teliva)
By its nature, a file browser can list directory contents and open files all over the computer. How could we convince ourselves that it's only using these privileges to meet our requests?
My old solution: app is written in such a way that someone can grant these privileges to a single function after convincing themselves it opens a single file/directory every time the Enter key is pressed.
Now I need something new..
permalink
* *