These are chat archives for opal/opal

2nd
Nov 2016
Mitch VanDuyn
@catmando
Nov 02 2016 17:05
folks - so cleaning up an opal gem, and this gem requires another opal gem.
but I still have to require the inner gem when I require the outer gem...
here is the hyper-mesh.rb file:
require 'set'
if RUBY_ENGINE == 'opal'
  require "hyper-react"
  require "reactive_record/active_record/error"
  # lots more
else
  require 'opal'
  require 'hyper-react'
  require "reactive_record/permissions"
  # lots more
  Opal.append_path File.expand_path('../sources/', __FILE__).untaint
  Opal.append_path File.expand_path('../', __FILE__).untaint
end
require_relative 'synchromesh/client_drivers'
but when I use it I have to say:
# i.e. in components.rb
require 'hyper-react' <- WHY DO I NEED THIS????
require 'hyper-mesh'
Mitch VanDuyn
@catmando
Nov 02 2016 17:14
or more to the point how can I make it so developer only has to require 'hyper-mesh'
@elia - if you clone https://github.com/ruby-hyperloop/hyper-mesh and then cd to reactive_record_test_app and do a bundle install, etc, then bundle exec rails s
Mitch VanDuyn
@catmando
Nov 02 2016 17:19
and visit /spec-opal with the js debugger open you will see what I mean about tons of error messages for non-existing source maps.
Bernhard Weichel
@bwl21
Nov 02 2016 18:54
today I occasionally opened my app on Safari and observe that it is nearly twice as fast as with chrome. Someone here observing the similar?
and it appears that debugging with sourcemaps works much better there than in chrome ...
Mitch VanDuyn
@catmando
Nov 02 2016 19:31
@bwl21 is it twice as fast without debugger (in both browsers)??
figured out how to include your vendored gems:
Opal.append_path File.expand_path('../../vendor', __FILE__).untaint
Bernhard Weichel
@bwl21
Nov 02 2016 19:51
@catmando It is without debugger. I have my own benchmark instrumentation.
Mitch VanDuyn
@catmando
Nov 02 2016 19:52
jus wondered... well that is good to know... and its also faster with debugger I assume?
Bernhard Weichel
@bwl21
Nov 02 2016 20:04
@catmando yes,
It is the same factor
Mitch VanDuyn
@catmando
Nov 02 2016 20:09
nice