other-languages

2026-01-30T16:46:18.965759Z

one of my favorite parts of #fennel is that i can look at the generated lua code at any time. it's one of the best debugging tools i've found. this is in part because it's not doing as much as clj/cljs (no immutability, limited scope, etc), but especially with macros i've found it invaluable to look directly at the generated code to make sure what i've written does what i expect it to do. i know there are debugging tools available for clojure, but i sometimes wish i could just see the .java files

phronmophobic 2026-01-30T17:34:13.321709Z

Clojure doesn't compile to java, it compiles to bytecode. However, you can still use https://github.com/clojure-goes-fast/clj-java-decompiler in some cases to try to understand what's going on under the hood.

2026-01-30T17:48:21.572949Z

yeah i know about that, i'm just wishing

lread 2026-01-30T19:11:34.956189Z

Just learn to read bytecode, like Alex has!

4
Ben Sless 2026-01-31T07:43:26.314099Z

I set up integration in Emacs with the decompiler such that I can call it on any expression and get the decompiled bytecode or reconstructed Java in a temp buffer. Very convenient

Ben Sless 2026-01-31T07:44:49.559529Z

https://github.com/bsless/clj-decompiler.el

Ben Sless 2026-01-31T07:45:57.854289Z

BTW learning to read the bytecode is not that hard and can expose surprising performance bugs, the decompiled Java won't expose implicit primitive promotions

2026-01-31T16:10:36.835619Z

I also have a keystroke in Emacs to show the java or bytecode decompilation on any expression, but it only helps me with performance troubleshooting or when working with the compiler itself, not with debugging Clojure logic. For me reading bytecode feels like I'm close to what's going on, but then I remember JIT, and all the modern processors execution pipelines and just go back to Clojure. So many layers