zlacker

Notation as a Tool of Thought

submitted by mafaa+(OP) on 2020-11-30 00:39:09 | 203 points 43 comments
[view article] [source] [go to bottom]

NOTE: showing posts with links only show all posts
4. alexpe+Ac[view] [source] 2020-11-30 03:00:33
>>mafaa+(OP)
Reminds me of these notes: https://github.com/hypotext/notation
5. emmanu+Lc[view] [source] 2020-11-30 03:03:07
>>mafaa+(OP)
On this subject I love this strangeloop talk [1]: the right notation allowed John Conway to solve in an afternoon a knot problem that took another mathematician (Little) 6 years to solve!

Another example is juggling notation, that allowed not only the sharing of patterns but the discovery of new ones [2].

1: https://www.youtube.com/watch?v=Wahc9Ocka1g

2: https://en.wikipedia.org/wiki/Juggling_notation

8. sxp+ck[view] [source] 2020-11-30 04:45:25
>>mafaa+(OP)
For those unfamiliar with the power of APL, see this demo of someone livecoding the Game of Life: https://www.youtube.com/watch?v=a9xAKttWgP4

Its modern descendent are https://en.wikipedia.org/wiki/J_(programming_language) & https://en.wikipedia.org/wiki/K_(programming_language).

◧◩
9. moonch+ov[view] [source] [discussion] 2020-11-30 07:35:53
>>sxp+ck
APL itself continues to be developed; dyalog APL (the version demonstrated in that video) has added many of the features introduced by j. Roger hui (one of the original j developers) now works on dyalog.

There's also bqn[0], among others.

0. https://github.com/mlochbaum/bqn

◧◩◪◨
11. moonch+QE[view] [source] [discussion] 2020-11-30 09:20:36
>>patrec+PA
> Admittedly the J implementation at least of deriving a generalized inverse for an arbitrary function f is a somewhat ill-defined hack

Have you seen the version used by dzaima/apl[1]? The equivalent of '(-&.:{:) i.5' works and results in 0 1 2 3 _4.

> APL has some really dumb but cherished-by-the-community ideas that make the language less expressive and much more awkward to learn, e.g. the idea of replicating the terrible defect of normal mathematical notation where - is overloaded for negation and subtraction to every other function

Klong[2] is a partial attempt to resolve this. I won't repeat the arguments in favour of ambivalent functions, as I guess you've heard them a dozen times before

> u(f,g) = x => f^-1(g(f(x)).

Other way round; it's g^-1(f(g(x)))

1. https://github.com/dzaima/apl

2. https://t3x.org/klong/

12. ColinW+eK[view] [source] 2020-11-30 10:35:08
>>mafaa+(OP)
As mentioned elsewhere, the right notation[0] allowed us to discover new juggling patterns that had never been done[1][3]. I freely admit that current mathematical notation has problems, but most of the proposed reforms seem to lose the predictive and creative power, becoming mere notation and nothing more. The problem is that without experiencing that extra dimension it's impossible to see that, and you can't experience that extra dimension without investing the time and effort to learn mathematics to a significant level.

Tricky.

[0] https://www.numberphile.com/videos/juggling-by-numbers

[1] As far as we know. Without the notation we don't actually know what had been done, but when I took the new patterns to juggling conventions, no one knew them[2].

[2] Actually it's stronger than that. I showed people some of the new patterns at the British Juggling Convention in 1985 and no one knew them. Then at the European Juggling Convention just 4 months later, people from the USA were proclaiming them as the latest patterns that they had just learned, and were perplexed at how I not only knew them, but knew many, many more.

[3] And actually Paul Klimek had beaten us to it, but hadn't been able to get others interested in the notation. As far as we can tell, Paul was the first to get the notation.

◧◩◪◨⬒
22. kliber+GV[view] [source] [discussion] 2020-11-30 12:38:36
>>henrik+AP
> Does J have a notion of the relationship between certain functions and their inverse?

Yes. Many built-in words have inverses assigned, and you can assign inverse functions to your own words with :. https://code.jsoftware.com/wiki/Vocabulary/codot

EDIT: and here's a table with predefined inverses: https://code.jsoftware.com/wiki/Vocabulary/Inverses

◧◩◪◨⬒⬓
35. moonch+9d2[view] [source] [discussion] 2020-11-30 19:47:52
>>patrec+Ha2
> web-based

In that case you'll be wanting ngn/apl[1], which runs in a browser and compiles to js.

> ambivalent

The arguments are mostly linguistic. Natural language is also context-sensitive, so we are well-equipped to parse such formations; and they allow us to reuse information. The monadic and dyadic forms of '-' are related, so it's less cognitive overhead to recognize its meaning.

1. https://gitlab.com/n9n/apl

◧◩◪◨⬒⬓
36. avmich+2i2[view] [source] [discussion] 2020-11-30 20:14:29
>>rscho+WZ
> endure the multiple weeks of effort required to learn the basics

J for C programmers is a good book - https://www.jsoftware.com/docs/help807/jforc/contents.htm - and it could take significantly less than many weeks to "get" some important ideas. Specifically, make sure you understand ranks at chapters 5 and 6.

After you understand how +/ with different ranks can sum along different axis, you're well on the way.

I mean, here is a cube of numbers:

       i. 2 3 4
     0  1  2  3
     4  5  6  7
     8  9 10 11

    12 13 14 15
    16 17 18 19
    20 21 22 23
Plain +/ sums along the leading axis -

       +/ i. 2 3 4
    12 14 16 18
    20 22 24 26
    28 30 32 34
That's because rank of +/ is infinity, so / inserts pluses between highest-ranked items, of which there are two - a square

     0  1  2  3
     4  5  6  7
     8  9 10 11
and square

    12 13 14 15
    16 17 18 19
    20 21 22 23
(rank is a sort of dimension). So +/ just adds, element by element, these two squares together, giving the resulting square.

If you specify +/"0 - this sets the rank of the verb (function) to 0 - then +/ will be applied to each number separately and results will be combined. Adding a single number (not with itself - just as it is, without the other argument for summation) makes the same number, so +/"0 doesn't change the result - it's the same cube as in i. 2 3 4

Trying with +/"1 gives

       +/"1 i. 2 3 4
     6 22 38
    54 70 86
That's because +/"1 now is a verb of rank 1, so it works with items (subarrays) of rank 1. In cube i. 2 3 4 there are 6 subarrays of rank 1, 3 of them are in the first "plane" and 3 of them are in the second "plane". +/"1 takes each such subarray of rank 1 separately and sums elements in it (inserts + between elements of such array), and J then aggregates results into the array.

Finally,

       +/"2 i. 2 3 4
    12 15 18 21
    48 51 54 57
sums within 2-dimensional arrays. Elements of such arrays are 1-dimensional arrays, so those arrays are summed, element by element. There are two planes, so the result has two element (two arrays of rank 1), and each element is array of rank 1, obtained from summing 3 arrays of rank 1.

The book tells it better, of course.

◧◩◪◨⬒⬓
40. dzaima+9N3[view] [source] [discussion] 2020-12-01 10:51:38
>>patrec+Ha2
Keyboard space is another somewhat important factor. My layout for dzaima/APL already uses all altgr keys, so I could definitely not afford multiplying the number of needed characters by 2. Not having ambivalently callable operators would also mean needing 2 versions of most of them.

dzaima/APL being written in Java means getting it to run in a browser would be a bit hard, and ngn has given up on ngn/apl, but BQN[0] could definitely get a web canvas based graphics interface.

Somewhat interesting to add to the conversation about Under is that, in my impl, calling a function, calling its inverse, or doing something under it (i.e. structural under) are all equally valid ways to "use" a function, it's just a "coincidence" that there's direct syntax for invoking only one. (Dyalog does not yet have under, but it definitely is planned.)

0. https://mlochbaum.github.io/BQN/

[go to top]