about summary refs log tree commit diff stats
path: root/src/lua.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* .Kartik K. Agaram2021-11-051-8/+0
|
* colors: init_pair/color_pairKartik K. Agaram2021-11-051-0/+1
|
* make some space for the global menuKartik K. Agaram2021-11-051-1/+4
| | | | We'll eventually need some interface to add entries to it.
* metatables seem to be a separate namespace from globalsKartik K. Agaram2021-11-051-3/+3
|
* starting on curses libraryKartik K. Agaram2021-11-051-1/+0
| | | | | | | | | | | | | | | First piece of working new vocabulary: print(curses:cols()) Just pulling in code from lcurses for the most part. But I'm trying to understand its internals as I gradually add them in, after my more blunt first approach of packaging up lcurses/ext failed. Overall plan for Teliva's API: - start out with a 'curses' library that does what people who are used to ncurses/lcurses expect. - over time create a more opinionated library called 'screen' or 'window' or something.
* https://www.lua.org/pil/28.3.htmlKartik K. Agaram2021-11-051-2/+13
| | | | | | | | a = array.new(1000) for i=1,1000 do a:set(i, 1/i) end print(a:get(10)) -- 0.1
* https://www.lua.org/pil/28.2.htmlKartik K. Agaram2021-11-051-7/+16
|
* confirmed that this is the sameKartik K. Agaram2021-11-051-2/+2
| | | | And it seems simpler to me.
* going through chapter 28 of https://www.lua.org/pilKartik K. Agaram2021-11-051-3/+71
| | | | | | | | | User-defined C data. I think I have some understanding of the Lua stack now. It's a different kind of verbose, error-prone syntax than Mu that requires me to play computer in my head. But I don't fully grok metatables yet. At least not well enough to grok everything that's going on in lcurses/ext.
* I don't yet understand the stackKartik K. Agaram2021-10-241-0/+3
|
* trying to make sense of how bindings are createdKartik K. Agaram2021-10-241-1/+1
| | | | | | lua_State contains these StkId fields (stack, stack_last, base, top) that expand to a pointer of a struct containing a Lua value and an int. Unclear how it's used, or how you build a stack out of it.
* drop support for '-' filenameKartik K. Agaram2021-10-221-10/+3
| | | | lua.c now no longer refers to stdin/stdout/stderr.
* ncurses I/O in lua.cKartik K. Agaram2021-10-221-10/+15
| | | | | | | | | | | | Currently working: > print(1) 1 > print(2) 2 Print's newline doesn't return to column 0 yet. Ctrl-d no longer works. Ctrl-c exits cleanly.
* kill lua_readline abstractionKartik K. Agaram2021-10-221-1/+3
|
* purge notion of commandline historyKartik K. Agaram2021-10-221-2/+0
|
* new fork of Lua 5.1Kartik K. Agaram2021-10-221-0/+392
https://www.lua.org