9 ms·
Notation as a Tool of Thought (1979)
- xelxebar 2y ago> Subordination of detail The paper doesn't really explore this concept well, IMHO. However, after a lot of time reading and writing APL applications, I have found that it points at a way of managing complexity radically different from abstraction. We're inundated with abstraction barriers: APIs, libraries, modules, packages, interfaces, you name it. Consequences of this approach are almost cliché at this point—dizzyingly high abstraction towers, developers as just API-gluers, disconnect from underlying hardware, challenging to reason about performance, _etc._ APL makes it really convenient to take a different tack. Instead of designing abstractions, we can carefully design our data to be easily operated on with simple expressions. Where you would normally see a library function or DSL term, this approach just uses primitives directly: For example, we can create a hash map of vector values and interred keys with something like str←(⊂'') 'rubber' 'baby' 'buggy' 'bumpers' ⍝ string table k←4 1 2 2 4 3 4 3 4 4 ⍝ keys v←0.26 0.87 0.34 0.69 0.72 0.81 0.056 0.047 0.075 0.49 ⍝ values Standard operations are then immediately accessible: k v⍪←↓⍉↑(2 0.33)(2 0.01)(3 0.92) ⍝ insert values k{str[⍺] ⍵}⌸v ⍝ pretty print k v⌿⍨←⊂k≠str⍳⊂'buggy' ⍝ deletion What I find really nice about this approach is that each expression is no longer a black box, making it really natural to customize expressions for specific needs. For example, insertion in a hashmap would normally need to have code for potentially adding a new key, but above we're making use of a common invariant that we only need to append values to existing keys. If this were a library API, there would either be an unused code path here, lots of variants on the insertion function, or some sophisticated type inference to do dead code elimination. Those approaches end up leaking non-domain concerns into our codebase. But, by subordinating detail instead of hiding it, we give ourselves access to as much domain-specific detail as necessary, while letting the non-relevant detail sit silently in the background until needed. Of course, doing things like this in APL ends up demanding a lot of familiarity with the APL expressions, but honestly, I don't think that ends up being much more work than deeply learning the Python ecosystem or anything equivalent. In practice, the individual APL symbols really do fade into the background and you start seeing semantically meaningful phrases instead, similar to how we read English words and phrases atomically and not one letter at a time.
- jonahx 2y agoTo rephrase crudely: "inline everything". This is infeasible in most languages, but if your language and concise and expressive enough, it becomes possible again to a large degree. I always think about how Arthur Whitney just really hates scrolling. Let alone 20 open files and chains of "jump to definition". When the whole program fits on page, all that vanishes. You navigate with eye movements.
- dayvigo 2y ago> To rephrase crudely: "inline everything". Sounds a lot like what Forth does.
- DHRicoF 2y ago> k v⍪←↓⍉↑(2 0.33)(2 0.01)(3 0.92) ⍝ insert values > k{str[⍺] ⍵}⌸v ⍝ pretty print > k v⌿⍨←⊂k≠str⍳⊂'buggy' ⍝ deletion I like your funny words. No, really, I should expend some time learning APL. But your idea deeply resonate with my last weeks struggle. I have a legacy python code with too much coupling, and every prior attempt to "improve things" went adding more abstraction over a plain wrong data model. You can't infer, reading the code linearly, what methods mutate their input objects. Some do, some don't. Sometimes the same input argument is returned even without mutation. I would prefer some magic string that could be analyzed and understood than this sea of indirection with factories returning different calculators that in some instances they don't even share the same interface. Sorry for the rant.
- TuringTest 2y ago> APL makes it really convenient to take a different tack. Instead of designing abstractions, we can carefully design our data to be easily operated on with simple expressions. Where you would normally see a library function or DSL term, this approach just uses primitives directly But in doing that, aren't you simply moving the complexity of the abstractions from the functions code into the data structure? Sure you can use generic operators now, but then you need to carefully understand what the value pairs represent in terms of domain logic and how to properly maintain the correct structure in every operation. Someone reading the program for the same time will have just the same difficulties understanding what the code does, not in terms of primitives, but in terms of business domain meanings. I mean there is an improvement in your approach, but I don't think it comes from putting the complexity at a different place, but because this way you get to see the code and the actual actual values at the same time. I have the insight that what makes complex programming easy is this juxtaposition of runtime data and code operations visible together. That's why IDE tools have building better and better debuggers and inspectors to let you see what the program is doing at each step. In that context, creating new good concise abstractions is a good thing, wether you abstract parts of the operations or parts of the data structure.
- jweir 2y agoAfter years of looking at APL as some sort of magic I spent sometime earlier this year to learn it. It is amazing how much code you can fit into a tweet using APL. Fun but hard for me to write.
- fc417fc802 2y agoIt's not as extreme but I feel similarly every time I write dense numpy code. Afterwards I almost invariably have the thought "it took me how long to write just that?" and start thinking I ought to have used a different tool. For some reason the reality is unintuitive to me - that the other tools would have taken me far longer. All the stuff that feels difficult and like it's just eating up time is actually me being forced to work out the problem specification in a more condensed manner. I think it's like climbing a steeper but much shorter path. It feels like more work but it's actually less. (The point of my rambling here is that I probably ought to learn APL and use it instead.)
- Qem 2y ago> It's not as extreme but I feel similarly every time I write dense numpy code. https://analyzethedatanotthedrivel.org/2018/03/31/numpy-another-iverson-ghost/ https://analyzethedatanotthedrivel.org/2018/03/31/numpy-anot...
- skruger 2y agoShould you ever decide to take that leap, maybe start here: https://xpqz.github.io/learnapl https://xpqz.github.io/learnapl (disclosure: author)
- -__---____-ZXyw 2y agoLooks wonderful, thanks for sharing your work!
- sitkack 2y agoI have been reading through your site, working on an APL DSL in Lisp. Excellent work! Thank you.
- colbyn 2y agoI really wish I finished my old Freeform note taking app that complies down to self contained webpages (via SVG). IMO it was a super cool idea for more technical content that’s common in STEM fields. Here’s an example from my old chemistry notes: https://colbyn.github.io/old-school-chem-notes/dev/chemistry-1010---fall-2021/week-14-acids-and-bases.html https://colbyn.github.io/old-school-chem-notes/dev/chemistry...
- sitkack 2y agoI see you Show HN post, this is brilliant. https://news.ycombinator.com/item?id=25474335 https://news.ycombinator.com/item?id=25474335 What system are you using now?
- colbyn 1y agoOh thanks! I always feel a little uneasy when people are going back on my history lol. But anyway to answer your question, nothing in particular. At the time I was in school and making tools that I myself wanted to use. I'm not in school anymore (total dropout looser lol) so there's not an immediate need. However I would like to eventually finish this project since I sunk a huge chunk of my life on this and perhaps there could be a market considering that my classmates also used my published notes and medical students in particular can be super crazy when it comes to their notes. But my immediate priority at this time is finishing my iOS/macOS chatbot client based on a branching data model (which I'm finally starting to get right as far as the UI is concerned, I've never seen anything like this so I couldn't just copy the competition) and other miscellaneous features based on such that I'd like to have in a tool geared towards 'power users'. I.e. people who want more utility (including being time efficient) beyond the lowest common denominator feature set that most consumer products are concerned with. But anyway, best regards! Colbyn
- jamesrom 2y agoIt's easy to think of notation like shell expansions, that all you're doing is replacing expressions with other expressions. But it goes much deeper than that. Once my professor explained how many great discoveries are often paired with new notation. That new notation signifies "here's a new way to think about this problem". And that many unsolved problems today will give way to powerful notation.
- veqq 2y ago> paired with new notation The DSL/language driven approach first creates a notation fitting the problem space directly, then worries about implementing the notation. It's truly empowering. But this is the lisp way. The APL (or Clojure) way is about making your base types truly useful, 100 functions on 1 data structure instead of 10 on 10. So instead of creating a DSL in APL, you design and layout your data very carefully and then everything just falls into place, a bit backwards from the first impression.
- xelxebar 2y agoYou stole the words from my mouth! One of the issues DSLs give me is that the process of using them invariably obsoletes their utility. That is, the process of writing an implementation seems to be synonymous with the process of learning what DSL your problem really needs. If you can manage to fluidly update your DSL design along the way, it might work, but in my experience the premature assumptions of initial designs end up getting baked in to so much code that it's really painful to migrate. APL, on the other hand, I have found extremely amenable to updates and rewrites. I mean, even just psychologically, it feels way more sensible to rewrite a couple lines of code versus a couple hundred, and in practice, I find the language to be very amenable for quickly exploring a problem domain with code sketches.
- skydhash 2y agoI was playing with Uiua, a stack and array programming languages. It was amazing to solve the Advent of Code's problems with just a few lines of code. And as GP said. Once you got the right form of array, the handful of functions the standard library was sufficient.
- gitroom 2y agoman i always try squishing code into tiny spaces too and then wonder why i'm tired after, but i kinda love those moments when it all just clicks
- cess11 2y agoLast year The Array Cast republished an interview with Iverson from 1982. https://www.arraycast.com/episodes/episode92-iverson https://www.arraycast.com/episodes/episode92-iverson It's quite interesting, and arguably more approachable than the Turing lecture. In 1979 APL wasn't as weird and fringe as it is today, because programming languages weren't global mass phenomena in the way that they are today, pretty much all of them were weird and fringe. C was rather fresh at the time, and if one squints a bit APL can kind of look like an abstraction that isn't very far from dense C and allows you to program a computer without having to implement pointer juggling over arrays yourself.
- veqq 2y ago> In 1979 many high schools were teaching mathematics with APL! There are quite a few textbooks to learn math with APL [1] or J [2] syntax. Iverson originally wrote APL as a superior syntax for math, the programming implementation came a few years later. [1] https://alexalejandre.com/about/#apl https://alexalejandre.com/about/#apl [2] https://code.jsoftware.com/wiki/Books#Math_for_the_Layman https://code.jsoftware.com/wiki/Books#Math_for_the_Layman
- mlajtos 2y agoI wish I was thought math with APL.
- zehaeva 2y agoA little off topic, but I am always amazed at the crazy niche podcasts that exist out in the world. As an example, I listened to a, now defunct, podcast about Type Theory. Wild esoteric stuff.
- FilosofumRex 2y agoHistorically, speaking what killed off APL (besides the wonky keyboard), was Lotus 123 by IBM and shortly thereafter MS Excel. Engineers, academicians, accountants, and MBAs needed something better than their TI-59 & HP-12C. But the CS community was obsessing about symbolics, AI and LISP, so the industry stepped in... This was a very unfortunate coincidence, because APL could have had much bigger impact and solve far more problems than spreadsheets ever will.
- cess11 2y agoAs I understand it, Dyalog gives away their compiler, until you put it in production. You can do all your problem solving in it without giving them any money, unless you also put the compiled result in front of your paying customers. If your solution fits a certain subset you can go full bananas and copy it into April and serve from Common Lisp. The thing is, that APL people are generally very academic. They can absolutely perform engineering tasks very fast and with concise code, but in some hypothetical average software shop, if you start talking about function ranking and Naperian functors your coworkers are going to suspect you might need medical attention. The product manager will quietly pull out their notes about you and start thinking about the cost of replacing you. This is for several reasons, but the most important one is that the bulk of software development is about inventing a technical somewhat formal language that represents how the customer-users talk and think, and you can't really do that in the Iverson languages. It's easy in Java, which for a long time forced you to tell every method exactly which business words can go in and come out of them. The exampleMethod combines CustomerConceptNo127 from org.customer.marketing and CustomerConceptNo211 from org.customer.financial and results in a CustomerConceptNo3 that the CEO wants to look at regularly. Can't really do that as easily in APL. You can name data and functions, sure, but once you introduce long winded names and namespaced structuring to map over a foreign organisation into your Iverson code you lose the tersity and elegance. Even in exceptionally sophisticated type systems in the ML family you'll find that developers struggle to do such direct connections between an invented quasilinguistic ontology and an organisation and its processes, and more regularly opt for mathematical or otherwise academic concepts. It can work in some settings, but you'll need people that can do both the theoretical stuff and keep in mind how it translates to the customer's world, and usually it's good enough to have people that can only do the latter part.
- InfinityByTen 2y ago> Nevertheless, mathematical notation has serious deficiencies. In particular, it lacks universality, and must be interpreted differently according to the topic, according to the author, and even according to the immediate context. I personally disagree to the premise of this paper. I think notation that is separated from visualization and ergonomics of the problem has a high cost. Some academics prefer a notation that hides away a lot of the complexity which can potentially result in "Eureka" realizations, wild equivalences and the like. In some cases, however, it can be obfuscating and be prone to introducing errors. Yet, it's a important tool in communicating a train of thought. In my opinion, having one standard notation for any domain/ closely related domains is quite stifling of creative, artistic or explorative side of reasoning and problem solving. Also, here's an excellent exposition about notation by none other than Terry Tao https://news.ycombinator.com/item?id=23911903 https://news.ycombinator.com/item?id=23911903
- tossandthrow 2y agoThis feels like the types programming vs. none typed programming. There are efforts in math to build "enterprise" reasoning systems. For these it makes sense to have a universal notation system (Lean, Coq, the likes). But for a personal exploration, it might be better to just jam in whatever. My personal strife in this space is more on teaching: Taking algebra classes, etc. where the teacher is not consistent nor honest about the personal decision and preference they have on notation - I became significantly better at math when I started studying type theory and theory of mechanical proofs.
- InfinityByTen 2y agoI have to admit that consistency and clarity of thought are often not implied just by the choice of notation and have not seen many books and professors putting effort to emphasize on its importance or even introducing it formally. I've seen cases where people use fancy notation to document topics than how they think about it. It drives me nuts, because the way you tell the story, you hide a lot how you arrived there. This is why I picked so well on the exposition by Terry Tao. It shows how much clarity of thought he has that he understands the importance of notation.
- talkingtab 2y agoThe base concept is related to other useful ones. The Sapir-Whorf hypothesis is similar. I find it most interesting when you turn it upside down - in any less than perfect language there are things that you either cannot think about or are difficult to think about. Are there things that we cannot express and cannot think about in our language? And the terms "language" and "thought" can be broader than our usual usage. For example do the rules of social interaction determine how we interact? Zeynep Tufekci in "Twitter and Teargas" talks about how twitter affords flash mobs, but not lasting social change. Do social mechanism like "following" someone or "commenting" or "liking" determine/afford us ways of interacting with each other? Would other mechanisms afford of better collective thinking. Comments below. And be sure to like and follow. :-) And then there is music. Not the notation, but does music express something that cannot be well expressed in other ways?
- patcon 2y agoI love your comment! I can tell that you're a tangential referential thinker, and I assume the downvotes are more from people frustrated that the bounds of the thought-space are being fuzzed in ways frustrating to their minds. Metaphor and analogy are in a similar spirit to what you are speaking of. The thinking they ground offer a frustrating inability to contain. Some people love to travel through language into other thoughts, and some are paralysed by that prospect. As always, success is in the balance and bothness :) Anything, thanks for sharing!
- _1tem 2y ago> in any less than perfect language there are things that you either cannot think about or are difficult to think about. Not they they are difficult to think about, rather, it would have never occurred to you to think about it in the first place. As a person who learned multiple foreign languages, there many things that I can think about only in a certain language but not my native language (English). For example there are many meanings of “гулять” in Ukrainian and Russian that are not captured in English, and I never thought about those meanings before I learned Ukrainian and Russian. Гулять literally means “to walk” but it is used to mean so much more than that. It also means to seek experiences, including sexual experiences. A person might complain they got married too early because “не нагулялся” or “didn’t walk enough”. While similar English expressions like “sow his wild oats” are used in English, it affects my thoughts differently to have so much meaning in the verb “to walk”. It literally changes how I think about walking through life. Similarly when I learned Arabic, there are many meanings and thoughts that I only have in that language and would take entire essays to explain in English. Not because it can’t be explained in English (it can) but the notation is just not there to do it succinctly enough.
- mathgradthrow 2y agoDespite this being very obviously true to any mathematician or computer scientist, this idea is incredibly controversial among linguists and "educators". The linguistic analogue, (although the exact example of notation does solidly fit into the domain of linguistics) is the so called sapir-whorf hypothesis, which asserts that what language you learn determines how you think. Because natural languages are cultural objects, and mapping cultures into even a weak partial order (like how a person thinks) is simply verboten in academia. This has profound consequences in education too, where students are disallowed from learning notation that would allow them to genuinely reason about the problems that they encounter. I admit to not understanding this one.
- andoando 2y agoSapir whorf doesnt negate the possibility of forming the same ideas using more primitive constructs. The ability of any language speaker being able to learn the same mathematics or computer program goes to show that. Id contest that spoken/written language is even necessary for thinking. At the very least, there is a large corpus of thought which does not require it (at some point humans spoke no or very little words, and its their thought/intention to communicate that drove the formation of words/language), so its silly to me to think of learned language as some base model of thought.
- mathgradthrow 2y agoWhen you learn another language (mathematics, programming), the sapir whorf hypothesis no longer makes the same predictions.
- taeric 2y agoI've had arguments on the sapir-whorf idea before. Sucks, as I'm not familiar with the environment that it originated, but it seems that people seemed to have taken an encoding idea and expanded it to experience, writ large. That is, people will lay claim that some societies that have the same word for the color of the sea and the color of grass to indicate that they don't experience a difference between the two. Not just that they encode the experiences into memories similarly, but that they don't see the differences. You get similar when people talk about how people don't hear the sounds that aren't used by their language. The idea is that the unused sounds are literally not heard. Is that genuinely what people push with those ideas? The argument of notation, as here, is more that vocabulary can be used to explore. Instead of saying you heard some sound, you heard music. Specific chord progressions and such.
- Pompidou 2y agoJ has revolutionized the way I think. I can confirm it: ever since I learned to program with it, I’ve been able to solve so many problems that previously felt far beyond my (limited) intellectual reach. For me, J (and by extension, the APL family more broadly) has contributed as much to my thinking as the methodologies I learned during my university studies in philosophy. Suffice it to say, it has profoundly and positively shaken me.
- -__---____-ZXyw 2y agoa. How did you get into it? b. Why J, as opposed to another APL implementation? In particular, the different syntax, I suppose I mean. Thanks!
- Pompidou 1y agoIt's free and allow use of standard ASCII characters
- dayvigo 2y agoThe other commenter asked about why J, but I want to more specifically ask, why did you choose J over K? I can't decide which to learn.
- elcaro 2y agoAnswering for myself, I started looking into APL, but at the time, learning the keymaps for the symbols seemed difficult, so I started learning array lang techniques with J, and ended up liking it. Some of the knowledge you acquire from one array lang can translate to the others, but the semantics are not 1:1 (ie. J is not just ASCII APL). As it currently stands, I dabble in almost all the array langs, but of the ones I use, I think best in J. It's got a lot of convenience in it's large set of primitives, and there's no "indirection" between the character you want, and the one you type. Still, it's not without it's shortcomings. I think I would probably still recommend BQN to most people looking to get into array programming, as it removes some warts in APL/J. You lose some convenience functions (base conversion, fixed-point, etc) but you get a language which is more uniform and intuitive. And FWIW, I had the keymaps learned within the first day I started to play with it. It's still a learning curve regardless of which lang you learn, but it will change how you think.
- alganet 2y ago> it lacks universality "there can be only one" vibes. --- The benefits of notation are obvious. It's like good asphalt for thinking. However, can you make a corner in the dirt road? "I don't like dirt" is not an excuse, right? Can you do it? "I run better on asphalt". No shit, Sherlock. Are you also afraid of problems with no clear notation established to guide you through?
- andymatuschak 2y agoFun fact: this lecture is (AFAIK) the first use of the phrase "tool of thought", which over the years became the now-familiar "tools for thought." A seminal work in more ways than one!
- 082349872349872 2y agosee also https://en.wikipedia.org/wiki/Organon#:~:text=The%20name%20Organon,of%20Philosophy https://en.wikipedia.org/wiki/Organon#:~:text=The%20name%20O...
- Duanemclemore 2y agoI am currently developing a project in APL - it was in my backlog for a long time but I'm actually writing code now. I phrase it that way because there was a pretty long lag between when I got interested and when I was able to start using it in more than one-liners. But I discovered this paper early in that process and devoured it. The concepts are completely foundational to my thinking now. Saying all this to lead to the fact that I actually teach NAATOT in an architecture program. Not software architecture - building architecture. I have edited a version to hit Iverson's key points, kept in just enough of the actual math / programming to illustrate these points and challenge the students to try to think differently about the possibilities for the design and representation tools they use, eg their processes for forming ideas, their ways of expressing them to themselves and others, and so forth. If I had the chance (a more loose, open-ended program rather than an undergraduate professional program) one of my dreams is to run a course where students would make their own symbolic and notational systems... (specifically applied to the domain of designing architecture - this is already pretty well covered in CS, graphic design, data science, etc.)
- karaterobot 2y agoThis readme file, which is about how notation systems influence thought, is something I refer to again and again. It's given me a lot of insights and ideas. I recommend it! https://github.com/kai-qu/notation https://github.com/kai-qu/notation It references Iverson, but is very anecdotal and wider ranging.
- dang 2y agoRelated. Others? Notation as a tool of thought (1979, APL founder Iverson) [pdf] - https://news.ycombinator.com/item?id=35131720 https://news.ycombinator.com/item?id=35131720 - March 2023 (1 comment) Notation as a Tool of Thought (1979) - https://news.ycombinator.com/item?id=32178291 https://news.ycombinator.com/item?id=32178291 - July 2022 (62 comments) Notation as a Tool of Thought (1979) [pdf] - https://news.ycombinator.com/item?id=28937268 https://news.ycombinator.com/item?id=28937268 - Oct 2021 (65 comments) Notation as a Tool of Thought - https://news.ycombinator.com/item?id=25249563 https://news.ycombinator.com/item?id=25249563 - Nov 2020 (43 comments) J Notation as a Tool of Thought - https://news.ycombinator.com/item?id=24166260 https://news.ycombinator.com/item?id=24166260 - Aug 2020 (59 comments) (<-- different article that snuck in, but I don't want to kick it out) Notation as a Tool of Thought (1979) - https://news.ycombinator.com/item?id=18188685 https://news.ycombinator.com/item?id=18188685 - Oct 2018 (5 comments) Notation as a Tool of Thought (1979) [pdf] - https://news.ycombinator.com/item?id=16842378 https://news.ycombinator.com/item?id=16842378 - April 2018 (13 comments) Notation as a Tool of Thought (1979) - https://news.ycombinator.com/item?id=13199880 https://news.ycombinator.com/item?id=13199880 - Dec 2016 (25 comments) Notation as a Tool of Thought (1980) - https://news.ycombinator.com/item?id=10182942 https://news.ycombinator.com/item?id=10182942 - Sept 2015 (17 comments) Notation as a Tool of Thought (1979) [pdf] - https://news.ycombinator.com/item?id=8392384 https://news.ycombinator.com/item?id=8392384 - Oct 2014 (12 comments) Notation as a Tool of Thought - https://news.ycombinator.com/item?id=3118275 https://news.ycombinator.com/item?id=3118275 - Oct 2011 (19 comments)