Why Hy?

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • awesome-cl

    A curated list of awesome Common Lisp frameworks, libraries and other shiny stuff.

  • This set of jupyter + autoreloads + editor features might get you close, but you won't be on par to CL's level. I'm thinking about CL's interactive debugger, and about language features that were thought with interactivity in mind. On an error, you get the interactive debugger, you can explore the stack frames and get to the erroneous function, change it, recompile it, come back to the debugger and ask it to resume progress from this point, and see execution pass. You didn't have to re-run the whole operation. If we can do that in Python, I've been in my cave for too long^^ As such, this is how debugging a complex program looks like in Python vs in CL: https://lisp-journey.gitlab.io/images/debugging-python-VS-li... (Ravenpack [1] is a company that does big data analysis and that uses CL, they gave some talks, maybe you'll find more practical reasons from them)

    for the second point: https://mikelevins.github.io/posts/2020-12-18-repl-driven/

    There might be more CL libraries than you think: https://github.com/CodyReichert/awesome-cl but I'm not that a zealot to say you can ignore Python's ecosystem, especially in certain areas…

    [1]: https://www.ravenpack.com/

  • hy-mode

    Hy mode for Emacs

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • py4cl

    Call python from Common Lisp

  • I encourage people to try out Common Lisp because, unlike with Hy, you will get: speed, ability to build binaries, truly interactive image-based development (yes, more interactive than ipython), more static type checks, more language features (no closures in Hy last time I checked), language stability… To reach to Python libs, you have https://github.com/bendudson/py4cl My comparison of Python and CL: https://lisp-journey.gitlab.io/pythonvslisp/

  • hy

    A dialect of Lisp that's embedded in Python

  • It's been implemented, found to be subtly broken, and re-implemented a number of times. Ultimately trying to impose a different model of scoping on top of Python's scoping is living in a state of sin; thus the difficulties. The status quo is an apparently working `let` due to a truly heroic effort by Sunjay Cauligi ( https://github.com/hylang/hy/pull/2125 ). You're encouraged to try to find bugs in it.

    In truth, I've never understood the fuss about `let`. It's taken a huge amount of Hy development effort, but it adds very little. Python's native scoping works well in the large majority of cases, and in tricky cases, I'd rather use `nonlocal` or `global` explicitly so I'm sure what's happening at the level of Python semantics. I suspect that people who heard that previous versions of Hy were missing `let` assumed that some other feature (such as nested lexical scopes) was also missing that has actually always been there.

  • basilisp

    A Clojure-compatible(-ish) Lisp dialect targeting Python 3.8+

  • coalton

    Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.

  • Not so easy question, especially because it depends of the implementation, but SBCL gives pretty good static type errors and warnings. Mostly, you get warnings at the function boundaries. It isn't complete like type checking in the modern languages, but it helps catch many errors. And quickly & interactively, because we compile our functions as we write them, with a keystroke (or the whole file, and from time to time, we build the whole project from scratch). So, coming from Python, that was superbly useful to me. This, everybody uses it. We can also add gradual typing to our variables and functions. It might help for the static checks, and it also gives hints for the compiler to speed things up. We can also declare our own types, but these won't be used for compile-time inference.

    For a type-racket equivalent, we now have Coalton, it's like a Haskell on top of CL: https://github.com/coalton-lang/coalton/ Its author says:

    --

    Take this with a grain of salt, because I’m neither a user nor expert of Typed Racket, but:

        Typed Racket focuses more on the gradual typing of a given program. It has lots of features to make that easier, such as occurrence typing. Coalton is a separate, embedded language.

  • pgcharts

    Turn your PostgreSQL queries into Charts

  • BTW, about Postgres, data, web app… pgcharts, that turns queries into charts: https://github.com/dimitri/pgcharts is written in CL :) Speaking of Postgres, pgloader was re-written from Python to CL, here's why: https://tapoueh.org/blog/2014/05/why-is-pgloader-so-much-fas...

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • ghdl

    Binary Manager for Github Releases (by natrys)

  • This encouraged me to go back and get a two year old small project up to scratch with current Hy:

    https://github.com/natrys/ghdl

    I definitely had fun writing that in Emacs/hy-mode. And indeed having access to Python ecosystem is neat. However, if I may:

    - I didn't get to use any intellisense, which was quite painful. Is there any Language Server for Hy now?

    - I think Hy tends to break with every Python minor release, which is a bit annoying. Stable is still broken on 3.10, and alpha is a big change.

    - This one might be a matter of subjectivity but I felt that Hy is trying to be more "pythonic" and less "lispy", and I am not sure what to feel about that. For example, familiar things like `&kwargs` or `&optional` seems to have got replaced with something less familiar (particularly, change to `#*` for keyword arguments spurred this though).

  • mgl

    Common Lisp machine learning library. (by melisgl)

  • clml

    Common Lisp Machine Learning Library

  • higgsml

    Discontinued The winning solution to the The Higgs Boson Machine Learning Challenge.

  • jedhy

    Autocompletion and code introspection for Hy.

  • damascus-tools

  • Hissp is an alternative approach. Unlike Hy, which compiles to Python AST, Hissp compiles to Python, so it doesn't break with every Python release.

    Its read language (Lissp) doesn't have an Emacs mode (yet), but its syntax is so close to traditional Lisps that lisp-mode pretty much works. No completions either. There is Lily https://github.com/mjobuda/damascus-tools/tree/main/lily, which proved Jedi works on Lissp, but it's never quite worked right.

    Hissp leans more Lispy than Pythonic compared to Hy, but still prioritizes interop, so the object model is still Python's.

  • cmu-infix

    Discontinued Updated infix.cl of the CMU AI repository, originally written by Mark Kantrowitz [Moved to: https://github.com/quil-lang/cmu-infix] (by rigetti)

  • People who write that much math can use a reader macro for infix notation: https://github.com/rigetti/cmu-infix

  • hissp

    It's Python with a Lissp.

  • hebigo

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

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
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