Alpounet has quit [Read error: 104 (Connection reset by peer)]
Alpounet has joined #ocaml
filp has joined #ocaml
jeanbon has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit []
jonafan_ has joined #ocaml
jonafan has quit [Read error: 110 (Connection timed out)]
chicco has quit [Remote closed the connection]
jeanbon has quit ["J'y trouve un goût d'pomme."]
kaustuv_ is now known as kaustuv
robocop has joined #ocaml
<robocop>
Hello
<robocop>
do you know how I search a word in s string in ocaml ? Exemple -> f "http//www.youtube.com" "youtube" send true and f "http//www.dailymotion.com" "youtube" send false
<kaustuv>
Though I have no idea what you're trying to accomplish with global_replace
<robocop>
what's the real function ?
Nynix has joined #ocaml
AxleLonghorn has joined #ocaml
<robocop>
i'm going to use your code kaustuv, i think it's better :D
<robocop>
thanks a lot for you help.
<mrvn>
I just use youtube-dl.
<s4tan>
hi guys, but here are differences in using ";;" or ";" to ending a phrase?
<robocop>
;; -> it's for the interpreteur
<s4tan>
for example
<s4tan>
let a = 3 in
<s4tan>
if (a>4) then print_string "OK";
<s4tan>
print_int a;;
th5 has joined #ocaml
<mfp>
s4tan: a; b is roughly equivalent to let _ = a in b
<s4tan>
ok, tnx mfp
<s4tan>
semme that ; is used to separate expressions (from page 105 of ocaml manual ^^)
<mfp>
(the difference being that in the former you'd get a warning if a cannot be of type unit)
<mfp>
just think of it as a sequencing operator
<AxleLonghorn>
;; marks separate compilation units. ; is a sequencing operator like mfp just said
<s4tan>
understood, tnx a lot : )
<kaustuv>
Just say no to ;; (except in the toplevel)
<s4tan>
right : )
<s4tan>
what i realy didn't understand was why this code not work:
<s4tan>
let foo =
<s4tan>
let a = 12
<s4tan>
and b = 13 in
<s4tan>
if (a>3) then
<s4tan>
if (b >10) then5;
<s4tan>
;
<s4tan>
print_string "OK"
<s4tan>
now i have understand :D
<s4tan>
thx folks
<s4tan>
just an "ignore 5" and it works
fasta has joined #ocaml
<fasta>
Does OCaml have something like existential types? If so, can it inference the type for functions with these kinds of types?
<kaustuv>
fasta: no existential types as such, but there is the object system that can do nearly everything existential types can
<kaustuv>
however, if you use objects you give up principal typing
<fasta>
kaustuv: why is that? (I read it in several places, though)
<mrvn>
kaustuv: What do you mean? It still finds the right class type for you.
<kaustuv>
You can encode existential types with class types, and existential types don't have principal typing because of the so-called "avoidance problem"
<kaustuv>
For details, see Robert Harper's draft book on type systems (available from his web page)
<kaustuv>
If you don't care about system Fw<:, you can get pretty far with open existential types (see Montagu and Remy's POPL 2009 paper)
_zack has quit [Read error: 104 (Connection reset by peer)]
_zack has joined #ocaml
robocop has quit [calvino.freenode.net irc.freenode.net]
Amorphous has quit [Connection timed out]
Amorphous has joined #ocaml
willb has joined #ocaml
Nynix has quit [Read error: 104 (Connection reset by peer)]