Hi Mike,

You may not know, but there is a new J app that Ian Clark has developed called 
J901 (although it is running a version of J903 I believe) that supports {{ }}

You can find it in the app store for the iPad or the iPhone. The interface is 
slightly different, but it is really good.

Cheers, bob

> On Jan 11, 2022, at 07:34, 'Mike Day' via Programming 
> <[email protected]> wrote:
> 
> Oh well.  I thought you might have test-bedded these forms in J before moving 
> to C, Henry, in which case there might have been a readymade J script!
> 
> As for Raul’s suggestion,  that’s fine,  but, in as far as I have copied 
> across to J701,  just typing the verb’s name in the session reveals the n : 0 
> ... ) form.  Essentially,  this leads to amending the J903 script,  which 
> rather defeats the purpose.  I haven’t use nested ddefs.
> 
> Anyway,  I’ve got a little way into writing a basic parser which will suffice.
> 
> Thanks,
> 
> Mike
> 
> Sent from my iPad
> 
>> On 11 Jan 2022, at 14:42, Henry Rich <[email protected]> wrote:
>> 
>> There is nothing I know of that does what {{ }} does.  But Raul's idea is 
>> pretty close.  As he notes, it fails for nested {{ }} (there is much code 
>> that expects the result of 5!:5 <'explicitname' to have the form m : string, 
>> but nested {{ }} seemed OK).
>> 
>> Henry Rich
>> 
>>> On 1/11/2022 9:19 AM, Raul Miller wrote:
>>> If you avoid nested {{ }} blocks, 5!:5 would do this.
>>> 
>>> In other words, this works:
>>> 
>>>   mean=: {{ (+/ % #) y}}
>>>   5!:5<'mean'
>>> 3 : '(+/ % #) y'
>>> 
>>> But this would be useless for your purposes:
>>> 
>>>   mean=: {{ {{x + y}} {{u/}} {{x % y}} {{#y}} }}
>>>   5!:5<'mean'
>>> 3 : '{{ x + y }}  {{ u/ }}  {{ x % y }}  {{ #y }}  '
>>> 
>>> FYI,
>>> 
>>> 
>>> --
>>> Raul
>>> 
>>> On Tue, Jan 11, 2022 at 4:25 AM 'Mike Day' via Programming
>>> <[email protected]> wrote:
>>>> For Henry I expect: as I share code between J903 on the laptop and J701 on 
>>>> this iPad,  I’ve been avoiding the use of {{ }} objects.  (My iPad can’t 
>>>> support Ian’s new J902.)
>>>> 
>>>> But I was just wondering about adding a routine to the J701 start.ijs 
>>>> script to parse a J903 script translating direct definitions to their 
>>>> earlier equivalents.  And then I thought there might already be native J 
>>>> code to do this.
>>>> 
>>>> So: do I need to invent this wheel?
>>>> 
>>>> Thanks,
>>>> 
>>>> Mike
>>>> 
>>>> Sent from my iPad
>>>> ----------------------------------------------------------------------
>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>> 
>> 
>> -- 
>> 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

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to