9 ms·
The Lobster Programming Language
- mastermage 7mo agoAnother Crusty language
- jgavris 7mo agoAlmost spit out my coffee
- mastermage 7mo agowhat can i say except your welcome.
- rf15 7mo agoThis 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.
- aquariusDue 7mo agoHe also made Treesheets which is where I first heard about him. I recommend people interested in Personal Knowledge Management or related stuff check Treesheets out because while uglier compared to Obsidian there's some really great ideas in there. I won't spoil the fun but if you've got 15 minutes it's pretty easy to go through the tutorial. https://github.com/aardappel/treesheets https://github.com/aardappel/treesheets
- BoppreH 7mo agoLots 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.
- benrutter 7mo ago> I find it crazy how Python managed to get so popular when even variable name typos are a runtime error Tangential 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 7mo agoIs it though? As long as warnings are clear I’d rather find out early about mistakes.
- foolfoolz 7mo agothis is the “types make me slow” argument that everyone self debunks after they program that way for a handful of years
- zahlman 7mo ago> that everyone self debunks Speak for yourself.
- lock1 7mo agoIt 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 7mo agoInteresting 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.
- v3ss0n 7mo agoWith LLM do we actually need new programming languages?
- synergy20 7mo agoimho no
- Muhammad523 7mo agoNovel 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.
- cv5005 7mo agoEventually 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.
- ModernMech 7mo agoBut 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 about the kinds of programming problems we want them to without a formal language? Maybe they will not be called programming languages anymore because that name was mostly incidental to the fact they were used to write programs. But formal, constructed languages are very much still needed because without them, you will struggle with abstraction, specification, setting constraints and boundaries, etc. if all you use is natural language. We invented these things for a reason! Also the AI will have to communicate output to you, and you'll have to be sure of what it means, which is hard to do with natural language. Thus you'll still have to know how to read some form of code -- unless you're willing to be fooled by the AI through its imprecise use of natural language.
- irenetusuq 7mo ago[dead]
- b112 7mo agoBut are there magnets? https://m.youtube.com/watch?v=fjtVsYqAR3s https://m.youtube.com/watch?v=fjtVsYqAR3s
- skybrian 7mo agoIt's used for a new game called Voxile which is discussed here: https://news.ycombinator.com/item?id=47239042 https://news.ycombinator.com/item?id=47239042
- Luxusio 7mo agoBuilt-in vector ops, ImGui, and WebAssembly target? This reads like it was designed by someone who actually ships games.
- jasonjmcghee 7mo agoYou forgot you include in your list > Dynamic code loading
- em-bee 7mo agocan it reload code at runtime? can i change the definition of a function or class while the program is running?
- Aardappel 7mo agoNo. 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.
- throw10920 7mo agoLobster's design where the borrow checker/lifetime analysis automatically inserts reference counters if it can't statically determine lifetime is so vastly superior to Rust's approach (force you to do it by hand like it's 1980 and you are the compiler) that it's not even funny. This is what good language design looks like.
- netless 7mo agoHa, this is by amiga E language author! Back in the day it was quite an interesting language
- crabsand 7mo agoI see implementation inheritance there and I don't like it. Otherwise cool language.
- Aardappel 7mo agoYou'd prefer something more like Rust traits or Haskell Type Classes? I admit this was mostly out of simplicity/convenience/familiarity. If you're a Rust person, you'll appreciate that Lobster lets you use similar exhaustive switches to Rust's enum instead: https://github.com/aardappel/lobster/blob/master/tests/typeswitch.lobster https://github.com/aardappel/lobster/blob/master/tests/types...