Thanks. This is what I was looking for.My idea is (or was) to try to replace 
the J verbs with human readable function names (Non-J using humans that 
is).e.g. ^ would be exp(x) and 1&o. will be cos(x)so ^-^. would be exp(x) - 
ln(x) (where I add in x as a dummy variable to make it readable)But actually 
It's way harder than I thought. For example ^@(1&o.) becomes exp(cos(x))But 
trying to do this with all @, @., &, &. is not so easy.
I was hoping I could use an alias name for the primitives and get the 
derivative of those.
e.g. cos =: 1&o.sin =: 2&o.cos d. 1
This produces an error, but it would have been nice if I could get it to return 
- sin.

> From: [email protected]
> Date: Tue, 12 Aug 2014 18:02:38 +1000
> To: [email protected]
> Subject: Re: [Jprogramming] Verb output to string conversion.
> 
> The Foreign Conjunction 5!: (Representation) produces a string form of a 
> verb, it is on the J Help under Foreign Conjunctions.
> 
>    Result =: (^-^.)d. 1
>    Result
> +-+-+-+
> |^|-|%|
> +-+-+-+
>    5!:5 <'Result'
> ^ - %
>    $ 5!:5 <'Result'
> 5
> 
> Does this help ?  Rob
> 
> 
> On 12 Aug 2014, at 5:42 pm, Jon Hough <[email protected]> wrote:
> 
> > I have been looking at the d. Verb, playing with differentiating different 
> > functions. It is pretty impressive.
> > However, I want to convert the output to a string, although Im not sure 
> > how. I browsed nuvoc but couldn't see anything that could nounify, or 
> > stringify a verb.
> > 
> > E.g.
> > 
> > Result =: (^-^.)d. 1
> > 
> > Then I want to do something with result. E.g. regex it and replace ^ with 
> > e, for example.
> > Is this possible?
> > ----------------------------------------------------------------------
> > 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