4 ms·
Cross-platform embeddable VM language written in C for iOS and Android? Strange, I've been doing this for years using Lua...
by seibelj 10y ago
Cross-platform embeddable VM language written in C for iOS and Android? Strange, I've been doing this for years using Lua...
- chrisseaton 10y agoWhy are you being so sarcastic? I don't think they claimed that you couldn't do it before.
- chc 10y agoThe only explanation of its intent in the readme is that it was created "in order to offer an easy way to write portable code for the iOS and Android platforms." I think the parent comment was pointing out, in a sideways manner, that they didn't need to create a new language to do that, so it's somewhat mysterious what this is actually meant for.
- chrisseaton 10y agoThe parent comment said 'strange...' as if they had claimed that nobody had done it before, and therefore it was strange how he was doing it. But they hadn't claimed that. So what is strange? If a new bakery opens in my town I don't say 'strange... I've been buying bread for years'. It's an alternative offering. You may say it's not necessary, but it's not strange. That just doesn't make any sense as a snarky remark in this situation.
- chc 10y agoIf somebody asked why Hypothetical Dave opened a bakery and Dave answered "So this town would have a source of bread," I think it would be reasonable to find that strange. He isn't explicitly saying nobody has done it before, but the answer is weird if it's already been done. I mean, creating an unnecessary programming language isn't strange — it's extremely common, and some are even good. But providing a rationale for creating the language that doesn't explain why you created the language is a bit odd, isn't it?
- salimmadjd 10y agoI really like what the company is doing with their other products, mainly their design tool. It looks interesting. But I have the same question as yours. Why not just leverage Lua. I wish they made it clear what they're gaining. Maybe the end bundle size is smaller than Lua?
- vvanders 10y agoLua is already incredibly compact, I agree in that I don't really see what this is solving that isn't already covered by Lua.
- redahs 10y agoConcurrency is always hard and fibers could be interesting, but looking at src/runtime/gravity_vm.c It appears to be single threaded with max 1 fiber running simultaneously per VM. I think there is still a niche for something like a Lua/Erlang hybrid where there is a real possibility that the VM will run high level code units on multiple cores. The other thing missing from Lua and LuaJIT which would be nice in future VMs would be support for SIMD vector optimizations.
- vvanders 10y agoLua already has coroutines. I think if you're looking to peg multiple cores or SIMD then your going to want to drop down to another language anyway.
- redahs 10y agoI do use C, but my point is that it is feasible to incorporate both of those features in an embedded VM, by using Erlang style actors for concurrency, and by providing builtin vector types that use SIMD instructions where available. If future language designers were to do so, they would be able to better differentiate their language from Lua, which does not provide these features.
- nine_k 10y agoIsn't this language a bit higher level? That is, more expressive in the same amount of text?