Jank: Seamless C++ Interop in Clojure, Achieved by a Solo Dev

2025-07-12
Jank: Seamless C++ Interop in Clojure, Achieved by a Solo Dev

Jank, a Clojure runtime, has made significant strides in achieving seamless interoperability with C++. Through manual memory management, enhanced type systems, and opaque boxes, the developer enables direct C++ code calls within Clojure. Real-world examples showcased include printing "Hello, world!" via C++ streams and parsing JSON files using the JSON for Modern C++ library. Future work focuses on packaging, distribution, bug fixes, and ultimately, an alpha release.

Read more
Development Interop

Clojure Code Snippet: Creating a Movie Genre Index

2025-07-10
Clojure Code Snippet: Creating a Movie Genre Index

This Clojure code snippet elegantly creates a movie genre index. Starting with a map containing movie information (title, genres, and Rotten Tomatoes score), it uses the `reduce` and `zipmap` functions to categorize movies by genre, ultimately producing a map where keys are genres and values are lists of movies belonging to that genre. This index facilitates looking up movies by genre and sorting them by rating. For example, it easily allows finding all thriller movies and sorting them by their Rotten Tomatoes score. The code is concise and efficient, showcasing the elegance of functional programming.

Read more
Development