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.join 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
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
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 :-)
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 ;-)
Thanks Matz for creating Ruby!
Apocalyptiq 6 months ago
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.
heloizyjhenifer 1 year ago
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.join for reversing a Unicode string.
virumoz 1 year ago
@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 1 year ago
@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 1 year ago
@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 1 year ago
@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.
)-;
virumoz 1 year ago
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
TheMethadoneParty 1 year ago
Stil not enterprise level framework,,look at smalltalk,,I will wait till 2.0
buffalojack 1 year ago
This has been flagged as spam show
want watch - Ruby & the Rockits in HD and all eps, seasons? then go:
TVFLAP . COM
prioritty3 1 year ago
This comment has received too many negative votes show
I am java programmer.
I know ruby is better.
BUT I did and do and will use "JAVA".
because I DO LOVE JAVA.
java forever!
superpaco1 2 years ago
is that because you are a moron? or are the two things unrelated?
iHateY00T00b 2 years ago
def pig nop puts 'Oink!' *nop
end
pig 3
intdoublecharbool 2 years ago 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).
leporidus 2 years ago
langs = ["Ruby","Python","Perl","Java","C#",others]
langs.uniq => "Ruby"
langs.the_best => "Ruby"
szymondrejewicz 2 years ago 10
I think it would be easier if he talks in his language and someone write the English subtitle.
love2000mak 2 years ago 4
He's mormon? Wierd....
Nextstopearth 2 years ago
RUBY is a very good language, next to C++. WHO AGREES????????????
mountadeer 2 years ago 13
I've never managed to get quite to grips with ruby, I prefer python + c/c++ atm
DanielWaterworth 2 years ago
he looks so young. I can't believe he's in his 40s. He looks like he's in his mid-20s
racl101 2 years ago 6
How low: hitting on him to get your language feats in. =|
F00dTube 2 years ago
I know I'm shameless. :P
racl101 2 years ago
This comment has received too many negative votes show
9.1 seem like an awesome version
EngineGCC 2 years ago
yep, too bad that they are only at v1.9, if they hurry it will be so awesome
xPhreakx 2 years ago
cool, my name is a language
Filipinachick7486 2 years ago
This comment has received too many negative votes show
hehe, marry me
johnmair 2 years ago
This has been flagged as spam show
??????????????????????/
weird
Filipinachick7486 2 years ago
"Nothing googley" MUAHAHAHA Proprietary secrets!!
nexus2xl 3 years ago 9
I think Matz is a Buddha. People within a 5 foot radius of him start smiling and feel vaguely smarter and happier.
sgharms 3 years ago 37
man this guy is SMART holy moly.
Shoot3r101 3 years ago 16
This comment has received too many negative votes show
Emuliator.
scottburton11 3 years ago
Cool, Ruby 2 and Perl 6 will both be released on the same day - Christmas.
natlang1 3 years ago 19
happy christmas mom! "u gave me a link?" YEP! "wow..."
nickrohn93 3 years ago
This comment has received too many negative votes show
how do i download ruby? when i try to download it i need a program to open it what should i use?
kristonholt 3 years ago
Comment removed
johnmair 2 years ago
very good and interesting
nkchenz 3 years ago 9
Ruby and Matz roxrz!
dav231988 3 years ago 19
This has been flagged as spam show
GW is nuclear power fiction! Google a stooge.
JonThm 3 years ago
Where I can download subtitles?
lfecdr 3 years ago 5
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"}
s1e 3 years ago 9
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 :-)
s1e 3 years ago 3
感谢Matz,期待2.0早日出炉
fanixism 3 years ago
thank matz, good job!
fanixism 3 years ago 4
good
yukiosaitoh 3 years ago
<3 ruby
FungShunWen 3 years ago 10
Good Job!!
shitamichi 3 years ago 2
Poor Matz, he's stuttering a bit. Awesome guy, though.
yukiikyuta 3 years ago
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.
SolonBob 3 years ago 26
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 ;-)
bigbold2 3 years ago
This comment has received too many negative votes show
omfg
semiliteratedgod 3 years ago
This has been flagged as spam show
Konnichiwa?
jamieflournoy 3 years ago