Scott Richmond scott
  • Joined on 2023-07-29
scott opened issue twc/ludus#36 2024-05-19 19:14:49 +00:00
Nice error reporting
scott pushed to to_janet at twc/ludus 2024-05-19 18:54:57 +00:00
608ab4ab67 stringify fns and bugfixes
70bff13eea add ref to main switch
Compare 2 commits »
scott commented on issue twc/ludus#27 2024-05-19 18:45:01 +00:00
Ensure stack overflows don't kill Ludus

#29 helps but does not fix this. If recursive calls are in tail position, we won't get stack overflows. But beginners may overflow the stack by non-tail recursive calls, and we don't want that to…

scott commented on issue twc/ludus#28 2024-05-19 18:42:21 +00:00
String patterns

Closing for now. If testing uncovers bugs, will file bugfix issues.

scott closed issue twc/ludus#28 2024-05-19 18:42:21 +00:00
String patterns
scott commented on issue twc/ludus#29 2024-05-19 18:41:10 +00:00
Tail call optimization

The solution to this is to ensure that all relevant functions in the Janet interpreter are themselves written in a way that Janet's TCO takes care of it. (In theory.) Current practice in the…

scott closed issue twc/ludus#29 2024-05-19 18:41:10 +00:00
Tail call optimization
scott pushed to to_janet at twc/ludus 2024-05-19 05:58:47 +00:00
8d3d9a2dc5 2big commit: stand up fns, definitions and calls, lots of bugfixes
scott commented on issue twc/ludus#24 2024-05-18 22:29:18 +00:00
Refs & state

One design issue that's not so easy-peasy: refs would now need globally unique names.

That's probably good enough for Computer Class, which probably won't use refs except under the hood.

Poss…

scott closed issue twc/ludus#12 2024-05-18 22:24:28 +00:00
String interpolation: make it work
scott commented on issue twc/ludus#12 2024-05-18 22:24:20 +00:00
String interpolation: make it work

Stood up, with no glaring bugs, in 265f867a71

scott pushed to to_janet at twc/ludus 2024-05-18 22:22:53 +00:00
265f867a71 fix string interpolation
scott opened issue twc/ludus#35 2024-05-18 22:18:38 +00:00
Improve parser errors on extra exprs/tokens on line
scott opened issue twc/ludus#34 2024-05-18 22:07:23 +00:00
Comment on last line of file causes scanner to die
scott commented on issue twc/ludus#28 2024-05-18 21:58:42 +00:00
String patterns

Implemented in 5deab18356. Not closing yet for to do more testing. At current, the following works as expected:

match "You are the eggman" with {
  "I {verb} the {noun}" -> (verb, noun)
…
scott pushed to to_janet at twc/ludus 2024-05-18 21:49:55 +00:00
5deab18356 string patterns should now be working
014da297d0 more cleanup still
88aaf864ab more cleanup
Compare 3 commits »
scott commented on issue twc/ludus#33 2024-05-18 21:48:22 +00:00
WASM: wire it up!

Okay. I figured out how to do this, more or less.

Zig is great, but its build system is very powerful, very complicated and seriously under-documented.

(See, e.g., https://ziggit.dev/t/buildi

scott pushed to to_janet at twc/ludus 2024-05-18 21:04:29 +00:00
95054ef234 add match exprs
41cd39df2e check + compile string patterns; some cleanup, some messes still
32cf7d6cc4 add expr to match to matchh
b5d23b26ec ensure :errors is always a tuple or array, never nil; allows (empty? (scanner :errors)) to work as a test for errors
Compare 4 commits »
scott opened issue twc/ludus#33 2024-05-16 18:31:52 +00:00
WASM: wire it up!
scott pushed to to_janet at twc/ludus 2024-05-16 17:57:30 +00:00
b0c912b16c don't die when trying to check arity of a nonexistent function