Commit Graph

78 Commits

Author SHA1 Message Date
Simon Forman 4de5f767e9 OMG bug!
This lingered awhile eh?
2021-11-19 10:47:13 -08:00
Simon Forman 7f193fbdbe This brings Python Joy into congruence with Nim.
It's hacky.  I edited the generated file.  The more complicated
functions like popop will not generate the same errors as the Nim
versions.  This is only congruence in the sense that the current jtest
suite passes identically on both.

Ideally I should be generating both the Nim and Python code from the
Prolog compiler.
2021-04-09 18:01:07 -07:00
Simon Forman 810a6afdbb Bring it inline with Nim version.
See https://git.sr.ht/~sforman/joytest
2021-04-09 17:32:51 -07:00
Simon Forman 49bcab2e91 Correct i combinator. 2021-04-09 17:13:09 -07:00
Simon Forman fbdd79a8db Integer division only please. 2021-04-09 17:04:54 -07:00
Simon Forman 227e8b124b Bringing it in line with Nim version. 2021-04-09 16:58:38 -07:00
Simon Forman 65b2b4a7e3 Switch back to spaces for indentation.
For better or worse, Python 3 won.  No need to be shitty about it, eh?
2021-04-09 16:16:34 -07:00
Simon Forman 5a2758b50d Derp! I forgot to modify the built-in defs to use "==". 2020-12-19 23:37:39 -08:00
Simon Forman 40a627b5ca Let '==' separate names from definition bodies. 2020-12-17 22:06:28 -08:00
Simon Forman ffabda0407 Update some of the docs. 2020-05-20 19:15:47 -07:00
Simon Forman 6a6b63bf62 Fix indentation in library docstrings. 2020-05-20 16:09:19 -07:00
Simon Forman 95cd1e6cc6 round 2020-05-18 20:48:30 -07:00
Simon Forman eb42220b69 Minor cleanup. 2020-05-18 20:37:58 -07:00
Simon Forman caa3cb9a1f Let's simplify. 2020-05-18 20:00:00 -07:00
Simon Forman d158157132 Rip out type code from the library. 2020-05-18 19:07:07 -07:00
Simon Forman 56da4690d0 Rebuild docs 2020-05-17 16:40:58 -07:00
Simon Forman 2c75a0d858 Don't use `==` for definitions. 2020-05-17 16:02:43 -07:00
Simon Forman 76ac5eca94 Trying out a different dsiplay format. 2020-05-15 07:34:47 -07:00
Simon Forman 07d94a1fad primrec combinator
Ticket #40375
2020-05-05 15:22:12 -07:00
Simon Forman 4704799c37 Rename primrec to tailrec. 2020-04-28 11:05:19 -07:00
Simon Forman 750f498512 Fixes #38237 Sort out stack/unstack/enstacken/disenstacken 2020-04-28 10:42:09 -07:00
Simon Forman fac2d2ae5f Switch the names of unstack and disenstacken.
Part of Ticket #38237

Still need to update the docs.
2020-04-28 10:28:30 -07:00
Simon Forman cdff2ea5ea 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.)
2020-04-25 15:08:58 -07:00
Simon Forman 9f36207fe3 Sort the definitions in the library. 2020-04-24 16:13:05 -07:00
Simon Forman 1863cba7f7 Somehow swoncat fell through the cracks. 2020-04-24 16:09:32 -07:00
Simon Forman 078f29830d Switch to tabs for indentation.
Instead of a mix of 2- and 4-space tabs just use actual tabs.  ;-P
2020-04-24 12:48:15 -07:00
Simon Forman 2fb610e733 Fixes: #40354 Don't hardcode my own name and email as autosave committer. 2020-04-24 12:28:59 -07:00
Simon Forman 6fe11aa205 Remove `__next__`. 2020-04-24 10:32:48 -07:00
Simon Forman c9082be37d AttributeError: 'itertools.count' object has no attribute '__next__' 2020-04-24 10:10:50 -07:00
Simon Forman 9ca5b24fd1 Fake brutal_hackery on Py3.
Because I'm not about to try to figure it out tonight.
2020-04-24 00:00:41 -07:00
Simon Forman e758d7d2be futurize stage2 core 2020-04-23 23:28:24 -07:00
Simon Forman b0df80f3e6 futurize stage1 core 2020-04-23 23:16:45 -07:00
Simon Forman 0588496ca5 Minor cleanup. 2019-12-03 08:41:42 -08:00
Simon Forman f58f3b9959 Definition of ii combinator.
ii == [dip] dupdip i

         a [F] ii
      --------------
          F a F
2019-11-07 07:53:21 -08:00
Simon Forman df5ddb8ad9 Some trailing whitespace or something. 2019-08-09 09:28:15 -07:00
Simon Forman 84a2de7790 Tiny edits. Almost nothing. 2019-07-21 07:32:20 -07:00
Simon Forman c4c6ece6d2 Add bool function to mimic Python semantics. 2019-07-16 08:41:28 -07:00
Simon Forman 0359cd64c7 Very minor docs change. 2019-07-15 15:50:22 -07:00
Simon Forman b27adb7e1c Remove some trailing blankspace. 2018-11-28 13:00:03 -08:00
Simon Forman 3e6a49ac27 The version of Python with Anaconda is lightly newer. 2018-08-24 16:46:18 -07:00
Simon Forman c88e00ecd0 Add binary functions. 2018-08-02 14:22:42 -07:00
Simon Forman 4ed8422258 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.
2018-07-22 11:50:34 -07:00
Simon Forman ca06c626e1 Loop and while combinators. 2018-07-20 12:33:06 -07:00
Simon Forman b89754a30b Futzing with types. 2018-07-19 15:37:35 -07:00
Simon Forman 008b74aef8 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.
2018-07-19 15:18:42 -07:00
Simon Forman dea6cbc8c2 Working to get types right. 2018-07-19 12:38:19 -07:00
Simon Forman 6576e1a431 Fix TextJoyType inheritance. 2018-07-18 17:47:19 -07:00
Simon Forman 49941f9a33 Log types at startup. 2018-07-18 17:06:51 -07:00
Simon Forman 8ad4ab791b Removing polytypes; some pylint hints. 2018-07-18 14:55:39 -07:00
Simon Forman 7607ca7650 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.)
2018-07-17 20:52:57 -07:00