diff --git a/blog/2024-11-29-llvm-ir/index.html b/blog/2024-11-29-llvm-ir/index.html new file mode 100644 index 0000000..28ae2ef --- /dev/null +++ b/blog/2024-11-29-llvm-ir/index.html @@ -0,0 +1,5 @@ +jank is now running on LLVM IR
jank is now running on LLVM IR
Nov 29, 2024 · Jeaye Wilkerson

Hi everyone! It's been a very busy couple of months as I've been developing jank's LLVM IR generation, improving jank's semantic analysis, and furthering jank's module loading system. Thank you to all of my Github sponsors and to Clojurists Together, who help me pay the bills. As of January 2025, I'll be working on jank full-time and every new sponsor means that much more. Without further ado, let's dive into the details of the past couple of months.

LLVM IR

The main focus of the past couple of months has been filling out jank's LLVM IR generation. This has required further improving some of its semantic analysis since I was previously able to cut some corners when generating C++ code.

At this point, all AST nodes in jank have working and tested IR generation except for try, since doing so requires hooking into the C++ runtime's unwind mechanism and I've been saving that rabbit hole for last.

IR generation has caused so many fun bugs the past couple of months that I had to look into a better way of organizing my notes for this quarter. There was just too much. When developing a language, especially in a pre-alpha stage like jank, when something crashes or is otherwise completely wrong, the issue could be anywhere from lexing to parsing to semantic analysis to code generation to object modeling to core function algorithms to data structures. I think there were some of each discovered in the past couple of months, but the majority of them were in the new IR generation.

Named recursion

One of the fun bugs I ran into was with how Clojure handles recursion through the function's own name. This doesn't go through the var; it just references the function object directly. The same applies with just a self-reference. For example:

(fn foo []
+  foo)
+
+(defn foo []
+  foo)

In Clojure, and in jank with C++ generation, each function is an object (struct or class). A self-reference can literally just mean this. But with the LLVM IR generation, each function, and more specifically each function arity, is compiled to a dedicated C function. Aside from closures, which get an implicit first argument which is a generated struct of the captured values, the function itself has no other identifying state or object. This means a self-reference actually needs to build a new object. Previously, I would always just generate a local into each function like so:

auto const foo{ this };

Then I would register that local automatically during semantic analysis for functions. A self-reference would then just be a local_reference AST node. This can't carry over well to IR generation, so I've added two new AST nodes:

  1. recursion_reference, which is created when we analyze that we're referring to the current function by name somewhere
  2. named_recursion, which is created when we're analyzing a call and find that the source expression is a recursion_reference

This does mean that a self-reference within a function wouldn't be identical? to the invoking object, but that's something we can document and otherwise really not care about.

Startup performance

Ultimately, the main reason for generating LLVM IR is that C++ is too slow to compile. If compiling clojure.core means generating 100K lines of C++ to compile, we end up waiting far too long for jank to start up. On my machine, it took around 12 seconds.

Now, with IR generation, and a lot more functionality baked into jank itself, rather than JIT compiled, compiling clojure.core from source takes only 2 seconds. This is fast enough to where we can easily include it as part of jank's build system. We can then pre-compile the sources to binaries and load those instead.

When I tried this with C++ generation, it took 4 minutes to compile all of the C++ generated for clojure.core into a C++20 module with a backing shared library. It then took 300ms to load at runtime, which dropped the start time from 12 seconds to 300ms. That AOT compilation cost was huge, but the gain was also big.

With IR generation, we can also generate object files. Amazingly, it can be done within the same 2 seconds used to compile clojure.core in the first place. When loading that object file at runtime, jank can now start up in 150ms. So, we spend a fraction of the time actually compiling the code and even less time loading it. Overall, for startup performance, LLVM IR has been a huge win. This is exactly what I wanted and I'm very pleased with the results.

Note, when all of this is baked into the executable AOT, startup time is around 50ms. jank doesn't support AOT compilation of full programs yet, but I've manually added the object files to jank's CMake build in order to test this out. Once we do have AOT compilation to binaries, we can also add direct linking, link-time optimizations (LTO), etc. and drop these numbers down even further.

Runtime performance

Runtime performance will be negatively impacted by IR generation, at least to start. The C++ code jank used to generate was quite optimized. I was taking advantage of various C++ features, like function overloading, type inference, and easy (yet ambiguous) unboxing of numerical values. With IR gen, we need to do all of those manually, rather than rely on a C++ compiler to help. This will take more work, but it also allows us to tailor the optimizations to best fit jank.

I'm not ready to report any benchmark results for runtime performance differences yet, since I don't think measuring the initial IR generation against the previous C++ generation is a good usage of time. Optimizing IR can happen as we go, without breaking any ABI compatibility. I'm more focused on getting jank released right now.

Build system and portability improvements

Apart from working on LLVM IR generation the past couple of months, I've put a fair amount of time into improving jank's builds system and dependency management. In particular, vcpkg has been removed entirely. I was using vcpkg to bring in some C and C++ source dependencies, but some of them regularly fail to build from source on very normal setups and vcpkg on its own causes issues with build systems such as Nix. Altogether, it's well known that the build system and dependency tooling for C and C++ is terrible. While I aim for jank to improve that, in its own way, we still need to suffer through it for the compiler itself.

In order to remove vcpkg, I had to address all of the dependencies it was pulling in.

  • bdwgc (Boehm GC) requires compilation
  • fmt requires compilation
    • Added a submodule and hooked into CMake
  • libzipp requires compilation
    • Added a submodule and hooked into CMake
  • immer is header-only
    • Added a submodule
  • magic_enum is header-only
    • Added a submodule
  • cli11 is header-only
    • Added a submodule
  • doctest is in all major package repos
  • boost is in all major package repos
    • boost::preprocessor isn't found by CMake on Ubuntu, but it's there
      • Doesn't exist in brew's package, though
      • Had to add as a submodule
    • Causes Clang to crash while building incremental.pch

All in all, this required seven new git submodules. Even something as commonplace as boost led to dependency issues across various platforms. I did all of my testing on Ubuntu, Arch, NixOS, and macOS. Once I had all of those submodules, I still ran into some issues with Clang hard crashing while trying to compile an incremental pre-compiled header (PCH) with boost. This was the final straw with PCHs for me.

Pre-compiled headers

jank started out with PCHs from the beginning. I was concerned about compile-times and I knew that many source files would need access to the whole object model in order to compile. While this remains true, I didn't expect that PCHs would be such a headache when JIT compiling C++. There have been a handful of Cling bugs and then Clang bugs related to loading PCHs into the incremental C++ environment. I've spent entire days compiling Clang/LLVM while bisecting in order to find root causes. Haruki has been so close to building jank on Nix but has been running into issues when compiling the incremental PCH. This has been a long time coming.

After removing the PCHs, fixing all source files to include what they need, refactoring some heavy headers so they can be used less often, and running some tooling to further clean things up, we can wipe our hands of all of that. jank does still need to JIT compile C++ code, but it can do so using both a C API and a C++ API. Devs using jank can include what they need.

Previously, just loading the incremental PCH with all of jank's headers took a whopping 2.5 seconds every start up and we always paid that cost. Now, better following the (intended) nature of C++, we can pay for what we use.

Community update

I have not been the only one working on jank. The past couple of months, my newest mentee through the SciCloj mentorship program, Monty Bichouna, has wrapped up Unicode lexing support. This allows jank the important ability to properly represent Unicode symbols and keywords. Monty's work builds on Saket's recent work to add Unicode support for character objects.

To further jank's interop story, Saket Patel also recently merged some changes which allow jank to accept include paths, linker paths, and linked shared libraries. This means that you can now include other C and C++ libraries from your JIT compiled bridge code and have the JIT linker resolve those symbols in your libraries. In other words, it's now possible to use jank to wrap arbitrary C and C++ libraries. Saket took this further by adding an opaque pointer wrapper object which can store any non-owned native pointer to be passed through any jank function and stored in any jank data structure. Each of these is a small step toward a much richer interop story. Saket also added persistent history to jank's CLI REPL and improved its usability by hooking into LLVM's line editing capabilities.

Jianling Zhong added support for ratio objects in jank, including the whole polymorphic math treatment necessary for them. He also implemented jank's delay object and corresponding clojure.core/delay macro as well as jank's repeat object, which backs the clojure.core/repeat function.

Finally, Paula Gearon has been making excellent progress on a sister project to jank, clojure.core-test, which is a cross-dialect test suite for all of clojure.core. Ultimately, my goal with this is to aid Clojure dialect developers by providing a thorough test suite for Clojure's core functions. By being able to run and pass this suite, my confidence in jank will be strong. I'm sure other dialect developers will feel similarly.

What's next?

I need to fix a couple remaining bugs with the LLVM IR generation and then implement IR generation for try nodes, in the next couple of weeks. After that, the next big goal is error reporting. This is an exciting task to tackle, since the impact of it is going to feel so rewarding. I have been suffering jank's terrible error messages for years. Even worse, we as an industry have been suffering terrible error messages for decades. There's been some exciting progress in Elm, Rust, etc for improving the way errors are reported, providing actionable feedback, and including sufficient context to make errors less cryptic. I don't think that Clojure does well in this area, currently, and I aim to raise the bar.

If that sounds interesting, stay tuned for my next update!

Would you like to join in?

  1. Join the community on Slack
  2. Join the design discussions or pick up a ticket on GitHub
  3. Considering becoming a Sponsor
  4. Better yet, hire me full-time to work on jank!
\ No newline at end of file diff --git a/blog/feed.xml b/blog/feed.xml index f589b07..c090961 100644 --- a/blog/feed.xml +++ b/blog/feed.xml @@ -1 +1 @@ -2024-10-15T05:52:31.924591720Zjank bloghttps://jank-lang.org/blog/jank development update - Moving to LLVM IR2024-10-14T00:00:00Z2024-10-14T00:00:00Zhttps://jank-lang.org/blog/2024-10-14-llvm-irJeaye Wilkerson<p>Hi everyone! It&apos;s been a few months since the last update and I&apos;m excited to outline what&apos;s been going on and what&apos;s upcoming for jank, the native Clojure dialect. Many thanks to Clojurists Together and my Github sponsors for the support. Let&apos;s get into it!</p>jank development update - Multimethods!2024-06-29T00:00:00Z2024-06-29T00:00:00Zhttps://jank-lang.org/blog/2024-06-29-multimethodsJeaye Wilkerson<p>Welcome back to another jank development update! For the past month, I&apos;ve been pushing jank closer to production readiness primarily by working on multimethods and by debugging issues with Clang 19 (currently unreleased). Much love to <a href="https://www.clojuriststogether.org/">Clojurists Together</a> and all of my <a href="https://github.com/sponsors/jeaye">Github sponsors</a> for their support this quarter.</p>jank development update - New projects!2024-05-31T00:00:00Z2024-05-31T00:00:00Zhttps://jank-lang.org/blog/2024-05-31-new-projectsJeaye Wilkerson<p>Hey folks! I&apos;ve been building on last month&apos;s addition of lazy sequences, <code>loop*</code>, destructuring, and more. This month, I&apos;ve worked on rounding out lazy sequences, adding more mutability, better meta support, and some big project updates. Much love to <a href="https://www.clojuriststogether.org/">Clojurists Together</a>, who are funding my work this quarter.</p>jank development update - Lazy sequences!2024-04-27T00:00:00Z2024-04-27T00:00:00Zhttps://jank-lang.org/blog/2024-04-27-lazy-sequencesJeaye Wilkerson<p>This quarter, I&apos;m being funded by <a href="https://www.clojuriststogether.org/">Clojurists Together</a> to build out jank&apos;s lazy sequences, special <code>loop*</code> form, destructuring, and support for the <code>for</code> and <code>doseq</code> macros. Going into this quarter, I had only a rough idea of how Clojure&apos;s lazy sequences were implemented. Now, a month in, I&apos;m ready to report some impressive progress!</p>jank development update - Syntax quoting!2024-03-29T00:00:00Z2024-03-29T00:00:00Zhttps://jank-lang.org/blog/2024-03-29-syntax-quotingJeaye Wilkerson<p>Oh, hey folks. I was just wrapping up this macro I was writing. One moment.</p>jank development update - Dynamic bindings and more!2024-02-23T00:00:00Z2024-02-23T00:00:00Zhttps://jank-lang.org/blog/2024-02-23-bindingsJeaye Wilkerson<p>For the past couple of months, I have been focused on tackling dynamic var bindings and meta hints, which grew into much, much more. Along the way, I&apos;ve learned some neat things and have positioned jank to be ready for a lot more outside contributions. Grab a seat and I&apos;ll explain it all! Much love to <a href="https://www.clojuriststogether.org/">Clojurists Together</a>, who have sponsored some of my work this quarter.</p>jank's new persistent string is fast2023-12-30T00:00:00Z2023-12-30T00:00:00Zhttps://jank-lang.org/blog/2023-12-30-fast-stringJeaye Wilkerson<p>One thing I&apos;ve been meaning to do is build a custom string class for jank. I had some time, during the holidays, between wrapping up this quarter&apos;s work and starting on next quarter&apos;s, so I decided to see if I could beat both <code>std::string</code> and <code>folly::fbstring</code>, in terms of performance. After all, if we&apos;re gonna make a string class, it&apos;ll need to be fast. :)</p>jank development update - Load all the modules!2023-12-17T00:00:00Z2023-12-17T00:00:00Zhttps://jank-lang.org/blog/2023-12-17-module-loadingJeaye Wilkerson<p>I&apos;ve been quiet for the past couple of months, finishing up this work on jank&apos;s module loading, class path handling, aliasing, and var referring. Along the way, I ran into some very interesting bugs and we&apos;re in for a treat of technical detail in this holiday edition of jank development updates! A warm shout out to my <a href="https://github.com/sponsors/jeaye">Github sponsors</a> and <a href="https://www.clojuriststogether.org/">Clojurists Together</a> for sponsoring this work.</p>jank development update - Module loading2023-10-14T00:00:00Z2023-10-14T00:00:00Zhttps://jank-lang.org/blog/2023-10-14-module-loadingJeaye Wilkerson<p>For the past month and a half, I&apos;ve been building out jank&apos;s support for <code>clojure.core/require</code>, including everything from class path handling to compiling jank files to intermediate code written to the filesystem. This is a half-way report for the quarter. As a warm note, my work on jank this quarter is being sponsored by <a href="https://www.clojuriststogether.org/">Clojurists Together</a>.</p>jank development update - Object model results2023-08-26T00:00:00Z2023-08-26T00:00:00Zhttps://jank-lang.org/blog/2023-08-26-object-modelJeaye Wilkerson<p>As summer draws to a close, in the Pacific Northwest, so too does my term of sponsored work focused on a faster object model for jank. Thanks so much to <a href="https://www.clojuriststogether.org/">Clojurists Together</a> for funding jank&apos;s development. The past quarter has been quite successful and I&apos;m excited to share the results.</p>jank development update - A faster object model2023-07-08T00:00:00Z2023-07-08T00:00:00Zhttps://jank-lang.org/blog/2023-07-08-object-modelJeaye Wilkerson<p>This quarter, my work on jank is being sponsored by <a href="https://www.clojuriststogether.org/">Clojurists Together</a>. The terms of the work are to research a new object model for jank, with the goal of making jank code faster across the board. This is a half-way report and I&apos;m excited to share my results!</p>jank development update - Optimizing a ray tracer2023-04-07T00:00:00Z2023-04-07T00:00:00Zhttps://jank-lang.org/blog/2023-04-07-ray-tracingJeaye Wilkerson<p>After the <a href="/blog/2023-01-13-optimizing-sequences">last post</a>, which focused on optimizing jank&apos;s sequences, I wanted to get jank running a ray tracer I had previously written in Clojure. In this post, I document what was required to start ray tracing in jank and, more importantly, how I chased down the run time in a fierce battle with Clojure&apos;s performance.</p>jank development update - Optimizing sequences2023-01-13T00:00:00Z2023-01-13T00:00:00Zhttps://jank-lang.org/blog/2023-01-13-optimizing-sequencesJeaye Wilkerson<p>In this episode of jank&apos;s development updates, we follow an exciting few weekends as I was digging deep into Clojure&apos;s sequence implementation, building jank&apos;s equivalent, and then benchmarking and profiling in a dizzying race to the bottom.</p>jank development update - Lots of new changes2022-12-08T00:00:00Z2022-12-08T00:00:00Zhttps://jank-lang.org/blog/2022-12-08-progress-updateJeaye Wilkerson<p>I was previously giving updates only in the <a href="https://clojurians.slack.com/archives/C03SRH97FDK">#jank</a> Slack channel, but some of these are getting large enough to warrant more prose. Thus, happily, I can announce that jank has a new blog and I have a <i>lot</i> of new progress to report! Let&apos;s get into the details.</p> \ No newline at end of file +2024-11-29T19:51:47.000921617Zjank bloghttps://jank-lang.org/blog/jank is now running on LLVM IR2024-11-29T00:00:00Z2024-11-29T00:00:00Zhttps://jank-lang.org/blog/2024-11-29-llvm-irJeaye Wilkerson<p>Hi everyone! It&apos;s been a very busy couple of months as I&apos;ve been developing jank&apos;s LLVM IR generation, improving jank&apos;s semantic analysis, and furthering jank&apos;s module loading system. Thank you to all of my Github sponsors and to Clojurists Together, who help me pay the bills. As of January 2025, I&apos;ll be working on jank full-time and every new sponsor means that much more. Without further ado, let&apos;s dive into the details of the past couple of months.</p>jank development update - Moving to LLVM IR2024-10-14T00:00:00Z2024-10-14T00:00:00Zhttps://jank-lang.org/blog/2024-10-14-llvm-irJeaye Wilkerson<p>Hi everyone! It&apos;s been a few months since the last update and I&apos;m excited to outline what&apos;s been going on and what&apos;s upcoming for jank, the native Clojure dialect. Many thanks to Clojurists Together and my Github sponsors for the support. Let&apos;s get into it!</p>jank development update - Multimethods!2024-06-29T00:00:00Z2024-06-29T00:00:00Zhttps://jank-lang.org/blog/2024-06-29-multimethodsJeaye Wilkerson<p>Welcome back to another jank development update! For the past month, I&apos;ve been pushing jank closer to production readiness primarily by working on multimethods and by debugging issues with Clang 19 (currently unreleased). Much love to <a href="https://www.clojuriststogether.org/">Clojurists Together</a> and all of my <a href="https://github.com/sponsors/jeaye">Github sponsors</a> for their support this quarter.</p>jank development update - New projects!2024-05-31T00:00:00Z2024-05-31T00:00:00Zhttps://jank-lang.org/blog/2024-05-31-new-projectsJeaye Wilkerson<p>Hey folks! I&apos;ve been building on last month&apos;s addition of lazy sequences, <code>loop*</code>, destructuring, and more. This month, I&apos;ve worked on rounding out lazy sequences, adding more mutability, better meta support, and some big project updates. Much love to <a href="https://www.clojuriststogether.org/">Clojurists Together</a>, who are funding my work this quarter.</p>jank development update - Lazy sequences!2024-04-27T00:00:00Z2024-04-27T00:00:00Zhttps://jank-lang.org/blog/2024-04-27-lazy-sequencesJeaye Wilkerson<p>This quarter, I&apos;m being funded by <a href="https://www.clojuriststogether.org/">Clojurists Together</a> to build out jank&apos;s lazy sequences, special <code>loop*</code> form, destructuring, and support for the <code>for</code> and <code>doseq</code> macros. Going into this quarter, I had only a rough idea of how Clojure&apos;s lazy sequences were implemented. Now, a month in, I&apos;m ready to report some impressive progress!</p>jank development update - Syntax quoting!2024-03-29T00:00:00Z2024-03-29T00:00:00Zhttps://jank-lang.org/blog/2024-03-29-syntax-quotingJeaye Wilkerson<p>Oh, hey folks. I was just wrapping up this macro I was writing. One moment.</p>jank development update - Dynamic bindings and more!2024-02-23T00:00:00Z2024-02-23T00:00:00Zhttps://jank-lang.org/blog/2024-02-23-bindingsJeaye Wilkerson<p>For the past couple of months, I have been focused on tackling dynamic var bindings and meta hints, which grew into much, much more. Along the way, I&apos;ve learned some neat things and have positioned jank to be ready for a lot more outside contributions. Grab a seat and I&apos;ll explain it all! Much love to <a href="https://www.clojuriststogether.org/">Clojurists Together</a>, who have sponsored some of my work this quarter.</p>jank's new persistent string is fast2023-12-30T00:00:00Z2023-12-30T00:00:00Zhttps://jank-lang.org/blog/2023-12-30-fast-stringJeaye Wilkerson<p>One thing I&apos;ve been meaning to do is build a custom string class for jank. I had some time, during the holidays, between wrapping up this quarter&apos;s work and starting on next quarter&apos;s, so I decided to see if I could beat both <code>std::string</code> and <code>folly::fbstring</code>, in terms of performance. After all, if we&apos;re gonna make a string class, it&apos;ll need to be fast. :)</p>jank development update - Load all the modules!2023-12-17T00:00:00Z2023-12-17T00:00:00Zhttps://jank-lang.org/blog/2023-12-17-module-loadingJeaye Wilkerson<p>I&apos;ve been quiet for the past couple of months, finishing up this work on jank&apos;s module loading, class path handling, aliasing, and var referring. Along the way, I ran into some very interesting bugs and we&apos;re in for a treat of technical detail in this holiday edition of jank development updates! A warm shout out to my <a href="https://github.com/sponsors/jeaye">Github sponsors</a> and <a href="https://www.clojuriststogether.org/">Clojurists Together</a> for sponsoring this work.</p>jank development update - Module loading2023-10-14T00:00:00Z2023-10-14T00:00:00Zhttps://jank-lang.org/blog/2023-10-14-module-loadingJeaye Wilkerson<p>For the past month and a half, I&apos;ve been building out jank&apos;s support for <code>clojure.core/require</code>, including everything from class path handling to compiling jank files to intermediate code written to the filesystem. This is a half-way report for the quarter. As a warm note, my work on jank this quarter is being sponsored by <a href="https://www.clojuriststogether.org/">Clojurists Together</a>.</p>jank development update - Object model results2023-08-26T00:00:00Z2023-08-26T00:00:00Zhttps://jank-lang.org/blog/2023-08-26-object-modelJeaye Wilkerson<p>As summer draws to a close, in the Pacific Northwest, so too does my term of sponsored work focused on a faster object model for jank. Thanks so much to <a href="https://www.clojuriststogether.org/">Clojurists Together</a> for funding jank&apos;s development. The past quarter has been quite successful and I&apos;m excited to share the results.</p>jank development update - A faster object model2023-07-08T00:00:00Z2023-07-08T00:00:00Zhttps://jank-lang.org/blog/2023-07-08-object-modelJeaye Wilkerson<p>This quarter, my work on jank is being sponsored by <a href="https://www.clojuriststogether.org/">Clojurists Together</a>. The terms of the work are to research a new object model for jank, with the goal of making jank code faster across the board. This is a half-way report and I&apos;m excited to share my results!</p>jank development update - Optimizing a ray tracer2023-04-07T00:00:00Z2023-04-07T00:00:00Zhttps://jank-lang.org/blog/2023-04-07-ray-tracingJeaye Wilkerson<p>After the <a href="/blog/2023-01-13-optimizing-sequences">last post</a>, which focused on optimizing jank&apos;s sequences, I wanted to get jank running a ray tracer I had previously written in Clojure. In this post, I document what was required to start ray tracing in jank and, more importantly, how I chased down the run time in a fierce battle with Clojure&apos;s performance.</p>jank development update - Optimizing sequences2023-01-13T00:00:00Z2023-01-13T00:00:00Zhttps://jank-lang.org/blog/2023-01-13-optimizing-sequencesJeaye Wilkerson<p>In this episode of jank&apos;s development updates, we follow an exciting few weekends as I was digging deep into Clojure&apos;s sequence implementation, building jank&apos;s equivalent, and then benchmarking and profiling in a dizzying race to the bottom.</p>jank development update - Lots of new changes2022-12-08T00:00:00Z2022-12-08T00:00:00Zhttps://jank-lang.org/blog/2022-12-08-progress-updateJeaye Wilkerson<p>I was previously giving updates only in the <a href="https://clojurians.slack.com/archives/C03SRH97FDK">#jank</a> Slack channel, but some of these are getting large enough to warrant more prose. Thus, happily, I can announce that jank has a new blog and I have a <i>lot</i> of new progress to report! Let&apos;s get into the details.</p> \ No newline at end of file diff --git a/blog/index.html b/blog/index.html index 147d728..59c79a0 100644 --- a/blog/index.html +++ b/blog/index.html @@ -1 +1 @@ -jank - blog

Hi everyone! It's been a few months since the last update and I'm excited to outline what's been going on and what's upcoming for jank, the native Clojure dialect. Many thanks to Clojurists Together and my Github sponsors for the support. Let's get into it!

Welcome back to another jank development update! For the past month, I've been pushing jank closer to production readiness primarily by working on multimethods and by debugging issues with Clang 19 (currently unreleased). Much love to Clojurists Together and all of my Github sponsors for their support this quarter.

Hey folks! I've been building on last month's addition of lazy sequences, loop*, destructuring, and more. This month, I've worked on rounding out lazy sequences, adding more mutability, better meta support, and some big project updates. Much love to Clojurists Together, who are funding my work this quarter.

This quarter, I'm being funded by Clojurists Together to build out jank's lazy sequences, special loop* form, destructuring, and support for the for and doseq macros. Going into this quarter, I had only a rough idea of how Clojure's lazy sequences were implemented. Now, a month in, I'm ready to report some impressive progress!

Oh, hey folks. I was just wrapping up this macro I was writing. One moment.

For the past couple of months, I have been focused on tackling dynamic var bindings and meta hints, which grew into much, much more. Along the way, I've learned some neat things and have positioned jank to be ready for a lot more outside contributions. Grab a seat and I'll explain it all! Much love to Clojurists Together, who have sponsored some of my work this quarter.

One thing I've been meaning to do is build a custom string class for jank. I had some time, during the holidays, between wrapping up this quarter's work and starting on next quarter's, so I decided to see if I could beat both std::string and folly::fbstring, in terms of performance. After all, if we're gonna make a string class, it'll need to be fast. :)

I've been quiet for the past couple of months, finishing up this work on jank's module loading, class path handling, aliasing, and var referring. Along the way, I ran into some very interesting bugs and we're in for a treat of technical detail in this holiday edition of jank development updates! A warm shout out to my Github sponsors and Clojurists Together for sponsoring this work.

For the past month and a half, I've been building out jank's support for clojure.core/require, including everything from class path handling to compiling jank files to intermediate code written to the filesystem. This is a half-way report for the quarter. As a warm note, my work on jank this quarter is being sponsored by Clojurists Together.

As summer draws to a close, in the Pacific Northwest, so too does my term of sponsored work focused on a faster object model for jank. Thanks so much to Clojurists Together for funding jank's development. The past quarter has been quite successful and I'm excited to share the results.

This quarter, my work on jank is being sponsored by Clojurists Together. The terms of the work are to research a new object model for jank, with the goal of making jank code faster across the board. This is a half-way report and I'm excited to share my results!

After the last post, which focused on optimizing jank's sequences, I wanted to get jank running a ray tracer I had previously written in Clojure. In this post, I document what was required to start ray tracing in jank and, more importantly, how I chased down the run time in a fierce battle with Clojure's performance.

In this episode of jank's development updates, we follow an exciting few weekends as I was digging deep into Clojure's sequence implementation, building jank's equivalent, and then benchmarking and profiling in a dizzying race to the bottom.

I was previously giving updates only in the #jank Slack channel, but some of these are getting large enough to warrant more prose. Thus, happily, I can announce that jank has a new blog and I have a lot of new progress to report! Let's get into the details.

\ No newline at end of file +jank - blog

Hi everyone! It's been a very busy couple of months as I've been developing jank's LLVM IR generation, improving jank's semantic analysis, and furthering jank's module loading system. Thank you to all of my Github sponsors and to Clojurists Together, who help me pay the bills. As of January 2025, I'll be working on jank full-time and every new sponsor means that much more. Without further ado, let's dive into the details of the past couple of months.

Hi everyone! It's been a few months since the last update and I'm excited to outline what's been going on and what's upcoming for jank, the native Clojure dialect. Many thanks to Clojurists Together and my Github sponsors for the support. Let's get into it!

Welcome back to another jank development update! For the past month, I've been pushing jank closer to production readiness primarily by working on multimethods and by debugging issues with Clang 19 (currently unreleased). Much love to Clojurists Together and all of my Github sponsors for their support this quarter.

Hey folks! I've been building on last month's addition of lazy sequences, loop*, destructuring, and more. This month, I've worked on rounding out lazy sequences, adding more mutability, better meta support, and some big project updates. Much love to Clojurists Together, who are funding my work this quarter.

This quarter, I'm being funded by Clojurists Together to build out jank's lazy sequences, special loop* form, destructuring, and support for the for and doseq macros. Going into this quarter, I had only a rough idea of how Clojure's lazy sequences were implemented. Now, a month in, I'm ready to report some impressive progress!

Oh, hey folks. I was just wrapping up this macro I was writing. One moment.

For the past couple of months, I have been focused on tackling dynamic var bindings and meta hints, which grew into much, much more. Along the way, I've learned some neat things and have positioned jank to be ready for a lot more outside contributions. Grab a seat and I'll explain it all! Much love to Clojurists Together, who have sponsored some of my work this quarter.

One thing I've been meaning to do is build a custom string class for jank. I had some time, during the holidays, between wrapping up this quarter's work and starting on next quarter's, so I decided to see if I could beat both std::string and folly::fbstring, in terms of performance. After all, if we're gonna make a string class, it'll need to be fast. :)

I've been quiet for the past couple of months, finishing up this work on jank's module loading, class path handling, aliasing, and var referring. Along the way, I ran into some very interesting bugs and we're in for a treat of technical detail in this holiday edition of jank development updates! A warm shout out to my Github sponsors and Clojurists Together for sponsoring this work.

For the past month and a half, I've been building out jank's support for clojure.core/require, including everything from class path handling to compiling jank files to intermediate code written to the filesystem. This is a half-way report for the quarter. As a warm note, my work on jank this quarter is being sponsored by Clojurists Together.

As summer draws to a close, in the Pacific Northwest, so too does my term of sponsored work focused on a faster object model for jank. Thanks so much to Clojurists Together for funding jank's development. The past quarter has been quite successful and I'm excited to share the results.

This quarter, my work on jank is being sponsored by Clojurists Together. The terms of the work are to research a new object model for jank, with the goal of making jank code faster across the board. This is a half-way report and I'm excited to share my results!

After the last post, which focused on optimizing jank's sequences, I wanted to get jank running a ray tracer I had previously written in Clojure. In this post, I document what was required to start ray tracing in jank and, more importantly, how I chased down the run time in a fierce battle with Clojure's performance.

In this episode of jank's development updates, we follow an exciting few weekends as I was digging deep into Clojure's sequence implementation, building jank's equivalent, and then benchmarking and profiling in a dizzying race to the bottom.

I was previously giving updates only in the #jank Slack channel, but some of these are getting large enough to warrant more prose. Thus, happily, I can announce that jank has a new blog and I have a lot of new progress to report! Let's get into the details.

\ No newline at end of file diff --git a/img/blog/2024-11-29-llvm-ir/startup-time.plot.svg b/img/blog/2024-11-29-llvm-ir/startup-time.plot.svg new file mode 100644 index 0000000..4d4aaf8 --- /dev/null +++ b/img/blog/2024-11-29-llvm-ir/startup-time.plot.svg @@ -0,0 +1,69 @@ + + + + + + + + +240 + + + +120 + + + +0 + + + + +s + + + + + +C++ + + + + + + + + + + +LLVM IR + + + + + + + + + + + + + +Load from source + + + +Compile module + + + +Load from compiled module + + + + +