OSDN Git Service
Simon Forman [Fri, 24 Aug 2018 23:46:18 +0000 (16:46 -0700)]
The version of Python with Anaconda is lightly newer.
Simon Forman [Thu, 2 Aug 2018 21:22:42 +0000 (14:22 -0700)]
Add binary functions.
Simon Forman [Wed, 1 Aug 2018 19:26:50 +0000 (12:26 -0700)]
In progress..
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.
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.
Simon Forman [Sun, 22 Jul 2018 18:51:47 +0000 (11:51 -0700)]
Oh python, oh unicode.
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.
Simon Forman [Sun, 22 Jul 2018 17:14:45 +0000 (10:14 -0700)]
TEXT_BINDINGS stay in textwidget.py.
Simon Forman [Sun, 22 Jul 2018 03:19:38 +0000 (20:19 -0700)]
Rework the default JOY_HOME contents.
Simon Forman [Sun, 22 Jul 2018 00:56:53 +0000 (17:56 -0700)]
Config file and CLI arg parser.
Simon Forman [Fri, 20 Jul 2018 19:33:06 +0000 (12:33 -0700)]
Loop and while combinators.
Simon Forman [Thu, 19 Jul 2018 22:37:35 +0000 (15:37 -0700)]
Futzing with types.
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.
Simon Forman [Thu, 19 Jul 2018 19:38:19 +0000 (12:38 -0700)]
Working to get types right.
Simon Forman [Thu, 19 Jul 2018 00:47:19 +0000 (17:47 -0700)]
Fix TextJoyType inheritance.
Simon Forman [Thu, 19 Jul 2018 00:06:51 +0000 (17:06 -0700)]
Log types at startup.
Simon Forman [Wed, 18 Jul 2018 23:14:32 +0000 (16:14 -0700)]
Add some logging.
Simon Forman [Wed, 18 Jul 2018 23:13:57 +0000 (16:13 -0700)]
Cache the results of type checking.
Simon Forman [Wed, 18 Jul 2018 21:55:39 +0000 (14:55 -0700)]
Removing polytypes; some pylint hints.
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.)
Simon Forman [Wed, 18 Jul 2018 03:09:17 +0000 (20:09 -0700)]
Nearly there maybe, maybe not.
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.
Simon Forman [Tue, 17 Jul 2018 19:43:24 +0000 (12:43 -0700)]
So fra, so good...
Simon Forman [Tue, 17 Jul 2018 17:49:09 +0000 (10:49 -0700)]
i got used to it, but Jupyter likes 4
Simon Forman [Tue, 17 Jul 2018 17:47:50 +0000 (10:47 -0700)]
in the middle, just want to 2ify my indents...
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.
Simon Forman [Tue, 17 Jul 2018 03:28:53 +0000 (20:28 -0700)]
A few more stack effects.
Simon Forman [Tue, 17 Jul 2018 02:10:16 +0000 (19:10 -0700)]
expectations_of_definition() and some helper infer funcs.
Simon Forman [Tue, 17 Jul 2018 01:43:40 +0000 (18:43 -0700)]
More stack effects, and modify the key bindings.
Simon Forman [Mon, 16 Jul 2018 16:11:25 +0000 (09:11 -0700)]
Update docs.
Simon Forman [Mon, 16 Jul 2018 03:43:26 +0000 (20:43 -0700)]
Make sure we've got all the docs, etc.
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.
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'.
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.
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.
Simon Forman [Sun, 15 Jul 2018 03:58:43 +0000 (20:58 -0700)]
Much globals. Wow.
Simon Forman [Sun, 15 Jul 2018 03:55:34 +0000 (20:55 -0700)]
Minor cleanup.
Simon Forman [Sun, 15 Jul 2018 03:47:04 +0000 (20:47 -0700)]
Move load_stack() to StackDisplayWorld.
Simon Forman [Sun, 15 Jul 2018 02:51:31 +0000 (19:51 -0700)]
Move StackDisplayWorld into world.py
Simon Forman [Sun, 15 Jul 2018 02:34:01 +0000 (19:34 -0700)]
Move reset() to text method.
Rearrange some other stuff.
Simon Forman [Sun, 15 Jul 2018 02:14:01 +0000 (19:14 -0700)]
Correct some typo
I accidentally pasted or something.
Simon Forman [Sun, 15 Jul 2018 02:11:49 +0000 (19:11 -0700)]
Move init_text() to Text method.
Simon Forman [Sun, 15 Jul 2018 01:51:22 +0000 (18:51 -0700)]
Split some code into a utils.py module.
Simon Forman [Sun, 15 Jul 2018 01:41:36 +0000 (18:41 -0700)]
Minor cleanup.
Improve the behavior of the World.
Simon Forman [Sun, 15 Jul 2018 01:25:12 +0000 (18:25 -0700)]
Partial harmonize key commands.
Fix bug cut instead of copy.
Simon Forman [Sat, 14 Jul 2018 20:01:43 +0000 (13:01 -0700)]
Updated manifest file.
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.
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.
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.
Simon Forman [Sat, 14 Jul 2018 19:29:25 +0000 (12:29 -0700)]
A little more bit o' docs.
Simon Forman [Sat, 14 Jul 2018 19:07:49 +0000 (12:07 -0700)]
A bit more docs.
Simon Forman [Wed, 11 Jul 2018 14:13:05 +0000 (07:13 -0700)]
A little more documentation.
Simon Forman [Wed, 11 Jul 2018 14:12:14 +0000 (07:12 -0700)]
Ah, Symbols.
Simon Forman [Wed, 11 Jul 2018 14:11:56 +0000 (07:11 -0700)]
Unicode in docstring.
Simon Forman [Wed, 11 Jul 2018 14:10:54 +0000 (07:10 -0700)]
ifte as definition; "fork" combinator.
Simon Forman [Fri, 6 Jul 2018 21:20:04 +0000 (14:20 -0700)]
Clean up.
Simon Forman [Fri, 6 Jul 2018 21:19:36 +0000 (14:19 -0700)]
Adding support for type checking.
Simon Forman [Fri, 6 Jul 2018 21:19:00 +0000 (14:19 -0700)]
Another definition for while.
Simon Forman [Wed, 4 Jul 2018 17:37:43 +0000 (10:37 -0700)]
Minor cleanup.
Renamed update() to reify() and reinstated recursive substitution.
Simon Forman [Sun, 1 Jul 2018 06:20:00 +0000 (23:20 -0700)]
Extra logging and another lil test.
Simon Forman [Sat, 30 Jun 2018 19:59:14 +0000 (12:59 -0700)]
Hmm.
I think update() should be done better...
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.
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), ...
Simon Forman [Thu, 28 Jun 2018 02:03:23 +0000 (19:03 -0700)]
Minor cleanup.
Simon Forman [Wed, 27 Jun 2018 23:31:00 +0000 (16:31 -0700)]
Minor edits.
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.
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...
Simon Forman [Wed, 27 Jun 2018 04:44:18 +0000 (21:44 -0700)]
Minor edits.
Simon Forman [Tue, 26 Jun 2018 22:58:18 +0000 (15:58 -0700)]
Dropped some HTML docs somehow.
Simon Forman [Tue, 26 Jun 2018 22:23:51 +0000 (15:23 -0700)]
Type checking, initial work.
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.
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.
Simon Forman [Mon, 25 Jun 2018 13:51:12 +0000 (06:51 -0700)]
Some more tests.
Damn thing seems to be working.
Simon Forman [Mon, 25 Jun 2018 01:48:22 +0000 (18:48 -0700)]
Change name of kav() to infer().
Simon Forman [Mon, 25 Jun 2018 01:44:29 +0000 (18:44 -0700)]
Writing tests.
I'm backfilling tests to cover the functionality that I developed
incrementally in the Jupyter notebook and nail it down with concrete
examples. No doubt I'll uncover some bugs.
Simon Forman [Mon, 25 Jun 2018 01:39:46 +0000 (18:39 -0700)]
Minor cleanup.
Joy type errors get their own exception class.
Simon Forman [Sun, 24 Jun 2018 23:33:07 +0000 (16:33 -0700)]
Infencer/Interpreter hybrid and Kleene Star types.
Still draft but it works. Gotta clean it up and supply defs for basis
functions.
Simon Forman [Fri, 22 Jun 2018 04:23:34 +0000 (21:23 -0700)]
Simple type inference and compiler.
The compiler works for the subset of Joy functions that deal strictly in
manipulating stacks and their contents.
Simon Forman [Fri, 22 Jun 2018 04:13:50 +0000 (21:13 -0700)]
Bunches of new docs.
Type inference!
A new treatment of recursion combinator patterns.
Simon Forman [Wed, 13 Jun 2018 17:24:36 +0000 (10:24 -0700)]
Elegant definitions for un-, bin-, tern-ary combinators.
Simon Forman [Wed, 13 Jun 2018 17:17:46 +0000 (10:17 -0700)]
Rename pushback() to concat().
Simon Forman [Fri, 8 Jun 2018 20:22:13 +0000 (13:22 -0700)]
Removing old html.
Simon Forman [Fri, 8 Jun 2018 20:17:36 +0000 (13:17 -0700)]
Rebuild html.
Simon Forman [Fri, 8 Jun 2018 20:05:59 +0000 (13:05 -0700)]
The Hylos notebook is not ready for public yet.
Simon Forman [Thu, 7 Jun 2018 19:48:24 +0000 (12:48 -0700)]
Move notebook rst files to sphinx subdir.
Only for the ones that are already prepared.
Simon Forman [Thu, 7 Jun 2018 19:42:15 +0000 (12:42 -0700)]
Spaces in filenames noooo.
Simon Forman [Thu, 7 Jun 2018 19:37:32 +0000 (12:37 -0700)]
Cleaning up docs.
Simon Forman [Wed, 6 Jun 2018 20:33:04 +0000 (13:33 -0700)]
Toplevel makefile docs target uses docs makefile.
Simon Forman [Wed, 6 Jun 2018 20:27:51 +0000 (13:27 -0700)]
Only (re)make changed notebooks.
I love make. (Despite not working with spaces in filenames, since that's
a dumbass thing to do anyway.) There's probably a better way to do what
I did but it works so I'm happy.
Simon Forman [Wed, 6 Jun 2018 20:08:04 +0000 (13:08 -0700)]
Some docs that got swept up in the commotion.
Simon Forman [Wed, 6 Jun 2018 20:07:31 +0000 (13:07 -0700)]
Make hates spaces in file names.
Simon Forman [Wed, 6 Jun 2018 19:57:12 +0000 (12:57 -0700)]
Make cannot deal with spaces in filenames.
Is make wrong, or is it your filename?
Simon Forman [Wed, 6 Jun 2018 19:48:16 +0000 (12:48 -0700)]
I want to re-make only edited notebooks.
Not all of them each time.
Simon Forman [Wed, 6 Jun 2018 19:47:11 +0000 (12:47 -0700)]
Bunch of minor docs edits.
Simon Forman [Wed, 6 Jun 2018 18:45:33 +0000 (11:45 -0700)]
Minor docs edit.
Simon Forman [Wed, 6 Jun 2018 18:32:19 +0000 (11:32 -0700)]
Minor docs edits.
Simon Forman [Wed, 6 Jun 2018 18:20:31 +0000 (11:20 -0700)]
Minor docs cleanup.
Simon Forman [Wed, 6 Jun 2018 15:47:26 +0000 (08:47 -0700)]
Bumped version to 0.2.0; docs edits.
I've added cond and cmp to the library so that should bump the minor
version no. I think.
Simon Forman [Wed, 6 Jun 2018 14:59:06 +0000 (07:59 -0700)]
Minor docs edits.
Simon Forman [Wed, 6 Jun 2018 14:56:24 +0000 (07:56 -0700)]
Added cond and cmp to library.