Live data from Hacker News

The Lobster Programming Language

strlen.com

51–60 of 72 posts

Re: The Lobster Programming Language

#51
post #47

Looks like a cool language. Like the short syntax. Impressed they implemented so much of OpenGL natively in the language. Lot of work to implement OpenGL. With such a focus, be nice to have a few more OpenGL examples. Took a bit of looking, yet found a longer example for a 2D shooter. https://aardappel.github.io/lobster/shooter_tutorial.html However, the real test, from personal perspective, especially with a custom…

the "gl" namespace is really a bit of misnomer since it is much higher level API than OpenGL, and does not really depend on OpenGL. It could pretty easily run on another API underneath.

The repo comes with a LOT of graphical samples (in the "samples" dir).

The lights are more of standard way of passing them to the shader (see the phong shader implementation).

Matrices are a bit of a weak spot since its all implicit (which is convenient, but not powerful). There are also classes for direct use of matrices though.

Re: The Lobster Programming Language

#52

This is a really nice looking language. Feedback in case the creator sees but it wasn't obvious to me at first that it was targeting game development. The first mention is in features: > Features have been picked for their suitability in a game programming language Would be fun to see some basic games like tetris, pong etc in Lobster in case anyone has an example floating round?

Seen by creator :)

It comes with a tiny minecraft clone in Agreed it could use more actual game examples. I've written a ton of game prototypes in it, and some could do with open sourcing, just haven't gotten around to it.

Re: The Lobster Programming Language

#53
post #2

Nice! So it looks like polymorphism is done via C++ template-style ad-hoc polymorphism? Are there any restrictions on it? Also, is there any kind of sophisticated pattern matching? I feel like for me a language without pattern matching is a non-starter these days.

Yes, its somewhat similar, monomorphic specialization.

I am sure it has some limitations, but it is pretty powerful, it can even do things C++ can't, like have a type error in a branch that in the current specialization is never executed doesn't count as a type error :)

There's no FPL style pattern matching. It can do a switch case on types (the various subclasses of a base class) but only 1 level, i.e. can't match against type of members. That could still be added, just personally rarely have use for it.

Re: The Lobster Programming Language

#54
post #29
post #28

Earlier quoted context omitted.

Surely you don't mean Quake the 1996 video game, so what is "Quake" in this context?

I was mistaken ... not the author: https://quake.fandom.com/wiki/Wouter_Van_Oortmerssen_(Aardap...

Yes the author :) I make both programming languages and games / engines / maps..

Re: The Lobster Programming Language

#55

This feels like a scripting companion to Rust with Python-like syntax, nice one. I definitely could see it being using as a Lua replacement in embedded contexts.

You should take a look at Koto Programming Language, I’ve been trying to keep an eye on it.

https://koto.dev/

Re: The Lobster Programming Language

#56
post #42

Feels like it’s taking the best of Rust and Ruby (with Python style whitespace) Admittedly it’s just a first impression

> Flow-Sensitive Type-Inference imho, I don't consider Type-inference as a good thing when it happens from 50 lines ahead/below. How would regular people follow along? Good case x = "hello" // infer type as string - good thing. Bad case var/declare x; 50 lines later if (....) x = "world" // infer type as string - this is bad

In Lobster you must initialize a variable declaration. Now you can produce your bad case with `var x = nil`, but that is undesirable because nil types must be explicitly checked at compile time, so typically you want to use as few nils as possible. More likely thus is `var x = ""` if you must initialize later.

Re: The Lobster Programming Language

#57

Well, it has an animal mascot logo. Which is my personal yardstick for if a project is destined for success. So, off to a good start, but the lobster could be more cuddly.

Fun story behind the name, per the language inventor Hendrik K. Grubbs, Phd.

"Dr. Grubbs, what inspired the language name"

"A Hooker down by the docks"

"WHAT?!?"

"Yes, I went to her lonely one Friday, she only cost five dollars. Next day I had a terrible itch and realized she'd given me crabs. So I confronted her the next day and asked why she had done this to me. 'What do you expect for five dollars, lobster?' "

Re: The Lobster Programming Language

#58
post #42

Feels like it’s taking the best of Rust and Ruby (with Python style whitespace) Admittedly it’s just a first impression

> Flow-Sensitive Type-Inference imho, I don't consider Type-inference as a good thing when it happens from 50 lines ahead/below. How would regular people follow along? Good case x = "hello" // infer type as string - good thing. Bad case var/declare x; 50 lines later if (....) x = "world" // infer type as string - this is bad

I agree with your point in general, and I'm curious if it's a problem in Lobster. Here's one in Rust:

    let i = 1;
    let j = 1;
    print!("i: {:?}\n", !i);
    print!("j: {:?}\n", !j);

    // pretend there's a lot of code here

    // spooky action at a distance
    let v = vec![1, 2, 3];
    v[i];

You might think those two print statements would print the same value. They do not.

Re: The Lobster Programming Language

#59

One thing I hate about Generative AI is that it has flipped the value prop of making your language similar to an existing popular language. This helps new programmers but it really messes with generative AI. I can feel the era of fun new programming languages that might break big ending.

I don't know. I wrote a compiler with a syntax that's close to all the curly languages, but different in some ways. ChatGPT had no problem cranking out some test cases after I explained the rules and gave minimal examples. I guarantee it wasn't trained on any source code of my language, because none existed more than two months ago.

Re: The Lobster Programming Language

#60

This is a really nice looking language. Feedback in case the creator sees but it wasn't obvious to me at first that it was targeting game development. The first mention is in features: > Features have been picked for their suitability in a game programming language Would be fun to see some basic games like tetris, pong etc in Lobster in case anyone has an example floating round?

Seen by creator :) It comes with a tiny minecraft clone in Agreed it could use more actual game examples. I've written a ton of game prototypes in it, and some could do with open sourcing, just haven't gotten around to it.

Ah hey, nice language! A minecraft clone in <100 lines sounds like a pretty awesome feat, I'll definitely check it out!
Post reply on HN