Skip to content
/ jank Public
forked from jank-lang/jank

The native Clojure dialect hosted on LLVM

License

Notifications You must be signed in to change notification settings

00bpa/jank

 
 

Repository files navigation

jank banner

CI

What is jank?

Most simply, jank is a Clojure dialect on LLVM with C++ interop. Less simply, jank is a general-purpose programming language which embraces the interactive, functional, value-oriented nature of Clojure and the desire for the native runtime and performance of C++. jank aims to be strongly compatible with Clojure. While Clojure's default host is the JVM and its interop is with Java, jank's host is LLVM and its interop is with C++.

For the current progress of jank and its usability, see the tables here: https://jank-lang.org/progress/

The current tl;dr for jank's usability is: still getting there, but not ready for use yet. Check back in a few months!

Docs

Appetizer

; Comments begin with a ;
(println "meow") ; => nil

; All built-in data structures are persistent and immutable.
(def george {:name "George Clooney"}) ; => #'user/george

; Though all data is immutable by default, side effects are adhoc.
(defn say-hi [who]
  (println (str "Hi " (:name who) "!"))
  (assoc who :greeted? true))

; Doesn't change george.
(say-hi george) ; => {:name "George Clooney"
                ;     :greeted? true}

; Many core functions for working with immutable data.
(apply + (distinct [12 8 12 16 8 6])) ; => 42

; Interop with C++ can happen *seamlessly*.
(defn sleep [ms]
  (let [duration (c++/std.chrono.milliseconds ms)]
    (c++/std.this_thread.sleep_for duration)))

Sponsors

If you'd like your name, company, or logo here, you can sponsor this project for at least $25/m.


Misha Karpenko

Bert Muthalaly

In the news

About

The native Clojure dialect hosted on LLVM

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 77.8%
  • Clojure 18.9%
  • CMake 1.9%
  • C 0.9%
  • Shell 0.4%
  • Nix 0.1%