The following may help you with J's parts of speech http://www.jsoftware.com/docs/help701/dictionary/partsofspeech.htm
--Kip Murray Sent from my iPad On Jul 21, 2013, at 7:27 AM, "I.T. Daniher" <[email protected]> wrote: > You can definitely build similar aliases in J - simply writing 'add =: +' > will get you so far, but the right to left execution order confounds > attempts to make truely human readable sentences, where left-to-right order > is used. > > As for programming style - I tend to use single human readable words for my > verbs, like 'plot,' 'deriv,' or 'convolve.' My nouns tend to be single > characters, with comments for expected contents. > > I'm also new to J - I've built a set of training wheels at > https://github.com/itdaniher/JNotebook/blob/master/handlebars.ijs; most > scripts I write tend to require 'handlebars.ijs'. > > Best! > -- > Ian > > P.S. as for porting J to other languages, I've spent some time looking at > the structure of libj. Check out http://www.jsoftware.com/jwiki/iojNoun and > http://www.jsoftware.com/help/user/calling_jdll.htm for help writing FFI > bindings *to* J. > > On Sat, Jul 20, 2013 at 9:29 PM, Tobia Conforto > <[email protected]>wrote: > >> Hello >> >> I'm a J newbie, still going through the introductory material. It's a >> great language and I'm having a lot of fun learning it! But I cannot help >> comparing it to other languages I know. >> >> I find its features very interesting, especially its handling of rank, but >> at the same time I find its syntax very hard to read, compared to >> "ordinary" languages. >> >> After thinking about it a bit, I'm quite sure the reason is because you >> cannot make out the structure of a J sentence unless you know exactly which >> tokens are verbs, adverbs, and conjunctions, and even then it takes some >> mental work to put it all together. Otherwise it remains a flat list of >> symbols. In this regard it's not dissimilar from Assembly, where the entire >> code is a flat list of opcodes, unless you know how to see the structure in >> jumps and calls, and then apply yourself to the task. Maybe I'm wrong, but >> this does not strike me as a good thing. >> >> This, coupled with J's terse syntax (seriously… at least APL had some >> pretty symbols) made me wonder how much of its flexibility is dependent on >> its syntax; or conversely, how much of it could be ported to a different >> language with more static syntax rules, in the form of a library. I'm not >> thinking especially of Lisp, where you can build your own syntax, thus >> incurring in the same readability issues as J (as I see it.) >> >> Has anybody tried to port J's features to other languages? How did it go? >> >> Here is a tiny proof of concept, porting a couple of things (fork, adverb) >> over to CoffeeScript, in a very basic manner: >> >> >> div = (x, y) -> x/y >> add = (x, y) -> x+y >> tally = (y) -> y.length >> insert = (v) -> (y) -> y.reduce v >> fork = (a, f, b) -> (y) -> f (a y), (b y) >> integers = (y) -> [0..y-1] >> >> console.log (fork (insert add), div, tally) integers 10 # prints >> 4.5 >> >> >> As I said, this is very basic. It lacks everything, including rank and >> arrays. It's just a few lines I put together to reason about syntax. Out of >> the few languages I know, I chose CoffeeScript for this exercise mainly for >> its un-parenthesized function application. >> >> What are your thoughts? >> >> >> PS. I know much of J's power comes from its engine and its optimized array >> operations. This post is strictly about syntax, or rather *opinions* about >> syntax :-) >> ---------------------------------------------------------------------- >> 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
