These are chat archives for opal/opal

18th
Mar 2016
Elia Schito
@elia
Mar 18 2016 11:54
@cj yes, have you find problems with it?
CJ Lazell
@cj
Mar 18 2016 18:00
@elia seems a strange thing to remove
what was the reasoning behind removing it?
CJ Lazell
@cj
Mar 18 2016 22:38
yee, it's thworing an error
Elia Schito
@elia
Mar 18 2016 22:38
soo, what's the error?
CJ Lazell
@cj
Mar 18 2016 22:39
I mentioned it above :)
(($a = [typeof(process) === 'object' ? function(s){process.stdout.write(s)} : function(s){console.log(s)}]), $b = $scope.get('STDOUT'), $b['$write_proc='].apply($b, $a), $a[$a.length-1]); on that line
Uncaught TypeError: Cannot read property 'write' of undefined
is there a code paste for 0.9.2?
Elia Schito
@elia
Mar 18 2016 22:41
where are you running this code? which browser/platform?
should probably be fixed by adding require "opal/platform" (https://github.com/opal/opal/blob/v0.9.2/stdlib/opal/platform.rb)
CJ Lazell
@cj
Mar 18 2016 22:42
chrome Version 49.0.2623.87 m / windows
Elia Schito
@elia
Mar 18 2016 22:44
by the looks of it, it seems that it's detecting the presence of process thus assuming it's on nodejs and trying to use process.stdout.write
CJ Lazell
@cj
Mar 18 2016 22:44
so right now, not sure what I changed, but I don't get the error. it just doesn't output the response in the browser console
ah that makes sense, probably something to do with using webpack and opalrb-loader
I'll have to make a screencast for you guys to show you what I've done. it's a really nice work flow with opal. makes your code work client/server side with hot reloading (no browser refreshes) just by doing include Opal::Connect
https://github.com/cj/opal-connect is the code. still working on it. need to add tests/documentation
has a plugin architecture similar to roda
Elia Schito
@elia
Mar 18 2016 22:52
:+1: