Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | update screenshots | Kartik K. Agaram | 2021-11-06 | 2 | -0/+0 |
| | |||||
* | tweak the example app | Kartik K. Agaram | 2021-11-06 | 2 | -16/+18 |
| | |||||
* | auto-save | Kartik K. Agaram | 2021-11-06 | 1 | -10/+2 |
| | | | | We'll add version control soon. | ||||
* | replace initial help message with a menu | Kartik K. Agaram | 2021-11-06 | 1 | -8/+5 |
| | |||||
* | no, more consistent to toggle run/edit with ctrl-e | Kartik K. Agaram | 2021-11-06 | 1 | -3/+4 |
| | |||||
* | exit editor with ctrl-x for consistency | Kartik K. Agaram | 2021-11-06 | 1 | -3/+4 |
| | |||||
* | . | Kartik K. Agaram | 2021-11-06 | 1 | -2/+2 |
| | |||||
* | . | Kartik K. Agaram | 2021-11-06 | 1 | -21/+21 |
| | |||||
* | clean up when leaving editor | Kartik K. Agaram | 2021-11-06 | 1 | -0/+1 |
| | | | | | kilo.c is still calling exit() in several places that we'll need to gradually clean up. | ||||
* | . | Kartik K. Agaram | 2021-11-06 | 1 | -1/+1 |
| | |||||
* | one more faq | Kartik K. Agaram | 2021-11-06 | 1 | -0/+17 |
| | |||||
* | readme and docs | Kartik K. Agaram | 2021-11-05 | 5 | -8/+106 |
| | |||||
* | clean up first paint of editor | Kartik K. Agaram | 2021-11-05 | 1 | -0/+1 |
| | |||||
* | utterly ghastly way to rerun script after edit | Kartik K. Agaram | 2021-11-05 | 3 | -5/+14 |
| | |||||
* | stitch editor in | Kartik K. Agaram | 2021-11-05 | 4 | -62/+28 |
| | |||||
* | drop test array data structure | Kartik K. Agaram | 2021-11-05 | 1 | -82/+0 |
| | |||||
* | . | Kartik K. Agaram | 2021-11-05 | 1 | -8/+0 |
| | |||||
* | select an editor to bundle: kilo | Kartik K. Agaram | 2021-11-05 | 1 | -0/+1308 |
| | | | | | | From https://github.com/antirez/kilo Source code description: https://viewsourcecode.org/snaptoken/kilo BSD 2-clause license seems identical to the MIT in the current codebase. | ||||
* | slightly improve hanoi rendering | Kartik K. Agaram | 2021-11-05 | 2 | -2/+2 |
| | |||||
* | menu entry: cleanly exit | Kartik K. Agaram | 2021-11-05 | 1 | -3/+21 |
| | |||||
* | colors: init_pair/color_pair | Kartik K. Agaram | 2021-11-05 | 4 | -8/+52 |
| | |||||
* | . | Kartik K. Agaram | 2021-11-05 | 1 | -17/+17 |
| | |||||
* | slightly clearer rendering in the example app | Kartik K. Agaram | 2021-11-05 | 2 | -6/+22 |
| | |||||
* | make some space for the global menu | Kartik K. Agaram | 2021-11-05 | 4 | -1/+21 |
| | | | | We'll eventually need some interface to add entries to it. | ||||
* | move getch out of window scope | Kartik K. Agaram | 2021-11-05 | 2 | -15/+12 |
| | | | | The window only matters for output, which seems like a stupid interface. | ||||
* | rename 'screen' to 'window' | Kartik K. Agaram | 2021-11-05 | 2 | -36/+36 |
| | | | | | We're going to set aside a portion of the screen soon that apps can't touch. | ||||
* | . | Kartik K. Agaram | 2021-11-05 | 1 | -0/+1 |
| | |||||
* | resist the temptation to add to the Lua API | Kartik K. Agaram | 2021-11-05 | 3 | -26/+25 |
| | | | | | Instead we'll include code in the Lua app itself, to minimize the differences between what runs on regular Lua and what runs on Teliva. | ||||
* | hanoi.lua now working | Kartik K. Agaram | 2021-11-05 | 1 | -2/+2 |
| | | | | | There's something strange in the combination of Lua 5.1 and lcurses: window.getch() returns a char but curses.getch() returns an int. | ||||
* | hanoi.lua _almost_ working | Kartik K. Agaram | 2021-11-05 | 2 | -10/+30 |
| | |||||
* | vimrc | Kartik K. Agaram | 2021-11-05 | 1 | -0/+3 |
| | |||||
* | window:getch() | Kartik K. Agaram | 2021-11-05 | 2 | -5/+17 |
| | | | | | But how do we get curses.getch() to work? I don't see it implemented in lcurses. | ||||
* | hanoi.lua now rendering | Kartik K. Agaram | 2021-11-05 | 1 | -4/+5 |
| | |||||
* | curses print constants | Kartik K. Agaram | 2021-11-05 | 1 | -0/+72 |
| | | | | | | | Very satisfying to debug the difference between lcurses putting the module table in an upvalue. Since I implicitly call initstr() rather than define it as a primitive, I don't need to bother with that. I am awesome. Lua is awesome for giving me that sense. | ||||
* | grouping | Kartik K. Agaram | 2021-11-05 | 1 | -0/+4 |
| | |||||
* | mvaddch/mvaddstr | Kartik K. Agaram | 2021-11-05 | 1 | -0/+33 |
| | | | | | I think we now have all the output functions/methods we need. Just some constants remaining. | ||||
* | attron/attroff | Kartik K. Agaram | 2021-11-05 | 1 | -0/+18 |
| | |||||
* | window:getmaxyx() | Kartik K. Agaram | 2021-11-05 | 2 | -2/+23 |
| | |||||
* | . | Kartik K. Agaram | 2021-11-05 | 1 | -0/+1 |
| | |||||
* | window:clear() | Kartik K. Agaram | 2021-11-05 | 1 | -0/+7 |
| | |||||
* | ok, what do we need next for hanoi.lua? | Kartik K. Agaram | 2021-11-05 | 2 | -2/+78 |
| | |||||
* | reindent | Kartik K. Agaram | 2021-11-05 | 1 | -7/+7 |
| | | | | | I'm trying to follow the style of lua sources even when they're not my preference. lcurses code is a bit different. | ||||
* | ohh, that word 'index' was key | Kartik K. Agaram | 2021-11-05 | 1 | -0/+4 |
| | |||||
* | oh, that's just a cosmetic thing | Kartik K. Agaram | 2021-11-05 | 1 | -0/+13 |
| | | | | | | | | So why isn't this working? a = curses:stdscr() a:addstr(abc) The error is "attempt to index global 'a' (a userdata value)" | ||||
* | copy metatable name from lcurses | Kartik K. Agaram | 2021-11-05 | 1 | -3/+3 |
| | | | | | Makes no difference to the results of: print(curses:stdscr()) | ||||
* | metatables seem to be a separate namespace from globals | Kartik K. Agaram | 2021-11-05 | 1 | -3/+3 |
| | |||||
* | snapshot | Kartik K. Agaram | 2021-11-05 | 1 | -2/+61 |
| | | | | | | | | | Not quite working. curses.stdscr() is returning userdata, not a window. This is true even of the raw array example from the book. So we need to learn something new here. How does lcurses's Pinitscr return a special window object? From what I can tell it's just putting the results of lc_newwin() on the stack. Which is the same as my curses_newwin() here. | ||||
* | stdscr binding | Kartik K. Agaram | 2021-11-05 | 1 | -0/+12 |
| | | | | | print(curses.stdscr()) print(curses:stdscr()) | ||||
* | starting on curses library | Kartik K. Agaram | 2021-11-05 | 5 | -3/+46 |
| | | | | | | | | | | | | | | | 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.html | Kartik K. Agaram | 2021-11-05 | 1 | -2/+13 |
| | | | | | | | | a = array.new(1000) for i=1,1000 do a:set(i, 1/i) end print(a:get(10)) -- 0.1 |