OSDN Git Service
Simon Forman [Sat, 4 Feb 2023 19:27:03 +0000 (11:27 -0800)]
Boolean singleton values.
Simon Forman [Sat, 4 Feb 2023 18:25:14 +0000 (10:25 -0800)]
Boolean singleton values.
Simon Forman [Sat, 4 Feb 2023 16:12:30 +0000 (08:12 -0800)]
Node head is pointer now.
Simon Forman [Sat, 4 Feb 2023 15:55:11 +0000 (07:55 -0800)]
JoyListPtr too
Simon Forman [Sat, 4 Feb 2023 15:52:36 +0000 (07:52 -0800)]
Use JoyListPtr.
Simon Forman [Sat, 4 Feb 2023 03:38:18 +0000 (19:38 -0800)]
sub and mul through judicious (I hope) use of macros.
Simon Forman [Fri, 3 Feb 2023 23:46:52 +0000 (15:46 -0800)]
pop_any(), pop_int(), and add
Simon Forman [Fri, 3 Feb 2023 19:48:32 +0000 (11:48 -0800)]
Interpret symbols.
C has function pointers, we can put them in the Gperf wordlist, this
makes the interpreter really simple. No need for a dictionary (yet).
Implementing the basis functions will be a bit of a slog, and
I still have to implement definitions, but this is starting to shape up
nicely.
Simon Forman [Fri, 3 Feb 2023 17:39:02 +0000 (09:39 -0800)]
Yet more minor cleanup.
Simon Forman [Fri, 3 Feb 2023 17:30:11 +0000 (09:30 -0800)]
More minor cleanup.
Simon Forman [Fri, 3 Feb 2023 17:27:30 +0000 (09:27 -0800)]
Minor cleanup.
Simon Forman [Fri, 3 Feb 2023 17:18:32 +0000 (09:18 -0800)]
newJoyList
Simon Forman [Fri, 3 Feb 2023 16:13:57 +0000 (08:13 -0800)]
Can haz function pointers in my worldist.
Simon Forman [Fri, 3 Feb 2023 04:45:28 +0000 (20:45 -0800)]
typedef for the win!
Simon Forman [Fri, 3 Feb 2023 01:02:55 +0000 (17:02 -0800)]
make clean rule
Simon Forman [Fri, 3 Feb 2023 00:58:44 +0000 (16:58 -0800)]
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!)
Simon Forman [Fri, 3 Feb 2023 00:14:11 +0000 (16:14 -0800)]
Ignore object files.
Simon Forman [Fri, 3 Feb 2023 00:13:15 +0000 (16:13 -0800)]
minor cleanup
Simon Forman [Fri, 3 Feb 2023 00:12:59 +0000 (16:12 -0800)]
Gperf.
Simon Forman [Thu, 2 Feb 2023 21:22:11 +0000 (13:22 -0800)]
Minor cleanup.
Simon Forman [Thu, 2 Feb 2023 21:06:07 +0000 (13:06 -0800)]
True and False values.
Simon Forman [Thu, 2 Feb 2023 19:14:58 +0000 (11:14 -0800)]
Copyright, etc.
Simon Forman [Thu, 2 Feb 2023 18:58:03 +0000 (10:58 -0800)]
Fix bug with no trailing spaces.
Gotta update that pointer, eh?
Simon Forman [Thu, 2 Feb 2023 16:52:27 +0000 (08:52 -0800)]
I was post-incrementing when I should have been pre-incrementing!
D'oh!
Simon Forman [Thu, 2 Feb 2023 16:36:13 +0000 (08:36 -0800)]
Simple terms work. Problem is with sub-lists.
Simon Forman [Thu, 2 Feb 2023 16:32:45 +0000 (08:32 -0800)]
Parsing isn't this hard?
Simon Forman [Thu, 2 Feb 2023 04:36:18 +0000 (20:36 -0800)]
Um, don't do that.
I wonder where the data was winding up?
Simon Forman [Thu, 2 Feb 2023 04:34:49 +0000 (20:34 -0800)]
Minor cleanup.
Simon Forman [Thu, 2 Feb 2023 04:34:04 +0000 (20:34 -0800)]
Remove separate parser code.
Simon Forman [Thu, 2 Feb 2023 04:33:04 +0000 (20:33 -0800)]
Print true, false, and lists.
Simon Forman [Thu, 2 Feb 2023 04:28:24 +0000 (20:28 -0800)]
Print ints.
Simon Forman [Thu, 2 Feb 2023 04:09:03 +0000 (20:09 -0800)]
Print list.
Simon Forman [Thu, 2 Feb 2023 03:26:50 +0000 (19:26 -0800)]
Text to expr coming along.
Simon Forman [Thu, 2 Feb 2023 02:37:10 +0000 (18:37 -0800)]
Need to be able to store a string.
Simon Forman [Thu, 2 Feb 2023 02:35:11 +0000 (18:35 -0800)]
Minor cleanup.
Simon Forman [Thu, 2 Feb 2023 01:39:37 +0000 (17:39 -0800)]
Minor cleanup.
Don't pass NULL to strpbrk().
Simon Forman [Thu, 2 Feb 2023 01:25:54 +0000 (17:25 -0800)]
Handle stretches of blanks.
Don't create zero-length strings.
Simon Forman [Thu, 2 Feb 2023 01:17:35 +0000 (17:17 -0800)]
Nice skeleton of parser.
Simon Forman [Thu, 2 Feb 2023 00:57:46 +0000 (16:57 -0800)]
Almost there on parsing.
Simon Forman [Thu, 2 Feb 2023 00:40:14 +0000 (16:40 -0800)]
trim_leading_blanks
Simon Forman [Thu, 2 Feb 2023 00:02:19 +0000 (16:02 -0800)]
Let's parse.
Simon Forman [Wed, 1 Feb 2023 23:26:07 +0000 (15:26 -0800)]
Don't version the binary.
Simon Forman [Wed, 1 Feb 2023 23:25:21 +0000 (15:25 -0800)]
I think I'm doing this right?
Simon Forman [Wed, 1 Feb 2023 22:56:11 +0000 (14:56 -0800)]
minor style glitch
Simon Forman [Wed, 1 Feb 2023 22:55:21 +0000 (14:55 -0800)]
Minor cleanup.
Simon Forman [Wed, 1 Feb 2023 22:54:07 +0000 (14:54 -0800)]
Some notebooks.
Simon Forman [Wed, 1 Feb 2023 22:23:54 +0000 (14:23 -0800)]
Messing around with C.
Simon Forman [Tue, 18 Oct 2022 00:51:12 +0000 (17:51 -0700)]
Readline support would be nice.
Simon Forman [Sun, 16 Oct 2022 03:04:27 +0000 (20:04 -0700)]
This and that.
Simon Forman [Sat, 15 Oct 2022 18:05:17 +0000 (11:05 -0700)]
Cleanup and refactoring.
Bug when subtracting identical numbers. It gives
[false 0]
When it should be
[false]
or better yet
[true]
eh?
Simon Forman [Sat, 15 Oct 2022 16:52:58 +0000 (09:52 -0700)]
That seems to work: addition and subtraction.
Simon Forman [Sat, 15 Oct 2022 04:01:18 +0000 (21:01 -0700)]
Mostly done with addition and subtraction.
Simon Forman [Sat, 15 Oct 2022 03:36:50 +0000 (20:36 -0700)]
Not quite as smooth as I'd hoped.
Simon Forman [Sat, 15 Oct 2022 00:52:31 +0000 (17:52 -0700)]
Subtraction seems to work now.
Simon Forman [Fri, 14 Oct 2022 06:10:41 +0000 (23:10 -0700)]
Progress.
Simon Forman [Tue, 11 Oct 2022 18:37:38 +0000 (11:37 -0700)]
Adding like-sign bigints in Joy.
Simon Forman [Tue, 11 Oct 2022 05:28:50 +0000 (22:28 -0700)]
Misc stuff.
Simon Forman [Tue, 11 Oct 2022 05:23:19 +0000 (22:23 -0700)]
Minor cleanup.
Simon Forman [Tue, 11 Oct 2022 03:32:57 +0000 (20:32 -0700)]
Add two lists of digits.
Simon Forman [Tue, 11 Oct 2022 03:26:59 +0000 (20:26 -0700)]
I think I got it.
Whew! Think slow and steady FTW. Don't get ahead of yourself. Put the
non-recursive parts in the non-recursive branch, duh.
Simon Forman [Tue, 11 Oct 2022 01:39:35 +0000 (18:39 -0700)]
Dang it...
Simon Forman [Fri, 7 Oct 2022 01:11:24 +0000 (18:11 -0700)]
Minor cleanup.
Simon Forman [Thu, 6 Oct 2022 22:36:16 +0000 (15:36 -0700)]
Just for me...
(That's how you look all clever, but it's a dick move removing the
commentary like that.)
Simon Forman [Thu, 6 Oct 2022 22:34:34 +0000 (15:34 -0700)]
Bisect for the win!
Simon Forman [Thu, 6 Oct 2022 22:31:24 +0000 (15:31 -0700)]
find_greatest()
I think it's ready to use...
Simon Forman [Thu, 6 Oct 2022 15:04:54 +0000 (08:04 -0700)]
Finish lil_divmod.
Simon Forman [Wed, 5 Oct 2022 19:31:35 +0000 (12:31 -0700)]
One more lil bug squash.
Subsidiary functions...
Fuzz FTW.
Simon Forman [Wed, 5 Oct 2022 19:21:46 +0000 (12:21 -0700)]
Div Mod of same sign ints.
That seems to be that.
Simon Forman [Wed, 5 Oct 2022 19:19:39 +0000 (12:19 -0700)]
Flush out and squash some bugs.
Simon Forman [Wed, 5 Oct 2022 17:16:47 +0000 (10:16 -0700)]
I think I figured something out...
Simon Forman [Wed, 5 Oct 2022 16:15:41 +0000 (09:15 -0700)]
Kinda sorta not really working,
as in broken.
This is getting out of hand.
Simon Forman [Wed, 5 Oct 2022 15:49:35 +0000 (08:49 -0700)]
Almost got it...
Simon Forman [Wed, 5 Oct 2022 15:27:01 +0000 (08:27 -0700)]
Divmod, yeah?
Simon Forman [Wed, 5 Oct 2022 05:21:58 +0000 (22:21 -0700)]
Minor cleanup.
I almost can't believe I did it. I guess I thought it would be harder
or more involved. Maybe divmod will be a pill?
Kinda relaxing after wasting the weekend nerd-sniped by curses.
Simon Forman [Wed, 5 Oct 2022 05:19:14 +0000 (22:19 -0700)]
Copyright and executable bit
Simon Forman [Wed, 5 Oct 2022 05:18:22 +0000 (22:18 -0700)]
Minor cleanup.
Simon Forman [Wed, 5 Oct 2022 05:06:49 +0000 (22:06 -0700)]
Minor cleanup; multiplication.
I forgot to commit after cleanup but before implementing multiplication
so this commit is kind of a mess.
Anyway, it works. :D
Simon Forman [Tue, 4 Oct 2022 23:41:09 +0000 (16:41 -0700)]
test_Subtraction_large_from_small
Simon Forman [Tue, 4 Oct 2022 23:28:43 +0000 (16:28 -0700)]
I guess subtraction works!?
Simon Forman [Tue, 4 Oct 2022 19:10:32 +0000 (12:10 -0700)]
Adding two negative numbers.
Simon Forman [Tue, 4 Oct 2022 19:05:41 +0000 (12:05 -0700)]
That was easy! Add BigInts of the same sign.
Simon Forman [Tue, 4 Oct 2022 18:37:55 +0000 (11:37 -0700)]
Red... (Green, Refactor)
TDD FTW!
Simon Forman [Tue, 4 Oct 2022 18:31:40 +0000 (11:31 -0700)]
Not using ctypes; test_twice_min
Simon Forman [Tue, 4 Oct 2022 18:21:07 +0000 (11:21 -0700)]
Minor cleanup.
Simon Forman [Tue, 4 Oct 2022 18:20:55 +0000 (11:20 -0700)]
Fix import.
Simon Forman [Tue, 4 Oct 2022 18:20:14 +0000 (11:20 -0700)]
BitInt start; unittest.
Simon Forman [Tue, 4 Oct 2022 15:53:32 +0000 (08:53 -0700)]
That was easy...
but it breaks associativity or is it commutivity?
Anyway you can't add THREE or more things in one expression (yet)
because adding OberonInt objects returns a two-tuple.
I could adjust the semantics of ObInt to accept such two-tuples and do
add_with_carry() but that's probably more trouble than it's worth.
Just gotta be careful with math expressions, eh?
Simon Forman [Tue, 4 Oct 2022 15:49:40 +0000 (08:49 -0700)]
Switch to double-underscore method names.
Worry about type conversions later.
Simon Forman [Tue, 4 Oct 2022 15:47:39 +0000 (08:47 -0700)]
Subtraction.
Simon Forman [Tue, 4 Oct 2022 15:32:04 +0000 (08:32 -0700)]
BigInts in terms of Oberon Ints
Oberon RISC has Two's Complement 32-bit ints with carry.
So far so good.
Simon Forman [Thu, 29 Sep 2022 05:07:28 +0000 (22:07 -0700)]
Minor cleanup.
Simon Forman [Thu, 29 Sep 2022 04:56:53 +0000 (21:56 -0700)]
Minor cleanup.
Functional Programming FTW!
Simon Forman [Thu, 29 Sep 2022 04:22:19 +0000 (21:22 -0700)]
Apparently this is redundant.
Discovered by running `nim doc joy.nim`, compiling doesn't flag it.
Simon Forman [Thu, 29 Sep 2022 01:28:25 +0000 (18:28 -0700)]
Clear out old docs; update defs.txt.
Simon Forman [Thu, 29 Sep 2022 01:21:13 +0000 (18:21 -0700)]
I had to model it in Python
before writing it in OCaml.
Simon Forman [Thu, 29 Sep 2022 01:18:20 +0000 (18:18 -0700)]
Improve compiling of step combinator.
Simon Forman [Thu, 29 Sep 2022 01:16:45 +0000 (18:16 -0700)]
Initial outline for a talk on Joy.
Simon Forman [Sun, 25 Sep 2022 04:19:35 +0000 (21:19 -0700)]
coms, swap
Simon Forman [Sun, 25 Sep 2022 04:00:26 +0000 (21:00 -0700)]
Comparison operations.
Simon Forman [Sun, 25 Sep 2022 03:45:06 +0000 (20:45 -0700)]
branch, dip, i, loop
The core combinators (except fork).