My name is Todd Nathan, and it is with great pleasure
to annouce the opening of 2005 IORCC. The Official
International Obfuscated Ruby Code Contest Rules and
FAQ are now online. Please consider entering your
most obfuscated Ruby program, or becoming a judge.
The Official IORCC site: http://iorcc.dyndns.org/
Warm regards,
Todd Nathan
IORCC Founder/Judge
(SeaForth) irc://irc.freenode.net/
http://iorcc.dyndns.org/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
> On Wed, 23 Feb 2005 08:23:08 +0900, David A. Black <dbl...@wobblini.net> wrote:
>>
>> Is that "pretty" as in "somewhat", or "pretty" as in "nice-looking"?
>> :-)
>
> How about "pretty" and "pretty unreadable"?
> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/124391
Don't tell me you can't read base64! :P
(It may be unreadable, but it isn't really obfuscated...)
> I'm still impressed by that one (obviously)
Well, thank you.
--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org
On Wed, 23 Feb 2005, Christian Neukirchen wrote:
> Matt Lawrence <ma...@technoronin.com> writes:
>
>> On Wed, 23 Feb 2005, Yukihiro Matsumoto wrote:
>>
>>> Well, it is a good chance to prove them we can write pretty unreadable
>>> code as well as readable code.
>>
>> There are already too many Ruby books that I can't read. :-)
>
> Now, "Ruby, the language where the documentation is more unreadable
> than the source" wouldn't be that good news, probably. :)
I think the books Matt is referring to are perfectly readable, if you
know Japanese :-)
David
--
David A. Black
dbl...@wobblini.net
> Todd Nathan wrote:
>> it is with great pleasure to annouce the opening of 2005 IORCC.
>
> 1st price: "Advanced Obfuscation: Perl for Ruby Programmers"
> 2nd price: "More Awkward Obfuscation: AWK for Ruby Programmers"
> 3rd price: "Obfuscation by Parenthesis: Lisp for Ruby Programmers"
> 4th price: "How to shoot yourself in the foot"
>
> An ORCC doesn't seem to be a good idea. I already hear them saying "See
> this? They keep on saying that Ruby code is much cleaner than Perl code.
> Don't believe their lies."
I wonder how the perl community reacted on books like "Object-oriented
Perl" by Conway... :P
Seriously, a deobfuscation contest of the winners is planned, too.
> Josef 'Jupp' Schugt
In message "Re: ANN: 2005 International Obfuscated Ruby Code Contest (IORCC)"
on Wed, 23 Feb 2005 06:37:50 +0900, Josef 'Jupp' Schugt <ju...@gmx.de> writes:
|An ORCC doesn't seem to be a good idea. I already hear them saying "See
|this? They keep on saying that Ruby code is much cleaner than Perl code.
|Don't believe their lies."
Well, it is a good chance to prove them we can write pretty unreadable
code as well as readable code.
matz.
How about "pretty" and "pretty unreadable"?
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/124391
I'm still impressed by that one (obviously)
--
Bill Guindon (aka aGorilla)
|> Well, it is a good chance to prove them we can write pretty unreadable
|> code as well as readable code.
|
|Is that "pretty" as in "somewhat", or "pretty" as in "nice-looking"?
|:-)
Both, of course. I'm glad you've found the pun.
matz.
> Todd Nathan wrote:
>
>> it is with great pleasure to annouce the opening of 2005 IORCC.
>
>
> 1st price: "Advanced Obfuscation: Perl for Ruby Programmers"
> 2nd price: "More Awkward Obfuscation: AWK for Ruby Programmers"
> 3rd price: "Obfuscation by Parenthesis: Lisp for Ruby Programmers"
> 4th price: "How to shoot yourself in the foot"
>
> An ORCC doesn't seem to be a good idea. I already hear them saying "See
> this? They keep on saying that Ruby code is much cleaner than Perl code.
> Don't believe their lies."
>
> Josef 'Jupp' Schugt
Obfuscated codes promote exactly two things, not less, not more:
1, the flexibility of the target language
2, the talent and creativity of the author
I can only look up to those who write such high quality codes :) It does
not mean that they are
not capable to write clean, well-structured ones, on the contrary, most
of the times it shows their
deep understanding of both "sides".
For another point, any idea which puts ruby in the spotlight is more
than welcomed, I think, for
what ruby needs now more than anything else is popularity... and fun
around it, like this obfuscated
contest or the ruby quiz is exactly the thing for it - improving morale,
stirring up any still water, etc.
Regards,
Ochronus
1st price: "Advanced Obfuscation: Perl for Ruby Programmers"
2nd price: "More Awkward Obfuscation: AWK for Ruby Programmers"
3rd price: "Obfuscation by Parenthesis: Lisp for Ruby Programmers"
4th price: "How to shoot yourself in the foot"
An ORCC doesn't seem to be a good idea. I already hear them saying "See
this? They keep on saying that Ruby code is much cleaner than Perl code.
Don't believe their lies."
Josef 'Jupp' Schugt
--
Currently running Aurox 10.1 Quicksilver.
> On Wed, 23 Feb 2005, Yukihiro Matsumoto wrote:
>
>> Well, it is a good chance to prove them we can write pretty unreadable
>> code as well as readable code.
>
> There are already too many Ruby books that I can't read. :-)
Now, "Ruby, the language where the documentation is more unreadable
than the source" wouldn't be that good news, probably. :)
> -- Matt
On Wed, 23 Feb 2005, Yukihiro Matsumoto wrote:
Is that "pretty" as in "somewhat", or "pretty" as in "nice-looking"?
:-)
as far as i can tell more people (e.g me) in the ruby community
have read books such as that than people in the perl community.
sad ain't it?
Alex
Powerful languages allow obfuscation. Weak languages only allow garbage
code.
Anybody looking at the code in an obfuscated coding contest as an
example of how unreadable a language is severely misses the point.
Sam
I agree, you did some really clever work, including a generator
script, but in the end it's base64 and the resulting Ruby code is very
readable.
I've seen people going around with a simple base64 encode/decode Ruby
line in their .signatures. It's just not impressive, people! :-)
Cheers,
Navin.
> Well, it is a good chance to prove them we can write pretty unreadable
> code as well as readable code.
There are already too many Ruby books that I can't read. :-)
-- Matt
Nothing great was ever accomplished without _passion_
The Official IORCC Rules and FAQ are now available online.
Please consider entering, judging or promoting this Ruby event.
> Matt Lawrence <ma...@technoronin.com> writes:
>
>> On Wed, 23 Feb 2005, Yukihiro Matsumoto wrote:
>>
>>> Well, it is a good chance to prove them we can write pretty unreadable
>>> code as well as readable code.
>>
>> There are already too many Ruby books that I can't read. :-)
>
> Now, "Ruby, the language where the documentation is more unreadable
> than the source" wouldn't be that good news, probably. :)
Personally, I find the book on Ruby Internals to be impossible for me to
read.
Now, *that* would explain lots... }:-) Excellent book, btw.
> Alex
How about:
puts [926381,23200231779,1299022,1045307475].map{|n|
n.to_s(?$).send n%9==0&&:to_s||:capitalize}.join(" ")<<","
My favorite stays:
s=",GreEkcaSh BODybuILDER ALBreChtAMMOonIa tSUNEMATsuJ";
puts lambda{|f|h=lambda{|h|lambda{|x|f[h[h]][x]}};h[h]}[
lambda{|f|lambda do|h|h[0]?f[h[1..-1]]<<h[0]:[];end}][s.
delete(*%w{A-Z ^JR})].#See King James text of the bible:
pack("c*")## "Y do ye not understand my speech?", John 8
> Cheers,
> Navin.
>
srand 52019;puts"Azzp!bljqkmw!Xrfy!nmgaiq!".
unpack(%q(c*)).map{|x|x^rand(16)}.pack('c*')
On my machine:
$ uname -a
Linux silver.wg 2.6.9silver #1 Mon Jan 10 14:43:04 CET 2005 i686 GNU/Linux
$ ruby -v
ruby 1.8.2 (2005-01-10) [i386-linux]
That evaluates to:
$ ruby -e 'srand 52019;puts"Azzp!bljqkmw!Xrfy!nmgaiq!".
unpack(%q(c*)).map{|x|x^rand(16)}.pack("c*")'
Gwvz&baf|ej}%T{a|.ikhbcw)
And I thought it was about obfuscating the code, not the answer ;)
cheers,
Brian
--
Brian Schröder
http://ruby.brian-schroeder.de/
> On my machine:
> $ uname -a
> Linux silver.wg 2.6.9silver #1 Mon Jan 10 14:43:04 CET 2005 i686 GNU/Linux
> $ ruby -v
> ruby 1.8.2 (2005-01-10) [i386-linux]
>
> That evaluates to:
> $ ruby -e 'srand 52019;puts"Azzp!bljqkmw!Xrfy!nmgaiq!".
> unpack(%q(c*)).map{|x|x^rand(16)}.pack("c*")'
> Gwvz&baf|ej}%T{a|.ikhbcw)
>
> And I thought it was about obfuscating the code, not the answer ;)
>
> cheers,
Very interesting...
$ uname -a
Darwin lilith.local 7.8.0 Darwin Kernel Version 7.8.0: Wed Dec 22
14:26:17 PST 2004; root:xnu/xnu-517.11.1.obj~1/RELEASE_PPC Power
Macintosh powerpc
$ ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin7.7.0]
And it works. BTW, I've coded that on an Athlon XP on Kernel 2.6.0
with ruby 1.8.1...
Has the RNG changed recently?
> Brian
Very neat, though the "suJ" sequence gives it away.
martin
So ruby -e 'srand 52019; puts rand(16)' prints 6 for you, not 11?
Maybe it's only guaranteed to be deterministic on a particular
machine. Hey, I guess you ask for random, you get random!
Cheers,
Navin.
puts [1360991028827446, 591861].map{|n| n.to_s(?$
).send n%2==1&&:to_s||:capitalize}.join(" ")<<"!"
Very instructive, thanks!
Cheers,
Navin.
Ugh. Thank god my horrible horrible typo is encoded and the whole
world can't see it. Everybody knows it's spelt 1360991042264374 not
1360991028827446!
At least the 50% chance it would still work properly with that fix
panned out...
Cheers,
Navin.
C:\WINDOWS>ruby -ve "srand 52019; puts rand(16)"
ruby 1.8.2 (2004-12-25) [i386-mswin32]
11
Mr. Schroeder's sig works fine here (Windows XP SP2). FWIW.
Cheers,
Dave
--
Lloyd Zusman
l...@asfast.com
God bless you.
$ ruby -e 'srand 52019; puts rand(16)'
6
regards,
>> puts [1360991028827446, 591861].map{|n| n.to_s(?$
>> ).send n%2==1&&:to_s||:capitalize}.join(" ")<<"!"
Why, thank you. :-)
> Ugh. Thank god my horrible horrible typo is encoded and the whole
> world can't see it. Everybody knows it's spelt 1360991042264374 not
> 1360991028827446!
:D
> Cheers,
> Navin.
> ruby -e 'def x(n,m)z=n;(m-1).times{|x|z*=n};z;end
> def f(n)d=2;r=[];while(d*d)<n do t=0;while((n%d)==0)do
> n=(n/d).to_i;t+=1;end;while(t>0)do t-=1;r<<d;end;d+=(1+(d%2));end
> (r<<n)if(n>1);r;end;p f((x(3,2).to_s+x(2,5).to_s).to_i).inject{
> |x,y|x+y}.to_s.split(//).inject(1){|a,b|a*b.to_i}'
Now, that's a lotta code to calculate 6*9. :-)
11 for me (WinXP).
"Who needs yet another way to do it?" I suppose.
Josef 'Jupp' Schugt
It only seems more natural to use C for that. The following is a quick
and dirty hack to compute n! I wrote yesterday - without having
obfuscation in mind. It's simply my way of writing C. Blame it on my
tutorial - K&R.
#include <stdio.h>
#include <stdlib.h>
int main(int argc,char*argv[]){
unsigned long long i,fac;
for(i=fac=atoi(argv[1]);i>2;fac*=(--i));
return(printf("%ll\n",fac)==1);
}
To me Ruby is a tool for elegant solutions:
ruby -e 'puts (1..10).inject{|f,x| f*x}'
Josef 'Jupp' Schugt
> Lloyd Zusman <l...@asfast.com> writes:
>
>> ruby -e 'def x(n,m)z=n;(m-1).times{|x|z*=n};z;end
>> def f(n)d=2;r=[];while(d*d)<n do t=0;while((n%d)==0)do
>> n=(n/d).to_i;t+=1;end;while(t>0)do t-=1;r<<d;end;d+=(1+(d%2));end
>> (r<<n)if(n>1);r;end;p f((x(3,2).to_s+x(2,5).to_s).to_i).inject{
>> |x,y|x+y}.to_s.split(//).inject(1){|a,b|a*b.to_i}'
>
> Now, that's a lotta code to calculate 6*9. :-)
Hey, this is nothing. They had a planet-sized computer working for
nearly 10 million years on that calculation.
Life ... don't talk to me about life ...
dunno why anyone would find that wierd...
you should see some of my c/c++ code with
method-template/class-template/macros mixes
it makes most c++ coders ask for explanations...
> To me Ruby is a tool for elegant solutions:
i think the point here is "to me"
to me ruby is a tool for having fun
while making useful stuff :)
Alex
Here's mine.
ruby -rrational -e'a=Rational(
0x9cc95b36d52d9fc20284574207b5f,0x622d297799f50876c38b460435956c
);(a=1/a;print((a.to_i+64).chr);a-=a.to_i)while a>0;puts'
ruby -e'x=2;p=[];(p<<x if !p.find{|y|x%y==0};x+=1)while
p.size<7;puts p.inject(0){|a,b|a+b*b}'
ruby -e'p (1..36).inject(0){|a,b|a+b}'
ruby -e'p (0..5).inject(0){|a,b|a+(1<<(11*b))}%691'
_____________________________________________________________________
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
Looks like you are back to the drawing board with these last two in ruby 1.9:
$ ruby -e'p (1..36).inject(0){|a,b|a+b}'
-e:1: warning: don't put space before argument parentheses
1..36
-e:1: undefined method `inject' for nil:NilClass (NoMethodError)
$ ruby -e'p (0..5).inject(0){|a,b|a+(1<<(11*b))}%691'
-e:1: warning: don't put space before argument parentheses
0..5
-e:1: undefined method `inject' for nil:NilClass (NoMethodError)
$ ruby18 -e'p (1..36).inject(0){|a,b|a+b}'
666
$ ruby18 -e'p (0..5).inject(0){|a,b|a+(1<<(11*b))}%691'
666
Regards,
Jason
http://blog.casey-sweat.us/
Eliminating warning fixes things:
> /usr/local/ruby-1.9/bin/ruby -v -e'p((1..36).inject(0){|a,b|a+b})'
ruby 1.9.0 (2005-02-14) [sparc-solaris2.8]
666
same goes with the other test.
- Ville
'-NEON-EYE-'.unpack('C*').inject(0){|a,b|a+b} #-> 666
--
Simon Strandgaard (aka neoneye)
>'-NEON-EYE-'.unpack('C*').inject(0){|a,b|a+b} #-> 666
>
>
Ok, let's golf that down a bit, shall we? :)
'-NEON-EYE-'.sum
Or even:
666
;)