Anything that can produce different results at different times can be
"changed" by 13 : to produce a result obtained when it was running.

For example:  13 :'fread ''file.txt'''

-- 
Raul

On Wed, Oct 17, 2018 at 6:30 PM Jose Mario Quintana
<[email protected]> wrote:
>
> I am aware that executing code with ". relying on explicit context can trip
> 13 : , for instance,
>
> u=. 3 : '".''+:y'''
>
> u 5
>
> 10
>
> v=. 13 : '".''+:y'''
>
> v 5
>
> 2
>
> v
>
> 2:
>
> I am not quite sure but probably there are more glitches, according to,
>
> NuVoc  13 :
> https://code.jsoftware.com/wiki/Vocabulary/com#m13
>
> "If you get exotic, you may encounter a bug or two in the implementation of 13
> :"
>
>
>
> On Wed, Oct 17, 2018 at 1:39 PM Martin Kreuzer <[email protected]> wrote:
>
> > José -
> >
> > Thanks for pointing out that issue in the first place.
> >
> > I wasn't aware of the compiler module being overzealous sometimes ...
> >
> > Are there any other known (I'm fighting for
> > words, might I call them) 'glitches' comparable to this one, and
> > where would they be documented for lookup..?
> >
> > -M
> >
> > At 2018-10-17 16:25, you wrote:
> >
> > >Martin,
> > >
> > >In my example, using + instead of -, u was the double of a single roll and
> > >v was the sum of two "independent" rolls.
> > >
> > >Yours is a far better example for illustrating the issue,
> > >
> > >       ( u=.  3 : ' T - (T=. ? y)' )
> > >3 : ' T - (T=. ? y)'
> > >
> > >u is one roll minus itself which produces zeroes; whereas
> > >
> > >       ( v=. 13 : ' T - (T=. ? y)' )
> > >? - ?
> > >
> > >is the difference of two "independent" rolls.
> > >
> > >Thus, for example,
> > >
> > >    u 0 0 0 0 0
> > >0 0 0 0 0
> > >
> > >whereas,
> > >
> > >    v 0 0 0 0 0
> > >_0.0389238 0.321837 0.0862073 0.552116 _0.134629
> > >
> > >Thanks!  I had one of those moments after I read your posts...  Why did I
> > >not think of that?  :)
> > >
> > >
> > >On Wed, Oct 17, 2018 at 8:08 AM Martin Kreuzer <[email protected]>
> > wrote:
> > >
> > > > Addendum:
> > >
> > > > Consider, in contrast, the behaviour of this *explicit* definition:
> > >
> > > >     ee=. 3 : 'T - T=. ?y'
> > > >     ee 10+i.7
> > > > 0 0 0 0 0 0 0
> > >
> > > > Same result as working *outside* a verb definition:
> > >
> > > >     ] T=.  ? 10+i.7
> > > > 6 6 0 9 12 1 5
> > > >     T - T
> > > > 0 0 0 0 0 0 0
> > >
> > > > -M
> > >
> >
> >
> ----------------------------------------------------------------------
> 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