about summary refs log tree commit diff stats
path: root/src/lua.c
Commit message (Collapse)AuthorAgeFilesLines
...
* smarter image browsingKartik K. Agaram2021-11-141-19/+53
| | | | | - distinguish between unused functions and data - don't hardcode a specific convention for the curses window object
* slightly more robust on-disk formatKartik K. Agaram2021-11-141-2/+2
| | | | | | Looks like Lua supports a little bit of programmability in its multi-line string literals. Even though I can't find this documented anywhere.
* janky way to cancel browsingKartik K. Agaram2021-11-141-6/+9
|
* slightly more obvious browse dialogKartik K. Agaram2021-11-141-1/+4
|
* cleaner layout for a function's code and dataKartik K. Agaram2021-11-131-6/+54
|
* .Kartik K. Agaram2021-11-131-0/+1
|
* .Kartik K. Agaram2021-11-131-4/+1
|
* .Kartik K. Agaram2021-11-131-1/+1
|
* clean up after the editorKartik K. Agaram2021-11-131-0/+1
| | | | | Even though we don't need to leave ncurses mode, there's still a process boundary to clean up before.
* .Kartik K. Agaram2021-11-131-1/+2
|
* .Kartik K. Agaram2021-11-131-1/+1
|
* replace Kilo's raw terminal handling with ncursesKartik K. Agaram2021-11-131-1/+0
| | | | | | This was on my todo list. What made it urgent was finding that calling getch() even once while in ncurses caused Kilo to stop detecting arrow keys. No need to debug that sort of nonsense.
* avoid side-effects on the Lua stackKartik K. Agaram2021-11-131-0/+5
|
* stop leaking memoryKartik K. Agaram2021-11-131-2/+3
|
* memory corruption bugKartik K. Agaram2021-11-131-1/+3
| | | | | | | | | I was saving an address on the stack to a global, and it was getting clobbered later. This is the sort of thing I completely eliminated in https://github.com/akkartik/mu :/ Now I'm taking a leaf out of the Mu playbook and leaking a little bit of memory every time I switch definitions.
* .Kartik K. Agaram2021-11-131-6/+0
|
* very rudimentary definition browserKartik K. Agaram2021-11-131-3/+25
| | | | Never shows definitions that were never called. Including non-functions.
* .Kartik K. Agaram2021-11-131-3/+3
|
* .Kartik K. Agaram2021-11-131-9/+0
|
* .Kartik K. Agaram2021-11-131-5/+9
|
* shield kilo.c from teliva_editbuffer detailKartik K. Agaram2021-11-131-0/+6
|
* .Kartik K. Agaram2021-11-131-2/+5
|
* .Kartik K. Agaram2021-11-131-6/+6
|
* .Kartik K. Agaram2021-11-131-11/+18
|
* clean up experiment from previous commitKartik K. Agaram2021-11-131-10/+0
|
* instrumenting function calls with their depthKartik K. Agaram2021-11-131-0/+10
|
* create empty file when navigating to empty definitionKartik K. Agaram2021-11-111-3/+3
|
* ctrl-g to edit a different definitionKartik K. Agaram2021-11-111-2/+10
|
* gracefully handle missing definitionKartik K. Agaram2021-11-111-0/+1
|
* .Kartik K. Agaram2021-11-111-5/+5
|
* global for current definition being editedKartik K. Agaram2021-11-111-3/+5
|
* pass lua_State into editorKartik K. Agaram2021-11-111-3/+3
|
* delete a helper that hides stack side effectsKartik K. Agaram2021-11-111-8/+2
|
* extract a few helper functionsKartik K. Agaram2021-11-111-21/+26
|
* .Kartik K. Agaram2021-11-111-14/+14
|
* .Kartik K. Agaram2021-11-111-1/+1
|
* reorgKartik K. Agaram2021-11-111-0/+44
|
* edit a single hard-coded definition in the imageKartik K. Agaram2021-11-101-6/+19
| | | | | | | | | | | | | src/teliva counter.tlv C-e # switch to editor C-e # save and quit C-x # exit counter.tlv now has the same logical contents, though the whitespace has changed, and the order of keys is different. The implementation is utterly ghastly. For one, I'm unnecessarily interfacing with kilo through the file system.
* .Kartik K. Agaram2021-11-101-23/+23
|
* new .tlv image formatKartik K. Agaram2021-11-101-0/+72
| | | | | | | | | | | | | | Plan is for this to be the default representation for Teliva programs. Text-friendly but not meant to be edited directly as text. Will eventually include both code and data definitions, both current snapshot and past revision history. Right now .tlv files seem to run. Error checking is non-existent, because I don't understand Lua's idioms around 'status' yet. Opening the editor expectedly segfaults. This commit is the most mind-bending bit of code I've written in a long time.
* life: move starting pattern around on the screenKartik K. Agaram2021-11-101-0/+1
| | | | | | This assumes we're doing it early soon after opening a new pattern, when it hasn't yet reached the margins. Quick and dirty, but seems good enough.
* better support light backgroundsKartik K. Agaram2021-11-071-0/+1
| | | | Thanks nicolas decoster for reporting this issue.
* game of lifeKartik K. Agaram2021-11-061-0/+2
| | | | | This required me to figure out some unicode-related nuances, but no new primitives.
* escape hatch to quit with a pending errorKartik K. Agaram2021-11-061-3/+4
|
* reorg editor transitionsKartik K. Agaram2021-11-061-3/+10
|
* start showing error messages in editorKartik K. Agaram2021-11-061-4/+17
| | | | | | | | | | | Before we'd end up in cryptic situations where error messages would get hidden when the program got out of ncurses mode. Now it's a little nicer with error messages showing up at the bottom of the editor. But there's still a problem: there's no way to abort without fixing an error.
* simple interface for adding to app menuKartik K. Agaram2021-11-061-2/+3
| | | | | | We're not going to enforce that the menu items actually do what they advertise. It's just a way to draw on the bottom line of screen, something apps aren't otherwise allowed to do.
* utterly ghastly way to rerun script after editKartik K. Agaram2021-11-051-1/+3
|
* stitch editor inKartik K. Agaram2021-11-051-3/+3
|
* drop test array data structureKartik K. Agaram2021-11-051-82/+0
|