Josh To understand or write tacit programming, one must master the basic elements just as a carpenter must know everything of a saw, a hammer, a screwdriver.
To me, the basic elements of tacit are: @, @:, & (Compose), &:, fork, hook, hook with ~ (e.g. u~v). [ and ] are also essential but they are trivial. When I began learning those basic elements, I was easily confused. So here is my suggestion. Make a reference "card" with them, on paper or with a worksheet. Five columns. Left side for monadic, right for dyadic. Center column: the name or graphic symbol with a description. Columns 2 and 4: the rank of the resulting verb. Columns 1 and 5: an example. The description is something you will remember. For hook, I would write: left dyadic with monadic right preprocessor. As a start, you will have seven rows. For each row of the table, ask yourself: does this allow to use the right arg twice in a sentence? Do no hesitate to use 13 : ' ' NB. with a blank after the '3'! Write short sentences and go bottom up. Be aware that (and beware!) -a verb "sees" everything to its right -a modifier (conj or adv) "sees" everything to its left (sometimes forcing the use of parens), IOW has long left scope - a verb adverb construct results in a verb - a conj may result in four classes Have a printed copy of the J Reference card https://code.jsoftware.com/wiki/Guides/Getting_Started To immerse your mind of J sentences and idioms, read at least the first six chapters of https://code.jsoftware.com/wiki/Fifty_Shades_of_J As regards your difficulty with mutable variables, note there are no variables in a tacit sentence. Why not expose a particular case here in the forum? ~ Gilles Le 2019-08-14 à 13:21, 'Pascal Jasmin' via Programming a écrit : > some tips for learning tacit, > > https://code.jsoftware.com/wiki/User:Pascal_Jasmin/Use_Forks_Instead_of_Hooks > > > https://code.jsoftware.com/wiki/User:Pascal_Jasmin/Advanced_forks_and_grammar > > > https://code.jsoftware.com/wiki/User:Pascal_Jasmin/readability_of_tacit_code > > > > > > > > On Wednesday, August 14, 2019, 11:11:30 a.m. EDT, David Lambert > <[email protected]> wrote: > > > > > > Early on I wrote a program to learn about argument passing with trains. > > ex (f g) why NB. hook > ( X f ( g Y ) ) > > ex (f~ g)~ why NB. left hook > ( ( g X ) f Y ) > > > 'ex why'=: 'XY' > paren=: 1 :0 > '( ' , m , ' ' , y , ' )' > : > '( ' , x , ' ' , m , ' ' , y , ' )' > ) > > f=: 3 :0 > 'f' paren y > : > x 'f' paren y > ) > g=: 3 :0 > 'g' paren y > : > x 'g' paren y > ) > h=: 3 :0 > 'h' paren y > : > x 'h' paren y > ) > i=: 3 :0 > 'i' paren y > : > x 'i' paren y > ) > > > ---------------------------------------------------------------------- > 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
