00:04
Drakken has left #ocaml []
00:05
oriba has quit [Quit: oriba]
00:06
Tobu has joined #ocaml
00:11
emmanuelux has quit [Remote host closed the connection]
00:23
iago has quit [Quit: Leaving]
00:51
testcocoon has quit [Remote host closed the connection]
01:06
MaskRay has joined #ocaml
01:06
MaskRay has quit [Changing host]
01:06
MaskRay has joined #ocaml
01:15
MaskRay has quit [Ping timeout: 245 seconds]
01:15
mjonsson has quit [Quit: Leaving]
01:17
MaskRay has joined #ocaml
01:17
MaskRay has quit [Changing host]
01:17
MaskRay has joined #ocaml
01:22
testcocoon has joined #ocaml
01:24
MaskRay has quit [Ping timeout: 255 seconds]
01:41
EmmanuelOga has joined #ocaml
01:43
everyonemines has joined #ocaml
01:49
MaskRay has joined #ocaml
02:06
in10t has joined #ocaml
02:12
<
in10t >
Hey all. I need to do a little file I/O with extlib, and I'm not clear on what the correct way is to do sequential binding of names to the values read within a begin...end block. If I do "begin let a = IO.read_double infile; let b = IO.read_double; (a, b) end I get a syntax error. What would be the correct way to do this?
02:14
<
everyonemines >
are you passing the input to the second read function
02:14
<
in10t >
that should read "let b = IO.read_double infile; (a, b)"
02:14
<
everyonemines >
second, you're separating with ;
02:15
<
everyonemines >
it's let....in
02:15
MaskRay_ has joined #ocaml
02:15
<
everyonemines >
btw, begin...end is equivalent to (...)
02:15
<
everyonemines >
so most people dont use it
02:15
<
in10t >
I thought that was the correct way to enforce in-order operations in an imperative block?
02:15
MaskRay has quit [Read error: Connection reset by peer]
02:16
<
everyonemines >
no, let statements are ordered
02:16
<
in10t >
The semicolon
02:16
<
everyonemines >
it separates imperative statements
02:16
<
everyonemines >
"let" is not imperative
02:16
lamawithonel__ has joined #ocaml
02:17
<
in10t >
OK, I see, thank you.
02:17
<
everyonemines >
you want let a = ... in let b = ... in a,b
02:19
lamawithonel_ has quit [Ping timeout: 240 seconds]
02:20
<
everyonemines >
finally, I think idiomatic ocaml would be: let read() = IO.read_double infile in read(),read()
02:20
<
everyonemines >
hmm, actually I'm not sure if that would force ordering
02:21
<
everyonemines >
meh
02:22
iris1 has quit [Quit: iris1]
02:23
lamawithonel__ has quit [Ping timeout: 244 seconds]
02:24
<
everyonemines >
nope, that isn't ordered. So yeah, you need to use 2 let statements to force the ordering.
02:26
<
in10t >
yeah, that worked beautifully. thanks everyonemines .
02:26
lamawithonel__ has joined #ocaml
02:41
lamawithonel__ has quit [Ping timeout: 240 seconds]
03:01
EmmanuelOga has quit [Ping timeout: 244 seconds]
03:28
ankit9 has joined #ocaml
03:32
othiym23 has joined #ocaml
03:35
ulfdoz has quit [Ping timeout: 256 seconds]
03:40
asdfhjkl has quit [Quit: Leaving]
04:08
everyonemines has quit [Quit: Leaving.]
04:09
xuser has joined #ocaml
04:10
Tobu has quit [Ping timeout: 252 seconds]
04:28
xuser has quit [Quit: leaving]
04:41
ankit9 has quit [Ping timeout: 240 seconds]
04:53
Tobu has joined #ocaml
04:57
testcocoon has quit [Quit: Coyote finally caught me]
05:08
<
flux >
indeed, multiple side effects in a single expression not using ; are typically a good idea..
05:08
<
flux >
(for example tuples are constructed right-to-left)
05:27
Tobu has quit [Ping timeout: 252 seconds]
05:30
testcocoon has joined #ocaml
05:30
ankit9 has joined #ocaml
05:38
<
MaskRay_ >
so it'll print "cba" when executing `let s=print_string in (s "a", s "b", s "c");;' ?
05:44
<
flux >
yes, but by no means should one write code that relies on that behavior :)
05:48
Cyanure has joined #ocaml
05:52
edwin has joined #ocaml
05:55
silver has joined #ocaml
06:09
Tobu has joined #ocaml
06:09
Tobu has quit [Changing host]
06:09
Tobu has joined #ocaml
06:10
testcocoon has quit [Quit: Coyote finally caught me]
06:14
testcocoon has joined #ocaml
06:16
Cyanure has quit [Remote host closed the connection]
06:31
Snark has joined #ocaml
06:32
thomasga has joined #ocaml
06:46
Cyanure has joined #ocaml
06:47
ocp has joined #ocaml
06:59
kmc has quit [Quit: Leaving]
07:06
cago has joined #ocaml
07:08
kmc has joined #ocaml
07:12
thizanne has quit [Ping timeout: 255 seconds]
07:17
thizanne has joined #ocaml
07:24
ocp has quit [Quit: Leaving.]
07:30
Tobu has quit [Ping timeout: 252 seconds]
07:32
Submarine has joined #ocaml
07:39
foocraft has quit [Read error: Operation timed out]
07:39
Tobu has joined #ocaml
07:39
foocraft has joined #ocaml
07:45
_andre has joined #ocaml
07:58
asdfhjkl has joined #ocaml
07:58
emias has quit [Quit: Changing server]
07:59
emias has joined #ocaml
08:07
ikaros has joined #ocaml
08:36
Tobu has quit [Ping timeout: 247 seconds]
08:40
ikaros has quit [Quit: Ex-Chat]
08:40
sgnb`` is now known as sgnb
08:43
Tobu has joined #ocaml
08:44
rby has quit [Ping timeout: 252 seconds]
08:58
iago has joined #ocaml
09:22
emmanuelux has joined #ocaml
09:29
iago has quit [Ping timeout: 260 seconds]
09:35
thizanne has quit [*.net *.split]
09:35
wagle has quit [*.net *.split]
09:35
dsheets has quit [*.net *.split]
09:35
wagle has joined #ocaml
09:37
thizanne has joined #ocaml
09:37
dsheets has joined #ocaml
09:37
letrec has joined #ocaml
09:41
iago has joined #ocaml
09:46
Tobu has quit [Ping timeout: 252 seconds]
10:01
iago has quit [Ping timeout: 252 seconds]
10:02
Tobu has joined #ocaml
10:09
ftrvxmtrx has quit [Quit: Leaving]
10:09
EmmanuelOga has joined #ocaml
10:13
ftrvxmtrx has joined #ocaml
10:16
iago has joined #ocaml
10:46
hyperbor1ean is now known as hyperboreean
10:51
Tobu has quit [Ping timeout: 272 seconds]
10:58
rby has joined #ocaml
11:00
antegallya has joined #ocaml
11:03
Tobu has joined #ocaml
11:27
EmmanuelOga has quit [Ping timeout: 244 seconds]
11:34
BiDOrD_ has joined #ocaml
11:34
Submarine has quit [Ping timeout: 244 seconds]
11:35
<
bnwr >
Hashtbl can be used as an imperative Map. Is there a module that can be used as an imperative Set?
11:36
<
thelema >
bnwr: Hashtbl
11:36
BiDOrD has quit [Ping timeout: 248 seconds]
11:37
<
thelema >
('a, unit) Hashtbl.t
11:37
<
bnwr >
thelema: storing () as a second component?
11:37
<
thelema >
what is your 'a?
11:37
<
thelema >
if your 'a is int, BatBitSet may be good for you
11:38
<
bnwr >
ip addresses (with a weird internal representation)
11:39
<
bnwr >
and I only need to store a handfull of them
11:39
<
thelema >
you can use a list
11:39
<
thelema >
if handful is .. < 10
11:40
EmmanuelOga has joined #ocaml
11:42
iago has quit [Read error: Operation timed out]
11:42
iago has joined #ocaml
11:43
<
bnwr >
I'll try a list ref (I actually need it to be imperative for equality purpose)
11:44
<
thelema >
equality purpose? curious
11:45
<
bnwr >
yeah, I need [let old = x in add x y; let new_ = x in old = new_] to be [true] for all [x] and [y]
11:45
fraggle_ has quit [Read error: Connection reset by peer]
11:46
<
bnwr >
I'll try other approaches afterward, but for now I'm trying with this
11:46
<
flux >
bnwr, hmm, it isn't too difficult to use any immutable datastructure in an imperative fashion, just use references?
11:50
fraggle_ has joined #ocaml
11:59
beckerb has joined #ocaml
12:00
iago has quit [Ping timeout: 245 seconds]
12:02
iago has joined #ocaml
12:06
ocp has joined #ocaml
12:06
yroeht has quit [Ping timeout: 240 seconds]
12:06
ocp has quit [Read error: Connection reset by peer]
12:37
Tobu has quit [Ping timeout: 252 seconds]
12:42
benytc has joined #ocaml
12:52
Submarine has joined #ocaml
12:52
Submarine has quit [Changing host]
12:52
Submarine has joined #ocaml
12:53
ankit9 has quit [Remote host closed the connection]
13:03
Tobu has joined #ocaml
13:04
MaskRay_ has quit [Quit: leaving]
13:34
Drup has joined #ocaml
13:36
emmanuelux has quit [Remote host closed the connection]
13:37
emmanuelux has joined #ocaml
13:38
r126f has joined #ocaml
13:38
r126f has quit [Client Quit]
13:55
Submarine has quit [Quit: Leaving]
13:59
iago has quit [Read error: Operation timed out]
13:59
ulfdoz has joined #ocaml
13:59
iago has joined #ocaml
14:00
logicgeezer has joined #ocaml
14:03
r126f has joined #ocaml
14:04
yroeht has joined #ocaml
14:04
r126f has quit [Client Quit]
14:07
ousado has quit [Changing host]
14:07
ousado has joined #ocaml
14:11
silver has quit [Quit: I put on my robe and wizard hat]
14:11
avsm has joined #ocaml
14:20
r126f has joined #ocaml
14:31
rby_ has joined #ocaml
14:31
letrec has quit [Ping timeout: 255 seconds]
14:32
Tobu has quit [Ping timeout: 248 seconds]
14:34
rby has quit [Ping timeout: 245 seconds]
14:35
Tobu has joined #ocaml
14:38
avsm has quit [Quit: Leaving.]
14:38
ulfdoz has quit [Read error: Connection reset by peer]
14:38
benytc has quit [Quit: Lost terminal]
14:39
ulfdoz has joined #ocaml
14:43
beckerb has quit [Quit: Konversation terminated!]
14:46
cago has quit [Quit: Leaving.]
14:50
Vinnipeg has joined #ocaml
14:50
avsm has joined #ocaml
14:58
ulfdoz has quit [Ping timeout: 240 seconds]
14:59
ulfdoz has joined #ocaml
15:00
antegallya has quit [Ping timeout: 240 seconds]
15:06
mdelaney has joined #ocaml
15:38
logicgeezer has quit [Ping timeout: 252 seconds]
15:39
Cyanure has quit [Ping timeout: 245 seconds]
15:42
srcerer has quit [Ping timeout: 248 seconds]
15:47
Vinnipeg has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
15:55
mdelaney has quit [Quit: mdelaney]
15:57
testcocoon has quit [Quit: Coyote finally caught me]
16:01
testcocoon has joined #ocaml
16:03
ftrvxmtrx_ has joined #ocaml
16:03
ftrvxmtrx has quit [Ping timeout: 245 seconds]
16:07
metasyntax|work has joined #ocaml
16:13
iago has quit [Quit: Leaving]
16:13
olauzon has joined #ocaml
16:20
mdelaney has joined #ocaml
16:28
Tobu has quit [Ping timeout: 252 seconds]
16:28
othiym23 has joined #ocaml
16:37
Tobu has joined #ocaml
16:47
mdelaney has quit [Quit: mdelaney]
16:49
mdelaney has joined #ocaml
16:50
srcerer has joined #ocaml
16:53
ikaros has joined #ocaml
16:55
mdelaney has quit [Quit: mdelaney]
16:58
mdelaney has joined #ocaml
16:58
BiDOrD_ has quit [Ping timeout: 256 seconds]
16:59
czro has joined #ocaml
17:13
mdelaney has quit [Quit: mdelaney]
17:14
mdelaney has joined #ocaml
17:18
metasyntax|work has quit [Quit: WeeChat [quit]]
17:21
_andre has quit [Quit: leaving]
17:27
twittard has quit [Quit: twittard]
17:43
flux has quit [*.net *.split]
17:43
olasd has quit [*.net *.split]
17:43
flux has joined #ocaml
17:55
emmanuelux has quit [Remote host closed the connection]
17:58
olasd has joined #ocaml
17:58
olasd has quit [Changing host]
17:58
olasd has joined #ocaml
17:58
emmanuelux has joined #ocaml
18:12
twittard has joined #ocaml
18:37
mariano has joined #ocaml
18:45
BiDOrD has joined #ocaml
18:50
BiDOrD has quit [Ping timeout: 248 seconds]
18:59
NaCl has quit [Quit: brb]
19:00
NaCl has joined #ocaml
19:00
NaCl has quit [Changing host]
19:00
NaCl has joined #ocaml
19:07
czro has quit [Ping timeout: 252 seconds]
19:07
iago has joined #ocaml
19:16
Snark has quit [Quit: Quitte]
19:17
twittard_ has joined #ocaml
19:20
twittard has quit [Ping timeout: 252 seconds]
19:20
twittard_ is now known as twittard
19:43
ulfdoz has quit [Ping timeout: 252 seconds]
19:47
avsm has quit [Quit: Leaving.]
20:02
Xizor has joined #ocaml
20:08
thomasga has quit [Quit: Leaving.]
20:19
Tobu has quit [Ping timeout: 248 seconds]
20:25
twittard has quit [Ping timeout: 260 seconds]
20:26
twittard has joined #ocaml
20:35
twittard has quit [Quit: twittard]
20:36
twittard has joined #ocaml
20:36
twittard has quit [Read error: Connection reset by peer]
20:37
twittard has joined #ocaml
20:43
edwin has quit [Remote host closed the connection]
20:52
Tobu has joined #ocaml
21:17
BiDOrD has joined #ocaml
21:19
ikaros has quit [Quit: Ex-Chat]
21:30
antegallya has joined #ocaml
21:33
Drup has quit [Quit: Leaving.]
21:33
antegallya has quit [Client Quit]
21:34
twittard has quit [Remote host closed the connection]
21:34
twittard has joined #ocaml
21:39
letrec has joined #ocaml
21:44
mariano has quit [Quit: Leaving]
21:50
othiym23 has quit [Ping timeout: 252 seconds]
21:52
BiDOrD has quit [Ping timeout: 252 seconds]
22:02
sgnb has quit [Read error: Connection reset by peer]
22:06
sgnb has joined #ocaml
22:10
sgnb has quit [Read error: Connection reset by peer]
22:11
olauzon has quit [Quit: olauzon]
22:12
othiym23 has joined #ocaml
22:22
sgnb has joined #ocaml
22:26
sgnb has quit [Read error: Connection reset by peer]
22:32
twittard_ has joined #ocaml
22:35
twittard has quit [Ping timeout: 276 seconds]
22:35
twittard_ is now known as twittard
22:36
letrec has quit [Ping timeout: 252 seconds]
22:59
srcerer has quit [Ping timeout: 248 seconds]
23:14
mdelaney is now known as mdelaney-afk
23:21
emmanuelux has quit [Remote host closed the connection]
23:40
ftrvxmtrx_ has quit [Ping timeout: 244 seconds]
23:43
ftrvxmtrx_ has joined #ocaml
23:57
asdfhjkl has quit [Quit: Leaving]
23:58
iago has quit [Quit: Leaving]