gl changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn , A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ , A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list | http://icfpcontest.org/ !!
GreyLensman has joined #ocaml
buggs|afk has joined #ocaml
buggs^z has quit [Read error: 60 (Operation timed out)]
mfurr has joined #ocaml
GreyLensman has quit ["Leaving"]
bk_ has joined #ocaml
anyone has joined #ocaml
mfurr has quit ["Client exiting"]
reltuk has joined #ocaml
Herrchen has quit [Read error: 110 (Connection timed out)]
cmeme has quit [Dead socket]
cmeme has joined #ocaml
Herrchen has joined #ocaml
Vekza has joined #ocaml
anyone has quit ["To understand recursion, you must first understand recursion."]
gim has joined #ocaml
Snark has joined #ocaml
<Snark> slt
<bk_> salut
mrsolo has joined #ocaml
Vekza has quit [Remote closed the connection]
Vekza has joined #ocaml
reltuk has left #ocaml []
bk_ has quit ["I'll be back"]
mrsolo has quit ["Leaving"]
gim_ has joined #ocaml
gim has quit [Read error: 104 (Connection reset by peer)]
vegai has joined #ocaml
slashvar has quit [Read error: 104 (Connection reset by peer)]
_fab has quit []
bk_ has joined #ocaml
karryall has joined #ocaml
fab has joined #ocaml
fab is now known as _fab
engstad has joined #ocaml
<engstad> Anyone out there?
<Snark> engstad: just ask your question... with luck someone will answer one day or the next
<engstad> :-)
<engstad> Ok, here goes. I've got the following type: type expr = Const of int | Unary of expr * tag | Binary of expr * expr * tag
<engstad> I want to convert this to commands: type cmd = Copy of addr * addr | Unop of addr * addr | Binop of addr * addr * addr
<engstad> Now, here's the thing, I want to reduce number of temporaries..
<engstad> Btw, this is an analogy, not the real thing.
<engstad> So, I know where the result of the expression goes, so I need to give the destination address as a parameter to the convert function.
<engstad> However, that Unary is really kind of a "copy to another destination".
<engstad> So, although in most cases I know of, if you have: (A*B)*(C*D), you create a temp: T1 = A*B, DST = C*D, DST = DST * T1, there is now a possibility that I don't need the temp.
<engstad> If the unary is called ~, then if I have (~A*B)*(C*D), then I can do the following:
<engstad> [hmmm.... let me think.]
<engstad> Oh, no, let's make that: [~(A*B)]*(C*D), then now I should use the "save" address corresponding with ~, so: S1 = A*B, DST=C*D, DST = DST * S1.
* Snark is lost
<Snark> let's hope someone more knowledgeable will see & understand
<engstad> Hehe, me too.
<engstad> I'm sure it's easier than I think..
cjohnson has quit [Read error: 60 (Operation timed out)]
vezenchio has joined #ocaml
slashvar has joined #ocaml
sawii has joined #ocaml
fariseo has quit []
fariseo has joined #ocaml
Lemmih has quit [Read error: 110 (Connection timed out)]
Lemmih has joined #ocaml
smimou has joined #ocaml
Shammah has joined #ocaml
Demitar has joined #ocaml
__DL__ has joined #ocaml
_DL_ has joined #ocaml
_DL_ has quit [Read error: 54 (Connection reset by peer)]
__DL__ has quit ["Bye Bye"]
fariseo has quit [Read error: 104 (Connection reset by peer)]
fariseo has joined #ocaml
Shammah has quit [Read error: 110 (Connection timed out)]
sawii has quit ["Leaving"]
cmeme has quit [Operation timed out]
smimou has quit [Read error: 60 (Operation timed out)]
smimou has joined #ocaml
karryall has quit ["home"]
cjohnson has joined #ocaml
_fab has quit [Read error: 110 (Connection timed out)]
cmeme has joined #ocaml
sawii has joined #ocaml
Anvil_Vapre has quit [Remote closed the connection]
sawii has quit ["Leaving"]
mattam_ has joined #ocaml
mattam has quit [Nick collision from services.]
mattam_ is now known as mattam
maihem has joined #ocaml
noss has joined #ocaml
bk_ has quit ["I'll be back"]
__DL__ has joined #ocaml
engstad has quit ["Leaving"]
systems has joined #ocaml
systems has quit ["leaving"]
Snark has quit [Read error: 110 (Connection timed out)]
fab__ has joined #ocaml
noss has quit [Client Quit]
monotonom has joined #ocaml
__DL__ has quit ["Bye Bye"]
fab__ has quit []
Shammah has joined #ocaml
gim_ has quit ["--"]
Axioplase has joined #ocaml
<Axioplase> Chat Lu!
<Axioplase> (hi)
<Axioplase> err.. i want use use a var of type mode=Foo|Bar and then match var with Foo and Bar. And i want to be able to modify this var. seems i cant do let var=ref Foo;; what should/could i do then ?
<Riastradh> What do you mean 'I can't do [[let var = ref Foo]]?'
<Axioplase> i can, but i can't match var with |Foo-> nor match var with |!Foo->
<Riastradh> Try [[match !var with ...]].
<Axioplase> hum..let's give it a try.
<mellum> Why don't you just use if !var = Foo?
<Axioplase> This expression is not a function, it cannot be applied
<Riastradh> What expression is not a function?
<Axioplase> mellum: because i m gonna have more than just two cases.
<Axioplase> "|Destruction->begin"
<Axioplase> type game_mode= Destruction|Reactor;; let mode=ref Destruction;; as for now.
<Riastradh> Little snippets of code are no help. Paste the code _IF_ it's fewer than eight lines, or make it available on the web somewhere.
smimou has quit ["?"]
<Axioplase> I won't flood. looking for a pastebot (have one in my logs)
<Riastradh> And what is annihilation_keys?
<mellum> Riastradh: a comment :)
<mellum> anyway, that source just contains a few unbound identifiers, can't see any other errors
<Axioplase> Riastradh: not coded yet. it will read for keys inputted while the annihilation is going on (in fact, that code is in a while loop)
<Riastradh> So if you don't have it yet, how do you expect OCaml to accept that code?
<mellum> It's a new programming paradigm. It's called Programming by Wishful Thinking.
<Riastradh> ...or is '|Destruction->begin' line 622, and the annihilation_keys call commented out in your actual code?
<_jpl_> mellum: That's the oldest paradigm there is. :)
<Axioplase> indeed.
<Riastradh> That seems rather strange.
<mellum> Oh well, I need to go to bed now... g'night
<Axioplase> (somewhere in the blablabla, mode is set with mode:=Destruction;)
<Axioplase> ++ mellum
<Axioplase> ok, i missed a ";" after the last end...
monotonom has quit ["Don't talk to those who talk to themselves."]
farizeo has joined #ocaml
fariseo has quit [Read error: 60 (Operation timed out)]
Vekza has quit ["Leaving"]
Shammah has quit [Read error: 60 (Operation timed out)]
JPL-Justin-away has quit [Read error: 110 (Connection timed out)]
JPL-Justin-away has joined #ocaml
mfurr has joined #ocaml
vezenchio has quit ["--- reality is that which, when you stop believing in it, doesn't go away ---"]