using f. is not critical.

Furthermore I can no longer reproduce the value error which initially
spurred this line of inquiry.

I'm a little confused, but I am going to ignore this issue for now.

Thanks,

-- 
Raul



On Tue, Feb 18, 2014 at 8:43 PM, Pascal Jasmin <[email protected]>wrote:

> I'll point out that if using f. is critical then you might as well have:
>
> newverb =: (3 : '  0 0$WRITENIF=:WRITENIF,,y')@(2&ic) writenif
>
> You rarely gain any maintainability benefits by ensuring that your
> verb_base_ will get updated if you improve 'put'.  If you want the
> maintainability advantage of the new verb reflecting future improvements,
> don't use f.
>
> Also, you probably know that , when you use f. you in fact will not get
> improvements if you reload the other locale file without reloading the base
> file.  So, an error can go undetected until you reopen the whole project.
>  Using f. accross locales this way will make you paranoid with reloading
> and rechecking verifications with abnormal frequency.
>
>
>
>
> ----- Original Message -----
> From: Raul Miller <[email protected]>
> To: Programming forum <[email protected]>
> Cc:
> Sent: Tuesday, February 18, 2014 7:18:48 PM
> Subject: Re: [Jprogramming] wat? (seems like a spurious value error from
> f.)
>
> But that would mean that I am storing variables in the wrong locale and
> defeats the point of using separate locales in the first place.
>
> I will use a workaround, but I would like to understand what has gone wrong
> here. Here's how to reproduce:
>
>    cocurrent 'writenif'
>
>    put=: 3 : '  0 0$WRITENIF=:WRITENIF,,y'
>
>    ic=: 3!:4
>
>    write_int=: put@(2&ic)
>
>    cocurrent 'base'
>
>    write_int_writenif_ f.
>
> |value error: put
>
> Thanks,
>
> --
> Raul
>
>
> On Tue, Feb 18, 2014 at 5:18 PM, Vijay Lulla <[email protected]> wrote:
>
> > Looking at definition of 18!:2 it states "If a name sought in locale f is
> > not found in f , then it is sought in the locales in the path of f (but
> not
> > searching *their* paths)." Hence
> >
> > (;: 'writenif z') copath coname ''
> >
> > fixes the issue. I don't understand locales completely though!
> >
> >
> > On Tue, Feb 18, 2014 at 4:37 PM, Raul Miller <[email protected]>
> > wrote:
> >
> > > Yes - in fact it does fix if I switch to that locale.
> > >
> > > What's odd is that I have had no problems with similar verbs in other
> > > locales.
> > >
> > >
> > >
> > > --
> > > Raul
> > >
> > >
> > > On Tue, Feb 18, 2014 at 4:31 PM, Pascal Jasmin <[email protected]
> > > >wrote:
> > >
> > > > this would fix in the current locale. (?) put is probably not in the
> > > > current locale.  f. is used as ducktyping in J for crosslocales, and
> is
> > > > needed behaviour for coinsert to work like inheritance.
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: Raul Miller <[email protected]>
> > > > To: Programming forum <[email protected]>
> > > > Cc:
> > > > Sent: Tuesday, February 18, 2014 4:14:47 PM
> > > > Subject: [Jprogramming] wat? (seems like a spurious value error from
> > f.)
> > > >
> > > > Here is the definition of a verb defined in the writenif locale:
> > > >    write_int_writenif_
> > > > put@(2&ic)
> > > >
> > > > Here are the definitions of the two verbs named in that definition:
> > > >    put_writenif_
> > > > 3 : '  0 0$WRITENIF=:WRITENIF,,y'
> > > >    ic_writenif_
> > > > 3!:4
> > > >
> > > > Here is what happens when I try to fix that definition:
> > > >    write_int_writenif_ f.
> > > > |value error: put
> > > > |       write_int_writenif_ f.
> > > >
> > > > I get similar errors when I try to use those verbs, which is why I
> was
> > > > using fix - to try and isolate the error.
> > > >
> > > > I'm not seeing what I did wrong here. Can someone help me out?
> > > >
> > > > Thanks,
> > > >
> > > > --
> > > > Raul
> > > >
> ----------------------------------------------------------------------
> > > > 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
> > >
> > ----------------------------------------------------------------------
> > 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
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to