j

what are some of J's unique features?

Hi, I come from a background of C, Fortran, Python, R, Matlab, and some Lisp - and I've read a few things on Haskell. What are some neat ideas/examples in J or other languages from the APL family that are unique and not implemented in more common languages? I'm always interested in finding out what I'm missing... ...

Void Verbs in J

I'm learning how to use J via online reading and doing some old Java assignments over again using this language, and would like to know how to make a verb that doesn't take any operands, or return any result. The reason being: I would like to allow myself the ability to type in a verb, let's call it go that would run a sequence of code o...

Have J style adverbs, forks etc been emulated via libraries in mainstream functional languages?

Has an emulation of J style of super condensed tacit programming via verbs, adverbs, forks, etc., ever been attempted via libraries for mainstream functional languages? If so, how successful was the result? If not, is there a technical issue that makes this impossible, or is it just not worth doing? I'm particularly interested in cons...

Contextual Help In J

When messing around with Haskell using GHC, I can use various meta-commands like :i or :t to find out some information about an identifier. In REBOL, I can use functions like help and sometimes source to get extremely detailed information on a REBOL word. If such a facility exists for J, I've somehow missed it. Do any J-ers out there kn...

Fiddling with point-free code?

I have been learning the Factor and J languages to experiment with point-free programming. The basic mechanics of the languages seem clear, but getting a feeling for how to approach algorithm design is a challenge. A particular source of confusion for me is how one should structure code so that it is easy to experiment with different pa...

Most concise J syntax for creating a numeric matrix

Imagine that I want to take the numbers from 1 to 3 and form a matrix such that each possible pairing is represented, e.g., 1 1 1 2 1 3 2 1 2 2 2 3 3 1 3 2 3 3 Here is the monadic verb I formulated in J to do this: ($~ (-:@# , 2:)) , ,"0/~ 1+i.y Originally I had thought that ,"0/~ 1+i.y would be sufficient, but unfortunately that pro...

What's a more concise way to count the number of times an element occurs in a list in J?

...

How do I write this C expression in J?

How do I write this C expression in J? (where x is input integer, and a is temporary variable) ((a= ~x & (~x >> 1)) ^= a ? 0 : (a ^ (a & (a - 1))) | (a ^ (a & (a - 1))) << 1); . Edit: In a more readable form: int a = (~x) & ((~x) >> 1); if (a == 0) return 0; int b = a ^ (a & (a - 1)); return b | (b << 1); ...

APL versus A versus J versus K?

The array-language landscape, while fascinating, is confusing to no end. Is there a reason to to pick and of J or K or APL or A? None of these options seem to be open-sourced -- are there open sourced versions? I would love the expand my mind, but I remain befuddled. ...