Right -- I was talking about the mechanism that would be used to do that.
The linear representation code at
https://www.jsoftware.com/ioj/iojRep.htm works by taking an atomic
representation and converting it into a linear representation.
In other words, the linear representation of {{+/y}} is 3 : '+/y'
More specifically, to generate
3 : '+/y'
that linear representation code starts from this data structure
{{+/y}} arep
+---------------------+
|+-+-----------------+|
||:|+-----+---------+||
|| ||+-+-+|+-+-----+|||
|| |||0|3|||0|+ / y||||
|| ||+-+-+|+-+-----+|||
|| |+-----+---------+||
|+-+-----------------+|
+---------------------+
What I was saying is that I could use that same code, with relatively
minor modifications, if I were to feed it something that looked like
this:
+-----------------------------+
|+-+-------------------------+|
||:|+------+---------+------+||
|| ||+-+--+|+-+-----+|+-+--+|||
|| |||0|{{|||0|+ / y|||0|}}||||
|| ||+-+--+|+-+-----+|+-+--+|||
|| |+------+---------+------+||
|+-+-------------------------+|
+-----------------------------+
But this doesn't deal with the occasional need for decorators like )a
-- that gets into deeper waters.
That said, maybe as proof of concept I should start with an
implementation which includes those decorators on multi-line
definitions and leaves them off of single line definitions? (Since the
decorators themselves currently require a newline to separate them
from the first line of code).
Note also that what I am saying means that this implementation would
NOT deal with the improper use of bare reserved argument names in the
resulting code, for single line definitions. But since that's a
relatively minor problem, maybe it's the right approach?
Thanks,
--
Raul
On Wed, Oct 28, 2020 at 8:46 AM Henry Rich <[email protected]> wrote:
>
> You don't want to touch the internal representation (which is different
> from AR). What is produced by {{ }} is just an explicit definition.
>
> What you want is a switch to display an explicit definition using {{ }}
> rather than n : 0. That could be as simple as using {{)x }} .
>
> A different decision is whether you want to remember how a verb was
> created, and display it in that form.
>
> Henry Rich
>
> On 10/27/2020 11:02 PM, Raul Miller wrote:
> > Hmm... actually, this might mean something new -- this approach
> > suggests delving into the atomic rep, finding the explicit definitions
> > and converting them to dd.
> >
> > But that implies a less explicit ar which can directly represent a
> > direct definition. So, for example, making a '{{' token which has a
> > modifier indicating type (for example )a or )v or whatever), followed
> > by the direct definition text. Probably followed by an inert '}}'
> > token to make the ddrep implementation simpler...
> >
> > I would definitely want Eric to weigh in on a design change that hits
> > the system this deeply.
> >
> > Thanks,
> >
>
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm