OSDN Git Service
Simon Forman [Mon, 19 Sep 2022 20:25:09 +0000 (13:25 -0700)]
Minor cleanup.
Simon Forman [Mon, 19 Sep 2022 20:22:31 +0000 (13:22 -0700)]
Add a flowchart for the interpreter.
Using PlantUML.
Simon Forman [Sat, 17 Sep 2022 03:49:46 +0000 (20:49 -0700)]
Fixed bug in appN
while updating some Jupyter notebooks with the Joypy kernel.
Simon Forman [Sat, 17 Sep 2022 00:54:42 +0000 (17:54 -0700)]
Remove old docs.
Simon Forman [Fri, 16 Sep 2022 19:28:13 +0000 (12:28 -0700)]
A bit more docs.
Simon Forman [Fri, 16 Sep 2022 18:27:00 +0000 (11:27 -0700)]
Got back the LI for lower-cased title notebooks.
Not sure what went wrong there.
Simon Forman [Fri, 16 Sep 2022 18:06:30 +0000 (11:06 -0700)]
Whence fun_with_scan and with_sympy?
Simon Forman [Fri, 16 Sep 2022 16:03:42 +0000 (09:03 -0700)]
Cleaning up docs.
Kinda...
Simon Forman [Fri, 16 Sep 2022 14:36:28 +0000 (07:36 -0700)]
The (crude) site.
It's funny that I'm using nbconvert, markdown, pandoc, tidy, and of
course python, all to make a simple static website...
"There's got to be a better way!"
Simon Forman [Fri, 16 Sep 2022 14:35:11 +0000 (07:35 -0700)]
Function Reference
Simon Forman [Fri, 16 Sep 2022 02:17:56 +0000 (19:17 -0700)]
bits and pieces
Simon Forman [Fri, 16 Sep 2022 01:14:01 +0000 (18:14 -0700)]
Rework docs, simpler (no Sphinx.)
Simon Forman [Fri, 16 Sep 2022 01:11:16 +0000 (18:11 -0700)]
delete all the extra notebook conversions
Simon Forman [Thu, 15 Sep 2022 16:34:39 +0000 (09:34 -0700)]
Ignore the Nim joy binary.
Simon Forman [Thu, 15 Sep 2022 04:09:20 +0000 (21:09 -0700)]
Check for minus before converting to int.
BigInts converts "-" to 0. This happens in the parser before you get to
the evaluator.
Simon Forman [Thu, 15 Sep 2022 04:01:50 +0000 (21:01 -0700)]
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
Simon Forman [Thu, 15 Sep 2022 03:15:25 +0000 (20:15 -0700)]
Let simplejoy be joy.
Simple pleasures are the best.
Simon Forman [Thu, 15 Sep 2022 03:14:34 +0000 (20:14 -0700)]
Remove old code.
Simon Forman [Thu, 15 Sep 2022 03:08:40 +0000 (20:08 -0700)]
Read defs.txt at compile-time.
I'd like to build the dict datastructure at compile-time too but I'm not
going to figure that out tonight. It's enough that the defs are
embedded in the executable. (You can see them with the strings utility.)
Simon Forman [Thu, 15 Sep 2022 01:51:58 +0000 (18:51 -0700)]
basis complete
Simon Forman [Wed, 14 Sep 2022 22:48:25 +0000 (15:48 -0700)]
dup, first, i, loop
Simon Forman [Wed, 14 Sep 2022 22:04:07 +0000 (15:04 -0700)]
dip and cons
Simon Forman [Wed, 14 Sep 2022 21:36:29 +0000 (14:36 -0700)]
Rewrite expression to use list instead of list node.
Simon Forman [Wed, 14 Sep 2022 20:31:44 +0000 (13:31 -0700)]
Minor cleanup.
Simon Forman [Wed, 14 Sep 2022 18:24:56 +0000 (11:24 -0700)]
Reuse as_list().
Simon Forman [Wed, 14 Sep 2022 17:49:13 +0000 (10:49 -0700)]
Cleaning up the code.
Simon Forman [Wed, 14 Sep 2022 16:49:33 +0000 (09:49 -0700)]
Nimpretty reformat. Two-space indentation.
Simon Forman [Wed, 14 Sep 2022 16:46:31 +0000 (09:46 -0700)]
Minor cleanup
Simon Forman [Wed, 14 Sep 2022 16:45:34 +0000 (09:45 -0700)]
Let's pile Nim code into one file too, why not?
Simon Forman [Mon, 12 Sep 2022 23:38:14 +0000 (16:38 -0700)]
divmod
We don't need floor if we have only ints.
Id is too easy as a definition.
divmod is cool.
Simon Forman [Mon, 12 Sep 2022 23:07:21 +0000 (16:07 -0700)]
step, times
Simon Forman [Mon, 12 Sep 2022 22:17:32 +0000 (15:17 -0700)]
dipd, dipdd, cmp
Simon Forman [Mon, 12 Sep 2022 20:50:40 +0000 (13:50 -0700)]
cond
Simon Forman [Mon, 12 Sep 2022 20:50:07 +0000 (13:50 -0700)]
updated defs via make
Simon Forman [Mon, 12 Sep 2022 20:49:38 +0000 (13:49 -0700)]
dunno what that was
Simon Forman [Sun, 11 Sep 2022 21:07:55 +0000 (14:07 -0700)]
Bringing over some of the "upgrades". 2
Simon Forman [Sun, 11 Sep 2022 20:57:19 +0000 (13:57 -0700)]
Bringing over some of the "upgrades".
Simon Forman [Sun, 11 Sep 2022 18:46:10 +0000 (11:46 -0700)]
id func
Simon Forman [Sun, 11 Sep 2022 18:44:48 +0000 (11:44 -0700)]
clearing out cruft
Simon Forman [Sun, 11 Sep 2022 16:33:50 +0000 (09:33 -0700)]
minor cleanup
Simon Forman [Sun, 11 Sep 2022 16:03:58 +0000 (09:03 -0700)]
Put definitions in the docstring.
Why not? ¯\_(ツ)_/¯
Simon Forman [Sun, 11 Sep 2022 15:57:45 +0000 (08:57 -0700)]
Model expr as stack-of-stacks, minor cleanup.
Simon Forman [Sun, 11 Sep 2022 00:42:38 +0000 (17:42 -0700)]
Don't bother to return the expression.
We mutate it instead of replacing it with new versions.
Simon Forman [Sun, 11 Sep 2022 00:37:07 +0000 (17:37 -0700)]
Cleaner iteration of expression.
It's a destructive operation. It breaks functional purity (but it could
be made functional by using a stack instead of a list for the stack.)
There's no point to returning the expression object now because it's
being mutated by the prepend() method (rather than being replaced by new
forms.)
Simon Forman [Sun, 11 Sep 2022 00:31:56 +0000 (17:31 -0700)]
over
This slipped through the cracks, eh? Should add a test to joytest.
Simon Forman [Sun, 11 Sep 2022 00:22:37 +0000 (17:22 -0700)]
No point in a separate _parse() function.
Simon Forman [Sun, 11 Sep 2022 00:08:46 +0000 (17:08 -0700)]
Simpler tokenizer.
Once the syntax was simple enough the re.Scanner became overkill.
From
http://norvig.com/lispy.html
by way of
https://github.com/ckkashyap/s2c
Simon Forman [Fri, 9 Sep 2022 18:58:35 +0000 (11:58 -0700)]
A bit more docs.
Simon Forman [Fri, 9 Sep 2022 03:59:12 +0000 (20:59 -0700)]
Move ParseError to parser section; add a few type guards.
Simon Forman [Thu, 8 Sep 2022 21:25:02 +0000 (14:25 -0700)]
Minor cleanup.
Simon Forman [Thu, 8 Sep 2022 18:31:09 +0000 (11:31 -0700)]
Expression objects.
This should be more efficient than concat().
Simon Forman [Thu, 8 Sep 2022 17:37:46 +0000 (10:37 -0700)]
blacken
Simon Forman [Thu, 8 Sep 2022 16:06:11 +0000 (09:06 -0700)]
move stack code up under interp & minor edits
Simon Forman [Thu, 8 Sep 2022 15:46:34 +0000 (08:46 -0700)]
make type checks into Joy functions
Simon Forman [Thu, 8 Sep 2022 15:27:47 +0000 (08:27 -0700)]
move type checks and exceptions to bottom
Simon Forman [Thu, 8 Sep 2022 06:43:50 +0000 (23:43 -0700)]
minor cleanup
Simon Forman [Thu, 8 Sep 2022 05:23:23 +0000 (22:23 -0700)]
Remove debug session.
Simon Forman [Thu, 8 Sep 2022 04:15:09 +0000 (21:15 -0700)]
That doesn't go there.
Simon Forman [Thu, 8 Sep 2022 04:01:07 +0000 (21:01 -0700)]
Minor cleanup.
Simon Forman [Thu, 8 Sep 2022 03:42:48 +0000 (20:42 -0700)]
halt and quit
halt captures the rest of the pending expression and stops evaluating,
but the interpreter loop keeps running.
quit ends the interpreter session and quits the Thun program.
Simon Forman [Thu, 8 Sep 2022 03:33:13 +0000 (20:33 -0700)]
Passes (updated) tests.
https://git.sr.ht/~sforman/joytest
Simon Forman [Thu, 8 Sep 2022 02:39:00 +0000 (19:39 -0700)]
Harden up the types.
Simon Forman [Thu, 8 Sep 2022 00:27:36 +0000 (17:27 -0700)]
Quiet mode for testing. Misc cleanup.
Simon Forman [Wed, 7 Sep 2022 21:46:26 +0000 (14:46 -0700)]
Just put ≡ inline.
Simon Forman [Wed, 7 Sep 2022 21:21:33 +0000 (14:21 -0700)]
Blacken the code.
Simon Forman [Wed, 7 Sep 2022 21:18:55 +0000 (14:18 -0700)]
Type-guard the ops.
Simon Forman [Wed, 7 Sep 2022 20:13:46 +0000 (13:13 -0700)]
Words and Help; use ≡ for definitions.
By using ≡ for definitions I can put docs in the DEFS string and easily
detect definitions by having them be each on their own line.
Simon Forman [Wed, 7 Sep 2022 18:57:57 +0000 (11:57 -0700)]
It's a script.
Simon Forman [Wed, 7 Sep 2022 18:54:29 +0000 (11:54 -0700)]
More docstrings.
Simon Forman [Wed, 7 Sep 2022 18:46:59 +0000 (11:46 -0700)]
Docstrings.
Simon Forman [Wed, 7 Sep 2022 18:18:08 +0000 (11:18 -0700)]
Pylint is kind useless on this one.
Simon Forman [Wed, 7 Sep 2022 18:13:12 +0000 (11:13 -0700)]
Boolean literals.
Simon Forman [Wed, 7 Sep 2022 17:42:20 +0000 (10:42 -0700)]
Docs (and strip trailing blanks.)
Simon Forman [Wed, 7 Sep 2022 16:41:08 +0000 (09:41 -0700)]
Blacken the code (simplejoy.py)
I don't like it entirely but that's the point: nevermind your taste,
just use a simple and universal (Ha!) standard format(ter) and get on
with your life.
Simon Forman [Wed, 7 Sep 2022 16:28:30 +0000 (09:28 -0700)]
Misc cruft.
Simon Forman [Wed, 7 Sep 2022 16:24:20 +0000 (09:24 -0700)]
Remove rust impl.
GitHub nagged me about some vuln in RE package or something?
https://github.com/calroc/Thun/security/dependabot/1
Simon Forman [Wed, 7 Sep 2022 16:23:02 +0000 (09:23 -0700)]
Simple Joy
Simon Forman [Tue, 6 Sep 2022 21:33:51 +0000 (14:33 -0700)]
Remove psaces from some filenames.
Simon Forman [Tue, 16 Aug 2022 22:26:07 +0000 (15:26 -0700)]
Rebuild HTML docs.
Simon Forman [Tue, 16 Aug 2022 00:33:34 +0000 (17:33 -0700)]
A good talk.
Simon Forman [Mon, 15 Aug 2022 23:20:59 +0000 (16:20 -0700)]
Minor edits.
Simon Forman [Tue, 5 Apr 2022 18:15:34 +0000 (11:15 -0700)]
Need to keep definition for ucons around
the Nim implementation has first and rest but not uncons.
Simon Forman [Tue, 5 Apr 2022 17:06:40 +0000 (10:06 -0700)]
uncons as basis
- clear deletes stack at once, not in a loop
- make uncons basis and define first and rest in tems of it
Simon Forman [Tue, 5 Apr 2022 17:02:01 +0000 (10:02 -0700)]
Two wrappers
One for math ops, the other for Boolean.
Fixes: https://todo.sr.ht/~sforman/thun-der/13
Simon Forman [Mon, 4 Apr 2022 16:09:01 +0000 (09:09 -0700)]
Minor cleanup.
Simon Forman [Mon, 4 Apr 2022 15:01:51 +0000 (08:01 -0700)]
Start a per-project README for Python.
Simon Forman [Mon, 4 Apr 2022 15:00:09 +0000 (08:00 -0700)]
Start to update README
Simon Forman [Mon, 4 Apr 2022 14:58:22 +0000 (07:58 -0700)]
Expression?
Simon Forman [Thu, 31 Mar 2022 17:10:22 +0000 (10:10 -0700)]
Rebuild HTML docs.
Simon Forman [Wed, 30 Mar 2022 19:12:19 +0000 (12:12 -0700)]
Sidebar links should be a little farther apart.
Simon Forman [Wed, 30 Mar 2022 19:11:20 +0000 (12:11 -0700)]
I want to override some CSS.
The links on the sidebar are too close together.
Simon Forman [Tue, 29 Mar 2022 22:11:19 +0000 (15:11 -0700)]
And the rest.
Whew! Glad that's done.
Simon Forman [Tue, 29 Mar 2022 19:57:41 +0000 (12:57 -0700)]
T's and U's.
Simon Forman [Tue, 29 Mar 2022 15:50:48 +0000 (08:50 -0700)]
The rest of the S's.
Simon Forman [Tue, 29 Mar 2022 01:39:42 +0000 (18:39 -0700)]
Q, R's and some S's.
Simon Forman [Sun, 27 Mar 2022 20:04:42 +0000 (13:04 -0700)]
And there are the P's.
Simon Forman [Sun, 27 Mar 2022 19:01:37 +0000 (12:01 -0700)]
The O's.
Simon Forman [Sun, 27 Mar 2022 18:11:20 +0000 (11:11 -0700)]
The N's.
Simon Forman [Sun, 27 Mar 2022 18:03:57 +0000 (11:03 -0700)]
Covered by EXCLAMATION-MARK•HYPHEN-MINUS.md
Simon Forman [Sun, 27 Mar 2022 17:52:17 +0000 (10:52 -0700)]
The M's.