Hi, author of the language here. Not a great time for HN exposure, as I just added a lot of new functionality, but none of that is documented yet :) But hey, all publicity is good publicity? For those interested, some recent things that have been happening: - Compile time reference counting. This does an analysis similar to the Rust borrow checker to infer lifetimes, but unlike Rust doesn't make the programmer jump t…
Pretty cool. How does it compare to Dyon? https://github.com/PistonDevelopers/dyon
The Lobster Programming Language
121–130 of 171 posts
Re: The Lobster Programming Language
#122Hi, author of the language here. Not a great time for HN exposure, as I just added a lot of new functionality, but none of that is documented yet :) But hey, all publicity is good publicity? For those interested, some recent things that have been happening: - Compile time reference counting. This does an analysis similar to the Rust borrow checker to infer lifetimes, but unlike Rust doesn't make the programmer jump t…
On first look, the language seems superficially similar to Nim. Which, per se, is certainly a plus in my book! ...but makes it somewhat difficult to understand when should I pick one or the other. Could you point out some important differentiators? (Apart from the current set of available libraries, which certainly make it appear more useful for the intended target audience at this very moment AFAIU, but in longer pe…
Some difference off the top of my head:
- Nim so far has been a GC-ed language (I know manual allocation is possible, and an ownership system is planned, but this was the default for most code so far). Lobster has been reference counted (and now compile time reference counted) from the start. Nims proposed ownership system is pretty cool, but still requires a fair bit of programmer cooperation, in that sense it will sit somewhere between Rust and Lobster in terms of programmer friendlyness.
- Lobster has a type inference algorithm that is able to go further than most languages in terms of allowing code without types to "just work". Nim has nothing even remotely like this.
- Nim is faster. Nim was designed for near native speeds from the start, Lobster started life a very high level language that slowly become more low level. There's nothing that prevents Lobster being as fast as Nim, it just will take a bit more time.
- Nim is more mature, in the sense that it has been around longer, has more libraries and tooling etc, and a larger community.
- Lobster has great support for programming with higher order functions: terse syntax, best possible type inference, zero overhead (compared to manual loops), non-local returns etc.
So in summary I'd choose Lobster over Nim if you care about Lobsters type and memory management or higher order function features, or if you like the idea of a language that makes games/graphics out of the box easier. If you just want to "get the job done", Nim probably is ahead of Lobster at the moment :)
Re: The Lobster Programming Language
#123Did you create a VM that is several times faster than Python's, for a static typed language thats as productive as a dynamic language, with true multithreading? How did you outdo entire language communities?
There are probably a 1000+ language implementations out there that are faster than Python, most of which are single person efforts.
Lobster is a much more static language, and does inlining of functions, inlining of structs, specialization etc that allow it to remove a lot of runtime cost, such that even the VM is fast.
It also has been in development for about 8 years now. I've been working on compilers in one way or another for almost 30 years.
Re: The Lobster Programming Language
#124Hi, author of the language here. Not a great time for HN exposure, as I just added a lot of new functionality, but none of that is documented yet :) But hey, all publicity is good publicity? For those interested, some recent things that have been happening: - Compile time reference counting. This does an analysis similar to the Rust borrow checker to infer lifetimes, but unlike Rust doesn't make the programmer jump t…
I wanted to share your language with a game programmer I know but the links to documentation from your homepage look broken.
Essentially https://htmlpreview.github.io/ is dysfunctional. Try accessing the sample links in that project's Github page.
Re: The Lobster Programming Language
#125This looks really fun: https://github.com/aardappel/lobster/blob/master/lobster/sam... Are the generators implemented entirely in user space using continuation passing style? And the coroutine function turns it into something pausable? Edit: I can't wrap my head around how return returns out of all the generators
Now the co-routine functionality takes an existing higher order function, and compiles it such that the call to the function argument instead does a yield. These are really regular co-routines that are implemented by copying stack frames off and onto the stack upon yield and resume. I just thought being able to share code between HOFs and co-routines was cute, since they often express the same patterns. Why would you write an iteration twice?
Re: The Lobster Programming Language
#126Earlier quoted context omitted.
Yes, those are equivalent. Multiple function arguments require a keyword in the caller, much like "else" introduces the second function argument in an if-then-else. So if "find" would take two functions, one for even and one for odd list elements, it would look like: "var i = find_even_odd [ 1, 2, 3 ]: _ > r odd: _ > r" There are no features that prevent it from "approaching" C's speed, merely a question of implement…
Fantastic, thanks. The many uses of : syntax are intriguing - lambdas, functions, control, python-style structure, data, globals. I reckon you've established it works in all cases, but I'm not yet familiar enough to see that for myself. For initial adoption, I wonder if more regular sample code, without the special-case abbreviations, might be more effective? (Followed by the short version.) OTOH, maybe at this early…
What would be more regular sample code? Do you mean just writing "find([ 1, 2, 3 ]) x: x > r" with explicit () and explicit variables? I agree that is easier to read, though the extreme terseness is also a feature..
Yes, everything can be one line, but in this case it would look a bit ugly:
def find(xs, fun): (for(xs) x, i: if fun(x): return i); return -1
Re: The Lobster Programming Language
#127Really stupid question here, but how do I start compiling Lobster programs on my machine (Windows or Linux)?
I'd highly recommend you build it yourself though, which can be done rather easily with VS (2019) on Windows or CMake on Linux. On Windows just press build in release mode and you're done. More notes here: https://htmlpreview.github.io/?https://raw.githubusercontent...
Then cd lobster && lobster samples/pythtree.lobster for example should run something. Or see here how to use from command line or from your fav editor: http://htmlpreview.github.io/?https://github.com/aardappel/l...
Re: The Lobster Programming Language
#128I enjoyed playing Cube based games, editing maps live and whatnot. Will check this out too!
Re: The Lobster Programming Language
#129Hi, author of the language here. Not a great time for HN exposure, as I just added a lot of new functionality, but none of that is documented yet :) But hey, all publicity is good publicity? For those interested, some recent things that have been happening: - Compile time reference counting. This does an analysis similar to the Rust borrow checker to infer lifetimes, but unlike Rust doesn't make the programmer jump t…
There's a lot of great technical info on the homepage, but it's tough for me to see the forest for the trees here. Could you make a short (probably oversimplified; that's ok) case for what Lobster is especially good at and why it's worth using rather than other programming languages? Or direct me to where one is already written?
Seems to nail most of the desires of mobile/indie scale development.
Re: The Lobster Programming Language
#130Hi, author of the language here. Not a great time for HN exposure, as I just added a lot of new functionality, but none of that is documented yet :) But hey, all publicity is good publicity? For those interested, some recent things that have been happening: - Compile time reference counting. This does an analysis similar to the Rust borrow checker to infer lifetimes, but unlike Rust doesn't make the programmer jump t…
Heyy @Aardappel Interesting project! I wanted to share your language with a game programmer I know but the links to documentation from your homepage look broken. Essentially https://htmlpreview.github.io/ is dysfunctional. Try accessing the sample links in that project's Github page.
I guess I'll have to change them, though not sure what to.. annoying github doesn't have a way to view markdown pages.
I guess for now, to read the docs online you could read the raw markdown here: https://github.com/aardappel/lobster/tree/master/lobster/doc... Better yet, just download the repo and read the html files in docs/