Kartik K. Agaram
fdd87c5eda
now. we. have. JSON.
...
Completely unmodified from upstream.
2021-11-21 14:22:20 -08:00
Kartik K. Agaram
548d59f918
luasocket now loading properly
...
I still haven't tried actually running it.
2021-11-20 23:34:29 -08:00
Kartik K. Agaram
fa6faaa700
extract a helper
2021-11-20 20:35:37 -08:00
Kartik K. Agaram
38b21ef79b
bugfix: support running from top-level
...
Unfortunately we can't currently run teliva from anywhere else :/
2021-11-20 19:59:32 -08:00
Kartik K. Agaram
b618bfc7cf
port changes from minimal to maximal version
...
From lcurseslib.c to lcurses/ directory.
2021-11-20 16:33:41 -08:00
Kartik K. Agaram
8a3e81b4b0
report errors when calling non-existent functions
2021-11-20 10:13:58 -08:00
Kartik K. Agaram
e693448b65
inline in C is not worth the trouble
...
https://merveilles.town/@akkartik/107310347838372198
2021-11-20 10:10:26 -08:00
Kartik K. Agaram
b43747ecef
inline lcurses maximally rather than minimally
...
Until now we had just the bare minimum bindings needed for the demos
built so far. Now we have all of lcurses building in place with minimal
changes.
The changes in this commit can run hanoi.lua when inlined into Lua 5.1,
but don't work with Teliva.
2021-11-19 19:11:03 -08:00
Kartik K. Agaram
f40bc31cc3
import life.teliva into image format
2021-11-14 11:10:18 -08:00
Kartik K. Agaram
58d2d596ea
cleaner error handling
2021-11-14 09:55:13 -08:00
Kartik K. Agaram
a3ca7877da
.
2021-11-14 09:48:41 -08:00
Kartik K. Agaram
7b91691b14
remain in editor on error
2021-11-14 09:48:41 -08:00
Kartik K. Agaram
b3b844c5f7
.
2021-11-14 09:48:41 -08:00
Kartik K. Agaram
2cc6912e85
find _some_ way to show error on initial load
2021-11-14 09:48:41 -08:00
Kartik K. Agaram
4ab3ccebb5
more menu cleanup
2021-11-14 09:48:40 -08:00
Kartik K. Agaram
af4fbe97bf
.
2021-11-14 09:48:40 -08:00
Kartik K. Agaram
33331a7c50
drop support for non-image Lua scripts
...
We still have no story for error messages. We'll work on that next.
2021-11-14 07:59:15 -08:00
Kartik K. Agaram
b50e393770
draw the browse dialog the same way
2021-11-14 07:53:20 -08:00
Kartik K. Agaram
b4e3936170
smarter image browsing
...
- distinguish between unused functions and data
- don't hardcode a specific convention for the curses window object
2021-11-14 07:11:30 -08:00
Kartik K. Agaram
5be743324c
slightly more robust on-disk format
...
Looks like Lua supports a little bit of programmability in its
multi-line string literals. Even though I can't find this documented
anywhere.
2021-11-14 00:52:25 -08:00
Kartik K. Agaram
b64a21771e
janky way to cancel browsing
2021-11-14 00:38:00 -08:00
Kartik K. Agaram
d9aac11889
slightly more obvious browse dialog
2021-11-14 00:27:59 -08:00
Kartik K. Agaram
902ce6009d
cleaner layout for a function's code and data
2021-11-13 23:14:52 -08:00
Kartik K. Agaram
0e74056cbb
.
2021-11-13 22:48:59 -08:00
Kartik K. Agaram
e990682fb2
.
2021-11-13 22:48:14 -08:00
Kartik K. Agaram
55302fd877
.
2021-11-13 22:45:44 -08:00
Kartik K. Agaram
a7139a6b14
clean up after the editor
...
Even though we don't need to leave ncurses mode, there's still a process
boundary to clean up before.
2021-11-13 21:33:12 -08:00
Kartik K. Agaram
da76ec44f1
.
2021-11-13 21:25:52 -08:00
Kartik K. Agaram
88f4b1bb2b
.
2021-11-13 21:23:14 -08:00
Kartik K. Agaram
a655059c8d
replace Kilo's raw terminal handling with ncurses
...
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.
2021-11-13 21:20:30 -08:00
Kartik K. Agaram
625a66e196
avoid side-effects on the Lua stack
2021-11-13 17:48:04 -08:00
Kartik K. Agaram
12b2a44cf6
stop leaking memory
2021-11-13 17:46:08 -08:00
Kartik K. Agaram
398112f756
memory corruption bug
...
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.
2021-11-13 17:42:39 -08:00
Kartik K. Agaram
51378afb2a
.
2021-11-13 16:53:39 -08:00
Kartik K. Agaram
c34db20756
very rudimentary definition browser
...
Never shows definitions that were never called. Including non-functions.
2021-11-13 16:36:12 -08:00
Kartik K. Agaram
7a24bed432
.
2021-11-13 16:28:13 -08:00
Kartik K. Agaram
998e666958
.
2021-11-13 16:13:05 -08:00
Kartik K. Agaram
5bf5e47077
.
2021-11-13 16:13:05 -08:00
Kartik K. Agaram
647a2520d6
shield kilo.c from teliva_editbuffer detail
2021-11-13 16:13:05 -08:00
Kartik K. Agaram
ee0e7c36f5
.
2021-11-13 15:11:03 -08:00
Kartik K. Agaram
cbd5e7d552
.
2021-11-13 15:07:14 -08:00
Kartik K. Agaram
33b705282d
.
2021-11-13 14:59:22 -08:00
Kartik K. Agaram
7623e7069a
clean up experiment from previous commit
2021-11-13 10:10:16 -08:00
Kartik K. Agaram
5a44605143
instrumenting function calls with their depth
2021-11-13 08:16:41 -08:00
Kartik K. Agaram
d72eae5978
create empty file when navigating to empty definition
2021-11-11 17:41:37 -08:00
Kartik K. Agaram
f6c7bf6fd0
ctrl-g to edit a different definition
2021-11-11 17:29:40 -08:00
Kartik K. Agaram
4d20e71c80
gracefully handle missing definition
2021-11-11 17:04:29 -08:00
Kartik K. Agaram
8398f8e2d1
.
2021-11-11 17:00:18 -08:00
Kartik K. Agaram
a76cd9067a
global for current definition being edited
2021-11-11 16:47:09 -08:00
Kartik K. Agaram
d303c6efb0
pass lua_State into editor
2021-11-11 16:42:02 -08:00