Site icon Idon Rpg

From C++ to Clojure: New Language Promises Best of Both

From C++ to Clojure: New Language Promises Best of Both

When Jeaye Wilkerson started working on creating a new programming language about a decade ago, he sought to build a general-purpose programming language that embraced the interactive, value-oriented nature of Clojure as well as the desire for native compilation and minimal runtimes.

That programming language, which he named jank, is now his primary pursuit. Wilkerson quit his job as a software engineer at Electronic Arts (EA) earlier this month to work on jank fulltime.

jank aims to be a native Clojure dialect built on LLVM, combining elements from C++, Clojure, and Rust. The project has gained significant community interest, becoming what Wilkerson describes as the most popular unreleased Clojure project — with HumbleUI coming in as a close second.

Where jank differs from Clojure JVM is that its host is C++ on top of an LLVM-based JIT, Wilkerson said.

Started in 2015

The journey started in 2015 when he began exploring programming language design while working in game engine development. Wilkerson said he was influenced by multiple languages, but particularly Clojure and Rust.

“Features like gradual typing (maybe linear typing), more explicit memory management, value-based errors, and stronger pattern matching, to name a few, improve upon Clojure,” Wilkerson wrote in a post about jank. “This will allow another axis of control, where some parts of the program can remain entirely dynamic and garbage collected while others are thoroughly controlled and better optimized.”

Wilkerson said he has spoken with spoken with founders and tech leads of dozens of companies at various Clojure conferences and meet-ups, who are interested in using jank to solve performance, efficiency, usability, or interop problems with Clojure.

Building on Old Ideas

Even with the dominance of languages like JavaScript and Python or the continued relevance of languages like Java and C/C#, innovation remains alive and well in the software development space where individuals like Andrew Kelley, who created the popular Zig programming language, are exploring new ideas around core computer science, Brad Shimmin, an analyst at Omdia, told The New Stack.

“Interestingly, when you look at newer languages like jank, which was created by Jeaye Wilkerson sometime around 2016, you can see new technologies building upon much older ideas,” he said. “In the case of jank, we see the exploration of functional programming, built on top of one of the earliest programming languages, namely Lisp (well, Clojure, which is a dialect of Lisp).

“With jank, we see some the combination of several developer-friendly capabilities like JIT compilation, garbage collection, dynamic typing, and REPL interactivity. For developers looking for a modern and portable functional programming language built on the undying beauty of linked parenthetical pairs, as in (+ 2 2) = 4, jank seems like a terrific pickup.”

Roadmap

Wilkerson wrote that this year, there’s a ton of work to do. Here are the top 10 items:

  • Better error reporting
  • Seamless C++ interop
  • Whole-project AOT compilation
  • Parity with the main Clojure core libraries
  • nREPL server support
  • Leiningen and deps.edn support
  • Packaging and distribution of jank on major Linux distros and macOS
  • Documentation
  • Huge amounts of stability and robustness testing
  • Outreach, support, and community development

“I likely won’t be able to finish all of these in 2025, but I will get enough done on them to get jank released,” he wrote.

Use Cases for jank

Obviously, gaming is a key use case for jank, however there are others.

Beyond gaming — fitting jank into Unreal, Unity, Godot as an interactive, JIT-compiled Lisp that can AOT [ahead-of-time] compile right alongside the rest of the game — jank can fit basically anywhere you currently see C++ and Lua, Wilkerson told The New Stack.

“For example, GUI development, which is a historically weak area in the Clojure world, since jank will have seamless access to Qt, GTK+, wxWidgets, ImGui, etc.,” he said.

Moreover, Wilkerson said he has been working with a few folks at the European Organization for Nuclear Research, known as CERN, who are considering how jank will fit into their data science setup.

“They’re using C++ for most of their data science and have built some impressive tech to be able to JIT compile it. jank would be able to augment that by providing a full Lisp interactive workflow with REPL-based development,” Wilkerson told The New Stack. “jank is also a good fit for any Clojure devs who want a lighter runtime without sacrificing JIT compilation, as they would if they used a Graal native image, or if they want easy access to native libraries for whatever reason.”

Unconventional Design

Ultimately, Wilkerson said he built jank because it’s the tool he wants to use.

“For me, being able to choose where on the spectrum I am for dynamism, at any time, is a superpower,” he said in an interview. “With jank, the idea is that part of your code can be dynamically typed, garbage collected, and have rapid fire iteration, while other parts can be locked down, using more explicit memory/ownership tracking, with static typing, all while using the same language. This is an unconventional design and isn’t targeted for beginners; it’s designed to fit how my brain works.”

The Name ‘jank’

Wilkerson said the name “jank” came out of his effort to find something self-deprecating, á la Linus Torvalds‘ git.

“It’s memorable, fun to say, and ruffles some feathers. What’s not to love?” he said jokingly “The goal is that jank ultimately hits the point of being so not-janky that the name becomes affectionate. Until then, it can be taken more literally.”

What’s Next

Wilkerson said despite the already long journey of jank to date, this is just the beginning.

“In three years, we’ll have new game engines written in jank, jank written in existing game engines, GUI development, web services, jank support in all your favorite libraries, WASM builds, and serious performance to top it all,” he said.


YOUTUBE.COM/THENEWSTACK

Tech moves fast, don’t miss an episode. Subscribe to our YouTube
channel to stream all our podcasts, interviews, demos, and more.

Group Created with Sketch.


link

Exit mobile version