OSDN Git Service

joypy/Thun.git
4 years agoZero-or-one not one-or-more.
Simon Forman [Tue, 19 May 2020 03:45:04 +0000 (20:45 -0700)]
Zero-or-one not one-or-more.

4 years agoMinor cleanup.
Simon Forman [Tue, 19 May 2020 03:37:58 +0000 (20:37 -0700)]
Minor cleanup.

4 years agoLet's simplify.
Simon Forman [Tue, 19 May 2020 03:00:00 +0000 (20:00 -0700)]
Let's simplify.

4 years agoRip out type code from the library.
Simon Forman [Tue, 19 May 2020 02:07:07 +0000 (19:07 -0700)]
Rip out type code from the library.

4 years agoLet's simplify.
Simon Forman [Tue, 19 May 2020 01:32:35 +0000 (18:32 -0700)]
Let's simplify.

4 years agoBump version to 0.4.0
Simon Forman [Mon, 18 May 2020 00:28:52 +0000 (17:28 -0700)]
Bump version to 0.4.0

4 years agoVersion 0.4.0
Simon Forman [Mon, 18 May 2020 00:22:31 +0000 (17:22 -0700)]
Version 0.4.0

4 years agoRebuild docs
Simon Forman [Sun, 17 May 2020 23:40:58 +0000 (16:40 -0700)]
Rebuild docs

4 years agoRecognize scientific notation.
Simon Forman [Sun, 17 May 2020 23:10:56 +0000 (16:10 -0700)]
Recognize scientific notation.

4 years agoDon't use `==` for definitions.
Simon Forman [Sun, 17 May 2020 23:02:43 +0000 (16:02 -0700)]
Don't use `==` for definitions.

4 years agoLog reset is less wordy.
Simon Forman [Sun, 17 May 2020 19:58:26 +0000 (12:58 -0700)]
Log reset is less wordy.

4 years agoSlightly more efficient to just print the string.
Simon Forman [Sun, 17 May 2020 18:51:59 +0000 (11:51 -0700)]
Slightly more efficient to just print the string.

4 years agoMake joy/gui/controllerlistbox.py compatible with Python 3.
Simon Forman [Sat, 16 May 2020 17:44:35 +0000 (10:44 -0700)]
Make joy/gui/controllerlistbox.py compatible with Python 3.

4 years agoPython 3.
Simon Forman [Sat, 16 May 2020 16:52:56 +0000 (09:52 -0700)]
Python 3.

4 years agoHow to start Thun under i3.
Simon Forman [Fri, 15 May 2020 14:36:25 +0000 (07:36 -0700)]
How to start Thun under i3.

Needs the filename corrected.

4 years agoIt must be a BytesIO.
Simon Forman [Fri, 15 May 2020 14:35:16 +0000 (07:35 -0700)]
It must be a BytesIO.

4 years agoTrying out a different dsiplay format.
Simon Forman [Fri, 15 May 2020 14:34:47 +0000 (07:34 -0700)]
Trying out a different dsiplay format.

4 years agoFormat lists properly.
Simon Forman [Sun, 10 May 2020 19:46:33 +0000 (12:46 -0700)]
Format lists properly.

4 years agoTry logging just the commands.
Simon Forman [Sun, 10 May 2020 19:18:34 +0000 (12:18 -0700)]
Try logging just the commands.

4 years agoI3 config with suggested layout.
Simon Forman [Sun, 10 May 2020 19:17:54 +0000 (12:17 -0700)]
I3 config with suggested layout.

Stack in upper left corner, log below in same width, scratch window takes up the rest.

4 years agoshow_stack in case you close the stack window.
Simon Forman [Sun, 10 May 2020 17:42:10 +0000 (10:42 -0700)]
show_stack in case you close the stack window.

4 years agoSet the font on the listbox.
Simon Forman [Sun, 10 May 2020 17:35:42 +0000 (10:35 -0700)]
Set the font on the listbox.

4 years agoRemove listbox try out script.
Simon Forman [Sun, 10 May 2020 15:38:37 +0000 (08:38 -0700)]
Remove listbox try out script.

4 years agoUpdate view of stack at start.
Simon Forman [Sun, 10 May 2020 15:36:05 +0000 (08:36 -0700)]
Update view of stack at start.

4 years agoConnect it up.
Simon Forman [Sun, 10 May 2020 15:28:49 +0000 (08:28 -0700)]
Connect it up.

Inelegant but functional.

4 years agoBring in the listbox widget with drag.
Simon Forman [Sun, 10 May 2020 02:09:23 +0000 (19:09 -0700)]
Bring in the listbox widget with drag.

You can drag items up and down to rearrange the list.

4 years agoWith i3 use separate windows again.
Simon Forman [Sun, 10 May 2020 00:31:40 +0000 (17:31 -0700)]
With i3 use separate windows again.

4 years agoVersion 0.3.0
Simon Forman [Wed, 29 Apr 2020 14:46:32 +0000 (07:46 -0700)]
Version 0.3.0

4 years ago`primrec` combinator in Prolog
Simon Forman [Tue, 5 May 2020 22:52:40 +0000 (15:52 -0700)]
`primrec` combinator in Prolog

Ticket #40375

4 years agoprimrec combinator
Simon Forman [Tue, 5 May 2020 22:22:12 +0000 (15:22 -0700)]
primrec combinator

Ticket #40375

4 years agoPut the log and scratch text in the same window.
Simon Forman [Sat, 2 May 2020 19:51:29 +0000 (12:51 -0700)]
Put the log and scratch text in the same window.

This is a step towards Ticket #40360 without going all the way.  You can
open additional viewer windows.  They are not connected by an
Oberon-style messaging system (yet.  It would be nice to use the Tk event
system for that.)

This way the log and the main/scratch/system-menu text are conceptually
unified in the (equivelent of "desktop") base metaphor of the system.

4 years agoPython is 3 now.
Simon Forman [Sat, 2 May 2020 06:09:09 +0000 (23:09 -0700)]
Python is 3 now.

4 years agoAdd Python 3 classifiers and ignore __pycache__ dirs.
Simon Forman [Wed, 29 Apr 2020 00:33:10 +0000 (17:33 -0700)]
Add Python 3 classifiers and ignore __pycache__ dirs.

4 years ago Closes Ticket #40371 Bump version number to 0.3.0
Simon Forman [Tue, 28 Apr 2020 22:46:32 +0000 (15:46 -0700)]
 Closes Ticket #40371 Bump version number to 0.3.0

4 years agoRebuild docs with Python 3 and Sphinx 3.0.2.
Simon Forman [Tue, 28 Apr 2020 22:37:49 +0000 (15:37 -0700)]
Rebuild docs with Python 3 and Sphinx  3.0.2.

4 years agoIndent with tabs.
Simon Forman [Tue, 28 Apr 2020 22:28:58 +0000 (15:28 -0700)]
Indent with tabs.

4 years agoTrace command.
Simon Forman [Tue, 28 Apr 2020 22:28:43 +0000 (15:28 -0700)]
Trace command.

Don't print trace by default, instead a new `trace` combinator wirks like `i` and prints a trace.

4 years agoRename primrec to tailrec.
Simon Forman [Tue, 28 Apr 2020 18:05:19 +0000 (11:05 -0700)]
Rename primrec to tailrec.

4 years agoFixes #38237 Sort out stack/unstack/enstacken/disenstacken
Simon Forman [Tue, 28 Apr 2020 17:42:09 +0000 (10:42 -0700)]
Fixes #38237 Sort out stack/unstack/enstacken/disenstacken

4 years agoSwitch the names of unstack and disenstacken.
Simon Forman [Tue, 28 Apr 2020 17:28:30 +0000 (10:28 -0700)]
Switch the names of unstack and disenstacken.

Part of Ticket #38237

Still need to update the docs.

4 years agoMake it easy to install the tools to build the docs.
Simon Forman [Sun, 26 Apr 2020 02:12:25 +0000 (19:12 -0700)]
Make it easy to install the tools to build the docs.

4 years agoMinor cleanup.
Simon Forman [Sun, 26 Apr 2020 01:41:26 +0000 (18:41 -0700)]
Minor cleanup.

4 years agoSome comments in gui.main.
Simon Forman [Sun, 26 Apr 2020 01:24:14 +0000 (18:24 -0700)]
Some comments in gui.main.

4 years agoFinally remove all mentions of the old polytypes module.
Simon Forman [Sat, 25 Apr 2020 22:59:31 +0000 (15:59 -0700)]
Finally remove all mentions of the old polytypes module.

It was merged with types long ago.

4 years agoFixes #40358 Help output could be better.
Simon Forman [Sat, 25 Apr 2020 22:08:58 +0000 (15:08 -0700)]
Fixes #40358 Help output could be better.

For now.  Add a header and footer.  Later on when I have per-function docs
it can look those up and print them (or open a viewer in the GUI.)

4 years agoMinor docs update.
Simon Forman [Sat, 25 Apr 2020 21:14:35 +0000 (14:14 -0700)]
Minor docs update.

4 years agoFixes #40345 automate publication of docs
Simon Forman [Sat, 25 Apr 2020 21:13:52 +0000 (14:13 -0700)]
Fixes #40345 automate publication of docs

With the help of a little tar script on the server and rsync.

4 years agoDon't automodule non-existent joy.utils.polytypes module.
Simon Forman [Sat, 25 Apr 2020 04:27:26 +0000 (21:27 -0700)]
Don't automodule non-existent joy.utils.polytypes module.

4 years agoMake all the docs.
Simon Forman [Sat, 25 Apr 2020 00:53:46 +0000 (17:53 -0700)]
Make all the docs.

4 years agoRebuilt some sphinx docs.
Simon Forman [Sat, 25 Apr 2020 00:21:08 +0000 (17:21 -0700)]
Rebuilt some sphinx docs.

4 years agoFixes: #38238 rename pushback to concat.
Simon Forman [Sat, 25 Apr 2020 00:12:46 +0000 (17:12 -0700)]
Fixes: #38238 rename pushback to concat.

4 years agoDepend on dulwich and future.
Simon Forman [Sat, 25 Apr 2020 00:11:24 +0000 (17:11 -0700)]
Depend on dulwich and future.

4 years agoSort the definitions in the library.
Simon Forman [Fri, 24 Apr 2020 23:13:05 +0000 (16:13 -0700)]
Sort the definitions in the library.

4 years agoRebuilt some docs. Minor edits.
Simon Forman [Fri, 24 Apr 2020 23:10:28 +0000 (16:10 -0700)]
Rebuilt some docs.  Minor edits.

4 years agoSomehow swoncat fell through the cracks.
Simon Forman [Fri, 24 Apr 2020 23:09:32 +0000 (16:09 -0700)]
Somehow swoncat fell through the cracks.

4 years agoMinor edits.
Simon Forman [Fri, 24 Apr 2020 20:27:13 +0000 (13:27 -0700)]
Minor edits.

4 years agoSwitch to tabs for indentation.
Simon Forman [Fri, 24 Apr 2020 19:48:15 +0000 (12:48 -0700)]
Switch to tabs for indentation.

Instead of a mix of 2- and 4-space tabs just use actual tabs.  ;-P

4 years agoFixes: #40354 Don't hardcode my own name and email as autosave committer.
Simon Forman [Fri, 24 Apr 2020 19:28:59 +0000 (12:28 -0700)]
Fixes: #40354 Don't hardcode my own name and email as autosave committer.

4 years agoFixes: #40355 Lookup bytes no good.
Simon Forman [Fri, 24 Apr 2020 19:05:39 +0000 (12:05 -0700)]
Fixes: #40355 Lookup bytes no good.

4 years agoPickle protocol 2.
Simon Forman [Fri, 24 Apr 2020 18:58:43 +0000 (11:58 -0700)]
Pickle protocol 2.

4 years agoDulwich expects bytes not str.
Simon Forman [Fri, 24 Apr 2020 18:57:11 +0000 (11:57 -0700)]
Dulwich expects bytes not str.

4 years agoFixes #40353 TypeError: must be str or None, not bytes
Simon Forman [Fri, 24 Apr 2020 18:45:16 +0000 (11:45 -0700)]
Fixes #40353 TypeError: must be str or None, not bytes

4 years agoFixes #40352 write() argument must be str, not bytes
Simon Forman [Fri, 24 Apr 2020 18:24:56 +0000 (11:24 -0700)]
Fixes #40352 write() argument must be str, not bytes

4 years agoMake sure joy.gui.main.__doc__ is at the top of the module.
Simon Forman [Fri, 24 Apr 2020 17:47:23 +0000 (10:47 -0700)]
Make sure joy.gui.main.__doc__ is at the top of the module.

4 years agoRemove `__next__`.
Simon Forman [Fri, 24 Apr 2020 17:32:48 +0000 (10:32 -0700)]
Remove `__next__`.

4 years agoAttributeError: 'itertools.count' object has no attribute '__next__'
Simon Forman [Fri, 24 Apr 2020 17:10:50 +0000 (10:10 -0700)]
AttributeError: 'itertools.count' object has no attribute '__next__'

4 years agoOpen stack pickle file in binary mode.
Simon Forman [Fri, 24 Apr 2020 17:10:30 +0000 (10:10 -0700)]
Open stack pickle file in binary mode.

4 years agoread text from REPL, don't eval
Simon Forman [Fri, 24 Apr 2020 07:03:32 +0000 (00:03 -0700)]
read text from REPL, don't eval

4 years agoPEP 518
Simon Forman [Fri, 24 Apr 2020 07:00:59 +0000 (00:00 -0700)]
PEP 518

4 years agoFake brutal_hackery on Py3.
Simon Forman [Fri, 24 Apr 2020 07:00:41 +0000 (00:00 -0700)]
Fake brutal_hackery on Py3.

Because I'm not about to try to figure it out tonight.

4 years agofuturize stage2 vui
Simon Forman [Fri, 24 Apr 2020 06:44:29 +0000 (23:44 -0700)]
futurize stage2 vui

4 years agofuturize stage2 gui
Simon Forman [Fri, 24 Apr 2020 06:38:10 +0000 (23:38 -0700)]
futurize stage2 gui

4 years agofuturize stage2 core
Simon Forman [Fri, 24 Apr 2020 06:33:23 +0000 (23:33 -0700)]
futurize stage2 core

4 years agofuturize stage2 core
Simon Forman [Fri, 24 Apr 2020 06:28:24 +0000 (23:28 -0700)]
futurize stage2 core

4 years agofuturize stage1 vui
Simon Forman [Fri, 24 Apr 2020 06:22:45 +0000 (23:22 -0700)]
futurize stage1 vui

4 years agofuturize stage1 gui
Simon Forman [Fri, 24 Apr 2020 06:19:29 +0000 (23:19 -0700)]
futurize stage1 gui

4 years agofuturize stage1 core
Simon Forman [Fri, 24 Apr 2020 06:16:45 +0000 (23:16 -0700)]
futurize stage1 core

4 years agoFixes #38239 rename parameter of stack.pick()
Simon Forman [Fri, 24 Apr 2020 04:39:29 +0000 (21:39 -0700)]
Fixes #38239  rename parameter of stack.pick()

4 years agoIgnore build and virtual env ("venv").
Simon Forman [Fri, 24 Apr 2020 01:59:12 +0000 (18:59 -0700)]
Ignore build and virtual env ("venv").

4 years agoBetter instuctions for running docs notebooks.
Simon Forman [Fri, 24 Apr 2020 01:53:32 +0000 (18:53 -0700)]
Better instuctions for running docs notebooks.

4 years agoHacked up the Prolog compiler code.
Simon Forman [Thu, 23 Apr 2020 22:58:38 +0000 (15:58 -0700)]
Hacked up the Prolog compiler code.

4 years agoDelete a pyc file.
Simon Forman [Thu, 23 Apr 2020 22:25:54 +0000 (15:25 -0700)]
Delete a pyc file.

4 years agoCrap, and stuff.
Simon Forman [Thu, 23 Apr 2020 22:18:11 +0000 (15:18 -0700)]
Crap, and stuff.

4 years agoShortcircuit Boolean combinators.
Simon Forman [Thu, 23 Apr 2020 22:15:36 +0000 (15:15 -0700)]
Shortcircuit Boolean combinators.

4 years agoSome comments.
Simon Forman [Thu, 23 Apr 2020 22:14:36 +0000 (15:14 -0700)]
Some comments.

4 years agoMinor edits.
Simon Forman [Fri, 31 Jan 2020 20:06:31 +0000 (12:06 -0800)]
Minor edits.

4 years agoMinor edits.
Simon Forman [Fri, 31 Jan 2020 20:01:13 +0000 (12:01 -0800)]
Minor edits.

4 years agoRemove unused predicates appears_only_once/2 and reg_used_once/2.
Simon Forman [Fri, 31 Jan 2020 16:30:10 +0000 (08:30 -0800)]
Remove unused predicates appears_only_once/2 and  reg_used_once/2.

4 years agoFreeing registers before using them is simpler.
Simon Forman [Fri, 31 Jan 2020 16:26:10 +0000 (08:26 -0800)]
Freeing registers before using them is simpler.

https://todo.sr.ht/~sforman/thun-der/3

4 years agoPartial reduction for combinator rule works after all.
Simon Forman [Thu, 30 Jan 2020 18:25:12 +0000 (10:25 -0800)]
Partial reduction for combinator rule works after all.

It just looked weird to me and I didn't think it through.
Once I checked it I realized it was okay.

4 years agoUncovered and fixed a subtle bug in free_reg//3.
Simon Forman [Wed, 29 Jan 2020 19:04:22 +0000 (11:04 -0800)]
Uncovered and fixed a subtle bug in free_reg//3.

non_alloc/1 for words that don't change the ref count of registers and can be delegated to their semantic relation.

4 years agoCons. I should research Lisp compilers...
Simon Forman [Wed, 29 Jan 2020 17:48:08 +0000 (09:48 -0800)]
Cons.  I should research Lisp compilers...

I think I should emit high-level code and reduce it to actual
machine code later under whatever model (cons cell heap, etc.)

4 years agoAdd assoc to kinda sorta track the values in the registers.
Simon Forman [Wed, 29 Jan 2020 02:04:51 +0000 (18:04 -0800)]
Add assoc to kinda sorta track the values in the registers.

But it doesn't update e.g. if you add two numbers, the value int(N) stays the same.

It could be modified to track the value as it computes?  But then why keep them in registers at all? Sometimes a value must arrive at runtime, eh?

4 years agoswap, pop, and +
Simon Forman [Wed, 29 Jan 2020 01:16:17 +0000 (17:16 -0800)]
swap, pop, and +

compiling is tricky

4 years agodup, add_ref/3.
Simon Forman [Tue, 28 Jan 2020 20:44:19 +0000 (12:44 -0800)]
dup, add_ref/3.

4 years agoTHread through a context to track registers.
Simon Forman [Tue, 28 Jan 2020 20:24:04 +0000 (12:24 -0800)]
THread through a context to track registers.

It seems to work to allocate and free registers with a kind of reference counting
by membership in an auxilliary list.

4 years agoSort of compile '+'.
Simon Forman [Tue, 28 Jan 2020 19:01:28 +0000 (11:01 -0800)]
Sort of compile '+'.

4 years agoMove immediate to register for int literal.
Simon Forman [Tue, 28 Jan 2020 18:46:38 +0000 (10:46 -0800)]
Move immediate to register for int literal.

4 years agoblep.
Simon Forman [Tue, 28 Jan 2020 18:37:13 +0000 (10:37 -0800)]
blep.

4 years agoA start on machine code generation.
Simon Forman [Tue, 28 Jan 2020 18:21:37 +0000 (10:21 -0800)]
A start on machine code generation.

Just the initial messing around...