daily pastebin goal
77%
SHARE
TWEET

Untitled

a guest Sep 20th, 2013 233 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Nokogiri: History of a Gem (A valid and well-formed talk on an open-source success) - Mike Dalessio @flavorjones mike.daless.io / blog.flavorjon.es
  2. - Introduction
  3.   - RubyForge, speakers first open-source contributions. Pat Nakojima and Arron Patterson
  4.   - [Business Cat] 'climbing corporate ladder, can't get down'
  5. - FAQ
  6.   - What is nokogirl?
  7.     - a gem which depends on nokogiri
  8.   - What is nokogiri?
  9.     - A ruby API for XML SAX/DOM parsing
  10.   - What does nokogiri mean?
  11.     *- Speaker Hates XML, but he loves making painful things not painful
  12.     - Nokogiri has been downloaded millions of times. (*amazeballs*) Rails has 27.6 million downloads, Formtastic has 1.7 million for comparison
  13.       - If Rails is KISS (used to be bleeding edge, but now it's something your parents listen to)
  14.       - Formtasitic is Come on Eileen (sort of catchy in the middle)
  15.       - Nokogiri is Kelly Clarkson (there all the time, in the background)
  16.     - Nokogiri is Japanese which is a play on saw (a tree of XML which needs cutting)
  17.   - Why can't I install Nokogiri on OS X using macports.
  18.     - long story
  19. - History
  20.   - Why? History is important because if you don't know it you will repeat the bad bits of it
  21.   - 2006
  22.     - History of Ruby parsers
  23.       - REXML is in the stdlib but it's /slow/ and doesn't fix broken mark-up
  24.       - Hpricot is the de facto standard for XML/HTML parsing. Issues with poor API (easy to shoot self in foot)
  25.     - USPOWERGEN
  26.       - Pull request to add client-side cert to Mechanize. @tenderlove was open and kind and responsive. Eventually speaker got commit privs
  27.   - 2008
  28.     - Pharos
  29.       - Scraping broken HTML with Mechanize
  30.       - HPricot would crash all the time (if HTML was exactly 16k long *lol*)
  31.     - Talking about the genesis of nokogiri
  32.       - @tenderlove... "I've submitted those test cases as bugs for hpricot as well. I would have patched hpricot, but it is to hard for me to read."
  33.       - Most significant words to an open-source maintainer - "How can I help out?"
  34.       - DL bindings (dynamic language bindings)
  35.         - DL is slow... really slow. We killed it and started writing a C extension to call libxml2 directly
  36.       - Discovering and debugging libxml2's memory management
  37.         - matching it to Ruby's GC world was really difficult
  38.       - Management strategy
  39.         - libxml frees from top down... but libxml2 has dictionaries and caches and string node merging
  40.         - not a 1:1 C to Ruby match at all... what does my Ruby object point to?
  41.         - huge comment to explain memory management logic (see slides for this -- it's a wall a text)
  42.       - If you want to write and debug C extensions make sure you know:
  43.         - valgrind to find unsafe memory ops and memory leaks
  44.         - perftools.rb
  45.       - API Design
  46.         - The first bits of Nokogiri API was hpricot rip off.. had a shim layer to make it Hpricot compatible (soon discontinued)
  47.         - First official release on 17 nov, 2008
  48.           - Do not release on a DST weekend if you work at a trading company.. speaker spent most of the weekend fixing DST bugs at his job
  49.       - Early Adopters
  50.         - Loofah ne'e Dryopteris (@brynary)
  51.         - Slidedown (@nakajima)
  52.         - Merb (@ykatz) --- pushed hard for performance
  53.       - Lots of people had opinions on benchmarks
  54.         - Benchmarking was actually largely pointless, other than driving us to fix bottlenecks more quickly.
  55.       *- Personal Tangent
  56.         - introduced in 2008 introduced to Pivotal Labs by Pat Nakajima
  57.         - "I can't imagine hiring someone that I didn't know through open source." - DHH
  58.         - Pivotal still regularly receives applications without a link to a Github profile, or references to your personal work.
  59.   - 2009
  60.     - programming is rather thankless. u see your works become replaced by superior ones in a year. unable to run at all in a few more. -- Why The Lucky Stiff (twitter)
  61.     - Why The Lucky Stiff vanishes.... reference to his tweet
  62.     - The Dawn of JRuby
  63.       - started getting some street cred as people started using it
  64.       - most people tend to use MRI (room poll 80%)
  65.       - In '09 JRuby didn't fully support the C extension API. This was a problem for nokogiri.
  66.       - Speaker had a dream that would he would write nokogiri to run everywhere, his FFI phase
  67.       - FFI is magic. Shout out to Wayne Meissner (@wmeissner) -- implementer of FFI... FFI is a gem which is like DL but actually working.
  68.       - Took 3,049 of Ruby/FFI code to reproduce 4,150 lines of C code... kind of a smell
  69.         - not much density, basically a full port of the C code
  70.         - pain, "segfault-driven development" ... no compile time checking
  71.           - crashes on JRuby... portable string handling is hard, JVM GCs strings out from under you
  72.         - Author didn't want to write C code in Ruby
  73.         - Much slower than direct C extension
  74.         - Harassment-driven development
  75.           - speaker got harassed at RubyConf '09 for a few hours about not being able to use nokogiri on google app engine because shared library loading isn't available there
  76.       - FFI Lessons (check slides.. couldn't copy down.. speaker moving too quickly and low on time)
  77.       - "Portability is for people who cannot write new problems" -- Linus Torvalds
  78.     - Enter Sergio
  79.       - GSOC (google summer of code) ... ported pieces to Java.
  80.     - Flavour of the Zeitgeist
  81.       - tried everything but native, had to go native and it worked <snipped for time>
  82.     - Many platforms
  83.       - windows
  84.         - nobody has a build chain
  85.         - nobody has libxml2
  86.         - crosscompiled all these libraries into DLLs -- "fat binary gem"
  87.           - 10 MiB versus 200 KiB
  88.         - Luis Lavena (@luislavena) supports the windows build system pretty much single-handedly
  89.       - jRuby
  90.         - dependencies
  91.           - same solutions, fat binary 2 MiB versus windows's 10 MiB
  92.       - OS X
  93.         - dependencies
  94.           - inconsistent build platform
  95.         - libxml2 2.9.X homebrew default... breaks css queries due to XML bug
  96.           - solved by mini_portile
  97.       *- "Mugatu" meme [I invented fat source gems! What have you done! Nothing!]
  98.       - Call to Action
  99.         - Help Nokogiri on Windows
  100.         - Help people with open-source projects
  101. - Scratch your itch... make the world a better place... (and get to hang out with @tenderlove)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top