Learning J language - initial thoughts

classic Classic list List threaded Threaded
47 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Learning J language - initial thoughts

Greg Borota
I am currently learning J. I think I am beyond a critical point, where
I can no longer see myself giving up on this endeavour, as there is much to
lose professionally otherwise.

Some initial thoughts:

1) Even though I spent most of my time in C land, I would recommend Roger
Stokes' "Learning J" after the Eric Iverson' "J Primer". It felt to me like
J for C starts gently and then all of the sudden you are plunged deep into
advanced stuff without much preparation. While "Learning J" follows more
the spirit of the Primer where new concepts are added more gently. I plan
on going back to J for C after I read the Primer and LJ one more time.

2) Roger Stokes has a new version of LJ here: http://www.rogerstokes
.free-online.co.uk/book.htm Shouldn't J site use that instead?

3) I am not the first to mention this. I wish there was a minimal J
language core documented/available. I see veterans on this forum saying
things like: "I almost never use some of those verbs". Is there not a
minimal J language core targeting general language use? For example,
leaving out specifics like numerical analysis, statistics, etc. This
might help some not drop by the way side. E.g. http://xprogramming
.com/category/j-language/

4) Whenever it felt like dropping, browsing through papers like "Notation
as a tool of thought" or "Language as an intellectual tool: From
hieroglyphics to APL" helped boost my motivation to stay the course. Maybe
creating a "Why learn J" section on J site where this kind of papers,
articles, etc. are referenced would help many.

5) English is not my native language. With the Internet, anything posted
online in English has automatically a global audience. Maybe keeping that
in mind and going easier on un-common/literary English words would help J
adoption some more? It's a pity APL language family are not
more mainstream. I think our profession has much to lose because of the
current state of things.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Raul Miller-4
On Fri, Mar 15, 2013 at 11:27 AM, Greg Borota <[hidden email]> wrote:
> 3) I am not the first to mention this. I wish there was a minimal J
> language core documented/available. I see veterans on this forum saying
> things like: "I almost never use some of those verbs". Is there not a
> minimal J language core targeting general language use? For example,
> leaving out specifics like numerical analysis, statistics, etc. This
> might help some not drop by the way side. E.g. http://xprogramming
> .com/category/j-language/

In my experience, we typically focus on a small subset of J's
vocabulary, but the subset we use depends on our application, and how
we approach our problems.

In other words, I think that there's a good variety of "minimal Js"
each probably with its own audience and context.

For example, many programming language have a if/then construct.  J
provides these keywords, but it's worth noticing that the pattern here
is a data driven operation where we choose between executing some bit
of code "0 times or 1 time".  Meanwhile, J's * is a "times operator".
So in some contexts 0 * n or 1 * n can be used to achieve the same
end.  (J offers a few other options, also.)  It's rare for any program
to need more than one or two of these mechanisms.  (I choose this
example because there's almost nothing about the description that's
specific to J, but many other languages have enough distracting issues
that you might not have noticed the pattern.)

> 4) Whenever it felt like dropping, browsing through papers like "Notation
> as a tool of thought" or "Language as an intellectual tool: From
> hieroglyphics to APL" helped boost my motivation to stay the course. Maybe
> creating a "Why learn J" section on J site where this kind of papers,
> articles, etc. are referenced would help many.

Do you feel motivated to help write such a thing?

> 5) English is not my native language. With the Internet, anything posted
> online in English has automatically a global audience. Maybe keeping that
> in mind and going easier on un-common/literary English words would help J
> adoption some more? It's a pity APL language family are not
> more mainstream. I think our profession has much to lose because of the
> current state of things.

If you have the energy to detail problem cases you recognize in the
introductory or reference works, maybe we can think of better ways to
present the important ideas?

Thanks,

--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

DevonMcC
In reply to this post by Greg Borota
Greg -

thank you for your feedback - this is very valuable to those of us who have
forgotten the problems we faced when first learning J.

Your ideas for some simple introductory materials are good - I'll bring
this up at a meeting of NYCJUG and look at what parts of this I can
contribute.  We do have a regular "Beginner's Regatta" section of our
meetings where we attempt to provide simple examples of using J - you might
try searching for this term on the J wiki to see if you find anything
helpful there.

(An aside on the word "regatta" - we chose this name with the idea that a
regatta is a kind of parade of different kinds of boats but I see from
Wikipedia that the meaning is more about a series of boat races, often
accompanied by social events (like a parade).  It was this parade idea we
meant to emphasize, though we sometimes show timings of various ways of
doing things in J, so the "racing" metaphor also works.)

Regards,

Devon


On Fri, Mar 15, 2013 at 11:27 AM, Greg Borota <[hidden email]> wrote:

> I am currently learning J. I think I am beyond a critical point, where
> I can no longer see myself giving up on this endeavour, as there is much to
> lose professionally otherwise.
>
> Some initial thoughts:
>
> 1) Even though I spent most of my time in C land, I would recommend Roger
> Stokes' "Learning J" after the Eric Iverson' "J Primer". It felt to me like
> J for C starts gently and then all of the sudden you are plunged deep into
> advanced stuff without much preparation. While "Learning J" follows more
> the spirit of the Primer where new concepts are added more gently. I plan
> on going back to J for C after I read the Primer and LJ one more time.
>
> 2) Roger Stokes has a new version of LJ here: http://www.rogerstokes
> .free-online.co.uk/book.htm Shouldn't J site use that instead?
>
> 3) I am not the first to mention this. I wish there was a minimal J
> language core documented/available. I see veterans on this forum saying
> things like: "I almost never use some of those verbs". Is there not a
> minimal J language core targeting general language use? For example,
> leaving out specifics like numerical analysis, statistics, etc. This
> might help some not drop by the way side. E.g. http://xprogramming
> .com/category/j-language/
>
> 4) Whenever it felt like dropping, browsing through papers like "Notation
> as a tool of thought" or "Language as an intellectual tool: From
> hieroglyphics to APL" helped boost my motivation to stay the course. Maybe
> creating a "Why learn J" section on J site where this kind of papers,
> articles, etc. are referenced would help many.
>
> 5) English is not my native language. With the Internet, anything posted
> online in English has automatically a global audience. Maybe keeping that
> in mind and going easier on un-common/literary English words would help J
> adoption some more? It's a pity APL language family are not
> more mainstream. I think our profession has much to lose because of the
> current state of things.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



--
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Greg Borota
In reply to this post by Raul Miller-4
3) I am thinking Arthur Whitney's K might help to some extend define a more
reduced J core. J Dictionary does defines a J core, but maybe things could
be reduced some more to get one going quicker. See
http://kparc.com/document/k.txt

4) I am willing to, but a bit later.

5) I'll note those cases and bring to our attention.



> > 3) I am not the first to mention this. I wish there was a minimal J
> > language core documented/available. I see veterans on this forum saying
> > things like: "I almost never use some of those verbs". Is there not a
> > minimal J language core targeting general language use? For example,
> > leaving out specifics like numerical analysis, statistics, etc. This
> > might help some not drop by the way side. E.g. http://xprogramming
> > .com/category/j-language/
>
> In my experience, we typically focus on a small subset of J's
> vocabulary, but the subset we use depends on our application, and how
> we approach our problems.
>
> In other words, I think that there's a good variety of "minimal Js"
> each probably with its own audience and context.
>
> For example, many programming language have a if/then construct.  J
> provides these keywords, but it's worth noticing that the pattern here
> is a data driven operation where we choose between executing some bit
> of code "0 times or 1 time".  Meanwhile, J's * is a "times operator".
> So in some contexts 0 * n or 1 * n can be used to achieve the same
> end.  (J offers a few other options, also.)  It's rare for any program
> to need more than one or two of these mechanisms.  (I choose this
> example because there's almost nothing about the description that's
> specific to J, but many other languages have enough distracting issues
> that you might not have noticed the pattern.)
>
> > 4) Whenever it felt like dropping, browsing through papers like "Notation
> > as a tool of thought" or "Language as an intellectual tool: From
> > hieroglyphics to APL" helped boost my motivation to stay the course.
> Maybe
> > creating a "Why learn J" section on J site where this kind of papers,
> > articles, etc. are referenced would help many.
>
> Do you feel motivated to help write such a thing?
>
> > 5) English is not my native language. With the Internet, anything posted
> > online in English has automatically a global audience. Maybe keeping that
> > in mind and going easier on un-common/literary English words would help J
> > adoption some more? It's a pity APL language family are not
> > more mainstream. I think our profession has much to lose because of the
> > current state of things.
>
> If you have the energy to detail problem cases you recognize in the
> introductory or reference works, maybe we can think of better ways to
> present the important ideas?
>
> Thanks,
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Greg Borota
In reply to this post by DevonMcC
Thank you Devon for letting me know about "Beginner's Regatta".
I was on the lookout for something like that.


On Fri, Mar 15, 2013 at 11:14 AM, Devon McCormick <[hidden email]>wrote:

> Greg -
>
> thank you for your feedback - this is very valuable to those of us who have
> forgotten the problems we faced when first learning J.
>
> Your ideas for some simple introductory materials are good - I'll bring
> this up at a meeting of NYCJUG and look at what parts of this I can
> contribute.  We do have a regular "Beginner's Regatta" section of our
> meetings where we attempt to provide simple examples of using J - you might
> try searching for this term on the J wiki to see if you find anything
> helpful there.
>
> (An aside on the word "regatta" - we chose this name with the idea that a
> regatta is a kind of parade of different kinds of boats but I see from
> Wikipedia that the meaning is more about a series of boat races, often
> accompanied by social events (like a parade).  It was this parade idea we
> meant to emphasize, though we sometimes show timings of various ways of
> doing things in J, so the "racing" metaphor also works.)
>
> Regards,
>
> Devon
>
>
> On Fri, Mar 15, 2013 at 11:27 AM, Greg Borota <[hidden email]> wrote:
>
> > I am currently learning J. I think I am beyond a critical point, where
> > I can no longer see myself giving up on this endeavour, as there is much
> to
> > lose professionally otherwise.
> >
> > Some initial thoughts:
> >
> > 1) Even though I spent most of my time in C land, I would recommend Roger
> > Stokes' "Learning J" after the Eric Iverson' "J Primer". It felt to me
> like
> > J for C starts gently and then all of the sudden you are plunged deep
> into
> > advanced stuff without much preparation. While "Learning J" follows more
> > the spirit of the Primer where new concepts are added more gently. I plan
> > on going back to J for C after I read the Primer and LJ one more time.
> >
> > 2) Roger Stokes has a new version of LJ here: http://www.rogerstokes
> > .free-online.co.uk/book.htm Shouldn't J site use that instead?
> >
> > 3) I am not the first to mention this. I wish there was a minimal J
> > language core documented/available. I see veterans on this forum saying
> > things like: "I almost never use some of those verbs". Is there not a
> > minimal J language core targeting general language use? For example,
> > leaving out specifics like numerical analysis, statistics, etc. This
> > might help some not drop by the way side. E.g. http://xprogramming
> > .com/category/j-language/
> >
> > 4) Whenever it felt like dropping, browsing through papers like "Notation
> > as a tool of thought" or "Language as an intellectual tool: From
> > hieroglyphics to APL" helped boost my motivation to stay the course.
> Maybe
> > creating a "Why learn J" section on J site where this kind of papers,
> > articles, etc. are referenced would help many.
> >
> > 5) English is not my native language. With the Internet, anything posted
> > online in English has automatically a global audience. Maybe keeping that
> > in mind and going easier on un-common/literary English words would help J
> > adoption some more? It's a pity APL language family are not
> > more mainstream. I think our profession has much to lose because of the
> > current state of things.
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
>
>
>
> --
> Devon McCormick, CFA
> ^me^ at acm.
> org is my
> preferred e-mail
> ----------------------------------------------------------------------
> 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 | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Raul Miller-4
In reply to this post by Greg Borota
On Fri, Mar 15, 2013 at 12:22 PM, Greg Borota <[hidden email]> wrote:
> 3) I am thinking Arthur Whitney's K might help to some extend define a more
> reduced J core. J Dictionary does defines a J core, but maybe things could
> be reduced some more to get one going quicker. See
> http://kparc.com/document/k.txt

That's an interesting idea, but would take some serious thought.

K is a great environment, but some of the decisions are dubious.

For example, why does K use & for and instead of *?

In the context of J, we are concerned about identity operations (or,
more generally: concepts of groups and semigroups, including monoids),
and:

   >./''
__
   */''
1
   *./''
1

Note also that J's *&.-. is a linear (Bayesian) implementation of
logical OR.  Does that make it worth including in "minimal J"?

Anyways... thought needed...

Thanks,

--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
km
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

km
In reply to this post by Greg Borota
Here's a shot at specifying a J core by deleting things from the Vocabulary page.

--Kip Murray

>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary

Vocabulary  ( Constants   Controls   Foreigns   Parts of Speech )  

=  • Equal =. Is (Local) =: Is (Global)
< Box • Less Than <. Floor • Lesser Of (Min) <: Decrement • Less Or Equal
> Open • Larger Than >. Ceiling • Larger of (Max) >: Increment • Larger Or Equal
_ Negative Sign / Infinity _. Indeterminate _: Infinity
 
+ Conjugate • Plus +. Real / Imaginary • GCD (Or) +: Double • Not-Or
* Signum • Times *. Length/Angle • LCM (And) *: Square • Not-And
- Negate • Minus -. Not • Less -: Halve • Match
% Reciprocal • Divide
%: Square Root • Root
 
^ Exponential • Power ^. Natural Log • Logarithm ^: Power (u^:n u^:v)
$ Shape Of • Shape
$: Self-Reference
~ Reflex • Passive / Evoke ~. Nub • ~: Nub Sieve • Not-Equal
| Magnitude • Residue |. Reverse • Rotate (Shift)
 



: Explicit / Monad-Dyad
:: Adverse
, Ravel • Append ,. Ravel Items • Stitch ,: Itemize • Laminate
; Raze • Link
;: Words
 
# Tally • Copy

! Factorial
!: Foreign
/ Insert • Table
/:  • Sort
\ Prefix
\:  • Sort
 
[ Same • Left [: Cap
] Same • Right
{  • From {. Head • Take {: Tail •  
}  • Amend (m} u}) }. Behead • Drop }: Curtail •
 
" Rank (m"n u"n) ". Do • ": Default Format • Format

 
@ Atop @. Agenda @: At
& Bond / Compose &. &.: Under (Dual) &: Appose
? Roll • Deal ?. Roll • Deal (fixed seed)
 
a. Alphabet a: Ace (Boxed Empty)
b. Boolean / Basic



e.  • Member (In)
E. • Member of Interval

 
i. Integers • Index Of i: Steps • Index Of Last I. Indices • Interval Index
j. Imaginary • Complex


NB. Comment



 
 











>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary

Sent from my iPad


On Mar 15, 2013, at 10:27 AM, Greg Borota <[hidden email]> wrote:
>
> 3) I am not the first to mention this. I wish there was a minimal J
> language core documented/available. I see veterans on this forum saying
> things like: "I almost never use some of those verbs". Is there not a
> minimal J language core targeting general language use? For example,
> leaving out specifics like numerical analysis, statistics, etc. This
> might help some not drop by the way side. E.g. http://xprogramming
> .com/category/j-language/
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Greg Borota
In reply to this post by Raul Miller-4
I am too much of a beginner in APL world to have an authoritative say. But
my feeling is that some of the K quirks are driven more by actual
implementation/optimization constraints than academic thought. Also K keeps
more of the C feel (and Lisp to a lesser extent). Arthur is an incredibly
gifted C programmer as well.


On Fri, Mar 15, 2013 at 12:39 PM, Raul Miller <[hidden email]> wrote:

> On Fri, Mar 15, 2013 at 12:22 PM, Greg Borota <[hidden email]> wrote:
> > 3) I am thinking Arthur Whitney's K might help to some extend define a
> more
> > reduced J core. J Dictionary does defines a J core, but maybe things
> could
> > be reduced some more to get one going quicker. See
> > http://kparc.com/document/k.txt
>
> That's an interesting idea, but would take some serious thought.
>
> K is a great environment, but some of the decisions are dubious.
>
> For example, why does K use & for and instead of *?
>
> In the context of J, we are concerned about identity operations (or,
> more generally: concepts of groups and semigroups, including monoids),
> and:
>
>    >./''
> __
>    */''
> 1
>    *./''
> 1
>
> Note also that J's *&.-. is a linear (Bayesian) implementation of
> logical OR.  Does that make it worth including in "minimal J"?
>
> Anyways... thought needed...
>
> Thanks,
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Raul Miller-4
In reply to this post by km
On Fri, Mar 15, 2013 at 1:43 PM, km <[hidden email]> wrote:
> Here's a shot at specifying a J core by deleting things from the Vocabulary page.

Here are some of my opinions:

> =  • Equal      =. Is (Local)   =: Is (Global)
> < Box • Less Than       <. Floor • Lesser Of (Min)      <: Decrement • Less Or Equal
>> Open • Larger Than    >. Ceiling • Larger of (Max)    >: Increment • Larger Or Equal

Core J does not need decrement, nor increment - you can use -&1 or +&1

> _ Negative Sign / Infinity      _. Indeterminate        _: Infinity

Core J does not need indeterminate, nor should it need constant
functions.  You can use constant"_ for example.

> + Conjugate • Plus      +. Real / Imaginary • GCD (Or)  +: Double • Not-Or

Core J should probably ignore complex numbers (this also discards some
later verbs).  They are useful but not that useful.  Double and Not-Or
can also be ignored.  I'd also discard boolean operations.

> * Signum • Times        *. Length/Angle • LCM (And)     *: Square • Not-And

The only core element on this line is, I think: Times

> - Negate • Minus        -. Not • Less   -: Halve • Match

I'd ignore Halve.

> % Reciprocal • Divide
> %: Square Root • Root

I'd ignore %:

> ^ Exponential • Power   ^. Natural Log • Logarithm      ^: Power (u^:n u^:v)
> $ Shape Of • Shape
> $: Self-Reference

I'd ignore ^. and $:

> ~ Reflex • Passive / Evoke      ~. Nub •        ~: Nub Sieve • Not-Equal

I'd ignore nub sieve and evoke.

> | Magnitude • Residue   |. Reverse • Rotate (Shift)
...
> : Explicit / Monad-Dyad
> :: Adverse

I'd ignore Adverse (it's rarely used, and for good reason)

> , Ravel • Append        ,. Ravel Items • Stitch ,: Itemize • Laminate
> ; Raze • Link
> ;: Words
>
> # Tally • Copy
>
> ! Factorial
> !: Foreign
> / Insert • Table
> /:  • Sort
> \ Prefix
> \:  • Sort
>
> [ Same • Left           [: Cap
> ] Same • Right
> {  • From       {. Head • Take  {: Tail •
> }  • Amend (m} u})      }. Behead • Drop        }: Curtail •
>
> " Rank (m"n u"n)        ". Do •         ": Default Format • Format
>
>
> @ Atop  @. Agenda       @: At
> & Bond / Compose        &. &.: Under (Dual)     &: Appose

I'd ignore &.: and @: and &: - they are convenient but unnecessary.
Similarly, I'd ignore {: and }: - we are trying to give the beginner a
simpler to learn vocabulary.

u@v is equivalent to u@(v"_) for example.

> ? Roll • Deal   ?. Roll • Deal (fixed seed)

I'd ignore ?.

> a. Alphabet     a: Ace (Boxed Empty)
> b. Boolean / Basic

I'd ignore b.

> e.  • Member (In)
> E. • Member of Interval
>
> i. Integers • Index Of  i: Steps • Index Of Last        I. Indices • Interval Index
> j. Imaginary • Complex

I'd ignore i: and j.

> NB. Comment

I'd also be hard pressed to find an application which used all of
these, which was suitable as an illustration for beginners.

That said, rather than trying to define a comprehensive "core
vocabulary" I'd be interested in a concept like "J material for
beginners should begin with a vocabulary pertinent to that essay".

FYI,

--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Raul Miller-4
In reply to this post by Greg Borota
Yes.  Arthur is definitely a better C programmer than I am, and he has
also been focussing on the specific needs of his audience (wall
street).

But that focus was my point.

--
Raul

On Fri, Mar 15, 2013 at 2:02 PM, Greg Borota <[hidden email]> wrote:

> I am too much of a beginner in APL world to have an authoritative say. But
> my feeling is that some of the K quirks are driven more by actual
> implementation/optimization constraints than academic thought. Also K keeps
> more of the C feel (and Lisp to a lesser extent). Arthur is an incredibly
> gifted C programmer as well.
>
>
> On Fri, Mar 15, 2013 at 12:39 PM, Raul Miller <[hidden email]> wrote:
>
>> On Fri, Mar 15, 2013 at 12:22 PM, Greg Borota <[hidden email]> wrote:
>> > 3) I am thinking Arthur Whitney's K might help to some extend define a
>> more
>> > reduced J core. J Dictionary does defines a J core, but maybe things
>> could
>> > be reduced some more to get one going quicker. See
>> > http://kparc.com/document/k.txt
>>
>> That's an interesting idea, but would take some serious thought.
>>
>> K is a great environment, but some of the decisions are dubious.
>>
>> For example, why does K use & for and instead of *?
>>
>> In the context of J, we are concerned about identity operations (or,
>> more generally: concepts of groups and semigroups, including monoids),
>> and:
>>
>>    >./''
>> __
>>    */''
>> 1
>>    *./''
>> 1
>>
>> Note also that J's *&.-. is a linear (Bayesian) implementation of
>> logical OR.  Does that make it worth including in "minimal J"?
>>
>> Anyways... thought needed...
>>
>> Thanks,
>>
>> --
>> 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
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Greg Borota
In reply to this post by Raul Miller-4
As little as I know of J, I see in your list some of the same verbs I would
have also trimmed down from a beginners tutorial.
Core J is probably not the best way of putting it.

But I am quite sure a begginer's trimmed down version of J would be very
useful. One of Ron Jeffries complains was the miriad of verbs one has to
master before being able to start solving computing problems in J. I am
inclined to believe that need not be so, we just need to have a beginner's
kernel. Allow beginners to have the aha moment sooner, otherwise we might
lose them on the way.


On Fri, Mar 15, 2013 at 1:03 PM, Raul Miller <[hidden email]> wrote:

> On Fri, Mar 15, 2013 at 1:43 PM, km <[hidden email]> wrote:
> > Here's a shot at specifying a J core by deleting things from the
> Vocabulary page.
>
> Here are some of my opinions:
>
> > =  • Equal      =. Is (Local)   =: Is (Global)
> > < Box • Less Than       <. Floor • Lesser Of (Min)      <: Decrement •
> Less Or Equal
> >> Open • Larger Than    >. Ceiling • Larger of (Max)    >: Increment •
> Larger Or Equal
>
> Core J does not need decrement, nor increment - you can use -&1 or +&1
>
> > _ Negative Sign / Infinity      _. Indeterminate        _: Infinity
>
> Core J does not need indeterminate, nor should it need constant
> functions.  You can use constant"_ for example.
>
> > + Conjugate • Plus      +. Real / Imaginary • GCD (Or)  +: Double •
> Not-Or
>
> Core J should probably ignore complex numbers (this also discards some
> later verbs).  They are useful but not that useful.  Double and Not-Or
> can also be ignored.  I'd also discard boolean operations.
>
> > * Signum • Times        *. Length/Angle • LCM (And)     *: Square •
> Not-And
>
> The only core element on this line is, I think: Times
>
> > - Negate • Minus        -. Not • Less   -: Halve • Match
>
> I'd ignore Halve.
>
> > % Reciprocal • Divide
> > %: Square Root • Root
>
> I'd ignore %:
>
> > ^ Exponential • Power   ^. Natural Log • Logarithm      ^: Power (u^:n
> u^:v)
> > $ Shape Of • Shape
> > $: Self-Reference
>
> I'd ignore ^. and $:
>
> > ~ Reflex • Passive / Evoke      ~. Nub •        ~: Nub Sieve • Not-Equal
>
> I'd ignore nub sieve and evoke.
>
> > | Magnitude • Residue   |. Reverse • Rotate (Shift)
> ...
> > : Explicit / Monad-Dyad
> > :: Adverse
>
> I'd ignore Adverse (it's rarely used, and for good reason)
>
> > , Ravel • Append        ,. Ravel Items • Stitch ,: Itemize • Laminate
> > ; Raze • Link
> > ;: Words
> >
> > # Tally • Copy
> >
> > ! Factorial
> > !: Foreign
> > / Insert • Table
> > /:  • Sort
> > \ Prefix
> > \:  • Sort
> >
> > [ Same • Left           [: Cap
> > ] Same • Right
> > {  • From       {. Head • Take  {: Tail •
> > }  • Amend (m} u})      }. Behead • Drop        }: Curtail •
> >
> > " Rank (m"n u"n)        ". Do •         ": Default Format • Format
> >
> >
> > @ Atop  @. Agenda       @: At
> > & Bond / Compose        &. &.: Under (Dual)     &: Appose
>
> I'd ignore &.: and @: and &: - they are convenient but unnecessary.
> Similarly, I'd ignore {: and }: - we are trying to give the beginner a
> simpler to learn vocabulary.
>
> u@v is equivalent to u@(v"_) for example.
>
> > ? Roll • Deal   ?. Roll • Deal (fixed seed)
>
> I'd ignore ?.
>
> > a. Alphabet     a: Ace (Boxed Empty)
> > b. Boolean / Basic
>
> I'd ignore b.
>
> > e.  • Member (In)
> > E. • Member of Interval
> >
> > i. Integers • Index Of  i: Steps • Index Of Last        I. Indices •
> Interval Index
> > j. Imaginary • Complex
>
> I'd ignore i: and j.
>
> > NB. Comment
>
> I'd also be hard pressed to find an application which used all of
> these, which was suitable as an illustration for beginners.
>
> That said, rather than trying to define a comprehensive "core
> vocabulary" I'd be interested in a concept like "J material for
> beginners should begin with a vocabulary pertinent to that essay".
>
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Greg Borota
In reply to this post by Raul Miller-4
Could we call it J kernel then? Personally I like the name and it would
also not conflict with J core as defined by the Dictionary.


On Fri, Mar 15, 2013 at 1:03 PM, Raul Miller <[hidden email]> wrote:

> On Fri, Mar 15, 2013 at 1:43 PM, km <[hidden email]> wrote:
> > Here's a shot at specifying a J core by deleting things from the
> Vocabulary page.
>
> Here are some of my opinions:
>
> > =  • Equal      =. Is (Local)   =: Is (Global)
> > < Box • Less Than       <. Floor • Lesser Of (Min)      <: Decrement •
> Less Or Equal
> >> Open • Larger Than    >. Ceiling • Larger of (Max)    >: Increment •
> Larger Or Equal
>
> Core J does not need decrement, nor increment - you can use -&1 or +&1
>
> > _ Negative Sign / Infinity      _. Indeterminate        _: Infinity
>
> Core J does not need indeterminate, nor should it need constant
> functions.  You can use constant"_ for example.
>
> > + Conjugate • Plus      +. Real / Imaginary • GCD (Or)  +: Double •
> Not-Or
>
> Core J should probably ignore complex numbers (this also discards some
> later verbs).  They are useful but not that useful.  Double and Not-Or
> can also be ignored.  I'd also discard boolean operations.
>
> > * Signum • Times        *. Length/Angle • LCM (And)     *: Square •
> Not-And
>
> The only core element on this line is, I think: Times
>
> > - Negate • Minus        -. Not • Less   -: Halve • Match
>
> I'd ignore Halve.
>
> > % Reciprocal • Divide
> > %: Square Root • Root
>
> I'd ignore %:
>
> > ^ Exponential • Power   ^. Natural Log • Logarithm      ^: Power (u^:n
> u^:v)
> > $ Shape Of • Shape
> > $: Self-Reference
>
> I'd ignore ^. and $:
>
> > ~ Reflex • Passive / Evoke      ~. Nub •        ~: Nub Sieve • Not-Equal
>
> I'd ignore nub sieve and evoke.
>
> > | Magnitude • Residue   |. Reverse • Rotate (Shift)
> ...
> > : Explicit / Monad-Dyad
> > :: Adverse
>
> I'd ignore Adverse (it's rarely used, and for good reason)
>
> > , Ravel • Append        ,. Ravel Items • Stitch ,: Itemize • Laminate
> > ; Raze • Link
> > ;: Words
> >
> > # Tally • Copy
> >
> > ! Factorial
> > !: Foreign
> > / Insert • Table
> > /:  • Sort
> > \ Prefix
> > \:  • Sort
> >
> > [ Same • Left           [: Cap
> > ] Same • Right
> > {  • From       {. Head • Take  {: Tail •
> > }  • Amend (m} u})      }. Behead • Drop        }: Curtail •
> >
> > " Rank (m"n u"n)        ". Do •         ": Default Format • Format
> >
> >
> > @ Atop  @. Agenda       @: At
> > & Bond / Compose        &. &.: Under (Dual)     &: Appose
>
> I'd ignore &.: and @: and &: - they are convenient but unnecessary.
> Similarly, I'd ignore {: and }: - we are trying to give the beginner a
> simpler to learn vocabulary.
>
> u@v is equivalent to u@(v"_) for example.
>
> > ? Roll • Deal   ?. Roll • Deal (fixed seed)
>
> I'd ignore ?.
>
> > a. Alphabet     a: Ace (Boxed Empty)
> > b. Boolean / Basic
>
> I'd ignore b.
>
> > e.  • Member (In)
> > E. • Member of Interval
> >
> > i. Integers • Index Of  i: Steps • Index Of Last        I. Indices •
> Interval Index
> > j. Imaginary • Complex
>
> I'd ignore i: and j.
>
> > NB. Comment
>
> I'd also be hard pressed to find an application which used all of
> these, which was suitable as an illustration for beginners.
>
> That said, rather than trying to define a comprehensive "core
> vocabulary" I'd be interested in a concept like "J material for
> beginners should begin with a vocabulary pertinent to that essay".
>
> 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
km
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

km
In reply to this post by Raul Miller-4
I'm delighted with your additional paring.

Loving complex numbers, I mention that you have accepted them if you have accepted Format!  You could still delete their utilities.

I would keep Square Root.

About the only reason I included _: was that its entry documents constant"_ .

Your closing comment is excellent.  Excellent!

--Kip

Sent from my iPad


On Mar 15, 2013, at 1:03 PM, Raul Miller <[hidden email]> wrote:

> On Fri, Mar 15, 2013 at 1:43 PM, km <[hidden email]> wrote:
>> Here's a shot at specifying a J core by deleting things from the Vocabulary page.
>
> Here are some of my opinions:
>
>> =  • Equal      =. Is (Local)   =: Is (Global)
>> < Box • Less Than       <. Floor • Lesser Of (Min)      <: Decrement • Less Or Equal
>>> Open • Larger Than    >. Ceiling • Larger of (Max)    >: Increment • Larger Or Equal
>
> Core J does not need decrement, nor increment - you can use -&1 or +&1
>
>> _ Negative Sign / Infinity      _. Indeterminate        _: Infinity
>
> Core J does not need indeterminate, nor should it need constant
> functions.  You can use constant"_ for example.
>
>> + Conjugate • Plus      +. Real / Imaginary • GCD (Or)  +: Double • Not-Or
>
> Core J should probably ignore complex numbers (this also discards some
> later verbs).  They are useful but not that useful.  Double and Not-Or
> can also be ignored.  I'd also discard boolean operations.
>
>> * Signum • Times        *. Length/Angle • LCM (And)     *: Square • Not-And
>
> The only core element on this line is, I think: Times
>
>> - Negate • Minus        -. Not • Less   -: Halve • Match
>
> I'd ignore Halve.
>
>> % Reciprocal • Divide
>> %: Square Root • Root
>
> I'd ignore %:
>
>> ^ Exponential • Power   ^. Natural Log • Logarithm      ^: Power (u^:n u^:v)
>> $ Shape Of • Shape
>> $: Self-Reference
>
> I'd ignore ^. and $:
>
>> ~ Reflex • Passive / Evoke      ~. Nub •        ~: Nub Sieve • Not-Equal
>
> I'd ignore nub sieve and evoke.
>
>> | Magnitude • Residue   |. Reverse • Rotate (Shift)
> ...
>> : Explicit / Monad-Dyad
>> :: Adverse
>
> I'd ignore Adverse (it's rarely used, and for good reason)
>
>> , Ravel • Append        ,. Ravel Items • Stitch ,: Itemize • Laminate
>> ; Raze • Link
>> ;: Words
>>
>> # Tally • Copy
>>
>> ! Factorial
>> !: Foreign
>> / Insert • Table
>> /:  • Sort
>> \ Prefix
>> \:  • Sort
>>
>> [ Same • Left           [: Cap
>> ] Same • Right
>> {  • From       {. Head • Take  {: Tail •
>> }  • Amend (m} u})      }. Behead • Drop        }: Curtail •
>>
>> " Rank (m"n u"n)        ". Do •         ": Default Format • Format
>>
>>
>> @ Atop  @. Agenda       @: At
>> & Bond / Compose        &. &.: Under (Dual)     &: Appose
>
> I'd ignore &.: and @: and &: - they are convenient but unnecessary.
> Similarly, I'd ignore {: and }: - we are trying to give the beginner a
> simpler to learn vocabulary.
>
> u@v is equivalent to u@(v"_) for example.
>
>> ? Roll • Deal   ?. Roll • Deal (fixed seed)
>
> I'd ignore ?.
>
>> a. Alphabet     a: Ace (Boxed Empty)
>> b. Boolean / Basic
>
> I'd ignore b.
>
>> e.  • Member (In)
>> E. • Member of Interval
>>
>> i. Integers • Index Of  i: Steps • Index Of Last        I. Indices • Interval Index
>> j. Imaginary • Complex
>
> I'd ignore i: and j.
>
>> NB. Comment
>
> I'd also be hard pressed to find an application which used all of
> these, which was suitable as an illustration for beginners.
>
> That said, rather than trying to define a comprehensive "core
> vocabulary" I'd be interested in a concept like "J material for
> beginners should begin with a vocabulary pertinent to that essay".
>
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Raul Miller-4
On Fri, Mar 15, 2013 at 3:49 PM, km <[hidden email]> wrote:
> I'm delighted with your additional paring.

Thank you.

> Loving complex numbers, I mention that you have accepted them if you have accepted Format!  You could still delete their utilities.

You can use format without complex numbers.  You can also use multiply
without complex numbers.  In both cases we are ignoring useful
functionality.  The point is not to be useful, the point is to
minimize the vocabulary a beginner needs to absorb.

> I would keep Square Root.

^&0.5 gives you square root.

I'd probably also eliminate foreigns from "core".  Foreigns are about
as peripheral as you can get.  The beginner should probably be told to
start with covers (fread, fwrite, ...).

Thanks,

--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Greg Borota
Indeed Raul, you nailed so well. There is a real need for that reduced
beginner "core".

Because that's how most developers pick-up new langauges these days. As you
start to become more at home with your new language, you add the rest
of which is there for very well thought reasons.

But too much might overwhelm a beginner, who is used to pick
"regular" "new" langagues in matter of just few days. Too much from the
beginning makes you feel like you'd never get there. But if you are able to
start solving your own computing problems sooner, you are motivated to keep
on going.
Thank you!


On Fri, Mar 15, 2013 at 3:26 PM, Raul Miller <[hidden email]> wrote:

> On Fri, Mar 15, 2013 at 3:49 PM, km <[hidden email]> wrote:
> > I'm delighted with your additional paring.
>
> Thank you.
>
> > Loving complex numbers, I mention that you have accepted them if you
> have accepted Format!  You could still delete their utilities.
>
> You can use format without complex numbers.  You can also use multiply
> without complex numbers.  In both cases we are ignoring useful
> functionality.  The point is not to be useful, the point is to
> minimize the vocabulary a beginner needs to absorb.
>
> > I would keep Square Root.
>
> ^&0.5 gives you square root.
>
> I'd probably also eliminate foreigns from "core".  Foreigns are about
> as peripheral as you can get.  The beginner should probably be told to
> start with covers (fread, fwrite, ...).
>
> Thanks,
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Ian Clark-8
In reply to this post by km
There used to be a range of (spoken) language CDs with names like
"Learn Swedish Now!"  "Learn Arabic Now!"
They were designed to a common format. One extremely useful feature
was a list of "The 100 most-used words in the language", ranked in
order of usage.

Inspired by this, I once extracted from my own scripts a list of J
primitives ranked by usage. But I've lost the results. I do recall
they surprised me.

This could be the basis for a coding challenge -- a rather easy one if
you use (;:) -- write a verb (or a script) which scans a folder of
scripts and builds a table of primitives ordered by usage. Then
perhaps we could all run it on our own "j-user" folders and compare
results :-)

BTW In the 1970s I was offered a tape for research: the 2741 keystroke
log of a busy IBM APL shop. In the space of a year, "Domino" (⌹ --
equivalent to %. in J) was keyed-in precisely twice. Once as a typo.
And once as a filler-char for a crude histogram.

...And Domino was touted at the time as the flagship feature of APL!


On Fri, Mar 15, 2013 at 5:43 PM, km <[hidden email]> wrote:

> Here's a shot at specifying a J core by deleting things from the Vocabulary page.
>
> --Kip Murray
>
>>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary
>
> Vocabulary  ( Constants   Controls   Foreigns   Parts of Speech )
>
> =  • Equal      =. Is (Local)   =: Is (Global)
> < Box • Less Than       <. Floor • Lesser Of (Min)      <: Decrement • Less Or Equal
>> Open • Larger Than    >. Ceiling • Larger of (Max)    >: Increment • Larger Or Equal
> _ Negative Sign / Infinity      _. Indeterminate        _: Infinity
>
> + Conjugate • Plus      +. Real / Imaginary • GCD (Or)  +: Double • Not-Or
> * Signum • Times        *. Length/Angle • LCM (And)     *: Square • Not-And
> - Negate • Minus        -. Not • Less   -: Halve • Match
> % Reciprocal • Divide
> %: Square Root • Root
>
> ^ Exponential • Power   ^. Natural Log • Logarithm      ^: Power (u^:n u^:v)
> $ Shape Of • Shape
> $: Self-Reference
> ~ Reflex • Passive / Evoke      ~. Nub •        ~: Nub Sieve • Not-Equal
> | Magnitude • Residue   |. Reverse • Rotate (Shift)
>
>
>
>
> : Explicit / Monad-Dyad
> :: Adverse
> , Ravel • Append        ,. Ravel Items • Stitch ,: Itemize • Laminate
> ; Raze • Link
> ;: Words
>
> # Tally • Copy
>
> ! Factorial
> !: Foreign
> / Insert • Table
> /:  • Sort
> \ Prefix
> \:  • Sort
>
> [ Same • Left           [: Cap
> ] Same • Right
> {  • From       {. Head • Take  {: Tail •
> }  • Amend (m} u})      }. Behead • Drop        }: Curtail •
>
> " Rank (m"n u"n)        ". Do •         ": Default Format • Format
>
>
> @ Atop  @. Agenda       @: At
> & Bond / Compose        &. &.: Under (Dual)     &: Appose
> ? Roll • Deal   ?. Roll • Deal (fixed seed)
>
> a. Alphabet     a: Ace (Boxed Empty)
> b. Boolean / Basic
>
>
>
> e.  • Member (In)
> E. • Member of Interval
>
>
> i. Integers • Index Of  i: Steps • Index Of Last        I. Indices • Interval Index
> j. Imaginary • Complex
>
>
> NB. Comment
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary
>
> Sent from my iPad
>
>
> On Mar 15, 2013, at 10:27 AM, Greg Borota <[hidden email]> wrote:
>>
>> 3) I am not the first to mention this. I wish there was a minimal J
>> language core documented/available. I see veterans on this forum saying
>> things like: "I almost never use some of those verbs". Is there not a
>> minimal J language core targeting general language use? For example,
>> leaving out specifics like numerical analysis, statistics, etc. This
>> might help some not drop by the way side. E.g. http://xprogramming
>> .com/category/j-language/
>>
> ----------------------------------------------------------------------
> 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 | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

John Baker-11
I've been following this thread with some interest. I am constantly learning programming languages and the best advice is to just wade in and tackle something you find interesting. It's a given that your first few projects will reflect your incomplete grasp of things.

One of the things I have always found a bit intimidating, and sometimes irritating about APL and derived languages, is that now matter how clever you find something within minutes of showing off your deep thought someone will pipe up with a deeper thought. I have come to view this as a great strength of this class of languages. We are finally seeing the same phenomena in LINQ and F#. Iverson was a good generation ahead of his time.

Just do it. It works well here.

Sent from my iPhone

On Mar 15, 2013, at 5:09 PM, Ian Clark <[hidden email]> wrote:

> There used to be a range of (spoken) language CDs with names like
> "Learn Swedish Now!"  "Learn Arabic Now!"
> They were designed to a common format. One extremely useful feature
> was a list of "The 100 most-used words in the language", ranked in
> order of usage.
>
> Inspired by this, I once extracted from my own scripts a list of J
> primitives ranked by usage. But I've lost the results. I do recall
> they surprised me.
>
> This could be the basis for a coding challenge -- a rather easy one if
> you use (;:) -- write a verb (or a script) which scans a folder of
> scripts and builds a table of primitives ordered by usage. Then
> perhaps we could all run it on our own "j-user" folders and compare
> results :-)
>
> BTW In the 1970s I was offered a tape for research: the 2741 keystroke
> log of a busy IBM APL shop. In the space of a year, "Domino" (⌹ --
> equivalent to %. in J) was keyed-in precisely twice. Once as a typo.
> And once as a filler-char for a crude histogram.
>
> ...And Domino was touted at the time as the flagship feature of APL!
>
>
> On Fri, Mar 15, 2013 at 5:43 PM, km <[hidden email]> wrote:
>> Here's a shot at specifying a J core by deleting things from the Vocabulary page.
>>
>> --Kip Murray
>>
>>>> <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary
>>
>> Vocabulary  ( Constants   Controls   Foreigns   Parts of Speech )
>>
>> =  • Equal      =. Is (Local)   =: Is (Global)
>> < Box • Less Than       <. Floor • Lesser Of (Min)      <: Decrement • Less Or Equal
>>> Open • Larger Than    >. Ceiling • Larger of (Max)    >: Increment • Larger Or Equal
>> _ Negative Sign / Infinity      _. Indeterminate        _: Infinity
>>
>> + Conjugate • Plus      +. Real / Imaginary • GCD (Or)  +: Double • Not-Or
>> * Signum • Times        *. Length/Angle • LCM (And)     *: Square • Not-And
>> - Negate • Minus        -. Not • Less   -: Halve • Match
>> % Reciprocal • Divide
>> %: Square Root • Root
>>
>> ^ Exponential • Power   ^. Natural Log • Logarithm      ^: Power (u^:n u^:v)
>> $ Shape Of • Shape
>> $: Self-Reference
>> ~ Reflex • Passive / Evoke      ~. Nub •        ~: Nub Sieve • Not-Equal
>> | Magnitude • Residue   |. Reverse • Rotate (Shift)
>>
>>
>>
>>
>> : Explicit / Monad-Dyad
>> :: Adverse
>> , Ravel • Append        ,. Ravel Items • Stitch ,: Itemize • Laminate
>> ; Raze • Link
>> ;: Words
>>
>> # Tally • Copy
>>
>> ! Factorial
>> !: Foreign
>> / Insert • Table
>> /:  • Sort
>> \ Prefix
>> \:  • Sort
>>
>> [ Same • Left           [: Cap
>> ] Same • Right
>> {  • From       {. Head • Take  {: Tail •
>> }  • Amend (m} u})      }. Behead • Drop        }: Curtail •
>>
>> " Rank (m"n u"n)        ". Do •         ": Default Format • Format
>>
>>
>> @ Atop  @. Agenda       @: At
>> & Bond / Compose        &. &.: Under (Dual)     &: Appose
>> ? Roll • Deal   ?. Roll • Deal (fixed seed)
>>
>> a. Alphabet     a: Ace (Boxed Empty)
>> b. Boolean / Basic
>>
>>
>>
>> e.  • Member (In)
>> E. • Member of Interval
>>
>>
>> i. Integers • Index Of  i: Steps • Index Of Last        I. Indices • Interval Index
>> j. Imaginary • Complex
>>
>>
>> NB. Comment
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>>> <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary
>>
>> Sent from my iPad
>>
>>
>> On Mar 15, 2013, at 10:27 AM, Greg Borota <[hidden email]> wrote:
>>>
>>> 3) I am not the first to mention this. I wish there was a minimal J
>>> language core documented/available. I see veterans on this forum saying
>>> things like: "I almost never use some of those verbs". Is there not a
>>> minimal J language core targeting general language use? For example,
>>> leaving out specifics like numerical analysis, statistics, etc. This
>>> might help some not drop by the way side. E.g. http://xprogramming
>>> .com/category/j-language/
>> ----------------------------------------------------------------------
>> 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
km
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

km
In reply to this post by Raul Miller-4

Here's the latest J core, using additional paring suggested by Raul.

I did keep }: because of puzzling things that happen if you use _1&{. instead (giving you a vector instead of a scalar).  And I took out GCD .

--Kip Murray

>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary

Vocabulary  ( Constants   Controls   Foreigns   Parts of Speech )  

=  • Equal =. Is (Local) =: Is (Global)
< Box • Less Than <. Floor • Lesser Of (Min) <:  • Less Or Equal
> Open • Larger Than >. Ceiling • Larger of (Max) >:  • Larger Or Equal
_ Negative Sign / Infinity

 
+  • Plus

*  • Times

- Negate • Minus -. Not • Less -:  • Match
% Reciprocal • Divide

 
^ Exponential • Power
^: Power (u^:n u^:v)
$ Shape Of • Shape

~ Reflex • Passive ~. Nub • ~:  • Not-Equal
| Magnitude • Residue |. Reverse • Rotate (Shift)
 



: Explicit / Monad-Dyad

, Ravel • Append ,. Ravel Items • Stitch ,: Itemize • Laminate
; Raze • Link
;: Words
 
# Tally • Copy

! Factorial

/ Insert • Table
/:  • Sort
\ Prefix
\:  • Sort
 
[ Same • Left [: Cap
] Same • Right
{  • From {. Head • Take {: Tail •  
}  • Amend (m} u}) }. Behead • Drop
 
" Rank (m"n u"n) ". Do • ": Default Format • Format

 
@ Atop @. Agenda
& Bond / Compose &. Under (Dual)
? Roll • Deal
 
a. Alphabet a: Ace (Boxed Empty)






e.  • Member (In)
E. • Member of Interval

 
i. Integers • Index Of
I. Indices • Interval Index




NB. Comment



 
 











>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary

Sent from my iPad


On Mar 15, 2013, at 10:27 AM, Greg Borota <[hidden email]> wrote:
>
> 3) I am not the first to mention this. I wish there was a minimal J
> language core documented/available. I see veterans on this forum saying
> things like: "I almost never use some of those verbs". Is there not a
> minimal J language core targeting general language use? For example,
> leaving out specifics like numerical analysis, statistics, etc. This
> might help some not drop by the way side. E.g. http://xprogramming
> .com/category/j-language/


On Mar 15, 2013, at 3:26 PM, Raul Miller <[hidden email]> wrote:

...
>
> I'd probably also eliminate foreigns from "core".  Foreigns are about
> as peripheral as you can get.  The beginner should probably be told to
> start with covers (fread, fwrite, ...).
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
Reply | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Marshall Lochbaum-2
I'll jump in here and point out that words vary massively in their
potential to confuse. You've taken out >: <: +: -: *: %: , but these
verbs are dead simple to remember (and, as a bonus, you can do all of
them at once), and often make reasoning with J a lot easier. I couldn't
teach J without using these because they are simple monadic verbs with
easy utility. +/&.:*: is a great way to teach how &.: works.
+/&.:(^&0.5) is not.

On the other hand there are the words--particularly conjunctions and
adverbs--that are very difficult to figure out. You've taken out most of
these, like /. and ;. . I think } and ,. also belong in this category. }
is, though merely awkward in theory, actually a patchwork of corner
cases. ,. and to a lesser extent ,: are difficult to get right, and I
think ,. is better taught as ,"_1 in both valences. These are the words
that really need to be taken out. Leave the technically useless but
simple and convenient words alone.

This list looks like it's tending towards an effort to gut as many words
as possible and make the language look small. I think a better approach
would be to organize words into a few groups--arithmetic, logic, lists,
compositions, and heavy mathematics--which contain a larger selection of
useful operations and stress the symmetry of these (why would you take
out any of {. {: }. }: when they are easy to teach in a group?). Words
that are truly confusing and take a long time to understand (H. ,
anyone?) would be left out.

Marshall

On Fri, Mar 15, 2013 at 08:15:29PM -0500, km wrote:

>
> Here's the latest J core, using additional paring suggested by Raul.
>
> I did keep }: because of puzzling things that happen if you use _1&{. instead (giving you a vector instead of a scalar).  And I took out GCD .
>
> --Kip Murray
>
> >>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary
>
> Vocabulary  ( Constants   Controls   Foreigns   Parts of Speech )  
>
> =  • Equal =. Is (Local) =: Is (Global)
> < Box • Less Than <. Floor • Lesser Of (Min) <:  • Less Or Equal
> > Open • Larger Than >. Ceiling • Larger of (Max) >:  • Larger Or Equal
> _ Negative Sign / Infinity
>
>  
> +  • Plus
>
> *  • Times
>
> - Negate • Minus -. Not • Less -:  • Match
> % Reciprocal • Divide
>
>  
> ^ Exponential • Power
> ^: Power (u^:n u^:v)
> $ Shape Of • Shape
>
> ~ Reflex • Passive ~. Nub • ~:  • Not-Equal
> | Magnitude • Residue |. Reverse • Rotate (Shift)
>  
>
>
>
> : Explicit / Monad-Dyad
>
> , Ravel • Append ,. Ravel Items • Stitch ,: Itemize • Laminate
> ; Raze • Link
> ;: Words
>  
> # Tally • Copy
>
> ! Factorial
>
> / Insert • Table
> /:  • Sort
> \ Prefix
> \:  • Sort
>  
> [ Same • Left [: Cap
> ] Same • Right
> {  • From {. Head • Take {: Tail •  
> }  • Amend (m} u}) }. Behead • Drop
>  
> " Rank (m"n u"n) ". Do • ": Default Format • Format
>
>  
> @ Atop @. Agenda
> & Bond / Compose &. Under (Dual)
> ? Roll • Deal
>  
> a. Alphabet a: Ace (Boxed Empty)
>
>
>
>
>
>
> e.  • Member (In)
> E. • Member of Interval
>
>  
> i. Integers • Index Of
> I. Indices • Interval Index
>
>
>
>
> NB. Comment
>
>
>
>  
>  
>
>
>
>
>
>
>
>
>
>
>
> >>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary
>
> Sent from my iPad
>
>
> On Mar 15, 2013, at 10:27 AM, Greg Borota <[hidden email]> wrote:
> >
> > 3) I am not the first to mention this. I wish there was a minimal J
> > language core documented/available. I see veterans on this forum saying
> > things like: "I almost never use some of those verbs". Is there not a
> > minimal J language core targeting general language use? For example,
> > leaving out specifics like numerical analysis, statistics, etc. This
> > might help some not drop by the way side. E.g. http://xprogramming
> > .com/category/j-language/
>
>
> On Mar 15, 2013, at 3:26 PM, Raul Miller <[hidden email]> wrote:
>
> ...
> >
> > I'd probably also eliminate foreigns from "core".  Foreigns are about
> > as peripheral as you can get.  The beginner should probably be told to
> > start with covers (fread, fwrite, ...).
> >
> ----------------------------------------------------------------------
> 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 | Threaded
Open this post in threaded view
|

Re: Learning J language - initial thoughts

Marshall Lochbaum-2
Here's a stab at this kind of organization, leaving out words for
specific areas of math. Of course these words can be organized in much
the same way.

BASICS
=. Is (Local) =: Is (Global)
_ Negative Sign / Infinity
: Explicit / Monad-Dyad
" Rank (m"n u"n m"v u"v)
NB. Comment
_9: to 9: and _: Constant Functions


ARITHMETIC
- Negate
% Reciprocal
                        >: Increment
                        <: Decrement
+ • Plus                +: Double
- • Minus               -: Halve
* • Times               *: Square
% • Divide              %: Square Root

<. Floor • Lesser Of (Min)
>. Ceiling • Larger of (Max)

^ Exponential • Power   ^. Natural Log • Logarithm


LOGIC
= • Equal               ~: • Not-Equal
< • Less Than           <: • Less Or Equal
> • Larger Than         >: • Larger Or Equal

+. • Or                 *. • And
-. Not


LISTS
$ Shape Of • Shape      # Tally • Copy
, Ravel • Append        ,: Itemize • Laminate

{ • From
{. Head • Take          {: Tail •
}. Behead • Drop        }: Curtail •

-: • Match
|. Reverse • Rotate (Shift)

/ Insert • Table

i. Integers • Index Of
e. Raze In • Member (In)

/:~ Sort Up             \:~ Sort Down
-. • Less
~. Nub


COMPOSITIONS
^: Power (If)
~ Reflex • Passive
@ Atop                  @: At
& Bond / Compose        &: Appose
&. Under                &.: Under
[ Same • Left           ] Same • Right


STRINGS
". Do                   ": Default Format
a. Alphabet


BOXES
< Box                   > Open
; Raze • Link
;: Words

Marshall

On Fri, Mar 15, 2013 at 11:00:41PM -0400, Marshall Lochbaum wrote:

> I'll jump in here and point out that words vary massively in their
> potential to confuse. You've taken out >: <: +: -: *: %: , but these
> verbs are dead simple to remember (and, as a bonus, you can do all of
> them at once), and often make reasoning with J a lot easier. I couldn't
> teach J without using these because they are simple monadic verbs with
> easy utility. +/&.:*: is a great way to teach how &.: works.
> +/&.:(^&0.5) is not.
>
> On the other hand there are the words--particularly conjunctions and
> adverbs--that are very difficult to figure out. You've taken out most of
> these, like /. and ;. . I think } and ,. also belong in this category. }
> is, though merely awkward in theory, actually a patchwork of corner
> cases. ,. and to a lesser extent ,: are difficult to get right, and I
> think ,. is better taught as ,"_1 in both valences. These are the words
> that really need to be taken out. Leave the technically useless but
> simple and convenient words alone.
>
> This list looks like it's tending towards an effort to gut as many words
> as possible and make the language look small. I think a better approach
> would be to organize words into a few groups--arithmetic, logic, lists,
> compositions, and heavy mathematics--which contain a larger selection of
> useful operations and stress the symmetry of these (why would you take
> out any of {. {: }. }: when they are easy to teach in a group?). Words
> that are truly confusing and take a long time to understand (H. ,
> anyone?) would be left out.
>
> Marshall
>
> On Fri, Mar 15, 2013 at 08:15:29PM -0500, km wrote:
> >
> > Here's the latest J core, using additional paring suggested by Raul.
> >
> > I did keep }: because of puzzling things that happen if you use _1&{. instead (giving you a vector instead of a scalar).  And I took out GCD .
> >
> > --Kip Murray
> >
> > >>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary
> >
> > Vocabulary  ( Constants   Controls   Foreigns   Parts of Speech )  
> >
> > =  • Equal =. Is (Local) =: Is (Global)
> > < Box • Less Than <. Floor • Lesser Of (Min) <:  • Less Or Equal
> > > Open • Larger Than >. Ceiling • Larger of (Max) >:  • Larger Or Equal
> > _ Negative Sign / Infinity
> >
> >  
> > +  • Plus
> >
> > *  • Times
> >
> > - Negate • Minus -. Not • Less -:  • Match
> > % Reciprocal • Divide
> >
> >  
> > ^ Exponential • Power
> > ^: Power (u^:n u^:v)
> > $ Shape Of • Shape
> >
> > ~ Reflex • Passive ~. Nub • ~:  • Not-Equal
> > | Magnitude • Residue |. Reverse • Rotate (Shift)
> >  
> >
> >
> >
> > : Explicit / Monad-Dyad
> >
> > , Ravel • Append ,. Ravel Items • Stitch ,: Itemize • Laminate
> > ; Raze • Link
> > ;: Words
> >  
> > # Tally • Copy
> >
> > ! Factorial
> >
> > / Insert • Table
> > /:  • Sort
> > \ Prefix
> > \:  • Sort
> >  
> > [ Same • Left [: Cap
> > ] Same • Right
> > {  • From {. Head • Take {: Tail •  
> > }  • Amend (m} u}) }. Behead • Drop
> >  
> > " Rank (m"n u"n) ". Do • ": Default Format • Format
> >
> >  
> > @ Atop @. Agenda
> > & Bond / Compose &. Under (Dual)
> > ? Roll • Deal
> >  
> > a. Alphabet a: Ace (Boxed Empty)
> >
> >
> >
> >
> >
> >
> > e.  • Member (In)
> > E. • Member of Interval
> >
> >  
> > i. Integers • Index Of
> > I. Indices • Interval Index
> >
> >
> >
> >
> > NB. Comment
> >
> >
> >
> >  
> >  
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > >>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary
> >
> > Sent from my iPad
> >
> >
> > On Mar 15, 2013, at 10:27 AM, Greg Borota <[hidden email]> wrote:
> > >
> > > 3) I am not the first to mention this. I wish there was a minimal J
> > > language core documented/available. I see veterans on this forum saying
> > > things like: "I almost never use some of those verbs". Is there not a
> > > minimal J language core targeting general language use? For example,
> > > leaving out specifics like numerical analysis, statistics, etc. This
> > > might help some not drop by the way side. E.g. http://xprogramming
> > > .com/category/j-language/
> >
> >
> > On Mar 15, 2013, at 3:26 PM, Raul Miller <[hidden email]> wrote:
> >
> > ...
> > >
> > > I'd probably also eliminate foreigns from "core".  Foreigns are about
> > > as peripheral as you can get.  The beginner should probably be told to
> > > start with covers (fread, fwrite, ...).
> > >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
123