tty56 has quit [Read error: 60 (Operation timed out)]
pants1 has quit [Remote closed the connection]
mrsolo has quit [Read error: 104 (Connection reset by peer)]
doctormach has joined #ocaml
ikaros has joined #ocaml
<tristram>
just to be sure (I tend to overlook obvious things) : there is no way to do a kind of "in place" map on arrays : aka let a=[|1;2|] in Array.mymap (fun x->2*x) a (* a is now[|2;4|] *)
buluca has joined #ocaml
CRathman has joined #ocaml
david_koontz has quit []
<Yoric[DT]>
You mean some kind of array comprehension ?
<Yoric[DT]>
Oh, understood.
<Yoric[DT]>
afaik, there's no way to that -- except that's exactly what "for" is, well, designed for.
<tristram>
yup, but i don't really need the index, just to apply a function; but no big deal, mostly curious about the differents ways to do the same thing
<Yoric[DT]>
Perhaps iter ?
<flux>
or iteri
dbueno has quit ["This computer has gone to sleep"]
david_koontz has joined #ocaml
<Yoric[DT]>
Wouldn't be very hard to write such a function, mind you.
<Yoric[DT]>
About one line, I'd say...
<tristram>
sure :)
darinm has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
ikaros has quit ["segfault"]
darinm has quit [No route to host]
buluca has quit [No route to host]
Tetsuo has quit ["Leaving"]
bzzbzz_ has joined #ocaml
gim has quit [Read error: 110 (Connection timed out)]
gim has joined #ocaml
CRathman has quit [Connection timed out]
bzzbzz has quit [Read error: 110 (Connection timed out)]
bluestorm_ has joined #ocaml
smimou has quit ["bli"]
smimou has joined #ocaml
l_a_m has quit [Remote closed the connection]
david_koontz has quit []
darinm has joined #ocaml
TaXules has joined #ocaml
ygrek has quit [Remote closed the connection]
<Ober>
so if you write say a tcp service in ocaml is it not going to suffer from silly programmer mistakes that allow the remote buffer overflows/offby1/input validation issues of say C?
<Smerdyakov>
OCaml is memory safe if you avoid parts of the standard library. Does that answer your question?
<Ober>
like the Unix module? or do you mean like libc?
ser_ has joined #ocaml
<ita>
Smerdyakov: which parts of the standard library ? :-)
<Smerdyakov>
Obj.magic, Marshal, maybe more.
<Smerdyakov>
And I meant "the OCaml standard library." That has a well-defined meaning in the manual.
ser__ has joined #ocaml
ser___ has joined #ocaml
ser__ has quit [Read error: 113 (No route to host)]
ser___ has quit [Read error: 113 (No route to host)]
ser__ has joined #ocaml
seafood_ has joined #ocaml
ser_ has quit [Read error: 113 (No route to host)]
doctormach has quit ["Leaving"]
buluca has joined #ocaml
CRathman has joined #ocaml
ser__ has quit [Read error: 113 (No route to host)]
Jedai has joined #ocaml
RobertFischer has joined #ocaml
filp has quit ["Bye"]
<pango_>
Ober: strings poisoning with \0 may still be an issue
<pango_>
OCaml doesn't care whether strings contain \0s, but some libraries or system calls expect zero terminated strings; Hence application and system may disagree on the interpretation of strings
darinm has quit []
asmanur has quit [Remote closed the connection]
<mbishop>
I only know of Obj.* and Marshal stuff being "unsafe"
<pango_>
plus all the *.unsafe_[gs]et
<mbishop>
well at least those are clearly labeled
<mbishop>
I wonder why that graphics/unix.sleep problem isn't fixed yet. I found on fa.caml Xavier Leroy gave some workaround code...back in 2002 :/
<pango_>
or why Marshal is not safe yet; From what I understand third party libraries provide type-safe marshalling with reasonable constrains and performance
buluca has quit [Read error: 113 (No route to host)]
<mbishop>
I'd ask on fa.caml but I'm too scared :P