|Svrog||so is there a switch in build.mk to enable support for the -N RTS option?|
|MyCatVerbs||Ow, ow, my head.|
|ddarius_||Drive nails with a hammer, not your head.|
|MyCatVerbs||Referential transparency means you can replace any function f with any function g provided g always maps the same inputs to the same outputs as f, right?|
Referential transparency also applies to the IO monad, though. Haskell is awesome like that.
But one problem. You are -never- going to be able to feed both f and g the same universe to see if they give the same results for the same inputs. Can't be done, because the universe will have changed in between testing one and the other.
|ddarius||Precisely: Referential transparency means you can replace a reference to a variable with it's definition.|
MyCatVerbs: But we usually don't care about -all- the details of the universe.
|MyCatVerbs||So if we want to check monadic functions for referential transparency, we'll need a method of creating and annihilating -universes- in order to do so.|
|skew||MyCatVerbs: IO, maybe. For other monads it's easier|
|ddarius||MyCatVerbs: And regardless, we can't check any (partial) functions for equality extensionally in general.|
|MyCatVerbs||ddarius: and yet I am still excited by the prospect of blasting every last atom, quark and leptop in all creation into fuzzy nonexistent shit, multiple times, just for the sake of unit testing. =D|
|skew||like, with State you can just feed in different states|
MyCatVerbs: that's why I would like to prove things instead - I like my atoms
|MyCatVerbs||skew: jah, but really what it's all about is I want an excuse to blow the universe up multiple times.|
|skew||anyway, it's more something you assume the compiler provides, and then use it to abstract out repeated actions|
|ddarius_||MyCatVerbs: One never needs an excuse to do that.|
|skew||Referential transparency with IO doesn't really give you much more than making funtions of no arguments in imperative languages|
|MyCatVerbs||ddarius_: I'm thinking that'd be a -much- cooler feature to add to ghc than automatic deforestation.|
|Svrog||oops.. -N does work after all - just had to remove a space between -N and the number of threads hehe|
|skew||but I like it a bit better, maybe just for lighter syntax on value definitions|
|MyCatVerbs||ddarius_: good optimization strategy, too. Just keep blowing up universes until you find one which contains a globally optimal implementation of your program.|
|ddarius_||MyCatVerbs: Well, get to it.|
|skew||MyCatVerbs: that doesn't get you much more than NP|
MyCatVerbs: PP tops
|ddarius_||skew: Sure it does, time is part of the universe.|
|MyCatVerbs||ddarius_: believe it or not, this is only the second stupidest idea I've ever had related to computation. =D|
|skew||well, those bounds are for computing, and then destroying the universe if you don't like the answer, then assuming you continue to exist|
|MyCatVerbs||skew: depends on the rate of universe creation, though.|
skew: if we can spin off universes at a constant, finite rate then, we can get exponential algorithms happily. You spawn one universe, you spawn a second universe and your first universe spawns its own extra universe...
|SamB||MyCatVerbs: I want to know how we land ourselves in a universe with the answer|
|MyCatVerbs||skew: on the other hand, what if we made a machine to spin off or destroy universes with a cardinality of |N| per step? We could hit all of PSPACE in a single step for any problem on discrete numbers.|
|ddarius_||SamB: It happens for free.|
is this like with the list monad?
|SamB||so how do we destroy the universes we don't like?|
|ddarius_||SamB: The universe relevant to us will be the one in which the right answer exists and we exist in it.|
|MyCatVerbs||SamB: oh easy, you just blow up all the universes that don't contain the answer. The only one we -percieve- is the successful universe, because all the other versions of us have been atomized, our atoms quarked and our quarks reduced to a fine quantum mush.|