Thanks for that explanation Roger.

Is there any reason why fork with cap cannot be implemented exactly as @:
internally? It looks like there are just a few cases in jtatco that are not
in jtfolk, but in the long run, so as not to have to maintain both
sections, could they share code?


On Thu, May 16, 2013 at 11:48 AM, Roger Hui <[email protected]>wrote:

> I don't know why ([:-.-:)"0/ ?2 100000$10 is slower than (-.@:-:)"0/ ?2
> 100000$10.  To find the answer I'd have to look at the code.  I am not
> surprised that they run at different speeds because [:-.-: and -.@:-: are
> implemented by different code.
>
> +/@:, requires less space than [:+/, because the former is recognized as
> special code but the latter isn't.  There is a section of code for atop and
> another one for fork, including capped forks, and it is in those codes that
> special codes are recognized.  More specifically, +/@:,x is recognized when
> it is interpreting +/@:, , not when it eventually sees the x.  That is, if
> you say sumravel=:+/@:, and then apply sumravel multiple times, the special
> code recognition happens only once.  Given that, you can readily imagine, I
> think, how differences can arise in such a thing as special code
> recognition and thence in performance.
>
>
>
>
> On Thu, May 16, 2013 at 6:02 AM, Thomas Costigliola <[email protected]
> >wrote:
>
> > On Tue, May 14, 2013 at 2:49 PM, km <[email protected]> wrote:
> >
> > > Roger provides a motivation for capped fork in his Wiki essay Capped
> > Fork:
> > >
> > >
> > >
> >
> http://www.jsoftware.com/jwiki/Essays/Capped%20Fork?highlight=%28completeness%29
> > >
> > > He says, "When [: g h is interpreted as g@:h ,  it means that
> > > "everything" can be expressed as a fork (ordinary and capped)."
> > >
> > > However, it appears that [: g h is not always interpreted as g@:h. Two
> > simple examples:
> >
> >    10 (6!:2) '([:-.-:)"0/ ?2 100000$10'
> > 0.02305822671099
> >    10 (6!:2) '(-.@:-:)"0/ ?2 100000$10'
> > 0.003745674810987
> >
> >    (7!:2) '([:+/,) i.2#1000'
> > 12584512
> >    (7!:2) '(+/@:,) i.2#1000'
> > 8390272
> >
> > I wonder if there is a reason for that, i.e., should they not always be
> > interpreted the same because they are not according to the dictionary? Or
> > if it was an oversight.
> >
> >
> > I hope this teaser will make you eager to see his essay!
> > >
> > > --Kip Murray
> > >
> > > Sent from my iPad
> > >
> > >
> > > > On Mon, May 13, 2013 at 9:56 PM, Jose Mario Quintana
> > > > <[email protected]> wrote:
> > >
> > > > A teaser cap is the exception to the
> > > >>
> > > >> rule, [: is the only verb that is not invoked when is the leading
> verb
> > > in a
> > > >> fork, for no compelling reason (again, from my viewpoint).
> > > ----------------------------------------------------------------------
> > > 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