Live data from Hacker News

The Lobster Programming Language

strlen.com

41–50 of 72 posts

Re: The Lobster Programming Language

#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

Re: The Lobster Programming Language

#43
post #5

Obviously some will find this a silly opinion but the one thing that turned me off the most about the Nim programming language was its use of significant whitespace. The same is true with F# (and of course Python). Having had apps with YAML for config, and having had nightmares trying to copy/paste config directives from various sources, I just find whitespace to be unwieldy. Now that's a strong opinion, (weakly held…

+1 white space significance brings back whole tab vs space preferences and make it much harder for automatic re-formatting as well

Re: The Lobster Programming Language

#44
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

For case like this, I'd say your text editor should definitely just be able to tell you right away that this variable is a "string" when you mouse over it.

Re: The Lobster Programming Language

#46
post #42

Earlier quoted context omitted.

> 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

For case like this, I'd say your text editor should definitely just be able to tell you right away that this variable is a "string" when you mouse over it.

It shouldn't require a fancy forward-lookup-capable editor / language-server to show type. That is the point I am trying to make

var/declare x;

25 lines later

call f(x); // ** Reader has no idea what x is ... even though compiler has **

25 lines later

if (....)

     x = "world" // infer type as string - this is bad

Re: The Lobster Programming Language

#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 framework for shaders, would be implementing one of the medium difficulty LearnOpenGL 3D examples, such as the Multiple Lights example. https://learnopengl.com/Lighting/Multiple-lights

With how much goes wrong with OpenGL and shader development, wary of delving very much into an OpenGL centric language, and then finding out there's a bunch of gotchas in the part that tends to be desirable (3D rendering). "Whoops, one of a zillion hidden flags doesn't get set properly for some reason."

Texture loading seems like its there, and it says it actually uses "stb_image.h" internally. Plus, it apparently does cubemaps.

Lights seem implemented, although not sure what that does "sets up a light at the given position for this frame."

Model Loading is also another, from the built-ins it looks like it does .ply and .iqm? (Inter-Quake Model) files.

Matrice math has a few although seems like a LookAt and Perspective matrix creator in the 4x4 category would be needed that return a matrix you can apply to a shader uniform. gl.perspective looks weird, just says "changes from 2D mode (default) to 3D right handed perspective mode"

Either way, looks cool, would just like to have more examples in the target demographic, OpenGL game development. Even if they're simple. That's part of why the LearnOpenGL examples are so useful. Simple. Implementing even a significant subset would go along way toward selling me on game development in an unknown language.

Re: The Lobster Programming Language

#49

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.

Can I interest you in a rat named Keith, with its foot blown off?

At least it has personality. Not a generic, noncommittal blob.

Re: The Lobster Programming Language

#50
post #3

I had seen Lobster before, but not really looked closely. Seeing it again now, I think I was wrong to dismiss it. Just at the syntactic level with semantics described in the link, it looks like it really might be "Python done right". The link mentions lots of features, but the following bits caught my eye. The let/var declarations for constants/variables is much better than implicit declaration, which silently hides…

Yup, it generally inlines lambdas passed to custom control flow functions, so it ends up pretty similar to hand-written.

The name does not refer to anything in particular :)

Post reply on HN