These are chat archives for opal/opal

16th
Jul 2015
Elia Schito
@elia
Jul 16 2015 15:13
@vais @meh @adambeynon might be a good time to release 0.8 wdyt?
meh.
@meh
Jul 16 2015 15:13
fine by me
Vais Salikhov
@vais
Jul 16 2015 15:42
I think it's time for 0.9 already :) so, yes.
Elia Schito
@elia
Jul 16 2015 15:43
2/3 is enough, releasing!
Vais Salikhov
@vais
Jul 16 2015 15:44
:tada: :sparkles:
Gabriel Rios
@gabrielrios
Jul 16 2015 16:10
:shipit:

@/all finally v0.8 is out! 😄

Let's celebrate, update out apps and get ready for 0.9!

George Plymale II
@ylluminarious
Jul 16 2015 16:13
:D
CJ Lazell
@cj
Jul 16 2015 16:14
w00t! :D
Torsten Rüger
@rubydesign
Jul 16 2015 16:15
well done !
ylluminate
@ylluminate
Jul 16 2015 16:49
and almost to the 5,000th commit!
Ryan Stout
@ryanstout
Jul 16 2015 16:54
congrats!
ylluminate
@ylluminate
Jul 16 2015 17:28
anything we can help out with to get .8 to volt? i know you'd mentioned you had been working on it @ryanstout
Ryan Stout
@ryanstout
Jul 16 2015 17:29
@ylluminate (fyi, this is the opal room). I'm really close, if things go well, I might have it out today.
ylluminate
@ylluminate
Jul 16 2015 17:30
:clap:
Andrew Kalek
@anlek
Jul 16 2015 17:56
Hello everyone, Just wondering if Opal is production ready? I haven't done much research into it yet but figured I could ask here.
Mitch VanDuyn
@catmando
Jul 16 2015 18:05
@anlek, I have a small team and we redoing our website front end in Opal, its going very well. We have had basically no problems.
Andrew Kalek
@anlek
Jul 16 2015 18:05
Interesting. I find that Opal website doesn't do a good job showing the rendered JS (like let's say CoffeeScript website) which makes me a bit uncomfortable.
Mitch VanDuyn
@catmando
Jul 16 2015 18:08
@anlek coffeescript was designed as more a syntax sugar on top of javascript, so that there is pretty much a 1:1 mapping between the two. Opal is true compiler that generates efficient javascript code, so while the code is readable if you really want to do that, you basically don't have to.
@anlek but if you want to see what opal is doing try this: http://opalrb.org/try/
Andrew Kalek
@anlek
Jul 16 2015 18:09
Wow, that's a good point that I didn't know about.
Mitch VanDuyn
@catmando
Jul 16 2015 18:09
What kind of project were you thinking of using opal for?
Andrew Kalek
@anlek
Jul 16 2015 18:10
No project in mind yet, I just read about Opal (and heard a podcast a few weeks back) and thought I'd look into it.
Any idea how Opal works with things like Ember.js?
Mitch VanDuyn
@catmando
Jul 16 2015 18:11
@anlek - you could make it work I think easily enough. However...
Andrew Kalek
@anlek
Jul 16 2015 18:11
oh boy, here it comes... ;)
Mitch VanDuyn
@catmando
Jul 16 2015 18:12
we started using ember and got quite a few of our pages in ember, but it found the learning curve too steep.
Andrew Kalek
@anlek
Jul 16 2015 18:12
For Ember itself or using Ember with Opal?
Mitch VanDuyn
@catmando
Jul 16 2015 18:13
For ember itself...
Gabriel Rios
@gabrielrios
Jul 16 2015 18:13
@anlek would probably require a wrapper, there’s one for React.js (https://github.com/zetachang/react.rb), but there’s some Opal Frameworks too
Andrew Kalek
@anlek
Jul 16 2015 18:13
Oh, ok. I can deal with that.
Mitch VanDuyn
@catmando
Jul 16 2015 18:13
what we are doing in my shop is using Facebooks React + a set of gems that let you do everything in ruby.
George Plymale II
@ylluminarious
Jul 16 2015 18:13
@anlek there are a number of frameworks and libraries for opal, e.g., voltrb, vienna
Mitch VanDuyn
@catmando
Jul 16 2015 18:14
@anlek at this point with about 3 months experience I have become an absolute opal-react fanatic.
But there is no technical reason why you can't put a wrapper on Ember. If you do want to chat about react + opal head over to the zetachang/react.rb gitter room for specific discussion there.
Andrew Kalek
@anlek
Jul 16 2015 18:17
@catmando Thanks, I'll look into it when the time comes ;)
@ylluminarious Thanks, I have seen Vienna somewhere on the Opal site but didn't look into it. I'll check those out.
Mitch VanDuyn
@catmando
Jul 16 2015 18:17
@anlek - have fun!
Andrew Kalek
@anlek
Jul 16 2015 18:18
It's also nice to know there is a channel with so many nice people willing to help if I have any problems ;)
George Plymale II
@ylluminarious
Jul 16 2015 18:20
@anlek no problem
Andrew Kalek
@anlek
Jul 16 2015 18:33
Has anyone used Volt?
George Plymale II
@ylluminarious
Jul 16 2015 18:34
@anlek fyi, there's a volt room for discussion: https://gitter.im/voltrb/volt
Andrew Kalek
@anlek
Jul 16 2015 18:35
Wow, awesome, thanks!
Forrest Chang
@fkchang
Jul 16 2015 18:48
@anlek there are 2 other places to mess around with opal in the browser http://fkchang.github.io/opal-irb/index-embeddable.html#code:alert%20%22Hi%20anlek!%22
Andrew Kalek
@anlek
Jul 16 2015 18:49
@fkchang first link doesn't seem to do anything for me (I see H1 and H2 content but can't click show lrb)
Forrest Chang
@fkchang
Jul 16 2015 18:49
u can see the compiled code in both, though more easily in the playground
Andrew Kalek
@anlek
Jul 16 2015 18:50
Second link looks great!
Forrest Chang
@fkchang
Jul 16 2015 18:50
For opal frameworks, I would also look at clearwater and lissio
@anlek do you have an error in the javascript console for the 1st link?
Forrest Chang
@fkchang
Jul 16 2015 18:54
change your url to not have https in the header, are you using "always https" or similar plugin?
Andrew Kalek
@anlek
Jul 16 2015 18:54
Yeah, I think I do
Forrest Chang
@fkchang
Jul 16 2015 18:54
I'll fix it to not specifically http the dependency js at some point and it'll still work on https, but not certain when I'll get to it
@anlek when it works it would come up like this
Andrew Kalek
@anlek
Jul 16 2015 18:55
@fkchang I turned of the https force, and now I can see it. very nice.
Forrest Chang
@fkchang
Jul 16 2015 18:56
Screenshot_7_16_15__11_55_AM.png
Andrew Kalek
@anlek
Jul 16 2015 18:56
:)
Forrest Chang
@fkchang
Jul 16 2015 18:56
@anlek sign up for the opalist.co newsletter too
and more discussion at metaruby.com
Andrew Kalek
@anlek
Jul 16 2015 18:57
@fkchang Thanks, I'll look into it :)
Mitch VanDuyn
@catmando
Jul 16 2015 19:00
@fkchang - i've been meaning to ask you this: Why can't I type CRs into IRB?

Like if I type

class Foo
  puts "I'm a class"
end

I get

SyntaxError: An error occurred while compiling: (file)

unexpected 'false'
Source: (file):1:9
class Foo

Forrest Chang
@fkchang
Jul 16 2015 19:21
@catmando hit ctrl-M and use the multi line editor
u should watch some of the online demos, it seems most ppl have no idea of 90% of the features there
and if you want the link to anything in your history, navigate to it, and hit ctrl-L (l for link), and it gives you the link for that
I do some things different than irb, but actually give more capability, and make it easier once u realize how it can work. Like irb, you can go up and down command history and edit anything, but multi line edit in irb sucks, so, you just hit ctrl-M (m for multiline) and get a syntax highlighted editor (that I'm adding code completion to). Edit, reformat to your hearts content, then evaluate
Forrest Chang
@fkchang
Jul 16 2015 19:28
I started to go down the road of if what you type on one line doesn't parse, to keep it open. I implemented some of that but it's not as robust as irb, but then I realized multi line editing in irb sucks, esp. if you made a mistake, it'd be easier and more productive to invoke an editor on your statement than to spend a lot of work making the "don't blow up if the statement goes past 1 line" way
Mitch VanDuyn
@catmando
Jul 16 2015 19:35
yeah that's much better... I agree, I would rather have the multi line edit option anyway. BTW anyway to steal this nice gitter interface with their multiline / single line capability? That would be so sweet.
@fkchange... its very cool... I really want to get react.rb integrated so you can sit there and build a ui on the fly!
Forrest Chang
@fkchang
Jul 16 2015 19:38
@catmando that's an interesting idea, since I'm using jconsole for the terminal emulation, I suspect that would be more work that I'd hope, esp. the way gitter does inline change of the content. I imagine I need to make it more clear you can do multiline edit, aside from putting it in the help
@catmando yeah, I need to carve out some time to checkout react.rb one of these days, it wouldn't be too hard to make a react.rb based editor
I had planned to make one for lissio for a while now
Mitch VanDuyn
@catmando
Jul 16 2015 19:39
@fkchang... yeah I wouldn't want to work on it unless I could just steal it. (the gitter text editor)
@fkchang - I am imagining you could have some kind of TDD playground where you built each component and a set of test scripts with it at the same time.
Mitch VanDuyn
@catmando
Jul 16 2015 19:50
General Question is it there any way to in opal with sprockets to conditionally compile stuff? If not how hard would it be to add? For example if you type if PRODUCTION ...end and PRODUCTION were false, the code would not even get generated?
Forrest Chang
@fkchang
Jul 16 2015 19:50
@catmando Compose mode just makes it multi line, codemirror gives me so much more capability (including the qualified autocomplete I working on)
Mitch VanDuyn
@catmando
Jul 16 2015 19:51
@fkchang is codemirror in there? or something you are working
Forrest Chang
@fkchang
Jul 16 2015 19:51
@catmando opal-inspector would do that and much more, but hindered w/o the ability to look up code by name, I've been thinking of some workarounds so I can get started and show some really neat things to get some momentum behind it
@catmando I'm using codemirror as the editor
Mitch VanDuyn
@catmando
Jul 16 2015 19:53
gotcha... lookup code by name meaning getting the source code back?
Forrest Chang
@fkchang
Jul 16 2015 19:53
here's my pre qualified code complete (qualified meaning I tell you what it is)
Screenshot_7_16_15__12_53_PM.png
Mitch VanDuyn
@catmando
Jul 16 2015 19:54
sweet
Forrest Chang
@fkchang
Jul 16 2015 19:55
@catmando yes, it's on @adambeynon 's list of todo's, but it's critical to simulation of smalltalk's object browser way of editing code that I demoed a prototype of a few years back
Mitch VanDuyn
@catmando
Jul 16 2015 19:56
@fkchang I assume its not a technical issue, just time right? Its just a matter of the parser keep track of stuff and storing it away right? I can see why its not done, just thinking what it will take to get it done :-)
Forrest Chang
@fkchang
Jul 16 2015 19:57
@catmando yeah, it' s a matter of storing it. Also to figure out some sort of api that could serve it up from both the server or in the client
it's like 70% similar to what's done for source maps
Mitch VanDuyn
@catmando
Jul 16 2015 19:58
@fkchang, why not just store it in the javascript on the client (switchable for production mode of course)
@fkchang can you do this in mrb today?
Forrest Chang
@fkchang
Jul 16 2015 19:59
@catmando that might be a first step, I have some grandiose plans about being able to start an app, develop it in the browser, and when the code is what I want, sending it back to the server, so there are some subtleties to work out. That being said, I have some lower hanging fruit
@catmando irb doesn't do it but pry does it, and I planned on basically using the same interface they do, i.e. edit Class#method
from opal-irb. I'd also make the class browser ala smalltalk
Mitch VanDuyn
@catmando
Jul 16 2015 20:01
@fkchang I am with you all the way on that. The only thing I would consider is what is the purpose of "sending it back to the server". I am thinking you want to send it to a git repo.
Forrest Chang
@fkchang
Jul 16 2015 20:01
sometimes the cmd line is where u want it, sometimes the gui, I'll do both
@catmando sending it back to the server is a dev thing. Take this case, I develop in safari, get it working, then I send the stuff back to the server so I can test in FF or mobile
I sort of envision some sort of PR's so I can figure which changes I want to actually commit to the repo.
That said, the low hanging fruit is to just push it back to the server, and I can use git itself to decide whether or not to commit
that might be the better way to do it, but I need to be able to pull up code by name and know where to put it back, etc.
Mitch VanDuyn
@catmando
Jul 16 2015 20:06
@fkchang well not very smalltalk'ish but if you basically were always editing a "file" then wouldn't it all work?
@fkchang there is some advantage in the redundancy of having the file directory structure layed on top of the code structure (at least I find it so.)
Forrest Chang
@fkchang
Jul 16 2015 20:08
@catmando I was going to try something like that as one of my workaround steps\
there is no way of getting around file structure, because that's how it is stored
on the server
and I don't plan on making images like small talk
opal-playground has been getting me to find smaller chunks of some of my ideas to implement, but I appreciate hearing your ideas. Small features can work me towards my loftier goals
Mitch VanDuyn
@catmando
Jul 16 2015 20:10
@fkchang, well actually I think with not too much work we could be using it in anger.
@fkchang - on a different subject...
if you have a few minutes...
Forrest Chang
@fkchang
Jul 16 2015 20:11
@catmando that'd be cool, having actual users outside of myself and my team could really help w/shaping it. Though I'd hope it's not in anger
Mitch VanDuyn
@catmando
Jul 16 2015 20:11
old guys expression perhaps (as opposed to playing)
Forrest Chang
@fkchang
Jul 16 2015 20:13
what's your other subject
Mitch VanDuyn
@catmando
Jul 16 2015 20:16
@fkchang - I got very stuck a few months back with react.rb getting the testing working. The problem was I had ruby code running in 3 places (server, server opal on v8, and opal on client). I was just beating my head on the wall getting any kind of tests to work. I am wondering if with your experience we could chat for an hour next week sometime, look at some code, and get a few basic tests going. I am really suffering not having any way to automate testing of all this code I am writing!
@fkchang - if you don't have time or its not up your alley I understand of course
Forrest Chang
@fkchang
Jul 16 2015 20:28
@catmando I'm up for it, hopefully I'll have something useful to share on that
we were going to do some sort of what u r doing and react.rb walkthrough too
Mitch VanDuyn
@catmando
Jul 16 2015 20:30
@fkchange okay that's good too. Does a week from today at 1:00 PM work?
we can do it on gitter on the react.rb room, I'll set up some thing to share code etc.
Forrest Chang
@fkchang
Jul 16 2015 20:33
@catmando thurs is generally my busiest day
Mitch VanDuyn
@catmando
Jul 16 2015 20:34
@fkchang, np wednesday is also good for me, but really anytime works, and I can rearrange things.
Forrest Chang
@fkchang
Jul 16 2015 20:43
@catmando how's fridays, my schedule often clears up 1pm PT on fridays
Mitch VanDuyn
@catmando
Jul 16 2015 20:45
@fkchang, I am good at 1:00 PM PT next friday - actually would work very well for me.
Forrest Chang
@fkchang
Jul 16 2015 20:48
@catmando ok, let's shoot for that