about summary refs log tree commit diff stats
path: root/chessboard.mu
Commit message (Collapse)AuthorAgeFilesLines
* 3561Kartik K. Agaram2016-10-221-3/+3
|
* 3552Kartik K. Agaram2016-10-221-1/+1
| | | | | | | | | | | | | | | | | | Stop requiring jump instructions to explicitly provide a ':label' type for jump targets. This has been a source of repeated confusion for my students: a) They'd add the ':label' to the label definition rather than the jump target (label use) b) They'd spend time thinking about whether the initial '+' prefix was part of the label name. In the process I cleaned up a couple of things: - the space of names is more cleanly partitioned into labels and non-labels (clarifying that '_' and '-' are non-label prefixes) - you can't use label names as regular variables anymore - you can infer the type of a label just from its name
* 3497Kartik K. Agaram2016-10-131-23/+24
|
* 3483Kartik K. Agaram2016-10-081-34/+34
|
* 3390Kartik K. Agaram2016-09-171-8/+8
|
* 3389Kartik K. Agaram2016-09-171-33/+33
|
* 3380Kartik K. Agaram2016-09-171-34/+34
| | | | | One more place we were missing expanding type abbreviations: inside container definitions.
* 3379Kartik K. Agaram2016-09-171-27/+27
| | | | Can't use type abbreviations inside 'memory-should-contain'.
* 3354 - support multiple routines at a source/sinkKartik K. Agaram2016-09-151-13/+13
| | | | | This commit completes the final step: fixing the final failing tests (in chessboard.mu) by teaching `restart` about the block signal.
* 3346Kartik K. Agaram2016-09-131-4/+4
| | | | Process type abbreviations in *shape-shifting* function headers.
* 3337 - first use of type abbreviations: textKartik K. Agaram2016-09-121-3/+5
| | | | | In the process I've uncover a couple of situations we don't support type abbreviations yet. They're next.
* 3261Kartik K. Agaram2016-08-261-15/+15
| | | | Fix CI.
* 3020 - names in chessboard testsKartik K. Agaram2016-05-261-92/+100
| | | | | | | | Extremely ugly change. Also ended up fixing some places where I was mixing up sources and sinks. But I'm not going to bother updating edit/ and sandbox/ apps. Just too many scenarios to clean up.
* 2880Kartik K. Agaram2016-04-271-4/+7
| | | | | | | | | | | Turns out we don't need a primitive to return an empty value of arbitrary type. Just create it on the heap using 'new'. But this uncovered *yet* another bug, sigh. When I specialize generic functions I was running all transforms on the generated functions after specialization completed. But there's one transform that includes code from elsewhere. If such code included type-ingredients -- kaboom. Now fixed and there's a test, so I've got that going for me which is nice.
* 2878Kartik K. Agaram2016-04-271-6/+1
|
* 2873 - fix a bug in converting conditional returnsKartik K. Agaram2016-04-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was an interaction between two transforms. The first turned: return-if ... into: jump-unless ..., 1:offset # skip next instruction return ... The second added an unconditional return at the end of the recipe if it didn't already exist (so that functions always end with a return). However, it was getting confused by the return instructions generated above, which look unconditional but sometimes get skipped. To fix this, conditional returns are now transformed into this: { break-unless ... return ... } Since the final instruction is now no longer a reply (but rather the '}' label), the second transform triggers and adds the unconditional return after it. This commit removes the final place marked 'BUG:' in the codebase yesterday (see commit 2870).
* 2870 - fix the final long-standing failing testKartik K. Agaram2016-04-271-2/+4
| | | | | | | | | | | | | | | | | 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.
* 2864 - replace all address:shared with just addressKartik K. Agaram2016-04-241-51/+51
| | | | | | | Now that we no longer have non-shared addresses, we can just always track refcounts for all addresses. Phew!
* 2860 - rename 'index-address' to 'put-index'Kartik K. Agaram2016-04-231-10/+9
|
* 2845Kartik K. Agaram2016-04-161-17/+8
|
* 2798 - experiment: split channels into two endsKartik K. Agaram2016-03-191-93/+93
| | | | | | | | | | 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..
* 2784 - make channels genericKartik K. Agaram2016-03-141-28/+28
| | | | | | 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.
* 2782 - directly use string literals everywhereKartik K. Agaram2016-03-141-31/+16
|
* 2749Kartik K. Agaram2016-03-091-12/+12
|
* 2748Kartik K. Agaram2016-03-091-10/+10
|
* 2746Kartik K. Agaram2016-03-091-3/+2
|
* 2735 - define recipes using 'def'Kartik K. Agaram2016-03-081-35/+35
| | | | | | | | | | | | 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.
* 2576 - distinguish allocated addresses from othersKartik K. Agaram2016-01-191-59/+60
| | | | | | | | | | | | | | | | 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.
* 2573 - check product type of 'new'Kartik K. Agaram2016-01-191-1/+1
| | | | | | | | | | | I realize that my current doesn't allow nesting a:b:c linear type syntax inside a dilated property. So you can't currently say: (recipe address:number) Need to fix that at some point. Non-trivial since linear syntax is oblivious to dilated syntax. I should probably make the dilated syntax more fundamental and introduce it at an earlier layer.
* 2562Kartik K. Agaram2016-01-171-7/+7
| | | | | | | | | | | | 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.
* 2548 - teach 'print' to print integersKartik K. Agaram2015-12-281-1/+2
| | | | | | | | | | Still can't print non-integer numbers, so this is a bit hacky. The big consequence is that you can't print literal characters anymore because of our rules about how we pick which variant to statically dispatch to. You have to save to a character variable first. Maybe I can add an annotation to literals..
* chessboard.mu now workingKartik K. Agaram2015-12-151-3/+3
|
* 2468 - overload print-character as just 'print'Kartik K. Agaram2015-11-211-7/+7
|
* 2467 - rename 'string' to 'text' everywhereKartik K. Agaram2015-11-211-14/+14
| | | | | | | | Not entirely happy with this. Maybe we'll find a better name. But at least it's an improvement. One part I *am* happy with is renaming string-replace to replace, string-append to append, etc. Overdue, now that we have static dispatch.
* 2460 - headers for remaining recipesKartik K. Agaram2015-11-181-46/+28
|
* 2299 - check types of ingredients in callsKartik K. Agaram2015-10-281-18/+18
| | | | | | | | | | Still very incomplete: a) we perform the check at runtime b) tests for edit and sandbox apps no longer work; we can't fix them until we get type parameters in both containers and recipes (because list and list operations need to become generic).
* 2260 - start tracing by depth rather than labelKartik K. Agaram2015-10-061-1/+1
| | | | Now we can collect all traces, just modulating the depth.
* 2244Kartik K. Agaram2015-10-051-3/+3
|
* 2095Kartik K. Agaram2015-08-281-8/+0
| | | | | | | | | | | | Finally terminate the experiment of keeping debug prints around. I'm also going to give up on maintaining counts. What we really need is two kinds of tracing: a) For tests, just the domain-specific facts, organized by labels. b) For debugging, just transient dumps to stdout. b) only works if stdout is clean by default. Hmm, I think this means 'stash' should be the transient kind of trace.
* 2051Kartik K. Agaram2015-08-211-12/+12
| | | | | Forgot to fix chessboard tests during commit 2022: running sandboxes in separate routines.
* 1884Kartik K. Agaram2015-07-291-27/+0
|
* 1880 - switch .mu files to new type-deducing idiomKartik K. Agaram2015-07-291-156/+156
|
* 1869 - rename the /deref property to /lookupKartik K. Agaram2015-07-281-34/+34
| | | | Should be a little bit more mnemonic.
* 1868 - start using naked literals everywhereKartik K. Agaram2015-07-281-133/+133
| | | | First step to reducing typing burden. Next step: inferring types.
* 1808 - helper to print newlines during debuggingKartik K. Agaram2015-07-171-62/+20
| | | | | | | The recent session makes me weary of deleting comment counts from inside strings, and the newlines everywhere take up vertical space. Considered println like pascal/ruby, but I'd like something I can add/remove at the end of existing prints. So this hack for $print.
* 1780 - now we always reclaim local scopesKartik K. Agaram2015-07-131-10/+10
| | | | | | But still no difference in either memory footprint or in running time. This will teach me -- for the umpteenth time -- to optimize before measuring.
* 1773 - update all mu recipes to new-default-spaceKartik K. Agaram2015-07-131-10/+10
| | | | | Turns out to not affect memory utilization or run-time. At all. But still looks nicer and requires less fudging on our part.
* 1620Kartik K. Agaram2015-06-221-5/+18
| | | | | | | | chessboard finally passing all its tests. What made this hard was that for some reason one of the background routines in the main chessboard test wasn't terminating like it used to. And so it was polluting *later* tests. Just clean up that source of contamination for now. Later we'll think about routine termination.
* 1618Kartik K. Agaram2015-06-211-5/+5
|
* 1599Kartik K. Agaram2015-06-191-12/+12
|