Page 1 of 1

Strange solutions o_O

Posted: Sat Aug 16, 2008 11:32 am
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

Re: Strange solutions o_O

Posted: Sat Aug 16, 2008 11:52 am
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.

Re: Strange solutions o_O

Posted: Sat Aug 16, 2008 12:15 pm
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 :-)

Re: Strange solutions o_O

Posted: Sun Aug 17, 2008 4:49 pm
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

Re: Strange solutions o_O

Posted: Sun Aug 17, 2008 7:54 pm
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.

Re: Strange solutions o_O

Posted: Wed Aug 20, 2008 2:05 pm
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