OSDN Git Service

joypy/Thun.git
5 years agoWelcome to the Sphinx 1.8.5 quickstart utility.
Simon Forman [Tue, 7 May 2019 02:43:36 +0000 (19:43 -0700)]
Welcome to the Sphinx 1.8.5 quickstart utility.

5 years agoRebuilt MANIFEST file.
Simon Forman [Tue, 7 May 2019 02:08:48 +0000 (19:08 -0700)]
Rebuilt MANIFEST file.

5 years agoUse ~/.thun instead of ~/.joypy as default JOY_HOME.
Simon Forman [Mon, 6 May 2019 20:54:55 +0000 (13:54 -0700)]
Use ~/.thun instead of ~/.joypy as default JOY_HOME.

And some copyright notices I missed.

5 years agoWell, that seems to work.
Simon Forman [Mon, 6 May 2019 20:32:08 +0000 (13:32 -0700)]
Well, that seems to work.

    python -m joy.vui

With PyGame installed that starts the "VUI" on my system.  Neat.

The initial joy home (~/.joypy) is not quite compatible with the one set up by the GUI code.  One simple way to fix that would be to e,g, make this use ~/.thun instead.

5 years agoUpdate initial joy home dir contents BLOB.
Simon Forman [Mon, 6 May 2019 20:28:44 +0000 (13:28 -0700)]
Update initial joy home dir contents BLOB.

5 years agoUpdate imports, copyright notices.
Simon Forman [Mon, 6 May 2019 20:26:07 +0000 (13:26 -0700)]
Update imports, copyright notices.

5 years agoSome images generated by pyreverse or whatever.
Simon Forman [Mon, 6 May 2019 20:09:45 +0000 (13:09 -0700)]
Some images generated by pyreverse or whatever.

5 years agoInitial bring over of VUI code. (Won't work yet.)
Simon Forman [Mon, 6 May 2019 20:07:01 +0000 (13:07 -0700)]
Initial bring over of VUI code. (Won't work yet.)

5 years agoSee https://www.metalevel.at/acomip/
Simon Forman [Mon, 6 May 2019 19:47:30 +0000 (12:47 -0700)]
See https://www.metalevel.at/acomip/

5 years agoMinor cleanup.
Simon Forman [Sat, 4 May 2019 14:53:02 +0000 (07:53 -0700)]
Minor cleanup.

5 years agoChange name from alpha to tmi.
Simon Forman [Sat, 4 May 2019 13:57:14 +0000 (06:57 -0700)]
Change name from alpha to tmi.

5 years agoA Tracing Meta-Interpreter for Thun
Simon Forman [Fri, 3 May 2019 22:21:29 +0000 (15:21 -0700)]
A Tracing Meta-Interpreter for Thun

5 years agoSome docs, and a thing to print out the dictionary after compilation.
Simon Forman [Fri, 3 May 2019 22:21:06 +0000 (15:21 -0700)]
Some docs, and a thing to print out the dictionary after compilation.

5 years agoMinor cleanup and comments.
Simon Forman [Fri, 3 May 2019 03:39:30 +0000 (20:39 -0700)]
Minor cleanup and comments.

5 years agolinker//1 works on ASM not IR. (rename variable)
Simon Forman [Thu, 2 May 2019 19:41:23 +0000 (12:41 -0700)]
linker//1 works on ASM not IR. (rename variable)

5 years agoAdd some comments, minor rearrangement.
Simon Forman [Thu, 2 May 2019 19:33:52 +0000 (12:33 -0700)]
Add some comments, minor rearrangement.

5 years agoMake get//1 handle lists of pairs which it passes off to get//2.
Simon Forman [Thu, 2 May 2019 17:18:58 +0000 (10:18 -0700)]
Make get//1 handle lists of pairs which it passes off to get//2.

(I could remove more punctuation by making the (key, value) pairs implicit.)

Move compile_program//2 to just under do//0.

5 years agoMinor cleanup.
Simon Forman [Thu, 2 May 2019 15:38:15 +0000 (08:38 -0700)]
Minor cleanup.

Remove the pass0//2 DCG rule and unfold it in compile_program//2 rule.  Move init//0 to be with the rest of the state DCG code.

5 years agoMinor cleanup.
Simon Forman [Thu, 2 May 2019 04:55:46 +0000 (21:55 -0700)]
Minor cleanup.

It turns out that the binary_number relation is used in such a way that it needs to be able to backtrack to preprend leading zeros to the list of bits it constructs to automatically build bitfields of a given width (with the collect//2 DCG.)

5 years agobinary_number/2 is more efficient if you strip off 0's first.
Simon Forman [Sun, 28 Apr 2019 15:16:38 +0000 (08:16 -0700)]
binary_number/2 is more efficient if you strip off 0's first.

5 years agoBring in the (sort of) compiler.
Simon Forman [Sun, 28 Apr 2019 14:59:47 +0000 (07:59 -0700)]
Bring in the (sort of) compiler.

5 years agoVery minor cleanup.
Simon Forman [Sat, 27 Apr 2019 05:13:45 +0000 (22:13 -0700)]
Very minor cleanup.

5 years agoTreat defs in thun/3 relation.
Simon Forman [Sat, 27 Apr 2019 04:58:15 +0000 (21:58 -0700)]
Treat defs in thun/3 relation.

Allow for "compilation" of new func/3 rules.

Add comment of crude grammar for Joy syntax.

Minor rearrangements.

show_joy_compile uses portray_clause/1.

5 years agoI just want to publish this right quick.
Simon Forman [Sat, 25 Aug 2018 00:05:42 +0000 (17:05 -0700)]
I just want to publish this right quick.

5 years agoThe Prolog version of Joy.
Simon Forman [Fri, 24 Aug 2018 23:52:00 +0000 (16:52 -0700)]
The Prolog version of Joy.

5 years agoA bunch of docs.
Simon Forman [Fri, 24 Aug 2018 23:48:15 +0000 (16:48 -0700)]
A bunch of docs.

Things have kind of run away with me.  I've been working in Prolog for
the last month or so.  I'm not yet sure how to bring it together with the
Python code.

5 years agoThe version of Python with Anaconda is lightly newer.
Simon Forman [Fri, 24 Aug 2018 23:46:18 +0000 (16:46 -0700)]
The version of Python with Anaconda is lightly newer.

5 years agoAdd binary functions.
Simon Forman [Thu, 2 Aug 2018 21:22:42 +0000 (14:22 -0700)]
Add binary functions.

5 years agoIn progress..
Simon Forman [Wed, 1 Aug 2018 19:26:50 +0000 (12:26 -0700)]
In progress..

5 years agoWorking on compiler.
Simon Forman [Wed, 1 Aug 2018 17:59:07 +0000 (10:59 -0700)]
Working on compiler.

I have a simple dataflow thingy for some Yin and Yang functions.

5 years agoMinor UI bugs.
Simon Forman [Sun, 22 Jul 2018 18:53:02 +0000 (11:53 -0700)]
Minor UI bugs.

I should nail this down better.  Command selections like ' []' were
failing to evaluate.

5 years agoOh python, oh unicode.
Simon Forman [Sun, 22 Jul 2018 18:51:47 +0000 (11:51 -0700)]
Oh python, oh unicode.

5 years agoLoad JOY_HOME/definitions.txt
Simon Forman [Sun, 22 Jul 2018 18:50:34 +0000 (11:50 -0700)]
Load JOY_HOME/definitions.txt

You still can't edit other text files from within the UI, but at least
now you have a place to persist your own definitions over restarts.

I thought about having a [definitions] section in the config INI file,
but for some reason I prefer a separate definitions.txt file.  I dunno.
Might change it in future.

5 years agoTEXT_BINDINGS stay in textwidget.py.
Simon Forman [Sun, 22 Jul 2018 17:14:45 +0000 (10:14 -0700)]
TEXT_BINDINGS stay in textwidget.py.

5 years agoRework the default JOY_HOME contents.
Simon Forman [Sun, 22 Jul 2018 03:19:38 +0000 (20:19 -0700)]
Rework the default JOY_HOME contents.

5 years agoConfig file and CLI arg parser.
Simon Forman [Sun, 22 Jul 2018 00:56:53 +0000 (17:56 -0700)]
Config file and CLI arg parser.

5 years agoLoop and while combinators.
Simon Forman [Fri, 20 Jul 2018 19:33:06 +0000 (12:33 -0700)]
Loop and while combinators.

5 years agoFutzing with types.
Simon Forman [Thu, 19 Jul 2018 22:37:35 +0000 (15:37 -0700)]
Futzing with types.

5 years agoGetting back to parity after jumble.
Simon Forman [Thu, 19 Jul 2018 22:18:42 +0000 (15:18 -0700)]
Getting back to parity after jumble.

Polytypes module folded into types module, with all the actual type
information done when you load the library module.  Some definitions can
be inferred from their body expression, others need to be
CombinatorJoyType wrapped.  Still to do: loop.

5 years agoWorking to get types right.
Simon Forman [Thu, 19 Jul 2018 19:38:19 +0000 (12:38 -0700)]
Working to get types right.

5 years agoFix TextJoyType inheritance.
Simon Forman [Thu, 19 Jul 2018 00:47:19 +0000 (17:47 -0700)]
Fix TextJoyType inheritance.

5 years agoLog types at startup.
Simon Forman [Thu, 19 Jul 2018 00:06:51 +0000 (17:06 -0700)]
Log types at startup.

5 years agoAdd some logging.
Simon Forman [Wed, 18 Jul 2018 23:14:32 +0000 (16:14 -0700)]
Add some logging.

5 years agoCache the results of type checking.
Simon Forman [Wed, 18 Jul 2018 23:13:57 +0000 (16:13 -0700)]
Cache the results of type checking.

5 years agoRemoving polytypes; some pylint hints.
Simon Forman [Wed, 18 Jul 2018 21:55:39 +0000 (14:55 -0700)]
Removing polytypes; some pylint hints.

5 years agoDefinitions infer stack effects.
Simon Forman [Wed, 18 Jul 2018 03:52:57 +0000 (20:52 -0700)]
Definitions infer stack effects.

At start-up defs that DON'T type check are permitted (so you can use e.g.
loop, map, etc.) in the definitions "source", but then the user-facing
inscribe command only allows you to define new commands that DO
type-check.  The ideal solution here is to get inference working for the
loopy words.  (In the meantime you can select and execute their
definition text directly.  That's not (yet!) type-checked.)

5 years agoNearly there maybe, maybe not.
Simon Forman [Wed, 18 Jul 2018 03:09:17 +0000 (20:09 -0700)]
Nearly there maybe, maybe not.

5 years agoMoving right along.
Simon Forman [Wed, 18 Jul 2018 00:12:27 +0000 (17:12 -0700)]
Moving right along.

A little clunky but it seems to work so far.

5 years agoSo fra, so good...
Simon Forman [Tue, 17 Jul 2018 19:43:24 +0000 (12:43 -0700)]
So fra, so good...

5 years agoi got used to it, but Jupyter likes 4
Simon Forman [Tue, 17 Jul 2018 17:49:09 +0000 (10:49 -0700)]
i got used to it, but Jupyter likes 4

5 years agoin the middle, just want to 2ify my indents...
Simon Forman [Tue, 17 Jul 2018 17:47:50 +0000 (10:47 -0700)]
in the middle, just want to 2ify my indents...

5 years agoTextJoyType and inscribe command.
Simon Forman [Tue, 17 Jul 2018 17:35:11 +0000 (10:35 -0700)]
TextJoyType and inscribe command.

I took the plunge and added the meta-command "inscribe" to the library.
This is, of course, a very dangerous and powerful command.  Use it
wisely.

5 years agoA few more stack effects.
Simon Forman [Tue, 17 Jul 2018 03:28:53 +0000 (20:28 -0700)]
A few more stack effects.

5 years agoexpectations_of_definition() and some helper infer funcs.
Simon Forman [Tue, 17 Jul 2018 02:10:16 +0000 (19:10 -0700)]
expectations_of_definition() and some helper infer funcs.

5 years agoMore stack effects, and modify the key bindings.
Simon Forman [Tue, 17 Jul 2018 01:43:40 +0000 (18:43 -0700)]
More stack effects, and modify the key bindings.

5 years agoUpdate docs.
Simon Forman [Mon, 16 Jul 2018 16:11:25 +0000 (09:11 -0700)]
Update docs.

5 years agoMake sure we've got all the docs, etc.
Simon Forman [Mon, 16 Jul 2018 03:43:26 +0000 (20:43 -0700)]
Make sure we've got all the docs, etc.

5 years agoFix bugs
Simon Forman [Mon, 16 Jul 2018 03:37:52 +0000 (20:37 -0700)]
Fix bugs

Type checking e.g. sum or product.
Any type accepts complex numbers.
Lots of the math functions now just use Number rather than more specific
poly-types.

5 years agoThat "fix" wasn't a fix.
Simon Forman [Sun, 15 Jul 2018 21:06:10 +0000 (14:06 -0700)]
That "fix" wasn't a fix.

It broke other stuff.  What I really wanted to do was change the stack
effect of 'clear'.

5 years agoFix up stacks for type checking.
Simon Forman [Sun, 15 Jul 2018 20:57:11 +0000 (13:57 -0700)]
Fix up stacks for type checking.

Sometimes (e.g. 'clear') the () at the end of the stack was tripping up
the unify() function.

5 years agoSome integration with Type Checking.
Simon Forman [Sun, 15 Jul 2018 18:48:08 +0000 (11:48 -0700)]
Some integration with Type Checking.

Now the UI highlights commands and numbers as you move the mouse, numbers
are blue, commands that type-check are green, commands that fail to
type-check are orange and will not be interpreted, and if there is no
stack effect information available for a command it is grey but you can
still attempt to execute it.

You can still evaluate whole expressions by selceting them and
right-inter-clicking before you release the left button, or by putting
the cursor on a line and typing ctrl-enter, which will run the whole
line.  These expressions are NOT (yet) type-checked.

5 years agoMuch globals. Wow.
Simon Forman [Sun, 15 Jul 2018 03:58:43 +0000 (20:58 -0700)]
Much globals. Wow.

5 years agoMinor cleanup.
Simon Forman [Sun, 15 Jul 2018 03:55:34 +0000 (20:55 -0700)]
Minor cleanup.

5 years agoMove load_stack() to StackDisplayWorld.
Simon Forman [Sun, 15 Jul 2018 03:47:04 +0000 (20:47 -0700)]
Move load_stack() to StackDisplayWorld.

5 years agoMove StackDisplayWorld into world.py
Simon Forman [Sun, 15 Jul 2018 02:51:31 +0000 (19:51 -0700)]
Move StackDisplayWorld into world.py

5 years agoMove reset() to text method.
Simon Forman [Sun, 15 Jul 2018 02:34:01 +0000 (19:34 -0700)]
Move reset() to text method.

Rearrange some other stuff.

5 years agoCorrect some typo
Simon Forman [Sun, 15 Jul 2018 02:14:01 +0000 (19:14 -0700)]
Correct some typo

I accidentally pasted or something.

5 years agoMove init_text() to Text method.
Simon Forman [Sun, 15 Jul 2018 02:11:49 +0000 (19:11 -0700)]
Move init_text() to Text method.

5 years agoSplit some code into a utils.py module.
Simon Forman [Sun, 15 Jul 2018 01:51:22 +0000 (18:51 -0700)]
Split some code into a utils.py module.

5 years agoMinor cleanup.
Simon Forman [Sun, 15 Jul 2018 01:41:36 +0000 (18:41 -0700)]
Minor cleanup.

Improve the behavior of the World.

5 years agoPartial harmonize key commands.
Simon Forman [Sun, 15 Jul 2018 01:25:12 +0000 (18:25 -0700)]
Partial harmonize key commands.

Fix bug cut instead of copy.

5 years agoUpdated manifest file.
Simon Forman [Sat, 14 Jul 2018 20:01:43 +0000 (13:01 -0700)]
Updated manifest file.

5 years agoIt's time to bring in the GUI.
Simon Forman [Sat, 14 Jul 2018 19:45:52 +0000 (12:45 -0700)]
It's time to bring in the GUI.

Minimalist (not to say Brutalist) UI based on text windows and mouse
chords.  Experimental.

5 years agoTemporarily ignore the test dir.
Simon Forman [Sat, 14 Jul 2018 19:32:07 +0000 (12:32 -0700)]
Temporarily ignore the test dir.

It's mostly just notes and crap so far.

5 years agoModule dependency graphs.
Simon Forman [Sat, 14 Jul 2018 19:30:45 +0000 (12:30 -0700)]
Module dependency graphs.

Made with Snakefood and Dot.  I'm going to have to come through and clean
these up eventually.

5 years agoA little more bit o' docs.
Simon Forman [Sat, 14 Jul 2018 19:29:25 +0000 (12:29 -0700)]
A little more bit o' docs.

5 years agoA bit more docs.
Simon Forman [Sat, 14 Jul 2018 19:07:49 +0000 (12:07 -0700)]
A bit more docs.

5 years agoA little more documentation.
Simon Forman [Wed, 11 Jul 2018 14:13:05 +0000 (07:13 -0700)]
A little more documentation.

5 years agoAh, Symbols.
Simon Forman [Wed, 11 Jul 2018 14:12:14 +0000 (07:12 -0700)]
Ah, Symbols.

5 years agoUnicode in docstring.
Simon Forman [Wed, 11 Jul 2018 14:11:56 +0000 (07:11 -0700)]
Unicode in docstring.

5 years agoifte as definition; "fork" combinator.
Simon Forman [Wed, 11 Jul 2018 14:10:54 +0000 (07:10 -0700)]
ifte as definition; "fork" combinator.

5 years agoClean up.
Simon Forman [Fri, 6 Jul 2018 21:20:04 +0000 (14:20 -0700)]
Clean up.

5 years agoAdding support for type checking.
Simon Forman [Fri, 6 Jul 2018 21:19:36 +0000 (14:19 -0700)]
Adding support for type checking.

5 years agoAnother definition for while.
Simon Forman [Fri, 6 Jul 2018 21:19:00 +0000 (14:19 -0700)]
Another definition for while.

5 years agoMinor cleanup.
Simon Forman [Wed, 4 Jul 2018 17:37:43 +0000 (10:37 -0700)]
Minor cleanup.

Renamed update() to reify() and reinstated recursive substitution.

5 years agoExtra logging and another lil test.
Simon Forman [Sun, 1 Jul 2018 06:20:00 +0000 (23:20 -0700)]
Extra logging and another lil test.

5 years agoHmm.
Simon Forman [Sat, 30 Jun 2018 19:59:14 +0000 (12:59 -0700)]
Hmm.

I think update() should be done better...

5 years agoType inference of Joy expressions.
Simon Forman [Fri, 29 Jun 2018 20:19:12 +0000 (13:19 -0700)]
Type inference of Joy expressions.

More remains to be done but it seems to work.

5 years agoGotta update() expression too.
Simon Forman [Thu, 28 Jun 2018 05:26:27 +0000 (22:26 -0700)]
Gotta update() expression too.

If type vars get into the espression you have to keep them in sync with
the unification or you can lose information.

Some combinators can put symbols on the expression, you have to convert
those to type checkers or, as a hack, just look them up and run them.
This lets definitions work(-ish), ...

5 years agoMinor cleanup.
Simon Forman [Thu, 28 Jun 2018 02:03:23 +0000 (19:03 -0700)]
Minor cleanup.

5 years agoMinor edits.
Simon Forman [Wed, 27 Jun 2018 23:31:00 +0000 (16:31 -0700)]
Minor edits.

5 years agodon't compose lits
Simon Forman [Wed, 27 Jun 2018 05:39:06 +0000 (22:39 -0700)]
don't compose lits

It forces the identities of lits to change during relabel().

I think we still have to update() the expression to track changes in the
F function stack effect or we risk losing assoviations between type
variables in the stack effects and type variables in the pending
expression.  Hrmmm.

5 years agoTrying to add a guard to combinators.
Simon Forman [Wed, 27 Jun 2018 04:45:58 +0000 (21:45 -0700)]
Trying to add a guard to combinators.

So they can notice if they're given a stack that doesn't match what
they're expecting.

This seems to work, but I realized that type variables in the pending
expression need to be update()'d too.  hmm...

5 years agoMinor edits.
Simon Forman [Wed, 27 Jun 2018 04:44:18 +0000 (21:44 -0700)]
Minor edits.

5 years agoDropped some HTML docs somehow.
Simon Forman [Tue, 26 Jun 2018 22:58:18 +0000 (15:58 -0700)]
Dropped some HTML docs somehow.

5 years agoType checking, initial work.
Simon Forman [Tue, 26 Jun 2018 22:23:51 +0000 (15:23 -0700)]
Type checking, initial work.

5 years agoFix a couple of bug in Kleene Stars.
Simon Forman [Mon, 25 Jun 2018 19:43:05 +0000 (12:43 -0700)]
Fix a couple of bug in Kleene Stars.

...and some minor cleanup.

5 years agoA bit more text in the Types notebook.
Simon Forman [Mon, 25 Jun 2018 18:32:27 +0000 (11:32 -0700)]
A bit more text in the Types notebook.

It's still pretty drafty.  I'm working on the code and then I'll write up
the last bit of docs.

5 years agoSome more tests.
Simon Forman [Mon, 25 Jun 2018 13:51:12 +0000 (06:51 -0700)]
Some more tests.

Damn thing seems to be working.

5 years agoChange name of kav() to infer().
Simon Forman [Mon, 25 Jun 2018 01:48:22 +0000 (18:48 -0700)]
Change name of kav() to infer().