sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
swater has quit ["Quat"]
Mr_Awesome has joined #ocaml
postalchris has quit [Read error: 110 (Connection timed out)]
smimram has quit ["bli"]
dark_light has quit [Read error: 104 (Connection reset by peer)]
postalchris has joined #ocaml
dark_light has joined #ocaml
postalchris has quit ["Leaving."]
_PenPen__ has quit ["Leaving"]
love-pingoo has quit ["Connection reset by pear"]
Smerdyakov has quit ["Leaving"]
cypher23 has quit [Remote closed the connection]
cypher23 has joined #ocaml
pants1 has joined #ocaml
Mr_Awesome has quit ["...and the Awesome level drops"]
diffbavis has quit [Read error: 104 (Connection reset by peer)]
diffbavis has joined #ocaml
diffbavis has quit [Read error: 104 (Connection reset by peer)]
b00t has joined #ocaml
<flux-> hmm.. given an Unix.inet_addr, how do I know whether it's an IPv4 or IPv6-address, so I can give the appropriate protocol family to Unix.socket?
<pango_> parse the result of string_of_inet_addr ? I don't think there's a better way available :/
<flux-> I thought of that.. but I guess that's the best option
<flux-> checking for the existence of : should be enough
<pango_> http://oandrieu.nerim.net/ocaml/ ... I guess it predates official IPv6 support, *but* it provided inet_addr_family :/
bluestorm has joined #ocaml
taras has quit [Read error: 113 (No route to host)]
love-pingoo has joined #ocaml
bluestorm_ has joined #ocaml
Nutssh has quit [Read error: 110 (Connection timed out)]
bluestorm has quit [zelazny.freenode.net irc.freenode.net]
cypher23 has quit [zelazny.freenode.net irc.freenode.net]
eradman has quit [zelazny.freenode.net irc.freenode.net]
mbishop has quit [zelazny.freenode.net irc.freenode.net]
descender has quit [zelazny.freenode.net irc.freenode.net]
ramkrsna has quit [zelazny.freenode.net irc.freenode.net]
bluestorm has joined #ocaml
cypher23 has joined #ocaml
eradman has joined #ocaml
ramkrsna has joined #ocaml
mbishop has joined #ocaml
descender has joined #ocaml
bluestorm has quit [Connection reset by peer]
eradman has quit [zelazny.freenode.net irc.freenode.net]
mbishop has quit [zelazny.freenode.net irc.freenode.net]
descender has quit [zelazny.freenode.net irc.freenode.net]
cypher23 has quit [zelazny.freenode.net irc.freenode.net]
ramkrsna has quit [zelazny.freenode.net irc.freenode.net]
cypher23 has joined #ocaml
eradman has joined #ocaml
ramkrsna has joined #ocaml
mbishop has joined #ocaml
descender has joined #ocaml
b00t has quit ["Leaving"]
Nutssh has joined #ocaml
jlouis has quit [Remote closed the connection]
malc_ has joined #ocaml
slava has quit []
jlouis has joined #ocaml
malc_ has quit ["leaving"]
shawn has joined #ocaml
diffbavis has joined #ocaml
<love-pingoo> Str.global_replace (Str.regexp "PID") "liq-PID" "10" << doesn't seem to do what it's meant to do..
<love-pingoo> wrong argument order
<love-pingoo> shit
Smerdyakov has joined #ocaml
zygomatik has joined #ocaml
<zygomatik> hi I evaluated the following " let f a b = a ; b" and I am somehow surprised by the result
<zygomatik> I got a -> b -> b
<zygomatik> but I thought a should be unit
<zygomatik> necessarily
<zygomatik> why ?
<haelix> why should f 1 "hello" be badly typed ?
<zygomatik> 1 ; "hello";;
<zygomatik> Characters 0-1:
<zygomatik> Warning S: this expression should have type unit.
<zygomatik> 1 ; "hello";;
<zygomatik> ^
<zygomatik> - : string = "hello"
<haelix> well, that's only a warning :)
<zygomatik> yes
<zygomatik> :)
<zygomatik> that's true
<haelix> no type safety broken, so, no error
<zygomatik> ok
<zygomatik> By the way is there a way to see directly the type of ";" like typing ( + );; for "+" ?
<zygomatik> because ( ; ) doesnt work
<flux-> zygomatik, if you want to enforce unitness, you can type let () = a in b
<flux-> ; doesn't have a type
<zygomatik> or "ignore a" but I thought unit was mandatory but haelix just explained
<flux-> I don't think ignore is enough
<zygomatik> flux-, why ? it is an operator right ?
<flux-> it's not considered an operator
<flux-> although I suppose it could be
<zygomatik> ok
<zygomatik> i see
<flux-> ignore is used in situations where the value is expected to have a value
<zygomatik> yes ignore works
<flux-> (hm, a value of type different from unit)
<zygomatik> oh i see, you mean "ignore ()" is forbidden
<flux-> no, it's not
<flux-> :)
<zygomatik> flux-, no I just tried and I think ignore do work
<flux-> let f a b = ignore (a); b still gives a -> b -> b
<zygomatik> yes that's logical
<zygomatik> ignore doesnt change the type of a
<zygomatik> but no warning this time
<zygomatik> expectedly
<zygomatik> so there is no way to see ( ; ) just as ( + ) ?
<zygomatik> anyway it was just a way to lose my time
<zygomatik> it is not important I guess
<zygomatik> :)
<zygomatik> dont lose yours
<zygomatik> isn't there an "operator" module or something like that ?
<flux-> no
<flux-> what would it do_
<flux-> ?
<zygomatik> i don't know it is just i remember reading something like use "operator" or something like that on a web site and I can't find it again
<zygomatik> perhaps it was just a nightmare
<zygomatik> forget about it
<zygomatik> :)
diffbavis has quit [Read error: 104 (Connection reset by peer)]
pango_ has quit [Remote closed the connection]
slipstream-- has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
pango_ has joined #ocaml
taras has joined #ocaml
postalchris has joined #ocaml
taras has quit [Read error: 104 (Connection reset by peer)]
love-pingoo has quit ["Leaving"]
gunark has joined #ocaml
zygomatik has quit ["Leaving"]
ramkrsna has quit [Read error: 104 (Connection reset by peer)]
diffbavis has joined #ocaml
ramkrsna has joined #ocaml
smimou has joined #ocaml
Nutssh has quit ["Client exiting"]
wkh has quit []
ramkrsna has quit [Remote closed the connection]
love-pingoo has joined #ocaml
smimram has joined #ocaml
pants1 has quit ["Leaving."]
ikaros has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
love-pingoo has quit ["Connection reset by pear"]
_JusSx_ has joined #ocaml
malc_ has joined #ocaml
Smergo_ is now known as Smergo
david_koontz has joined #ocaml
lostplan has joined #ocaml
<lostplan> good evening all
<lostplan> in ocaml, how can one define mutually recursive functions?
<jacobian> yes
<jacobian> I think you use "and"
<lostplan> oh! thanks
<jacobian> or maybe let rec
<jacobian> I forget
<lostplan> there is much brakes in the freezer
<lostplan> we've got let rec a = {something involving b} and let rec b = {something involving a} ..?
<lostplan> (ignore that freezer thing)
<mbishop> that should work
<lostplan> we get a syntax error on the second "let rec" :/
<malc_> lostplan: just and
<malc_> let rec moo1 a = moo2 a and moo2 a = a;;
<lostplan> thanks :)
jlouis has quit [Dead socket]
jlouis has joined #ocaml
<flux-> hmh, sexplib feels sometimes annoying.. or rather starting to use is..
<flux-> does it work for the rest of you just perfectly without patching?
<flux-> such as modifying the META-file
benny_ has joined #ocaml
paulproteus has joined #ocaml
<paulproteus> What's the ocamlism to turn the integer 12 into the string "12"?
<pango_> string_of_int
<pango_> or Printf.sprintf "%d"
<paulproteus> I'm trying to test a function I wrote that wraps other functions and caches them.
<paulproteus> So I want to make some really idiotically slow function to show caching works (i.e., to show the second run is fast).
<paulproteus> Any tips? (-:
<pango_> ackermann function ?
<jlouis> ackermann indeed
benny has quit [Read error: 110 (Connection timed out)]
fremo has quit [Read error: 104 (Connection reset by peer)]
<mbishop> What do I have to use with ocamlopt when using ocamlnet? I forget the flags
<paulproteus> Thanks a lot, pango_!
paulproteus has left #ocaml []
<mbishop> never mind, just remembered heh, ocamlfind
lostplan has left #ocaml []
gunark has quit [Remote closed the connection]
shawn has quit [Read error: 110 (Connection timed out)]
fremo has joined #ocaml
_JusSx_ has quit [Client Quit]
malc__ has joined #ocaml
bluestorm_ has quit ["Konversation terminated!"]
malc_ has quit [Read error: 145 (Connection timed out)]
Mr_Awesome has joined #ocaml
<mbishop> Why can't I sequence regular expressions with Str?
<mbishop> if I use begin/end blocks, it seems only one of the regexps evaluates
<tsuyoshi> sequence? I don't understand
<mbishop> well, I tried just seperating them with ;, but it didn't work, so then I tried using them in a begin/end block
<mbishop> and it still didn't work, only the last expression was evaluated, it seems
<tsuyoshi> what sort of expressions?
<mbishop> let remove_html =
<mbishop> Str.global_replace (Str.regexp "<.+>") ""
<mbishop> if I tried to combine that with one like Str.global_replace (Str.regexp "\013") ""
<mbishop> one one would evaluate
<mbishop> only*
<tsuyoshi> uhh
<tsuyoshi> so you did like
<tsuyoshi> oh wait
<tsuyoshi> global_replace modifies the string?
<tsuyoshi> oh never mind
<tsuyoshi> so you did
<tsuyoshi> let remove_html = Str.global_replace (Str.regexp "<.+>") "" (Str.global_replace (Str.regexp "\013") "")
<tsuyoshi> ?
<tsuyoshi> why would you want to separate them with ;
<mbishop> oh wait, I think I just realised the problem
<tsuyoshi> that doesn't make any sense
<tsuyoshi> but anyway you can combine those two regexes
<mbishop> oh?
<tsuyoshi> Str.regexp "<.+>\\|\013"
<mbishop> ahh, that works, thank you very much
<mbishop> I never was good at regular expressions :)
jlouis has quit [Remote closed the connection]
ikaros has quit ["Leaving"]
ikaros has joined #ocaml
ikaros_ has joined #ocaml
Submarine has joined #ocaml
smimram has quit ["bli"]
<mbishop> What would be a good data structure for associative lookup (both 'forward' and 'backward') in ocaml?
ikaros_ has quit ["Leaving"]
ikaros has quit ["Leaving"]
ikaros has joined #ocaml