Commit Graph

1359 Commits

Author SHA1 Message Date
Kartik K. Agaram 2d5095a08b bring apps/hest-life.mu up to date 2023-09-22 11:32:02 -07:00
Kartik K. Agaram 7ab55b3494 fix a regression from 3 commits and 12 days ago :/
Thanks Antonio D'Souza for reporting issue #51, which this fixes.
2021-12-24 13:12:59 -08:00
Kartik K. Agaram 5bbc33d823 . 2021-12-12 15:04:30 -08:00
Kartik K. Agaram 3cc80610c8 playing with Paul Batchelor's Trikufic tileset
https://pbat.ch/wiki/trikuf
https://merveilles.town/@akkartik/107432999019092669
2021-12-12 13:08:26 -08:00
Kartik K. Agaram d253a31828 rename grapheme to code-point-utf8
Longer name, but it doesn't lie. We have no data structure right now for
combining multiple code points. And it makes no sense for the notion of
a grapheme to conflate its Unicode encoding.
2021-11-09 08:12:11 -08:00
Kartik K. Agaram 909a0e2530 . 2021-10-17 21:57:41 -07:00
Kartik K. Agaram db0363462f primitive: read line from keyboard
Blocking.
2021-10-13 23:14:20 -07:00
Kartik K. Agaram 35c8c8edba support arrow keys in apps/ex7.mu 2021-09-04 14:00:38 -07:00
Kartik K. Agaram cfdee0a6fa fix apps/ex7.mu
I'm increasingly missing CI.
2021-09-04 13:57:20 -07:00
Kartik K. Agaram 9bb19e03c6 a tamil example (that I can't read) 2021-09-03 10:55:34 -07:00
Kartik K. Agaram 60a50c9245 support combining characters in streams of text
Fake screens can't handle them yet.
2021-09-02 15:38:45 -07:00
Kartik K. Agaram 6c3e541be1 . 2021-09-02 13:07:59 -07:00
Kartik K. Agaram a4bac41133 .
A more common hindi vowel.
2021-09-02 13:06:27 -07:00
Kartik K. Agaram cd9f0bb076 a few more examples of combining characters 2021-09-01 14:19:21 -07:00
Kartik K. Agaram d2f96cb0b6 rendering code-points with combining characters
There's a new example app showing this ability.

Still to go: support for combining characters when rendering text and
streams.
2021-09-01 12:46:25 -07:00
Kartik K. Agaram a479f0d083 .
Open question fixed.
2021-08-30 00:41:11 -07:00
Kartik K. Agaram c970190021 first rendering of non-latin script
Open question: why does column 0 get cropped? The spacing also seems
excessive. Are we taking up 3 grid points?
2021-08-30 00:34:40 -07:00
Kartik K. Agaram 6e05a8fa27 fix bad terminology: grapheme -> code point
Unix text-mode terminals transparently support utf-8 these days, and so
I treat utf-8 sequences (which I call graphemes in Mu) as fundamental.

I then blindly carried over this state of affairs to bare-metal Mu,
where it makes no sense. If you don't have a terminal handling
font-rendering for you, fonts are most often indexed by code points and
not utf-8 sequences.
2021-08-29 22:20:09 -07:00
Kartik K. Agaram 354c72a637 . 2021-08-29 20:33:54 -07:00
Kartik K. Agaram 34c7221b84 render wide glyphs in the font 2021-08-29 01:04:26 -07:00
Kartik K. Agaram 8e182e394e width-aware drawing primitives
No support yet for drawing wide graphemes.
2021-08-29 00:01:08 -07:00
Kartik K. Agaram bc859a7ca4 . 2021-08-28 22:57:22 -07:00
Kartik K. Agaram c9382ee2c9 . 2021-07-29 07:55:45 -07:00
Kartik K. Agaram 9f52758dfe . 2021-07-28 22:57:20 -07:00
Kartik K. Agaram 6199445243 . 2021-07-26 21:13:19 -07:00
Kartik K. Agaram a0432bf589 . 2021-07-26 20:33:31 -07:00
Kartik K. Agaram bade3ae86c . 2021-07-26 17:37:44 -07:00
Kartik K. Agaram bfa0efb7d1 game of life in lisp
Super slow; each frame is cleared as a sort of progress indicator while
it computes the next frame.

In the process I realize I need to adjust every single trace in the
shell sources to be more fault-tolerant to a filled-up trace stream.
2021-07-26 17:19:04 -07:00
Kartik K. Agaram a4c28e1bfb . 2021-07-19 17:57:41 -07:00
Kartik K. Agaram cdc60a443c . 2021-07-16 09:08:09 -07:00
Kartik K. Agaram d771fb6bab more powerful load-sectors 2021-07-16 08:58:15 -07:00
Kartik K. Agaram 96c217ab1c . 2021-07-16 08:48:40 -07:00
Kartik K. Agaram 44d26b77c4 . 2021-07-16 08:28:56 -07:00
Kartik K. Agaram 71e4f38129 7842 - new directory organization
Baremetal is now the default build target and therefore has its sources
at the top-level. Baremetal programs build using the phase-2 Mu toolchain
that requires a Linux kernel. This phase-2 codebase which used to be at
the top-level is now under the linux/ directory. Finally, the phase-2 toolchain,
while self-hosting, has a way to bootstrap from a C implementation, which
is now stored in linux/bootstrap. The bootstrap C implementation uses some
literate programming tools that are now in linux/bootstrap/tools.

So the whole thing has gotten inverted. Each directory should build one
artifact and include the main sources (along with standard library). Tools
used for building it are relegated to sub-directories, even though those
tools are often useful in their own right, and have had lots of interesting
programs written using them.

A couple of things have gotten dropped in this process:
  - I had old ways to run on just a Linux kernel, or with a Soso kernel.
    No more.
  - I had some old tooling for running a single test at the cursor. I haven't
    used that lately. Maybe I'll bring it back one day.

The reorg isn't done yet. Still to do:
  - redo documentation everywhere. All the README files, all other markdown,
    particularly vocabulary.md.
  - clean up how-to-run comments at the start of programs everywhere
  - rethink what to do with the html/ directory. Do we even want to keep
    supporting it?

In spite of these shortcomings, all the scripts at the top-level, linux/
and linux/bootstrap are working. The names of the scripts also feel reasonable.
This is a good milestone to take stock at.
2021-03-03 22:21:03 -08:00
Kartik Agaram c6b928be29 7841 2021-03-03 11:04:07 -08:00
Kartik K. Agaram 446a6704cb 7757 2021-02-19 02:39:22 -08:00
Kartik K. Agaram 378ffca74c 7730 - baremetal/shell: boolean values
In the process I found a bug in the Mu compiler. Limitations of just asserting
the emitted code but not running it.
2021-02-12 23:49:00 -08:00
Kartik Agaram 94e43069c7 7700 2021-02-09 08:19:40 -08:00
Kartik Agaram f626421bc4 7692
It's bad enough that metadata comments are restricted to integer literals;
let's at least make them work on _all_ integer literals.
2021-02-07 10:52:04 -08:00
Kartik Agaram 74f1512ff1 7690
Convert comments about magic constants into metadata.
2021-02-07 00:20:29 -08:00
Kartik Agaram 6c4c25555c 7689 - permit metadata on Mu literal integers
Metadata is always ignored. It's purely for documentation purposes. But
as long as Mu has no named constants it's starting to feel increasingly
essential.

I'm still not going to bother to add metadata to other parts of the language.
Let's see if we need them. Even though it's a little warty that the rules
vary throughout the stack:

  - bare SubX: metadata everywhere
  - SubX with syntax sugar: no metadata in calls or addressing-mode sigil-expressions
  - Mu: metadata only for literal integers
2021-02-06 22:24:24 -08:00
Kartik Agaram 3844651e49 7559 - reorganize sectors built in raw hex
This was tedious for three reasons beyond the usual one of having to
track and update offsets several time while I debug:
  - The Bochs troubles of the previous commit kept polluting my brain
    even though they were irrelevant.
  - I had to keep some changes locally to allow myself to use Bochs,
    which polluted my working directory.
  - I had to travel the long way to the realization that I'm not
    actually initializing the stack anywhere. BIOS was starting my stack
    off at 0x10000, which was promptly clobbered by my second read from
    disk.

The good news: while I'm here I grow the interrupt descriptor table. So
I don't have to go through this exercise when I get back to supporting
the mouse.
2021-01-24 20:16:27 -08:00
Kartik Agaram b628655722 7526 2021-01-16 09:29:21 -08:00
Kartik Agaram 7f8770ae08 7490 - baremetal: draw a grapheme to screen 2021-01-09 18:28:14 -08:00
Kartik Agaram dbd7082a0e 7489 - include GNU Unifont
https://en.wikipedia.org/wiki/GNU_Unifont#The_.hex_font_format
http://unifoundry.com/unifont/index.html

Since GNU Unifont is covered under the GPL v2, so I believe is this repo.
2021-01-09 18:20:28 -08:00
Kartik Agaram c5dfa89bb3 7462 - SubX version of baremetal/ex2.subx 2020-12-29 19:14:26 -08:00
Kartik Agaram c1b1d1f4e6 7460 - baremetal backend for SubX 2020-12-29 17:46:04 -08:00
Kartik Agaram 3618118c8d 7459
Bring baremetal variant up to date with recent changes.
2020-12-29 10:34:20 -08:00
Kartik Agaram c88af82232 7458
Switch survey_elf to the new approach.
2020-12-29 10:28:15 -08:00
Kartik Agaram 8836afbcbd 7457 2020-12-28 23:30:13 -08:00