I've been mulling on this for a few days now, and I don't have a good
reply yet, but I think it's time for the one I have.

I think I do something similar. I drop into J (or J with a few APL
symbols thrown in) for "array-like" scribbling on paper. Picking
things out of time series, reordering data, and the like. For
derivations, as well as for heavily symbolic work, I use more
traditional notation, where I can wander around the plane and reorder
polynomial terms without too much thought. Inconsistency is the least
of my concerns.

The idea of context is an interesting one. Programming languages use
variable scopes to set contexts, in one way. Probability, on the other
hand, is all about the careful manipulation and precise tracking of
context. In programming terms, it reifies the environment. Perhaps
this is more true of something like stochastic calculus, with its
concept of the filtration. That makes me think of continuation-passing
style, but not in any very precise way.

I don't know if this is an answer, but I thought it interesting to think about.

Regards,
Johann


On Mon, Apr 22, 2013 at 4:03 PM, Raul Miller <[email protected]> wrote:
> I have used APL and J for "paper and pencil exercises" but rarely
> without a computer.
>
> When I have only paper and pencil, I do not restrict myself to any
> formal notational structure. I'll draw things, use notation fragments,
> build tables, or generally do whatever I feel will help me.  I might
> even mix J (or APL - it looks nicer on paper) with similar looking
> notation that follows different rules. This has no permanent value --
> I'll forget many of the relevant associated thoughts before too long
> -- but if I'm looking to solve a problem my current mental state is
> not one that I want to preserve for very long - I'd much rather
> achieve some level of coherent understanding.
>
> That said, it's often a struggle to take some traditional bit of
> mathematical wisdom and cast it into J. I attribute this difficulty to
> the assumptions that are carried in the context and in my
> understanding of that context. Meanwhile, in teaching contexts it's
> often tempting to say "do this" and lay out a simple plan, but that
> can yield apparent success (people able to follow the plan) without
> actual education (understanding why those steps were the right ones
> and able to form similar plans for oneself - in different contexts).
>
> That said, expressing Maxwell's equations in J would probably wind up
> looking like an assert statement that uses D. - but the implementation
> of D. is weak enough that I don't know if the result could be useful.
> So maybe workalike, instead?
>
> Keep in mind, though, that in mathematics we use truth valued
> statements (and jargon) to identify contexts. The programming concept
> of assigning a value to a variable is about as close to the
> mathematical concept as the programming concept of a truth valued
> test. You know (or have reason to believe) that you are dealing with
> the right context if the truth valued statement does not contradict
> your understanding and you understand some contexts where it would be
> false - similarly, you have reason to believe a context is correct if
> you understand why an assignment statement happens.  Something similar
> happens with numbers (they are highly contextual and help distinguish
> contexts). Of course, we also use symbolism in other ways in
> mathematics but if you're writing computer programs the calculation
> aspects probably should not an obstacle to understanding.
>
> And, for probability... some aspects of probability fall in the
> "notation identifies the context" issue, where we are dealing not a
> single result or small finite collection but with a subset of infinity
> (infinity being shorthand for "too much to be worth bothering with").
> That said, note that (for example) J's % is meant to be a division
> symbol (http://etc.usf.edu/clipart/41700/41704/fc_dev_41704.htm). The
> flaw here is that ascii doesn't give us much to work with.  Anyways,
> you can express probability rather easily in J, but expressing the
> thoughts about what the problem really means is something that
> probably belongs in comments, or in naming, or maybe even on a piece
> of paper (penciled in if you are trying to think things through).
>
> Anyways, that's my current opinion. (Please keep in mind that I have
> at times had opinions which have conflicted with easily observable
> facts in various ways.)
>
> But maybe this helps,
>
> --
> Raul
>
> On Mon, Apr 22, 2013 at 4:04 PM, Johann Hibschman <[email protected]> 
> wrote:
>> On Fri, Apr 19, 2013 at 11:52 AM, Skip Cave <[email protected]> wrote:
>>
>>> The key dichotomy here is "programming language" versus "mathematical
>>> notation". Students learned math notation in grade school. Then they might
>>> learn a programming language at some later time. But those two languages
>>> were treated as two completely different paradigms, rather than just a
>>> natural progression of gradually-increasing notational power. The ideal
>>> programming language should look identical, or at least very similar, to
>>> the notation we learn in school. Then everyone would become a "programmer"
>>> as soon as they wrote their math equations on a computing device.
>>
>> Sorry for the late reply. Have you had much success with actually
>> using APL for pen & paper calculations? I've not, but I'm curious
>> about those who have.
>>
>> When I tried it, I found that the way traditional notation optimizes
>> for polynomials makes it much easier to calculate, since the built-in
>> assumptions about associativity make it easier move terms around in an
>> equation. APL, on the other hand, is cumulative. If you have c=a-4-b,
>> it takes some thought to move the 4 around to get (c+4)=a+b.
>>
>> Also, I found the "traditional" notation had fancy symbols that I was
>> very used to manipulating and that made the results easier to
>> understand. For example, Maxwell's equations use div/curl plus
>> partials. Bayesian posterior probability uses special notation for
>> conditional probability, like p(X|Y)=p(Y|X)p(X)%p(Y), which gets more
>> "fancy" if you start actually integrating over distributions. And in
>> geometry, distinguishing the Lie derivative from the exterior
>> derivative is easy in geometric notation, but I don't know how you'd
>> write it in J or APL.
>>
>> Do you find an APL-like notation useful for manipulating more
>> "symbolic" concepts like this?
>>
>> All of this is a long way to say that I don't think it was just the
>> difficulties of the symbols, or even mere inertia, that kept APL from
>> replacing traditional math notation.
>>
>> Regards,
>> Johann
>> ----------------------------------------------------------------------
>> 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