These are chat archives for opal/opal

24th
Jul 2015
Rick Carlino
@RickCarlino
Jul 24 2015 00:41
@elia Any idea why this would break?
    def initialize(dom_element)
      @callback = -> { |a, b| fullfil_or_reject(a, b) }
      @promise = Promise.new
    end
works with lambda {| . . . .
is that a legit bug? Should I report?
Forrest Chang
@fkchang
Jul 24 2015 01:20
@elia dunno how I can stop it in the debugger, b is referenced in the actual js file
Jamie Gaskins
@jgaskins
Jul 24 2015 02:33
@fkchang Try window.eval instead of just eval. Seems to work for me.
Might just be a namespace issue.
Elia Schito
@elia
Jul 24 2015 07:45
@RickCarlino the arrow syntax has the arguments outside of the curly braces: -> a, b {…}
or also -> (a,b) {…}
Elia Schito
@elia
Jul 24 2015 07:54
@fkchang @jgaskins also creating a script tag may help
Rick Carlino
@RickCarlino
Jul 24 2015 12:31
@elia D'oh! That's right. I was definitely working too late last night.
Torsten Rüger
@rubydesign
Jul 24 2015 13:43
When i get erros, eg mistyping a variable name, i get
Uncaught NoMethodError: undefined method `i' for #<Interpreter:0x39c> kernel.self.js:1144
This is with source_map = true
What i am missing is the source line in Interpreter
Elia Schito
@elia
Jul 24 2015 13:45
it's probably back down in the stacktrace
unless you mark kernel.js as blackbox (Chrome only), that way it should skip backtrace lines in it
Torsten Rüger
@rubydesign
Jul 24 2015 13:47
Interpreter is nowhere in the stack, some Opal, some anonymous, but none of my code
If i turn debug=true, the error is on min.’s:3607 , strange
main.jj
js
Elia Schito
@elia
Jul 24 2015 13:48
try posting the full backtrace, maybe there's some hint in it
Torsten Rüger
@rubydesign
Jul 24 2015 13:49
with or without debug on?
Elia Schito
@elia
Jul 24 2015 13:49
with it on should be better
Torsten Rüger
@rubydesign
Jul 24 2015 13:51
or, maybe sprockets thing, cleared out the tmp/ and now it is there in the bottom . Thanks
might have been looking left too much too, when files are on the right.
VERY cool btw that it pulls the ruby source in there.
Elia Schito
@elia
Jul 24 2015 13:54
:+1:
Torsten Rüger
@rubydesign
Jul 24 2015 13:55
btw, is there a good way to switch between app and chrome inspector. i mean is there a key binding?
Elia Schito
@elia
Jul 24 2015 13:56
what you mean by app?
Torsten Rüger
@rubydesign
Jul 24 2015 13:57
the chrome tab i am running my application in (that’s an application, right? not a web page)
Elia Schito
@elia
Jul 24 2015 13:58
yeah, :D
I think on osx the key combo is ⌥⌘I
Torsten Rüger
@rubydesign
Jul 24 2015 14:08
Thanks.
In opal, isn’t “string”.is_a? Symbol == true
Elia Schito
@elia
Jul 24 2015 14:08
yes it should
watch out for parentheses tho
"".is_a?(Symbol) == true
Torsten Rüger
@rubydesign
Jul 24 2015 14:12
still checking
my bug, < instead of <=
Forrest Chang
@fkchang
Jul 24 2015 17:29
@jgaskins window.eval did the trick, thanks!
Ryan Stout
@ryanstout
Jul 24 2015 18:50
if someone has time, it would be great to get tryopal updated to 0.8
thanks
(I use it all of the time)
Ryan Stout
@ryanstout
Jul 24 2015 20:37
@elia you around by chance?
Elia Schito
@elia
Jul 24 2015 23:26
@ryanstout sup?
Ryan Stout
@ryanstout
Jul 24 2015 23:27
@elia nevermind, was going to ask about the opal-rspec stuff. Thanks
Elia Schito
@elia
Jul 24 2015 23:27
k np
Ryan Stout
@ryanstout
Jul 24 2015 23:27
btw, my performance issues were sprockets related
its funny it was actually slower serving cached compiled opal than it was to recompile it. (not sure how thats possible, but it is, hehe)