3 ms·
Embed Gravity programming language into your code
- throwaway_pdp09 6y ago@author: Why, given there are tons of good scripting langs already here? (to other who didn't know what data-driven programming meant https://en.wikipedia.org/wiki/Data-driven_programming https://en.wikipedia.org/wiki/Data-driven_programming "In computer programming, data-driven programming is a programming paradigm in which the program statements describe the data to be matched and the processing required [...] Standard examples of data-driven languages are the text-processing languages sed and AWK")
- tyingq 6y agoThere's an overview page that does a pretty good job of explaining why. https://marcobambini.github.io/gravity/#/README https://marcobambini.github.io/gravity/#/README
- throwaway_pdp09 6y agoI read it, it says what it is and what it has but doesn't compare itself there to other langs.
- tyingq 6y agoEmbeddable in C and able to work on iOS and Android would cut the list of comparisons down quite a bit. TCL would be somewhat comparable, various embeddable JS interpreters, lua, etc. "The compiler and virtual machine combined, add less than 200KB to the executable on a 64 bit system." would make lua perhaps the most obvious alternative. Perhaps they really wanted traditional class based OO. One of the tutorials for Creo is a good example of what they wanted it for: https://docs.creolabs.com/tutorials/game_tutorial_part1.html https://docs.creolabs.com/tutorials/game_tutorial_part1.html
- jdmoreira 6y agoI'm interested in what it offers compared to Wren. I'm really curious and hopefully the author will see this.
- creolabs 6y agoHi all, the author here. I wanted to create a programming language with the following properties: - Class-based - A JS/Swift/Kotlin like syntax - Bytecode generation - A clear distinction between front-end and back-end so at runtime, we need only the VM related code to execute the bytecode - Lightweight and easy embeddable - Extensible/customizable via bridge API(s) exposed via delegation (no need to hack/modify the code)
- jdmoreira 6y agoI'm in a situation where I need to embed a scripting language in a Swift codebase and had decided for Wren very recently since some form of coroutines are a necessity for me. I understand Gravity also has Fibers. Would you recommend me to investigate Gravity further? It's a bit unclear what I would get from Gravity that I don't have in Wren. Maybe a slight different syntax?
- creatornator 6y agoEvery now and then Gravity shows up on hn and it always makes me smile--a couple years ago I added some built-in array methods as one of my first forays into compilers and I had a lot of fun with it. Probably my first "real" OSS contribution.