On the original question in this thread the paren and trace are a bit more
elaborate
paren '(],0{&<.&<.0.5+(1+0.01*(?30)-15)*(((+/ % #)*1+#)-(+/))) 90 90 90'
((] (, (0 (({ & <.) & <.) (0.5 + ((1 + (0.01 * ((? 30) - 15))) * ((((+ /) %
#) * (1 + #)) - (+ /))))))) 90 90 90)
trace '(],0{&<.&<.0.5+(1+0.01*(?30)-15)*(((+/ % #)*1+#)-(+/))) 90 90 90'
--------------- 3 Adverb -----
+
/
+/
--------------- 8 Paren ------
(
+/
)
+/
--------------- 5 Trident ----
1
+
#
1 + #
--------------- 3 Adverb -----
+
/
+/
--------------- 5 Trident ----
+/
%
#
+/ % #
--------------- 8 Paren ------
(
+/ % #
)
+/ % #
--------------- 5 Trident ----
+/ % #
*
1 + #
(+/ % #) * 1 + #
--------------- 8 Paren ------
(
(+/ % #) * 1 + #
)
(+/ % #) * 1 + #
--------------- 5 Trident ----
(+/ % #) * 1 + #
-
+/
((+/ % #) * 1 + #) - +/
--------------- 8 Paren ------
(
((+/ % #) * 1 + #) - +/
)
((+/ % #) * 1 + #) - +/
--------------- 0 Monad ------
?
30
14
--------------- 8 Paren ------
(
14
)
14
--------------- 2 Dyad -------
14
-
15
_1
--------------- 2 Dyad -------
0.01
*
_1
_0.01
--------------- 2 Dyad -------
1
+
_0.01
0.99
--------------- 8 Paren ------
(
0.98999999999999999
)
0.99
--------------- 5 Trident ----
0.98999999999999999
*
((+/ % #) * 1 + #) - +/
0.98999999999999999 * ((+/ % #) * 1 + #) - +/
--------------- 5 Trident ----
0.5
+
0.98999999999999999 * ((+/ % #) * 1 + #) - +/
0.5 + 0.98999999999999999 * ((+/ % #) * 1 + #) - +/
--------------- 4 Conj -------
{
&
<.
{&<.
--------------- 4 Conj -------
{&<.
&
<.
{&<.&<.
--------------- 5 Trident ----
0
{&<.&<.
0.5 + 0.98999999999999999 * ((+/ % #) * 1 + #) - +/
0 {&<.&<. 0.5 + 0.98999999999999999 * ((+/ % #) * 1 + #) - +/
--------------- 5 Trident ----
]
,
0 {&<.&<. 0.5 + 0.98999999999999999 * ((+/ % #) * 1 + #) - +/
] , 0 {&<.&<. 0.5 + 0.98999999999999999 * ((+/ % #) * 1 + #) - +/
--------------- 8 Paren ------
(
] , 0 {&<.&<. 0.5 + 0.98999999999999999 * ((+/ % #) * 1 + #) - +/
)
] , 0 {&<.&<. 0.5 + 0.98999999999999999 * ((+/ % #) * 1 + #) - +/
--------------- 0 Monad ------
] , 0 {&<.&<. 0.5 + 0.98999999999999999 * ((+/ % #) * 1 + #) - +/
90 90 90
90 90 90 89
==============================
90 90 90 89
2011/10/7 Björn Helgason <[email protected]>
> paren is also a very nice option in the trace utility and my assist in
> understanding tacit verbs
>
> paren '(+/ % #) 90 90 90'
> (((+ /) % #) 90 90 90)
>
> and then trace too
>
> trace '(+/ % #) 90 90 90'
> --------------- 3 Adverb -----
> +
> /
> +/
> --------------- 5 Trident ----
> +/
> %
> #
> +/ % #
> --------------- 8 Paren ------
> (
> +/ % #
> )
> +/ % #
> --------------- 0 Monad ------
> +/ % #
> 90 90 90
> 90
> ==============================
> 90
>
>
> 2011/10/7 Björn Helgason <[email protected]>
>
>> I can think of many reasons to go from tacit to explicit and one of the
>> biggest is understanding the tacit expression better.
>>
>> It is relatively easy to create tacit from explicit and understand what is
>> happening.
>>
>> Going the other way around is a major hurdle for people starting out using
>> J and explaining one short tacit line may need a whole page of text.
>>
>> Being able to go from tacit to explicit and for example explaining the
>> trace of the expression could be a good start and I think this kind of work
>> is very important and well worth doing.
>>
>> I guess that people are often too embarrassed to ask what an tacit
>> expression is really doing and why/how it works
>>
>>
>> 2011/10/7 Bo Jacoby <[email protected]>
>>
>>>
>>>
>>> Why, Linda, do you ever want to go from the tacit expression to an
>>> explicit expression?
>>>
>>> a =: ((+/ % #) * 1 + #) - +/
>>> a 90 90 90
>>> 90
>>> NB. ((+/ % #) * (1 + #)) === (((+/ % #) * 1) + ((+/ % #) * #)) === ((+/ %
>>> #) + ((+/))
>>> a =: +/ % #
>>> a 90 90 90
>>> 90
>>>
>>>
>>>
>>>
>>>
>>> >________________________________
>>> >Fra: Björn Helgason <[email protected]>
>>> >Til: Programming forum <[email protected]>
>>> >Sendt: 13:16 fredag den 7. oktober 2011
>>> >Emne: Re: [Jprogramming] Tacit vs. Explicit
>>> >
>>> >Is this what you are looking for?
>>> >
>>> > load'c:\j701\addons\general\misc\trace.ijs'
>>> > trace'(((+/ % #) * 1 + #) - +/)90 90 90'
>>> >
>>> >
>>> >2011/10/7 Linda Alvord <[email protected]>
>>> >
>>> >> Is there a way to go from a tacit expression to find the correct
>>> explicit
>>> >> expression?
>>> >>
>>> >> a =: 13 :'((+/ % #) * 1 + #) - +/'
>>> >> a 90 90 90
>>> >> |syntax error: a
>>> >> | a 90 90 90
>>> >>
>>> >> b=:((+/ % #) * 1 + #) - +/
>>> >> b 90 90 90
>>> >> 90
>>> >>
>>> >> c =: 13 :'((+/ % #) * 1 + #) - +/y'
>>> >> c 90 90 90
>>> >> _540
>>> >>
>>> >> d =: 13 :'((+/ % #) * 1 + #y) - +/y'
>>> >> d 90 90 90
>>> >> _269
>>> >>
>>> >> e=: 13 :'((+/ % #y) * 1 + #y) - +/y'
>>> >> e 90 90 90
>>> >> _268.667
>>> >>
>>> >>
>>> >> a
>>> >> 3 : '((+/ % #) * 1 + #) - +/'
>>> >> b
>>> >> ((+/ % #) * 1 + #) - +/
>>> >> c
>>> >> [: ((+/ % #) * 1 + #) [: - +/
>>> >> d
>>> >> ([: (+/ % #) [: * 1 + #) - +/
>>> >> e
>>> >> (([: +/ [: % #) * 1 + #) - +/
>>> >>
>>> >>
>>> >>
>>> >> 5!:4 <'a'
>>> >>
>>> >> -- 3
>>> >> -- : -+- ,:'((+/ % #) * 1 + #) - +/'
>>> >>
>>> >>
>>> >> 5!:4 <'b'
>>> >>
>>> >> -- / --- +
>>> >> ----+- %
>>> >> │ L- #
>>> >> ------+- *
>>> >> │ │ -- 1
>>> >> │ L---+- +
>>> >> --+ L- #
>>> >> +- -
>>> >> L- / --- +
>>> >>
>>> >>
>>> >> 5!:4 <'c'
>>> >>
>>> >> -- [:
>>> >> │ -- / --- +
>>> >> │ ------+- %
>>> >> │ │ L- #
>>> >> +----+- *
>>> >> --+ │ -- 1
>>> >> │ L-----+- +
>>> >> │ L- #
>>> >> │ -- [:
>>> >> L----+- -
>>> >> L- / --- +
>>> >>
>>> >>
>>> >> 5!:4 <'d'
>>> >>
>>> >> -- [:
>>> >> │ -- / --- +
>>> >> +----+- %
>>> >> │ L- #
>>> >> ------+
>>> >> │ │ -- [:
>>> >> │ │ +- *
>>> >> │ L----+ -- 1
>>> >> --+ L-----+- +
>>> >> │ L- #
>>> >> +- -
>>> >> L- / --- +
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> 5!:4 <'e'
>>> >>
>>> >> -- [:
>>> >> +- / --- +
>>> >> ----+
>>> >> │ │ -- [:
>>> >> │ L-----+- %
>>> >> ------+ L- #
>>> >> │ +- *
>>> >> │ │ -- 1
>>> >> --+ L---+- +
>>> >> │ L- #
>>> >> +- -
>>> >> L- / --- +
>>> >>
>>> >> Do you get the answer you want with b, c, d or e? I would have guessed
>>> it
>>> >> should be b , that doesn't seem to be very helpful.
>>> >>
>>> >> -----Original Message-----
>>> >> From: [email protected]
>>> >> [mailto:[email protected]] On Behalf Of Henry Rich
>>> >> Sent: Wednesday, October 05, 2011 5:25 AM
>>> >> To: Programming forum
>>> >> Subject: Re: [Jprogramming] Tacit vs. Explicit
>>> >>
>>> >> bestfit=:(],0{&<.&<.0.5+(1+0.01*_15+(?@(30"_)))*(((+/ % #)*1+#)-(+/)))
>>> >> bestfit 90 90 90
>>> >> 90 90 90 101
>>> >> bestfit 90 90 90
>>> >> 90 90 90 102
>>> >> bestfit 90 90 90
>>> >> 90 90 90 103
>>> >> bestfit 90 90 90
>>> >> 90 90 90 78
>>> >>
>>> >> Henry Rich
>>> >>
>>> >> On 10/5/2011 5:19 AM, Gian Medri wrote:
>>> >> > Hi!
>>> >> > I have a function:
>>> >> > bestfit=:(],0{&<.&<.0.5+(1+0.01*(?30)-15)*(((+/ % #)*1+#)-(+/)))
>>> >> > that calculates the n+1 element.
>>> >> > bestfit 90 90 90
>>> >> > 90 90 90 81
>>> >> > The tacit form doesn't work properly, because the "?" is not active
>>> every
>>> >> > time I call bestfit 90 90 90.
>>> >> > When I use
>>> >> > (],0{&<.&<.0.5+(1+0.01*(?50)-25)*(((+/ % #)*1+#)-(+/))) 90 90 90
>>> >> > then the function works properly.
>>> >> >
>>> >> > My question is if it is possible to have a tacit verb with the "?"
>>> >> active.
>>> >> >
>>> >> > Thanks
>>> >> >
>>> >> > Gian Medri
>>> >> >
>>> ----------------------------------------------------------------------
>>> >> > 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
>>> >>
>>> >
>>> >
>>> >
>>> >--
>>> >Björn Helgason, Verkfræðingur
>>> >Fornustekkum II
>>> >781 Hornafirði,
>>> >t-póst: [email protected]
>>> >gsm: +3546985532
>>> >twitter: @flugfiskur
>>> >http://groups.google.com/group/J-Programming
>>> >
>>> >
>>> >Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari
>>> einfaldleikans
>>> >
>>> >góður kennari getur stigið á tær án þess að glansinn fari af skónum
>>> > /|_ .-----------------------------------.
>>> > ,' .\ / | Með léttri lund verður |
>>> > ,--' _,' | Dagurinn í dag |
>>> > / / | Enn betri en gærdagurinn |
>>> > ( -. | `-----------------------------------'
>>> > | ) | (\_ _/)
>>> > (`-. '--.) (='.'=) ♖♘♗♕♔♙
>>> > `. )----' (")_(") ☃☠
>>> >----------------------------------------------------------------------
>>> >For information about J forums see http://www.jsoftware.com/forums.htm
>>> >
>>> >
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>>
>>
>>
>> --
>> Björn Helgason, Verkfræðingur
>> Fornustekkum II
>> 781 Hornafirði,
>> t-póst: [email protected]
>> gsm: +3546985532
>> twitter: @flugfiskur
>> http://groups.google.com/group/J-Programming
>>
>>
>> Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
>>
>> góður kennari getur stigið á tær án þess að glansinn fari af skónum
>> /|_ .-----------------------------------.
>> ,' .\ / | Með léttri lund verður |
>> ,--' _,' | Dagurinn í dag |
>> / / | Enn betri en gærdagurinn |
>> ( -. | `-----------------------------------'
>> | ) | (\_ _/)
>> (`-. '--.) (='.'=) ♖♘♗♕♔♙
>> `. )----' (")_(") ☃☠
>>
>
>
>
> --
> Björn Helgason, Verkfræðingur
> Fornustekkum II
> 781 Hornafirði,
> t-póst: [email protected]
> gsm: +3546985532
> twitter: @flugfiskur
> http://groups.google.com/group/J-Programming
>
>
> Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
>
> góður kennari getur stigið á tær án þess að glansinn fari af skónum
> /|_ .-----------------------------------.
> ,' .\ / | Með léttri lund verður |
> ,--' _,' | Dagurinn í dag |
> / / | Enn betri en gærdagurinn |
> ( -. | `-----------------------------------'
> | ) | (\_ _/)
> (`-. '--.) (='.'=) ♖♘♗♕♔♙
> `. )----' (")_(") ☃☠
>
--
Björn Helgason, Verkfræðingur
Fornustekkum II
781 Hornafirði,
t-póst: [email protected]
gsm: +3546985532
twitter: @flugfiskur
http://groups.google.com/group/J-Programming
Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
góður kennari getur stigið á tær án þess að glansinn fari af skónum
/|_ .-----------------------------------.
,' .\ / | Með léttri lund verður |
,--' _,' | Dagurinn í dag |
/ / | Enn betri en gærdagurinn |
( -. | `-----------------------------------'
| ) | (\_ _/)
(`-. '--.) (='.'=) ♖♘♗♕♔♙
`. )----' (")_(") ☃☠
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm