Commit Graph

791 Commits

Author SHA1 Message Date
Kartik K. Agaram ae5309bcbe syntax highlighting on GitHub 2021-11-06 22:03:12 -07:00
Kartik K. Agaram a8668eaf9f game of life
This required me to figure out some unicode-related nuances, but no new
primitives.
2021-11-06 21:49:23 -07:00
Kartik K. Agaram 8d1e5f6475 . 2021-11-06 19:21:10 -07:00
Kartik K. Agaram 5619f0117a window:nodelay() for non-blocking input 2021-11-06 19:21:01 -07:00
Kartik K. Agaram 8d5d27af0c . 2021-11-06 17:36:40 -07:00
Kartik K. Agaram 7df7fe446c . 2021-11-06 17:31:49 -07:00
Kartik K. Agaram 19472f7e65 . 2021-11-06 14:44:07 -07:00
Kartik K. Agaram 62ecf17870 escape hatch to quit with a pending error 2021-11-06 14:41:11 -07:00
Kartik K. Agaram 369eaeeaf1 . 2021-11-06 14:16:44 -07:00
Kartik K. Agaram fb022f5880 . 2021-11-06 14:13:39 -07:00
Kartik K. Agaram cba53ec9f6 reorg editor transitions 2021-11-06 13:22:05 -07:00
Kartik K. Agaram 3305ac0b90 start showing error messages in editor
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.
2021-11-06 13:10:22 -07:00
Kartik K. Agaram 396684ebf1 new example: counter app 2021-11-06 12:55:26 -07:00
Kartik K. Agaram ee85ad384f simple interface for adding to app menu
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.
2021-11-06 12:44:47 -07:00
Kartik K. Agaram 2964a5e74a refactor menu drawing 2021-11-06 12:41:14 -07:00
Kartik K. Agaram 9b99cd2a56 . 2021-11-06 12:15:41 -07:00
Kartik K. Agaram 2b580e4174 adjust app style a tad denser 2021-11-06 10:57:40 -07:00
Kartik K. Agaram 3e1c9986d7 . 2021-11-06 10:55:10 -07:00
Kartik K. Agaram 88c1b7181d update screenshots 2021-11-06 10:52:35 -07:00
Kartik K. Agaram 307c1df502 tweak the example app 2021-11-06 10:43:35 -07:00
Kartik K. Agaram 3e94073a88 auto-save
We'll add version control soon.
2021-11-06 10:37:49 -07:00
Kartik K. Agaram 38d202d68d replace initial help message with a menu 2021-11-06 10:35:50 -07:00
Kartik K. Agaram 0de8ee3911 no, more consistent to toggle run/edit with ctrl-e 2021-11-06 10:18:22 -07:00
Kartik K. Agaram 29bb6403eb exit editor with ctrl-x for consistency 2021-11-06 10:13:43 -07:00
Kartik K. Agaram e0c0dea5b7 . 2021-11-06 10:12:50 -07:00
Kartik K. Agaram 567ee60c5a . 2021-11-06 10:12:50 -07:00
Kartik K. Agaram 491f9a378f clean up when leaving editor
kilo.c is still calling exit() in several places that we'll need to
gradually clean up.
2021-11-06 08:06:31 -07:00
Kartik K. Agaram 9795cd502d . 2021-11-06 07:28:35 -07:00
Kartik K. Agaram 4d33242953 one more faq 2021-11-06 00:14:52 -07:00
Kartik K. Agaram 9275c954c8 readme and docs 2021-11-05 23:52:58 -07:00
Kartik K. Agaram 52d73ff930 clean up first paint of editor 2021-11-05 22:40:12 -07:00
Kartik K. Agaram 6fc0e72cb3 utterly ghastly way to rerun script after edit 2021-11-05 22:39:36 -07:00
Kartik K. Agaram 6b8da095b1 stitch editor in 2021-11-05 22:12:24 -07:00
Kartik K. Agaram dd434b2e1c drop test array data structure 2021-11-05 22:09:15 -07:00
Kartik K. Agaram 4ad3390ce3 . 2021-11-05 22:07:46 -07:00
Kartik K. Agaram 95841b8a43 select an editor to bundle: kilo
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.
2021-11-05 21:41:39 -07:00
Kartik K. Agaram a2aa431c1e slightly improve hanoi rendering 2021-11-05 19:53:16 -07:00
Kartik K. Agaram 5da9f27079 menu entry: cleanly exit 2021-11-05 19:50:12 -07:00
Kartik K. Agaram ee3f6e8a22 colors: init_pair/color_pair 2021-11-05 19:43:40 -07:00
Kartik K. Agaram 6c9e26e07c . 2021-11-05 19:26:05 -07:00
Kartik K. Agaram 643deca2e2 slightly clearer rendering in the example app 2021-11-05 18:44:16 -07:00
Kartik K. Agaram cab996b194 make some space for the global menu
We'll eventually need some interface to add entries to it.
2021-11-05 18:43:37 -07:00
Kartik K. Agaram 78898d2716 move getch out of window scope
The window only matters for output, which seems like a stupid interface.
2021-11-05 17:54:45 -07:00
Kartik K. Agaram 18f06a5169 rename 'screen' to 'window'
We're going to set aside a portion of the screen soon that apps can't
touch.
2021-11-05 17:48:09 -07:00
Kartik K. Agaram 1757de9df6 . 2021-11-05 17:06:49 -07:00
Kartik K. Agaram c0307fae88 resist the temptation to add to the Lua API
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.
2021-11-05 16:41:31 -07:00
Kartik K. Agaram 216e56effc hanoi.lua now working
There's something strange in the combination of Lua 5.1 and lcurses:
window.getch() returns a char but curses.getch() returns an int.
2021-11-05 16:25:45 -07:00
Kartik K. Agaram d04ecfeaf3 hanoi.lua _almost_ working 2021-11-05 13:34:38 -07:00
Kartik K. Agaram 936f8f916b vimrc 2021-11-05 13:23:58 -07:00
Kartik K. Agaram 44258f7657 window:getch()
But how do we get curses.getch() to work?
I don't see it implemented in lcurses.
2021-11-05 13:23:14 -07:00