Wy offers parentheses-less syntax for hy lang by usage of indents and set of special symbols.
Wy does not change anything about hy rather than removing parentheses.
Wy uses wy2hy transpiler to produce *.hy files from *.wy files. You then treat generated *.hy files just like normal *.hy files.
Example code in wy (left column):
defn #^ int | (defn #^ int
\fibonacci [#^ int n] | fibonacci [#^ int n]
if : <= n 1 | (if (<= n 1)
\n | n
+ : fibonacci : - n 1 | (+ (fibonacci (- n 1))
fibonacci : - n 2 | (fibonacci (- n 2)))))Example code from real project:
Wy also offers special one-liners syntax, which provides variability in styling of the same expression:
; vanilla hy-code style (parsed as-is):
(map (fn [x y] (+ x y)) xs ys)
; basic style:
map : fn [x y] (+ x y)
\xs
\ys
; one-liners style:
map $ fn [x y] : + x y , \xs ysMore examples: /examples
Don't be afraid to try Wy:
- wy2hy produces hy-code with 1-to-1 line correspondence to source wy-code:
- You'll get meaningfull number lines in trace messages when raising exceptions in transpiled *.hy files
- If you decide that Wy is not your cup of tea, just take your transpiled *.hy files and continue from there
- wy2hy produces user-friendly error messages when transpilation fails
- Wy works with all 25 kinds of hy parenthesis (including those that are used for macros)
- You can freely mix Wy and Hy code (wy2hy transpiles correct hy expressions as-is)
- All the edge cases (that I could think of) are covered in the testing suite
- Wy and wy2hy are fully documented and ready-to-use
Also:
- Wy comes with
%wymagic for ipython - Wy-code can be called directly from Python (by importing
transpile_wy2hyfunction)
What not to like?
Why would you do such a thing?
Because nothing is sacred, not even your parens.
In short:
- Full access to Python ecosystem ->
Python - LISP macros, homoiconicity and stuff ->
hy - No parentheses ->
wy
Of high priority:
- Make TAB length configurable (currently TAB is hardcoded to be 4 spaces wide)
for now convert tabs to spaces before transpiling if you want tabs to be of another lengths
- Allow unicode chars in names
unicode symbols are currently only allowed inside strings and comments
- Forbid unmatched hy brackets and unmatched double-quotas
currently parser may behave unexpectedly when those are found
- Add shebang line recognition
I consider current transpilation speed reasonable, so increasing performance is of low priority. Upon installing wy2hy first run will be slow (because hy needs to compile all the macroses), but any subsequent runs are of normal speed.
On my 2020 year laptop, transpiling 300 LOC wy-file requires ~0.5s of hy/py-startup time and ~0.5s of transpilation time. Meh, but reasonable.
wy syntax:
running wy code:
Using pip:
pip install git+https://github.com/rmnavr/wy.git@main
Using uv:
uv add git+https://github.com/rmnavr/wy.git@main
Dependencies:
- python >= 3.9 (tested with 3.9 and 3.10)
- ipython (tested with 8.18.1 and some 9 version)
- hy (tested with 1.0.0 and 1.1.0)
- pyparsing (tested with 3.0.9)
- funcy (tested with 2.0)
- lenses (tested with 1.2.0)
- termcolor (tested with 3.1.0)
- Version 0.5.1 (13 jan 2026)
- noticeably increased startup time due to removing pydantic and hyrule requirement
- Version 0.5.0 (17 nov 2025)
- for user:
- added meaningfull error messages for wy2hy
- added
hy_,wyandwy_spymagics to ipython - updated wy2hy API
- internally:
- updated parser
- added testing suite for backend and frontend
- written devdoc on app Architecture
- for user:
- Version 0.3.0 (04 aug 2025)
- first public release