4,482 karma · joined Sep 28, 2012 (14y ago) · 2,101 submissions
I hope the spam filter will respect it!
comment 4y ago · link · parent
Functional programmers are simply choosing to use a different style of map, but we both represent the same reality.
comment 4y ago · link · parent
Hey, physicists do it all the time. Having mathematical representations of how things work in the real world often turn out to give you complex devices that you wouldn't get by intuition alone. Thanks to doing it, we have Special Relativity and Schrodinger equations, that bring you advantages as GPS and insanely-high-speed networks.
There's nothing wrong with modelling interrupts and mutable state as static mathematical entities a.k.a. functions; and if you think it is, you don't know enough about functional programming - in fact, doing it allows for advanced tactics like automatic verification and very high scale generation of electronic devices.
Those less degrees of indirection may make it simple to build some kinds of programs; but they also introduce complexity in modelling the possible states of the system when you allow for arbitrary, unchecked side effects. So no, that representation is not inherently better - only most suited for some tasks than others; but the converse is also true for functional models of computation. If you think it is always better, it's because you're not taking all possible scenarios and utilities into account.
(Besides, as I already said elsewhere, "computers are mutable state" is not incompatible with functional representation; as mutable state can be represented with it). It seems that you're confusing mutable, wich is a property of computational devices, with 'imperative' which is a style of writing source code and defining relations between statements in your written program.
> Literally the exact opposite of functional, IO registers are the epitome of global mutable state.
Yup, you definitively don't know what functional programming is if you think you can't have global mutable state in it. In fact, every top-level Haskell program is defined as a global mutable IO monad...
comment 4y ago · link · parent
The course distills the primitives of different programming languages in terms of how they see state (see Van Roy's diagram in [2]), and how deciding to incorporate and combine some of those primitives and not others gives rise to the different programming styles. I found it enlightening, in the way that programmers' koans refer to.
[1] https://www.edx.org/es/course/paradigms-of-computer-programm...
[2] https://en.wikipedia.org/wiki/Programming_paradigm#Overview
(This is a repost of a comment I made below, so that readers who don't read the whole thread can still see it).
comment 4y ago · link · parent
So, in principle, it should have the same performance as the 'Children can issue notification events' method in the article, since it's using what in essence is the same structure (just with a much nicer syntax, better adapted to functional programs).
The advantage of using functional streams instead of OOP observable callbacks is that it tends to be easier to write the program's large structure as compositions of functions over streams, i.e. it is easy to build modular functions without the bugs introduced by side effects.
I learned this style of programming through the online 'Paradigms'[1] course by Peter Van Roy, which you can take for free if you don't want credits. It uses the multi-paradigm language Oz to explain the essence of each paradigm and the differences between them. The course distills the primitives of different programming languages in terms of how they see state (see Van Roy's diagram in [2]), and how deciding to incorporate and combine some of those primitives and not others gives rise to the different programming styles. I found it enlightening, in the way that programmers' koans refer to.
[1] https://www.edx.org/es/course/paradigms-of-computer-programm...
[2] https://en.wikipedia.org/wiki/Programming_paradigm#Overview
comment 4y ago · link · parent
There are ways to achieve such "automatic updating" of items in a functional data structure, but you need to build them explicitly instead of relying on the runtime, which gives you more responsibility but also more control. The most direct approach as compared to imperative code would be to build the data structure on top of mutable state-based streams, though there are other possibilities like monotonic or immutable structures.
comment 4y ago · link · parent
Functional Reactive programming (i.e. combining functions over streams of mutating objects) is essentially that, and it's a pure functional paradigm, quite popular in front-end web development (and I hear it's even creeping its way into the back-end).
comment 4y ago · link · parent
That's arguable, given that every (deterministic) imperative computation can be expressed as a pure functional program. "Imperative" is more of a viewpoint that the developer is using to understand the behavior of the computer, rather than a property of the machine itself.
A pure functional analysis will describe a computation on that "imperative" architecture as an inmutable, monotonic sequence of all the states that the CPU goes through over time; or maybe, if you know enough PL theory, as a chain of rewritings of a program-long expression that is updated, one term at a time, when each expression is replaced by the result of a function as it consumes its input parameters.
And no viewpoint is inherently better than the other (except that the functional version can be analyzed in a natural way with mathematical tools, which is often difficult with the imperative description).
comment 4y ago · link · parent
Functional programs are best used when you want referential transparency[1] as your problem domain benefits from it. If you want to represent mutable state in a functional, transparent way you use a subset of temporal logic[2] - each function has an additional state of the world input parameter, and return an additional updated state of the world value with all the mutated objects in it. The State monad is a version of this with increased legibility (as long as you don't combine many different sources of mutation).
If your needs for mutation are limited to a few objects in each module, you represent those as streams (the generalized version of futures which are able to be repeatedly updated with new values); a stream represents the history of all values that a mutable variable takes during the program execution. This is the basis of the functional reactive paradigm[3] on which modern web frameworks like React and Vue are converging, as it happens that modeling asynchronous state mutations of multiple loosely connected elements is easier in the functional paradigm than in the imperative.
[1] https://en.wikipedia.org/wiki/Referential_transparency
[2] https://en.wikipedia.org/wiki/Temporal_logic
[3] https://en.wikipedia.org/wiki/Functional_reactive_programmin...
comment 4y ago · link · parent
The cliché is true during the hottest hours, but it fails to admit that it is simply because most activity moves to the twilight hours when the heat subsides.
comment 4y ago · link · parent
Yeah, and I suspect it may have influenced Raskin in designing the Canon Cat. But good luck with quasimodes and spacial navigation among files in Emacs. The refined interactions provide an extra value in terms of approachability that Emacs is notorious for lacking.
The Canon Cat was easy to learn even for advanced use, something that you'll never hear about Emacs.
comment 4y ago · link · parent
Look for modern notetaking apps (Notion, Obsidian, logseq, Airtable, Roam Research... and "alternatives to" any of those) to see what style of knowledge management I'm talking about (there are two main varieties - the "outliner" and the "user-friendly relational database", with a lot of overlap between them).
comment 4y ago · link · parent
There are lots of new ideas... if you know where to look ;-) The problem is that, being new, they are neither widely distributed nor as well refined as the old ones.
Keep an eye on 'modern note taking' productivity tools in the orbit of 'second brain' or 'networked thought'; they are upgrading many of the principles of the Canon Cat to the current networked environment, and follow through on the spirit of the classic "augmenting the human intelect" dream.
I believe they have the potential to replace the outdated desktop metaphor, and offer a digitally native metaphor for information processing and productiviy.
comment 4y ago · link · parent
Yes, it did. It included two functions that significantly change the system's user-friendliness:
- Search and navigation was done through quasi-mode interactions, instead as with point-and-click. This gave end-users the powerful keyboard-only navigation capabilities of vi, without all the cognitive load of its navigation&commands mode.
- All content in the system was organized as a single infinite stream of text. There were special characters for sections and files, so you could always navigate to the previous/next section or file by leaping to that character. And you could open a section or file by typing the character plus the file name.
Several of these conventions have been since adopted by browsers' "smart address bars", allowing users to navigate the web through a limited version of this keyboard-first style. But there is no desktop environment that fully takes advantage of these principles for a general audience. Typically, only some power users benefit from a similar workflow in controlled environments like Emacs, without all the simplicity and gentle learning curve of the Canon Cat.
comment 4y ago · link · parent
I've seen an adaptation[1] of the concept to a standard keyboard that used the Alt + Alt gr keys for Leap back/forward, and the result was quite usable.
[1] the Archy project by Raskin's son Aza https://en.wikipedia.org/wiki/Archy_(software)
comment 4y ago · link · parent
Though I'd say they have huge shortcomings in terms of usability with respect to using them solely from keyboard shortcuts, at least compared to the simple efficient model of the Canon Cat and its radically modeless interactions.[1]
comment 4y ago · link · parent
I don't get how you deduce that there's no room for agency. You seem to confound that with the different amounts of leverage that people with widely different origins get; those coming from a more resourceful starting point will produce more, regardless of the actual effort they put in.
comment 4y ago · link · parent
Oh, you meant that those poor workaholics shouldn't exhaust themselves by overexerting over too much work? With that I can agree. But taxing those producing the most so as not to leave behind those who have received fewer gifts, inheritance or good contacts? That's how you build a civilization. If only because those producing the most are also those receiving the most from their peers upfront.
comment 4y ago · link · parent
In short, what matters to me as "real" is what can potentially be experienced and studied to make sense of it. The vast majority of "what's real" comes from a physical world external to us; and thanks to modern science, we know that even the part we perceive as thoughts and emotions comes from material processes in our bodies, without the need to postulate the reality of a supernatural substance as its basis.
However, it is a useful shortcut to consider these mental processes in themselves, without always referring to what physical processes underlie them, but looking at them from our own inner perceptions. So, the 'real' things are the material entities outside our brains, and also the thoughts, feelings and perceptions we hold about those external entities and about our own mental processes. Mathematics would belong to this second mode of being real. (This is different from classic Dualism, which would assert that what I see as 'mind entities' do have an existence outside our own minds, but their essence is different from that of material entities).
In the case of math, the concrete ways we communicate them to our peers and the representations we use are of great relevance. Even though two very different representations of a phenomenon can be claimed to model the same 'underlying mathematical reality', I see no need to assert the reality of a mathematical object existing in the celestial sphere somewhere above the orbit of Uranus, which is how Plato imagined the actual reality of the mathematical objects on which the imperfect real things were based.[2] I'm content to say that such reality is a logical consequence of the axioms we have socially chosen to use as the basis of our mathematical theories (and that, starting from other axioms, the mathematical reality of such objects could be slightly or totally different. I'm currently studying Category theory to see how precise one can be in studying such differences and similarities).
(However, if somewhere found a way to demonstrate empirically that such realm exists and show the way how physical objects are connected to it, I would change my position and would be eager to study whatever can be known from that approach - I just don't expect it to happen anytime soon). For this latest position, see the classic Carl Sagan's The Dragon in My Garage [3]; I find that arguments from Dualism about the existence of mathematical entities often tend to parallel those from religion, as they stem from the same Western tradition of ontology.
I hope all this wall of text makes sense and your curiosity has been satisfied :-) What ontological tradition do you come from, and how do you see this perspective of mine?
[1] https://en.wikipedia.org/wiki/Social_constructionism
comment 4y ago · link · parent
The way maths are real is as ideas within human minds trying to describe unambiguous assumptions in a detailed formal system; mathematical objects like spheres certainly don't exist in nature, so their definition of 'real' is quite different from the definition of 'real' for physical entities.
comment 4y ago · link · parent
Extreme relativistic phenomena like "spooky action at a distance" or the Alcubierre's warp engine folding space may be intuitively easier to grasp if you think of space as a structure made of wobbly interacting elements approaching or receding from one another, rather than extreme deformations of abstract euclidean geometry or probabilistic waveforms.
For example, time ticking at different rates in different places could be explained by a constant rate of causal propagation through regions with a different density of these elements. Or, alternatively, by causation propagating at different rates going slower through elements with very high energy. This can create two competing models, which could be tested experimentally to see which one is closer to reality. (This capability to ultimately being tested empirically is the main thing that differentiates theoretical physics from scholastic speculation; if not for that, both would be rationalistic masturbations to see how far you can push your logic models, without a way to put them to the test).
For a scientific theory, "being easier to grasp intuitively" may be the basis for more rapid advances over the previous version based entirely on a complex formal notation.
comment 4y ago · link · parent
It would be extremely worrisome that the court admitted sub-licensors to add something like the Commons Clause to software they get under the GPL-like licenses; it would completely invalidate them for all purposes, turning them into MIT-like permissive licenses instead.
comment 4y ago · link · parent
But the best strategy is always to simplify the number of different nodes to flatten navigation as much as possible.