News for hackers. Stuff that matters.
Re:Wren is a small, fast, class-based concurrent scripting l... by IshKebab on Sunday August 28, 2022 @05:52PM (#32632440)
I have yet to find any nice easy "normal" (like Typescript or Dart) statically typed languages that can be easily embedded. In the Rust space there's Gluon which is statically typed but has a really weird syntax and is functional, and there's Rhai which is really quite nice but dynamically typed.

I guess static type checking is probably more work on its own than writing an entire dynamically typed language.

Re:Wren is a small, fast, class-based concurrent scripting l... by goodpaul6 on Sunday August 28, 2022 @05:59PM (#32632493)
I’m currently working on Tiny [0], a small statically typed programming languages which is even more minimal than Wren.

[0] https://github.com/goodpaul6/Tiny

Re:Wren is a small, fast, class-based concurrent scripting l... by IshKebab on Monday August 29, 2022 @12:55PM (#32640510)
Looks interesting. How is the type just `array` in that example though? Doesn't it have to be an array of something?
Re:Wren is a small, fast, class-based concurrent scripting l... by goodpaul6 on Thursday September 01, 2022 @01:12AM (#32672261)
Interestingly, given the minimal core of the language, arrays are not built in (this is something I'm looking to change, of course).

As such, the "array" type is just an opaque type exposed via the C binding API. Given that there are no generics at the moment, this array API works with "any" values (similar to "any" in e.g. TypeScript).

Re:Wren is a small, fast, class-based concurrent scripting l... by fm77 on Sunday August 28, 2022 @06:57PM (#32632925)
Very interesting!

BTW: I think I found a typo: "MATCH2("+=", PERCENTEQUAL);" — should be "%=" ??

Re:Wren is a small, fast, class-based concurrent scripting l... by goodpaul6 on Monday August 29, 2022 @04:20AM (#32635870)
Thanks! Just fixed this. Seems the "%=" operator is less useful than I thought.
Re:Wren is a small, fast, class-based concurrent scripting l... by npage97 on Sunday August 28, 2022 @07:40PM (#32633279)
In the lua realm, there is teal. It is very much like a typescript for lua

https://github.com/teal-language/tl

Re:Wren is a small, fast, class-based concurrent scripting l... by pitaj on Sunday August 28, 2022 @09:45PM (#32633975)
There's mun [1] which is statically typed and AOT compiled.

1: https://github.com/mun-lang/mun

Re:Wren is a small, fast, class-based concurrent scripting l... by IshKebab on Monday August 29, 2022 @04:32AM (#32635946)
That has no mention of embedding in its description and has LLVM as a dependency so I assume it isn't easy. Looks like a decent language though.
Re:Wren is a small, fast, class-based concurrent scripting l... by 10000truths on Sunday August 28, 2022 @06:35PM (#32632746)
Have you checked out AngelScript?

https://www.angelcode.com/angelscript/

Re:Wren is a small, fast, class-based concurrent scripting l... by IshKebab on Monday August 29, 2022 @04:31AM (#32635940)
Oh yeah I always forget about this. I had seen it but it feels a bit archaic. Also it completely fails the "examples on the home page" litmus test.
Re:Wren is a small, fast, class-based concurrent scripting l... by born-jre on Monday August 29, 2022 @08:05AM (#32637171)
What about just embedding WASM vm then languages like assemblyscript and c/c++,rust,zig,go can target it ?