{
  "id": "b549673055fa",
  "url": "http://pragdave.blogs.pragprog.com/pragdave/2007/12/ruby-19right-fo.html",
  "title": "Ruby 1.9—Right for You?",
  "note": "As is becoming a tradition, Matz announced the next major release of Ruby on Christmas day. \n\n\nLet's start by thanking both him and the entire Ruby core team for the efforts to get us here.\n\n\nSo, should you go and put this new Ruby to work right now? Let's see:\n\n\nThe Upside\n\nThis release contains a boatload of new features. Mauricio Fernandez has an impressive list (soon to be updated).\n\n\n\nPerformance: this new Ruby runs on the new YARV virtual machine. For most compute-intensive applications, you'll see significant speed improvements.\n\nSupport for string encodings and transcoding. Every string in Ruby can now have an associated encoding (ASCII, UTF-8, SJIS, and so on). You can transcode the contents of a string (for example converting ISO-8859-1 to UTF-8). \n\nIntegrated RubyGems and rake\n\nCool new goodies such as Fibers\n\n\n\nand so on and so on.\n\n\nThe Downside\n\n\nThis is a development release, not a production release. It has known bugs, and there'll be more to come. \n\nIt contains several incompatible changes (block parameters are now block-local, String is no longer Enumerable, \"cat\"[1] now returns \"a\", rather than 65)\n\nIt is more rigorous that 1.8 when it comes to detecting invalid code. For example, 1.8 accepts /[^\\x00-\\xa0]/u, while 1.9 complains of invalid multibyte escapes\n\n\n\nBecause of this, and based on my experience working on the third edition of the PickAxe, a whole bunch of existing gems and other libraries are broken.\n\n\nSo, Should You Use It?\n\nIn production? Probably not yet. It isn't intended for production use, and there will be some rough edges.\n\n\nFor development? Maybe, but take note of some of the issues with gems and other libraries. If you rely on third party code, make sure it has been tested against 1.9.0 before taking the plunge. That goes for Rails users, too.\n\n\nNow, if you're a library developer and gem maintainer, this is the perfect time to check out a copy of Ruby 1.9 and make sure your code is compatible. Over the coming months, more and more of your users will be basing their applications on 1.9. The future success of your gem requires compatibility.\n\n\nFor experimentation? Absolutely! The new features are wonderful. Not only do they make writing Ruby code even more enjoyable, they also open up whole new avenues to explore. How will fibers (both asymmetric and symmetric) affect they way we code? Let's all find out by playing with them.\n\n\nMy Recommendation\n\nDownload 1.9 (either as a tarball/zip file, or directly from the Subversion repository). Build it and install it, but not as your default Ruby. Instead, use the --prefix option to put it somewhere else (I store it under my home directory, so I don't need to be root). \n\n\n\n\n\n\n$ autoconf\n$ ./configure --prefix=/Users/dave/ruby19\n$ make\n$ make install\n\n\n\n\n\nThen, I just add /Users/dave/ruby19/bin to my path, and I'm using my nicely sandboxed version of Ruby 1.9.\n\n\n\n\n\n\n$ PATH=/Users/dave/ruby19/bin:$PATH\n$ ruby -v \nruby 1.9.0 (2007-12-26 revision 0) [i686-darwin8.11.1]\n\n\n\n\n\nIf I install gems with that version in my path, they get installed into the sandbox, not globally. If I use the sandboxed version of Ruby when building extension libraries with extconf.rb, those extensions install into the sandbox. But, if I suddenly have to look at a problem in production code that means I have to use Ruby 1.8, I simply fire up another shell with my original PATH, and it's as if Ruby 1.9 doesn't exist.\n\n\n1.9 is the future of Ruby, and it's a future that will be mainstream very soon. Start playing with it now, so you'll be up to speed when Matz creates his first production release.\n\n",
  "voice": "excerpt",
  "saved": "2007-12-26T00:40:04Z",
  "host": "pragdave.blogs.pragprog.com",
  "kind": "page",
  "tags": [],
  "record": "https://links.thingelstad.xyz/links/b549673055fa/",
  "markdown": "https://links.thingelstad.xyz/links/b549673055fa.md",
  "issues": [],
  "connections": {
    "same_host": {
      "count": 4,
      "page": "https://links.thingelstad.xyz/hosts/pragdave.blogs.pragprog.com/",
      "nearest": [
        {
          "id": "013e5ef7a9b4",
          "title": "The 'Language' in Domain-Specific Language Doesn't Mean English (or French, or Japanese, or ...)",
          "url": "http://pragdave.blogs.pragprog.com/pragdave/2008/03/the-language-in.html",
          "record": "https://links.thingelstad.xyz/links/013e5ef7a9b4/"
        },
        {
          "id": "fbb0275b7d4f",
          "title": "The Apple NDA is lifting...",
          "url": "http://pragdave.blogs.pragprog.com/pragdave/2008/10/the-apple-nda-i.html",
          "record": "https://links.thingelstad.xyz/links/fbb0275b7d4f/"
        },
        {
          "id": "e6f847b89e71",
          "title": "See Rails request paths in 'top'",
          "url": "http://pragdave.blogs.pragprog.com/pragdave/2008/11/trivial-request-logging-for-rails.html",
          "record": "https://links.thingelstad.xyz/links/e6f847b89e71/"
        },
        {
          "id": "67d43cf7c5dd",
          "title": "Twitter Should Move Away from Ruby",
          "url": "http://pragdave.blogs.pragprog.com/pragdave/2009/04/twitter-should-move-away-from-ruby.html",
          "record": "https://links.thingelstad.xyz/links/67d43cf7c5dd/"
        }
      ]
    },
    "same_week": {
      "count": 13,
      "nearest": [
        {
          "id": "52ac1e0817f7",
          "title": "Delete My Bleeping Account, Facebook",
          "url": "http://www.dailykos.com/story/2007/12/25/426218/-Delete-My-Bleeping-Account-Facebook",
          "record": "https://links.thingelstad.xyz/links/52ac1e0817f7/"
        },
        {
          "id": "f10155aae8c7",
          "title": "Google Reader needs GPC",
          "url": "http://scobleizer.com/2007/12/26/google-reader-needs-gpc/",
          "record": "https://links.thingelstad.xyz/links/f10155aae8c7/"
        },
        {
          "id": "4f3b1f13e28f",
          "title": "Short Simple Semantic Web Introduction Video",
          "url": "http://danielabarbosa.blogspot.com/2007/12/short-simple-semantic-web-introduction.html",
          "record": "https://links.thingelstad.xyz/links/4f3b1f13e28f/"
        },
        {
          "id": "2c7402573fea",
          "title": "Wii",
          "url": "http://www.petersens.ws/2007/12/26/wii",
          "record": "https://links.thingelstad.xyz/links/2c7402573fea/"
        },
        {
          "id": "18da444d8d9e",
          "title": "Dilbert \"Spoiled\"",
          "url": "http://dilbert.com/strips/comic/2007-12-27/",
          "record": "https://links.thingelstad.xyz/links/18da444d8d9e/"
        }
      ]
    },
    "mentions": [],
    "mentioned_by": [],
    "saved_twice": []
  },
  "elsewhere": {
    "wayback": "https://web.archive.org/web/*/http://pragdave.blogs.pragprog.com/pragdave/2007/12/ruby-19right-fo.html"
  }
}
