New to RedHanded? About our sections.
Archive
- December 2004
- January 2005
- February 2005
- March 2005
- April 2005
- May 2005
- June 2005
- July 2005
- August 2005
- September 2005
- October 2005
- November 2005
- December 2005
- January 2006
- February 2006
- March 2006
- April 2006
- May 2006
- June 2006
- July 2006
- August 2006
- September 2006
- October 2006
- November 2006
- December 2006
- January 2007
- February 2007
- March 2007
- April 2007
- May 2007
Get your copy of Programming Ruby!
Links
@technorati@del.icio.us
@flickr
@artima
@caboo
@oreilly
ruby
-> docs
-> wares
-> wiki
-> forum
-> quizzes
-> planet
-> irc
rubyweeklynews
rails
-> wiki
-> planet
-> irc
%anarchaia
%projectionist
~audreyt
~black
~britt
~buck
~copeland
~fernandez
~fowler
~hansson
~hodel
~hoy/7
~hwang
~luetke
~matz
~mental
~olson
~pragdave
~premshree
~neukirchen
~robby
~rousette
~topfunky
~voorhis
~weirich
~zenspider
Syndicate
Built upon Hobix
Got a story for us? E-mail it!
MenTaLguY
Fascinating. I wonder whether there’s an obfuscatory DSL lurking in there somewhere.
Nicholas Wright
Now that is clever.
Manfred
There’s also a lot of fun to be had with instance variables
Jay Phillips
Haha, what a great surprise to check my RSS reader and discover my name’s on the venerable _why’s blog. Thanks for the plug!
While at it, I’d like to encourage everyone in the Dallas area to get in touch with me about my seminar for more information. My email’s admin[
at]Jicksta.com. It’s going to be awesome.Keep up the great work _why. You’re our Ruby Rockstar. :)
evan
But why does
??
eval to63
?kode
and
?! => 33
PT
Because
MenTaLguY
Same reason
?a => 97
. To wit.Jeremy Voorhis
? is Ruby shorthand for referencing a character.
irb(main):020:0> ?a => 97 irb(main):021:0> ?a == “a”[0] => true
Since ?? equals 63, it is equivalent to true in a boolean test. That means we can negate it with a bang!
irb(main):014:0> ?? => 63 irb(main):015:0> !?? => false irb(main):016:0> !!?? => true
and so on. As always, be responsible ;)
binary42
binary?*%?.
This might be a good ruby quiz idea: Generate a given number is the fewest symbols possible.
Nick
Quick, count the bangs: is this true or false?
FlashHater
Nick: False!
FlashHater
Nick: False. 41 !s.
mixonic
Goo! Dear gods of lingo and logic, let us not stray the path to perl-dom…
J`ey
Ive been using this for ages, check http://www.eachmapinject.com/book/chapters/misc.rb
topfunky
@mixonic: Too late! We already have the Obfuscated Ruby Contest.
http://iorcc.blogspot.com/
muro
that took some time to understand… parentheses help.
RubyPanther
YaY! I’ll never miss Perl again!
randomsel
Someone mind putting some parenthesis on this so that a code newbie can understand? At least I think wazup? is a boolean returning function, but have no idea for the rest of it, unless all that banging is negations… wazup?!!??1