Schmurtz has quit [Read error: 110 (Connection timed out)]
Revision17 has joined #ocaml
__mattam__ is now known as mattam
Banana has quit [Read error: 104 (Connection reset by peer)]
mattam has quit [Read error: 104 (Connection reset by peer)]
mattam has joined #ocaml
Banana has joined #ocaml
mikeX has joined #ocaml
Snark has joined #ocaml
mattam has quit [Connection timed out]
Banana has quit [Read error: 110 (Connection timed out)]
Tachyon76 has quit ["Leaving"]
Banana has joined #ocaml
mattam has joined #ocaml
mattam has quit [Connection timed out]
Banana has quit [Read error: 110 (Connection timed out)]
mattam has joined #ocaml
Banana has joined #ocaml
vodka-goo has quit [Remote closed the connection]
demitar_ has joined #ocaml
demitar__ has joined #ocaml
demitar_ has quit [Read error: 104 (Connection reset by peer)]
Demitar has quit [Read error: 110 (Connection timed out)]
bd__ has quit [Read error: 104 (Connection reset by peer)]
vodka-goo has joined #ocaml
Slick18 has quit [Client Quit]
rillig has joined #ocaml
Smerdyakov has joined #ocaml
Schmurtz has joined #ocaml
vodka-goo has quit ["Leaving"]
ellisonch has joined #ocaml
demitar_ has joined #ocaml
demitar__ has quit [Read error: 110 (Connection timed out)]
mikeX has quit ["later"]
ppsmimou has quit ["Leaving"]
mikeX has joined #ocaml
smimou has joined #ocaml
pango is now known as pangoafk
pangoafk is now known as pango
Submarine has joined #ocaml
Submarine has quit ["Leaving"]
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
slipstream has quit [niven.freenode.net irc.freenode.net]
rillig has quit [niven.freenode.net irc.freenode.net]
khaladan has quit [niven.freenode.net irc.freenode.net]
gim has quit [niven.freenode.net irc.freenode.net]
TaXules has quit [niven.freenode.net irc.freenode.net]
chimikal has quit [niven.freenode.net irc.freenode.net]
Poopsmith has quit [niven.freenode.net irc.freenode.net]
Oatmeat|umn has quit [niven.freenode.net irc.freenode.net]
Bigb[a]ng has quit [niven.freenode.net irc.freenode.net]
jer has quit [niven.freenode.net irc.freenode.net]
slipstream-- has joined #ocaml
mrsolo_ has joined #ocaml
slipstream has joined #ocaml
khaladan has joined #ocaml
gim has joined #ocaml
Poopsmith has joined #ocaml
chimikal has joined #ocaml
jer has joined #ocaml
Bigb[a]ng has joined #ocaml
Oatmeat|umn has joined #ocaml
TaXules has joined #ocaml
slipstream has quit [Remote closed the connection]
khaladan has quit [niven.freenode.net irc.freenode.net]
Poopsmith has quit [niven.freenode.net irc.freenode.net]
TaXules has quit [niven.freenode.net irc.freenode.net]
chimikal has quit [niven.freenode.net irc.freenode.net]
Oatmeat|umn has quit [niven.freenode.net irc.freenode.net]
Bigb[a]ng has quit [niven.freenode.net irc.freenode.net]
jer has quit [niven.freenode.net irc.freenode.net]
gim has quit [niven.freenode.net irc.freenode.net]
khaladan has joined #ocaml
rillig has joined #ocaml
gim has joined #ocaml
Poopsmith has joined #ocaml
chimikal has joined #ocaml
jer has joined #ocaml
Bigb[a]ng has joined #ocaml
Oatmeat|umn has joined #ocaml
TaXules has joined #ocaml
Submarine has joined #ocaml
Snark has quit ["Leaving"]
mrsolo__ has quit [No route to host]
CLxyz has quit [Connection timed out]
jer has quit [Success]
<twobitsprite>
what's the operator for exponents?
<pango>
# ( ** ) ;;
<pango>
- : float -> float -> float = <fun>
jer has joined #ocaml
slipstream has joined #ocaml
Plex has joined #ocaml
ski has joined #ocaml
slipstream-- has quit [Connection timed out]
Submarine has quit ["Leaving"]
JosephRivers has joined #ocaml
<JosephRivers>
Is there a way to make a copy of a record? I'm familiar with the {r with x = 3} construction but what do you do if you want to copy the record unchanged?
<dylan>
it's a given that the record has mutable fields, then?
<JosephRivers>
yeah.
<dylan>
let a' = { a with name = a'.name } comes to mind
<dylan>
where name is the mutable field.
<pango>
no, with name = a.name
Skal has quit [Remote closed the connection]
<dylan>
er, right.
<JosephRivers>
But there's no standard way to copy without having to specify redundant information like name = a'.name?
<dylan>
Not without invoking the secret magic of the ocaml implementation.
<pango>
yes, that's a bit sad
<dylan>
Even if ocaml gave you a way of copying the mutable fields, how deep must it copy?
<dylan>
A record with a string as a field, the string is mutable...
<pango>
doing the same as {a with name = a.name } without this ugly syntax would be enough for me
<pango>
the question about swallow copy of records has been discussed in caml weekly news (said google)
<dylan>
True.
CLxyz has joined #ocaml
<twobitsprite>
hmm.. I'm trying to convert an integer into a list of its digits (decimal)... the only thing I can think of would be to convert it to a string and then take substrings... can anyone think of a more elegan solution?
<pango>
divisions ?
<twobitsprite>
excuse my lack of formal programming/math education... but 124 / 10 -> 12... I've lost the 4...
<pango>
modulus ?
smimou has quit ["bli"]
<pango>
# let rec digits x =
<pango>
if x < 10 then [x]
<pango>
else x mod 10 :: digits (x / 10) ;;
<pango>
val digits : int -> int list = <fun>
<pango>
# digits 123 ;;
<pango>
- : int list = [3; 2; 1]
<twobitsprite>
that would do it, thanks
<twobitsprite>
I wish ocaml had a stepper like DrScheme...