Commit Graph

1046 Commits

Author SHA1 Message Date
Simon Forman 7d93262c81 Let's use rax to generate tab completions? 2023-02-20 11:19:27 -08:00
Simon Forman b32a3f2496 Line editing with linenoise.
https://github.com/antirez/linenoise
https://todo.sr.ht/~sforman/thun-der/33
2023-02-20 10:20:40 -08:00
Simon Forman d8263e0527 Move and rename push_thing_onto_expression(). 2023-02-20 08:35:03 -08:00
Simon Forman d0a43bea52 Minor cleanup. 2023-02-20 06:38:18 -08:00
Simon Forman 83f393a176 typedef FTW 2023-02-19 20:06:07 -08:00
Simon Forman c35396cf73 Wrap it? 2023-02-19 19:43:53 -08:00
Simon Forman 98e3e91345 I figured out how to spell it. 2023-02-19 19:41:11 -08:00
Simon Forman 5258f4d894 A little macro. 2023-02-19 19:40:43 -08:00
Simon Forman f06c261e81 Let's use the idiomatic functions, eh?
That way the code is simpler and there aren't error messages scattered
all over the place.
2023-02-19 17:54:34 -08:00
Simon Forman f194df8159 How would you compile this?
fn [+] step
2023-02-19 17:43:18 -08:00
Simon Forman 7d99bb4e23 SWIProlog 2023-02-18 20:09:19 -08:00
Simon Forman a33bb8cdaa eval_joy_ast 2023-02-17 13:56:37 -08:00
Simon Forman 0d51f7ec1f A simple Joy-to-AST program.
Written in GNU Prolog, doncha know!?  :D
2023-02-17 11:08:43 -08:00
Simon Forman efbca82064 vlist.c 2023-02-17 11:07:32 -08:00
Simon Forman d637a5015c Minor cleanup. 2023-02-16 17:45:25 -08:00
Simon Forman bf30bbe69b Minor cleanup. 2023-02-16 13:36:31 -08:00
Simon Forman e056831577 Minor cleanup. 2023-02-16 13:26:11 -08:00
Simon Forman 6cf168c280 pick and length 2023-02-16 12:12:42 -08:00
Simon Forman 55b48a0655 Minor cleanup. This is pretty nice.
It's hard to believe this datastructure is so obscure!
2023-02-16 11:45:54 -08:00
Simon Forman a6a2c2d955 Double list size each time; neat demo. 2023-02-16 11:42:17 -08:00
Simon Forman 823c53308c Set correct last_used when creating new vlist. 2023-02-16 11:41:35 -08:00
Simon Forman 95f927ae95 () is the null pointer 2023-02-16 11:27:39 -08:00
Simon Forman 8a3f3aff5c A start on VList. 2023-02-16 10:56:37 -08:00
Simon Forman 10edbd0ee0 Used "Artistic Style" (astyle) to check formatting. 2023-02-15 17:22:14 -08:00
Simon Forman 1256fb47d8 A start on styling notebooks.
I'd like the website to have some consistency.
2023-02-15 13:43:22 -08:00
Simon Forman 610de03e0b Minor updates to README file.
Removed setup.py until Python folks stabilize packaging and
distribution.  Just put the joy script in your PATH, eh?
2023-02-15 10:05:25 -08:00
Simon Forman aee4365929 Logical Boolean ops in bigints.joy. 2023-02-14 20:31:35 -08: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 3d78f831cb Emit errors on stderr. 2023-02-14 18:48:49 -08:00
Simon Forman de774af3da Emit error messages on stderr. 2023-02-14 17:57:29 -08:00
Simon Forman db322b0b3b Emit error messages on stderr. 2023-02-14 17:52:52 -08:00
Simon Forman eca5e41cc9 Conform Python error messages. 2023-02-14 17:40:49 -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 c2eae95bb2 lshift and rshift for C. 2023-02-14 13:15:53 -08:00
Simon Forman f1db810370 or instead of ||, and instead of &&
Docs still TODO!
2023-02-14 12:27:46 -08:00
Simon Forman 8c36d8316e Hack to deal with trailing underscores. 2023-02-14 12:08:32 -08:00
Simon Forman 9c355166b6 Bring error message inline with other implementations. 2023-02-14 12:07:58 -08:00
Simon Forman 21ac1f1f63 Ignore some stuff. 2023-02-14 10:26:33 -08:00
Simon Forman 5ce30d41c3 Regularize defs.txt.
All three main interpreters use the same defs.txt file.
2023-02-14 10:23:23 -08:00
Simon Forman 2700ab8a7f Aliases for builtins in Python Joy. 2023-02-14 10:19:03 -08:00
Simon Forman 178e58f8bd Load embedded defs.txt, remove ≡ stuff.
I like that ≡ but I also like consistency.
2023-02-14 10:07:26 -08:00
Simon Forman 25c48e059b Splice defs.txt into joy.py to make "joy" script. 2023-02-14 09:52:01 -08:00
Simon Forman ae77bbda24 Move all the bigints code into own dir. 2023-02-14 08:48:08 -08:00
Simon Forman e771e0182b Make /\ and \/ check that their args are Booleans. 2023-02-14 08:40:32 -08:00
Simon Forman ad0f135376 Don't let defs shadow builtins. 2023-02-14 08:39:52 -08:00
Simon Forman f0c94aeed8 regularize defs.txt; new andies.
I made a crude facility in the C impl for excluding definitions that
would replace built-in commands.  This should be improved, eh?

I also started on renameing the logical Boolean ops
https://todo.sr.ht/~sforman/thun-der/29
2023-02-14 08:27:17 -08:00
Simon Forman f37ef42cb4 Note to self...
This bit of code works, but I'm not sure why, or even if it's just an
illusion of working, and here lurks a nasty bug?
2023-02-14 07:56:52 -08:00
Simon Forman 19890e5695 Minor edits. 2023-02-14 07:56:27 -08:00
Simon Forman ca54198e58 Updating the README a little. 2023-02-14 07:55:58 -08:00