OSDN Git Service

joypy/Thun.git
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.

2 years agoMore misc. ref docs.
Simon Forman [Sat, 26 Mar 2022 20:12:16 +0000 (13:12 -0700)]
More misc. ref docs.

2 years agoTwo L's.
Simon Forman [Sat, 26 Mar 2022 19:17:31 +0000 (12:17 -0700)]
Two L's.

2 years agoThe I's are done.
Simon Forman [Sat, 26 Mar 2022 00:41:31 +0000 (17:41 -0700)]
The I's are done.

2 years agoi and ii
Simon Forman [Fri, 25 Mar 2022 22:16:30 +0000 (15:16 -0700)]
i and ii

2 years agoThe H's.
Simon Forman [Fri, 25 Mar 2022 21:46:56 +0000 (14:46 -0700)]
The H's.

2 years agoThe rest of the G's.
Simon Forman [Fri, 25 Mar 2022 21:16:37 +0000 (14:16 -0700)]
The rest of the G's.

2 years agoMost of the G's.
Simon Forman [Fri, 25 Mar 2022 19:39:03 +0000 (12:39 -0700)]
Most of the G's.

2 years agoThat is the F's done.
Simon Forman [Fri, 25 Mar 2022 18:12:48 +0000 (11:12 -0700)]
That is the F's done.

2 years agoMake divmod work like the docs say it does.
Simon Forman [Fri, 25 Mar 2022 17:56:15 +0000 (10:56 -0700)]
Make divmod work like the docs say it does.

2 years agoMinor cleanup.
Simon Forman [Fri, 25 Mar 2022 03:28:37 +0000 (20:28 -0700)]
Minor cleanup.

2 years agoOnly two E's.
Simon Forman [Fri, 25 Mar 2022 03:27:22 +0000 (20:27 -0700)]
Only two E's.

2 years agoThere go the D's!
Simon Forman [Fri, 25 Mar 2022 03:11:16 +0000 (20:11 -0700)]
There go the D's!

This is a slog, but it's great to be getting it done.

2 years agoThe rest of the C's.
Simon Forman [Thu, 24 Mar 2022 20:35:37 +0000 (13:35 -0700)]
The rest of the C's.

2 years agoMost of the C's.
Simon Forman [Thu, 24 Mar 2022 19:33:20 +0000 (12:33 -0700)]
Most of the C's.

2 years agoRef docs B's.
Simon Forman [Thu, 24 Mar 2022 18:15:25 +0000 (11:15 -0700)]
Ref docs B's.

2 years agoGot through the A's.
Simon Forman [Thu, 24 Mar 2022 16:45:29 +0000 (09:45 -0700)]
Got through the A's.

2 years agoUpdate some ref docs.
Simon Forman [Thu, 24 Mar 2022 04:25:22 +0000 (21:25 -0700)]
Update some ref docs.

2 years agoUpdate some ref docs.
Simon Forman [Wed, 23 Mar 2022 21:22:53 +0000 (14:22 -0700)]
Update some ref docs.

2 years agoMinor cleanup.
Simon Forman [Wed, 23 Mar 2022 20:47:58 +0000 (13:47 -0700)]
Minor cleanup.

2 years agoUse the right files.
Simon Forman [Wed, 23 Mar 2022 20:43:18 +0000 (13:43 -0700)]
Use the right files.

2 years agoMove the build stuff to its own dir.
Simon Forman [Wed, 23 Mar 2022 20:40:20 +0000 (13:40 -0700)]
Move the build stuff to its own dir.

Now Joypy/docs/reference/*.md are just the individual function
documents.

2 years agoIt woulda looked like this,
Simon Forman [Wed, 23 Mar 2022 20:06:32 +0000 (13:06 -0700)]
It woulda looked like this,

if I hadda not had to manually tweak it.

2 years agoGoodness, that was brutal.
Simon Forman [Wed, 23 Mar 2022 20:02:19 +0000 (13:02 -0700)]
Goodness, that was brutal.

The `!-` name doesn't work as a title for the conversion from ReST to
Markdown.  Maybe that's a bug in Pandoc, but more likely it's a legit
syntax gotcha in Mearkdown itself.

    !-
    ^^^^

In ReST turns into:

    !-\^\^\^\^

In the Markdown.  :(

It should be:

    # !-

Instead.

2 years agoHow hard can it be to concatenate files with newlines between them?
Simon Forman [Wed, 23 Mar 2022 18:45:36 +0000 (11:45 -0700)]
How hard can it be to concatenate files with newlines between them?

This hard.

Now add '#'s to those headers...

2 years agoMD in the yow dir. Why not?
Simon Forman [Wed, 23 Mar 2022 18:44:38 +0000 (11:44 -0700)]
MD in the yow dir.  Why not?

2 years agoThis is some janky Rube Goldberg shtuff.
Simon Forman [Wed, 23 Mar 2022 17:59:23 +0000 (10:59 -0700)]
This is some janky Rube Goldberg shtuff.

2 years agoAnd rebuild the HTML to see how it looks.
Simon Forman [Wed, 23 Mar 2022 17:53:29 +0000 (10:53 -0700)]
And rebuild the HTML to see how it looks.

2 years agoNow pile all the ref docs into the refs dir.
Simon Forman [Wed, 23 Mar 2022 17:52:58 +0000 (10:52 -0700)]
Now pile all the ref docs into the refs dir.

2 years agoPandoc!?
Simon Forman [Wed, 23 Mar 2022 17:50:32 +0000 (10:50 -0700)]
Pandoc!?

    <p>if basis</p>
    <h2 id="discussion-60">Discussion</h2>
    <h2 id="crosslinks-59">## Crosslinks</h2>
    <h1 id="drop">drop</h1>
    <p>Basis Function Combinator</p>

2 years agoMove the MD files into the reference dir.
Simon Forman [Wed, 23 Mar 2022 17:40:04 +0000 (10:40 -0700)]
Move the MD files into the reference dir.

2 years agoAnd there we are, Markdown stubs for each function.
Simon Forman [Wed, 23 Mar 2022 17:36:30 +0000 (10:36 -0700)]
And there we are, Markdown stubs for each function.

I hate filenames, Git hates Bullet • symbol, SNAFU.
I have no idea how to properly escape gnarly filenames.  I don't want to
restrict Joy function names (any non-space, non-[] Unicode) so I just
did the quick and dirty thing to make filenames.

2 years agoWay overthinking this.
Simon Forman [Wed, 23 Mar 2022 17:33:02 +0000 (10:33 -0700)]
Way overthinking this.

I want stub Markdown files for each (as yet undocumented) function.
The functions have docstrings but they are in ReST format.  Using the
`wrod.py` script I can fins all the functions that don't yet have doc
files and write their docstrings into a ReST template.  Then I use Make
and Pandoc to convert the ReST files to Markdown.

2 years agoD'oh! Forgot to add HEADER.md file.
Simon Forman [Wed, 23 Mar 2022 04:50:52 +0000 (21:50 -0700)]
D'oh!  Forgot to add HEADER.md file.

2 years agoMake Functor-Reference from individual pages.
Simon Forman [Wed, 23 Mar 2022 04:47:23 +0000 (21:47 -0700)]
Make Functor-Reference from individual pages.

This is a little clunky, for example, see "!-" aka "not negative".

2 years agoMinor cleanup.
Simon Forman [Wed, 23 Mar 2022 04:42:24 +0000 (21:42 -0700)]
Minor cleanup.