POV-Ray : Newsgroups : povray.off-topic : Really epic Server Time
14 Nov 2024 16:17:27 EST (-0500)
  Really epic (Message 1 to 10 of 55)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Invisible
Subject: Really epic
Date: 14 Feb 2008 09:40:57
Message: <47b452f9$1@news.povray.org>
http://hpaste.org/5637

I have no idea whether this is actually executable or whether it does 
anything interesting, but somebody *clearly* has a lot of free time on 
their hands....

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Really epic
Date: 14 Feb 2008 10:07:08
Message: <47b4591c@news.povray.org>

> I have no idea whether this is actually executable or whether it does 
> anything interesting, but somebody *clearly* has a lot of free time on 
> their hands....
> 

You haven't seen the International Obfuscated C Code Contest, have you?


Post a reply to this message

From: Warp
Subject: Re: Really epic
Date: 14 Feb 2008 10:09:21
Message: <47b459a1@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> http://hpaste.org/5637

> I have no idea whether this is actually executable or whether it does 
> anything interesting, but somebody *clearly* has a lot of free time on 
> their hands....

  What language is that?

-- 
                                                          - Warp


Post a reply to this message

From: Invisible
Subject: Re: Really epic
Date: 14 Feb 2008 10:12:01
Message: <47b45a41$1@news.povray.org>
Warp wrote:

>   What language is that?

It parses as valid Haskell. I have no idea what in the name of God it 
actually does...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Invisible
Subject: Re: Really epic
Date: 14 Feb 2008 10:15:10
Message: <47b45afe$1@news.povray.org>
Nicolas Alvarez wrote:

> You haven't seen the International Obfuscated C Code Contest, have you?

Yeah, I have. IIRC, there was a program there in the shape of a 
character from Tolkin Elvish, which, when run, prints out the Elvish 
character set. Or. Something.

See also:

http://www.haskell.org/haskellwiki/Obfuscation

Obfuscated for sure. But not as impressive, somehow...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Really epic
Date: 14 Feb 2008 10:20:45
Message: <47b45c4d$1@news.povray.org>

> Warp wrote:
> 
>>   What language is that?
> 
> It parses as valid Haskell. I have no idea what in the name of God it 
> actually does...
> 

Well, if you look at it from a distance, it reads "RSA". So that gives 
you a hint.


Post a reply to this message

From: Invisible
Subject: Re: Really epic
Date: 14 Feb 2008 10:21:53
Message: <47b45c91$1@news.povray.org>
>> It parses as valid Haskell. I have no idea what in the name of God it 
>> actually does...
>>
> 
> Well, if you look at it from a distance, it reads "RSA". So that gives 
> you a hint.

Sure. But given that it defines a bunch of functions called "un", "po" 
and so on... uh...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Really epic
Date: 14 Feb 2008 10:30:05
Message: <47b45e7d$1@news.povray.org>

>>> It parses as valid Haskell. I have no idea what in the name of God it 
>>> actually does...
>>>
>>
>> Well, if you look at it from a distance, it reads "RSA". So that gives 
>> you a hint.
> 
> Sure. But given that it defines a bunch of functions called "un", "po" 
> and so on... uh...
> 

It's not obfuscated if it has readable function names.


Post a reply to this message

From: Invisible
Subject: Re: Really epic
Date: 14 Feb 2008 10:35:15
Message: <47b45fb3$1@news.povray.org>
OK, so I had a go at unscrambling this...



cox n = foldr (\x y -> 128 * y + x) 0 n

de n = un (\x -> (x `mod` 128, x `div` 128), (==0)) n

coll = un (\zs -> (take 35 zs, drop 35 zs), (==""))

pe (n,m) x = s (p (n `div` 2, m) x) `mod` m

p (n,m) x = if n==0
               then 1
               else (if even n then pe (n,m) x else po (n,m) x)

po (n,m) x = (x * p (n-1, m) x) `mod` m

un (f,p) n = if p n then [] else (let (a,b) = f n in a : un (f,p) b)

(g,s) = (\x -> x, \x -> x*x)



That last line is the best. I didn't even realise you could *do* that! 
Very odd...

Right, so, let's do some analysis here.

- "g" is the identity function, and "s" is the square function.

- Apparently "un" is a list unfold function. It takes an integer and a 
pair of functions. The second function tells it when to stop unfolding; 
the first one actually does the unfold.

-- "coll" uses "un" to split a text string into blocks of 25 characters. 
So idea why.

-- "cox" appears to be using a list fold to convert a list into a giant 
code number. (Note that it works with arbitrary precision integers.) 
"de" looks like it's trying to do the reverse operation.

- The "p" function appears to be trying to decide whether to call "pe" 
or "po" depending on whether n is odd or even.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Jim Henderson
Subject: Re: Really epic
Date: 14 Feb 2008 12:18:15
Message: <47b477d7$1@news.povray.org>
On Thu, 14 Feb 2008 13:07:07 -0200, Nicolas Alvarez wrote:

> Invisible escribió:
>> I have no idea whether this is actually executable or whether it does
>> anything interesting, but somebody *clearly* has a lot of free time on
>> their hands....
>> 
>> 
> You haven't seen the International Obfuscated C Code Contest, have you?

Do they still hold that?  I remember examples from the past of things 
like a morse code translator and a source "picture" that was an ASCII 
train.

Jim


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.