These are chat archives for opal/opal

Aug 2015
David Boardman
Aug 08 2015 10:06
Hi I'm trying to do some date arithmetic e.g. + 1 but getting lhs.$+ is not a function in 0.9.0-dev. I've seen a lot of changes going on in 0.9.0-dev for dates and time so should was wondering if that's something that is coming?
Vais Salikhov
Aug 08 2015 11:19

@djboardman hmm, it looks like calling without arguments is broken (it does not default to today as Ruby does). Here's what I'm getting:

$ bundle exec opal -ve "require 'date'; p"


$ bundle exec opal -ve "require 'date'; d =, 1, 1); p d; p d + 1"

So, call it with args or use

$ bundle exec opal -ve "require 'date'; d =; p d; p d + 1"

I'll see if I can fix this today though, thanks for bringing it up!

Vais Salikhov
Aug 08 2015 11:26
Actually, I just learned is supposed to default to -4712-01-01 :wink2:
Benny Bach
Aug 08 2015 11:36
If anyone is interested, I just got the the vienna specs running with opal-browser. The repository can be found here it is on a branch called opal-browser. I have only made a very basic application, so there might be some issues that haven't surfaced yet.
Elia Schito
Aug 08 2015 11:59
@vais 😳 TMYK
@bebac cool stuff!