These are chat archives for opal/opal

30th
Jun 2015
Forrest Chang
@fkchang
Jun 30 2015 00:04
Pasted_Image_6_29_15__5_03_PM.png
I need some styling help, this is what I've got but I don't think it scales out right
Jared White
@jaredcwhite
Jun 30 2015 04:33
I'm planning on writing an article with example code on how to use design patterns in rolling your own front-end framework with Opal. Anyone have any suggestions for what to focus on? Any pain points? I want to go beyond binding a method to a button click or rendering a list of li tags. That's obvious stuff. :)
ylluminate
@ylluminate
Jun 30 2015 13:48
@fkchang you know, i've always thought a pull request or fork of jsbin would be an incredibly useful approach along with an integration of the repl. it would definitely give opal more exposure to boot if it were integrated into the core.
I'm developing multitab (multiple files) on voces
boxes*
Rick Carlino
@RickCarlino
Jun 30 2015 16:31
Looks like you're loading Opal over insecure HTTP (no 's') and chrome won't let me load the page .
Forrest Chang
@fkchang
Jun 30 2015 16:36
@ylluminate that's a pretty good idea, except that I'd have to deal w/javascript. I'm planning on having stuff that is a fair amount different than what jsbin and clones do, so I'm probably going to pursue that direction, while I'm inspired
@RickCarlino cool on the comments and ur presence on the reddit thread
So should I push my current 'embedded in the iframe, but not too good looking or response opal-irb' that I have displayed in the screen shot?
oh, and any style wizardry assistance would be appreciated
Jikku Jose
@JikkuJose
Jun 30 2015 17:49
Any idea why the css class isn't getting set in the initialize method?: http://tinyurl.com/opal-box-class
If I uncomment the explicit setting of the class it works.
Forrest Chang
@fkchang
Jun 30 2015 19:16
how quick should I push to opal-playground, I like added 3 features, but I'd sort of like some vetting
Rick Carlino
@RickCarlino
Jun 30 2015 19:52
Maybe you could push a 'staging' that we can all QA off of and let you know. Is that what you're worried about? Bugs / compat issues?
Mitch VanDuyn
@catmando
Jun 30 2015 19:52
I was just using it with @JikkuJose problem, and it was very cool

btw @JikkuJose I don't see anything wrong with that code... I suspect its because Element is just a thin wrapper on Jquery and hence does not work. But I'm not sure.

Folks: Is there any known problem with circular requires? I have several classes that end up with a circular dependency.

Forrest Chang
@fkchang
Jun 30 2015 20:21
@RickCarlino something like that. I would like to make some sort of preview version available before I foist it upon the world

On another note, I'm at an interesting place where working on opal-playground reinforces 2 'not particularly known/understood ideas' I want to pitch for opal, namely

  • being able to edit code in the app and not have to re setup state (ala smalltalk images and lisp machines) is a huge advance that most ppl can't appreciate (call it Editor/IDE Blub)
  • Lissio's way (doesn't have to be lissio, but no other framework does it) of combining markup, style and behavior into 1 coherent ruby class is both more productive, and responds to increasing complexity better.

That being said, it's potentially a long rambling blog post I don't know I have time to write while it's fresh in my brain

Mitch VanDuyn
@catmando
Jun 30 2015 20:30

@fkchange - I am coming rapidly to the same conclusion working with opal-react (react.rb)... Current state of react.rb that my team is using is the same idea. behavior and markup are in together in small simple classes (have not really pushed my team to bring the style in, but I think that's next.)

And like wise its pretty obvious you could have a great development environment where you developed these classes in a very interactive environment.

I am imaging typing things like:
edit Component::Navbar
and having that fire up a window with the Navbar code. When you save it fires up a react rerender of the component...

The whole thing could be somehow backed by github, so you have builtin config management too.
Forrest Chang
@fkchang
Jun 30 2015 20:33
@catmando react still does css in the normal (i.e. cascaded over all kinds of css files and not associated direct w/the component, nor in a dsl) way, no? My particular issue was w/css, looking for the right files, changing mental languages, etc. In lissio, I believe a lot of cascading types of practices would be unnecessary due to using css inheritance
Mitch VanDuyn
@catmando
Jun 30 2015 20:34
@fkchang - yes I hate that too, but there are folks in the react.js world who have tools that allow the css to be nicely placed right in the component. I want to look into that for opal-react.
Forrest Chang
@fkchang
Jun 30 2015 20:35
@catmando related, I had planned to make a lissio component editor, which is in 20/20 hindsight is functionally equivalent to opal-playground, but each editor is ruby and it maps down to 1 class, and had thought that I'd want to add opal-react to the playground, except that I haven't played w/it at all
@catmando nice, got some links so I can see what they are doing?
Mitch VanDuyn
@catmando
Jun 30 2015 20:36
However main priority was to get the system up, and get the team productive and they are used to style sheets. Meanwhile we really needed a way to talk to the active-record objects from within react, so that is done now (at least enough to move on.)
Why don't we set up a time, and I can get a staging version of what we have up and running and then do some code walk throughs and show you how it works. How does that sound?
@fkchang - re: the editor. Exactly the idea. works good with react to, as each component = a class, so if you had a class editor then it = a component editor. ANd because react is well reactive, then it should be almost no work to make saving the changes == a render update!
Mitch VanDuyn
@catmando
Jun 30 2015 20:41
@fkchang - yes it would be nice to have some way to pull in various components depending on what people are doing.
Forrest Chang
@fkchang
Jun 30 2015 20:54
@catmando yeah, I'd love to see what you guys were doing, also the css in react component thing too
Mitch VanDuyn
@catmando
Jun 30 2015 20:56
@fkchang - well lets set a time! We can do it gitter tomorrow perhaps. To be clear... we are NOT doing the CSS thing in react (YET) but I am thinking we will just grab it right out lissio. It would work just the same I think.
Forrest Chang
@fkchang
Jun 30 2015 20:59
For a quickie thing, I could pull in opal-react lib and you could do everything thru the ruby window, does opal-react require everything, in lissio, you have to specifically require any components you want to subclass, so to do the lissio experiment, I'd have to do that
Mitch VanDuyn
@catmando
Jun 30 2015 20:59

@fkchang the only thing I might change about how lissio does it is to change this

  css do
    rule '.title' do
      font size: 32.px
    end

    rule '.subtitle' do
      font size:  18.px,
           style: :italic
    end
  end

to just

    rule '.title' do
      font size: 32.px
    end

as the css seems redundant.

Forrest Chang
@fkchang
Jun 30 2015 21:00
@catmando what time zone r u in?
@catmando lissio does that, I believe, to 1) designate the css area 2), in that block is where the css dsl is active. @meh could answer definitively, but my explanation makes sense to me
Mitch VanDuyn
@catmando
Jun 30 2015 21:01
east coast. My only constraint though is my wife is returning from west coast tomorrow sometime so it would be best to do it before that.
Forrest Chang
@fkchang
Jun 30 2015 21:01
@catmando when does ur wife return?
Mitch VanDuyn
@catmando
Jun 30 2015 21:02
@re lissio... understood. In react.rb you include React::Component and then all the generator methods are available within that class.
So thinking about a minimal experiment in opal-react:
basically you need the gem loaded
you need the component class defined
then you need to attach the class to some dom element.
There is a lot of magic being done to make the syntax very noise free, and I would have to think about what happens if you redefine the component. Should work....I will do a smoke test later and see what happens.
Mitch VanDuyn
@catmando
Jun 30 2015 21:15

@fkchang - not sure, but she is coming from Seattle so I am guessing pretty late... let me see if I can get txt her now.

but I think we can assume anytime before 5:00 PM EDT

Keith
@ktec
Jun 30 2015 21:33
hi all, I wonder if someone could take a look at this for me when you have a minute. https://github.com/globalkeith/opal-pixi I'm trying to move the opal-pixi library forwards a get all the examples completed, however I've stumbled on some fairly simple stuff which I dont understand. Firstly when I try to implement an included Module, it seems to break all the inherited instance methods, and also when I upgrade to opal 7+ everything breaks and I dont really know where to start. If anyone can point me in the right direction with these and any other tips in general, I'm excited to take this project forward and complete all the examples on http://pixijs.github.io/examples/index.html many thanks
Forrest Chang
@fkchang
Jun 30 2015 21:37
@catmando that might be tough for me, I think I'm not available before 6pm ET
Mitch VanDuyn
@catmando
Jun 30 2015 21:38
i'll let you know when I know more... good chance i;ll be available late...
@ktec, am swamped right now, but if I get I chance I will have a look...
Elia Schito
@elia
Jun 30 2015 21:40
@ktec can you post any of the errors just to start from something?
Forrest Chang
@fkchang
Jun 30 2015 21:44
@ktec I looked at your repo, but I would need more specifics
Keith
@ktec
Jun 30 2015 21:47
hi guys, so the first problem is the inheritance, I would like to use the benefits of ruby and implement the base.rb class here https://github.com/globalkeith/opal-pixi/blob/master/lib/opal/pixi/base.rb and include it, as an example here: https://github.com/globalkeith/opal-pixi/blob/master/lib/opal/pixi/container.rb however when I include it, it runs the x-string stuff, but the instance methods are no longer available.
Elia Schito
@elia
Jun 30 2015 21:49
@ktec maybe you're overwriting some local vars, eval is dangerous as always :)
Keith
@ktec
Jun 30 2015 21:49
If i can use include PIXI::Base I can get rid of the x-strings in all the classes. Then i can start to implement some metaprogramming stuff like method missing. I couldn't get the x-string to interpolate without doing it like that
Elia Schito
@elia
Jun 30 2015 21:50
also beware that in opal 0.7 _proto and friends are all preceded by $$, e.g. $$proto
Keith
@ktec
Jun 30 2015 21:50
perhaps there's a problem with the way the project is set up, thats really why i was asking if someone could take a look and point me in the right direction
Mitch VanDuyn
@catmando
Jun 30 2015 21:50
@ktec, I am missing where you are doing teh include?
Keith
@ktec
Jun 30 2015 21:51
at the moment the includes are all commented out (all includes are in these classes https://github.com/globalkeith/opal-pixi/tree/master/lib/opal/pixi
i want to use base.rb
i've set up the https://github.com/globalkeith/opal-pixi/tree/master/demo directory to run the example, which uses the gem code in https://github.com/globalkeith/opal-pixi/tree/master/lib
ylluminate
@ylluminate
Jun 30 2015 21:55
hey @ktec, pop on over here: https://gitter.im/orbitalimpact/opal-pixi
Keith
@ktec
Jun 30 2015 21:55
thats where i started