Hey Scott,

Due to time constraints, I have not been following this thread closely, but
the topic does interest me.

If you post your explicit (that's what we call the 3 : 'x stuff y other
stuff' style of code), I can take a whack at showing you how to translate it
to tacit code (that's what we call the cartoon-characters-cursing style of
code).  

Though at first blush, tacit code can look intimidating and impenetrable,
it's really not such a mystery.  I won't really even have to understand your
domain (information theory) in order to do the translation.

-Dan

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Scott Locklin
Sent: Saturday, March 16, 2013 8:25 PM
To: [email protected]
Subject: Re: [Jprogramming] Learning J language - initial thoughts

I'll add my voice as a  beginner: I agree with Greg that JforC is a tough
slog for a beginner. However, it contains most of the actual information
needed to get things done. I find myself returning to it all the time when I
don't know how to do something. The others are great as introductions. 


Personally, I think the vocabulary is fine. I use the subset I use. Maybe a
reduced vocabulary would help for didactics, but the introductory material
does fine in teaching some basics.


Here's what would help me a lot: examples which look like things we're used
to seeing in other interpreted languages (Matlab or R), with a step by step
reduction of them to do things the "J way." I can usually .... very slowly
... parse what is happening in the "Phrases." But, my mind is bent from 20
years of Matlab, C, Fortran, Lisp and R. I think in terms of 3 : 0 with the
x's and y's explicitly defined and used. I'm already somewhat productive in
that idiom. However, constructing 13 : 0 verbs is something I find
difficult. If I can express it as a quote escaped one-liner like
stuff=:'verb1 x verb2 y' the interpretor does the tacit conversion for me.
But I want to be able to do it myself on non-trivial verbs. There are some
examples on the wiki and plenty on the archives of this list, but "the more
the better."


As an example from this afternoon: I'm trying to make an add-on which does
primitive information theoretic calculations. To do this, you need a
discretizer to change the numbers to a reduced set of 'symbols' and the
Miller-Madow entropy calculation. I figured I'd look for histograms for the
discretizer, and found two  helpful essays by Roger Hui and Brian Schott on
how to do this. OK, almost done. I know the right way to do this is with a
verb train which looks like the histogram verbs they wrote. How do I change
the verbs? Well, there is a decent explanation breaking the histogram verb
down in 2009 on this elist. Looking at the atomic form or boxed form of the
histogram verb helps too, but if I had a lot more examples which broke down
a longish tacit verb train into elementary particles, this would be a lot
easier. I *think* I can do this; it will run faster if I do, and I know it
will be good for me to do so, but maybe taking the dumb way out with
explicit and loops is better. It will probably be more easily changed if I
need to do equal frequency or some complex thing like the MDL of Fayyad &
Irani. Probably though, I'll just discretize by dividing by the range and
rounding to convenient ints; because I am lazy. *kicks dirt* 


Please don't take this as complaining: I realize I'm basically just saying,
"I wish I were better at J." But I think this is the intellectual leap which
others would like to make: going from explicit verbs to longer trains like
histogram=: <: @ (#/.~) @ (i.@#@[ , I.) I know it would help me, and I think
it would help others.


-Scott
----------------------------------------------------------------------
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