about summary refs log tree commit diff stats
path: root/shell
Commit message (Collapse)AuthorAgeFilesLines
* .Kartik K. Agaram2021-07-081-4/+4
|
* primitives for double-bufferingKartik K. Agaram2021-07-051-4/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I thought I needed these for this bouncing-ball demo: def (bounce screen) with (w (width screen) h (height screen) cx 16 cy 16 dx 12 dy 19) while 1 clear screen ring screen cx cy 16 3 5 cx += dx cy += dy when (or (cx > w) (cx < 0)) set dx 0-dx when (or (cy > h) (cy < 0)) set dy 0-dy for _ 0 (< _ 100) ++_ # delay No matter how I adjusted the delay I couldn't get rid of the jitter. So I built a double-buffered version: (bounce2 . [def (bounce2 screen) with (w (width screen) h (height screen) cx 16 cy 16 dx 12 dy 19 screen2 (new_screen (columns screen) (lines screen))) while 1 clear screen2 ring screen2 cx cy 16 3 5 cx += dx cy += dy when (or (cx > w) (cx < 0)) set dx 0-dx when (or (cy > h) (cy < 0)) set dy 0-dy blit screen2 screen for _ 0 (< _ 100) ++_]) # delay But it didn't make a difference! Turns out nothing will help you when successive frames are too far apart. This is the correct tweak to `bounce`: - dx 12 - dy 19) + dx 1 + dy (/ 19 12)) Still, we'll keep double-buffering around for the future.
* shell: fix clear on screensKartik K. Agaram2021-07-051-1/+1
| | | | | | | Broken since commit c95648c96 on Jul 3. Unclear what test to write for this. Should clear-stream check for NULL? Should apply-clear?
* expose Mu implementation of 'bezier'Kartik K. Agaram2021-07-051-1/+256
| | | | Still no support for acute-angled control points.
* replace 'circle' with Mu implementationKartik K. Agaram2021-07-052-19/+161
|
* replace 'vline' with Mu implementationKartik K. Agaram2021-07-052-6/+162
|
* replace 'hline' with Mu implementationKartik K. Agaram2021-07-052-9/+165
|
* replace 'line' with Mu implementationKartik K. Agaram2021-07-052-32/+196
|
* .Kartik K. Agaram2021-07-051-1/+1
|
* .Kartik K. Agaram2021-07-051-140/+140
|
* reading from streamsKartik K. Agaram2021-07-034-22/+152
| | | | | | The Mu shell has no string literals, only streams. No random access, only sequential access. But I've been playing fast and loose with its read pointer until now. Hopefully things are cleaned up now.
* alistsKartik K. Agaram2021-07-031-0/+13
|
* new primitive: cons?Kartik K. Agaram2021-07-031-1/+42
|
* .Kartik K. Agaram2021-07-031-5/+10
|
* .Kartik K. Agaram2021-07-031-4/+4
|
* reorg primitives on screenKartik K. Agaram2021-07-022-43/+80
|
* clean up final abort in macroexpandKartik K. Agaram2021-06-302-1/+14
|
* delete a known issueKartik Agaram2021-06-301-3/+0
| | | | I can't reproduce the issue with the keyboard handler anymore :/
* .Kartik K. Agaram2021-06-271-5/+11
|
* simplify Qemu instructionsKartik K. Agaram2021-06-271-12/+10
| | | | | Turns out we don't need a special case for KVM. https://qemu.readthedocs.io/en/latest/system/invocation.html
* .Kartik Agaram2021-06-241-3/+3
|
* .Kartik Agaram2021-06-241-1/+1
|
* .Kartik Agaram2021-06-241-1/+1
|
* .Kartik Agaram2021-06-231-1/+1
|
* .Kartik Agaram2021-06-231-8/+0
|
* .Kartik Agaram2021-06-231-1/+1
|
* .Kartik Agaram2021-06-231-2/+2
|
* .Kartik Agaram2021-06-231-4/+4
|
* .Kartik Agaram2021-06-231-1/+1
|
* one more bug, and documentation for infixKartik K. Agaram2021-06-234-27/+80
| | | | One error message gets a bit worse.
* .Kartik K. Agaram2021-06-231-3/+3
|
* .Kartik K. Agaram2021-06-231-8/+8
|
* one more bugKartik K. Agaram2021-06-232-9/+22
|
* start using infix in data diskKartik K. Agaram2021-06-231-57/+54
| | | | Still some gaps to track down.
* all tests passing again; infix seems doneKartik K. Agaram2021-06-222-1/+7
|
* infix tests passing but something's still brokenKartik K. Agaram2021-06-221-2/+48
|
* 2 failing tests remainingKartik K. Agaram2021-06-221-2/+44
| | | | We just need to support unary operators.
* almost there; this is encouragingKartik K. Agaram2021-06-221-16/+21
| | | | The at-head-of-list? is a really ugly hack, though.
* beginnings of tokenization within symbolsKartik K. Agaram2021-06-222-17/+68
| | | | We're now down to 4 failing tests. But these will require surgery.
* .Kartik K. Agaram2021-06-221-11/+3
|
* clean up lexical categoriesKartik K. Agaram2021-06-222-142/+48
|
* snapshotKartik K. Agaram2021-06-221-3/+32
| | | | | Still a couple of failing tests before I switch gears to breaking down symbols containing infix.
* .Kartik K. Agaram2021-06-221-3/+5
|
* snapshot: infixKartik K. Agaram2021-06-225-9/+542
| | | | | | | | | | | | | | | | | | | | | Like parenthesize, I'm copying tests over from https://github.com/akkartik/wart Unlike parenthesize, though, I can't just transliterate the code itself. Wart was operating on an intermediate AST representation. Here I'm all the way down to cells. That seemed like a good idea when I embarked, but now I'm not so sure. Operating with the right AST data structure allowed me to more easily iterate over the elements of a list. The natural recursion for cells is not a good fit. This patch and the next couple is an interesting case study in what makes Unix so effective. Yes, you have to play computer, and yes it gets verbose and ugly. But just diff and patch go surprisingly far in helping build a picture of the state space in my brain. Then again, there's a steep gradient of skills here. There are people who can visualize state spaces using diff and patch far better than me, and people who can't do it as well as me. Nature, nurture, having different priorities, whatever the reason. Giving some people just the right crutch excludes others.
* .Kartik K. Agaram2021-06-213-67/+89
|
* start implementing infixKartik K. Agaram2021-06-211-281/+3
| | | | First step: undo operator support in tokenization.
* .Kartik K. Agaram2021-06-201-3/+3
|
* shell: now no definitions with long linesKartik K. Agaram2021-06-201-3/+7
|
* shell: shrink definition widths in a few placesKartik K. Agaram2021-06-201-12/+14
| | | | The only remaining long lines now are in 'pair' and 'with'.
* this is how we create aliasesKartik K. Agaram2021-06-201-1/+1
|