I can't speak for Raul, obviously, but: - J is a (programming) language - It is used to express (and sometimes execute) ideas, using a vocabulary
So, asking "where did you get this?" of the sentence "(,+/&i./ 2{.1 1,~$y) u key ,/y" is not very different than asking it of the sentence "where did you get this?". You want to express a concept, you have a bag of well-understood words you can use towards that end, and so you arrange them in a way you hope communicates the idea to your interlocuter (which is sometimes a person named "Linda Alvord", and other times a machine named "the J interpreter"). Anyway, even if Raul "got this somewhere", someone had to invent it in the first place (say it for the first time). So the comments above still apply. That said, it does make use of several concepts which, while composite (instead of primitive), are well-established enough to be considered part of the shared vocabulary, rather than (re-)invented each time they are used*. One such concept is "(=x) u@#"1 _ y", which, beyond "well established", is actually canonized in the DoJ [1]. Another such concept is "the oblique lines of a table (2D array) are formed by the collection of atoms whose index-sums are equal". This is such a compelling definition that, in [2], REB made the case that it should be formalized and extended to higher-order arrays (though that hasn't been done). -Dan [1] DoJ entry for /. (Key), "x u/.y ↔ (=x) u@# y": http://www.jsoftware.com/help/dictionary/d421.htm [2] R.E. Boss, "Proposal for a different oblique", December 2006: http://www.jsoftware.com/pipermail/programming/2006- December/004410.html * Roger doesn't like the term "idiom" as it applies to well-established J phrases, as (in English) it carries connotations of conventions beyond the face of the text. I don't share that opinion, but out of consideration for his perspective, I have avoided the term ;) -----Original Message----- From: programming-boun...@jsoftware.com [mailto:programming- boun...@jsoftware.com] On Behalf Of Linda Alvord Sent: Friday, December 09, 2011 12:18 PM To: 'Programming forum' Subject: Re: [Jprogramming] Oblique Road to Success! Where did you get this. Is there some way that you capture code like this or do you just write it yourself? oblique=:1 :0 (,+/&i./ 2{.1 1,~$y) u key ,/y ) Thanks in advance. Linda -----Original Message----- From: programming-boun...@jsoftware.com [mailto:programming- boun...@jsoftware.com] On Behalf Of Raul Miller Sent: Friday, December 09, 2011 11:09 AM To: Programming forum Subject: Re: [Jprogramming] Oblique Road to Success! On Fri, Dec 9, 2011 at 10:46 AM, Linda Alvord <lindaalv...@verizon.net> wrote: > b=:5 3 5 > Either definition has only one argument so isn't the function oblique rather > than key? So Ric has taken the "Oblique oad To Success!". One wonders if it > is faster than the other one. My previous post about equivalents to /. was confused. /.~ uses key /. without ~ and using only one argument is oblique key=:1 :0 : (=x) u@#"1 _ y ) oblique=:1 :0 (,+/&i./ 2{.1 1,~$y) u key ,/y ) FYI, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm