Navigation
- README
- Pure-Python feature set
- Syntactic macro feature set
- Examples of creating dialects using
mcpyrate - REPL server
- Troubleshooting
- Design notes
- Essays
- Additional reading
- Contribution guidelines
Table of Contents
The dialects subsystem of mcpyrate makes Python into a language platform, à la Racket.
It provides the plumbing that allows to create, in Python, dialects that compile into Python
at macro expansion time. It is geared toward creating languages that extend Python
and look almost like Python, but extend or modify its syntax and/or semantics.
Hence dialects.
As examples of what can be done with a dialects system together with a kitchen-sink language extension macro package such as unpythonic, we currently provide the following dialects:
- Lispython: The love child of Python and Scheme
- Listhell: It's not Lisp, it's not Python, it's not Haskell
- Pytkell: Because it's good to have a kell
- BF: The classical human-incomprehensible automaton
Lispython, Listhell, and Pytkell are AST-transforming dialects, built on top of unpythonic's macro layer. All three support unpythonic's continuations block macro, to add call/cc to the language; but it is not enabled automatically. BF is a source-to-source compiler — the body of a BF file is not parseable as Python — and demonstrates the other half of mcpyrate's dialect system.
Mostly, these dialects are intended as a cross between teaching material and a (fully functional!) practical joke, but Lispython may occasionally come in handy.