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)