These are chat archives for opal/opal

21st
Apr 2017
Guyren Howe
@gisborne
Apr 21 2017 00:37
I also considered trying to glom together a function that returned the compiled text, as the Postgres function-defining mechanism ultimately takes the text of the function as a string.
Guyren Howe
@gisborne
Apr 21 2017 01:58
That failed also. 🙃
Elia Schito
@elia
Apr 21 2017 08:14
@gisborne compiling once and storing the resulting js looks like a better approach as the compilation is very costly
Guyren Howe
@gisborne
Apr 21 2017 13:36
Certainly.
Mitch VanDuyn
@catmando
Apr 21 2017 20:20
@gisborne not sure if this is relevant to your project but the ruby-hyperloop project compiles ahead in three places: The hyperloop-config gem precompiles all opal gems, and the hyperloop-js (standalone hyperloop in the browser) precompiles and minimizes all the the hyperloop gems into a single js file. The hyper-console gem also precompiles the console code into a single JS file. So if we can help let us know over at https://gitter.im/ruby-hyperloop/chat site or private IM me...
Guyren Howe
@gisborne
Apr 21 2017 21:46
Thanks for that. I don't see a hyperloop-config gem, but I'm about to try the minimized compiler.
Guyren Howe
@gisborne
Apr 21 2017 22:22
Yeah, that still doesn't quite work. I tried to change it from global.Opal to plv8.global and was able to get it to define a function. At the end of the function I put plv8.Opal.compile(src), but it complains that Opal has no such method.