What's New and Shiny in Ruby 1.8.0?

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default Re: What's New and Shiny in Ruby 1.8.0?

    On Monday, August 4, 2003, at 11:33 PM, why the lucky stiff wrote:
    > Since there were a number of requests around for a more detailed
    > explanation of 1.8.0 changes, I figured I'd start into my favorites and
    > cover as many as I can.
    Thanks for doing that. I like that you've not only mentioned the
    changes but also given some background on why they're interesting and
    how they might be used.

    Duck typing is an interesting idea -- but I think to be used well it
    will require more careful planning. I think the example of testing for
    the method "read" is a good example. I can imagine a large number of
    classes that would have a "read" method, but wouldn't return what's
    expected from an IO type read.

    Looking at the page, I also have another question concerning
    Hash.merge. It does essentially the same thing is the set-union for
    Arrays, right (Array#|)? Would anybody besides me like to see Hash#|
    become an alias for Hash#merge? To me it would be more obvious that
    {'key' => 'val'} | {'otherkey' => 'otherval'} returns a new hash and
    doesn't modify the original one.

    Either way, the presence of this method is great for some HTTP stuff
    I'm doing where the only difference between a GET and a POST is that
    the POST requires a Content-type header.

    Ben


    Ben Giddings Guest

  2. Similar Questions and Discussions

    1. Ruby/Ruby on Rails Syntax Highlight/Code completion
      Hoping someone has, or is working on, an extension that adds Ruby and Ruby on Rails syntax/code coloring/code completion to Dreamweaver!
    2. [ba-rb] BA-rb ( Bay Area Ruby Users Group ) - 'Generating Code in Ruby' by Jack Herrington.
      Count me in again, too. -- Jos Backus _/ _/_/_/ Sunnyvale, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos at...
    3. BA-rb ( Bay Area Ruby Users Group ) - 'Generating Code in Ruby' by Jack Herrington.
      BA-rb (Bay Area Ruby language Users Group) is pleased to announce that it will begin meeting again. The topic for the first meeting will be a...
    4. Shiny areas on lady's faces in portraits
      I have several candid shots which will make excellent portraits if I can deal with shiny areas on the lady’s faces. Does anyone have any Idea how I...
    5. [ANN] ruby-freedb, ruby-serialport, ruby-mp3info moved to Rubyforge
      http://ruby-freedb.rubyforge.org/ http://ruby-serialport.rubyforge.org/ http://ruby-mp3info.rubyforge.org/ bye! --...
  3. #2

    Default Re: What's New and Shiny in Ruby 1.8.0?

    On Tuesday, August 5, 2003, at 01:50 AM, Yukihiro Matsumoto wrote:
    > The | operator is not suitable for the cases like
    >
    > {"key" => "val1"} | {"key" => "val2}
    >
    > That's the reason I chose "merge" for the name of the method.
    Hi Matz,

    Thanks for the clarification. I hadn't thought of which hash "wins"
    when both contain a key. Using "merge" does make it more clear.

    Ben


    Ben Giddings Guest

  4. #3

    Default Re: What's New and Shiny in Ruby 1.8.0?

    why the lucky stiff wrote:
    > My 1.8.0 summary is up at:
    >
    > [url]http://whytheluckystiff.net/articles/2003/08/04/rubyOneEightOh[/url]
    >
    > I'm about halfway done. I'll post a link again when I feel like I'm
    > finished.
    One thing mentioned there is the new sort_by in Enumerable. A simple example I tried is:

    text = ["the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"]

    puts text.sort_by { |x| x.length }.inspect

    #=> ["the", "the", "fox", "dog", "over", "lazy", "quick", "brown", "jumps"]

    Something that's not mentioned, but I figured I'd try it, because I thought it would be nifty, is sorting by multiple values ...

    text = ["the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"]

    puts text.sort_by { |x| [x.length, x] }.inspect

    #=> ["dog", "fox", "the", "the", "lazy", "over", "brown", "jumps", "quick"]

    Ie, we now have the values sorted first by their length, and when the length is the same, they're sub-sorted by the text itself. I think that's great!

    This would be particularly useful if the data items in the enumeration were instances of more complex objects. Then, you could do things like:

    sorted = people.sort_by { |p| [p.last_name, p.first_name, p.salary] }

    I just love Ruby!



    Harry Ohlsen Guest

  5. #4

    Default Re: What's New and Shiny in Ruby 1.8.0?

    ----- Original Message -----
    From: "Harry Ohlsen" <harryo@qiqsolutions.com>
    To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
    Sent: Tuesday, August 05, 2003 8:17 PM
    Subject: Re: What's New and Shiny in Ruby 1.8.0?

    > Something that's not mentioned, but I figured I'd try it, because I
    thought it would be nifty, is sorting by multiple values ...
    >
    > text = ["the", "quick", "brown", "fox", "jumps", "over", "the", "lazy",
    "dog"]
    >
    > puts text.sort_by { |x| [x.length, x] }.inspect
    >
    > #=> ["dog", "fox", "the", "the", "lazy", "over", "brown", "jumps",
    "quick"]
    >
    > Ie, we now have the values sorted first by their length, and when the
    length is the same, they're sub-sorted by the text itself. I think that's
    great!
    >
    > This would be particularly useful if the data items in the enumeration
    were instances of more complex objects. Then, you could do things like:
    >
    > sorted = people.sort_by { |p| [p.last_name, p.first_name, p.salary] }
    >
    > I just love Ruby!
    Agreed. I'll file the multi-key sort under T for Things That
    Make Me Go Ahhh...

    Hal

    --
    Hal Fulton
    [email]hal9000@hypermetrics.com[/email]



    Hal E. Fulton Guest

  6. #5

    Default Re: What's New and Shiny in Ruby 1.8.0?

    why the lucky stiff wrote:
    > If you don't mind, I'm going to add this tiny example to the page. This is
    > incredibly readable and demonstrates a number of Ruby's brilliant features at
    > once.
    Certainly! That's the first time someone's called something I wrote "readable" :-).
    > I've also just finished a section on Procs, StringIO, -run, and fixed the
    > Class.new and Module.new section. Just now starting on marshal_load,
    > marshal_dump, String#[], String#to_i, and Array#zip.
    Great. I'll go have another read.
    > Whew! There's so much!
    Yes, there certainly is. I've been avoiding using the 1.8 features until we got to preview releases, so it's all new (and fantastic!) to me.

    H.


    Harry Ohlsen Guest

  7. #6

    Default [OT] Re: What's New and Shiny in Ruby 1.8.0?


    "Harry Ohlsen" <harryo@qiqsolutions.com> wrote:
    >
    > #=> ["dog", "fox", "the", "the", "lazy", "over", "brown", "jumps", "quick"]
    >
    It doesn't roll off the tongue like the original IMHO :)
    but you may be the first person to discover programmatically
    that there's a redundant word in there.

    In response to this crisis, I offer:

    'Quick dogs jump over the lazy brown fox'

    > Ie, we now have the values sorted first by their length,
    > and when the length is the same, they're sub-sorted by the
    > text itself. I think that's great!
    Agreed. That *is/will be* bl**dy useful.
    >
    > I just love Ruby!
    >
    It's okay :)


    daz
    --

    text = ['the quick brown fox jumped over the lazy dog',
    'the quick brown fox jumps over the lazy dog',
    'quick dogs jump over the lazy brown fox']
    text.each do |phr|
    puts; p phr
    z = ('a'..'z').to_a - phr.split('')
    puts " ... doesn't contain \"#{z}\"" unless z.empty?
    end


    #->"the quick brown fox jumped over the lazy dog"
    #-> ... doesn't contain "s"



    daz Guest

  8. #7

    Default Re: [OT] Re: What's New and Shiny in Ruby 1.8.0?


    I wrote:
    >
    > that there's a redundant word in there.
    >
    Arghh, there's a redundant variable in that sig.

    ['the quick brown fox jumped over the lazy dog',
    'the quic brown ox jumps over the lazy dog',
    'quick dogs jump over the lazy brown fox'].
    each do |phr|
    puts; p phr
    z = ('a'..'z').to_a - phr.split('')
    puts " ... doesn't contain \"#{z}\"" unless z.empty?
    end




    daz Guest

  9. #8

    Default Re: [OT] Re: What's New and Shiny in Ruby 1.8.0?

    On Wed, Aug 06, 2003 at 02:01:23PM +0900, daz wrote:
    >
    > Arghh, there's a redundant variable in that sig.
    I would've left it in. (For me) it makes a nice snippet more
    readable.

    --
    marko schulz

    Marko Schulz Guest

  10. #9

    Default Re: [OT] Re: What's New and Shiny in Ruby 1.8.0?

    On Wed, 6 Aug 2003, daz wrote:
    > In response to this crisis, I offer:
    >
    > 'Quick dogs jump over the lazy brown fox'
    >
    ISBN: 0385722435 :-)

    Hugh

    Hugh Sasse Staff Elec Eng Guest

  11. #10

    Default Re: What's New and Shiny in Ruby 1.8.0?

    On Aug 6, Harry Ohlsen wrote:
    > sorted = people.sort_by { |p| [p.last_name, p.first_name, p.salary] }
    I really like this. But is there a simple easy way to get a descending
    sort here without reverting to sorted = people.sort { ... } ?


    Brett H. Williams Guest

  12. #11

    Default Re: What's New and Shiny in Ruby 1.8.0?

    On Thu, Aug 07, 2003 at 01:35:40AM +0900, Brett H. Williams wrote:
    > On Aug 6, Harry Ohlsen wrote:
    > > sorted = people.sort_by { |p| [p.last_name, p.first_name, p.salary] }
    >
    > I really like this. But is there a simple easy way to get a descending
    > sort here without reverting to sorted = people.sort { ... } ?
    How about

    sorted = people.sort_by { |p| [p.last_name, p.first_name, p.salary] }.reverse


    I haven't looked, but I suspect you can't selectively make individual
    criteria ascending/descending. Now, if we had a #stable_sort_by,
    then we could chain them together to get the desired
    results without crafting complex comparisons . . . :)

    -Mark
    Mark J. Reed Guest

  13. #12

    Default Re: What's New and Shiny in Ruby 1.8.0?

    On Thu, 7 Aug 2003 02:26:35 +0900
    Ian Macdonald <ian@caliban.org> wrote:
    > On Wed 06 Aug 2003 at 10:17:44 +0900, Harry Ohlsen wrote:
    >
    > > This would be particularly useful if the data items in the enumeration were
    > > instances of more complex objects. Then, you could do things like:
    > >
    > > sorted = people.sort_by { |p| [p.last_name, p.first_name, p.salary] }
    >
    > How does one use this with one's own objects, though?
    >
    > I just cooked up an example Person class to play with and then tried to
    > sort it as above:
    >
    > class Person
    > include Enumerable
    ^^^^^^^^^^^^^^^^^^
    Person doesn't implement #each, why mixin Enumerable?
    > attr_accessor :first_name, :last_name, :age
    >
    > def initialize(f,l,a)
    > @first_name = f
    > @last_name = l
    > @age = a.to_i
    > end
    > end
    >
    > p [d, g, i, j, p, j2, j3].sort_by { |x| [x.last_name, x.first_name, x.age] }
    >
    > and I get:
    >
    > /sort_by:23: undefined method `[]' for #<Person:0x4014e37c>
    > (NoMethodError)
    >
    > I'm fine with implementing Person#[], but I can't imagine how it should
    > look.
    ~/prog/ruby$ ruby -v
    ruby 1.8.0 (2003-08-04) [i686-linux]
    ~/prog/ruby$ cat person.rb
    class Person
    attr_accessor :first_name, :last_name

    def initialize(f,l)
    @first_name = f
    @last_name = l
    end

    def inspect
    "#{@first_name} #{@last_name}"
    end
    end

    ary = [ Person.new("Joe", "Blow"),
    Person.new("John", "Doe"),
    Person.new("Bill", "Blow"),
    Person.new("Jane", "Doe") ]
    p ary.sort_by { |x| [x.last_name, x.first_name ] }
    ~/prog/ruby$ ruby person.rb
    [Bill Blow, Joe Blow, Jane Doe, John Doe]

    BTW, your original example worked fine on my version of Ruby. Another
    option, of course, is to implement <=> for Person like so (untested)

    class Person
    def <=>(other)
    [ @last_name, @first_name ] <=> [ other.last_name, other.first_name ]
    end
    end

    Jason Creighton
    Jason Creighton Guest

  14. #13

    Default Re: What's New and Shiny in Ruby 1.8.0?

    On Thu, 7 Aug 2003 03:43, Mark J. Reed wrote:
    > On Thu, Aug 07, 2003 at 01:35:40AM +0900, Brett H. Williams wrote:
    > > On Aug 6, Harry Ohlsen wrote:
    > > > sorted = people.sort_by { |p| [p.last_name, p.first_name, p.salary] }
    > >
    > > I really like this. But is there a simple easy way to get a descending
    > > sort here without reverting to sorted = people.sort { ... } ?
    >
    > How about
    >
    > sorted = people.sort_by { |p| [p.last_name, p.first_name, p.salary]
    > }.reverse
    >
    >
    > I haven't looked, but I suspect you can't selectively make individual
    > criteria ascending/descending. Now, if we had a #stable_sort_by,
    > then we could chain them together to get the desired
    > results without crafting complex comparisons . . . :)
    For any numeric fields, you could just use -x, rather than x. So, to sort as
    above, but in descending salary ...

    sorted = people.sort_by { |p| [p.last_name, p.first_name, -p.salary] }

    but I can't think of a way to get it to work for strings, for example. Maybe
    if strings had a unary minus that changed every character to the character
    with code (255 - ascii-code) ... but that sounds like a real hack :-). Of
    course, it's not general enough, either.



    Harry Ohlsen Guest

  15. #14

    Default Re: What's New and Shiny in Ruby 1.8.0?

    Harry Ohlsen <harryo@zip.com.au> wrote:
    > but I can't think of a way to get it to work for strings, for example. Maybe
    > if strings had a unary minus that changed every character to the character
    > with code (255 - ascii-code) ... but that sounds like a real hack :-). Of
    > course, it's not general enough, either.
    Still hacky, but general:

    class Test
    attr_accessor :foo, :bar
    def initialize(f, b)
    @foo, @bar = f, b
    end

    def inspect
    "[#{foo}, #{bar}]"
    end
    end

    def rev(obj)
    a = obj.dup
    class << a
    alias old_cmp <=>
    def <=>(other)
    -old_cmp(other)
    end
    end
    a
    end

    a = [
    Test.new("Hello", 1),
    Test.new("World", -1),
    Test.new("Foo", 5),
    Test.new("bar", 4)
    ]

    p a
    p a.sort_by {|x| x.foo}
    p a.sort_by {|x| rev(x.foo)}

    martin
    Martin DeMello Guest

  16. #15

    Default Re: What's New and Shiny in Ruby 1.8.0?

    Ruby/DL is now covered. Prototyping functions, casting into structs, and
    pointer math! Everything you never wanted to do in Ruby but can! :)

    Thanks for reading, Srijit.

    _why


    On Tuesday 05 August 2003 11:01 pm, [email]srijit@yahoo.com[/email] wrote:
    > Hi,
    > Thanks for the detailed explanation.
    > I am interested to know more about ext/dl (an interface to the dynamic
    > linker) as mentioned in [url]http://dev.faeriemud.org/changes-1.8.0.html[/url].
    >
    > Regards,
    > Srijit
    >
    > why the lucky stiff <ruby-talk@whytheluckystiff.net> wrote in message
    > news:<20030805033123.GA73854@rysa.inetz.com>...
    >
    > > Since there were a number of requests around for a more detailed
    > > explanation of 1.8.0 changes, I figured I'd start into my favorites and
    > > cover as many as I can.
    > >
    > > My 1.8.0 summary is up at:
    > >
    > > [url]http://whytheluckystiff.net/articles/2003/08/04/rubyOneEightOh[/url]
    > >
    > > I'm about halfway done. I'll post a link again when I feel like I'm
    > > finished.
    > >
    > > _why

    why the lucky stiff Guest

  17. #16

    Default Re: What's New and Shiny in Ruby 1.8.0?

    On Thu 07 Aug 2003 at 05:19:32 +0900, Harry Ohlsen wrote:
    > On Thu, 7 Aug 2003 03:26, Ian Macdonald wrote:
    >
    > > How does one use this with one's own objects, though?
    > >
    > > I just cooked up an example Person class to play with and then tried to
    > > sort it as above:
    > >
    > > class Person
    > > include Enumerable
    > >
    > > attr_accessor :first_name, :last_name, :age
    > >
    > > def initialize(f,l,a)
    > > @first_name = f
    > > @last_name = l
    > > @age = a.to_i
    > > end
    > > end
    > >
    > > p [d, g, i, j, p, j2, j3].sort_by { |x| [x.last_name, x.first_name, x.age]
    > > }
    > >
    > > and I get:
    > >
    > > ./sort_by:23: undefined method `[]' for #<Person:0x4014e37c>
    > > (NoMethodError)
    >
    > I would guess that there's something in the code you didn't show (ie, that
    > defines d, g, i, j, p, j2 and j3) that's causing this error message.
    I assigned to the variable 'p', which is also a method in Ruby. That's
    bitten me before.

    Ian
    --
    Ian Macdonald | I've already told you more than I know.
    System Administrator |
    [email]ian@caliban.org[/email] |
    [url]http://www.caliban.org[/url] |
    |

    Ian Macdonald Guest

  18. #17

    Default Re: What's New and Shiny in Ruby 1.8.0?

    Martin DeMello wrote:
    > Still hacky, but general:
    >
    > class Test
    > attr_accessor :foo, :bar
    > def initialize(f, b)
    > @foo, @bar = f, b
    > end
    >
    > def inspect
    > "[#{foo}, #{bar}]"
    > end
    > end
    >
    > def rev(obj)
    > a = obj.dup
    > class << a
    > alias old_cmp <=>
    > def <=>(other)
    > -old_cmp(other)
    > end
    > end
    > a
    > end
    >
    > a = [
    > Test.new("Hello", 1),
    > Test.new("World", -1),
    > Test.new("Foo", 5),
    > Test.new("bar", 4)
    > ]
    >
    > p a
    > p a.sort_by {|x| x.foo}
    > p a.sort_by {|x| rev(x.foo)}
    However, if we try

    p a.sort_by { |x| rev(x.bar) }

    we get ...

    sort_by.rb:20:in `dup': can't dup Fixnum (TypeError)

    I tried sticking in an

    if obj.respond_to? :dup

    but that didn't help. It would appear that, while Fixnum responds to #dup, its response is "I'm sorry, Dave, I'm afraid I can't do that." :-(.

    That doesn't seem to make a lot of sense to me. I would have thought it made more sense for Fixnum#dup to just return self. Maybe there's some good reason for not doing that.

    Alternatively, maybe we need a way for classes to disown methods they inherit that they don't want to (or logically shouldn't) implement? Then, Fixnum could disown dup and the respond_to? test would work the way I was expecting.

    Harry O.


    Harry Ohlsen Guest

  19. #18

    Default Re: What's New and Shiny in Ruby 1.8.0?

    Jason Creighton wrote:
    > BTW, your original example worked fine on my version of Ruby. Another
    > option, of course, is to implement <=> for Person like so (untested)
    >
    > class Person
    > def <=>(other)
    > [ @last_name, @first_name ] <=> [ other.last_name, other.first_name ]
    > end
    > end
    That's probably something one should do, anyway. Ie, define the logical default ordering for objects of that type.

    The thing I like about the sort_by approach is that it allows you to easily change the ordering on the fly.

    It's also just such a nice example of POLS!

    H.


    Harry Ohlsen Guest

  20. #19

    Default Re: What's New and Shiny in Ruby 1.8.0?

    On 7 Aug 2003 at 8:30, Harry Ohlsen wrote:
    > Martin DeMello wrote:
    >
    > > Still hacky, but general:
    > >
    > > class Test
    > > attr_accessor :foo, :bar
    > > def initialize(f, b)
    > > @foo, @bar = f, b
    > > end
    > >
    > > def inspect
    > > "[#{foo}, #{bar}]"
    > > end
    > > end
    > >
    > > def rev(obj)
    > > a = obj.dup
    > > class << a
    > > alias old_cmp <=>
    > > def <=>(other)
    > > -old_cmp(other)
    > > end
    > > end
    > > a
    > > end
    > >
    > > a = [
    > > Test.new("Hello", 1),
    > > Test.new("World", -1),
    > > Test.new("Foo", 5),
    > > Test.new("bar", 4)
    > > ]
    > >
    > > p a
    > > p a.sort_by {|x| x.foo}
    > > p a.sort_by {|x| rev(x.foo)}
    Very nice idea. I like it.
    > However, if we try
    >
    > p a.sort_by { |x| rev(x.bar) }
    >
    > we get ...
    >
    > sort_by.rb:20:in `dup': can't dup Fixnum (TypeError)
    This could be fixed with something like

    def rev(obj)
    -obj
    rescue NoMethodError
    a = obj.dup
    class << a
    alias old_cmp <=>
    def <=>(other)
    -old_cmp(other)
    end
    end
    a
    end

    Not beautiful, but working.
    > I tried sticking in an
    >
    > if obj.respond_to? :dup
    >
    > but that didn't help. It would appear that, while Fixnum responds to
    > #dup, its response is "I'm sorry, Dave, I'm afraid I can't do that."
    > :-(.
    >
    > That doesn't seem to make a lot of sense to me. I would have thought
    > it made more sense for Fixnum#dup to just return self. Maybe there's
    > some good reason for not doing that.
    But then you couldn't do things like Martin's code, where you want to
    modify a duplicate and not the original object.
    > Alternatively, maybe we need a way for classes to disown methods they
    > inherit that they don't want to (or logically shouldn't) implement?
    > Then, Fixnum could disown dup and the respond_to? test would work the
    > way I was expecting.
    Since dup is defined in Object (Kernel), you'd expect to find it in
    every object, wouldn't you? But if you really want you can undefine
    dup for Fixnums:

    p 5.respond_to?( :dup ) # => true
    p 5.dup rescue puts $! # => can't dup Fixnum

    Fixnum.send :undef_method, :dup

    p 5.respond_to?( :dup ) # => false
    p 5.dup rescue puts $! # => undefined method `dup' for 5:Fixnum

    Regards,
    Pit

    Pit Capitain Guest

  21. #20

    Default Re: What's New and Shiny in Ruby 1.8.0?

    Harry Ohlsen <harryo@qiqsolutions.com> wrote:
    > However, if we try
    >
    > p a.sort_by { |x| rev(x.bar) }
    >
    > we get ...
    >
    > sort_by.rb:20:in `dup': can't dup Fixnum (TypeError)
    >
    > I tried sticking in an
    >
    > if obj.respond_to? :dup
    >
    > but that didn't help. It would appear that, while Fixnum responds to
    > #dup, its response is "I'm sorry, Dave, I'm afraid I can't do that."
    > :-(.
    This fixes it:

    def rev(obj)
    a = obj.dup rescue (return obj.cmp_inv)
    class << a
    alias old_cmp <=>
    def <=>(other)
    -old_cmp(other)
    end
    end
    a
    end

    class Fixnum
    def cmp_inv
    -self
    end
    end

    where for any class not supporting dup, we explicitly define a
    'comparative inverse' such that a<=>b = b.cmp_inv<=>a.cmp_inv for all a,
    b belonging to our class.
    > That doesn't seem to make a lot of sense to me. I would have thought
    > it made more sense for Fixnum#dup to just return self. Maybe there's
    > some good reason for not doing that.
    In this instance, we definitely don't want Fixnum#dup to return self -
    the call to dup is to avoid the object itself having its comparator
    reversed. We could avoid the call to dup altogether by using a
    delegator, I suppose

    class RevCmp
    attr_reader :this

    def initialize(obj)
    @this = obj
    end

    def <=>(other)
    other.this <=> @this
    end

    # not delegating anything else because this is explicitly a throwaway
    # object used only inside a sort_by block
    end

    def rev(obj)
    RevCmp.new(obj)
    end
    > Alternatively, maybe we need a way for classes to disown methods they
    > inherit that they don't want to (or logically shouldn't) implement?
    > Then, Fixnum could disown dup and the respond_to? test would work the
    > way I was expecting.
    This breaks some sort of OO principle, I think.

    martin
    Martin DeMello Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139