OSDN Git Service

joypy/Thun.git
22 months agoMinor cleanup.
Simon Forman [Mon, 19 Sep 2022 20:25:09 +0000 (13:25 -0700)]
Minor cleanup.

22 months agoAdd a flowchart for the interpreter.
Simon Forman [Mon, 19 Sep 2022 20:22:31 +0000 (13:22 -0700)]
Add a flowchart for the interpreter.

Using PlantUML.

22 months agoFixed bug in appN
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.

22 months agoRemove old docs.
Simon Forman [Sat, 17 Sep 2022 00:54:42 +0000 (17:54 -0700)]
Remove old docs.

22 months agoA bit more docs.
Simon Forman [Fri, 16 Sep 2022 19:28:13 +0000 (12:28 -0700)]
A bit more docs.

22 months agoGot back the LI for lower-cased title notebooks.
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.

22 months agoWhence fun_with_scan and with_sympy?
Simon Forman [Fri, 16 Sep 2022 18:06:30 +0000 (11:06 -0700)]
Whence fun_with_scan and with_sympy?

22 months agoCleaning up docs.
Simon Forman [Fri, 16 Sep 2022 16:03:42 +0000 (09:03 -0700)]
Cleaning up docs.

Kinda...

22 months agoThe (crude) site.
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!"

22 months agoFunction Reference
Simon Forman [Fri, 16 Sep 2022 14:35:11 +0000 (07:35 -0700)]
Function Reference

22 months ago bits and pieces
Simon Forman [Fri, 16 Sep 2022 02:17:56 +0000 (19:17 -0700)]
 bits and pieces

22 months agoRework docs, simpler (no Sphinx.)
Simon Forman [Fri, 16 Sep 2022 01:14:01 +0000 (18:14 -0700)]
Rework docs, simpler (no Sphinx.)

22 months agodelete all the extra notebook conversions
Simon Forman [Fri, 16 Sep 2022 01:11:16 +0000 (18:11 -0700)]
delete all the extra notebook conversions

22 months agoIgnore the Nim joy binary.
Simon Forman [Thu, 15 Sep 2022 16:34:39 +0000 (09:34 -0700)]
Ignore the Nim joy binary.

22 months agoCheck for minus before converting to int.
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.

22 months agoMinor cleanup, subtraction.
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

22 months agoLet simplejoy be joy.
Simon Forman [Thu, 15 Sep 2022 03:15:25 +0000 (20:15 -0700)]
Let simplejoy be joy.

Simple pleasures are the best.

22 months agoRemove old code.
Simon Forman [Thu, 15 Sep 2022 03:14:34 +0000 (20:14 -0700)]
Remove old code.

22 months agoRead defs.txt at compile-time.
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.)

22 months agobasis complete
Simon Forman [Thu, 15 Sep 2022 01:51:58 +0000 (18:51 -0700)]
basis complete

22 months agodup, first, i, loop
Simon Forman [Wed, 14 Sep 2022 22:48:25 +0000 (15:48 -0700)]
dup, first, i, loop

22 months agodip and cons
Simon Forman [Wed, 14 Sep 2022 22:04:07 +0000 (15:04 -0700)]
dip and cons

22 months agoRewrite expression to use list instead of list node.
Simon Forman [Wed, 14 Sep 2022 21:36:29 +0000 (14:36 -0700)]
Rewrite expression to use list instead of list node.

22 months agoMinor cleanup.
Simon Forman [Wed, 14 Sep 2022 20:31:44 +0000 (13:31 -0700)]
Minor cleanup.

22 months agoReuse as_list().
Simon Forman [Wed, 14 Sep 2022 18:24:56 +0000 (11:24 -0700)]
Reuse as_list().

22 months agoCleaning up the code.
Simon Forman [Wed, 14 Sep 2022 17:49:13 +0000 (10:49 -0700)]
Cleaning up the code.

22 months agoNimpretty reformat. Two-space indentation.
Simon Forman [Wed, 14 Sep 2022 16:49:33 +0000 (09:49 -0700)]
Nimpretty reformat.  Two-space indentation.

22 months agoMinor cleanup
Simon Forman [Wed, 14 Sep 2022 16:46:31 +0000 (09:46 -0700)]
Minor cleanup

22 months agoLet's pile Nim code into one file too, why not?
Simon Forman [Wed, 14 Sep 2022 16:45:34 +0000 (09:45 -0700)]
Let's pile Nim code into one file too, why not?

22 months agodivmod
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.

22 months agostep, times
Simon Forman [Mon, 12 Sep 2022 23:07:21 +0000 (16:07 -0700)]
step, times

22 months agodipd, dipdd, cmp
Simon Forman [Mon, 12 Sep 2022 22:17:32 +0000 (15:17 -0700)]
dipd, dipdd, cmp

22 months agocond
Simon Forman [Mon, 12 Sep 2022 20:50:40 +0000 (13:50 -0700)]
cond

22 months agoupdated defs via make
Simon Forman [Mon, 12 Sep 2022 20:50:07 +0000 (13:50 -0700)]
updated defs via make

22 months agodunno what that was
Simon Forman [Mon, 12 Sep 2022 20:49:38 +0000 (13:49 -0700)]
dunno what that was

22 months agoBringing over some of the "upgrades". 2
Simon Forman [Sun, 11 Sep 2022 21:07:55 +0000 (14:07 -0700)]
Bringing over some of the "upgrades". 2

22 months agoBringing over some of the "upgrades".
Simon Forman [Sun, 11 Sep 2022 20:57:19 +0000 (13:57 -0700)]
Bringing over some of the "upgrades".

22 months agoid func
Simon Forman [Sun, 11 Sep 2022 18:46:10 +0000 (11:46 -0700)]
id func

22 months agoclearing out cruft
Simon Forman [Sun, 11 Sep 2022 18:44:48 +0000 (11:44 -0700)]
clearing out cruft

22 months agominor cleanup
Simon Forman [Sun, 11 Sep 2022 16:33:50 +0000 (09:33 -0700)]
minor cleanup

22 months agoPut definitions in the docstring.
Simon Forman [Sun, 11 Sep 2022 16:03:58 +0000 (09:03 -0700)]
Put definitions in the docstring.

Why not? ¯\_(ツ)_/¯

22 months agoModel expr as stack-of-stacks, minor cleanup.
Simon Forman [Sun, 11 Sep 2022 15:57:45 +0000 (08:57 -0700)]
Model expr as stack-of-stacks, minor cleanup.

22 months agoDon't bother to return the expression.
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.

22 months agoCleaner iteration of expression.
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.)

22 months agoover
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.

22 months agoNo point in a separate _parse() function.
Simon Forman [Sun, 11 Sep 2022 00:22:37 +0000 (17:22 -0700)]
No point in a separate _parse() function.

22 months agoSimpler tokenizer.
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

22 months agoA bit more docs.
Simon Forman [Fri, 9 Sep 2022 18:58:35 +0000 (11:58 -0700)]
A bit more docs.

22 months agoMove ParseError to parser section; add a few type guards.
Simon Forman [Fri, 9 Sep 2022 03:59:12 +0000 (20:59 -0700)]
Move ParseError to parser section; add a few type guards.

22 months agoMinor cleanup.
Simon Forman [Thu, 8 Sep 2022 21:25:02 +0000 (14:25 -0700)]
Minor cleanup.

22 months agoExpression objects.
Simon Forman [Thu, 8 Sep 2022 18:31:09 +0000 (11:31 -0700)]
Expression objects.

This should be more efficient than concat().

22 months agoblacken
Simon Forman [Thu, 8 Sep 2022 17:37:46 +0000 (10:37 -0700)]
blacken

22 months agomove stack code up under interp & minor edits
Simon Forman [Thu, 8 Sep 2022 16:06:11 +0000 (09:06 -0700)]
move stack code up under interp & minor edits

22 months agomake type checks into Joy functions
Simon Forman [Thu, 8 Sep 2022 15:46:34 +0000 (08:46 -0700)]
make type checks into Joy functions

22 months agomove type checks and exceptions to bottom
Simon Forman [Thu, 8 Sep 2022 15:27:47 +0000 (08:27 -0700)]
move type checks and exceptions to bottom

22 months agominor cleanup
Simon Forman [Thu, 8 Sep 2022 06:43:50 +0000 (23:43 -0700)]
minor cleanup

22 months agoRemove debug session.
Simon Forman [Thu, 8 Sep 2022 05:23:23 +0000 (22:23 -0700)]
Remove debug session.

22 months agoThat doesn't go there.
Simon Forman [Thu, 8 Sep 2022 04:15:09 +0000 (21:15 -0700)]
That doesn't go there.

22 months agoMinor cleanup.
Simon Forman [Thu, 8 Sep 2022 04:01:07 +0000 (21:01 -0700)]
Minor cleanup.

22 months agohalt and quit
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.

22 months agoPasses (updated) tests.
Simon Forman [Thu, 8 Sep 2022 03:33:13 +0000 (20:33 -0700)]
Passes (updated) tests.

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

22 months agoHarden up the types.
Simon Forman [Thu, 8 Sep 2022 02:39:00 +0000 (19:39 -0700)]
Harden up the types.

22 months agoQuiet mode for testing. Misc cleanup.
Simon Forman [Thu, 8 Sep 2022 00:27:36 +0000 (17:27 -0700)]
Quiet mode for testing.  Misc cleanup.

22 months agoJust put ≡ inline.
Simon Forman [Wed, 7 Sep 2022 21:46:26 +0000 (14:46 -0700)]
Just put ≡ inline.

22 months agoBlacken the code.
Simon Forman [Wed, 7 Sep 2022 21:21:33 +0000 (14:21 -0700)]
Blacken the code.

22 months agoType-guard the ops.
Simon Forman [Wed, 7 Sep 2022 21:18:55 +0000 (14:18 -0700)]
Type-guard the ops.

22 months agoWords and Help; use ≡ for definitions.
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.

22 months agoIt's a script.
Simon Forman [Wed, 7 Sep 2022 18:57:57 +0000 (11:57 -0700)]
It's a script.

22 months agoMore docstrings.
Simon Forman [Wed, 7 Sep 2022 18:54:29 +0000 (11:54 -0700)]
More docstrings.

22 months agoDocstrings.
Simon Forman [Wed, 7 Sep 2022 18:46:59 +0000 (11:46 -0700)]
Docstrings.

22 months agoPylint is kind useless on this one.
Simon Forman [Wed, 7 Sep 2022 18:18:08 +0000 (11:18 -0700)]
Pylint is kind useless on this one.

22 months agoBoolean literals.
Simon Forman [Wed, 7 Sep 2022 18:13:12 +0000 (11:13 -0700)]
Boolean literals.

22 months agoDocs (and strip trailing blanks.)
Simon Forman [Wed, 7 Sep 2022 17:42:20 +0000 (10:42 -0700)]
Docs (and strip trailing blanks.)

22 months agoBlacken the code (simplejoy.py)
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.

22 months agoMisc cruft.
Simon Forman [Wed, 7 Sep 2022 16:28:30 +0000 (09:28 -0700)]
Misc cruft.

22 months agoRemove rust impl.
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

22 months agoSimple Joy
Simon Forman [Wed, 7 Sep 2022 16:23:02 +0000 (09:23 -0700)]
Simple Joy

22 months agoRemove psaces from some filenames.
Simon Forman [Tue, 6 Sep 2022 21:33:51 +0000 (14:33 -0700)]
Remove psaces from some filenames.

23 months agoRebuild HTML docs.
Simon Forman [Tue, 16 Aug 2022 22:26:07 +0000 (15:26 -0700)]
Rebuild HTML docs.

23 months agoA good talk.
Simon Forman [Tue, 16 Aug 2022 00:33:34 +0000 (17:33 -0700)]
A good talk.

23 months agoMinor edits.
Simon Forman [Mon, 15 Aug 2022 23:20:59 +0000 (16:20 -0700)]
Minor edits.

2 years agoNeed to keep definition for ucons around
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.

2 years agouncons as basis
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

2 years agoTwo wrappers
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

2 years agoMinor cleanup.
Simon Forman [Mon, 4 Apr 2022 16:09:01 +0000 (09:09 -0700)]
Minor cleanup.

2 years agoStart a per-project README for Python.
Simon Forman [Mon, 4 Apr 2022 15:01:51 +0000 (08:01 -0700)]
Start a per-project README for Python.

2 years agoStart to update README
Simon Forman [Mon, 4 Apr 2022 15:00:09 +0000 (08:00 -0700)]
Start to update README

2 years agoExpression?
Simon Forman [Mon, 4 Apr 2022 14:58:22 +0000 (07:58 -0700)]
Expression?

2 years agoRebuild HTML docs.
Simon Forman [Thu, 31 Mar 2022 17:10:22 +0000 (10:10 -0700)]
Rebuild HTML docs.

2 years agoSidebar links should be a little farther apart.
Simon Forman [Wed, 30 Mar 2022 19:12:19 +0000 (12:12 -0700)]
Sidebar links should be a little farther apart.

2 years agoI want to override some CSS.
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.

2 years agoAnd the rest.
Simon Forman [Tue, 29 Mar 2022 22:11:19 +0000 (15:11 -0700)]
And the rest.

Whew!  Glad that's done.

2 years agoT's and U's.
Simon Forman [Tue, 29 Mar 2022 19:57:41 +0000 (12:57 -0700)]
T's and U's.

2 years agoThe rest of the S's.
Simon Forman [Tue, 29 Mar 2022 15:50:48 +0000 (08:50 -0700)]
The rest of the S's.

2 years agoQ, R's and some S's.
Simon Forman [Tue, 29 Mar 2022 01:39:42 +0000 (18:39 -0700)]
Q, R's and some S's.

2 years agoAnd there are the P's.
Simon Forman [Sun, 27 Mar 2022 20:04:42 +0000 (13:04 -0700)]
And there are the P's.

2 years agoThe O's.
Simon Forman [Sun, 27 Mar 2022 19:01:37 +0000 (12:01 -0700)]
The O's.

2 years agoThe N's.
Simon Forman [Sun, 27 Mar 2022 18:11:20 +0000 (11:11 -0700)]
The N's.

2 years agoCovered by EXCLAMATION-MARK•HYPHEN-MINUS.md
Simon Forman [Sun, 27 Mar 2022 18:03:57 +0000 (11:03 -0700)]
Covered by EXCLAMATION-MARK•HYPHEN-MINUS.md

2 years agoThe M's.
Simon Forman [Sun, 27 Mar 2022 17:52:17 +0000 (10:52 -0700)]
The M's.