Artichoke is a Ruby made with Rust that compiles to WebAssembly
github.com
github.com
- https://twitter.com/artichokeruby/status/1339581223119679493
- https://twitter.com/artichokeruby/status/1339578582222266368
- https://twitter.com/artichokeruby/status/1332772105126105089
- https://twitter.com/artichokeruby/status/1332880679655247872
I can’t wait to try it out!
I saw it’s experimental currently, but are you planning on putting a lot of effort into it over the long haul? (I’m unsure whether I should look into it as a viable base for development.)
Nothing wrong with it, really, and modern times aren't so different.
Already visible in Swift, Haskell, Chapel, ParaSail, D.
Likewise I see Microsoft and Google, will keep their lifetimes efforts going until it offers a good enough experience, even if not perfect, in spite of their ramping up use of Rust.
A good example of this is the Azure Sphere, which inspite of the security marketing story the team tells everywhere with the 7 levels and such, it uses a C based SDK.
The `Symbol` data structure knows how to, e.g. render its `Symbol#inspect` implementation [1]. To extract the underlying bytes associated with the `Symbol`, however, it needs an interpreter. But not a whole interpreter or any particular interpreter, just one that implements `Intern` [2].
All of these generics get monomorphized so there are no vtables or other indirection. Because it's unlikely you'll have more than one interpreter implementation in your program, there is no code bloat either.
[0]: https://github.com/artichoke/artichoke/blob/2d67d8537c1340f1...
[1]: https://artichoke.github.io/artichoke/spinoso_symbol/struct....
[2]: https://artichoke.github.io/artichoke/artichoke_core/intern/...
Is it just that Artichoke is written in Rust? Or does it make different trade-offs in its design?
[0] https://github.com/artichoke/artichoke/blob/2d67d8537c1340f1...
These days I don't use ruby much at all, and I use groovy where I might have used ruby (because static types), but I still love the language and admire this effort. Awesome!
There's a 2019 video about Artichoke: https://www.youtube.com/watch?v=QMni48MBqFw
[0]: https://github.com/artichoke/artichoke/tree/97ba69d31154be45...
[1]: https://github.com/artichoke/artichoke/tree/97ba69d31154be45...
[2]: https://rocket.rs/
MRI took 89ms/iter to scan for a regex pattern over 6.8MB of text, while Artichoke took 48ms/iter [0]
At least for me 100% faster does not mean the same as 100% less time was needed.
[0]: https://github.com/artichoke/www.artichokeruby.org/pull/171
It’s gonna happen one way or another. I just want everyone to be happy and healthy.