Hy: A dialect of Lisp that's embedded in Python

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • OPS - Build and Run Open Source Unikernels
  • Scout APM - Less time debugging, more time building
  • GitHub repo hy

    A dialect of Lisp that's embedded in Python

    I spent some time with Hy about a year back, and that is the impression I brought away. In order to maintain good interop with Python, they had to make a lot of compromises about how things work in Hy, relative to what a Lisper might expect. The most striking example I can think of offhand is that `let` had to get banished from the standard library: https://github.com/hylang/hy/issues/844

    That said, Hy is still a nice language, and very well thought out. It's just that billing it as a lisp dialect for Python (as the project's website does) might lead to some false expectations. That GH thread I linked above is a great example of this. There's a lot of good, careful thought going into the design of the language. But it also has this sentence in the opening comment: "Hy is not Clojure, nor Common Lisp, but homoiconic Python." If you're interested in a Python variant with good macro system, this is it.

  • GitHub repo mal

    mal - Make a Lisp

  • SonarLint

    Deliver Cleaner and Safer Code - Right in Your IDE of Choice!. SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.

  • GitHub repo awesome-functional-python

    A curated list of awesome things related to functional programming in Python.

    Cool, I thought it was dead (like the fictional character called, coincidently, "Snake"). I see that active development has restarted 6 months ago, seemingly. Kudos to everyone involved, specially @Kodiologist who seems the main contributor over the recent period.

    (Shameless plug: more functional languages that look like Python, or compile to one of the Python VMs: https://github.com/sfermigier/awesome-functional-python#lang... ).

  • GitHub repo astor

    Python AST read/write

    There are code which takes the Python AST and attempts to produce the correct Python code. It has a few issues if i recall correctly but it should mostly^tm work.


  • GitHub repo hy-lisp-python

    examples for my book "A Lisp Programmer Living in Python-Land: The Hy Programming Language"

    If you do not use the contributed “let” macro, then auto generated Python code from Hy source code looks fine. If you look at the GitHub repo for the Hy book I wrote, you will see a Makefile target for generating Python code from the Hy examples: https://github.com/mark-watson/hy-lisp-python

  • GitHub repo hyLittleSchemer

    Little Schemer in Hy

    I worked through the first four chapters of The Little Schemer in Hy a bunch of years ago: https://github.com/andybp85/hyLittleSchemer

    I moved on to Racket shortly after (which I sadly don't use nearly as much as I should these days), but that work definitely made me a far better programmer!

  • GitHub repo gomacro

    Interactive Go interpreter and debugger with REPL, Eval, generics and Lisp-like macros

    I keep meaning to play with https://github.com/cosmos72/gomacro

  • OPS

    OPS - Build and Run Open Source Unikernels. Quickly and easily build and deploy open source unikernels in tens of seconds. Deploy in any language to any cloud.

  • GitHub repo hissp

    It's Python with a Lissp.

  • GitHub repo hebigo

    蛇語(HEH-bee-go): An indentation-based skin for Hissp.

    What about a Lissp-Hebigo pair? https://github.com/gilch/hissp#hebigo

    Hissp takes a different approach than Hy. Where Hy has to use shims to pretend statements are expressions, Hissp just targets the expression subset in the first place. (Actually a somewhat smaller subset than that if you're not injecting any raw Python: literals, lambdas, identifiers, and calls.)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts