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.
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.)
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.
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.
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.
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.
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.)