These are chat archives for opal/opal

19th
Jun 2015
ylluminate
@ylluminate
Jun 19 2015 03:05
"The team notes that the idea here is not to replace JavaScript, by the way, but to allow many more languages to be compiled for the Web. Indeed, chances are that both JavaScript and WebAssembly will be used side-by-side and some parts of the application may use WebAssembly modules (animation, visualization, compression, etc.), while the user interface will still be mostly written in JavaScript, for example."
Christian Käser
@dfyx
Jun 19 2015 15:10
@ylluminate Sounds really promising. In fact I'm reading the design document right now
Todd J Russell
@comexpressao
Jun 19 2015 15:47
Hey guys, I'm attempting to include the timeliness gem with no success. Any suggestions; I don't know how to include it.
meh.
@meh
Jun 19 2015 15:51
comexpressao, any errors?
comexpressao, you should be calling Opal.use_gem 'timeliness' in the server side part
so that it can add the paths
Todd J Russell
@comexpressao
Jun 19 2015 15:53
@meh In application.rb?
meh.
@meh
Jun 19 2015 15:53
comexpressao, what are you using to compile your stuff?
it depends on that
opal-rails, or a rake task, or something else?
Todd J Russell
@comexpressao
Jun 19 2015 15:54
opal-rails
meh.
@meh
Jun 19 2015 15:54
comexpressao, then yes, I think so
I don't use Rails, but as long as it's called before anything is compiled by Opal, then it will work
Elia Schito
@elia
Jun 19 2015 15:55
probably config/initializers/assets.rb is a good place to do that
Vais Salikhov
@vais
Jun 19 2015 16:16
@opal/core I've been thinking for a while now to re-organize spec/filters/unsupported to have the same structure as spec/filters/bugs. I.e. each file is named after the directory name in RubySpec and contains the failing specs for all the files in that directory. It's a bit of a dumping ground right now. It's kinda organized by "topic", which makes it not quite straight-forward if you want to get a clear picture of what exactly is unsupported, or where to put a new failing item. Or to revise things down the road. It's a bit of work, so before I do, I'd like to know if there are any objections.
meh.
@meh
Jun 19 2015 16:31
vais, I'm fine with that, it was just a dumping ground, I think we didn't even have sections at the beginning
Todd J Russell
@comexpressao
Jun 19 2015 16:33
is DateTime implemented? I tried it opalrb/try and its not there???
I'm getting NoMethod error for Date.parse?
Todd J Russell
@comexpressao
Jun 19 2015 16:40
I;m just trying to convert current time to a date!
meh.
@meh
Jun 19 2015 16:46
comexpressao, there's Time
comexpressao, Date.parse is in the stdlib in MRI
IIRC
comexpressao, so just require 'date'
Todd J Russell
@comexpressao
Jun 19 2015 16:51
so what's going on with opalrb.org/try? it has Date but none of the functions
meh.
@meh
Jun 19 2015 16:52
comexpressao, it has the corelib, but not the stdlib available
comexpressao, so you can't require from what I remember
Date is part of the corelib in Ruby
but many methods come from the stdlib
no idea why it was designed like that, but it's how it is
Todd J Russell
@comexpressao
Jun 19 2015 16:56
in the browser console I tried:
Opal.Date.$parse(Opal.Time.$now())
Uncaught TypeError: Cannot read property '1' of null
oh well :-(
meh.
@meh
Jun 19 2015 16:57
comexpressao, yeah, that method is in the stdlib, you have to require 'date' to access it
and IIRC the try doesn't support requires
it will work when using Opal normally
Todd J Russell
@comexpressao
Jun 19 2015 16:58
we got it... the above was missing to_s... now works
yeah!
Thanks for all the help and input
meh.
@meh
Jun 19 2015 17:01
np
Michał Kalbarczyk
@fazibear
Jun 19 2015 17:04
is there any estmined date for 0.8 release ?
Jared White
@jaredcwhite
Jun 19 2015 18:08
@ylluminate @dfyx Yeah that WebAssembly stuff sounds fantastic. If some folks have been hesitant to use a compile-to-JS language because of a fear of leaky abstractions or some other perceived issues that compel them to stick with raw JS, this kind of thing could really be the tipping point. It turns the browser into a lower-level runtime that can execute code from a theoretically infinite variety of higher-level languages. What remains to be seen is what kind of language features end up really being supported. We benefit from the fact that most of the cool stuff Ruby does can actually be implemented on top of JS. But what about a language that has some kind of bizarre syntax/state/execution flow/data processing/whatever feature that WebAssembly simply doesn't support? I guess I will need to read up on the details as they come out...
ylluminate
@ylluminate
Jun 19 2015 18:11
well, i guess it depends on how close it comes to an assembly level implementation. everything runs atop a relatively simplistic set of rules when you look at it from a true asm perspective and if they're able to achieve that, then probably sky's the limits
Elia Schito
@elia
Jun 19 2015 19:49
@fazibear it's almost ready but there's some stuff going on now and I don't think a release will happen until it's settled
Forrest Chang
@fkchang
Jun 19 2015 21:58
@catmando I just now remembered why we did the client_and_server softlink the way we did. I wanted an explicit 'client_and_server' in the opal requires to indicate that the code was shared and not client only
Mitch VanDuyn
@catmando
Jun 19 2015 22:11
@fkchang thanks for that info