NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
▲Jolt – Clojure that speaks C (jolt-lang.net)
flavio81 1 hours ago [-]
>Jolt is a self-hosted Clojure implementation that runs on a portable Scheme layer that supports multiple backends. Chez natively

This is the cool part. Now, i understand many Clojure libraries depend on Java libraries, so let's see how this works out for real world projects. But still, I think it's a great idea, and it's exciting. Well done, Yogthos!

On the other hand, regarding the "speaks to C", Common Lisp has had very easy interfacing to C for decades, i'm surprised this wasn't solved on the Clojure community already (!)

giancarlostoro 24 hours ago [-]
Curious how it compares to Jank which is also Clojure but for C++.

https://news.ycombinator.com/item?id=50202762

https://jank-lang.org/

yogthos 24 hours ago [-]
My understanding is that Jank is built to provide tight integration with C++, and does not aim to be a drop in replacement for Clojure. Jolt provides FFI for native ecosystem access, and aims to be a superset of JVM Clojure leveraging platform specific features like TCO and providing fibers built on top of continuations. It currently runs many existing Clojure libraries out of the box.
Jeaye 23 hours ago [-]
I am the author of jank. Saying that jank "does not aim to be a drop in replacement for Clojure" may send the message that jank is not a full Clojure dialect. This is unclear at best. jank is a native Clojure dialect with seamless C and C++ interop and a strong native ecosystem story, including native project and dependency management.

I believe what you're trying to say there, with "drop in replacement", is that jolt emulates common Java interop forms in Clojure JVM such that code written for Clojure JVM doesn't need to be ported to run on jolt. This a compelling feature which other dialects are tackling as well.

What I would mention as a key difference between jank and jolt, aside from the C++ story and native project management story, is that jolt is very much AI coded and jank is not. jolt doesn't disclose this on its website or Github readme, but it's something which clearly matters to a lot of people.

pona-a 23 hours ago [-]
It feels superficially similar to the recent vibe-clones of unreleased games, competing with the original for attention purely on time to market, or even blackmailing the dev, demanding ransom to not release it...

I've been occasionally checking up on jank for a few years now, and thanks for resisting the temptation to go slop and doing things the proper way.

yogthos 20 hours ago [-]
You are correct about being completely superficial in your 'analysis'. Jolt is not a clone of Jank in any way shape or form, it makes completely different design decisions, and it has different goals.

The language exists because I wanted to be able to use Clojure on a proper Lisp runtime, and to have access to the native ecosystem so that I could build native apps for my own use. Jank has never been a consideration for me here one way or the other.

I'd also point that I'm in no need of some additional clout having been publishing Clojure open source projects for over a decade now.

ModernMech 21 hours ago [-]
> doing things the proper way

You mean the classic way. A lot of compiler development is happening now using AI in very mainstream projects like Ruby, to giant billion-dollar projects like Mojo, to brand new indie languages like Roc. It's not an improper way of working, just a new way.

pona-a 12 hours ago [-]
Idk, Mojo was a VC-backed hyped up language that I don't think ever got to a sustainable place in its development (a stable optimization tool like numba people actually use instead of tweeting about), Roc is so small it doesn't really matter, and Ruby has the whole DHH phenomenon... I'd expect most major languages do use AI for fuzzing, like Rust, but that's a big difference from new development.

Generally, languages are places where I want the author to have the most ownership of their work. Read Marginalia's blog post about recent C++ index rewrite.

ModernMech 6 hours ago [-]
I mean those were just examples I used to show the diversity but if you want to get into it, llvm, C#, visual basic, elixir, haskell, javascript, julia, kotlin, python and typescript all have significant AI contributions beyond just fuzzing and testing and such. It's a tool lots of compilers teams are adopting.
michaelsbradley 23 hours ago [-]
Fwiw, I’d like to see both succeed, while taking very different approaches.

Jeaye, you’ve been doing amazing work on jank over the years, please keep going!

mykeb 20 hours ago [-]
I'm looking forward to trying out jank!
miroljub 19 hours ago [-]
It doesn't disclose but also doesn't hide it. Author obviously cares more about the product than about the ideology.
ribelo 7 hours ago [-]
Generally I agree, because we have already had the opportunity to find out how harmful human slop is. Just as people will soon be banned from driving cars, there will also be a ban on using code written by humans.
yogthos 22 hours ago [-]
Correct me if I'm wrong, but I recall you mentioning that your stance is that there were no immediate plans to implement features such as protocols in Jank?

Jolt aims to faithfully implement the totality of features that current JVM Clojure implements along with shim for Java surface to facilitate existing code to run.

Meanwhile, I don't see the tooling used to develop the language as the key difference in the language itself. I understand this is important for some people, and that's fine. However, that has little to do with the language itself , its features, or its overall functionality. So, for me personally, that is not an interesting distinction. What matters to me is what I can use the language for, and what code it is able to run.

Jeaye 22 hours ago [-]
> Correct me if I'm wrong, but was your stance that there were no immediate plans to implement features such as protocols in Jank?

Protocols, records, and Clojure structs will definitely be a part of jank. They have been lower priority than improving some of the more commonly used Clojure features, smoothing out the C++ interop edges, and providing excellent tooling. Still, I have been working toward supporting them already. jank will have them before its production release.

> Jolt aims to faithfully implement the totality of features that current JVM Clojure implements along with shim for Java surface to facilitate existing code to run.

Yes, this is a neat approach. Making dialects maximally portable across existing Clojure JVM code is compelling and I think jolt's momentum, due to your usage of AI, has allowed you to pioneer an approach here faster than other dialects have done. In the coming couple of years, I can see us arriving at a more wide-spread approach of registering these shims so that the large corpus of Clojure JVM code can be used in various dialects without requiring library authors to add reader conditionals everywhere.

However, "Clojure" these days doesn't only mean Clojure JVM. We don't yet have a specification for Clojure, but reasonably the intersection of Clojure JVM, ClojureScript, and ClojureCLR is the target compatibility point for most dialects. For example, ClojureScript doesn't have JVM interop, emulated or otherwise. But nobody would ever say that ClojureScript is not Clojure. I discussed this exact point in my Conj talk this year, since there seems to be some outdated reasoning that "Clojure" means Clojure JVM. It does not.

> Meanwhile, I don't see the tooling used to develop the language as the key difference in the language itself. I understand this is important for some people, and that's fine. However, that has little to do with the language itself , its features, or its overall functionality. So, for me personally, that is not an interesting distinction. What matters to me is what I can use the language for, and what code it is able to run.

Yep, I understand this philosophy. I can appreciate it. The reason why I bring up disclosure is because you and I both know that this is divisive. There are people who will see jolt as a front-runner, due to its AI usage, and there are people who would rather abstain or at least wait until the dust settles. Providing people the necessary information on the label so that they can make this decision themselves is the respectful, transparent thing to do. I need to do better here as well and I have already publicly stated I will update the jank repo and website with clear disclosures for how I have used AI, which is mainly for troubleshooting and bug fixes. This will be coming with the beta release.

yogthos 20 hours ago [-]
Having a portable Clojure API that's decoupled from the JVM would be ideal going forward. That would make life much simpler for both dialect and library maintainers.

In my opinion, the reader conditional approach simply doesn't scale because it puts the burden on the library author to maintain conditionals for each dialect and to understand how the dialects work internally. It's clearly a better approach to have a common API that libraries target, and then each dialect can implement in the way that makes sense for it.

I suspect we're still a little while away from that though, and in the meantime creating Java shims seems to be a reasonable approach to take in order to support existing code. That can also help inform what the Clojure centric API needs to cover which is an additional benefit of doing this work.

While I agree with you in a philosophical sense that Clojure as a language should not be viewed solely through the lens of its existing host platform, there is the practical aspect of being able to leverage the existing ecosystem from a particular dialect. I'm using Jolt for my own work and personal projects, so I want to be able to use mature libraries that I'm familiar with like Ring, Reitit, Malli, Selmer, and so on. These allow me to build real world projects without having to bootstrap the whole ecosystem from ground up.

And to the final point, I've always been up front about LLM usage in the project, and Jolt now has a clear AI policy in the repo as well that people can read: https://github.com/jolt-lang/jolt/blob/main/AI_POLICY.md

So, I would hope that nobody feels deceived in any way here.

christophilus 19 hours ago [-]
Well, I think this looks nifty. Yogthos appears to be the author, and he’s done a lot for the Clojure community over the years. I’m definitely going to give this a spin.
18 hours ago [-]
23 hours ago [-]
skydhash 1 days ago [-]
Was initially interested (I like languages that binds easily to C because of the nice libraries there, and I'm a fan of LISP), but the README is LLM-generated and the Makefile is unreadable. The there's this part in the AI policy

  It is simply not feasible for humans to keep the entirety of large projects in their heads all at once. When working on a project, one is constantly forgetting and relearning code along the way. The situation is even worse for projects where multiple people work together and no one knows what everyone else was thinking. We look at the code and try to build up sufficient context in our heads to make the necessary changes. When we misjudge that context or misunderstand existing code, we end up making mistakes.
It's a made up excuse because no one has ever tried doing that. Instead the core activity of software engineering (and engineering in general) is to break down things into modular components, ensure that they work well, produce specs, then assemble the result. Which is why no one read the source code for open(2) system call before using it. Instead they read the manpage and only when there's an issue there's a need to compare the specs with the implementation.

So it's a matter of communication between humans. If person A is responsible for module 1 and person B's module 2 depends on the former. It's up to A to provide a proper spec to B. It's not up to B to learn everything about module 1's implementation and doing so is kinda foolish.

So something like

  Any new code that is added is therefore always done with limited understanding.
Is a red flag. The codebase and workflow should be that new additions should deal with a limited context (as in one PR shouldn't touch unrelated things) at at time and the contributors should be able to come with a full understanding of what they are doing. If they cannot, it's either a failure of the codebase, the docs, the workflows, or the contributors.
trescenzi 24 hours ago [-]
I’m not even sure I agree it’s impossible for one person to understand a large codebase. It’ll depend on size of course but plenty of major pieces of software have been developed by a single person capable of understanding the whole codebase.
cryptonector 15 hours ago [-]
It depends on how you define 'understand'. If you mean "know like the palm of your hand", then it's not possible for large codebases. If you mean "know the lay of the land and how to find your way out of a paper bag", then it's possible, yes, but it's not possible to never miss anything.
yogthos 24 hours ago [-]
I've developed plenty of large software projects, and what happens in practice is that you build up the context for the part of the project you're working on when you make changes. If you could just hold the entirety of the project in your head we wouldn't need tools like debuggers or test harnesses at all. You'd just know that all the changes you made are correct. That's obviously not how things work in the real world.
veqq 18 hours ago [-]
yogthos 24 hours ago [-]
Author here. Pointing out that we can't hold entire projects in our heads is not a made up excuse. And doing things like breaking things up into modular components that have specifications and tests is precisely how we combat cognitive complexity. That's exactly the approach I am taking with Jolt where there is a large specification and conformance harness used to ensure semantic correctness of the language. https://github.com/jolt-lang/jolt/tree/main/test/conformance

Meanwhile, anybody who's maintained a large scale software project knows that even with the best practices, problems can still be introduced into the codebase. Nobody is arguing against limiting context or doing as much as possible to ensure the contribution is doing the right thing. Yet, the idea that you can have full understanding of how the feature will interact with every edge case is frankly laughable.

The notion that you can architect a perfect codebase where context and scope of the effect of any change is always completely clear is idealistic in the extreme. Of course, we should strive to keep the code quality as high as possible, nobody is arguing against that. The reality is that large projects are complex, and nobody has come up with a way to write code in the way where it's possible to perfectly control the scope of the effects of any one change. Every single large scale project out there has bugs, and regressions no matter how much the authors strive to make it perfect.

skydhash 23 hours ago [-]
> Yet, the idea that you can have full understanding of how the feature will interact with every edge case is frankly laughable.

That's not what I'm saying. What I'm saying is that the contributor should make a reasonable attempt at producing a bug free patch. And it's up to the project's leaders to make it easy to do so. And one of the easiest way for the latter to do so is producing design docs and isolating modules as much as possible so that it's efficient to get the needed understanding.

So both parties each have its own responsibilities into making quality contributions happen. I'm not against LLM usage. What I'm against is making the project difficult for human understanding because human understanding is limited or whatever. That's why I point out the README and the Makefile.

yogthos 20 hours ago [-]
Nowhere have I suggested that the contributor should not make a reasonable attempt at producing a bug free patch. And Jolt provides plenty of design docs actually: https://jolt-lang.net/docs/rfc/README.html

I also strive to have a clean and modular codebase, including building tools specifically aimed at helping ensure code quality in addition to manual reviews https://github.com/jlt-commons/jolt-metrics

So, if you'd like to point out specific gaps in documentation or problems in the code architecture, then feel free to share them and we can discuss that.

> What I'm against is making the project difficult for human understanding because human understanding is limited or whatever.

I'm against that as well, so not sure what your point of contention is really. The README simply points out that there are limits to what we can reasonably understand, and that the mitigation for that lies in the process such as having good specifications, benchmarks, regression tests, and so on.

Again, if you can point to specific aspects of the project that you claim make it difficult for humans to understand, then please be specific regarding what they are instead of making vague accusations. Also, it's quite interesting that you chose to take a few bits out of context while ignoring the following which is directly relevant to the accusations you are levelling here:

> The core skill in using these tools is the same as the skill needed when writing code manually. One has to understand the given requirement, the shape of the solution, and how to verify that the code produced actually matches the intent.

> What these tools do is automate the mechanical aspect of producing the code. Once it is written, you can read it, understand it, and change it as you would with any other code. The intention and the ideas come from the human using the tool, and new ways to automate the work of typing out code do not change the role or the responsibility of the developer.

> Focusing on how the code was produced rather than on the code itself dilutes the responsibility since blame should never be deflected to LLMs. The ownership of the code rests with the person submitting the code, and they must take responsibility for its quality and correctness. Either the code is clean and lives up to the standards of the project, or it will be rejected and the author will be asked to make changes to address the problems.

Can you point to where in your mind I'm suggesting that developers shouldn't try to ensure code quality or understanding?

mykeb 20 hours ago [-]
I'm using jolt in a new project and yesterday submitted my first PR to jolt, to improve some testing functionality. I'm pretty confident in it's quality and I'm super excited about jolt. It has opened very interesting frontiers for me as a clojure developer.
yogthos 19 hours ago [-]
Thanks for the PR, and it's really exciting to see that Jolt is becoming useful for people other than myself now. :)
skydhash 19 hours ago [-]
> So, if you'd like to point out specific gaps in documentation or problems in the code architecture, then feel free to share them and we can discuss that

I've already pointed out the gaps. The README is pretty much unreadable and don't feel like a human explaining stuff to another human and trying to ease the burden of understanding. It feels like a dumping ground for information. I don't care about exact shape of code itself, but when I see things that are human oriented, but has no care taken to make them better, that reflect badly on the project itself.

> Can you point to where in your mind I'm suggesting that developers shouldn't try to ensure code quality or understanding?

Try to approach the project as a person with a potato laptop, a bad internet connection, and no access to an LLM trying to get familiar with the project. Not saying that you should cater to such person, but just put yourself in someone trying to learn from this project and thus lacking your setup and your knowledge.

yogthos 17 hours ago [-]
What part of the readme is unreadable, what's unreadable about it? What is it not explaining clearly? You just keep making these vague statements without actually saying anything of substance. This is a bit ironic for somebody claiming to value explaining things from one human to another.

Also, what do LLMs have to do with getting familiar with the project? What part of the official documentation site is not clear to you? https://jolt-lang.net

What part of the getting started section did you have a hard time following and how should it be improved? https://jolt-lang.net/docs/getting-started.html

Are you able to articulate any constructive point, or are you just here to throw shade at other people's work?

skydhash 17 hours ago [-]
From the first paragraph of the README

  A Clojure implementation on Scheme. Jolt reads Clojure source, analyzes it to a host-neutral IR, emits Scheme, and runs it — on Chez by default, or on Gambit compiled to JavaScript for the browser. The compiler is self-hosted: it is written in Clojure (jolt-core/) and compiles itself. It ships a Clojure-compatible standard library.
Compare it to the intro for Ironpython 3 [0]

  IronPython is an open-source implementation of the Python programming language that is tightly integrated with .NET. IronPython can use .NET and Python libraries, and other .NET languages can use Python code just as easily.

  IronPython 3 targets Python 3, including the re-organized standard library, Unicode strings, and all of the other new features.
While I'm not a technical writer (and not even a native English speaker), if I had a go following that example (not sure if I grasped your original intent).

  Jolt is a Clojure implementation on top of scheme and primarily supports Chez. It can also be run with Gambit to run inside a browser environment. It aims to be fully compatible with Clojure and its standard library and the core compiler is also written in standard Clojure.
Then the whole "This is not the JVM" is just noise. Just replacing it with

  While we do not interop with the JVM, we provide shims for some basic features to interact with existing Clojure libraries.
Also some sentences like

  Differences from Clojure — what actually diverges

  Scripts — a file, a shebang line, *command-line-args*

  A file runs too — jolt script.clj, or an executable #!/usr/bin/env jolt script: see Scripts.

  The java.* shims are not the JVM. A shimmed class implements its JVM counterpart's API on Scheme, so it can look convincing while the surrounding runtime is not the JVM. 

  No JVM, no Java interop. No reflection, no gen-class/proxy. Interop syntax (Class., Class/static, .method) resolves only against a shimmed subset of the java.* standard library;

   .jolt extension. A namespace's source can be foo.jolt as well as foo.clj or foo.cljc, and the three are the same language: the reader, analyzer, and emitter never look at the extension. .jolt is a marker for readers and tooling, saying the file uses jolt-specific interop and is not portable Clojure.

   jolt completions tasks is worth knowing on its own: one line per listable task, name<TAB>doc, which is the machine-readable form of what jolt tasks prints for a person.
That is not how you write for a person, IMO. You can look at the ironpython repo to see how you structure things for human consumption.

[3] https://github.com/IronLanguages/ironpython3

ADDENDUM

Your comments here are way more readable than what's in the README and the web site. From the latter, I'm strongly skeptical of the quality of the code as what matter there are clarity, simplicity, and directness. If the docs are noisy (verbiage instead of clear explanations), I shudder to think what the code looks like.

yogthos 16 hours ago [-]
I'm not sure what's unclear in the first paragraph. It explains what Jolt is, what its runtime looks like, and what its capabilities are.

And Also don't see the problem with the sentences you highlighted. They explain the differences between Jolt and Clojure with short examples.

Honestly, this just feels like trolling at this point. The exerpts you highlighted as examples of supposed problems are succinct, simple, and direct.

You seem to have an axe to grind, but you can't actually make a coherent point, soy you're just keep being toxic here making personal attacks. I'm strongly skeptical that you have any good faith intentions here.

j12a 12 hours ago [-]
I think the point might not be so much about the docs lacking information but the lack of overall feel of reading human written text which is becoming increasingly a premium feature nowadays.

As there's so much crap quality vibe coded projects with fancy landing pages, it's more tricky to gain trust in any new project when introduction text is written by LLM that is known to make errors which human editor may let slip through, especially when you don't know the authors and their standards.

I worked previously on https://phel-lang.org/ docs before AI boom hit the project and with the minimal dev resources it seems unreasonable to keep up the docs with the codebase that is being rapidly developed.

I'd rather choose the project reaching stable version before raising issue about lack of human written documentation web site, trusting the authors to do reasonably good job in keeping them factually correct and up to date.

Still it'd be great if there was enough human resources that would write and maintain the documentation. Maybe the commenter could think about contributing on that if they'd like to make a change.

yogthos 5 hours ago [-]
Thanks, and very much agree with that. Keeping docs up to day is a job of itself. And I decided to lean on LLMs here based on my prior experience with Luminus and Kit where I I found that maintaining a significant amount of documentation, and making sure it was up to date was not trivial to say the least. Given that Jolt is still evolving and things are changing, it would be a whole second job to constantly keep updating the docs by hand.

All that said, I would like to focus on writing better docs by hand once time permits, and things have stabilized enough so that Jolt itself isn't a moving target. And of course, if there are more people contributing to the project down the road, that would also help. :)

jaen 12 hours ago [-]
Just another observation from someone not involved:

The paragraph immediately read like Claude slop to me so I closed the tab. It has its common writing smells (inconsistent level of detail / no model of reader's mind, non-physical objects "doing" physical actions metaphorically, overuse of compound sentences / comma-separated clauses for unconnected things).

Claude output does not sound like a human wrote it. It's generally unpleasant to read due to having to constantly mentally "translate" it into accurate technical English, and the cognitive distraction of running into the same ~10 writing style quirks over and over and over again.

yogthos 5 hours ago [-]
That's fair, but the problem is that maintaining docs by hand also takes time, and Jolt itself is actively evolving. So, it just doesn't seem like the right time to focus on this aspect to me. I'd rather spend it improving the language itself right now. But of course, if people want to contribute better, hand written documentation, I'm all for it.
pmbauer 23 hours ago [-]
> I get the impression that you must be new in your programming career, and hold idealistic views of the reality of what maintaining large projects looks like in practice.

Personal attacks for someone pointing out some issues with the LLM apologetics. Nice.

disclaimer: 27 year professional in this field and I mostly agree with OP.

59nadir 23 hours ago [-]
Anyone who's seen the author communicate here and on Lobsters will know that this particular critique irks them and they tend to react exactly like this when it comes up. It's a sore spot, and one the author should probably try to work through on their own since they seem to spend a lot of time vibecoding things.
yogthos 23 hours ago [-]
If you have 27 years of professional experience in this field and still think that you can have total knowledge of how a piece of functionality interacts with the overall codebase in a large software project, then I really don't know what to tell you. If that was the case we'd be writing perfect software that never has bugs.

Also, I have no idea what any of this has to do with LLMs. Nothing discussed here was LLM related in any way. Nor am I doing any apologetics for anything here. I'm stating basic facts that anybody with even a modicum of intellectual integrity would acknowledge.

But if you have any actual counterpoints to what I said then feel free to share them.

jm4 22 hours ago [-]
Don't let the anti-AI people bug you. They seem to pounce on every thread and complain about LLM usage to the point where it drowns out any legitimate discussion.

I'm a heavy LLM user myself and it's reinvigorated my passion for coding again. I'm making things I never would have otherwise made. I probably wouldn't even be writing code anymore. I've worked on large codebases in my career and I felt like I understood them well. Still, it was so time consuming to get to that point in the first place and I would still have to familiarize myself all over again when working on components that didn't get touched often. An LLM makes it so much easier.

Ultimately, the developer has to own the code and be accountable for it. As long as that's true, I don't see what difference it makes what tools the developer uses. It's true that you can shoot yourself in the foot with an LLM, but you're probably going to shoot yourself in the foot without one too.

Anyway, cool project. Thanks for sharing it.

yogthos 20 hours ago [-]
Thanks, and completely agree with all that. If we treat LLMs as a simply a new tool that developers use, then nothing has really changed. The person working on the project is still responsible for all the decisions, code quality, and the direction of the project.

And these tools are fascinating to me because it's a completely new way to develop software. I've been writing code for over two decades now, and most code you end up writing isn't interesting or novel in any way. Any app will need to talk to a database, have some services, have a UI, and so on. Once you've built enough of these things, you're just repeating the same patterns over and over.

LLMs are something that's genuinely new and different. Nobody really knows how to get the most out of them. Everybody is still figuring out how they work, what they can do, what workflows to use around them. And that's really exciting because you can discover some new trick that nobody's tried before. So, I find this reinvigorating as well because it brings back the novelty and excitement that I remember having when I initially got into programming.

pseudony 5 hours ago [-]
That's just like, your opinion, man.

Some software is governed by a specification or protocol, a lot is not. Hell, a few popular languages are without any formal specification. Not everything is like POSIX.

You are free to disagree, you are free to not use, but I don't see a reason to be dunking the author in the head for making a labour of love available just because you disagree with their process/programming language/<other thing>.

It comes off as attempting to coerce people to come around to your view. Just don't use it, trust that the rest of us are sufficiently grown-up to independently determine if using the project is in our best interests - we don't need your protection.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 18:57:25 GMT+0000 (Coordinated Universal Time) with Vercel.