WoW
···
On Feb 22, 2005, at 6:42 PM, Bill Guindon wrote:
How about "pretty" and "pretty unreadable"?
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/124391I'm still impressed by that one (obviously)
--
Bill Guindon (aka aGorilla)
WoW
On Feb 22, 2005, at 6:42 PM, Bill Guindon wrote:
How about "pretty" and "pretty unreadable"?
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/124391I'm still impressed by that one (obviously)
--
Bill Guindon (aka aGorilla)
Bill Guindon <agorilla@gmail.com> writes:
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!
(It may be unreadable, but it isn't really obfuscated...)
I'm still impressed by that one (obviously)
Well, thank you.
On Wed, 23 Feb 2005 08:23:08 +0900, David A. Black <dblack@wobblini.net> wrote:
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org
Hi --
On Wed, 23 Feb 2005, Christian Neukirchen wrote:
Matt Lawrence <matt@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
dblack@wobblini.net
Personally, I find the book on Ruby Internals to be impossible for me to read.
-- Matt
Nothing great was ever accomplished without _passion_
On Wed, 23 Feb 2005, Christian Neukirchen wrote:
Matt Lawrence <matt@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.
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'
On Wed, 23 Feb 2005, Bill Guindon wrote:
On Wed, 23 Feb 2005 08:23:08 +0900, David A. Black <dblack@wobblini.net> wrote:
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)
_____________________________________________________________________
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
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.
Christian Neukirchen <chneukirchen@gmail.com> wrote:
> How about "pretty" and "pretty unreadable"?
> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/124391Don't tell me you can't read base64!
(It may be unreadable, but it isn't really obfuscated...)
> I'm still impressed by that one (obviously)
Well, thank you.
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/
On Fri, 25 Feb 2005 21:38:56 +0900, Mathieu Bouchard <matju@sympatico.ca> wrote:
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'
Navindra Umanee <navindra@cs.mcgill.ca> writes:
> How about "pretty" and "pretty unreadable"?
> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/124391Don't tell me you can't read base64!
(It may be unreadable, but it isn't really obfuscated...)
> I'm still impressed by that one (obviously)
Well, thank you.
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!
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]]}};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*')
Christian Neukirchen <chneukirchen@gmail.com> wrote:
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org
Jason Sweat <jason.sweat@gmail.com> writes:
$ 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)
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
On Fri, 25 Feb 2005 21:49:39 +0900, Jason Sweat <jason.sweat@gmail.com> wrote:
$ ruby18 -e'p (1..36).inject(0){|a,b|a+b}'
666
--
Simon Strandgaard (aka neoneye)
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
On Thu, 24 Feb 2005 01:40:13 +0900, Christian Neukirchen <chneukirchen@gmail.com> wrote:
Navindra Umanee <navindra@cs.mcgill.ca> writes:
> Christian Neukirchen <chneukirchen@gmail.com> wrote:
>> > 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!
>>
>> (It may be unreadable, but it isn't really obfuscated...)
>>
>> > I'm still impressed by that one (obviously)
>>
>> Well, thank you.
>
> 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!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]]}};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*')
--
Brian Schröder
http://ruby.brian-schroeder.de/
puts [1360991028827446, 591861].map{|n| n.to_s(?$
).send n%2==1&&:to_s||:capitalize}.join(" ")<<"!"
Very instructive, thanks!
Cheers,
Navin.
Christian Neukirchen <chneukirchen@gmail.com> wrote:
How about:
Simon Strandgaard wrote:
'-NEON-EYE-'.unpack('C*').inject(0){|a,b|a+b} #-> 666
Ok, let's golf that down a bit, shall we?
'-NEON-EYE-'.sum
Brian Schröder <ruby.brian@gmail.com> writes:
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?
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.
Brian Schröder <ruby.brian@gmail.com> wrote:
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
puts [1360991028827446, 591861].map{|n| n.to_s(?$
).send n%2==1&&:to_s||:capitalize}.join(" ")<<"!"
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.
Or even:
666
On Fri, 25 Feb 2005 23:23:11 +0900, Florian Frank <flori@nixe.ping.de> wrote:
Simon Strandgaard wrote:
>'-NEON-EYE-'.unpack('C*').inject(0){|a,b|a+b} #-> 666
>
>
Ok, let's golf that down a bit, shall we?'-NEON-EYE-'.sum
--
Brian Schröder
http://ruby.brian-schroeder.de/
$ ruby -e 'srand 52019; puts rand(16)'
6
regards,
Brian
On Thu, 24 Feb 2005 08:19:19 +0900, Navindra Umanee <navindra@cs.mcgill.ca> wrote:
Brian Schröder <ruby.brian@gmail.com> wrote:
> 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 answerSo 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.
--
Brian Schröder
http://ruby.brian-schroeder.de/
Navindra Umanee <navindra@cs.mcgill.ca> writes:
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!
Brian Schröder, 24/2/2005 05:26:
On Thu, 24 Feb 2005 08:19:19 +0900, Navindra Umanee > <navindra@cs.mcgill.ca> wrote:
Brian Schröder <ruby.brian@gmail.com> wrote:
> 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 answerSo 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.$ ruby -e 'srand 52019; puts rand(16)'
6
11 for me (WinXP).