Strange solutions o_O

Announcements, comments, ideas, feedback, and "How do I... ?" questions
Post Reply
3n1gm4
Posts: 34
Joined: Sun Jul 20, 2008 1:46 pm

Strange solutions o_O

Post by 3n1gm4 »

I think it's not a spoiler, if so I'll try to change my post.

After I solve a problem I find funny to see other people approach to the same problem, maybe in the same language I used (it could be cool to have something like a filter). Anyway, someone posted something like this:

[censored]

or this:
[censored]

I don't understand. Are they codes? is that a programming language? is it the same programming language? it seems so but I don't understand it, it's pretty unreadable, what language is it? (I censored come part of the code, so that nobody can copy it... even if he can get the right problem of these solutions :D). Anyway, does it really work? This kind of solutions seems too short for me, are they compressed? thank you
Last edited by 3n1gm4 on Wed Aug 20, 2008 2:04 pm, edited 1 time in total.
funktio
Posts: 14
Joined: Mon May 19, 2008 6:55 pm
Location: Helsinki, Finland

Re: Strange solutions o_O

Post by funktio »

3n1gm4 wrote:it's pretty unreadable, what language is it?
I think it's normal that you can't read a language you don't know. It's J; here's a Wikipedia article on it, and J for C Programmers is a very nice free book.
for($"=@_=split??,"Jrsk an treP rehlohacteu,";$";$\="\r"){$\.=$.=chr
32+95*rand,$_-$"or$.ne$_[--$"%2?-$"-1:$"]&&$"++for++$|..$";print}<>
3n1gm4
Posts: 34
Joined: Sun Jul 20, 2008 1:46 pm

Re: Strange solutions o_O

Post by 3n1gm4 »

funktio wrote:
3n1gm4 wrote:it's pretty unreadable, what language is it?
I think it's normal that you can't read a language you don't know. It's J; here's a Wikipedia article on it, and J for C Programmers is a very nice free book.
uhm...

Code: Select all

quicksort=: (($:@(<#[) , (=#[) , $:@(>#[)) ({~ ?@#)) ^: (1<#)
I've try it O_O (anyway it is unreadable :P )

Thank you :-)
User avatar
jdrandall123
Posts: 65
Joined: Sun Mar 26, 2006 11:57 am
Location: New York, USA

Re: Strange solutions o_O

Post by jdrandall123 »

Any language is difficult to learn if you don't know something like it. APL to J is reasonably easy, C to Java is easy, but C to J (or C to Lisp) is not.

To get some idea of what J can do, with explanations, I suggest you look at http://www.jsoftware.com/jwiki/Essays/.

John
User avatar
Tommy137
Posts: 238
Joined: Sun Feb 24, 2008 6:02 pm
Location: Cologne, Germany
Contact:

Re: Strange solutions o_O

Post by Tommy137 »

3n1gm4 wrote:I think it's not a spoiler, if so I'll try to change my post.

Well, you could delete the solution you copied... even if the problem number isn't mentioned.
Image
3n1gm4
Posts: 34
Joined: Sun Jul 20, 2008 1:46 pm

Re: Strange solutions o_O

Post by 3n1gm4 »

Tommy137 wrote:
3n1gm4 wrote:I think it's not a spoiler, if so I'll try to change my post.

Well, you could delete the solution you copied... even if the problem number isn't mentioned.
I did :-)

ps: they were not correct solutions anyway, there were some characters replaced by "-" :D
Post Reply