Commit Graph

23 Commits

Author SHA1 Message Date
Kartik Agaram dd66068298 4261 - start using literals for 'true' and 'false'
They uncovered one bug: in edit/003-shortcuts.mu
  <scroll-down> was returning 0 for an address in one place where I
  thought it was returning 0 for a boolean.

Now we've eliminated this bad interaction between tangling and punning
literals.
2018-06-17 00:29:22 -07:00
Kartik K. Agaram 4a48bedcd1 4134 - 'input' = 'ingredient' 2017-12-03 23:25:40 -08:00
Kartik K. Agaram dc0e767cf5 3844
Once I start optimizing most events to not repaint everything there's no
need to be smart about queued-up events.
2017-05-06 14:54:26 -07:00
Kartik K. Agaram 0606f4ace4 3574
Shorter branches above longer ones.
2016-10-23 21:15:43 -07:00
Kartik K. Agaram ccfee30398 3570 - don't busy-wait in 'wait-for-event' 2016-10-23 19:57:26 -07:00
Kartik K. Agaram d803b68769 3565
Cleaning up the console interfaces before we start changing the socket
interfaces to look like them. Reading from sockets need to be
non-blocking just like reading from the console.
2016-10-23 15:50:57 -07:00
Kartik K. Agaram a0331a9b0e 3390 2016-09-17 13:00:39 -07:00
Kartik K. Agaram 760f683f27 3389 2016-09-17 12:55:10 -07:00
Kartik K. Agaram 80df524b56 3388 2016-09-17 10:32:57 -07:00
Kartik K. Agaram 7a84094adb 3385 2016-09-17 10:28:25 -07:00
Kartik K. Agaram 08f4628e8b 3379
Can't use type abbreviations inside 'memory-should-contain'.
2016-09-17 00:31:55 -07:00
Kartik K. Agaram 5b1219ca19 2870 - fix the final long-standing failing test
The solution for avoiding deadlock is for routines to close channels
before they exit. So that's good.

Once I implemented 'close', I also found and fixed 2 unrelated bugs in
chessboard.mu:
  a) one long-missed and long-masked case of forgetting to store
  character literals in character variables
  b) one typo in translating get-address to put
So that's good.

What's not so good: in the process of fixing this I've found three
unrelated bugs (marked 'BUG:' in the changes). All three have
workarounds, so existing tests pass for now. But they are my top
priority next.
2016-04-27 00:10:20 -07:00
Kartik K. Agaram b0bf5321de 2864 - replace all address:shared with just address
Now that we no longer have non-shared addresses, we can just always
track refcounts for all addresses.

Phew!
2016-04-24 11:54:30 -07:00
Kartik K. Agaram 7bf9212fd4 2861 - 'maybe-convert' no longer returns address 2016-04-23 17:15:16 -07:00
Kartik K. Agaram 0d2686c751 2844 - purge get-address from all layers
Only apps left now, and the wait-for-location uses in the channel
primitives.
2016-04-16 15:50:56 -07:00
Kartik K. Agaram 3ac523393d 2798 - experiment: split channels into two ends
This way when you pass one end to a function or routine, you can
implicitly give it the right to either read or write the channel, but
not both.

The cost: code gets more convoluted, names get more convoluted. You can
see this in particular in the test for buffer-lines. Let's see how it
goes..
2016-03-19 15:57:10 -07:00
Kartik K. Agaram 637cc4139b 2784 - make channels generic
I've ignored Mu's concurrency primitives for a while, but they're
starting to return to front-and-center as I work on the file system
interfaces.
2016-03-14 18:24:33 -07:00
Kartik K. Agaram 1ead356219 2735 - define recipes using 'def'
I'm dropping all mention of 'recipe' terminology from the Readme. That
way I hope to avoid further bike-shedding discussions while I very
slowly decide on the right terminology with my students.

I could be smarter in my error messages and use 'recipe' when code uses
it and 'function' otherwise. But what about other words like ingredient?
It would all add complexity that I'm not yet sure is worthwhile. But I
do want separate experiences for veteran programmers reading about Mu on
github and for people learning programming using Mu.
2016-03-08 01:46:47 -08:00
Kartik K. Agaram 455fbac64f 2576 - distinguish allocated addresses from others
This is the one major refinement on the C programming model I'm planning
to introduce in mu. Instead of Rust's menagerie of pointer types and
static checking, I want to introduce just one new type, and use it to
perform ref-counting at runtime.

So far all we're doing is updating new's interface. The actual
ref-counting implementation is next.

One implication: I might sometimes need duplicate implementations for a
recipe with allocated vs vanilla addresses of the same type. So far it
seems I can get away with just always passing in allocated addresses;
the situations when you want to pass an unallocated address to a recipe
should be few and far between.
2016-01-19 23:18:03 -08:00
Kartik K. Agaram cc20549cfd 2612 2015-11-29 20:33:12 -08:00
Kartik K. Agaram 136412d263 2468 - overload print-character as just 'print' 2015-11-21 10:19:34 -08:00
Kartik K. Agaram 104854ca94 2460 - headers for remaining recipes 2015-11-18 22:03:43 -08:00
Kartik K. Agaram c603cd6cef 2430 - make room for more transforms 2015-11-13 10:08:57 -08:00