These are chat archives for opal/opal

5th
Sep 2016
Rudi Kramer
@Rudikza
Sep 05 2016 07:44
Hey Peeps, I was thinking that it would be pretty awesome if we could combine Github’s Electron with Opal allowing people to write Ruby and then have it deployed to Windows, *nix and also OS x platforms easily. My search led me to opal-node but I’m not sure if that was just a troll. Is this worth exploring further?
meh.
@meh
Sep 05 2016 08:15
Rudikza, opal-node was indeed just a joke
Rudi Kramer
@Rudikza
Sep 05 2016 08:16
roflscale tipped me off ;-)
Jonas Tehler
@jegt
Sep 05 2016 08:50
@Rudikza We are running an Opal/Clearwater app on top of Electron. Works very well. But we use some regular JS to set everything up before we load Opal.
Rudi Kramer
@Rudikza
Sep 05 2016 09:11
Thanks @jegt any tips or tricks that you could share?
I was thinking of maybe putting together a template that people could use to easily get going
Jonas Tehler
@jegt
Sep 05 2016 09:16
@Rudikza We are not using opal for the electron-specific stuff. What we do is we use regular js to set up electron and then open a BrowserWindow that open an index.html containing the opal/clearwater app. The opal app can then communicate with the electron/js system using the electron.remote module.
Rudi Kramer
@Rudikza
Sep 05 2016 09:17
ah, that makes sense.
Jonas Tehler
@jegt
Sep 05 2016 09:18
It's important to always keep in mind if you are doing "browser" js or "node" js when working with electron. We use the preload feature to make node stuff available to the browser side when needed.
Jamie Gaskins
@jgaskins
Sep 05 2016 15:15
@jegt Awesome to hear it's still working well for you!
Jonas Tehler
@jegt
Sep 05 2016 16:23
@jgaskins Yes clearwater is working very well for us. We actually ported it all to react just to see how it turned out but reverted back to clearwater. We still have work to do around caching since we have a very data intensive app but overall it's working very well.
Elia Schito
@elia
Sep 05 2016 21:30
@jegt would be great to have the basic stuff in an example electron app, scrapped of the actual opal app, like the dir structure and the helper scripts to help people have a ready env for it – then could be published here: http://opalrb.org/libraries/ :)