views:

273

answers:

4

I came across this statement as code, on a programming puzzle web site.

(i. >./) (0 >. +)/@:|.\ a

Wondering, what language has these type of syntax?

A: 

APL had that sort of syntax. Not that exact syntax but near the same level of readability. Did the web site not offer a clue?

Forth, as well, had similar syntax (R> . .@) but it still tended to have spaces between words, unlike your sample.

Update:

Actually, it does look like APL or a variant thereof. See this link here for the line:

(i. >./) z     NB. Hook. Linear index of pivot

The comments at the top of that file:

NB.  AMENDMENT:  "A Change for the Better"
NB.  Vector, vol. 9, No. 3 (January 1993) p.134-140. Used J Version 5
NB.  x i} m  Amend was amended in Version 4 and further amended
NB.  in J Release 2
NB.  Executes with J Release 2.05, March 1995

so it's the J variant of APL. See here if you want to enhance your migraines.

paxdiablo
APL seemed likely but @ isn't in their symbols. http://en.wikipedia.org/wiki/APL_(programming_language)#APL_symbols_and_keyboard_layout
John T
Might be J, an APL descendant.
Joey
A: 

K has some really weird syntax. Also, on the list are APL, R and some other weird languages, which are pretty powerful for their purposes, and in some cases, use their own character set. My guess would be that this is closer to K than anything else.

Ryan Oberoi
R's syntax is weird but nowhere _that_ weird :)
Joey
+6  A: 

That's probably the J programming language. For example, here's a page that mentions the (i. >./) idiom

(I wanted to say Perl as a joke ;)

swampsjohn
That's less of a joke than you might think :-)
paxdiablo
Pretty sure that's J...
RCIX
Yes, it is. Now at least we know where Brainf*ck comes from.
paxdiablo
I thought that page was opaque until I wandered around the rest of the site. Not only do they want a language to be as terse as possible, but they seem to apply the same style guide to the documentation. They named the user manual "Usr", for instance.
RBerteig
A: 

Perfectly valid c++ code. Just give me a couple of #define directives, and this cryptic code will print a "Mary has a little lamb"...

Just kidding, but why not? Preprocessor may translate almost anything into a valid code...