Project ideas from Hacker News discussions.

Jank now has its own custom IR

📝 Discussion Summary (Click to expand)

3 Predominant Themes in the Discussion

Theme Supporting Quotation
1. Targeting JVM‑level performance > "we're using it to optimize jank to compete with the JVM" – christophilus
2. LLVM optimisation prospects & IR challenges > "Clojure's dynamism is granted by a great deal of both polymorphism and indirection, but this means LLVM has very few optimisation opportunities when it's dealing with the LLVM IR from jank." – mccoyb
> "The runtime max function will itself be inlined, so that's something LLVM ... is still doing" – codebje
3. Dynamism vs. recompilation & language design questions > "once a function has been inlined, you can no longer update the definition of that function in the REPL and have that update the behaviour of functions which use it, unless you recompile those as well." – lemming
> "The natural question is why doesn't Jank use MLIR?" – thfuran

These three themes capture the community’s focus on performance goals, the technical nuances of how Jank interacts with LLVM, and the trade‑offs between dynamic development and compiled execution.


🚀 Project Ideas

Generating project ideas…

Jank REPL Optimizer

Summary

  • A lightweight CLI/editor extension that tracks inlined functions and automatically triggers recompilation of dependent code when the REPL definition changes, preserving true dynamism while retaining inlined performance.
  • Core value: seamless hot‑reload of optimized code without manual recompiles.

Details

Key Value
Target Audience Jank developers using REPL‑driven workflows who want both speed and live updates
Core Feature Automatic dependency graph reconstruction and incremental rebuild of inlined call sites
Tech Stack Node.js + TypeScript for CLI, Rust for incremental compiler hooks, Jank IR introspection
Difficulty Medium
Monetization Revenue-ready: subscription tier for enterprise teams

Notes

  • HN commenters highlighted the tension between “dynamism and performance” and would love a tool that resolves it automatically.
  • Could be packaged as a VS Code extension and open‑source core, creating a discussion hub for performance‑focused Clojure/JS developers.

MLIR Bridge for Jank

Summary

  • A compiler pass that lowers Jank’s custom IR into MLIR and applies existing MLIR optimization dialects (LLVM, affine, vector) to produce highly optimized machine code.
  • Core value: unlocks the rich MLIR ecosystem for Clojure/Jank, delivering speedups without writing hand‑tuned passes.

Details

Key Value
Target Audience Researchers and production users of Jank who need more aggressive compiler optimizations
Core Feature Bidirectional IR translation layer plus a set of reusable MLIR rewrite passes
Tech Stack MLIR (C++/Python bindings), Rust for front‑end integration, Python for REPL testing
Difficulty High
Monetization Revenue-ready: consulting licensing for large‑scale deployments

Notes

  • The HN discussion asked “why doesn’t Jank use MLIR?” – this project directly answers that by providing an open‑source bridge.
  • Enables community contributions of new dialects (e.g., GPU‑oriented) that would interest the same audience seeking performance beyond the JVM.

Dynamic Specializer for Jank Runtime Calls

Summary

  • A library that monitors hot call sites, infers concrete types, and generates specialized call stubs on‑the‑fly, reducing indirect dispatch overhead.
  • Core value: measurable latency reductions for dynamic dispatch heavy code such as max, min, arithmetic operators.

Details

Key Value
Target Audience Library authors writing high‑performance numeric code in Jank/Clojure
Core Feature Adaptive specialization engine with on‑demand code generation and caching
Tech Stack Rust core + async executor, using Cranelift for JIT codegen, integration via FFI to Jank
Difficulty Medium
Monetization Revenue-ready: commercial support subscription for performance‑critical apps

Notes

  • Users like mccoyb were curious about LLVM’s optimization potential on runtime calls – this tool makes that potential concrete.
  • Can be demonstrated as a plug‑in for the Jank REPL, showing before/after benchmarks that align with the article’s goals.

Read Later