Wrong confirmation ID
  • Email
  • Favorite
  • Download
  • Embed
  • Private Content

Wild & Weird Ideas: An Overview of Ruby 1.9

by Murray Steele on Dec 13, 2007

  • 12,235 views

A presentation I gave at the London Ruby User Group (LRUG) in December 2007 about the changes in the ruby programming language in the soon to be released 1.9 version. ...

A presentation I gave at the London Ruby User Group (LRUG) in December 2007 about the changes in the ruby programming language in the soon to be released 1.9 version.

Note that Ruby 1.9 was still in development at the time I wrote this talk, so it's possible the stuff I say in it is completely inaccurate with respect to any currently released version of Ruby 1.9.

Accessibility

Categories

Tags

ruby lrug ruby1.9 ruby19 1.9 leet yarv testing

More...

Upload Details

Uploaded via SlideShare as Adobe PDF

Usage Rights

CC Attribution-NonCommercial LicenseCC Attribution-NonCommercial License

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

13 Embeds 692

http://www.akitaonrails.com 590
http://blog.html.it 34
http://akitaonrails.com 31
http://www.akitaonrails.com.br 14
http://www.slideshare.net 11
http://www.lte-unifi.net 4
http://www.netvibes.com 2
http://www.codicesorgente.it 1
http://atog.be 1
http://hackety.org 1
http://static.slideshare.net 1
http://www.akitaonrails.net 1
http://feeds.feedburner.com 1

More...

Statistics

Favorites
11
Downloads
344
Comments
24
Embed Views
692
Views on SlideShare
11,543
Total Views
12,235

110 of 24 previous next Post a comment

  • hlame Murray Steele , Developer at Unboxed Consulting Presenter Notes:
    the sources I used to produce this talk

    4 years ago Reply
    Are you sure you want to Yes No
  • hlame Murray Steele , Developer at Unboxed Consulting Presenter Notes:
    the main site still points at ftp server, but the ruby1.9 snapshot not updated since sept

    4 years ago Reply
    Are you sure you want to Yes No
  • hlame Murray Steele , Developer at Unboxed Consulting Presenter Notes:
    Ruby isn’t a language that lives on it’s own
    what about everything that sits on top of 1.8 right now?

    1. gems -> 0.9.5 all about making the system 1.9 compatible
    movements to include it in core
    altho’ many deep conversations still happening about this
    2. rake -> mutterings about including it in core
    conversations about it’s upgradability (it’s a gem after all) if included in core
    but it appears that Jim Weirich can speak japanese, so I can’t work out the latest :(
    want to use it instead of make - but that means you need ruby to build ruby...
    3. Rails -> promising - active_support has a few unless RUBY_VERSION =~ /^1.9/ style code parts
    people claim 15% speed increase
    sure I’ve heard DHH say “we are not target for 1.9”
    could only find 2 tickets with ruby 1.9 in the summary.

    4. mongrel -> not so sure.
    based on fastthread, and YARV breaks that
    but there is mongrel 1.1.1 for jruby - jruby has no fastthread
    rumours that evented mongrel might work

    TBH very little info out there about 1.9 and apps -
    moriq (Kazuhiro Yoshida) last month last log

    4 years ago Reply
    Are you sure you want to Yes No
  • hlame Murray Steele , Developer at Unboxed Consulting Presenter Notes:
    1. BasicObject only contains send, object_id, respond_to, equal?
    it’s a complete blank slate.

    2. Class variables often cause confusion (for me)
    now they only belong to the single class they are defined on

    2. lambda vs proc.new
    appears to be to do with the semantics of return keyword
    lambdas can return safely, proc.new’s (and thus default block args) can’t

    3. this seems interesting, but I can’t find out anything more (no ri yet).
    Could just be syn for call, could be something more (cf lambda vs proc)

    4. could be a problem for meta programming / monkey patchers
    should use send!, but it doesn’t appear to work in the version I have

    4 years ago Reply
    Are you sure you want to Yes No
  • hlame Murray Steele , Developer at Unboxed Consulting Presenter Notes:
    1. Again, another thing big when added to java
    slightly less use now that threads are OS and blocking activities won’t block whole app
    loads of methods across the whole IO tree. make writing selecting rather than threaded servers easier.
    2. Can now provide limits to read/get methods of IO objects - so we don’t pull everything in one go
    good for memory consumption (or lack-thereof)
    3. Strangely - not apparently encoding aware
    open takes an encoding, but it doesn’t look like you can query an IO to ask what encoding it will give you. You have to ask the data it gives you.

    4 years ago Reply
    Are you sure you want to Yes No
  • hlame Murray Steele , Developer at Unboxed Consulting Presenter Notes:
    1. Everyone’s fave from active_support
    presumably faster than their one (people complain about it)
    note - altho similar looking I don’t think that #inject sans-block uses this

    2. doesn’t have inheritance chain from String (nor does it from Symbol)
    many String esque methods
    2.2 matches strings, also Regexp#=== matches symbols as well as strings

    4 years ago Reply
    Are you sure you want to Yes No
  • hlame Murray Steele , Developer at Unboxed Consulting Presenter Notes:
    1. Enumerators provide external iterators (think java.util.iterator)
    this allows objects without .each to be used in for loops and other
    also, objects that can be thrown around to other places
    2. You can now call Enum methods without a block - returns Enumerator
    can be chained - no .map_with_index, but ...
    3. inject without a block takes a symbol arg that is the operator to apply to all elements
    brings me swiftly on to....

    4 years ago Reply
    Are you sure you want to Yes No
  • hlame Murray Steele , Developer at Unboxed Consulting Presenter Notes:
    1. Multilingualization “M17N”
    strings now have an encoding. #encoding, change via #force_encoding
    seems to default to ASCII-8bit (for me)
    when reading strings from elsewhere tell ruby in the open (who knows with DB access...)
    also (like python) can specify encoding of file in super special comment
    2. it’s a container for lines, chars and bytes, so why enumerate lines?
    .chars, .bytes, .lines (or .each_XXX)

    these are the 2 major changes - and probably 1 of biggest to std lib.
    other changes are jsut new methods, start_with, partition etc... (similar to active_support??)

    4 years ago Reply
    Are you sure you want to Yes No
  • hlame Murray Steele , Developer at Unboxed Consulting Presenter Notes:
    enough of that sillyness
    again, can’t cover it all.

    4 years ago Reply
    Are you sure you want to Yes No
  • hlame Murray Steele , Developer at Unboxed Consulting Presenter Notes:
    multiple splats in one place, I know I’ve tried it before
    also - worth noting, splat now calls #to_splat, not #to_a
    suppose this makes it clear it’s the splat operator, I always thought that was a whyism

    4 years ago Reply
    Are you sure you want to Yes No
Post Comment
Edit your comment Cancel

Wild & Weird Ideas: An Overview of Ruby 1.9 — Presentation Transcript