fread gives a result of _1 when the named file isn't there. FYI,
-- Raul On Thu, Oct 18, 2018 at 9:11 PM Linda Alvord <[email protected]> wrote: > > Odd: > > see=: 13 :'fread ''file.txt''' > see > _1: > > Linda > > > -----Original Message----- > From: Programming <[email protected]> On Behalf Of > Raul Miller > Sent: Thursday, October 18, 2018 11:03 AM > To: Programming forum <[email protected]> > Subject: Re: [Jprogramming] Using rank to avoid looping - reference? > > 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://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcode > > .jsoftware.com%2Fwiki%2FVocabulary%2Fcom%23m13&data=02%7C01%7C%7C2 > > dac8c6ed7084eedcedf08d6350ad08d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1 > > %7C0%7C636754717892231673&sdata=WBCGWG87XTSaLHVUUIIcPTo%2B98z4CrUm > > LdDC7cCmhx8%3D&reserved=0 > > > > "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 > > https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.j > > software.com%2Fforums.htm&data=02%7C01%7C%7C2dac8c6ed7084eedcedf08 > > d6350ad08d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63675471789223 > > 1673&sdata=C2Q4einbAU%2Fg3IEEznT7HdEBef1HGG7972eu0KfmFJw%3D&re > > served=0 > ---------------------------------------------------------------------- > For information about J forums see > https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C2dac8c6ed7084eedcedf08d6350ad08d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636754717892231673&sdata=C2Q4einbAU%2Fg3IEEznT7HdEBef1HGG7972eu0KfmFJw%3D&reserved=0 > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
