Clojure – Differences with Other Lisps

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

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

    A dynamic language and bytecode vm

  • lumo

    Discontinued Fast, cross-platform, standalone ClojureScript environment

  • 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
  • babashka

    Native, fast starting Clojure interpreter for scripting

  • sci

    Configurable Clojure/Script interpreter suitable for scripting and Clojure DSLs

  • cloture

    Clojure in Common Lisp

  • ferret

    Ferret is a free software lisp implementation for real time embedded control systems. (by nakkaya)

  • etaoin

    Pure Clojure Webdriver protocol implementation

  • For Clojure on the JVM I've seen etaoin (https://github.com/igrishaev/etaoin) and there's clj-chrome-devtools (https://github.com/tatut/clj-chrome-devtools). I would ask on Clojureverse or the Clojure Slack/Zulip for opinions.

    For ClojureScript I guess there's lots of options since you can access the Javascript ecosystem.

    One of the benefits of being hosted is that we can always fall back on the host language's options.

  • 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
  • clj-chrome-devtools

    Clojure API for controlling a Chrome DevTools remote

  • For Clojure on the JVM I've seen etaoin (https://github.com/igrishaev/etaoin) and there's clj-chrome-devtools (https://github.com/tatut/clj-chrome-devtools). I would ask on Clojureverse or the Clojure Slack/Zulip for opinions.

    For ClojureScript I guess there's lots of options since you can access the Javascript ecosystem.

    One of the benefits of being hosted is that we can always fall back on the host language's options.

  • rich4clojure

    Practice Clojure using Interactive Programming in your editor

  • I've been messing with Clojure/ClojureScript for a few years having previously had zero Lisp experience. Overall, I think Clojure does a good job of being both practical and lispy. It's a language that is for building real things.

    I've been focusing on ClojureScript (https://clojurescript.org/) as you get the benefit of interoperating with the Javascript ecosystem. The fact that there's a strong community around both Javascript hosted and Java hosted gives a wealth of library options.

    Overall, the tooling has been getting a lot closer to the sort of experience that contemporary developers expect. The Calva plugins integration with Visual Studio (https://calva.io/) makes it easy to get started - you can even run it online with gitpod (https://github.com/PEZ/rich4clojure).

    That just leaves learning the language - the slight changes in syntax (brackets for different data types) definitely help early on, and for the most part Clojure discourages people going down the path of macros which means reading other peoples code is reasonably accessible. The main struggle is that it's a language used by a lot of advanced or full-time developers, so documentation is pretty dense and it can take a real commitment to understand the detail.

    It may not be 'correct' enough if you're coming from other Lisps, but coming the other way from C/Python etc I've found it an accessible and practical option.

  • joker

    Small Clojure interpreter, linter and formatter.

  • hy

    A dialect of Lisp that's embedded in Python

  • > Is this surprising? I don't see an ecosystem of languages targeting the Go runtime, in contrast to the JVM, Javascript, Erlang, MS CLR...

    I think I'm surprised in general that no language targets the Go runtime. A ML built on Go could probably be popular, lots of people would like features from it.

    Not exactly bytecode but Hy https://github.com/hylang/hy is a dialect of Lisp that compiles to Python.

  • talk-transcripts

    Transcripts of Clojure-related talks

  • There's two main aspects to the claim. The first is Clojure's general stance against "place-oriented programming" that ties in with its immutable-by-default data structures. A good talk is https://github.com/matthiasn/talk-transcripts/blob/master/Hi...

    The second is more specific. In Clojure, symbols are just names. When the compiler encounters a symbol, and it's not a special java kind or a local, it'll try to lookup that symbol in a Namespace map, and return a Var. The Var is where the storage is, the symbol is just a name to find it. Re-def'ing the symbol doesn't change anything about the old Var, it just associates the symbol with a new Var. In CL though, symbols are themselves objects that have attributes (http://www.lispworks.com/documentation/HyperSpec/Body/t_symb...) which store data. If you (inspect 'a) you'll see it has a string name, package, and an empty value, function, and plist. When you (defparameter a 8) and inspect 'a again, you'll see it has a value attribute of 8. You can then (defun a ()) and inspect again, and see both the value and function attributes are set.

    Part of Clojure symbols being just names, means they aren't owned by any namespace. If you have three namespaces with functions that return 'foo, they will all be value-equal to each other. You can also make a symbol with a namespace part 'some-ns/foo and even if some-ns isn't a namespace that exists, it's still a valid name. In CL by contrast, if you create three functions in three different packages returning 'foo, they will not be value-equal. And if you try to reference a symbol in 'some-package:foo when the package doesn't exist, you'll get an error.

    Clojure symbols are not storage-equal though: (identical? 'foo 'foo) is false. In CL though, in the same package, (eq 'a 'a) is true.

    Some consequences: another feature is Clojure's syntax-quote ` for macros will automatically include the symbol's full namespace, e.g. if you (ns a) and quote 'inc or 'a you'll get inc and a back, but if you syntax-quote `inc and `a you'll get back clojure.core/inc and a/a respectively. This helps reduce the chance of name collisions. Another consequence is that since symbols don't belong to namespaces in Clojure, you don't have to worry about a CL behavior of polluting your package's namespace with a bunch of symbols.

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