The future directions I want clojure to take • Basilisp (clojure on python vm) • Cherry (clojure to es6 module compiler) • Clojure to WASM compiler after https://component-model.bytecodealliance.org/ is finished
Not sure what you mean. Aren't at least the first two already being pursued?
Are you planning to act on any of those, or is this just a generalized wish list? WASM seems to be one of the with the most significant upside, but also the biggest unknown; I don’t know too much about WASM. It appears to have a lot of micro-hype. Still, I would love anyone knowledgeable to chime in with the current state of affairs in terms of performance, quality of GC with WASM, or any other relevant viability issues.
I want money, time, and attention backing basilisp, cherry, and clojure to wasm compiler. Clojure and clojurescript already have a lot of money and manpower backing them. Right now, basilisp and cherry aren't thriving. This is just my personal wish list.
#basilisp #cherry #clojure-wasm #wasm all exist so you can ask in each of those how/if they are funded and what can the community do to help grow the user base. GitHub sponsorship by more individuals might be a good starting point? I guess there's an element of #spam-reports too around these projects. Personally, I have zero interest in those three. I'm more interested in seeing uptake of Squint than Cherry (I'm probably more interested in Squint than ClojureScript, TBH). And Clojure on the JVM has proven very solid for me for fifteen years for backend work. I think Jank and Basilisp etc are fascinating projects but I'm not their target audience.
Why squint?
Narrows the distance between cljs syntax and js semantics -- makes it easy to add "cljs" to an existing js codebase, We have a massive React.js codebase at work -- I'd love to write new components in cljs without having to deal with the cljs/js data structure impedance (and I've tried it -- it works very nicely). Full-on cljs is harder to integrate into existing js like that.
So, squint is suitable for javascript-centric projects. Cherry is still experimental. ClojureScript is good(?) for new projects. I think I will go with ClojureScript for my new project. Clojure + ClojureScript(re-frame, ...). I think ClojureScript is fine as long as javascript is minimized. I can't wait for neither cherry nor the non-existing clojure webassembly compiler.
I'm curious what the appeal of basilisp is, given all the work done on clj-python, and scicloj stuff?
clj-python has bugs for long-running processes. I'd rather use plain python directly at this point because basilisp isn't yet ready although it is usable inside python venv. clj-python is more suitable for data science rather than long-running production servers.
Given how rock solid and heavily optimized the JVM is for long-running production servers, especially with multi-threaded support, I can't see much value in using Python for that. I thought you were interested due to data science but apparently not.
I mean a long-running python server. You can have that in JVM through clj-python, but clj-python has issues.
Right, but why I guess is what I'm asking?
Why Python instead of the JVM for such processes?
LLM inference server. Python has monopoly on LLM and AI.
Hardly a monopoly but I will concede it is popular among some folks 🙂
For production, python is the only option.
That is objectively just not true. Perhaps in your opinion or perhaps in your specific circumstances.
I mean if you want to run LLM inference fast and cheaply, python is the top player. Other languages don't even come close.
So, it makes sense to use python for just LLM and AI.
So I guess, for you, it would be worthwhile to contribute to Basilisp -- through code, documentation, or sponsorship?
I have neither time nor money for now.
Well, the situation is not magically going to change, without folks stepping up -- and that has to come from the folks who are vested in the success of it, which it sounds like you are.
If my online business becomes successful, then maybe I can sponsor basilisp.
Amano, that’s really not true at all. Run LLM inference “fast” and “cheap”? No way Python is the top player for performance. And it doesn’t make sense at all.
I don’t know too much about that space, but a few years back, I did do a bit of ML, and, yes, Python is by far the most widely supported in terms of ease-of-use. That being said, it probably just calls to some C libraries, so it’s not unthinkable that it can go through the JVM or anything else (with a bit more custom effort). Just a quick Google search for “LLM inference server java”: https://github.com/tjake/Jlama cc @amano.kenji . Wonder what the downsides are, if any. I.e., can you run models trained in Python without hassle, etc?
The LLM space seems so hot right now that I would think that even though Python is the vast majority, other languages might have decently big ecosystems there, even if they are just a few percent of the total “LLM dev tools” market.
> clj-python is more suitable for data science rather than long-running production servers. > clj-python has bugs for long-running processes. I'd rather use plain python directly at this point because basilisp isn't yet ready although it is usable inside python venv. > clj-python is more suitable for data science rather than long-running production servers. I don't think these are fair assessments of libpython-clj. We've had a similar discussion on https://clojurians.zulipchat.com/#narrow/channel/151168-clojure/topic/I.20got.20burned.20by.20haskell.2E/near/509053374, but I think libpython-clj works great. If there are actual reproducible issues, I think they would be could be addressed.
For running inference on the JVM, there are a few options: • https://github.com/phronmophobic/llama.clj • onnx, https://scicloj.github.io/clojure-data-tutorials/projects/ml/onnx/onnx.html • libpython-clj • https://scicloj.github.io/noj/noj_book.ml_basic.html
@seancorfield, for just a bit of Clojure(Script) “flavor” in an existing React.js codebase, you can definitely use ClojureScript without the immutable data structures. Still, I am not sure if the benefit is worth the squeeze for such a setup anyway. Essentially, it would primarily be for developer convenience at that point, given Lisp/paraedit. It would take a bit of “discipline” to avoid the Clojure data structures, but in theory it appears possible:
(->>
#js[#js{:a 1} #js{:a 2} #js{:a 3}]
(eduction
(map (fn [obj] (.-a obj)))
(map inc)
(map str))
(into-array))
;;=> #js ["2" "3" "4"]I actually looked into https://github.com/tjake/Jlama. It is not suitable for production. It doesn't support all the GPU optimizations supported by python LLM inference libraries. It is largely for CPU inference. Optimizations available on python are vastly more numerous than on other languages. Even C++ LLM inference libraries lose to python LLM inference libraries. Python LLM libraries call C or C++, but even big tech companies use python for LLM and AI because there is no alternative to python for production, yet.
When you say “python LLM inference”, is that a wrapper for some C/C++ library that actually runs the inference (genuinely curious - I don’t know)?
Python LLM libraries embed their own C/C++ code. They don't depend on third party libraries. It's possible for a python library to carry C/C++/Rust code.
Interesting, wonder how that works.
The discussion is over. Python is the only option for the foreseeable future. JVM ecosystem is trying to catch up, but don't wait for them. The vast majority of AI engineers work with python only.
From a pure technical perspective, what does “embed their own C/C++ code mean”. Does that mean that they compile that part of the code as C++? In that sense, they would be more properly called “C++/Python” hybrid libraries.
> The vast majority of AI engineers work with python only. Sure, no debate there.
That's why I mentioned basilisp.
What is the Python library of choice for running production inference?
(prob move to #off-topic )
Nvidia has its own library. I don't remember the name. There is a GPU-agnostic LLM inference library, too. I don't remember the name as well.
There's enough impedance between python and libpython-clj that I'd rather use plain python directly for production servers. There are also unresolved issues regarding long-running libpython-clj servers.
If basilisp gains project management tooling, it might be quite suitable for python projects. ClojureScript can cover web browser for the foreseeable future.
https://github.com/NVIDIA/TensorRT-LLM/blob/rel/docs/source/architecture/overview.md I assume this is the “NVIDIA” library
> The C++ runtime is the recommended runtime.
Yes, TensorRT-LLM. That's the nvidia library.
Sure, you can call this a Python library. But, afaict, it’s a C++ library with a Python API wrapper. But it also has a C++ API. Which is to say that you can most definitely call that directly from Java. Def not as convenient but it should be possible.
I'd rather just write python. That's far easier.
Yeah I’m sure.
I'm a practical guy. Not everything has to be written in clojure or any single language.
Yeah sure. They even give you a Docker setup.
You barely have to do anything yourself, you can just get JSON out.
I've always thought error messages would best be addressed by improved tools. Now that I'm building my own IDE, I would like to contribute to the problem. I'm currently on step 0 and am trying to collect information on the topic. I would love any pointers to any resources that I've missed. See 🧵
I'm building my own IDEYou're building your own IDE?
I am! #easel
is this a clojure specific ide
also tracking down your github now
> is this a clojure specific ide It's an IDE written in clojure and the primary target programming language is clojure. Easel itself has relatively little to say about clojure, but most of the "applets" (I still haven't thought of a better name) are focused on clojure programming. I'm not opposed to supporting other languages, but it's definitely not a priority.
understood; i'm just working on my java course and want to give people an IDE that doesn't have AI nonsense enabled by default
right now i'm using vscodium but - unideal
Ah ok. My goal is "IDE as a library" so that anyone could build their own IDE without starting from scratch, but it's not there yet.
yeah i'll leave you a few years to cook
but either Java or JavaScript would be the natural second languages to support, given those are what clojure is hosted on
at the very least the ability to click to def/decompiled def on a java library you are using from clojure
The syntax highlighting is done by tree sitter, so there's already syntax highlighting for java, javascript, and a bunch of other common langs.
However, it's basically just text mode with syntax highlighting for all non-clojure languages. You would probably want something like LSP support with autocompletion and stuff to make it usable.
Anyway, once it's generally usable for clojure, it would be interesting to try some other use cases.
This CIDER discussion touches on different ways to present errors, and has some examples of errors at different stages (ctrl-f repl.cider-error-examples, based on https://clojurians.slack.com/archives/C03S1KBA2/p1683143432992029?thread_ts=1683142572.115519&cid=C03S1KBA2) that I found helpful for testing https://github.com/clojure-emacs/cider/discussions/3338
There's also Elena Machkasova's work https://digitalcommons.morris.umn.edu/urs_2024/2 https://www.contalks.com/talks/861/babel-middleware-for-beginner-friendly-error-messages-clojure-conj-2018 and the maria.cloud error handling zoo https://www.maria.cloud/gist/fb460019eccd9b49ff5fb3465eea08b7?eval=true
Shriram Krishnamurti and the Racket folks also have things to say about IDE error handling https://parentheticallyspeaking.org/articles/pedagogic-ide/ (esp. section 4). IMO their approach is one of the most rigorous. They have the advantage of a large volume of captive subjects to test on.
There's usually praise for Rust's compiler errors as well, but I think their main inspiration was Elm, which you're already looking at. https://kobzol.github.io/rust/rustc/2025/05/16/evolution-of-rustc-errors.html I would maybe look at the Lem editor if they're doing anything interesting with error messages and/or debugging, since it's a somewhat similar (though less visual) project.
If the goal is to make a beginner-friendly IDE with an integrated REPL, I think having a visual distinction between evaluation results and printed output could be really useful. Not exactly error handling, though.
I think, you are asking a more general question. How to do output/error handling? Imagine you develop a function. Sometimes you want to call this functioin from other Clojure code and you want to capture errors. Sometimes you want to call the function from the command line (via Babashka) and you want to see the errors pretty printed and well explained. Sometimes you want to call the function from a GUI and you want the errors be in a logging window. Sometimes you want the errors in a logging system. Sometimes you want a progress bar, sometimes not. There are numerous situations and it would be nice to have one simple approach for all of them. Is this your question?
"Error Messages" consistently show up at the top of folks' wishlists for clojure. I'm basically trying to figure out what people mean by "Error Messages". I'm working on a clojure IDE and I think there's a big opportunity to make some progress on the problem. Right now, I'm just trying to gather info so that I can start breaking down "Error Messages" into smaller, more tangible problems.
in clojure specifically, there are a number of issues with error messages that have persisted across versions, such as incorrect line numbers, java-based exceptions (pointing to java impl code, not user code), spec output being hard to parse, and clojure.core code not being written with an eye for failure (GIGO/"optimized for correct programs")
@nbtheduke part of the process will be teasing out these different issues. Some (maybe most?) of them can be addressed by the IDE. > clojure.core code not being written with an eye for failure (GIGO/"optimized for correct programs") As an example, one of the interesting ideas I came across was replacing clojure.core at dev time with a version of clojure.core that does more argument checking. Edit: It was this talk by Colin Fleming. Cursive already supports this! The checks in cursive are static, but this could also be done dynamically. https://youtu.be/kt4haSH2xcs?t=1908
> spec output being hard to parse This is clearly an area where an IDE could help.
i don't think i agree, but i'm interested to see what you come up with
> i don't think i agree Which part? Is there a link with more info? If not, no problem. It's a long term project and I hope to have more to show in the future.
let me rephrase. i think that a dedicated IDE with a dev-focused version of clojure could do a lot to improve the error situation for its users, but i don't think that it would be generalizable for most clojure devs (i'm never switching from neovim, for example), and I think most of the potential changes you make could or should exist in clojure.core itself instead
and without a patched version of clojure, i don't think most are fixable
line numbers can't be fixed in a library as the bugs come from the Compiler code. spec errors are incomprehensible without documentation, and both spec and the compiler don't support those, so you can't fix it with a library. java-based exceptions could be caught and parsed by the IDE/library but the required checks and manual throws would be fastest and most helpful from within clojure's java code. only the clojure.core itself could be monkeypatched by a library
using a custom version of clojure means incompatibility with other custom clojures, such as flowstorm
I don't remember ever running into a problem with line numbers. Is there a link for that?
here's one, but i found many working on a recent clojure patch https://ask.clojure.org/index.php/13605/number-reported-exceptions-thrown-generated-destructuring
(here's the one i ran into while writing a patch: https://clojure.atlassian.net/issues/?selectedIssue=CLJ-2822)
In alphabetical order: https://ask.clojure.org/index.php/13044/interest-in-beginner-friendly-variant-of-pst https://ask.clojure.org/index.php/8343/display-clojure-stacktraces-planned-attacked-clojure-version https://cljdoc.org/d/djblue/portal/0.61.0/doc/guides/exceptions?q=exception#exceptions https://cljdoc.org/d/org.clj-commons/pretty/3.6.3/api/clj-commons.format.exceptions https://clojure.atlassian.net/browse/CLJ-2373 https://clojure.atlassian.net/browse/CLJ-2373 https://clojure.atlassian.net/browse/CLJ-2420 https://clojure.github.io/clojure/clojure.main-api.html#clojure.main/ex-triage https://clojure.github.io/clojure/clojure.stacktrace-api.html https://clojure.org/news/2018/12/17/clojure110 https://clojure.org/reference/repl_and_main#_error_printing https://clojurepatterns.com/series/error-handling-patterns-in-clojure/ https://clojureverse.org/t/improving-error-messages-in-clojure-as-a-library/1765 https://clojureverse.org/t/introducing-clem-the-clojure-error-mediator/7468 https://clojureverse.org/t/nice-error-messages/10684/2 https://clojurians.slack.com/archives/C053AK3F9/p1688277848508509 https://developer.apple.com/documentation/xcode/stepping-through-code-and-inspecting-variables-to-isolate-bugs https://docs.cider.mx/cider/usage/dealing_with_errors.html#navigating-stacktraces https://elm-lang.org/news/compiler-errors-for-humans https://ericnormand.me/article/clojure-error-messages-accidental https://ericnormand.me/article/wrangling-clojure-stacktraces https://errors.haskell.org/ https://flow-storm.github.io/flow-storm-debugger/user_guide.html#_exceptions_debugging https://github.com/BetterErrors/better_errors https://github.com/always-be-clojuring/issues/issues/7 https://github.com/bhb/expound https://github.com/clojure-emacs/cider/issues/2443 https://github.com/clojure-emacs/haystack/tree/master https://github.com/clojure/core.specs.alpha https://github.com/elm/error-message-catalog https://github.com/magnars/prone https://github.com/mhuebert/maria/blob/main/friendly/src/maria/friendly/messages.cljs https://github.com/mmcgrana/clj-stacktrace https://github.com/phronmophobic/reveal-exception https://github.com/venantius/pyro https://github.com/yogthos/clojure-error-message-catalog https://gitlab.com/unc-app-lab/clem-repl/ https://insideclojure.org/2018/12/17/errors/ https://insideclojure.org/2019/01/18/journal/#clojuremain-errors https://jank-lang.org/blog/2025-03-28-error-reporting/ https://lambdaisland.com/blog/2022-04-07-Clojure-Error-Messages https://tonsky.me/blog/sublime-clojure/#exceptions https://tutkain.flowthing.me/#dealing-with-exceptions https://www.infoq.com/presentations/Clojure-Stack-Trace/ - https://raw.githubusercontent.com/strangeloop/clojurewest2012-slides/refs/heads/master/StackTraces-Longbottom-Chouser.pdf https://www.reddit.com/r/Clojure/comments/778tc2/is_clojure_19_improving_error_messages/ https://www.reddit.com/r/Clojure/comments/cufp96/whats_the_state_of_error_messages/ https://www.youtube.com/watch?v=kt4haSH2xcs https://www.youtube.com/watch?v=o75g9ZRoLaw https://zencastr.com/z/xrPd6_by
I greatly simplified my logging experience by adopting event logs approach with
https://github.com/BrunoBonacci/mulog which also has log publishers for popular log aggregation tools. I also use a publisher to tap> logs to Portal.
What a cool endeavour. I assume you are writing your IDE in Clojure? We've done something similar as to what @jr0cket mentioned and are pretty happy about it.
> The syntax highlighting is done by tree sitter how did you get that working? i want to use tree-sitter for my project but i ran into a lot of trouble getting started, i would love to compare notes https://clojurians.slack.com/archives/C03S1KBA2/p1756464839508899