~/talk

Ruby is the Best Javascript

Talkat RubyConf 2018 · 2018-11-28..11-30· [ruby]
slides:none on file

Claims Ruby can be made to look and behave like JavaScript by abusing syntax and metaprogramming: defines Javascript-style var and console.log, builds anonymous functions that are declared like JS and invoked like methods, and runs the demo code successfully. Techniques include global method_missing, using Object.new and instance_eval to bind block args, and using eval + local_variables search plus send and define_method. Six core stdlib receivers (to_a to_int etc) break with the hack, and the contraption actually works onstage.

AI-written summary · about

  1. 0:00Ruby is the Best Javascript
  2. 1:50Inspiration
  3. 2:34Taking it further
  4. 4:18Console.foo
  5. 5:26Splat
  6. 7:20Anonymous Classes
  7. 8:25Anonymous Object
  8. 10:04Anonymous Functions // Javascript
  9. 13:19Main Object
  10. 15:31Method Missing
  11. 17:06GlobalMissing
  12. 20:12Send some_obj = ['a', 'b', 'c']
  13. 21:42Instance Eval
  14. 22:34Function Function
  15. 24:42Define_method
  16. 26:30Local Variables
  17. 28:33Back to the Function
  18. 29:17Var Redux
  19. 32:17Tiny Text Success!
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.