cjohnson has quit ["Drawn beyond the lines of reason"]
phj has joined #ocaml
noss has quit [Remote closed the connection]
Lemmih has quit [Read error: 110 (Connection timed out)]
phj has quit ["ChatZilla 0.9.61 [Mozilla rv:1.7b/20040316]"]
JPL-Justin is now known as JPL-Justin-away
Meta has joined #ocaml
Meta_ has quit [Read error: 60 (Operation timed out)]
smkl has quit [Read error: 110 (Connection timed out)]
smkl has joined #ocaml
Shammah has joined #ocaml
Meta_ has joined #ocaml
Meta has quit [Read error: 110 (Connection timed out)]
vezenchio has quit ["--- reality is that which, when you stop believing in it, doesn't go away ---"]
bk_ has joined #ocaml
bk_ has quit ["I'll be back"]
<malte>
uhm. is "let rec loop = match ... with ... in" not permitted? i get this compiler error: "This kind of expression is not allowed as right-hand side of `let rec'"
<malte>
a while-loop works however... why is that?
_JusSx_ has joined #ocaml
<Demitar>
malte, you're binding a value and not a function most probably.
<malte>
aha.. i need to do "let rec loop () = ..." :)
<malte>
that _is_ the proper way to do it, isnt it?
<Demitar>
Well, a recursive function with only a unit argument looks kind of suspicious to me. ;-) Unless it's an imperative mainloop or some such.
<malte>
yeah, it is :)
<malte>
i suppose i might just as well implement it as a while-loop after all
<malte>
thanks btw ;)
<Demitar>
Well, if the match makes the code clearer you should probably stick to it. But in most cases a while loop is a more appropriate idiom for such things. (I think. :)
<malte>
ok :)
Shammah has quit ["ChatZilla 0.9.35 [Mozilla rv:1.5/20030925]"]
mattam has quit [Read error: 60 (Operation timed out)]
mattam has joined #ocaml
SpookRijder has joined #ocaml
_JusSx_ has quit ["BitchX: it's not for the tabkey impaired!"]
noss has joined #ocaml
smklsmkl has joined #ocaml
smkl has quit [Read error: 110 (Connection timed out)]
bk_ has joined #ocaml
cjohnson has joined #ocaml
RichiH has joined #ocaml
RichiH has left #ocaml []
Deknos has joined #ocaml
<Deknos>
hi
smklsmkl has quit [Read error: 60 (Operation timed out)]
<Deknos>
i have a little problem. i want to build a function in ocaml, which parameters are an array, an index, and a value. i want, that my function returns the whole (changed with the one index and value) array, but all i can create is a function which returns a unit
<Deknos>
could anyone help me?
<Deknos>
my function now is let (array,index,value) = let neu = Array.copy in neu.(index) <- value;;
<Deknos>
between let and the tuple there is my function name, i forgot
<Banana>
and Array.copy array too.
<Banana>
easy.
<Banana>
you can do something like :
<Banana>
let f (a,i,v) = let neu = Array.copy a in a.(index) <-v; (neu.i.v);;
<Banana>
arf
<Banana>
(neu,i,v);; of course
<Banana>
crap.
<Banana>
it's neu.(index) <- v too.
<bk_>
btw, how long have you been using ocaml, banana ?
<Banana>
when i started university...
<Banana>
which is hum... 5 years ago ?
<bk_>
oic
<Deknos>
thank you Banana
<Deknos>
really :)
<Banana>
nothing.
<Deknos>
for you, but not for me *g*
smklsmkl has joined #ocaml
maihem_ has joined #ocaml
bk_ has quit [Read error: 110 (Connection timed out)]
maihem has quit [Read error: 110 (Connection timed out)]
SpookRijder has left #ocaml []
m[kel[ has joined #ocaml
smklsmkl has quit [Read error: 110 (Connection timed out)]
smklsmkl has joined #ocaml
rox has quit [Read error: 60 (Operation timed out)]
m[kel[ has quit [Read error: 110 (Connection timed out)]
Deknos has quit ["Leaving"]
Lemmih has joined #ocaml
Lemmih has left #ocaml []
evil-eddie has quit ["Client exiting"]
karryall has joined #ocaml
bk_ has joined #ocaml
bk_ has quit ["Terminated with extreme prejudice - dircproxy 1.0.5"]
bk_ has joined #ocaml
smklsmkl is now known as smkl
shawn_ has joined #ocaml
shawn has quit [Read error: 104 (Connection reset by peer)]
maihem_ is now known as maihem
_shawn has joined #ocaml
anyone has joined #ocaml
shawn_ has quit [Connection timed out]
drWorm_ is now known as drWorm
<drWorm>
i have an existing module that i want to extend with a couple of additional functions. is there any good way to do this, without altering the original module itself? can i use functors or something?
<Smerdyakov>
module NewOne = struct open Old One let f x = x end
<Smerdyakov>
er
<Smerdyakov>
module NewOne = struct open OldOne let f x = x end
<Smerdyakov>
:)
<drWorm>
is that it? cool :)
_JusSx_ has joined #ocaml
<karryall>
no, module NewOne = struct include OldOne let f x = ... end
<Smerdyakov>
Ah. It is different in SML.
<noss>
I'm planning to simulate an internet routing protocol involving several nodes. Anyone know if there is any ocaml code to base such a thing on?
<noss>
It is not entirely different from running vhdl simulations.
<drWorm>
yes, include worked fine, thanks karryall
maihem has quit ["Client exiting"]
rox has joined #ocaml
Vekza has joined #ocaml
ashanks has joined #ocaml
ashanks has quit [Client Quit]
vezenchio has joined #ocaml
Vekza has quit ["Leaving"]
karryall has quit ["."]
smkl has quit [Read error: 110 (Connection timed out)]
smkl has joined #ocaml
det has joined #ocaml
JPL-Justin has joined #ocaml
<JPL-Justin>
Greetings all!
_JusSx_ has quit ["[BX] Eat, drink and be merry...for tomorrow we die"]
Vekza has joined #ocaml
maihem has joined #ocaml
JPL-Justin has quit [Read error: 60 (Operation timed out)]
smkl has quit [Read error: 60 (Operation timed out)]
smkl has joined #ocaml
drWorm has quit [Read error: 60 (Operation timed out)]