These are chat archives for opal/opal

11th
Jan 2016
Elia Schito
@elia
Jan 11 2016 00:12
@saltvedt you can try turning on arity checks with Opal::Config.arity_check_enabled = true to get errors whenever a method is called with the wrong number of arguments
The error you got is probably coming from a Hash object trying to access the #hash(http://www.rubydoc.info/stdlib/core/Object%3Ahash) method on one of its keys, which happen to be a JS undefined
Alexandr Smirnov
@JelF
Jan 11 2016 14:56
@elia @meh what about code climate coverage integration?
i can make all preparations except codeclimate api key
Elia Schito
@elia
Jan 11 2016 14:58
It's already there
oh, wait, not coverage
just code climate, @JelF what's wrong with coveralls?
Alexandr Smirnov
@JelF
Jan 11 2016 14:59
no badge?
Elia Schito
@elia
Jan 11 2016 15:00
@JelF it's there, just at the right of code climate
it says 87%
Alexandr Smirnov
@JelF
Jan 11 2016 15:01
sorry, missed that
Elia Schito
@elia
Jan 11 2016 15:01
no prob :)
Alexandr Smirnov
@JelF
Jan 11 2016 15:01
checked fork instead origin
can i binstub rake and rspec?
is there local rake task to show coverage?
Alexandr Smirnov
@JelF
Jan 11 2016 15:12
$ rbenv global                      
2.2.3
$ bundle exec rake mspec_opal_nodejs
mkdir -p tmp
Adding   1 files (opal filters)
Adding 217 files (spec/opal)
ruby -rbundler/setup -r/home/jelf/docs/ruby/opal/tasks/testing/mspec_special_calls bin/opal -gmspec -Ispec -Ilib -smspec/helpers/tmp -smspec/helpers/environment -smspec/guards/block_device -smspec/guards/endian -sa_file -Rnodejs -Dwarning -A tmp/mspec_nodejs.rb
.....................................................................................................................................................................................................................................E................................................................................................................................................................................................................................................................................................Object freezing is not supported by Opal
.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................

1)
The rescue keyword Fix using more than two "rescue" in sequence #1269 ERROR
NoMethodError: undefined method `<<' for nil
<<: undefined method `<<' for nil
    at null.$new (/tmp/opal-nodejs-runner-20160111-12811-1pmyz7y:4680:15)
    at NilClass_alloc.Opal.defn.TMP_1 (/tmp/opal-nodejs-runner-20160111-12811-1pmyz7y:3191:54)
    at NilClass_alloc.method_missing_stub [as $<<] (/tmp/opal-nodejs-runner-20160111-12811-1pmyz7y:970:35)
    at Object_alloc.$a.$$p.TMP_9 (/tmp/opal-nodejs-runner-20160111-12811-1pmyz7y:51395:37)
    at Object_alloc.Opal.defn.TMP_2 [as $instance_eval] (/tmp/opal-nodejs-runner-20160111-12811-1pmyz7y:3076:24)
    at module_constructor.Opal.defs.TMP_5 [as $protect] (/tmp/opal-nodejs-runner-20160111-12811-1pmyz7y:33951:78)
    at $a.$$p.TMP_19 (/tmp/opal-nodejs-runner-20160111-12811-1pmyz7y:33570:88)
    at Opal.yieldX (/tmp/opal-nodejs-runner-20160111-12811-1pmyz7y:1122:18)
    at $a.$$p.TMP_2 (/tmp/opal-nodejs-runner-20160111-12811-1pmyz7y:7922:25)
    at Opal.yield1 (/tmp/opal-nodejs-runner-20160111-12811-1pmyz7y:1102:14)

Finished in 3.158000 seconds

0 files, 1067 examples, 2189 expectations, 0 failures, 1 error, 88 tagged
rake aborted!
Command failed with status (1): [ruby -rbundler/setup -r/home/jelf/docs/rub...]
/home/jelf/docs/ruby/opal/tasks/testing.rake:155:in `block (3 levels) in <top (required)>'
Tasks: TOP => mspec_opal_nodejs
(See full trace by running task with --trace)
at master
Elia Schito
@elia
Jan 11 2016 15:22
you sure you pulled in latest changes?
Alexandr Smirnov
@JelF
Jan 11 2016 15:30
git pull head-origin master
From https://github.com/opal/opal
 * branch            master     -> FETCH_HEAD
Already up-to-date.
Elia Schito
@elia
Jan 11 2016 15:36
strange, git log -1 --oneline?
Alexandr Smirnov
@JelF
Jan 11 2016 15:39
633a409 Update the changelog with 0.9.1 [skip ci]
Elia Schito
@elia
Jan 11 2016 15:45
works here, try also with git submodule update and/or bundle update
Alexandr Smirnov
@JelF
Jan 11 2016 15:47
no effect
no idea what's wrong
Alexandr Smirnov
@JelF
Jan 11 2016 15:53
where did you get spoon? Is it java dependency?
Elia Schito
@elia
Jan 11 2016 15:54
I think it adds up when you bundle with jruby
Alexandr Smirnov
@JelF
Jan 11 2016 15:54
$ node -v                           
v0.12.6
Elia Schito
@elia
Jan 11 2016 15:56
v4.1.1
Alexandr Smirnov
@JelF
Jan 11 2016 15:56
lol
Elia Schito
@elia
Jan 11 2016 15:56
eheehhe
Alexandr Smirnov
@JelF
Jan 11 2016 16:01
0.12.6 is the latest stable node release according to gentoo developers
idk should it also be supported
building exact 4.1.1
Elia Schito
@elia
Jan 11 2016 16:03
eheheh, I don't know either, I mean, would be interesting to understand what could have possibly changed that breaks the suite
Alexandr Smirnov
@JelF
Jan 11 2016 16:14
problem persists @nodejs-4.1.1
Elia Schito
@elia
Jan 11 2016 16:15
I'd re-clone in a different dir and investigate on what's different
assuming the second clone passes the spec suite
Alexandr Smirnov
@JelF
Jan 11 2016 16:16
afk 8 hours
Martin Becker
@Thermatix
Jan 11 2016 16:36
umm I'm having a little trouble getting sprockets to find a file?
I have the following tag in the header:<script type="text/javascript" src="main_application.js"></script>
and If I iterate through all the files sprockets can find
I can see main_application.rb in the list
but it reports a 404, that it can't find main_application.js
Elia Schito
@elia
Jan 11 2016 16:43
how are you serving sprockets? Opal::Server? rails?
@Thermatix ^
Martin Becker
@Thermatix
Jan 11 2016 16:44
Sinatra
I'm creating a sprockets instance
in set :assets
Elia Schito
@elia
Jan 11 2016 16:45
then maybe it serves stuff under /assets/*
Martin Becker
@Thermatix
Jan 11 2016 16:45
then appending all opal paths t oit
Elia Schito
@elia
Jan 11 2016 16:45
src="/assets/main_applicaiton.js"
Martin Becker
@Thermatix
Jan 11 2016 16:45
to it*
AH
that did somthing, it broke but that's because of somthing else
thanks
didn't occur to me it might be doing that
Martin Becker
@Thermatix
Jan 11 2016 16:55
wooo working!
Drew Hamlett
@drewhamlett
Jan 11 2016 18:08
Man this guy is really pissed off about Node. I'm glad we have tools like Opal. https://medium.com/@wob/the-sad-state-of-web-development-1603a861d29f#.1k67qu72s
Brady Wied
@wied03
Jan 11 2016 18:18
Makes some good points but that guy is angry! I'm fairly sure his message won't be received by anyone with an investment/emotional attachment to JS
Torstein Saltvedt
@saltvedt
Jan 11 2016 19:03
Elia, I think you're right, I fixed the bug
Biggest issue now is performance
according to the profiler most of the time is spent in Opal.hash_get
is Hash very, very slow compared to a two dimensional array?
the game of life is updating at like 0.5 frames per second
Elia Schito
@elia
Jan 11 2016 19:42
@saltvedt great to hear! (that's fixed, I mean)
about the performace seems a good opportunity to see if we can improve that
@saltvedt what kind of keys are used? (strings, numbers, …)
Torstein Saltvedt
@saltvedt
Jan 11 2016 19:43
arrays! :/
state[[x, y]]
I also just noticed that the game of life implementation seems buggy as well, but it could be my mistake
three cells in a row does not "oscilliate" as they should
but simply vanish
Elia Schito
@elia
Jan 11 2016 19:47
that's it, current Hash implementation is optimized for String/Symbol keys
gotta go, I'll read later
Torstein Saltvedt
@saltvedt
Jan 11 2016 19:48
makes sense, don't see arrays used as keys very often