about summary refs log tree commit diff stats
path: root/sieve.tlv
Commit message (Collapse)AuthorAgeFilesLines
* stop running task.scheduler by defaultKartik K. Agaram2022-03-161-13/+15
| | | | | sieve.tlv is 50% slower (18s vs 12s) with the new function call instrumentation.
* reconcile all apps with template.tlvKartik K. Agaram2022-03-061-237/+2
| | | | | | They may take more or less from it (sieve.tlv in particular takes nothing since call depth doesn't help at all there), but what they take is in the right order so that you can compare across apps.
* new API for file operationsKartik K. Agaram2022-03-051-39/+23
| | | | | | | | | | | | | | | | | | | | | File operations now always return a channel (or nil on error or permission denied). When start_reading() from a filename, you can repeatedly :recv() from the channel it returns. When :recv() returns nil, you're at the end of the file. Stop. When you start_writing() to a filename, you can repeatedly :send() to the channel it returns. When you're done writing, :close() the channel. Writes to the file won't be externally visible until you do. To make this work I'm now always starting up the scheduler, so I need to fix sieve.tlv. Transparently running the scheduler is an abstraction, and whenever I create an abstraction I always worry about how it might fail. There's a hopefully-clear error when you read past end of a file.
* distinguish between window global and argKartik K. Agaram2022-03-021-11/+11
|
* starting to make Teliva apps more testableKartik K. Agaram2022-02-271-6/+6
| | | | | | | | | | Tasteful apps should only perform side-effects through 'window' arguments rather than the 'curses' module directly. It's ok however to read constants like curses.A_NORMAL or curses.stdscr(). There are some limitations, unfortunately. Ncurses wasn't designed with testability in mind. For example, there's no way to curs_set or assume_default_colors without the 'curses' module. Oh well.
* import https://github.com/majek/lua-channelsKartik K. Agaram2022-02-261-0/+409
Also a little test program to demo channels in action.