sforman
787dc6a7b3
Nerd Sniped
2023-10-09 11:44:13 -07:00
sforman
e956e177f6
Rebuilt C.
2023-08-30 19:57:57 -07:00
sforman
a107e1df6c
Rebuilt C interpreter.
2023-08-21 09:53:24 -07:00
sforman
5585ae5d31
_isnt_bool _isnt_two_bools
...
These probably won't last?
2023-08-02 09:06:11 -07:00
Simon Forman
f194df8159
How would you compile this?
...
fn [+] step
2023-02-19 17:43:18 -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
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
eb38a7e817
fdiv
...
This is why you compile and run tests /before/ you commit changes, eh?
2023-02-12 16:04:37 -08:00
Simon Forman
acfa19239e
null, small
...
https://todo.sr.ht/~sforman/thun-der/23
2023-02-09 10:58:08 -08:00
Simon Forman
101a0241d3
and, or (Boolean ops).
...
"not not" serves as a kind of type-checking identity function. "not"
will error out on non-Boolean values, or the absence of a second arg.
2023-02-09 07:52:50 -08:00
Simon Forman
66f47f8e36
divmod, xor
2023-02-09 06:59:39 -08:00
Simon Forman
35d8ed498f
User definitions with the inscribe command.
...
Using uthash http://troydhanson.github.io/uthash/index.html
2023-02-08 21:13:23 -08:00
Simon Forman
b1d7a34eab
unstack
2023-02-08 15:06:12 -08:00
Simon Forman
2be2d00e6b
Handle definitions with non-alphanumeric chars in their names.
2023-02-08 12:50:23 -08:00
Simon Forman
efd77a2ffd
Aliases can be put in KEYWORDS.in
...
This avoids the overhead of single-functions definitions for aliases.
2023-02-07 19:14:37 -08:00
Simon Forman
b57cfdf825
Track KEYWORDS.txt after all.
2023-02-06 13:14:14 -08:00
Simon Forman
0611aa3c05
Clean KEYWORDS.txt too.
2023-02-05 20:48:19 -08:00
Simon Forman
3a11fcb834
loop
...
But it's pretty inefficient, eh?
2023-02-05 18:43:05 -08:00
Simon Forman
26a733f720
first, rest
2023-02-05 17:40:26 -08:00
Simon Forman
8bda5d511a
Auto-generate defintions from defs.txt
...
But it doesn't yet handle names with non-C-indentifier characters in
them.
2023-02-05 13:50:16 -08:00
Simon Forman
291b6caa75
Generate definitions.h; swons
2023-02-05 13:38:59 -08:00
Simon Forman
a9e4f93cdc
concat
2023-02-05 11:00:22 -08:00
Simon Forman
6ee3226a88
swap
2023-02-05 10:27:17 -08:00
Simon Forman
09e9e340a5
stack
2023-02-05 10:00:18 -08:00
Simon Forman
8f4c98a051
swaack
2023-02-05 09:54:52 -08:00
Simon Forman
9563f738bd
pop
2023-02-05 09:50:41 -08:00
Simon Forman
3d0b5ba266
cons
2023-02-05 09:40:47 -08:00
Simon Forman
fe4ce60541
dip
2023-02-05 08:49:05 -08:00
Simon Forman
f34b4547a5
dup
2023-02-05 08:37:13 -08:00
Simon Forman
7874496090
Definitions.
...
There are things to like about this implementation and things to
dislike.
Things to like:
- It works.
- The defs are baked into the wordlist.
Cons:
- The def bodies are built at start time by parsing strings. it would
be nice to somehow generate initializer literals if possible. But
would that mess up the garbage collector?
- It requires manual labor to update the defs when defs.txt changes. It
would be nice to have a solution that *make* can use.
2023-02-04 23:08:39 -08:00
Simon Forman
6159165acd
div and mod
2023-02-04 19:34:38 -08:00
Simon Forman
21f99aac96
i combinator.
2023-02-04 19:05:26 -08:00
Simon Forman
45865acc2f
Cmp, comes with GMP.
2023-02-04 12:47:45 -08:00
Simon Forman
fb40b11fb0
Can haz function pointers in my worldist.
2023-02-03 08:13:57 -08:00
Simon Forman
4be1cc5767
Use gperf to save memory.
...
We check terms to see if they're in the wordlist, if they are we reuse
the string from the wordlist instead of allocating a new one.
(I've always wanted to use Gperf so I'm pretty stoked about this!)
2023-02-02 16:58:44 -08:00
Simon Forman
a2a18a1d05
Gperf.
2023-02-02 16:12:59 -08:00