| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
No, we can stay with the previous prototype a little longer.
|
|
|
|
|
|
| |
Let's start committing new prototype directories *before* we start hacking
on them. Version control is useful right from the draft when programming
in a language without any error messages.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The rule: emit spills for a register unless the output is written somewhere
in the current block after the current instruction. Including in nested
blocks.
Let's see if this is right.
|
|
|
|
|
|
| |
Rather than have two ways to decide whether to emit push/pop instructions,
just record for each var on the 'vars' stack whether we emitted a push
for it, and reuse the decision to emit a pop.
|
|
|
|
| |
Stack bug.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
I don't have layers yet in Mu. But I can still create lots of versions
of a program.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This 'OO' approach seems more scalable, but I need to first wrestle with
a parsing issue: this text has a heading:
abc *def
# ghi*
Ugh, so I can't do this translation in a single pass.
Then again, maybe I should just keep going and not try to be compatible
with GitHub-Flavored Markdown. Require that new headings are also new paragraphs.
|
|
|
|
|
| |
The state machine is already out of control, and I already have bugs like
turning '*abc_' into bold text.
|
| |
|
|
|
|
| |
Support more than two states.
|
|
|
|
| |
Now the trailing asterisk or underscore renders correctly, for starters.
|
|
|
|
|
| |
The current organization doesn't really work for the next feature (section
headings) so let's inline attribute-handling.
|
|
|
|
|
|
|
| |
We're not going to render italics since they still feel like an advanced
feature for terminals, and different terminals have different escape sequences
for them, and since they often look weird to my eyes on the monospace font
of a terminal window. So underscores and italics will both be bold.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Just always flush Stdout when printing numbers.
|
|
|
|
|
| |
Minor reordering; the hacky flush-stdout is now only needed if we ever
call print-int32-to-screen.
|
|
|
|
|
| |
Make print-byte less error-prone to use. Now none of our screen primitives
are buffered.
|
|
|
|
| |
At the moment the number of pages is hard-coded to my screen width.
|
|
|
|
|
|
|
|
| |
This was why I was trying to use a different output register: a second
function to call.
And I managed to mess it up again, changing the output of load-file, but
not how it was computed in the body.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were three confounding issues to get past before this seemed to be
working right:
- row/col count from 1 rather than 0
- I was thinking in decimal rather than hex
- print-byte buffers to stdout, but print-string does not. I didn't think
this mattered, but it does matter to flush the current line before
moving cursor again.
Only one of these issues was a bug in the code. The first two were bugs
in my mental model that necessitated no changes to code to be corrected.
|
| |
|
| |
|
|
|
|
|
| |
Perhaps the lack of safety just forces us to make smaller functions, like
Forth.
|
|
|
|
|
| |
Baby steps. I managed to mess up even this tiny refactoring of print-file.mu.
Wish output registers were already checked in calls.
|
| |
|
| |
|
| |
|