Try Gleam
nchagnet.eu
nchagnet.eu
Overall, I recommend it.
Is there any research that supports what you are saying here? I agree it mostly works, but I’d expect more API hallucinations and test cycles at a minimum.
A much more recent and imo more realistic comparison of different languages with ai, is openai's study reimplementing sqlite in different languages: https://openai.com/index/low-resource-programming-languages/
That showed about what we expect, that popular languages like python, javascript, java, C#, etc do best, while less popular languages like Common Lisp, Ocaml, Zig, etc do slightly worse. But the difference is small enough I'd still just choose whatever language and ecosystem I know best that is appropriate for a project.
But the aim of that experiment was measuring correctness of llm written code in different languages, so used sqlite as a benchmark considering it's fairly complex software with a comprehensive test suite. It is not suggesting that because a language scores better on that benchmark it'd be better suited to writing the next sqlite, due to obvious other factors like performance...
The copious training data on mainstream languages doesn't really translate as a network effect, and therefore is kind of a red herring because the AI can use all that training on new languages as well. e.g. if you use a esoteric language that is vaguely object oriented, the AI will use its vast training on object oriented programs and apply it to your language instead of falling over because your language isn't Python and it doesn't have training data on it.
Moreover, the AI is trained on copious amounts of PL research, so it's not like the ideas in a new language are completely new to it.
Perfect example: Clojure. Clojure is the textbook esoteric programmers dream... but it's SUPER easy to sell and integrate in a typical Java shop. Why? Clojure is Java. You can use everything on Maven. You can interop with any Java tooling. No hacks or BS required... it's a native compatibility. The fact that the Gleam did not opt for this level of congruence is mind boggling to me.
I could be wrong btw so please correct me if I am. I am genuinely interested in using Gleam in place of Elixir (I think they nailed syntax and got rid of a lot of bullshit) but it is unfortunately not a drop-in replacement. It should be.
https://gleam.run/frequently-asked-questions/#Can-I-use-Elix...
https://carolina.codes/speakers/2024/dillon-mulroy
That site is also partially powered by Gleam on the backend.
Missing currying feels a little to me like walking in FP land with one leg cut off.
IMO it is hard to read (unless you're very familiar with the functions at hand), produces type errors that are not easy to follow (oops, I forgot the last arg), and is too rigid (I often need to partially apply arguments in non left-to-right order).
I never understood why partial application via "slots" isn't more common though (I just made up the term, not sure if this has a name). Like Clojure's:
#(f %2 "foo" %1 "bar")
;; same as
(fn [a b] (f b "foo" a "bar"))
Does Gleam have something like that?See the relevant docs: https://tour.gleam.run/everything/#functions-function-captur...
Seems more limiting than the closure way. Scala allows multiple _ but in turn that doesn't allow changing ordering.
TBH, I feel this stuff is not really worth it,
Plenty of practical reasons for currying, but the biggest (imo) is for use with the pipe operator.
If they don't have partial application now, what are the odds they'll have it in the future?
F# showed a lot of promise with Fable, but the community never quite got the tooling right, I think for a lack of energy/funding.
There are a few rough patches too. For example, I have yet to find out how to run a single test and not the whole suite.
Heck, OpenAI can't even get their models to reliably do what they intend, so yeah.
If you don't get the difference, I get there isn't much that you know about how instruction selection works, across all those approaches.
Do any of the optimizations you mentioned affect the underlying behavior of the run code? Semantics...
If not, it doesn't fit to LLM use, where this is very much the case. We can talk about bugs in compilers and undefined behaviours and so on and so forth all the livelong day, but you know as well as I that this is not of the same scope of impact.
I could and in the past would have written a long diatribe about how pure compilation to assembly is deterministic, thus making this not really suitable and that while yes, there are things like JVM that aren't 100%, we have contracts, docs, specs and, because of them, an expectation of consistency that LLMs do not deliver. I did not because I thought that was not necessary, but see my error now, that is my mistake.
Which for example, unless you can exactly replicate the world every single time a PGO data gathering session is done, there are no guarantees that the compiler will generate exactly the same machine code pattern, when given various PGO files generated at different occurrences.
But, high level languages don't really lose precision in any way that matters (except when you need extreme performance, resistance to timing attacks, or niche stuff like that). Natural language on the other hand loses precision that's usually important, so I don't see how your comparison is valid.
I've seen even the best models try to build & debug parallel and distributed systems. The results are always a bit uneven at best, even with a good harness and a lot of guidance.
The disadvantage of niche languages is that the LLM won't quite know the language as well due to less training data being available. But if you actually need to build something distributed, then this might be a good trade-off.
https://static0.cbrimages.com/wordpress/wp-content/uploads/2...
Gleam also runs on BEAM, which has important runtime characteristics vs other languages. That will impact your system and how it scales even if you never look at the code.
On the "languages for LLMs front", isn't that a bit "cart-before-horse"? Doubt we are anywhere near the limit of what a model could do with a static verifiable language, even more so since stuff like TS has massive training data, any new language wouldn't benefit in such a way.
Add to that, I'd rather be able to understand the output, partly for aforementioned reasons, partly because we have seen with post Spud GPT reasoning/summarisation issues what happens when being able to read model output becomes even slightly harder. Having model-focused languages would only exacerbate such issues.
Also, absolutely not a Maths expert so take this for an utter layman regurgitating of what I have read, but apparently the Lean proofs by OpenAI are very hard to parse even for the experts in the field, lovingly called "Clanker Proofs", even when they are valid.
Having not just correctness but also human understanding as a goal has merit, so there is that to consider too. Rather models get more efficient at using what we have (and can understand+maintain as humans if need be) then make it more opaque.
Moreover, to me coding carefully is still a hobby, a pleasure, a craft. Gleam is exactly the kind of language that makes this such a pleasant activity.
1. In a lot of cases, even if you're pure vibecoding and not reviewing any code, its still useful to be able to read it - you can then verify and reason about various aspects. LLMs are often flat out wrong on niche issues of performance etc, so for cases like this, not being able to read code is a big risk.
2. "Languages optimized for LLMs" sounds awesome, but so far, to me at least, it seems like LLMs work best in the same situations as humans- good test coverage, low-complexity, clean architecture, etc.
Because, we do?
You may not, which is fine. A lot of developers may not... that's fine. I guess you're all employed and don't risk your livelihood when things go wrong.
I do though. I take responsibility.
And just like with any junior developer I guide AI and I do review what it creates in the project that matter. (Personal tools I've entirely vibe-coded, never any client projects though)
The counterarguments from the other party (seemed like one person with multiple accounts to me) were about their disbelief in trans people and the idea behind the Black Lives Matter movement (coupling it with some organization that copied the name and stole some donations)
If you don't support their special interests in completely unrelated venues, you are persona non grata and will either fall in line or be excommunicated. It's a sophisticated form of control via identity politics.
"Don't publicly disagree with my ideals or I will use my little fiefdom to destroy you."
I have no problem with a community setting whatever acceptance criteria they like.
If the license did the same, I could see a case of being a bit of overzealousness.
I couldn't find if that was the issue, but if your problem is that the creator and the community have political opinions and don't like people with incompatible ones, then that's just society...
No, I am fine with incompatible views and I often seek them in order to grow. I do not enjoy echo chambers and I usually prefer and welcome disparate, including contrarian, opinions.
It's more like I don't want Ideology served with Programming Language, it feels like a distraction to me when I am in that mode. I usually consume Ideology under a different context, where I find it more productive and can contribute better to it.
I find this whole thread here interesting because until today I wasn't confronted by any of this, even though I joined the Discord and had a pleasant time (and will keep doing).
So I guess all I have to say on this is I don't think the "ideology" is that much served with the programming language. Yes I read that there's a code of conduct and that annoyed some people. But like I downloaded Gleam, I coded with it, I talked to people, and the thought police didn't knock on my door. So I guess what I mean is that it feels a little overblown.
Their ideology is literally on the front page of https://gleam.run/
Whether that's good enough for you or not is up to you.
> "As a community, we want to be friendly too. People from around the world, of all backgrounds, genders, and experience levels are welcome and respected equally. See our community code of conduct for more. Black lives matter. Trans rights are human rights. No nazi bullsh*t. "
Once in a while I try to push my boundaries, but then again I like to choose where I do this. For this one, I prefer not to do it in a work adjacent environment with strangers on the internet.
That aside, the language sounds fun hope you create cool things with it!
Why are my political views relevant? This is a programming language. Nobody is popping into the Gleam issue tracker and mentioning politics, nobody is violating the "code of conduct" there.
The "code of conduct" exists solely to lambast people who disagree with the author's special interests in other irrelevant spaces. This is the "paradox of tolerance" in codified form.
You may not participate if you hold and espouse ideals contrary to theirs in unrelated spaces.
It doesn't police peoples' personal beliefs outside the community. It only says that while participating in the community you agree not to harass people and try to contribute in a positive way.
I wonder if you have past experiences that are coloring your interpretation of this, because I'm really unsure where you're getting any of this from.
That said, their CoC does not block anyone from merely using the language.
This is bullshit.
Typically we are talking about the same category of people that become Reddit mods. Those are full blown adults where internet drama and culture war nonsense is their actual hobby. The open source thing beneath it is the side project.
It's the reason why I avoid getting involved with open source communities like billionaires avoid taxes.
That said, my original point is not to avoid Gleam as a language. The language itself looks pretty interesting. You don't need to stare at the CoC to use the language.
You don't say? https://x.com/louispilfold
> "the maintainer is a legitimate communist. i will not be supporting this language"
What type of individual do you suppose attaches their identity to this type of quote?
Er... No?
I think I was clear that you can use the language without getting involved with the drama related to the community behind the codebase.
The reality in online space is, you can either make Nazis aware they're not welcome at the door, or you can let them know when they start making trouble. Either way, if you wnt to keep your online community copasetic, eventually you have to tell Nazis to fuck off.
What is interesting here is that most likely I am on the same side of the political aisle as the people there.
I still find that sort of talk insufferable. Gives me mid-2010s "woke" bullshit vibes (god the slang of my contemporaries is horrid).
That’s probably what the OP meant by “activism”.
And a third group couldn't care less either way.
I have a few decades on my back, I am a father, a husband, a nerd... I once was young too, believe it or not, and I had ideals and I fought for them.
If you don't participate in this, why does it bother you? Unless they are active around your doorstep, that is.
That could be repaired, just don't care enough to spend time there again I guess.
Suggestions about cool projects are just as important as warnings about uncool projects.
Same as art by Hitler... if I would like it, I would like it, doesn't matter that I think he was one of the worst human beings.
So: I just argued, that there is a third way to view it.
You may, of course, see it completely differently and deem this project "uncool" for whatever reasons you want!
Do you only use languages that you can contribute to their codebase?
It might be problematic to use a language where needed help could be preceded by Twitter or HN background and allegiance check.
That is exceedingly rare. The vast majority of times you will either find your answer online to work your way around issues.
> It might be problematic to use a language where needed help could be preceded by Twitter or HN background and allegiance check.
I would remind you that we have LLMs now. One of the greatest gifts of LLMs is not having to rely on talking to people online to figure out issues when using a language/framework/library.