about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* 6707Kartik Agaram2020-08-021-3/+32
|
* 6706 - support utf-8Kartik Agaram2020-08-023-2/+48
| | | | | | | | | | | | | | For example: fn main -> r/ebx: int { var x/eax: grapheme <- copy 0x9286e2 # code point 0x2192 in utf-8 print-grapheme-to-real-screen x print-string-to-real-screen "\n" } Graphemes must fit in 4 bytes (21 bits for code points). Unclear what we should do for longer clusters since graphemes are a fixed-size type at the moment.
* 6705Kartik Agaram2020-08-021-1/+1
| | | | Another stupid bug: I've been printing out 3 nulls for every byte of ascii.
* 6704Kartik Agaram2020-08-022-28/+28
| | | | | This is stupid; all this while I've been writing escape sequences to the screen they've been going out on stderr.
* 6703 - new types: code-point and graphemeKartik Agaram2020-08-0251-75/+144
| | | | | | | | | | Both have the same size: 4 bytes. So far I've just renamed print-byte to print-grapheme, but it still behaves the same. I'm going to support printing code-points next, but grapheme 'clusters' spanning multiple code-points won't be supported for some time.
* 6702Kartik Agaram2020-08-022-3/+18
|
* 6701Kartik Agaram2020-08-022-2/+4
|
* 6700 - clear fake screenKartik Agaram2020-08-011-0/+24
| | | | | | One thing I hadn't realized in all my hacking on the mu1 prototype: clear-screen doesn't modify active attributes. It's equivalent to printing spaces all over the screen with the current attributes.
* 6699 - start building out fake screenKartik Agaram2020-08-0166-442/+705
| | | | | We now have all existing apps and prototypes going through the dependency-injected wrapper, even though it doesn't actually implement the fake screen yet.
* 6698Kartik Agaram2020-08-012-2/+2
|
* 6697Kartik Agaram2020-08-013-94/+86
|
* 6696Kartik Agaram2020-07-311-0/+13
|
* 6695Kartik Agaram2020-07-313-11/+13
|
* 6694Kartik Agaram2020-07-312-20/+22
|
* 6693Kartik Agaram2020-07-316-19746/+20046
|
* 6692Kartik Agaram2020-07-311-1/+6
|
* 6691 - start building a fake screenKartik Agaram2020-07-312-6/+98
| | | | There was a bug in defining types containing other user-defined types.
* 6690Kartik Agaram2020-07-301-1/+2
|
* 6689 - some little white lies to GitHubKartik Agaram2020-07-301-1/+5
|
* 6688Kartik Agaram2020-07-301-0/+1
|
* 6687 - stream-empty? and stream-full?Kartik Agaram2020-07-306-3/+154
|
* 6686Kartik Agaram2020-07-302-0/+0
|
* 6685Kartik Agaram2020-07-2913-21171/+21593
|
* 6684 - experimental primitives for streamsKartik Agaram2020-07-294-0/+320
| | | | | | | | | | | | | | | | | | | | | This is a hacky special case. The alternative would be more general support for generics. One observation: we might be able to type-check some primitives using `sig`s. Only if they don't return anything, since primitives usually need to support arbitrary registers. I'm not doing that yet, though. It eliminates the possibility of writing tests for them in mu.subx, which can't see 400.mu. But it's an alternative: sig allocate out: (addr handle _) sig populate out: (addr handle array _), n: int sig populate-stream out: (addr handle stream _), n: int sig read-from-stream s: (addr stream _T), out: (addr _T) sig write-to-stream s: (addr stream _T), in: (addr _T) We could write the tests in Mu. But then we're testing behavior rather than the code generated. There are trade-offs. By performing type-checking in mu.subx I retain the option to write both kinds of tests.
* 6683Kartik Agaram2020-07-282-10/+6
|
* 6682 - experimental support for streams and slicesKartik Agaram2020-07-284-12/+213
| | | | | | | | | Slices contain `addr`s so the same rules apply to them. They can't be stored in structs and so on. But they may be an efficient temporary while parsing. Streams are currently a second generic type after arrays, and gradually strengthening the case to just bite the bullet and support first-class generics in Mu.
* 6681Kartik Agaram2020-07-262-2/+2
|
* 6680Kartik Agaram2020-07-261-3/+0
|
* 6679Kartik Agaram2020-07-256-11/+9
|
* 6678Kartik Agaram2020-07-251-10045/+10021
|
* 6677 - prototype: spreadsheet for treesKartik Agaram2020-07-251-0/+427
|
* 6676 - type checks for 'lookup'Kartik Agaram2020-07-252-24/+0
|
* 6675Kartik Agaram2020-07-251-0/+390
|
* 6674Kartik Agaram2020-07-252-8/+9
|
* 6673Kartik Agaram2020-07-253-19444/+20898
|
* 6672 - error on addr or array inside typeKartik Agaram2020-07-252-7/+150
|
* 6671 - bugfix in generic functionsKartik Agaram2020-07-252-0/+1
| | | | | | We need to remember to clear local variables. And there's a good question here of how Mu supports variables of type stream or table. Or other user-defined types that inline arrays.
* 6670 - generic functionsKartik Agaram2020-07-252-3/+15
| | | | | | | | | | | | | | | | Function signatures can now take type parameters starting with '_'. Type parameters in a signature match any concrete type in the call. But they have to be consistent within a single call. Things I considered but punted on for now: - having '_' match anything without needing to be consistent. Wildcards actually seem harder to understand. - disallowing top-level '_' types. I'll wait until a concrete use case for disallowing. We still don't support *defining* types with type parameters, so for now this is only useful for calling functions on arrays or streams or handles.
* tmp - snapshot of type-parameter supportKartik Agaram2020-07-252-11/+125
| | | | | I think I've got all the stack management down. Time now for the business logic. There's one failing test.
* 6668Kartik Agaram2020-07-242-3/+4
| | | | type-match? is no longer symmetric; we have to be careful about arg ordering.
* 6667Kartik Agaram2020-07-242-1/+1
|
* 6666 - types starting with '_' now match anythingKartik Agaram2020-07-242-3/+85
| | | | We still need to perform pattern matching.
* 6665Kartik Agaram2020-07-241-4/+4
|
* 6664Kartik Agaram2020-07-241-5/+5
|
* 6663Kartik Agaram2020-07-242-1/+61
|
* 6662 - start support for genericsKartik Agaram2020-07-202-0/+100
| | | | Mu will be a language with generics -- but no static dispatch.
* 6661Kartik Agaram2020-07-201-3/+3
|
* 6660Kartik Agaram2020-07-202-2/+2
|
* 6659Kartik Agaram2020-07-182-14/+14
| | | | Tighten up some function signatures.
* 6658Kartik Agaram2020-07-182-7/+7
|