Escher: A language for programming in metaphors
github.com
github.com
Still don't understand what his Escher metaphors are, though.
Interestingly enough, all three projects seem to get some level of respect from HN, for reasons that are beyond me.
It reminded me of languages like Lucid[1] and Quil[2], which treat non-von Neumann models of computation; Escher, though, seems to focus at the IPC level.
[1] https://en.wikipedia.org/wiki/Lucid_%28programming_language%...
A program starts and sees nothingness. Then a host emerges out of nowhere. (A human provisioning engineer must have turned it on in the data center.) Then the program can do something with it (like start a database) or it can wait (indefinitely) for another emergence of a host (before it sets up an elastic DB, say). The point is that objects emerge in your "sight" and they are nameless. The namelessness is the choicelessness. And this might seem like a small difference, but it is huge.
Chomsky tells Linguists: Try to imagine the world from the new-born baby's point of view; and trust me that the baby is born knowing nothing. The only difference is that the baby sees a "blooming buzzing confusion" (i.e. many hosts are online already). But the connection is that everything is nameless (at first). The baby sees many visual pixels. They have no meaning (i.e. no linguistic names). Later the baby sorts out the confusion and assigns names to all phenomena in its sight. Same for circuit programs. They see a nameless army of live hosts. They are all equally good, hence nameless. Then the program start purposing them differently (some are dbs, some are https, etc.). This is the same as the baby assigning names to pixels in its sight until it wakes up one day at age 5, thinking it understands the world. Ha :)
Which is also here in spades.
For example, there's no comprehensible relationship to me between the "inputs" and "outputs" (if that's even what they are) in the diagrams labeled "project" and "Generalize." It looks a little like a spoof, like saying we combine {animal: cat} and {tail: orange} to get {animal: orange} and have a syllogism. Well, what is mechanically going on?
Also, you should be able to situation the programming paradigm of Escher among the vast universe of programming paradigms that have been explored. Otherwise, programmers are lost. For example, if there's no directionality to the "circle" gates, is that because they are relations, and the connections between the circles are joins? Or are they perhaps declarative constraints? There are many existing programming languages that you could be describing, most of the time, and drawing things as nested circles or giving them wacky names doesn't explain how Escher differs from other programming languages.
So it reads like Wolfram's "A New Kind of Science" -- this is "A New Kind of Programming," but reading it doesn't give me a new way to look at programming, the way it promises to.
[1] https://github.com/gocircuit/circuit
[2] http://confreaks.com/videos/3421-gophercon2014-the-go-circui...
https://github.com/gocircuit/circuit
Which is a major piece of software that earns me my salary. if you kickstart what I want to be a non-profit software research foundation, gocircuit.org and escher.io, then the doc would be brilliant and interactive in no time flat :)So can this run programs in both directions? For example, orienting the NAND gate from "X NAND Y" to X and Y (i.e providing X NAND Y as say, TRUE) would generate the X and Y that could lead to the input? If we added that functionality to the basic gates (i.e allow running OR in reverse and have it return {(X=1,Y=0), (X=0,Y=1)} when given input (X OR Y=1)), and accumulated the possibilities at each step as a tree. Of course, it could take very long to run.
Actually, maybe it would even be possible simply fill in certain nodes and propagate out to all connected nodes, keeping track of possible inputs. So it can complete the whole graph (or connected component to be precise) with possible values given any random nodes filled out. So it can give you all possible executions subject to restrictions on any nodes values. That would be awesome!
OP - Does that make any sense? If it does, I may try to implement it and see what kinds of cool things we can do with it.
Is there anything fundamentally different in your idea?
(Someone else just posted this information, but that comment was auto-killed.)
And here are some concept images trying to describe how one would model circuitry in the language: https://patch-tag.com/r/worldsayshi/nodespace-staging/wiki/c...
I'm thinking I should use something like this for the back end: https://github.com/giorgidze/Hydra
How does this compare? What makes it specially useful for reasoning newer ideas. I've read some of the introduction about it using the PAC model, but can you give an example of how it goes about using that?
I like the idea of the language, I think it follows with Global Workspace Theory: https://en.wikipedia.org/wiki/Global_Workspace_Theory and Global Neuronal Workspace: https://en.wikipedia.org/wiki/Dehaene%E2%80%93Changeux_model
Say you compile 2 machine learning algorithm implementations. If the reverse compiler gives you an interface with a choice between say those 2 algorithms and a % accuracy rate with a visual representation this definitely sounds like a working idea of a global workspace theory. As it abstracts the complicated parts into simplistic choices that are selectable to be do-able in linear time with some statistics.
It's mostly systems programming research (IMO, at its best, given the poor state of the art nowadays), but at that intersection area with programming languages.
(...)
Why you should be excited:
It may seem that Escher is not more than a new semantic to do an old job. But something nearly magical happens when transition to using the Escher semantic—various compiler intelligence improvements that used to be NP-hard become simple and tractable."
Just there is no misunderstanding: any polynomially-bound choiceless computation (CPT+C) can be carried out by a polynomial time Turing machine, so choiceless computation does not buy you any extra power strictly speaking (CPT+C \subseteq P); and might even be less powerful than P [1].
That is not so say there might be low-hanging prefix-free benefits in average case applications due to better parallelism or easier use of heuristics, which seems to be what the author is pointing at. So be excited, but not unreasonably so.
In Clojure https://github.com/tgk/propaganda
https://github.com/jimwhite/clojure-propagator
https://github.com/zcaudate/kiran
talk at ClojureConj https://www.youtube.com/watch?v=JXOOO9MLvhs
Suppose two caps (AB) face the same direction, if they're diagonal, then you can flip the diagonal. Regardless of which caps flip, all caps will then have the same orientation.
If the two caps are along a side, then you perform a side flip. If you get the other two caps, or you flip AB, then all caps have the same orientation. If you flip one of the AB caps and one other, you now have a diagonal setup, which we have already solved.
If you have one cap, then flip a cap, you will either have two caps in the same orientation (which we know how to solve) or all caps in the same orientation.
Three caps is the same as one cap in the same orientation.
From my reading of this puzzle, you can't sample the board in order to capture the orientation of the caps. Hence, I don't believe there's a way you could reach an outcome.
Also, the base case doesn't work. Imagine there was one cap. You can choose to flip it or not flip it. Can you get everything in the up position without sampling the board?
"Can you devise a sequence that ensures they all face up? Down?"
No. Garbage in, garbage out.
The only thing I can think of that might be useful at the moment: repeatedly hammering some combination of sides and diagonals, causing some statistical pattern to emerge. But without knowing the origin states, not sure how to use that.
There's a similar problem here: http://gurmeet.net/puzzles/tumblers-on-a-rotating-table/
AB
BA
From here, flipping two opposit corners will result in all 4 being the same way. One step before: AA
BB
Flipping any two adjacent ones will either solve it or get you to the previous step.So from here, we can see that any state with two up and two down is solvable. The state with all four one way or the other is already solved. The only thing left is the state with just one out of line.
AB
BB
No matter which individual one is flipped, you are in a solvable state.Really?