Commit Graph

53 Commits

Author SHA1 Message Date
Kartik Agaram 458ee5e354 4910 2019-01-06 12:01:42 -08:00
Kartik Agaram b085378e94 4294 2018-06-30 21:58:55 -07:00
Kartik Agaram 57dfb5ef07 4293 2018-06-30 21:58:27 -07:00
Kartik Agaram 01ce563dfe 4262 - literal 'null' 2018-06-17 15:57:37 -07:00
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 816ffe20eb 4214 2018-02-21 20:49:04 -08:00
Kartik K. Agaram f0c55e6b97 4165 2017-12-27 20:39:51 -08:00
Kartik K. Agaram e82dc62668 4164 2017-12-27 20:19:46 -08:00
Kartik K. Agaram c81fde0c44 4163 2017-12-24 12:44:01 -08:00
Kartik K. Agaram 4a48bedcd1 4134 - 'input' = 'ingredient' 2017-12-03 23:25:40 -08:00
Kartik K. Agaram 7a4bf4cfab 3976 2017-08-20 22:03:31 -07:00
Kartik K. Agaram 2d4c3296d8 3969 2017-07-13 07:20:13 -07:00
Kartik K. Agaram 650a201d96 3702
Commands like '$exit' shouldn't look like labels.
2016-12-06 08:14:09 -08:00
Kartik K. Agaram f918675c8b 3569
Update syntax highlighting to not color numeric locations like literals.
2016-10-23 19:56:28 -07:00
Kartik K. Agaram af7349d50c 3568
Fix syntax highlighting for labels after commit 3552.
2016-10-23 19:18:50 -07:00
Kartik K. Agaram 9a81d7460f 3561 2016-10-22 16:56:07 -07:00
Kartik K. Agaram 3e1349d29f 3431
Improvements to syntax highlighting, particularly for Mu code in C++
files.
2016-09-30 10:45:14 -07:00
Kartik K. Agaram b1624806eb 3426 2016-09-27 14:50:50 -07:00
Kartik K. Agaram 10f49c6470 2838 2016-04-16 08:02:17 -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 83d8299d2d 2562
We want to use the type 'recipe' for recipe *variables*, because it
seems nicer to say `recipe number -> number` rather than recipe-ordinal,
etc. To support this we'll allow recipe names to be mentioned without
any type.

This might make a couple of places in this commit more brittle. I'm
dropping error messages, causing them to not happen in some situations.
Maybe I should just bite the bullet and require an explicit
:recipe-literal. We'll see.
2016-01-17 23:15:03 -08:00
Kartik K. Agaram de612c4930 2367 2015-11-05 00:32:55 -08:00
Kartik K. Agaram 70f70118f4 2306 - recipe headers
Once a student has gotten used to recipes and ingredients using the
staged 'next-ingredient' approach there's no reason to avoid
conventional function headers. As an added bonus we can now:

a) check that all 'reply' instructions in a recipe are consistent
b) deduce what to reply without needing to say so everytime
c) start thinking about type parameters for recipes (generic functions!)
2015-10-28 18:26:05 -07:00
Kartik K. Agaram 3b795875bc 2295 - drop first-class recipes and continuations
Making life too complex at this time.
2015-10-28 05:51:15 -07:00
Kartik K. Agaram 3eeea0a22d 2294
Bah, sick of CALL and continuations.
2015-10-28 05:40:27 -07:00
Kartik K. Agaram 538831ed8a 2266 - drop experiment with generics 2015-10-07 10:20:56 -07:00
Kartik K. Agaram ec5e0d13b6 2252
I can't easily use generic containers without needing some syntax for
generic recipes:

  push:number a:number, l:list:number

which would be implemented as:

  T <- next-type
  a:T <- next-ingredient

etc.

Another concern: how to represent map<string, list<number>>?

  map::address:array:character::list:number

where the '::' is just silently turned into ':'.

Agh, all this is so baroque. All this while I've been trying to avoid
getting into language design. All I want is some lightweight way to
avoid security holes and memory corruption. But now it seems like I need
facets to control compile-time activities and so on.
2015-10-05 21:21:48 -07:00
Kartik K. Agaram 3cf4cc43f2 2174 2015-09-06 16:32:41 -07:00
Kartik K. Agaram cbbcd47fa4 2153 2015-09-05 11:15:13 -07:00
Kartik K. Agaram b94f150a57 2139 2015-09-04 08:46:59 -07:00
Kartik K. Agaram 426009da93 2080 2015-08-26 19:59:24 -07:00
Kartik K. Agaram 2e534c0e3a 2059 2015-08-22 15:35:00 -07:00
Kartik K. Agaram 31a9d39e5d 1960 2015-08-09 11:33:08 -07:00
Kartik K. Agaram fbf0536d3d 1903 2015-07-30 20:56:44 -07:00
Kartik K. Agaram bc64369276 1868 - start using naked literals everywhere
First step to reducing typing burden. Next step: inferring types.
2015-07-28 14:33:22 -07:00
Kartik K. Agaram 77d5b5d658 1780 - now we always reclaim local scopes
But still no difference in either memory footprint or in running time.
This will teach me -- for the umpteenth time -- to optimize before
measuring.
2015-07-13 22:50:49 -07:00
Kartik K. Agaram d855af1fba 1774 2015-07-13 20:44:31 -07:00
Kartik K. Agaram fc2046a176 1771 2015-07-13 19:10:59 -07:00
Kartik K. Agaram 8ebe8ef6a6 1646 2015-06-25 00:06:42 -07:00
Kartik K. Agaram 1ae4e0d95f 1555 - mu.vim: distinguish control-flow from constants
We also do this in regular C++ now.
2015-06-12 22:32:28 -07:00
Kartik K. Agaram d955ddd62e 1506 2015-05-28 15:09:35 -07:00
Kartik K. Agaram 04afb4b039 1432 - contrast scenarios and recipes 2015-05-23 11:18:22 -07:00
Kartik K. Agaram 0a6d127d37 1410 2015-05-20 00:23:01 -07:00
Kartik K. Agaram 7c9570f0cd 1378 2015-05-15 16:18:30 -07:00
Kartik K. Agaram a6d9bd9b5b 1333 2015-05-10 12:50:28 -07:00
Kartik K. Agaram e3894819b3 1331 2015-05-10 12:33:22 -07:00
Kartik K. Agaram 4071055aee 1327 - better error handling in chessboard
Also a bugfix in break to label, because I noticed the screen wasn't
being cleaned up on quit.
2015-05-10 11:40:33 -07:00
Kartik K. Agaram 49073ebeef vim highlighting for labels 2015-04-18 08:54:45 -07:00
Kartik K. Agaram b3cdcdd44f 1093 - little more vim support for the old arc version 2015-04-17 22:52:41 -07:00
Kartik K. Agaram 38f0b91af2 1048 2015-04-11 12:12:31 -07:00