Hacker News

Jank Lang Hit Alpha

251 points by makemethrowaway ago | 33 comments

Jeaye |next [-]

Please link to https://book.jank-lang.org/ for anything related to the jank alpha. I wasn't quite ready to announce the alpha, but I appreciate that folks are excited. :)

There's just a couple more compiler features I wanted to get merged, but everything should be in order for folks to follow the book and try jank out.

pxc |root |parent |next [-]

Hi! I'm excited about jank and so I'm excitedly reading through the book you just linked. I noticed some grammatical errors. Will you consider PRs to the `book` section of the code, or would you prefer feedback in some other format in order to better maintain your authorial voice?

Jeaye |root |parent [-]

Hi! I'm happy to accept grammatical PRs to the book. You could also report issues via Slack or Github issue. I will not be accepting larger PRs to the book, to maintain a consistent voice.

pxc |root |parent [-]

Cool! I'm still reading, but when I'm done I'll open a PR for the few small issues I've seen.

Thanks for your work on jank! I hope the Alpha brings you lots of new users, useful bug reports, and some contributors. :)

agumonkey |root |parent |previous [-]

big kudos to all involved

jhhh |next |previous [-]

Do you envision the development to track clojure as much as is possible, similar to how cljs was conceived to be clojure in js and not just clojure-ish js, or do you think you'll eventually diverge? I made a language a while ago that was like 90% clojure but hesitated to call it that because I didn't want there to be an expectation that the same code would run as-is in both languages. Seems like from the landing page you're going for more of a drop in replacement. Look cool, good luck!

Jeaye |root |parent [-]

jank is Clojure and will track upstream Clojure development. I'm working closely with the Clojure team and other dialect devs to ensure this remains the case. I am leading a cross-dialect clojure-test-suite to help ensure parity across all dialects: https://github.com/jank-lang/clojure-test-suite We have support or work ongoing for Clojure JVM, ClojureScript, Clojure CLR, babashka, Basilisp, and jank.

With that said, jank will do some trail blazing down other paths (see my other comments here about Carp), but they will be optional modes which people can enable which are specific to jank. Clojure compatibility will remain constant.

satvikpendem |next |previous [-]

> jank is a general purpose programming language. It’s a dialect of Clojure, which is itself a dialect of Lisp. jank is functional-first, but it supports adhoc mutations and effects. All data structures are persistent and immutable by default and jank, following Clojure’s design, provides mechanisms for safe mutations for easy concurrency.

> Beyond Clojure, jank is brethren to C++ and it can reach into C++ arbitrarily to both access and define new C++ types, functions, and templates, at runtime. This is done by JIT (just in time) compiling C++, using Clang and LLVM. The result is that you can write Clojure code which can access C and C++ libraries trivially.

From https://book.jank-lang.org, for those of us who've never heard of this language

christophilus |root |parent [-]

Interesting. The last time I used C++, it was so painful to compile. I love Clojure, though, and a native target is appealing. I wonder how slow the compile/ recompile cycle is in Jank.

Jeaye |root |parent [-]

JIT compiling C++ is definitely the slowest thing we do. However, we're working on two different codegen modes.

1. C++

2. LLVM IR

The IR is much faster to compile, but its perf isn't nearly as good. This is meant to be a nice trade off, during iteration, so that you can use C++ codegen for your release artifact, but stick with IR when you're REPLing. The IR gen is still unstable right now, for the alpha, but we'll have both solidified this year.

forty |next |previous [-]

For a second, I misread and thought it was going to be about this guy https://en.wikipedia.org/wiki/Jack_Lang_(French_politician)

wiether |root |parent [-]

Exactly the same issue here!

achyudh |next |previous [-]

Congrats on the alpha release! I've been following the jank blog for a year now and it's great to see it reach this milestone. What is the current state of development tooling (such as CIDER support) for Emacs users?

Also I noticed a typo/broken link in the Welcome section: The link for "foreward" points to https://book.jank-lang.org/foreward.html, but it should be https://book.jank-lang.org/foreword.html

Jeaye |root |parent [-]

We have a working nREPL server, but it's not yet merged into the jank repo. https://github.com/kylc/try-jank

There's a Clang bug getting in the way of the progress we want, so we'll need to work around. There's a lot I'm juggling, but this is high priority.

Thanks for the broken link report. That should be fixed now.

makemethrowaway |next |previous [-]

Accompanying book: https://book.jank-lang.org/

jiehong |next |previous [-]

Is there a static type system included/inferred?

Couldn’t not find the answer

pxc |root |parent |next [-]

As a dialect of Clojure, it's a dynamically typed language. But its designer has expressed interest in eventually adding static type checks via a gradual typing system¹:

> I mentioned that a native Clojure is the first step toward my dream language. Indeed, it doesn't stop there. jank will always be a Clojure dialect, but it will also optionally support more. 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. 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. That’s exactly the control I want when programming.

--

1: https://jank-lang.org/blog/2025-01-10-i-quit-my-job/

tym0 |root |parent [-]

Oh man, as someone who used to contribute to a statically typed lispy language this would be the dream for me.

swlkr |root |parent [-]

there's always carp lang but no gc

tym0 |root |parent [-]

That's the language I was talking about :)

But none of us have worked on it in a while.

Jeaye |root |parent |next [-]

Carp is great and I would love to include a mode of jank which is very much Carp-esque. If you're interested in working together on this, please let me know.

tym0 |root |parent [-]

Most of my contributions were to the stdlib so my knowledge of the implementation of the type system is limited sadly.

Maybe Erik, the creator, would be interested. I know he was looking at rewriting Carp in cpp at some point.

dismalaf |root |parent |previous [-]

It's too bad. I was looking at it the other day, looks really interesting.

tym0 |root |parent [-]

It's still a fun language to play with :)

My favourite thing was to run it on all kind of microcontrollers as you could just emit C. Wrote a small GBA game with it.

Jeaye |root |parent |next |previous [-]

No full-lang static type system. jank has seamless C++ interop and all interop is statically typed, but as soon as things get back into Clojure land, it's all dynamically typed and hella polymorphic.

I will be exploring optional static typing modes for jank in the future, a la Carp. That will not be this year, though.

gleenn |root |parent |previous [-]

It is implementing Clojure which does not have static typing so my strong assumption would be no

Zak |root |parent [-]

Clojure offers static typing as a library.

kermatt |root |parent [-]

Is that 'core.typed' ?

Does it introduce incompatibilities with third-party libraries?

yogthos |root |parent [-]

typed Clojure has both Clojure and ClojureScript implementations, so it's not tied to the JVM https://github.com/typedclojure/typedclojure

|next |previous [-]

mvid |next |previous [-]

Would something like this then be able to interface with Rust codebases?

Jeaye |root |parent |next [-]

As much as any C++ project would, yes. That includes either through the C ABI or through the various C++/Rust interop mechanisms.

NuclearPM |root |parent |previous [-]

Yes, of course.

brcmthrowaway |previous [-]

I thought someone named Jank Lang found investment alpha.