about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* 3264Kartik K. Agaram2016-08-272-0/+12
| | | | | | Turns out chessboard.mu started deadlocking in commit 3258 even though all its tests continue to pass. Not fixed yet; first make deadlock easier to diagnose.
* 3263Kartik K. Agaram2016-08-271-1/+1
| | | | Commit 3171 which added '--trace' broke 'Save_trace'.
* 3262Kartik K. Agaram2016-08-271-1/+5
|
* 3261Kartik K. Agaram2016-08-261-15/+15
| | | | Fix CI.
* 3260Kartik K. Agaram2016-08-266-17/+17
| | | | | array length = number of elements array size = in locations
* 3259Kartik K. Agaram2016-08-2610-18/+18
| | | | | | | | | | | Prefer preincrement operators wherever possible. Old versions of compilers used to be better at optimizing them. Even if we don't care about performance it's useful to make unary operators look like unary operators wherever possible, and to distinguish the 'statement form' which doesn't care about the value of the expression from the postincrement which usually increments as a side-effect in some larger computation (and so is worth avoiding except for some common idioms, or perhaps even there).
* 3258Kartik K. Agaram2016-08-263-21/+113
| | | | | | | | | | | | | In the process of debugging the last couple of commits (though I no longer remember exactly how) I noticed that 'wait-for-routine' only waits until the target routine stops running for any reason, including when it blocks on something. That's not the synchronization primitive we want in production code, even if it's necessary for some scenarios like 'buffer-lines-blocks-until-newline'. So we rename the old 'wait-for-routine' primitive to 'wait-for-routine-to-block', and create a new version of 'wait-for-routine' that say callers of 'start-writing' can safely use, because it waits until a target routine actually completes (either successfully or not).
* 3257Kartik K. Agaram2016-08-261-16/+14
|
* 3256Kartik K. Agaram2016-08-265-3/+56
| | | | | Bugfix in filesystem creation. I'm sure there are other fake-filesystem bugs.
* 3255Kartik K. Agaram2016-08-261-8/+9
|
* 3254Kartik K. Agaram2016-08-262-1/+18
|
* 3253 - writing to fake files in scenariosKartik K. Agaram2016-08-252-3/+76
| | | | High time I committed the part that works.
* 3252Kartik K. Agaram2016-08-251-1/+1
|
* 3251Kartik K. Agaram2016-08-251-6/+45
| | | | | Replace some asserts when checking scenario screens with better error messages.
* 3250Kartik K. Agaram2016-08-251-3/+6
|
* 3249 - better type-checking for recipe literalsKartik K. Agaram2016-08-251-3/+35
| | | | | This is inefficient; every occurrence of a recipe literal requires a scan through the whole caller recipe.
* 3248Kartik K. Agaram2016-08-252-4/+19
|
* 3247Kartik K. Agaram2016-08-252-26/+28
|
* 3246Kartik K. Agaram2016-08-251-1/+1
|
* 3245 - refuse to run programs with errorsKartik K. Agaram2016-08-222-1/+3
| | | | | | | | | | | | | | I started out incredibly lax about running past errors (I even used to call them 'warnings' when I started Mu), but I've been gradually seeing the wisdom of Go and Racket in refusing to run code if it doesn't pass basic integrity checks (such as using a literal as an address). Go is right to have no warnings, only errors. But where Go goes wrong is in even caring about unused variables. Racket and other languages perform more aggressive integrity checks so that the can optimize more aggressively, and I'm starting to realize I don't know enough to disagree with them.
* 3244Kartik K. Agaram2016-08-221-2/+12
|
* 3243Kartik K. Agaram2016-08-221-2/+2
|
* 3242Kartik K. Agaram2016-08-221-8/+1
| | | | | | | Drop support for escape characters in dilated reagents. We haven't felt the need for it yet, we have no tests for it, and eventually when we do we want to treat escapes the way we treat them in the rest of the language. (commit 3233)
* 3241Kartik K. Agaram2016-08-211-29/+26
| | | | Use allocate() in 'assume-console'.
* 3240Kartik K. Agaram2016-08-211-8/+8
|
* 3239Kartik K. Agaram2016-08-216-12/+12
|
* 3238Kartik K. Agaram2016-08-213-7/+16
| | | | | | Clean up primitive for reading from file. Never return EOF character. Stop using null character to indicate EOF as well. Instead, always use a second product to indicate EOF, and require calls to use it.
* 3237Kartik K. Agaram2016-08-212-2/+38
| | | | | | | | More checks for unsafe filesystem primitives. Most important, make sure the product of any $close-file instruction is never ignored, and that it's the same variable as the ingredient. (No way to indicate that in Mu code yet, but then Mu code should always be safe and not require such checks.)
* 3236Kartik K. Agaram2016-08-211-5/+0
|
* 3235Kartik K. Agaram2016-08-2013-26/+427
|
* 3234Kartik K. Agaram2016-08-202-1/+6
| | | | Fix some breaking sandbox/ tests.
* 3233 - change how Mu escapes stringsKartik K. Agaram2016-08-204-18/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks Sam Putman for helping think through this idea. When you encounter a backslash, strip it out and pass through any following run of backslashes. If we 'escaped' a single following character like C, then the character '\' would be the same as: '\\' escaped once '\\\\' escaped twice '\\\\\\\\' escaped thrice (8 backslashes) ..and so on, the number of backslashes doubling each time. Instead, our approach is to make the character '\' the same as: '\\' escaped once '\\\' escaped twice '\\\\' escaped thrice ..and so on, the number of backslashes merely increasing by one each time. This approach only works as long as backslashes aren't also overloaded to create special characters. So Mu doesn't follow C's approach of overloading backslashes both to escape quote characters and also as a notation for unprintable characters like '\n'.
* 3232Kartik K. Agaram2016-08-201-1/+34
| | | | Support pipe characters in fake files. Still super ugly, though.
* 3231 - reading from fake files in scenariosKartik K. Agaram2016-08-203-4/+68
|
* 3230Kartik K. Agaram2016-08-203-0/+0
|
* 3229 - fake file systems using 'assume-filesystem'Kartik K. Agaram2016-08-204-7/+223
| | | | Built with Stephen Malina.
* 3228Kartik K. Agaram2016-08-191-1/+1
|
* 3227Kartik K. Agaram2016-08-189-32/+55
|
* 3226Kartik K. Agaram2016-08-181-3/+3
|
* 3225 - testable interface for writing filesKartik K. Agaram2016-08-184-15/+41
| | | | | | | | For example usage of file operations, see filesystem.mu. Is it ugly that we don't actually write to disk unless we wait for the writing routine to exit? Maybe there's a nice way to wrap it. At any rate, all buffering is explicit, which seems a win compared to *nix.
* 3224Kartik K. Agaram2016-08-182-8/+3
|
* 3223Kartik K. Agaram2016-08-182-5/+4
|
* 3222Kartik K. Agaram2016-08-181-0/+4
| | | | | | | | | | | | | Commit 3191 stopped defining _XOPEN_SOURCE when building termbox/ to get Mu to build on OpenBSD. However, that had the side effect of not declaring the prototype for wcwidth() on some versions of Linux. Ugh. Just hack around this morass. In general the direction we want to go in Mu is fewer feature #defines. At least explicit ones. Should be an internal detail of the underlying platform our code shouldn't have to worry about. If headers don't cooperate, just start explicitly declaring prototypes and damn the consequences.
* 3221Kartik K. Agaram2016-08-181-3/+3
|
* 3220 - delete gh-pages branchKartik K. Agaram2016-08-171-11/+0
|
* 3219Kartik K. Agaram2016-08-1732-217/+767
| | | | | | | | Trying keeping html in the master branch: https://github.com/blog/2228-simpler-github-pages-publishing Let's see if https://akkartik.github.io/mu updates after I push this commit to just the master branch.
* 3218Kartik K. Agaram2016-08-172-0/+14
| | | | | | Fix CI. Scenario size_of_shape_shifting_exclusive_container was triggering undefined behavior in tangle/ and causing things to break in some compilers but not others.
* 3217Kartik K. Agaram2016-08-172-4/+4
| | | | Fix a new warning from Perl.
* 3216Kartik K. Agaram2016-08-171-1/+31
| | | | | | | | | | | | | | | | | | | Another hole in refcount management, which I noticed while doing commit 3202, and thinking about which led to the insight of commit 3212. Now the summary of commit 3197 is modified to this: Update refcounts of products after every instruction, EXCEPT: a) when instruction is a non-primitive and the callee starts with 'local-scope' (because it's already not decremented in 'return') OR: b) when instruction is primitive 'next-ingredient' or 'next-ingredient-without-typechecking', and its result is saved to a variable in the default space (because it's already incremented at the time of the call)
* 3215Kartik K. Agaram2016-08-171-3/+3
|