Live data from Hacker News

Show HN: Jacquard, a programming language for AI-written, human-reviewed code

github.com

31–40 of 67 posts

Re: Show HN: Jacquard, a programming language for AI-written, human-reviewed code

#32
post #11

> External/world effects are visible in function signatures Brilliant. I think Jai has something like that? Each function declares what it's going to touch (both read/write) globally, and I think you can specify that per block even. I haven't used Jai (I think it's not out yet) but I remember the author talking about this and it sounded like a great idea. It's related to the idea of pure functions being easy to reaso…

Not just effects, multi-shot effects: > Algebraic effects with deep, multi-shot handlers. A handler can resume a computation zero, one, or many times, which is what makes exhaustive search and exact inference ordinary library code. I love me some algebraic effects, but this sets off alarm bells for me. Multi-shot effects are neat and powerful but are incredibly difficult to reason about for humans, and given that the…

> Multi-shot effects are neat and powerful but are incredibly difficult to reason about for humans

I had a very similar thought and ended up building a capability system[1] in my language to capture side effects.

[1] https://march-lang.org/docs/cookbook/capabilities/ * docs are a work in progress

Re: Show HN: Jacquard, a programming language for AI-written, human-reviewed code

#33

The obvious problem with any new AI-centric programming language (I think this is the third I’ve seen at this point) is that any LLM you try to use with it will be starting from zero - it has nothing to copy from and very little documentation available to find on its own, if it’s even capable of doing web searches. Java or C++ or whatever may be “worse” by some standards for LLMs (or humans) to work with, but all LLM…

> very little documentation available to find on its own

Building something like haskel's hoogle seems like a smart approach to this problem.

Re: Show HN: Jacquard, a programming language for AI-written, human-reviewed code

#34
post #11

> External/world effects are visible in function signatures Brilliant. I think Jai has something like that? Each function declares what it's going to touch (both read/write) globally, and I think you can specify that per block even. I haven't used Jai (I think it's not out yet) but I remember the author talking about this and it sounded like a great idea. It's related to the idea of pure functions being easy to reaso…

Not just effects, multi-shot effects: > Algebraic effects with deep, multi-shot handlers. A handler can resume a computation zero, one, or many times, which is what makes exhaustive search and exact inference ordinary library code. I love me some algebraic effects, but this sets off alarm bells for me. Multi-shot effects are neat and powerful but are incredibly difficult to reason about for humans, and given that the…

That’s a fair concern. I’d expect multi-shot handlers to be relatively rare and mostly something library code uses rather than a day-to-day utility. But an LLM given free rein may decide to behave differently.

For now, I am looking into making a clearer distinction between one-shot and multi-shot handlers so we can reject cases where resuming again would be unsafe, like around filesystem writes.

More to explore here, certainly.

Re: Show HN: Jacquard, a programming language for AI-written, human-reviewed code

#35
post #11

> External/world effects are visible in function signatures Brilliant. I think Jai has something like that? Each function declares what it's going to touch (both read/write) globally, and I think you can specify that per block even. I haven't used Jai (I think it's not out yet) but I remember the author talking about this and it sounded like a great idea. It's related to the idea of pure functions being easy to reaso…

Thanks for the pointer to Jai! I will check it out. Yes, Jacquard uses content-addressed definitions and it should be possible to set up a process for 'review again if this changes' on top of it. Warp, the testing framework, already uses this to avoid rerunning pure tests when neither the definition or dependencies have changed. Jacquard does not currently implement proof or strictness levels, but binding those to a…

Haven't built anything yet as far as language / tooling goes, but my experiences with poorly designed languages and tooling have basically made me paranoid as far as "what touches this variable", "what does this function actually do", ended up arriving in Rust / Haskell-ish territory just by recoiling from the pain of PHP/WordPress, where everything is global, mutable, dynamic and designed to make you go completely insane.

(In a nutshell: the more dynamic a programming language is, the more impossible it becomes to reason about what the program is doing. That's fine for throwaway scripts and game jams (#pragma JamMode), but the "the program is probably seriously wrong" should be explicitly opt-in, not the default ...)

So my current approach is everything should be as local as possible, as immutable as possible, etc. Basically Rust except I'm not a fan of low level programming. (I basically want Rust With GC (C# memory model), which sends Rust folks into paroxysms!)

I want it stricter than Rust in many respects, but also less annoying. (Better ergonomics and higher level, with a low level escape hatch when needed.)

Swift is apparently close to that, and might deserve another look.

I've also been obsessed with formal verification and proofs except, today I had a very revealing experience. I had an LLM incorrectly implement a major feature, and "verify" it with several thousand lines of tests. It was, as implemented, backwards, and also completely pointless — but all tests came back green!

I laughed when I realized, if it had been done in Rust, and with a layer of formal verification... well all the proofs (of the stupid and wrong and backwards thing) would have come back green too... It would have mathematically proven that the incorrect thing was correct...

Re: Show HN: Jacquard, a programming language for AI-written, human-reviewed code

#36
post #15
post #7

"Esperanto for Clankers"

Yea, LLM remove the burden of typing - so if token cost don’t explode the new high-level languages will be above the current - and the new low-level language will maybe just weights…

Like to believe we will one day use a low level language that is non-deterministic to build everything on top off seems to me in violation of such fundamental laws of information theory it's on the level of a belief in telekinesis.

Re: Show HN: Jacquard, a programming language for AI-written, human-reviewed code

#37
post #35

Earlier quoted context omitted.

Thanks for the pointer to Jai! I will check it out. Yes, Jacquard uses content-addressed definitions and it should be possible to set up a process for 'review again if this changes' on top of it. Warp, the testing framework, already uses this to avoid rerunning pure tests when neither the definition or dependencies have changed. Jacquard does not currently implement proof or strictness levels, but binding those to a…

Haven't built anything yet as far as language / tooling goes, but my experiences with poorly designed languages and tooling have basically made me paranoid as far as "what touches this variable", "what does this function actually do", ended up arriving in Rust / Haskell-ish territory just by recoiling from the pain of PHP/WordPress, where everything is global, mutable, dynamic and designed to make you go completely i…

[deleted]

Re: Show HN: Jacquard, a programming language for AI-written, human-reviewed code

#38

Earlier quoted context omitted.

Streaming videos and playing heavy online games has a similar effect. Which do you think should be preferable: watching ~3 hours of video streaming, or generating a respectably-sized project that perfectly scratches an itch?

I don't really have a dog in this race, but "3 hours of streaming" is several orders of magnitude off using a frontier model to write a project like this. Like, 3000 hours of streaming would be closer. Then you're talking about one person consuming the resources for a useless project they'll abandon after a week vs. the resources consumed providing years of entertainment.

How did you get 3000? That's a wildly inaccurate and out-of-this-world figure. I did some preliminary research recently that I'm not fully recalling (would have to look for it), but I had a baseline of something like 9 minutes of streaming video using the equivalent resource (electricity, etc) of just over 5 average prompts. So 3 hours of streaming video is a bit over 1000 prompts.

I can get an OK tool that still goes a good distance in scratching an itch in say ~3-8 prompts, so with 1000 I'm looking at a small app. With 100000... I'm finding it a bit hard to imagine TBH; somewhere in the region of the Bun port to Rust[0] is my likely-off-base-but-not-as-bad-as-yours guess. Heck just consider that there are devs out there running systems with local models that are probably more than half the size of a frontier model, and how that 3000-hours-equivalent cost would've been eating into their pockets in the form of electricity bills.

[0] https://bun.com/blog/bun-in-rust

Re: Show HN: Jacquard, a programming language for AI-written, human-reviewed code

#39
post #35

Earlier quoted context omitted.

Thanks for the pointer to Jai! I will check it out. Yes, Jacquard uses content-addressed definitions and it should be possible to set up a process for 'review again if this changes' on top of it. Warp, the testing framework, already uses this to avoid rerunning pure tests when neither the definition or dependencies have changed. Jacquard does not currently implement proof or strictness levels, but binding those to a…

Haven't built anything yet as far as language / tooling goes, but my experiences with poorly designed languages and tooling have basically made me paranoid as far as "what touches this variable", "what does this function actually do", ended up arriving in Rust / Haskell-ish territory just by recoiling from the pain of PHP/WordPress, where everything is global, mutable, dynamic and designed to make you go completely i…

Ah, that’s a tough one. My hope is that Jacquard, or some similar language, can make intent explicit through readable, high-level constructs, giving both the human reviewer and the model a clearer target while the details are filled in. But it still can’t tell us whether the original intent was right.

Coincidentally, you reminded me of one of my favorite Charles Babbage quotes:

> “On two occasions I have been asked, ‘Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?’ I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.”

I suppose catching that kind of mistake is how humans prove to our future AI overlords that we should be kept around.

Re: Show HN: Jacquard, a programming language for AI-written, human-reviewed code

#40
Very cool!

I’ve been very fascinated by the concept of a programming language designed for LLMs, both to that advantage of their strengths and to try and minimize their weaknesses.

Here’s a take I experimented with last year (feel very free to steal anything useful): https://github.com/GoogleCloudPlatform/aether/tree/feature/v...

(Note: main has a version that was an ugly syntax, the branch in the link was for a prettier attempt)

Post reply on HN