I agree there are some J solutions on RC that could be viewed as (or are)
rather incomprehensible. I'm not sure there is a single consensus of what
makes a great RC contribution though. Some argue that it should be the most
natural solution for the language, others the most concise or the fastest.
Others suggest the most elegant - although what is most elegant to a J pro
vs J novice might be quite different.

The example you've given (when taken in it's entirety
<http://rosettacode.org/wiki/Pythagorean_triples#J> rather than just that
excerpt, gives a few options for coding the solution in J. The first should
be relatively unscary to non-Jers. The solution you've posted is actually
not that complex from the perspective of someone who knows J. I suspect it
was coded naturally as the author thought about the problem - arguably this
might be a desirable RC contribution for a language.

If there are some contributions you are interested in knowing more about or
think could be improved, I encourage you to leave a comment to that effect.

Here are a couple I quite like though not sure others might think of them
as elegant:
http://rosettacode.org/wiki/Barnsley_fern#J
http://rosettacode.org/wiki/2048#J

On Thu, Nov 30, 2017 at 4:46 PM, Dabrowski, Andrew John <
[email protected]> wrote:

> Yes, after reading my own description of my fascination with tacit I
> thought I sounded like a prick, so I'm trying to use explicit more, and it
> is nice: still concise, but easier to parse.
>
> One thing that irks me is the J solutions posted on Rosetta Code.  Here's
> the one for Pythagorean triples.
>
> trips=:3 :0
>   'm n'=. |:(#~ 1 = 2 | +/"1)(#~ >/"1) ,/ ,"0/~ }. i. <. %: y
>   prim=. (#~ 1 = 2 +./@{. |:) (#~ y >: +/"1)m (-&*: ,. +:@* ,. +&*:) n
>   /:~ ; <@(,.~ # {. 1:)@(*/~ 1 + y i.@<.@% +/)"1 prim
> )
>
>
>
> Impressive, but isn't Rosetta Code a place more for showing off how
> elegant your language can be, rather than how incomprehensible?
>
>
> On 11/28/2017 11:45 PM, Rob Hodgkinson wrote:
>
> Further on this comment Andrew, don’t get bogged down in the topic of
> tacit, you can get a lot of benefit form using J in native or explicit form
> and leave tacit for later.
>
> I have been programming in array languages for many years and also confess
> to being mesmerised by some of the tacit expressions which I do not find
> immediately readable at all, especially when peppered with ASCII like
> punctuation.
>
> Dissect certainly helps, but coding tacit for tacit’s sake is not
> something I get hung up about, you can derive huge benefit without it, but
> it can be nice to use when it becomes more familiar to you, as people show
> here when they create a group of small compact verb trains (or phrases)
> which together make a compact solution.
>
> Rob Hodgkinson
>
>
>
> On 29 Nov 2017, at 8:38 am, Andrew Dabrowski <[email protected]
> ><mailto:[email protected]> wrote:
>
>
>
> As a beginner I find it impossible to parse a moderately sized tacit
> expression.  No doubt one gets better at this, but like all computer
> languages, the one dimensional space it lives in seems to confound any
> attempts to represent mathematical ideas directly.
>
>
>
> A computer language based on mathematical notation sounds like a cool but
> impractical idea.  It would to have to be 2 dimensional, as in fact math
> notation is.
>
>
>
> ----------------------------------------------------------------------
> 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