From 8bd3f99fc3e448f3ec5e396a8775454eb111d5c6 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 25 Nov 2016 11:33:13 -0800 Subject: 3688 Move my todos over the past couple of years into the codebase now that it might be going dormant. Surprising how few todos left undone! --- 046global.cc | 8 ++++---- 057immutable.cc | 1 + 061text.mu | 1 + 070table.mu | 4 ++++ 075channel.mu | 3 +++ html/046global.cc.html | 8 ++++---- html/057immutable.cc.html | 1 + html/061text.mu.html | 1 + html/070table.mu.html | 4 ++++ html/075channel.mu.html | 3 +++ html/lambda-to-mu.mu.html | 10 ++++++++-- lambda-to-mu.mu | 6 ++++++ 12 files changed, 40 insertions(+), 10 deletions(-) diff --git a/046global.cc b/046global.cc index 2dc1e760..9d690806 100644 --- a/046global.cc +++ b/046global.cc @@ -4,10 +4,10 @@ //: have access to each other's globals. //: //: This feature is still experimental and half-baked. You can't name global -//: variables, and so like in most tests they don't get checked for types (the -//: only known hole in the type system, can cause memory corruption). We might -//: fix these issues if we ever use globals. Or we might just drop the feature -//: entirely. +//: variables, and they don't get checked for types (the only known hole in +//: the type system, can cause memory corruption). We might fix these issues +//: if we ever use globals. Or we might just drop the feature entirely. +//: [tag: todo] :(scenario global_space) def main [ diff --git a/057immutable.cc b/057immutable.cc index 7b4e331c..578b5f8a 100644 --- a/057immutable.cc +++ b/057immutable.cc @@ -2,6 +2,7 @@ //: products. This layer will start enforcing this check. //: //: One hole for now: variables in surrounding spaces are implicitly mutable. +//: [tag: todo] :(scenario can_modify_ingredients_that_are_also_products) # mutable container diff --git a/061text.mu b/061text.mu index bd7eb89f..d8e40112 100644 --- a/061text.mu +++ b/061text.mu @@ -123,6 +123,7 @@ scenario text-equal-common-lengths-but-distinct [ ] # A new type to help incrementally construct texts. +# todo: make this shape-shifting. container buffer [ length:num data:text diff --git a/070table.mu b/070table.mu index efa78a2c..f82bb9c7 100644 --- a/070table.mu +++ b/070table.mu @@ -1,6 +1,8 @@ # A table is like an array, except that you can index it with arbitrary types # and not just non-negative whole numbers. +# incomplete; doesn't handle hash conflicts + scenario table-read-write [ local-scope tab:&:table:num:num <- new-table 30 @@ -59,6 +61,8 @@ def new-table capacity:num -> result:&:table:_key:_value [ *result <- merge 0/length, capacity, data ] +# todo: tag results as /required so that call-sites are forbidden from ignoring them +# then we could handle conflicts simply by resizing the table def put-index table:&:table:_key:_value, key:_key, value:_value -> table:&:table:_key:_value [ local-scope load-ingredients diff --git a/075channel.mu b/075channel.mu index 985292a3..c1d2d5f3 100644 --- a/075channel.mu +++ b/075channel.mu @@ -155,6 +155,9 @@ def read in:&:source:_elem -> result:_elem, eof?:bool, in:&:source:_elem [ reset lock ] +# todo: create a notion of iterator and iterable so we can read/write whole +# aggregates (arrays, lists, ..) of _elems at once. + def clear in:&:source:_elem -> in:&:source:_elem [ local-scope load-ingredients diff --git a/html/046global.cc.html b/html/046global.cc.html index 234acdc1..cc62df99 100644 --- a/html/046global.cc.html +++ b/html/046global.cc.html @@ -39,10 +39,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color //: have access to each other's globals. //: //: This feature is still experimental and half-baked. You can't name global -//: variables, and so like in most tests they don't get checked for types (the -//: only known hole in the type system, can cause memory corruption). We might -//: fix these issues if we ever use globals. Or we might just drop the feature -//: entirely. +//: variables, and they don't get checked for types (the only known hole in +//: the type system, can cause memory corruption). We might fix these issues +//: if we ever use globals. Or we might just drop the feature entirely. +//: [tag: todo] :(scenario global_space) def main [ diff --git a/html/057immutable.cc.html b/html/057immutable.cc.html index c31f5e20..34928ecb 100644 --- a/html/057immutable.cc.html +++ b/html/057immutable.cc.html @@ -39,6 +39,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color //: products. This layer will start enforcing this check. //: //: One hole for now: variables in surrounding spaces are implicitly mutable. +//: [tag: todo] :(scenario can_modify_ingredients_that_are_also_products) # mutable container diff --git a/html/061text.mu.html b/html/061text.mu.html index 5f9ba882..41234594 100644 --- a/html/061text.mu.html +++ b/html/061text.mu.html @@ -157,6 +157,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ] # A new type to help incrementally construct texts. +# todo: make this shape-shifting. container buffer [ length:num data:text diff --git a/html/070table.mu.html b/html/070table.mu.html index 9cc6e3e1..6d9b3e0c 100644 --- a/html/070table.mu.html +++ b/html/070table.mu.html @@ -35,6 +35,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color # A table is like an array, except that you can index it with arbitrary types # and not just non-negative whole numbers. +# incomplete; doesn't handle hash conflicts + scenario table-read-write [ local-scope tab:&:table:num:num <- new-table 30 @@ -93,6 +95,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color *result <- merge 0/length, capacity, data ] +# todo: tag results as /required so that call-sites are forbidden from ignoring them +# then we could handle conflicts simply by resizing the table def put-index table:&:table:_key:_value, key:_key, value:_value -> table:&:table:_key:_value [ local-scope load-ingredients diff --git a/html/075channel.mu.html b/html/075channel.mu.html index 7b9ade33..ed6eda1d 100644 --- a/html/075channel.mu.html +++ b/html/075channel.mu.html @@ -191,6 +191,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color reset lock ] +# todo: create a notion of iterator and iterable so we can read/write whole +# aggregates (arrays, lists, ..) of _elems at once. + def clear in:&:source:_elem -> in:&:source:_elem [ local-scope load-ingredients diff --git a/html/lambda-to-mu.mu.html b/html/lambda-to-mu.mu.html index 86b47a69..ccb33e30 100644 --- a/html/lambda-to-mu.mu.html +++ b/html/lambda-to-mu.mu.html @@ -15,12 +15,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color * { font-size: 12pt; font-size: 1em; } .muData { color: #ffff00; } .muControl { color: #c0a020; } -.Delimiter { color: #800080; } .Special { color: #c00000; } +.Delimiter { color: #800080; } +.Comment { color: #9090ff; } .Constant { color: #00a0a0; } .SalientComment { color: #00ffff; } .CommentedCode { color: #6c6c6c; } -.Comment { color: #9090ff; } .muRecipe { color: #ff8700; } .muScenario { color: #00af00; } --> @@ -37,6 +37,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ## experimental compiler to translate programs written in a generic ## expression-oriented language called 'lambda' into Mu +# incomplete; code generator not done +# potential enhancements: +# symbol table +# poor man's macros +# substitute one instruction with multiple, parameterized by ingredients and products + scenario convert-lambda [ run [ local-scope diff --git a/lambda-to-mu.mu b/lambda-to-mu.mu index 734fa126..8e99fd07 100644 --- a/lambda-to-mu.mu +++ b/lambda-to-mu.mu @@ -1,6 +1,12 @@ ## experimental compiler to translate programs written in a generic ## expression-oriented language called 'lambda' into Mu +# incomplete; code generator not done +# potential enhancements: +# symbol table +# poor man's macros +# substitute one instruction with multiple, parameterized by ingredients and products + scenario convert-lambda [ run [ local-scope -- cgit 1.4.1-2-gfad0