These are chat archives for opal/opal

19th
Apr 2017
Guyren Howe
@gisborne
Apr 19 2017 23:24
Hi, I'm wondering if it's practical to use Opal to write Postgres stored procedures under PLV8? So Postgres has a (fairly bare-bones) V8 environment, but with no libraries or any such. Is it practical to get simple, even minimal Ruby compiling to run in that environment?
Elia Schito
@elia
Apr 19 2017 23:25
@gisborne was replying to your mail just right now :smile:
Guyren Howe
@gisborne
Apr 19 2017 23:25
Give me good news… :-)
Elia Schito
@elia
Apr 19 2017 23:25
@gisborne the easiest thing you could try is: opal -ropal -ropal-parser -cAL > /tmp/opal.js and then load the result into PG and see if anything brakes
Guyren Howe
@gisborne
Apr 19 2017 23:27
Right in the middle of deploying some code, but I'll try it tonight. What all are you thinking with the above?
Elia Schito
@elia
Apr 19 2017 23:28
@gisborne please let me know how it goes and how you load a js file into PG
Anyway once /tmp/opal.js is loaded you should be able to call Opal.compile("puts 'hello pg!'")