11 comments

  • Jeaye7 hours ago
    Hey folks. I&#x27;m the creator of jank. I didn&#x27;t expect to be on HN today, but I appreciate the interest.<p>In short, jank is Clojure, but it&#x27;s on LLVM and has seamless C++ interop. You still get full nREPL capabilities, can redefine anything on the fly, and we can actually JIT compile C++ code alongside your Clojure. The seamless C++ interop is first of its kind, for a lisp, and is done by JIT compiling C++ alongside the LLVM IR we generate for jank and then stitching them together into one IR module.<p>Note, jank isn&#x27;t released yet. I&#x27;m targeting the end of this year for the first alpha release. I put out monthly development updates on the jank blog, with the next one coming out this week.
    • dzonga6 hours ago
      beautiful work. clojure is very nice. one of the most impactful talks I have ever seen was from Rich Hickey - simple made easy.<p>however my only gripe with clojure while it&#x27;s easy to write and comprehend at first - it&#x27;s difficult to read. &amp; yet most our time we read code not write it. but then again it might be my lack of brain power.
      • Jeaye5 hours ago
        I agree with you, but perhaps in my own way. Jumping into an arbitrary Clojure program can be tough, since the data shapes may not be defined anywhere. Hopefully the program uses spec or malli, but even then, unless they annotate every function with the shape it expects, you may be left needing to REPL in and poke around. However, REPLing in to check just a function or two may not be easy if the program requires some setup and doesn&#x27;t use integrant or similar.<p>Once Clojure parity is achieved, I&#x27;m interested in static typing, pattern matching, value-based errors, and some other opt-in improvements that I think will greatly improve both readability and toolability (i.e. how well tooling can work with the code, based on what it knows of the code). Stay tuned. :)
        • thethimble4 hours ago
          What’s your take on Hickey’s talk titled “Maybe Not” which fundamentally criticizes static types? Is there a middle ground where some form of static typing makes sense in a Clojure-esque world?<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;YR5WdGrpoug?si=4mI8doBX6jj6PJkk" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;YR5WdGrpoug?si=4mI8doBX6jj6PJkk</a>
          • Jeaye4 hours ago
            Rich has many great ideas and he founded Clojure. I respect him deeply. On typing, however, we do not agree entirely.<p>For a practical example of a Clojure-like language with a completely static type system (with affine typing), see Carp. <a href="https:&#x2F;&#x2F;github.com&#x2F;carp-lang&#x2F;Carp">https:&#x2F;&#x2F;github.com&#x2F;carp-lang&#x2F;Carp</a><p>I don&#x27;t see why there can&#x27;t be a Carp mode in jank, with bridges in place to connect the Clojurey world from the Carpy world. This would allow jank users to develop interactively to start with, figure out their shapes, use the REPL, etc. Then, if they want, they can lock down some parts of the code for both performance and correctness gains.
            • narnarpapadaddy3 hours ago
              FWIW, (I have one Clojure project I inherited at work that my team maintains) I love this direction.
          • frogulis1 hour ago
            Been a while since I&#x27;ve watched&#x2F;read it, but I remember the ideas in Maybe Not being quite interesting.<p>To me, the really important idea wasn&#x27;t a criticism of static types in general.<p>Instead it was the idea that static typing in most (all?) mainstream implementations conflates concepts that should be separate, specifically the shape of the information that we have (e.g. what fields of what types), and whether a particular bit of information is available and required (e.g. nullability).<p>He contends that the former belongs in our usual &quot;type definition&quot;, whereas the latter relates instead to a given context. For example, my PassportForm type always has a date-of-birth field in its _shape_, but whether it&#x27;s statically required&#x2F;present to exist depends on whether we&#x27;re at a HTTP API boundary, an internal domain function boundary, writing into a database.<p>It sounded like that kind of &quot;nullability masking&quot; was intended as a feature of Spec, but I don&#x27;t get the impression it was ever implemented.
          • drob51811 minutes ago
            I don’t think Rich was criticizing static types as much as saying that they aren’t giving you as much benefit as you think they are and that they complicate program evolution over time.
      • barrell5 hours ago
        My comment to code ratio is magnitudes higher in Clojure than in other languages, which helps a lot with this.<p>Also writing Clojure can be incredibly terse, resulting in quite high-effort when reading. Conversely, a lot of time I can condense hundreds of lines of equivalent python into 5 or 6 lines of Clojure. Having all of this functionality condensed into something you can fit in a tweet really helps for grokking larger parts of the dataflow or even larger system. So there are tradeoffs<p>Plus structural editing and the repl really help with the “reading” experience (reading in quotes because it’s much more interactive than reading)
        • NeutralForest5 hours ago
          &gt; Conversely, a lot of time I can condense hundreds of lines of equivalent python into 5 or 6 lines of Clojure.<p>I&#x27;m curious if you have any example of this? Even if it&#x27;s an hyperbole, I don&#x27;t really see how.
          • d4mi3n3 hours ago
            In my (limited) experience with Clojure and other functional languages, this is usually true under situations where:<p>1. You’re mapping or reducing some dataset<p>2. Your iteration logic does not branch a lot<p>3. You can express your transformation logic using higher order functions (e.g. mapping a reduction operation across a multidimensional array)<p>Some domains have a log of this style of work—finance comes to mind—others do not. I suspect this is why I’ve personally seen a lot more of Clojure in finance circles than I have in other industries.
    • binary1325 hours ago
      I’m a bit curious why you chose to implement this as a different language (even though it implements Clojure) instead of an alternative Clojure backend and&#x2F;or C++ syntax extension.<p>Do you plan to make Windows support first-class? I think a lot of people looking at LLVM based languages are interested in alternatives to C++ for games.
      • Jeaye5 hours ago
        &gt; I’m a bit curious why you chose to implement this as a different language (even though it implements Clojure) instead of an alternative Clojure backend and&#x2F;or C++ syntax extension.<p>jank is Clojure. However, the Clojure name is trademarked and using it requires permission which I don&#x27;t have. Furthermore, I want to build upon the Clojure base to provide more, going forward. That may include static typing, value-based error handling, first class pattern matching, and so on. Those would be opt-in features on top of Clojure. All of these reasons lead me to not use Clojure in the name (like Clojure++, ClojureNative, etc).<p>&gt; Do you plan to make Windows support first-class? I think a lot of people looking at LLVM based languages are interested in alternatives to C++ for games.<p>Indeed, a lot of game dev folks use Windows. Right now, jank&#x27;s Windows support is limited. My initial audience is Clojure devs who want native access and lighter binaries. Once that launch has stabilized, I will focus on appealing to existing native devs who want to embed an interactive, functional language into their C++ applications. That will requires strengthening the Windows support, establishing stable native APIs, and writing the onboarding material for lisp, REPL-based editing, data-driven design, and so on. This is a much larger task, which is why I&#x27;m focusing on existing Clojure devs first.
        • neutronicus18 minutes ago
          I commented to this effect on Reddit, but my interest is entirely conditional on ability to embed Jank into a pre-existing C++ application as a shared library.<p>Ideally without controlling the code of the main application (e.g. to implement a plug-in).
    • twism4 hours ago
      Shouldn&#x27;t it be an &#x27;if&#x27; instead of &#x27;when&#x27; in the first example?
      • Jeaye4 hours ago
        Yes it should. Thanks for the keen eye and taking the time to point that out.
  • mgdev7 hours ago
    I love this project. I&#x27;ve been a sponsor on GitHub since late last year.<p>But for the love of... please pick a different name.<p>Whatever reasons companies&#x2F;teams will have for not letting someone use Jank at work, don&#x27;t let the name be one of them.
    • didibus5 hours ago
      You&#x27;re in luck ;)<p><a href="https:&#x2F;&#x2F;jank-lang.org&#x2F;blog&#x2F;2025-04-01-jank-has-been-renamed&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jank-lang.org&#x2F;blog&#x2F;2025-04-01-jank-has-been-renamed&#x2F;</a>
      • alanbernstein2 hours ago
        The &quot;one letter danger&quot; section is hilarious, but did you try to find any examples with a one-vowel difference?
    • fud10159 minutes ago
      I love the name Jank. I would use it just for the name alone.
    • intalentive4 hours ago
      What&#x27;s the objection to the name? I don&#x27;t get it.
      • hotpocket7772 hours ago
        Has negative connotations<p><a href="https:&#x2F;&#x2F;fluentslang.com&#x2F;jank-meaning&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fluentslang.com&#x2F;jank-meaning&#x2F;</a>
    • onionisafruit7 hours ago
      What&#x27;s the demonym for Jank devs? Janker?
      • eduction2 minutes ago
        Yes but pronounced in the Nordic and Central European fashion (“yanker”)
      • magicalhippo23 minutes ago
        Jankobian?
      • Jeaye5 hours ago
        Still deciding. Maybe jankster.
        • DetroitThrow5 hours ago
          Jankobite? Ehhh<p>I love this project, and frankly I can&#x27;t wait until I see Zig code stitched into and interoperating in a lisp via C transpilation, but I really do agree with the top commenter if you can&#x27;t get Clojure trademark approval.<p>Anyways, keep up the amazing work, I wish I could have seen your janky talk at Strangeloop on another timeline.
        • onionisafruit4 hours ago
          I suppose jank-yanker is off the table.
      • ForgotMyUUID6 hours ago
        The cute form would be Jankiye
      • AnimalMuppet37 minutes ago
        When there&#x27;s a book, whoever does the illustrations should be a jankee doodle.<p>... Right, I&#x27;ll show myself out.
  • catfacts5 hours ago
    I remember Clapp a Common Lisp in C++ using LLVM. Clapp was promising but progress has been very slow. Since Clojure is similar to CL, one wonder if Jank will experiment similar problems. Might I ask the author of Jank whether he knows about Clapp and if so, how will this project try to avoid getting stagnated?<p>Edited: Here is a post in HN from 2014 about Clapp. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8367404">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=8367404</a><p>In that post and comments we read that Clapp was 100x slower that sbcl, and the author of Clapp claimed: &quot;LLVM is a great library for implementing C and C++ but more work needs to be done to support Lisp features like closures and first-class functions. We are working on that now&quot;.<p>I hope Clapp&#x27;s author work in the last 11 years could help today efforts. Surely, the LLVM of today is not that of 11 years ago. Anyway, IMHO, sharing some knowledge could be productive for any project that is about C++, Lisp or Clojure using LLVM.<p>If I recall correctly, compiling Clapp takes a full day, that gives not a good vibe.<p>On the happy path, I think that Julia transpile to LLVM, but Julia is the result of many men working years at it. Honestly, I don&#x27;t think that one single programmer to be able to create such a big project as a performant clojure in C++ will the ability to compile code quickly. Getting sbcl speed and compilation speed would be an extraordinary feat!<p>In Go there were great sacrifices to get fast compilation, and the problems to include generics, trying to avoid blows up compilation because some type checking is NP-complete.<p>Also perhaps ECL, a lisp in C, can gives us some hints about how to get better performance and compilation speed.<p>Perhaps I am just too old to be open to new dreams, anyway I hope the best to this project and I thank to Clojurists Together for supporting this project. It must be very intellectual rewarding to work in a project whose aim is to extend and improve your favorite computer language. But the journey will be no an easy one, that&#x27;s for sure.
    • Jeaye3 hours ago
      &gt; Might I ask the author of Jank whether he knows about Clapp and if so, how will this project try to avoid getting stagnated?<p>I&#x27;m aware of Clasp and have spoken with drmeister about it in the early days of jank. Ultimately, jank and Clasp differ greatly, not only in that jank is Clojure and Clasp is Common Lisp, but also in their approach to C++ interop.<p>&gt; If I recall correctly, compiling Clapp takes a full day, that gives not a good vibe.<p>I&#x27;m not sure about Clasp&#x27;s compile times, but C++ is slow to compile, in general. The jank compiler itself builds from nothing in about 1 minute on my machine. We&#x27;ve yet to see how the jank compiler will handle large Clojure project, but I do expect it to be slower than Clojure JVM.<p>&gt; In that post and comments we read that Clapp was 100x slower that sbcl<p>That&#x27;s an old post, so I&#x27;d expect that Clasp is faster now. I can say that jank is not 100x slower than Clojure JVM, in my benchmarks.<p>&gt; Perhaps I am just too old to be open to new dreams, anyway I hope the best to this project and I thank to Clojurists Together for supporting this project. It must be very intellectual rewarding to work in a project whose aim is to extend and improve your favorite computer language. But the journey will be no an easy one, that&#x27;s for sure.<p>Thanks for the interest and kind words. It&#x27;s not easy, but it&#x27;s doable!
    • Jtsummers3 hours ago
      Clasp, not Clapp, and it&#x27;s still getting releases. 2.7.0 was released in January, and 2.8.0 is pending.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;clasp-developers&#x2F;clasp">https:&#x2F;&#x2F;github.com&#x2F;clasp-developers&#x2F;clasp</a>
  • rtpg3 hours ago
    I am once again calling for someone to make something that&#x27;s &quot;basically clojure&quot; but with whitespace instead of parens.<p>Parens don&#x27;t matter, but giving values names causing indentation is something I simply cannot abide as a terminal intermediary value name giving person.<p>EDIT: oh and also something with &quot;proper&quot; multiline comments. Thanks!
    • Jeaye3 hours ago
      I&#x27;m interested in exploring this as a potential dialect of jank. In the simplest approach, it&#x27;s just a lexer change. However, there are implications around how macros will work, since macros generate s-expressions in Clojure, but they&#x27;d need to generate whitespace blocks if we want the homoiconicity to spread throughout.<p>If you&#x27;re interested in funding this work, or helping with the designs, please reach out. In the meantime, make sure you check out Rhombus. <a href="https:&#x2F;&#x2F;rhombus-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rhombus-lang.org&#x2F;</a>
      • rtpg2 hours ago
        Right, it&#x27;s hard to disconnect some of Clojure&#x27;s niceties from the macro work (though I think Clojure&#x27;s macros tend to do less inner inspection than macros you&#x27;ll see in other lisp variants)<p>The link to Rhombus is very interested, I hadn&#x27;t heard of this and it looks very well developed. Will mess around with it.
    • chromalchemy2 hours ago
      This exists. <a href="https:&#x2F;&#x2F;yamlscript.org&#x2F;blog&#x2F;2025-06-24&#x2F;how-does-ys-work&#x2F;" rel="nofollow">https:&#x2F;&#x2F;yamlscript.org&#x2F;blog&#x2F;2025-06-24&#x2F;how-does-ys-work&#x2F;</a><p><a href="https:&#x2F;&#x2F;yamlscript.org&#x2F;about&#x2F;" rel="nofollow">https:&#x2F;&#x2F;yamlscript.org&#x2F;about&#x2F;</a> - YAMLScript (or YS) A graal pre-compiled Clojure environment, like Babashka, but uses a different, looser syntax (yaml based). Can run from command line.<p>Like a nicer Python?
      • rtpg2 hours ago
        I do not believe I want to write my code in something that goes through a YAML parser.
  • npalli7 hours ago
    Since this appears to be the marquee feature (compared to the well regarded Clojure) it would be good to see some benchmarks comparing the JVM to LLVM versions.<p><i>This allows jank to offer the same benefits of REPL-based development while being able to seamlessly reach into the native world and compete seriously with JVM&#x27;s performance.</i>
    • Jeaye5 hours ago
      I have blog posts with various benchmarks and optimizations, but ultimately all of my time is being spent actually developing the language right now. The fluidity of the implementation also means that the benchmarks from last year aren&#x27;t really applicable anymore.<p>Performance measurement and optimization is something I thoroughly enjoy and look forward to being able to focus on once jank hits parity with Clojure and is stable enough to warrant performance as a priority.
  • defo105 hours ago
    I&#x27;m especially excited about the error reporting in jank. Fingers crossed they will live up to the blog post showcasing them. Most people I convince to give Clojure a shot tell me that they are utterly confused about its error messages.
    • chamomeal5 hours ago
      Yeah it’s pretty incredible how unhelpful the error messages are. A true feat. Still love clojure but wow
  • sideeffffect5 hours ago
    How does programming with Clojure targeting multiple platforms (JVM, JS, CLR, LLVM, ...) work?<p>Are there Clojure libraries that don&#x27;t use JVM(&#x2F;JS&#x2F;...)-specific stuff that works on any Clojure platform&#x2F;dialect? Can such libraries be used on Jank out of the box? Or do library authors have to do something explicit in their libraries to enable their use in specific platforms&#x2F;dialects?
    • Jeaye4 hours ago
      &gt; Are there Clojure libraries that don&#x27;t use JVM(&#x2F;JS&#x2F;...)-specific stuff that works on any Clojure platform&#x2F;dialect? Can such libraries be used on Jank out of the box?<p>Correct. Any Clojure code which doesn&#x27;t use interop will generally work with Clojure, ClojureScript, Clojure CLR, jank, etc. There are some exceptions, where different dialects don&#x27;t fully implement a Clojure feature, but this is generally the case.<p>&gt; Or do library authors have to do something explicit in their libraries to enable their use in specific platforms&#x2F;dialects?<p>Clojure also supports reader macros to enable forms for specific dialects. This is basically like an #ifdef in the C world, where library devs can check if the code is currently being compiled for Clojure, ClojureScript, jank, and so on. This allows you to have a public function, for example, which internally just uses a reader conditional to do the correct thing. For example:<p><pre><code> (defn sleep [ms] #?(:clj (Thread&#x2F;sleep ms) :jank (let [s (&#x2F; ms 1000) ns (* (mod ms 1000) 1000000) t (cpp&#x2F;timespec. (cpp&#x2F;long. s) (cpp&#x2F;long. ns))] (cpp&#x2F;nanosleep (cpp&#x2F;&amp; t) cpp&#x2F;nullptr)))) </code></pre> That&#x27;s using the currently working C and C++ interop to call the POSIX C function. The same could be done for the C++ version. This function can now be used in both Clojure and jank with no difference to the consumer.
  • jankjankjank1 hour ago
    I feel like I’ve been coding jank already for most of my life.
  • axblount7 hours ago
    Aside from the lack of JVM, what&#x27;s holding back Jank from being a drop in Clojure replacement?
    • Jeaye7 hours ago
      Once all of the necessary features are implemented, the only thing in the way will be JVM interop. If you have any &quot;pure Clojure&quot; code (i.e. no interop), it should also be valid jank code.
  • caim4 hours ago
    Great work! Also, the error messages are neat!
  • xqb641 hour ago
    Good luck, jeaye.