Commit Graph

16 Commits

Author SHA1 Message Date
sforman 16cc0e5769 Change definition of uncons. 2023-09-18 11:26:50 -07:00
sforman 99f01bec1f mul div mod add sub in Nim 2023-08-12 07:54:33 -07:00
sforman 3f9f558ebb the BinInt zero vanished? 2023-07-25 22:01:55 -07:00
Simon Forman db9c2c16a9 inscribe command for Nim.
https://todo.sr.ht/~sforman/thun-der/27

It doesn't let you overwrite definitions that are loaded from defs.txt.
It DOES let you overwrite builtins, but that doesn't matter because they
are handled by joy_eval() before it checks the dictionary, so in
practice the definitions are never evaluated even though they are put
into the dictionary.  Whew!  It's hacky but it works!
2023-02-14 20:27:36 -08:00
Simon Forman de774af3da Emit error messages on stderr. 2023-02-14 17:57:29 -08:00
Simon Forman 2f5f679d61 No negative shift values. 2023-02-14 14:56:46 -08:00
Simon Forman 23cf3f5b70 lshift and rshift for Nim.
Incomplete, should reject negative shift count.
2023-02-14 14:19:57 -08:00
Simon Forman ad0f135376 Don't let defs shadow builtins. 2023-02-14 08:39:52 -08:00
Simon Forman 61bcf3588a Apparently this is redundant.
Discovered by running `nim doc joy.nim`, compiling doesn't flag it.
2022-09-28 21:22:19 -07:00
Simon Forman d94153583c Comparison operations. 2022-09-24 21:00:45 -07:00
Simon Forman c591bf4138 branch, dip, i, loop
The core combinators (except fork).
2022-09-24 20:45:06 -07:00
Simon Forman 77b1638d64 Check for minus before converting to int.
BigInts converts "-" to 0.  This happens in the parser before you get to
the evaluator.
2022-09-14 21:09:20 -07:00
Simon Forman 9d7a2a8fcb Minor cleanup, subtraction.
Testing with the joytest test suite revealed that I had forgotten to
implement subtraction.  This also unconvered a (maybe) bug in the
BigInts package where it converts "-" to zero.

https://git.sr.ht/~sforman/joytest

https://github.com/nim-lang/bigints/issues/116
2022-09-14 21:01:50 -07:00
Simon Forman 39008b351b Let simplejoy be joy.
Simple pleasures are the best.
2022-09-14 20:15:25 -07:00
Simon Forman f5265a2287 Remove old code. 2022-09-14 20:14:34 -07:00
Simon Forman cf56e31fbd Uppercase Nim. 2022-02-19 07:48:51 -08:00