Ah, I see... or )a or )c decorators.
I am sort of disappointed that I can't build nouns this way. (Or, at
least, I haven't figured out how, yet.)
{{
wd 'reset'
}}
1 : 0
wd 'reset'
)
{{)n
wd 'reset'
}}
|domain error
| (9 :') n
wd ''reset''
')
I think it would be nice to be able to do something like:
start=: {{
NB. ... stuff goes here ...
wd {{)n
pc a;
minwh 640 480;
pmove 500 500 _1 _1;
cc g opengl flush;
}}
}}
For example
Thanks,
--
Raul
On Tue, Oct 20, 2020 at 4:27 PM Eric Iverson <[email protected]> wrote:
>
> Raul,
> You need the )v decorator. Try the following:
>
> f=: {{)v
> 23+y
> :
> x+y
> }}
>
> On Tue, Oct 20, 2020 at 4:01 PM Raul Miller <[email protected]> wrote:
>
> > > Henry Rich wrote the specs for DD and did the implementation. It is now
> > up
> > > to all of us to shake it out and look for improvements.
> >
> > One thing I am hoping for (and/or looking forward to) is some way of
> > providing both the monadic and dyadic verb definitions.
> >
> > Specifically, in j902-beta-i:
> >
> > {{
> > 9 F y
> > :
> > x+y
> > }}
> > 4 : 0
> >
> > 9 F y
> > )
> >
> > That's said, it's nice to have a mechanism that allows nested code.
> > It's slightly sad to lose the discipline that came from the absence of
> > that mechanism, but I think this will somewhat improve the ability to
> > talk with people with experiences in many other programming languages.
> >
> > Thanks,
> >
> >
> > --
> > Raul
> >
> > On Tue, Oct 20, 2020 at 12:09 PM Eric Iverson <[email protected]>
> > wrote:
> > >
> > > DirectDefinition is a significant new feature in J902-beta-i.
> > >
> > > DD is a new way to define verbs/adverbs/conjunctions that we think is a
> > > worthwhile improvement over n : ....
> > >
> > > f=: {{x+y}} NB. f=: 4 : 'x+y'
> > > 2 f 3
> > > 5
> > > 2{{x+y}}3 NB. 2(4 : 'x+y')3
> > > 5
> > >
> > > The power of DD is clearer with multiple lines and nested definitions.
> > >
> > > For details, see:
> > > https://code.jsoftware.com/wiki/Vocabulary/DirectDefinition
> > >
> > > One possibly controversial decision was to use {{ and }} as they don't
> > > follow J word rules. The importance of DD and the better readability over
> > > alternatives such as (. and ). weighed in that difficult decision.
> > >
> > > Henry Rich wrote the specs for DD and did the implementation. It is now
> > up
> > > to all of us to shake it out and look for improvements.
> > >
> > > ***
> > > J902-beta-i available for windows/macos/linux.
> > >
> > > If you already run 902-beta, then upgrade is easy:
> > > load'pacman'
> > > 'upgrade'jpkg'jengine'
> > >
> > > A lot of changes have accumulated in 902 and now is a good time to update
> > > the base library and all addons.
> > >
> > > If you have not started 902 beta cycle, now is the time:
> > > https://code.jsoftware.com/wiki/System/Installation/J902
> > > ----------------------------------------------------------------------
> > > 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