Taaus changed the topic of #ocaml to: http://caml.inria.fr/oreilly-book/
MrSpook has joined #ocaml
MrSpook has quit ["ircII EPIC4-1.0.1 (RPM) -- Are we there yet?"]
jao has quit ["leaving"]
skylan_ has joined #ocaml
skylan has quit [Read error: 104 (Connection reset by peer)]
skylan_ is now known as skylan
skylan has quit [Read error: 104 (Connection reset by peer)]
skylan has joined #ocaml
malc has quit ["no reason"]
Cryptor has joined #ocaml
puffin has quit [carter.openprojects.net irc.openprojects.net]
puffin has joined #ocaml
Cryptor has quit [Success]
gl has quit [Read error: 113 (No route to host)]
gl has joined #ocaml
Dieb has joined #ocaml
<Dieb> lo all
<Dieb> let d=[|"A";"B";"C"|];; let main() = d.(2) <- "F";; will produce - : string vect = [|"A"; "B"; "F"|] => good! However, type en = {name:string; lst: string list; val: int};; let c= [|{name="A"; lst = ["B"; "C"]; val = 2};{name="B"; lst =["F"];val=3}|];; let main() = c.(0).val <- 0;; will produce : "L'étiquette val n'est pas mutable. " Why?
Demitar has joined #ocaml
gl has quit ["[BX] This BitchX's for you"]
<Dieb> anybody could tell me how to store a new value in a type? for exemple " a : lst = {name = "E"; lst = ["f"; "l"]; val = 5}" to store 4 in the val field of a ?
tav`` has quit [Read error: 110 (Connection timed out)]
<Demitar> Is the val field mutable_
* Demitar looks again...
<Demitar> If so then simply do: a.val <- 3;;
<Dieb> well, no it isn't. And i don't know how to declare a field mutable
<Demitar> Do it in the type definition, change 'val : int' to 'mutable val : int', or do the entire operation in a functional way, ie copy the whole object.
<Demitar> Look at section 1.4 and 1.5 http://caml.inria.fr/ocaml/htmlman/manual003.html
<Dieb> ok for the first solution. But i don't see what you mean with the second
<Dieb> ok thx for url, i will take a look
gl has joined #ocaml
<Demitar> Hello gl.
<gl> hi demitar
gl has quit ["Fermeture du client"]
Demitar has quit []
physarum has joined #ocaml
gl has joined #ocaml
Yurik has joined #ocaml
Yurik has quit ["Client Exiting"]
Yurik has joined #ocaml
gl has quit [Read error: 113 (No route to host)]
gl has joined #ocaml
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
* Yurik sent a patch for emrg to Ohad
Demitar has joined #ocaml
<Demitar> Is there a way to access htonl or equivalent from ocaml?
Yokay has joined #ocaml
Yokay has left #ocaml []
* Demitar mutters about the stolen bit on unboxed integers... defies all the glory of external htonl : int -> int = "htonl";;
mockturtle has quit ["Client Exiting"]
* Yurik is thinking on nested module namespaces for ocaml
<Demitar> How would I turn a nativeint into a string, array of chars or whatever? (Want to append it to a buffer.)
MrSpook has joined #ocaml
MrSpook has quit ["ircII EPIC4-1.0.1 (RPM) -- Are we there yet?"]
vect- has joined #ocaml
gl has quit [Remote closed the connection]
Yurik has quit ["Client Exiting"]
vect- is now known as gl
}Topaz{ has joined #ocaml
<}Topaz{> Has anybody successfully compiled OCamlSDL as a native windoze binary?
<}Topaz{> My attempts fail on it being unable to find the 'local_roots' external
Yokay has joined #ocaml
Yokay has left #ocaml []
scipient has joined #ocaml
<smkl> try adding -custom if you are using bytecode
<Demitar> Is there a nice way to build a list in a for loop?
<smkl> nope
<Demitar> Perhaps I should pass the number in recursively then...
<Demitar> That would probably use even more space though (it's a one line builder).
<Demitar> Or I choose the nasty path and builds a list of the numbers...
<Demitar> Otoh it probably is cleanest to build an array...
Demitar has quit []
malc has joined #ocaml