| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Emitting the metadata for literal strings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'm switching to a more exposed working dynamic after chatting with Charles
Saternos (https://github.com/akkartik/mu/pull/19). From now on I'll start
a new branch for big features. Branches won't always pass all their tests.
Phases have gone weeks in the past before being committed all at once.
Developing in a branch gives others the opportunity to see more current
progress and jump in more easily.
Some 'kata' branches for new contributors to start at:
* add two numbers: https://github.com/akkartik/mu/pull/21
* write a string to a byte stram: https://github.com/akkartik/mu/pull/22
* print a number in decimal to a byte stream: https://github.com/akkartik/mu/pull/20
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Pull in a _different_ function than `next-word` (commit 5092) into a shared
file between phases. Let's see how this goes.
|
|
|
|
| |
Don't forget metadata for string literals.
|
| |
|
|
|
|
|
|
| |
Current plan:
$ cat files.subx ... |dquotes |assort |pack |survey |hex > a.out
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Realization: 'next-word' can't be reused in converting string literals,
because it has to understand string literals.
Let's just keep each phase self-contained.
|
|
|
|
|
|
|
| |
Start using the new newline escape in string literals everywhere.
I could use it more aggressively, but it makes tests harder to read. So
only one line of text per string for now.
|
|
|
|
|
|
|
|
| |
Fix CI.
For some reason allocating 4KB natively on Linux triggers a segfault. Temporarily
reducing segment size to 256 bytes; that's large enough for the test. But
it's not a long-term solution. Maybe I need to grow the heap with sbrk()?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current plan for SubX translator:
$ cat files.subx ... |assort |pack |survey |hex > a.out
Higher-level notations will be inserted at the start of the pipeline. The
first (and needed for bootstrapping) is for string literals.
$ cat files.subx ... |string-literals |assort |pack |survey |hex > a.out
Alternatively, we should check how often we use string literals and just
convert them by hand.
They're used all over in tests, and converting them would make tests hard
(even harder) to read.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fail early when writing to a fake file runs out of space. Makes debugging
tests easier.
Reads from files, on the other hand, are only buffering to a temporary
stream, so it makes sense to silently stop when they run out of space.
In the process I uncovered a testing bug in pack.subx: I was missing a
trailing space in the expected result, but the test still passed because
the space was getting truncated. Being principled about aborting on overflow
by default will help avoid such issues.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
write-stream-buffered isn't a clean abstraction. Ignoring the 'read' index
of a stream is a hack. It's just saving us the trouble of a rewind-stream.
So make it a helper of pack.subx rather than part of the standard library.
|
| |
|
|
|
|
| |
Done with pack.subx?!
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|