On Fri, 30 Sep 2022, Jan-Pieter Jacobs wrote:

Ideally the simplifier should be called en-route, because the derivstg and family (doing differentiation on string representations) call themselves all the time, which is why in the current version, things like 1&o. deriv 100 blow up.

Ha, yes, I see. I should mention--this representation needs to be gced periodically, otherwise it will blow up similarly. (But any symbolic manipulator will generate a lot of garbage, and the j interpreter is quite bad with small objects, so this is probably better than the alternative anyway.)


This is, partly, what the calculus addon does. It works with atomic representations, which appears to be (I've nearly no CS background) a parsed tree structure of any J entity.

Afaik, 'gerund' is synonymous with 'atomic representation' (glossary agrees with me, at least). I don't think ARs are very nice to manipulate from j. There's empirical evidence that this is the case: the calculus addon doesn't _generate_ ARs; it generates strings, which it then parses. This sort of stratification is no good for composability.


I'd do the edge to y first, to stick with J's right to left evaluation. Even if we should not really care because it's a non-standardised implementation detail, this is the behaviour of forks at the moment. It makes a difference when y or x have side effects.

I'm not talking about side effects. + was a bad example since it's commutative; but e.g. you care a great deal about the difference between x-y and y-x.


I don't know whether this is possible, at least not with the current setup: deriv executes, and thus disapears, the moment it is applied to its arguments...

Right--I'm suggesting something very different from the current setup.


Internally, the addon already uses this identity, see e.g. here

Yeah--just a simple example; but the idea is that you'd want to build up a very large library of similar rewrite rules, and a succinct way of expressing them; and that it would be easy for people to contribute to that library of rewrite rules.

Perhaps a conjunction like assert_eq, such that you can say 0&+ assert_eq ]. (Or specify separately monad/dyad; specify additional facts that have to hold; whatever.)

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

Reply via email to