Ruby 1.9
49:57
Added: 3 years ago
From: GoogleTechTalks
Views: 80,625
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (51)

Sign In or Sign Up now to post a comment!
  • Thanks Matz for creating Ruby!

  • Why would one want to reverse a fully unicode string anyway. What about the modifying characters in the standard, reversing them would make no sense, keeping their order would make any structure behave sub O(1) for doing it.

  • In any programming language worth learning, easy tasks should be easy and hard tasks should be possible.

    Reversing a string of codepoints ought to be among the easy tasks, no matter how useless you might think it is.

    I cannot view this talk in Germany, because Google doesn't allow it for some reason. That said, I suggest 'UniçodÈ'.scan(/./).reverse.jo­in for reversing a Unicode string.

  • @virumoz What I meant is that reversing a fully generic unicode string is in itself a bad idea because it can contain order dependent characters, now looking for a fast (as in optimized) way to doing this (which is what was asked by someone to the speaker) is stupid because there is provably no fast way. It's even hard to explain how pointless/meaningless/stupid at all levels it is :). The speaker was a bit stomped, understandably.

  • @heloizyjhenifer: heh, I see. Reversing an utf8 string byte for byte instead of char by char, eh?

    But really, my proposed solution works transparently and is fast enough because of the Unicode support in the oniguruma regular expression engine. Just split the string with scan() into an array, reverse the array, then join the array to a new string which will be reversed: in my example, »ÈdoçinU«.

    (-:

  • @virumoz No, not reversing bytewise, that's not just useless, it's plain wrong. I was refering to modifying characters that exist in the unicode standard for some code pages. Think of it as diacritic+letter which is (in those cases) supposed to render the diacritic on top of the letter (or below or whatever, together anyway). In that case, not only you're supposed to separate multibyte characters one from another but also know about every such case, and those are arbitrary of course.

  • @heloizyjhenifer You're right, I hadn't thought of all those diacritical marks (Wikipedia has a nice page called »Combining_character« about those) which sometimes even could not be resscued with Unicode_normalization (another Wiki page) if reversed. Good point. I wish I could watch the talk.

    )-;

  • This guy is soooooooooooo smart, why be a Moron? i mean Mormon? Is the video description correct? The man who invents ruby believes J. Smith ha ha ha just doesnt make sense

  • Stil not enterprise level framework,,look at smalltalk,,I will wait till 2.0

  • is that because you are a moron? or are the two things unrelated?

  • def pig nop puts 'Oink!' *nop

    end

    pig 3

  • The current encoding comments seem to look more like

    # encoding: ISO-8859-15

    or

    # encoding: UTF-8

    (compare and contrast with 12:01  never seen that format in use).

  • langs = ["Ruby","Python","Perl","Java"­,"C#",others]

    langs.uniq => "Ruby"

    langs.the_best => "Ruby"

  • I think it would be easier if he talks in his language and someone write the English subtitle.

  • He's mormon? Wierd....

  • RUBY is a very good language, next to C++. WHO AGREES????????????

  • I've never managed to get quite to grips with ruby, I prefer python + c/c++ atm

  • he looks so young. I can't believe he's in his 40s. He looks like he's in his mid-20s

  • How low: hitting on him to get your language feats in. =|

  • I know I'm shameless. :P

  • yep, too bad that they are only at v1.9, if they hurry it will be so awesome

  • cool, my name is a language

  • "Nothing googley" MUAHAHAHA Proprietary secrets!!

  • I think Matz is a Buddha. People within a 5 foot radius of him start smiling and feel vaguely smarter and happier.

  • man this guy is SMART holy moly.

  • Cool, Ruby 2 and Perl 6 will both be released on the same day - Christmas.

  • happy christmas mom! "u gave me a link?" YEP! "wow..."

  • Comment removed

  • very good and interesting

  • Ruby and Matz roxrz!

  • Where I can download subtitles?

  • Hehe, Matz rocks. The last question was a bit awkward, but it showed Ruby's beauty

    The Hash object at the bottom of the arguments list Matz was explaining about, can actually have the brackets omitted, but is still interpreted as :a => hash. When you want to pass another hash in the parameter, you have to explicitly wrap them both in brackets, or instantiate by Hash#new

    If you have a function

    def google(opts) puts opts[:foo] + boo end

    This is how it looks

    google {:boo => "foo"}, {:far => "bar"}

  • BUT since the latter hash is actually just for named parameters, you can probably pass both hash and the named param like google {:foo => "bar}, :boo => "far" and Ruby should interpret it fine

    It's questionable whether Rails should be rewritten to simply use variables instantiated by named params instead of internally deciphering them from an options hash

    I'm not in posession of 2.0, so I some of this is speculative, hope it helps though :-)

  • 感谢Matz,期待2.0早日出炉

  • thank matz, good job!

  • good

  • <3 ruby

  • Good Job!!

  • Poor Matz, he's stuttering a bit. Awesome guy, though.

  • Well, I understand he just learned english a couple of years ago. I've heard that when he started Ruby, he basically knew no english.

    Obviously, he is demand as a speaker now, so he has been working on his english. And most listeners are willing to listen, because he knows what he is doing.

  • Interesting, then, that he followed the convention of using English names for everything in the language. It's a convention, sure, but if I were building a language for myself and my first language wasn't English, I wouldn't be using English. Of course, this is why I don't have a world-class language to my name ;-)

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more