Commit Graph

15 Commits

Author SHA1 Message Date
Kartik K. Agaram 2d3cad5945 fix build on Mac OS 2022-02-10 23:42:09 -08:00
Kartik K. Agaram e552571b1e standardize key order in .tlv files
This will eliminate some spurious git diffs I keep having to clean up.
2022-02-09 09:18:05 -08:00
Kartik K. Agaram 7a13adb52c try to get by with one feature macro
I fucking hate feature macros. Egregious discharge of our
division-of-labor-obsessed society. People should be able to introduce
names. People should be able to give up names to lower levels of
abstraction when they encounter conflicts.

Feature macros seem to exist[1] to support more than two levels of
abstraction. You try to build, one of your libraries fails to build
because of a conflict between it and one level down. You don't want to
modify this library. Just fucking https://catern.com/change_code.html
already. But no, I have to litter my code with feature macros even
though I just want the abstraction the original library provides.

[1] https://man7.org/linux/man-pages/man7/feature_test_macros.7.html
    https://lwn.net/Articles/590381
2022-01-29 12:41:20 -08:00
Kartik K. Agaram 6a33284b07 get Teliva running on NetBSD
NetBSD still uses curses by default. One _could_ install ncurses, but I
don't have access to a NetBSD box with permissions to install ncurses,
so I'm experimenting to see how far we can get with just curses. So far
most of the apps seem to work, with the exception of one bug that I'll
commit next.
2022-01-24 20:15:43 -08:00
Kartik K. Agaram 18a499c5c0 . 2022-01-02 16:35:01 -08:00
Kartik K. Agaram bb6e79aa0d reorg: pull Teliva-specific stuff out of lua.c
It should now be easier to diff against the Lua 5.1 sources upstream.
2021-12-25 13:33:37 -08:00
Kartik K. Agaram 6af91eb0d2 tlv format for transient editor state
Stop interpreting arbitrary Lua code when loading editor state. We don't
need that power or security risk.
2021-12-25 09:27:44 -08:00
Kartik K. Agaram 12b0a2a7b6 more protection against data loss 2021-12-17 08:46:11 -08:00
Kartik K. Agaram 59ef5da1d9 . 2021-12-17 08:39:31 -08:00
Kartik K. Agaram b9877fabdc . 2021-12-11 14:59:00 -08:00
Kartik K. Agaram 5c68906303 handle non-existent file 2021-12-11 14:01:34 -08:00
Kartik K. Agaram c0c9d31688 snapshot: migrate all sample apps to new format 2021-12-11 10:22:53 -08:00
Kartik K. Agaram d5038fe514 snapshot: writing working?
This is a complete mess. I want to abstract reading multiline strings
behind a function, but the lookahead requirements for that are quite
stringent. What's a reasonable abstraction here?
2021-12-11 09:37:23 -08:00
Kartik K. Agaram 052c5501ac snapshot: key/value lines after multiline strings 2021-12-11 07:20:04 -08:00
Kartik K. Agaram 0b0a58da06 snapshot: start reading a new format
I really wanted to avoid getting into defining or parsing new file
formats. However, using the entire power of Lua is not ideal, as
described earlier in Konrad Hinsen's bug. In addition to everything
else, it's a vector for arbitrary code execution when someone loads an
untrusted image.

I could use JSON, but it requires ugly string escaping. Seems cleaner to
just use YAML. But YAML is complex and needs its own dependencies. If
I'm going to do my own, might as well make the multi-line string format
really clear.

I can't yet write the new format.
2021-12-11 00:43:26 -08:00