00:27
swater has quit ["Quat"]
00:44
Mr_Awesome has joined #ocaml
00:50
postalchris has quit [Read error: 110 (Connection timed out)]
01:17
smimram has quit ["bli"]
01:20
dark_light has quit [Read error: 104 (Connection reset by peer)]
01:38
postalchris has joined #ocaml
01:45
dark_light has joined #ocaml
01:52
postalchris has quit ["Leaving."]
02:00
_PenPen__ has quit ["Leaving"]
02:09
love-pingoo has quit ["Connection reset by pear"]
04:13
Smerdyakov has quit ["Leaving"]
05:09
cypher23 has quit [Remote closed the connection]
05:09
cypher23 has joined #ocaml
05:11
pants1 has joined #ocaml
05:56
Mr_Awesome has quit ["...and the Awesome level drops"]
06:11
diffbavis has quit [Read error: 104 (Connection reset by peer)]
06:40
diffbavis has joined #ocaml
06:54
diffbavis has quit [Read error: 104 (Connection reset by peer)]
07:19
b00t has joined #ocaml
07:35
<
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?
07:38
<
pango_ >
parse the result of string_of_inet_addr ? I don't think there's a better way available :/
07:42
<
flux- >
I thought of that.. but I guess that's the best option
07:43
<
flux- >
checking for the existence of : should be enough
08:38
bluestorm has joined #ocaml
09:00
taras has quit [Read error: 113 (No route to host)]
09:05
love-pingoo has joined #ocaml
09:57
bluestorm_ has joined #ocaml
09:58
Nutssh has quit [Read error: 110 (Connection timed out)]
09:58
bluestorm has quit [zelazny.freenode.net irc.freenode.net]
09:58
cypher23 has quit [zelazny.freenode.net irc.freenode.net]
09:58
eradman has quit [zelazny.freenode.net irc.freenode.net]
09:58
mbishop has quit [zelazny.freenode.net irc.freenode.net]
09:58
descender has quit [zelazny.freenode.net irc.freenode.net]
09:58
ramkrsna has quit [zelazny.freenode.net irc.freenode.net]
09:58
bluestorm has joined #ocaml
09:58
cypher23 has joined #ocaml
09:58
eradman has joined #ocaml
09:58
ramkrsna has joined #ocaml
09:58
mbishop has joined #ocaml
09:58
descender has joined #ocaml
10:00
bluestorm has quit [Connection reset by peer]
10:08
eradman has quit [zelazny.freenode.net irc.freenode.net]
10:08
mbishop has quit [zelazny.freenode.net irc.freenode.net]
10:08
descender has quit [zelazny.freenode.net irc.freenode.net]
10:08
cypher23 has quit [zelazny.freenode.net irc.freenode.net]
10:08
ramkrsna has quit [zelazny.freenode.net irc.freenode.net]
10:09
cypher23 has joined #ocaml
10:09
eradman has joined #ocaml
10:09
ramkrsna has joined #ocaml
10:09
mbishop has joined #ocaml
10:09
descender has joined #ocaml
10:13
b00t has quit ["Leaving"]
10:35
Nutssh has joined #ocaml
10:40
jlouis has quit [Remote closed the connection]
10:57
malc_ has joined #ocaml
12:20
jlouis has joined #ocaml
12:32
malc_ has quit ["leaving"]
12:47
shawn has joined #ocaml
13:03
diffbavis has joined #ocaml
13:13
<
love-pingoo >
Str.global_replace (Str.regexp "PID") "liq-PID" "10" << doesn't seem to do what it's meant to do..
13:15
<
love-pingoo >
wrong argument order
13:46
Smerdyakov has joined #ocaml
14:51
zygomatik has joined #ocaml
14:52
<
zygomatik >
hi I evaluated the following " let f a b = a ; b" and I am somehow surprised by the result
14:52
<
zygomatik >
I got a -> b -> b
14:53
<
zygomatik >
but I thought a should be unit
14:53
<
zygomatik >
necessarily
14:54
<
haelix >
why should f 1 "hello" be badly typed ?
14:58
<
zygomatik >
1 ; "hello";;
14:58
<
zygomatik >
Characters 0-1:
14:58
<
zygomatik >
Warning S: this expression should have type unit.
14:58
<
zygomatik >
1 ; "hello";;
14:58
<
zygomatik >
- : string = "hello"
14:58
<
haelix >
well, that's only a warning :)
14:59
<
zygomatik >
that's true
14:59
<
haelix >
no type safety broken, so, no error
15:00
<
zygomatik >
By the way is there a way to see directly the type of ";" like typing ( + );; for "+" ?
15:01
<
zygomatik >
because ( ; ) doesnt work
15:01
<
flux- >
zygomatik, if you want to enforce unitness, you can type let () = a in b
15:01
<
flux- >
; doesn't have a type
15:02
<
zygomatik >
or "ignore a" but I thought unit was mandatory but haelix just explained
15:02
<
flux- >
I don't think ignore is enough
15:02
<
zygomatik >
flux-, why ? it is an operator right ?
15:02
<
flux- >
it's not considered an operator
15:02
<
flux- >
although I suppose it could be
15:02
<
flux- >
ignore is used in situations where the value is expected to have a value
15:02
<
zygomatik >
yes ignore works
15:03
<
flux- >
(hm, a value of type different from unit)
15:03
<
zygomatik >
oh i see, you mean "ignore ()" is forbidden
15:03
<
flux- >
no, it's not
15:04
<
zygomatik >
flux-, no I just tried and I think ignore do work
15:04
<
flux- >
let f a b = ignore (a); b still gives a -> b -> b
15:04
<
zygomatik >
yes that's logical
15:05
<
zygomatik >
ignore doesnt change the type of a
15:05
<
zygomatik >
but no warning this time
15:05
<
zygomatik >
expectedly
15:06
<
zygomatik >
so there is no way to see ( ; ) just as ( + ) ?
15:06
<
zygomatik >
anyway it was just a way to lose my time
15:06
<
zygomatik >
it is not important I guess
15:06
<
zygomatik >
dont lose yours
15:17
<
zygomatik >
isn't there an "operator" module or something like that ?
15:21
<
flux- >
what would it do_
15:27
<
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
15:27
<
zygomatik >
perhaps it was just a nightmare
15:27
<
zygomatik >
forget about it
15:35
diffbavis has quit [Read error: 104 (Connection reset by peer)]
16:21
pango_ has quit [Remote closed the connection]
16:22
slipstream-- has quit [Read error: 104 (Connection reset by peer)]
16:27
slipstream has joined #ocaml
16:28
pango_ has joined #ocaml
16:32
taras has joined #ocaml
16:33
postalchris has joined #ocaml
16:34
taras has quit [Read error: 104 (Connection reset by peer)]
16:40
love-pingoo has quit ["Leaving"]
16:57
gunark has joined #ocaml
17:01
zygomatik has quit ["Leaving"]
17:33
ramkrsna has quit [Read error: 104 (Connection reset by peer)]
17:37
diffbavis has joined #ocaml
17:42
ramkrsna has joined #ocaml
17:43
smimou has joined #ocaml
17:45
Nutssh has quit ["Client exiting"]
17:57
ramkrsna has quit [Remote closed the connection]
18:04
love-pingoo has joined #ocaml
18:09
smimram has joined #ocaml
18:11
pants1 has quit ["Leaving."]
18:18
ikaros has joined #ocaml
18:24
smimou has quit [Read error: 110 (Connection timed out)]
18:30
love-pingoo has quit ["Connection reset by pear"]
18:34
_JusSx_ has joined #ocaml
18:43
malc_ has joined #ocaml
19:03
Smergo_ is now known as Smergo
19:16
david_koontz has joined #ocaml
19:17
lostplan has joined #ocaml
19:17
<
lostplan >
good evening all
19:18
<
lostplan >
in ocaml, how can one define mutually recursive functions?
19:18
<
jacobian >
I think you use "and"
19:18
<
lostplan >
oh! thanks
19:19
<
jacobian >
or maybe let rec
19:19
<
jacobian >
I forget
19:20
<
lostplan >
there is much brakes in the freezer
19:20
<
lostplan >
we've got let rec a = {something involving b} and let rec b = {something involving a} ..?
19:21
<
lostplan >
(ignore that freezer thing)
19:21
<
mbishop >
that should work
19:22
<
lostplan >
we get a syntax error on the second "let rec" :/
19:22
<
malc_ >
lostplan: just and
19:22
<
malc_ >
let rec moo1 a = moo2 a and moo2 a = a;;
19:23
<
lostplan >
thanks :)
19:51
jlouis has quit [Dead socket]
19:51
jlouis has joined #ocaml
20:00
<
flux- >
hmh, sexplib feels sometimes annoying.. or rather starting to use is..
20:00
<
flux- >
does it work for the rest of you just perfectly without patching?
20:00
<
flux- >
such as modifying the META-file
20:03
benny_ has joined #ocaml
20:04
paulproteus has joined #ocaml
20:04
<
paulproteus >
What's the ocamlism to turn the integer 12 into the string "12"?
20:04
<
pango_ >
string_of_int
20:06
<
pango_ >
or Printf.sprintf "%d"
20:08
<
paulproteus >
I'm trying to test a function I wrote that wraps other functions and caches them.
20:08
<
paulproteus >
So I want to make some really idiotically slow function to show caching works (i.e., to show the second run is fast).
20:08
<
paulproteus >
Any tips? (-:
20:10
<
pango_ >
ackermann function ?
20:10
<
jlouis >
ackermann indeed
20:19
benny has quit [Read error: 110 (Connection timed out)]
20:33
fremo has quit [Read error: 104 (Connection reset by peer)]
21:29
<
mbishop >
What do I have to use with ocamlopt when using ocamlnet? I forget the flags
21:32
<
paulproteus >
Thanks a lot, pango_!
21:32
paulproteus has left #ocaml []
21:33
<
mbishop >
never mind, just remembered heh, ocamlfind
21:47
lostplan has left #ocaml []
21:47
gunark has quit [Remote closed the connection]
21:49
shawn has quit [Read error: 110 (Connection timed out)]
21:59
fremo has joined #ocaml
22:03
_JusSx_ has quit [Client Quit]
22:17
malc__ has joined #ocaml
22:19
bluestorm_ has quit ["Konversation terminated!"]
22:22
malc_ has quit [Read error: 145 (Connection timed out)]
22:33
Mr_Awesome has joined #ocaml
22:41
<
mbishop >
Why can't I sequence regular expressions with Str?
22:41
<
mbishop >
if I use begin/end blocks, it seems only one of the regexps evaluates
22:42
<
tsuyoshi >
sequence? I don't understand
22:42
<
mbishop >
well, I tried just seperating them with ;, but it didn't work, so then I tried using them in a begin/end block
22:43
<
mbishop >
and it still didn't work, only the last expression was evaluated, it seems
22:43
<
tsuyoshi >
what sort of expressions?
22:44
<
mbishop >
let remove_html =
22:44
<
mbishop >
Str.global_replace (Str.regexp "<.+>") ""
22:44
<
mbishop >
if I tried to combine that with one like Str.global_replace (Str.regexp "\013") ""
22:44
<
mbishop >
one one would evaluate
22:46
<
tsuyoshi >
so you did like
22:46
<
tsuyoshi >
global_replace modifies the string?
22:46
<
tsuyoshi >
oh never mind
22:47
<
tsuyoshi >
so you did
22:49
<
tsuyoshi >
let remove_html = Str.global_replace (Str.regexp "<.+>") "" (Str.global_replace (Str.regexp "\013") "")
22:49
<
tsuyoshi >
why would you want to separate them with ;
22:49
<
mbishop >
oh wait, I think I just realised the problem
22:49
<
tsuyoshi >
that doesn't make any sense
22:51
<
tsuyoshi >
but anyway you can combine those two regexes
22:52
<
tsuyoshi >
Str.regexp "<.+>\\|\013"
22:54
<
mbishop >
ahh, that works, thank you very much
22:54
<
mbishop >
I never was good at regular expressions :)
22:56
jlouis has quit [Remote closed the connection]
23:01
ikaros has quit ["Leaving"]
23:02
ikaros has joined #ocaml
23:02
ikaros_ has joined #ocaml
23:08
Submarine has joined #ocaml
23:24
smimram has quit ["bli"]
23:33
<
mbishop >
What would be a good data structure for associative lookup (both 'forward' and 'backward') in ocaml?
23:35
ikaros_ has quit ["Leaving"]
23:40
ikaros has quit ["Leaving"]
23:40
ikaros has joined #ocaml