Forum category: Hidden / Per page discussions

Forum thread: Moggi :: CT -> Hask ]]>

Forum category: Hidden / Per page discussions

Forum thread: Moggi :: CT -> Hask ]]>

Forum category: Hidden / Per page discussions

Forum thread: In Praise of Elitism ]]>

Forum category: Hidden / Per page discussions

Forum thread: In Praise of Elitism ]]>

Forum category: Hidden / Per page discussions

Forum thread: Fixing Haskell IO ]]>

Forum category: Hidden / Per page discussions

Forum thread: In Praise of Elitism ]]>

Forum category: Hidden / Per page discussions

Forum thread: Fixing Haskell IO ]]>

Forum category: Hidden / Per page discussions

Forum thread: In Praise of Elitism ]]>

Forum category: Hidden / Per page discussions

Forum thread: Fixing Haskell IO ]]>

Forum category: Hidden / Per page discussions

Forum thread: "Computation" considered harmful. "Value" not so hot either. ]]>

Forum category: Hidden / Per page discussions

Forum thread: "Computation" considered harmful. "Value" not so hot either. ]]>

Forum category: Hidden / Per page discussions

Forum thread: "Computation" considered harmful. "Value" not so hot either. ]]>

Forum category: Hidden / Per page discussions

Forum thread: Programming Language Semiotics ]]>

Forum category: Hidden / Per page discussions

Forum thread: Programming Language Semiotics ]]>

Forum category: Hidden / Per page discussions

Forum thread: Programming Language Semiotics ]]>

Forum category: Hidden / Per page discussions

Forum thread: Moggi :: CT -> Hask ]]>

Forum category: Hidden / Per page discussions

Forum thread: Moggi :: CT -> Hask ]]>

Forum category: Hidden / Per page discussions

Forum thread: Moggi :: CT -> Hask ]]>

Discount Sunglasses http://www.bestsunglassesbrand.com

Moncler Down http://www.frbestmoncler.com

Sunglasses for Glasses http://www.worstsunglassesbrand.com

Discount Nike Sneakers http://www.nikerwo.com

Forum category: Hidden / Per page discussions

Forum thread: Pernicious Myth No. 1: The Container Fiction ]]>

Discount Sunglasses http://www.bestsunglassesbrand.com

Moncler Down http://www.frbestmoncler.com

Sunglasses for Glasses http://www.worstsunglassesbrand.com

Discount Nike Sneakers http://www.nikerwo.com

Forum category: Hidden / Per page discussions

Forum thread: Moggi :: CT -> Hask ]]>

Discount Sunglasses http://www.bestsunglassesbrand.com

Moncler Down http://www.frbestmoncler.com

Sunglasses for Glasses http://www.worstsunglassesbrand.com

Discount Nike Sneakers http://www.nikerwo.com

Forum category: Hidden / Per page discussions

Forum thread: In Praise of Elitism ]]>

Discount Sunglasses http://www.bestsunglassesbrand.com

Moncler Down http://www.frbestmoncler.com

Sunglasses for Glasses http://www.worstsunglassesbrand.com

Discount Nike Sneakers http://www.nikerwo.com

Forum category: Hidden / Per page discussions

Forum thread: Formal semantics for side effects ]]>

Discount Sunglasses http://www.bestsunglassesbrand.com

Moncler Down http://www.frbestmoncler.com

Sunglasses for Glasses http://www.worstsunglassesbrand.com

Discount Nike Sneakers http://www.nikerwo.com

Forum category: Hidden / Per page discussions

Forum thread: Programming Language Semiotics ]]>

http://www.nikerbo.com

http://www.jordanhut.com

http://www.bestmonclerhut.com

Forum category: Hidden / Per page discussions

Forum thread: Pernicious Myth No. 1: The Container Fiction ]]>

http://www.nikerbo.com

http://www.jordanhut.com

http://www.bestmonclerhut.com

Forum category: Hidden / Per page discussions

Forum thread: In Praise of Elitism ]]>

http://www.nikerbo.com

http://www.jordanhut.com

http://www.bestmonclerhut.com

Forum category: Hidden / Per page discussions

Forum thread: Formal semantics for side effects ]]>

http://www.nikerbo.com

http://www.jordanhut.com

http://www.bestmonclerhut.com

Forum category: Hidden / Per page discussions

Forum thread: Moggi :: CT -> Hask ]]>

http://www.nikerbo.com

http://www.jordanhut.com

http://www.bestmonclerhut.com

Forum category: Hidden / Per page discussions

Forum thread: Programming Language Semiotics ]]>

Forum category: Hidden / Per page discussions

Forum thread: Pernicious Myth No. 1: The Container Fiction ]]>

So, your objection amounts to a confusion about "actions" and "values". As it happens, an action is a specific type of value. Ignoring this "specific type of action" clause is leading to your confusion. An action is a "monadic" value. A specific kind of value. To get at what "monadic" means in this context, we have to talk about functors and monads.

A functor is a function which maps a type to another type, while preserving the algebraic structure of the first type. In other words, an embedding of an algebra into another algebra. For example, the identity functor:

data Id x = Id x — where fmap f (Id x) = Id (f x)

is a function that takes x's from some algebra, and returns the "same" algebra, only each of the elements have the "tag" (Id) attached to them. This functor is an isomorphism. No "container fallacy" or whatever here. A functor attaches things to elements in an algebra — in this case, the "token" (Id). Given a value x, we'll call its corresponding functorial value (in this case Id x) a "functorial value".

A monad is a specific kind of functor, which has some associated functions called bind and return. I won't go into the axioms. But the point is, given a monad (which is a functor), we'll call its functorial values "monadic values" or "actions".

Forum category: Hidden / Per page discussions

Forum thread: Fixing Haskell IO ]]>

Forum category: Hidden / Per page discussions

Forum thread: Moggi :: CT -> Hask ]]>

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Thanks,

gregg

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Thanks, this is a very useful way of putting it. I started out trying to think in purely mathematical terms and not paying any mind to implementation stuff like how things are represented, but obviously at some point one would have to leap the chasm between math and actual languages and compilers. The kind of language you use here is an excellent way to integrate these two worlds.

Thanks,

gregg

Forum category: Hidden / Per page discussions

Forum thread: Pernicious Myth No. 1: The Container Fiction ]]>

Actually I'm not sure it does demolish it. My original motivation was thinking about the ontology of mathematical objects. ZF set theory is just another *representation* of mathematical objects. The lambda operator captures what I'm getting at better: given a formula like $x+2$, the corresponding lambda expression $\lambda x.x+2$ denotes the function *associated with* the formula (Church's words, my emphasis). In other words it just gives us a way to refer to the function (mathematical object) without naming it, but it doesn't say anything about what it *is*, except that it corresponds to the formula. In Z notation, one could use set comprehension notation to refer to the same object, something like $\{ (x,y) | y = x+2 \}$ (read "the set of all pairs $(x,y)$ satisfying the predicate $y = x+2$".) Ok, a set is about as containerish is it gets, but the point is we cannot privilege that representation by saying a function *is* a set of ordered pairs.

In any case your post(s) are a good reminder that most programmers are going to be coming from a practical, bottom-up perspective - thinking in terms of machine and language-specific concepts - whereas I'm trying to start with the theoretical, purely mathematical stuff and work my way down to the bits. But the kind of programmers who work with LISP dialects and FP languages are probably going to think in terms of a mix of theoretical and implementational (machine, specific language) ideas, so I think the trick (if one were to try to write e.g. a guide to Haskell from the top-down perspective) is to be very clear about the theory/practice distinction and show how they match up.

Thanks,

gregg

Forum category: Hidden / Per page discussions

Forum thread: Pernicious Myth No. 1: The Container Fiction ]]>

I think for most people it would be a stretch to think of a function as containing anything

not those familiar with Scheme… :) They'd think right away in terms of function call frames holding their lexical bindings.

Maybe a container metaphor is not such a bad idea to hold as long as we realize it's just a metaphor (*"denotes containment"* — what a great way of putting it!). If some value can be retrieved reliably, repeateably, from an "object", it's only natural to think of that value being contained by it.

How the held value is retrived from a curried function `fooa = foo a` (that is what it is, right) or from list, is two different things; so the mechanics of how a function is lifted over to them are different too - since it all eventually boils down to how and by what means the access is performed. So,

`liftL f (a:as) = f a : liftL f as`

— access on list is patter-matching

`liftS f fooa s = (f a, s') where (a,s') = fooa s`

— access on fooa is by ($ s)

But the meaning is the same. Both versions are just reductions of `(liftM f = m »= (return.f))`.

So here the container metaphor looks helpful in understanding.

Forum category: Hidden / Per page discussions

Forum thread: Pernicious Myth No. 1: The Container Fiction ]]>

As long as we can't (literally) get beyond Kant's theory of perception things can go in any direction, or nowhere in particular. Regardless of his beautiful framework Turing's ideas and indeed our modern computers are subject to the same theory of perception.

Steven

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

In concrete languages, when we use "struct" we know what's going on internally. In Haskell, we don't.

The compiler is free to choose whatever concrete representation it pleases for a given abstract construct, as long as its behaviour is as prescribed.

Forum category: Hidden / Per page discussions

Forum thread: Pernicious Myth No. 1: The Container Fiction ]]>

If you'll allow my trying to rephrase you in more simple terms (so it is easier for me to understand), it's all about a distinction between an abstract mathematical concept and its concrete implementation inside the machine i.e. run-time system. A distinction between the inside pure world of Haskell compiler, and the outside real world of its run-time system implementation.

We are too imperatively inclined and are used to think in terms of concrete representations. To take your example of a pair, it _can_ actually be represented - inside run-time system world - by a C struct with two fields. Or if we use Scheme, by a tagged cons chain. Or by nothing at all - if it is all "compiled out" into its basic components as e.g. C's global variables.

And this is the main point. What it all means, is that the compiler is allowed to "compile it all out" into the thin air. What it means, is that from the mathematical perspective - from inside the pure Haskell world now - every object is an opaque entity which can only be known to us through its prescribed transactions (re: ADT via functional interfaces). IOW an object is defined by what we can do with it, ask of it, ask from it. By transactions we can get involved with it.

And that has got nothing to do with its concrete representations chosen by the implementation. And so a list - from the pure standpoint - is not a list, but an object which can be asked LENGTH? (!!)? and participate in (:). The list image inside the run-time implementation can be anything that will give us same answers to same questions. Or it can be nothing at all, as long as we get the same answers to same questions we pose using its "name" that holds its "value". As long as there's Repeatability and Predictability exhibited by our program/run-time system/implementation.

Forum category: Hidden / Per page discussions

Forum thread: Pernicious Myth No. 1: The Container Fiction ]]>

-g

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

It's indeed a rather disturbing if not terrifying prospect that we may turn out to be mere computing devices of some sort. I gather Godel could never quite bring himself to believe it. Personally I suspect there will always be some corner of the mind that resists mechanistic explanation; but that may turn out to be small comfort if science can reduce most of the stuff we think makes us human down to machine dynamics. Well, we'll probably destroy the earth before we get to that point, so maybe it doesn't matter. ;)

Thx,

gregg

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

That a turing m/c can manipulate abstract meaningless

This was a huge insight, becasue everyone till then thot of computers as 'number' manipulators. 1+2 = 3 type stuff.

This insight allowed Turing to do Crptanalysis. And gave us Sketchpad. And Photoshop. And Winamp. And porn DVDs..

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

The problem with the converse of Turing's observation about human computation, that human thought could be nothing but computation, is a frightening prospect. It opens the Pandora's Box of fears that our thoughts could be mechanically rendered, processed, altered or reproduced by a machine, with or without our consent.

Steven Pinker mentioned in one his books an alternative: the hypothesis that the brain is composed of neurological organs: the hypothalumus, the pineal glands, the neocortex, and so on. There's evidence that the brain is composed of many "sub-computers" - like a motherboard that has many more processors than the CPU, what with the PCI bridge, the memory controller, DMA/interrupt controllers, etc. So "computation" (a person doing math on paper) could be the result of one section of the brain at work, but other sections do facial recognition, emotion, association, memory processing, vision, and so on.

At a low level, neurons ARE just computation: axons and dendrites tossing volts across synapses.

If you believe in a soul, there's another possibility. The brain is just an organ of computation, but its results are served/returned to the consciousness (which is not the brain) for consideration. This would be like the Buddhist idea that the reality all around you is just an illusion, like the image on a TV screen inside a submarine control room so the pilot & crew can see what's outside the opaque walls of the sub. The image on the screen is not real, but it's a representation of what the optics are recording and trying to render with high fidelity. There really is a giant squid off the starboard bow, but everyone on board knows that shooting a few rounds with their sidearm into the TV monitor on the bridge won't kill the real squid. So the squid is reality. The TV is the image synthesized by the brain from the grainy data obtained from your eyes. You are the captain, the ghost inside your machine. And the crew of the submarine are the component chunks of your brain, obeying (kinda/sorta) your every whim at your command.

But that's just another hypothesis.

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

…but Godel proved that systems complex enough to be self-referential (i.e. to reason about their axiomatic structure) have an infinite number of axioms, and others following him (e.g. Chaitin) have shown that the axioms must be infinite in kind (not just trivial syntactic extensions of previous axioms). Therefore humans (or at least their possible mental states) are infinite, by your own mechanist reasoning. Anything infinite is quite metaphysical, by definition.

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Regarding selecting things from a set, I understand what you're getting at … but if I know something in advance I suspect might be in a set, I can certainly see if it's in there, and if it is, I can then form the new set, as a predicate, which returns false for the thing in question and defers to the original predicate on everything else. This is only possible if I know what to look for in advance, but in a typed context it might be possible in principle (if not efficient) to enumerate the possibilities.

Forum category: Hidden / Per page discussions

Forum thread: Intergalactic Telefunctors and Quantum Entanglement ]]>

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Especially with his appendix showing the equivalence of his machines with the Lambda Calculus, Turing made it very evident that any system of a certain level of power had the same capabilities in terms of computation - including the human mind. The implication that the human mind can be modeled by a turing machine or any other kind of computer was the fuel that fed the fire of research in theoretical Computer Science for at least the following 3 decades.

Turing's paper is still not an easy read. I recommend Charles Petzold's 'Annotated Turing' (2008), especially for the historical background.

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

As for 'intuition', it's not metaphysical. Humans are machines grounded in the axioms that define this universe.

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

It's of course not a new insight; it's right there in black and white in Turing's original paper. But it is vastly underappreciated (IMHO) and rather more subtle the might first appear. What seems obvious to us now took an extraordinary bit of imagination.

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Compiler is free to reduce everything it can down to the ready-made answer, when all input values are known. Then the only job run-time will be left with is print the answer string to a terminal.

If there are some unknowns involved - marked as such by being in IO monad - compiler can go no further than certain steps involving the unknown values placeholders. Then what we're left with (if the compilation is done to its fullest) is what the run-time will run, the imperative, set-once, strict program.

The values of type `IO a` describe these left-over programs.

Here's one possible sketch-out of IO monad along these lines:

`data IO a = IORec -> (a,IORec)` — record of I/O activities to be performed

`instance Monad IO where return a rec = (a,rec) — :: IO a putStrLn a rec = ((),rec ++ [("putStrLn", a)]) — :: IO () (m »= g) rec = uncurry g $ m rec`

Inside the pure world of Haskell the IO monad just builds up these records of promises to perform I/O activities, if called upon, by the run-time system.

A user writes IO-bind chainable functions of type `:: a -> IO b` - we can call them IO-action functions - in terms of the IO primitives like `return` and `putStrLn` and combines them by means of bind into chains. I/O requests get recorded behind the scenes without the record ever being explicitly referred to by a user.

When the time comes, the system will supply an initial (empty) record value, and the record of I/O to be performed built on the inside will get interpreted by some interpreter on the outside in the run-time, and actual I/O actions will get performed. The same I/O requests record (IO value), defined once, may be run several times by the system, or not at all.

Forum category: Hidden / Per page discussions

Forum thread: Fixing Haskell IO ]]>

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

It reads: "To be a perfect computing* machine, one does not need to know arithmetic."

- Used in the same way the article does, a person doing calculations.

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>

Forum category: Hidden / Per page discussions

Forum thread: Turing's Euclidean Stroke of Genius ]]>