These are chat archives for opal/opal

29th
Jun 2015
Forrest Chang
@fkchang
Jun 29 2015 05:14
fixed opal-playground
Forrest Chang
@fkchang
Jun 29 2015 05:28
@adambeynon any ideas on how to run opal-irb in the context of the iframe in opal-playground?
Forrest Chang
@fkchang
Jun 29 2015 05:57
@adambeynon I think I have something
Ángel M
@Angelmmiguel
Jun 29 2015 13:57
hello all
Rick Carlino
@RickCarlino
Jun 29 2015 13:57
Good morning.
Ángel M
@Angelmmiguel
Jun 29 2015 13:57
I'm start a blog about ruby
and I want to insert a box to execute ruby code (as example) on blog posts
Rick Carlino
@RickCarlino
Jun 29 2015 13:58
Cool idea.
Ángel M
@Angelmmiguel
Jun 29 2015 13:58
so I find your library :)
and create a simple Jquery plugin to add a "Opal Box"
It's for educational purpose
Vais Salikhov
@vais
Jun 29 2015 14:01
Very nice, @Angelmmiguel :+1:
Rick Carlino
@RickCarlino
Jun 29 2015 14:02
@Angelmmiguel I would share it on Reddit. People would like to see this sort of thing.
Vais Salikhov
@vais
Jun 29 2015 14:02
The screenshot looks awesome, but a live demo would be even better :wink:
Rick Carlino
@RickCarlino
Jun 29 2015 14:03
Yeah. People would love to have a link where they can play around.
Ángel M
@Angelmmiguel
Jun 29 2015 14:03
yes! :D
I will create a github page with a simple playground to touch the box haha
thanks for feedback ;)
Vais Salikhov
@vais
Jun 29 2015 14:05
@Angelmmiguel once you do, definitely post to http://reddit.com/r/ruby or I will :smile:
Ángel M
@Angelmmiguel
Jun 29 2015 14:05
ok @vais
I will notify you
thanks!
AstonJ
@AstonJ
Jun 29 2015 14:32

Opal Resources - please add any you can think of here http://metaruby.com/t/opal-resources/201

Ángel M
@Angelmmiguel
Jun 29 2015 14:33
@vais @RickCarlino done ;)
Elia Schito
@elia
Jun 29 2015 14:33
@AstonJ https://duckduckgo.com/?q=site:dev.mikamai.com+opal this should be good stuff for the blog section
Ángel M
@Angelmmiguel
Jun 29 2015 14:33
I will improve the page, but now, it runs haha
AstonJ
@AstonJ
Jun 29 2015 14:36
Thanks @elia! Can you let me know an order for a reading list please? (So starting with the introductory stuff moving up to the more complicated stuff.) I’ll add a link to each post then ;)
Ángel M
@Angelmmiguel
Jun 29 2015 14:37
@AstonJ I reply you on metaruby
thanks!
@Angelmmiguel maybe something more interesting than return 1 for the example code? :wink2:
Ángel M
@Angelmmiguel
Jun 29 2015 14:38
thanks @vais. I love gh-pages hahahahha
that's right...
Vais Salikhov
@vais
Jun 29 2015 14:42
Off topic: http://blog.juxt.pro/posts/why-clojurescript-matters.html really interesting piece in that it applies equally well to Opal (at least the first half of the article, titled "Avoid Splitting"). I feel there's a sea change taking place - just a year ago splitting a product team into back-end and front-end made all the sense in the word to me, and felt like the right way to do it.
Ángel M
@Angelmmiguel
Jun 29 2015 15:58
Updated the example code 😁
Forrest Chang
@fkchang
Jun 29 2015 16:20
@Angelmmiguel pretty cool, you've given me an idea on how to write instructional posts
Ángel M
@Angelmmiguel
Jun 29 2015 16:27
thanks @fkchang. Yes, I will use it to allow readers interact with the code :)
Whoah! Compiled MRuby -> JS using emscripten. Has anyone seen that?
The executable is 2.2 mb, which is gigantic. WOnder how much WebASM will optimize that
meh.
@meh
Jun 29 2015 17:15
RickCarlino, I don't think it will be optimized out much
ylluminate
@ylluminate
Jun 29 2015 20:13
@elia @meh @adambeynon any thoughts on this: opal/opal#965
AstonJ
@AstonJ
Jun 29 2015 23:23

Opal Resources - updated and now a Wiki on MetaRuby http://metaruby.com/t/opal-resources/201 Anyone at trust level one or higher can submit changes.

Forrest Chang
@fkchang
Jun 29 2015 23:23

So I took 2 separate approaches at integrating opal-irb w/opal-playground

  • embedding it in the object
    • pros - easy to make it span the bottom
    • cons - need to extend it to communicate remotely w/the iframe (coz we want to run everything against the iframe's objects, not that of opal-playground)
  • embedding it in the iframe directly
    • pros - it runs against the objects in the iframe
    • can't pull the ui away from the iframe
      Kind of stuck at which way to continue, approach 1 would require rewriting a lot of opal-irb to make it work w/a remote iframe, approach 2 limits the UI strongly. Maybe approach 2 to start, giving the capability now, and then down the road doing approach 1, but that would be reinforced more if I could see another use for this functionality

Thoughts, tips?
Thanks