Discussion
The Lobster Programming Language
mastermage: Another Crusty language
rf15: This is made by aardappel/Wouter van Oortmerssen, semi-famous OS game developer (Cube/Sauerbraten) and programming language designer. It's probably related to his recent game development work.
BoppreH: Lots of good ideas here.Flow-sensitive type inference with static type checks is, IMHO, a massively underrated niche. Doubly so for being in a compiled language. I find it crazy how Python managed to get so popular when even variable name typos are a runtime error, and how dreadful the performance is.All the anonymous blocks lend themselves to a very clean and simple syntax. The rule that 'return' refers to the closest named function is a cute solution for a problem that I've been struggling with for a long time.The stdlib has several gems:- `compile_run_code`: "compiles and runs lobster source, sandboxed from the current program (in its own VM)."- `parse_data`: "parses a string containing a data structure in lobster syntax (what you get if you convert an arbitrary data structure to a string) back into a data structure."- All the graphics, sound, VR (!), and physics (!!) stuff.- imgui and Steamworks.I'll definitely be watching it, and most likely stealing an idea or two.
v3ss0n: With LLM do we actually need new programming languages?
synergy20: imho no
jgavris: Almost spit out my coffee
Muhammad523: Novel programming languages have still educational value for those building them and, yes, we still need programming languages. I dont see any reason we would not need them. Even if Ai is going to write the code for you; how is it going to write it with no programming language? With raw binary? Absolutly not.
xscott: I think it would be cool if a language specifically for LLMs came about. It should have something like required preconditions and postconditions so that a deterministic compiler can verify the assumptions the LLM is claiming. Something like a theorem prover, but targeted specifically for programming and efficient compilation/runtime. And it doesn't need all the niceties human programmers tend to prefer (implicit conversions comes to mind).
nu11ptr: Sadly, probably not. I fear new languages will struggle from here on out. As a language guy, very few things in this new AI world make me more sad than this.
cgio: Yes, languages that talk to llms that is.
cv5005: Eventually it wont need to write any code at all. The end goal for AI is "The Final Software" - no more software needs to be written, you just tell the AI what you actually want done and it does it, no need for it to generate a program.
onlyrealcuzzo: I'm working on this now.It's a Profile Guided Optimization language - with memory safety like Rust.It's extremely easy to optimize assuming you either 1) profile it in production or 2) can generate realistic workloads to test against.It's like Rust, in that it makes expressing common illegal states just outright impossible. Though it goes much further than Rust.And it's easier to read than Swift or Go.There's a lot of magic that happens with defaults that languages like Zig or Rust don't want, because they want every cost signal to be as visible as possible, so you can understand the cost of a line and a function.LLMs with tests can - I hope - do this without that noise.We shall see.
ModernMech: But how do you know AI can generate programs without writing code? It can't today -- in fact the best thinking models work by writing code as part of the process. Natural intelligence requires it as well, as all our jobs are about expressing problem domains formally. So why would we expect an artificial intelligence should be able to reason able the kinds of programming problems we want them to solve without a programming language?
ModernMech: Do you have a repo?
onlyrealcuzzo: Yes.I'm almost ready to launch v0.1 - but the documentation is especially a mess right now, so I don't want to share yet.I'll update this comment in a week or so [=
ModernMech: Yes, very much so. Programming languages are tools for thought, if you want your LLMs to think better, then they'll need better tools for thinking than the ones we have today. That they are mostly thinking in and writing Python is incidental to when they were born and a limitation of current AI technology, not its final evolution.
mpweiher: Yes.In fact, LLMs have shown that we really, really need new programming languages.1. They have shown that the information density in our existing languages is extremely low: small prompts can generate very large programs.2. But the only way to get that high information density now (with LLMs) is to give up any hope of predictability. I want both.
ModernMech: Appreciate it!
benrutter: > I find it crazy how Python managed to get so popular when even variable name typos are a runtime errorTangential point, but I think this might be one of the reasons python did catch on. Compile checks etc are great for production systems, but a minor downside is that they introduce friction for learners. You can have huge errors in python code, and it'll still happily try to run it, which is helpful if you're just starting out.
grey-area: Is it though?As long as warnings are clear I’d rather find out early about mistakes.
skybrian: It's used for a new game called Voxile which is discussed here:https://news.ycombinator.com/item?id=47239042
foolfoolz: this is the “types make me slow” argument that everyone self debunks after they program that way for a handful of years
hagbard_c: > They have shown that the information density in our existing languages is extremely low: small prompts can generate very large programs."Write a book about a small person who happens upon a magical ring which turns out to be the repository of an evil entities power. The small person needs to destroy the ring somehow, probably using the same means it was created"...wait a few minutes...THE LORD OF THE RINGShttp://lotrproject.com/statistics/books/wordscount
dmit: What about when you have a long-running program. You can't both brag about NumPy, Django, and the machine learning library ecosystem while also promoting "It's great for when you just want to get the first 100 lines out as soon as possible!"I am guessing that Python, like Ruby, is dynamic enough that it's impossible to detect all typos with a trivial double-pass interpreter, but still.Wonder if there was ever a language that made the distinction between library code (meant to be used by others; mandates type checking [or other ways of ensuring API robustness]), and executables: go nuts, you're the leaf node on this compilation/evaluation graph; the only one you can hurt is you.
Luxusio: Built-in vector ops, ImGui, and WebAssembly target? This reads like it was designed by someone who actually ships games.
jasonjmcghee: You forgot you include in your list> Dynamic code loading
lock1: It looks like it.Based on what I observe as an occasional tutor, it looks like compiler warnings & errors are scary for newcomers. Maybe it's because it shares the same thing that made math unpopular for most people: a cold, non-negotiable set of logical rules. Which in turn some people treat warnings & errors like a "you just made a dumb mistake, you're stupid" sign rather than a helpful guide.Weirdly enough, runtime errors don't seem to trigger the same response in newcomers.
anticristi: Interesting angle: Compiler errors brings back math teacher trauma. I noticed Rust tries to be a bit more helpful, explaining the error and even trying to suggest improvements. Perhaps "empathic errors" is the next milestone each language needs to incorporate.
dist1ll: > no need for it to generate a program.I'm not convinced. What about cases that require correctness or efficiency guarantees? Would you let an AI drive the pulses of a pacemaker, or let it match orders for a financial exchange?
flir: If you're that confident in the LLM's output, just train it to output some kind of intermediate language, or even machine code.And if you're not that confident, shouldn't you still be optimising for humans, because humans have to check the LLM's output?
zahlman: > that everyone self debunksSpeak for yourself.
synergy20: how did you get that 'no programming language' conclusion? there are so many well established languages that are more than we need already, the market has picked the winners too, and AI has well trained with them, these are facts. If there is a new language needed down the road for AI coders, most likely it will be created by using AI itself. for the moment, human created niche language is too late for the party, move on.
Hemospectrum: I suddenly understand part of why experienced programmers seem to find Rust so much more difficult than those who are just beginning to learn. Years of C++ trauma taught them to ignore the content of the error messages. It doesn't matter how well they're written if the programmer refuses to read.
Aardappel: Even though this just showed up on HN (for the 10th time?) the Lobster project started in ~2010. No LLMs on the horizon back then.And while Lobster is a niche language LLMs don't know as well, they do surprisingly well coding in it, especially in the context of a larger codebase as context. It occasionally slips in Python-isms but nothing that can't be fixed easily.Not suitable for larger autonomous coding projects, though.
em-bee: can it reload code at runtime? can i change the definition of a function or class while the program is running?
Aardappel: No. It is a fairly static language, with whole program compilation and optimization. The dynamic loading the parent refers to is like a new VM instance, very different from class/function (re)loading.
netless: Ha, this is by amiga E language author! Back in the day it was quite an interesting language
crabsand: I see implementation inheritance there and I don't like it. Otherwise cool language.