by openbasic on 4/3/19, 8:49 PM with 164 comments
by Aardappel on 4/3/19, 10:06 PM
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 through hoops.
- "Inline" structs: structs are allocated in their parent, and come at zero overhead compared to individual variables, which is particularly useful for Lobster's heavy use of 2d & 3d vector types.
- Multi-threading that uses separate memory spaces, meaning individual threads can run at max speed with no GIL overhead etc.
- A WebAssembly backend is being worked on.
- A lot of optimization work to make the language run faster.
For reference, it has been on HN before, as early as 2013 (https://news.ycombinator.com/item?id=5904430), but it has changed a TON since then (e.g. it was a dynamically typed language, now it is statically typed, with flow sensitive type inference).
by dfox on 4/3/19, 11:35 PM
by baldfat on 4/3/19, 10:01 PM
Haxe is an open source toolkit based on a modern, high level, strictly typed programming language, a cross-compiler, a complete cross-platform standard library and ways to access each platform's native capabilities.
what would be the benefit for using Lobster since I can work directly with each OS with a great scripting language built in?
by aitchnyu on 4/4/19, 6:37 AM
by c3534l on 4/3/19, 9:42 PM
by throwaway190102 on 4/3/19, 9:43 PM
by jkcxn on 4/4/19, 11:33 AM
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
by eggy on 4/5/19, 7:50 PM
I tried running the sierpinski example with a pre-compiled Windows .exe that I placed in the lobster root directory, and it gives me this error: "can't open file: stdtype.lobster".
I placed lobster and lobster/modules in my path, and it still throws the same error. I am assuming I need to build the .exe myself due to some incompatibility with the master branch and this older .exe?
I like a self-contained game PL. I use Raylib for that type of experience right now, but I like the concepts here. Thanks!
EDIT: copied modules to root of lobster, and now I get:
"stdtype.lobster(8): error: end of file expected, found: <"
I tried an included test file and a copy/paste of the sierpinski example, and both throw this error.
by hyperpallium on 4/4/19, 2:55 AM
var i = find [ 1, 2, 3 ]: _ > r
the same as?: var i = find ([ 1, 2, 3 ]) a: a > r
i.e. argument parantheses are optional for one argument; and _ is an implicit argument for a block.Would multiple functions arguments be done just with parentheses, like this?:
var i = find [ 1, 2, 3 ] (: _ > r), (: _ < r)
Seems like the syntactic generality of lisp or haskell, with the predictability of performance of C. EDIT I see it's as fast as non-JIT Lua... are there any features that prevent it from theoretically approaching the speed of C?PS: small detail, but that's got to be the best for-loop I've ever seen.
by Gravityloss on 4/3/19, 10:33 PM
map(my_array)element:element*2 //lobster
my_array.map{|element|element*2} //ruby
Arrays.stream(my_array).map(element -> element*2).collect(something list something) //java?
Lobster feels a bit unbalanced. Ruby has "pipes" which are a bit confusing substitute parentheses. Java has the cool arrow syntax but otherwise it feels very glued on.
(edited and fixed, thanks for the comment)by estomagordo on 4/4/19, 7:24 AM
by sansnomme on 4/4/19, 12:32 AM
by z3phyr on 4/4/19, 9:58 AM
by tjpnz on 4/4/19, 7:22 AM
by qarw on 4/4/19, 3:27 PM
by jbb67 on 4/4/19, 7:43 AM
by sscarduzio on 4/3/19, 10:15 PM
by mshockwave on 4/4/19, 6:06 AM
google+?
by stesch on 4/4/19, 8:16 AM
by Eire_Banshee on 4/3/19, 9:40 PM