Another problem domain, I have done a lot of work in connectivity matrices (yes 
including transitive closure) in problem spaces such as;
        Minimum Path
        Credit Counterparty Limits in financial markets

I did this in kdb (another descendant of APL) but the technique may be directly 
implemented in J also as a very nice Linear Algebra solution, reference is here;
https://code.kx.com/q/cookbook/lp/

The solution was a handful of lines of code, but I too come from an older APL 
and C programming background and a scalar language approach would be a very 
considerable and less robust task by comparison.
The technique is readily transcribed to J using functions very similar to what 
Raul already provided in this thread mentioning work done by Roger also.

Rob Hodgkinson


> On 29 Nov 2017, at 2:23 pm, Don Kelly <[email protected]> wrote:
> 
> While I have done, in the past, with APL*PlUS, (Yes, I am that old) more than 
> I have done with J (interest rather than need  is now dominant), I find that 
> the potential of J to deal with many things in a compact way is superior to 
> that APL and any other languages which I have dealt with -from MAD, Fortran, 
> Basic, Pascal and C++ . In J, the problem solution is the main objective and 
> the bit twiddling can be left to the idiot box, not the programmer. The array 
> orientation eliminates much of the  need for looping and control structures 
> which, while defined, are often unneeded.
> 
> An example is  (explicit) scripts to solve electric and magnetic fields under 
> power transmission lines. The scripts are compact and take advantage of the 
> use of complex numbers for electrical as well as positional factors and 
> geometric means -- there is no looping that would have to be explicitly  
> built  as would be the case in most languages.  Explicit loops have their 
> place and usefulness and  this is recognized in J.
> 
> The difference between J and most other languages is that J eliminates  the 
> housekeeping that the idiot box can do -so that the*problem rather than the 
> housekeeping is dominant*. It is true that compiled C++ lies behind many of 
> the operations - but J is beyond C++ as much as C++ is beyond assembly 
> language for programming.
> 
> Don Kelly
> 
> 
> On 2017-11-28 12:59 PM, Andrew Dabrowski wrote:
>> As much as I've complained about J in these forums I've been having a good 
>> time translating some simple code into J.  Someone gave me wise advice, to 
>> stick with explicit definitions until I know the language well, which advice 
>> I have cordially ignored because I'm having too much fun playing code golf 
>> with tacit tangles.
>> 
>> I was fascinated by J because it seemed to try to build on aspects of the 
>> human linguistic system.  Natural language unfolds in one dimension, time, 
>> so everything relevant to understanding a particular word in a sentence 
>> either came before it or is yet to come.  J seemed to emulate this by having 
>> verbs which relate directly only to objects on the immediate left and 
>> immediate right.  Moreover J seemed to be following a linguistic paradigm in 
>> have nouns which are inert, verbs that act on nouns, and adverbs which 
>> modify objects.  This seemed like a promising way to exploit humans' natural 
>> linguistic capabilities.
>> 
>> But maybe that's not way the J community currently sees J.  Do you love J 
>> most because of (pick only one)
>> 
>> 1. the NL inspired syntax;
>> 
>> 2. the suite of array utilities;
>> 
>> 3. the concision of J code;
>> 
>> 4. its being open-source; or
>> 
>> 5. _____________________?
>> 
>> I've come to feel that all programming languages are ugly compromises that 
>> are about equally good/bad at solving practical problems, and the "best" 
>> language is just the one you know the best.  I used to be contemptuous of 
>> Perl, but after having learned it well enough for my purposes I now kind of 
>> enjoy the brain teaser quality of trying to fit problems into its 
>> procrustean bed (although I still think it's a silly language).  I have no 
>> doubt that I could live happily with J as my primary language, but only 
>> after an extended period of being handcuffed to it and forced to assimilate 
>> its quirks.  I don't know that I'll have the patience for that.
>> 
>> Is there any project in the J repos that demonstrates the strength of J, as 
>> opposed to just showing that it's at least as good as other languages?  Any 
>> project that would have been significantly harder to complete with say 
>> Python?  Does J have any killer advantage, even in just one aspect of 
>> programming?  Or does J just appeal to you the way pistachio ice-cream 
>> might, it just tickles your palate in a no-accounting-for-taste way?  That's 
>> how it appeals to me.
>> 
>> I was hoping someone could talk me into studying J seriously, but now it 
>> looks to me like a language which, with APL, has had enormous beneficial 
>> influence on many other languages, but which has failed to learn in its turn 
>> from them.  J seems a tad solipsistic.
>> 
>> 
>> ----------------------------------------------------------------------
>> 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

Reply via email to