Commit Graph

18 Commits

Author SHA1 Message Date
Kartik Agaram 4a943d4ed3 5001 - drop the :(scenario) DSL
I've been saying for a while[1][2][3] that adding extra abstractions makes
things harder for newcomers, and adding new notations doubly so. And then
I notice this DSL in my own backyard. Makes me feel like a hypocrite.

[1] https://news.ycombinator.com/item?id=13565743#13570092
[2] https://lobste.rs/s/to8wpr/configuration_files_are_canary_warning
[3] https://lobste.rs/s/mdmcdi/little_languages_by_jon_bentley_1986#c_3miuf2

The implementation of the DSL was also highly hacky:

a) It was happening in the tangle/ tool, but was utterly unrelated to tangling
layers.

b) There were several persnickety constraints on the different kinds of
lines and the specific order they were expected in. I kept finding bugs
where the translator would silently do the wrong thing. Or the error messages
sucked, and readers may be stuck looking at the generated code to figure
out what happened. Fixing error messages would require a lot more code,
which is one of my arguments against DSLs in the first place: they may
be easy to implement, but they're hard to design to go with the grain of
the underlying platform. They require lots of iteration. Is that effort
worth prioritizing in this project?

On the other hand, the DSL did make at least some readers' life easier,
the ones who weren't immediately put off by having to learn a strange syntax.
There were fewer quotes to parse, fewer backslash escapes.

Anyway, since there are also people who dislike having to put up with strange
syntaxes, we'll call that consideration a wash and tear this DSL out.

---

This commit was sheer drudgery. Hopefully it won't need to be redone with
a new DSL because I grow sick of backslashes.
2019-03-12 19:14:12 -07:00
Kartik Agaram c442a5ad80 4987 - support `browse_trace` tool in SubX
I've extracted it into a separate binary, independent of my Mu prototype.

I also cleaned up my tracing layer to be a little nicer. Major improvements:

- Realized that incremental tracing really ought to be the default.
  And to minimize printing traces to screen.

- Finally figured out how to combine layers and call stack frames in a
  single dimension of depth. The answer: optimize for the experience of
  `browse_trace`. Instructions occupy a range of depths based on their call
  stack frame, and minor details of an instruction lie one level deeper
  in each case.

Other than that, I spent some time adjusting levels everywhere to make
`browse_trace` useful.
2019-02-25 01:50:53 -08:00
Kartik Agaram 23d3a02226 4266 - space for alloc-id in heap allocations
This has taken me almost 6 weeks :(
2018-06-24 09:18:20 -07:00
Kartik Agaram ce9b2b0515 4258 - undo 4257 2018-06-15 22:16:09 -07:00
Kartik Agaram 0edd9b9fc6 4257 - abortive attempt at safe fat pointers
I've been working on this slowly over several weeks, but it's too hard
to support 0 as the null value for addresses. I constantly have to add
exceptions for scalar value corresponding to an address type (now
occupying 2 locations). The final straw is the test for 'reload':

  x:num <- reload text

'reload' returns an address. But there's no way to know that for
arbitrary instructions.

New plan: let's put this off for a bit and first create support for
literals. Then use 'null' instead of '0' for addresses everywhere. Then
it'll be easy to just change what 'null' means.
2018-06-15 22:12:03 -07:00
Kartik K. Agaram bd5d3936ec 3903 - minimal render when pressing 'tab'
Turns out all I had to do was reset `go-render?` to false.
2017-06-09 15:54:26 -07:00
Kartik K. Agaram 3c4c9c0807 3744
Undo 3743. Really any time we create new instructions from whole cloth
during rewriting or transform, the whole notion of 'original name' goes
out the window. Pointless trying to fight that fact of life.
2017-02-07 00:07:16 -08:00
Kartik K. Agaram d9e39b3b1c 3743
One way to ensure we always set old_name is to create a method to
initialize names as opposed to just assigning them.

Still not ideal because we still assign directly most of the time, so
it's easy to forget.
2017-02-07 00:05:38 -08:00
Kartik K. Agaram ff92e434b8 3691
Expand 'assert' to handle non-literal texts.
2016-11-25 22:14:04 -08:00
Kartik K. Agaram d8509b4175 3555 2016-10-22 16:10:23 -07:00
Kartik K. Agaram e939023612 3553
Tag all transforms as idempotent or not.
I'd fallen off this wagon.
I might even be getting it wrong. Something a type system should
automatically verify.
2016-10-22 12:16:02 -07:00
Kartik K. Agaram 6c96a437ce 3522 2016-10-19 22:10:35 -07:00
Kartik K. Agaram 7a84094adb 3385 2016-09-17 10:28:25 -07:00
Kartik K. Agaram d559f68b2f 3377 2016-09-17 00:12:08 -07:00
Kartik K. Agaram 78c5020531 3374 2016-09-16 23:57:55 -07:00
Kartik K. Agaram 639922e869 3178 2016-08-13 21:18:53 -07:00
Kartik K. Agaram 387f9c93ed 3113
$dump-trace had stopped working with an explicit layer. Thanks Jack and
Ella Couch.
2016-07-20 09:27:31 -07:00
Kartik K. Agaram 5e15a74f06 3055 2016-06-13 16:25:45 -07:00