00:02
kdas_ has joined #ocaml
00:05
Rebelion has quit [Quit: Saliendo]
00:06
BitPuffin|osx has joined #ocaml
00:07
kdas_ has quit [Ping timeout: 244 seconds]
00:10
thomasga has joined #ocaml
00:11
kclancy has quit [Remote host closed the connection]
00:19
ollehar1 has quit [Read error: Connection reset by peer]
00:26
MrScout has joined #ocaml
00:28
Denommus has quit [Quit: going home]
00:30
hay207 has quit [Ping timeout: 246 seconds]
00:33
thomasga has quit [Quit: Leaving.]
00:40
keen__________14 has joined #ocaml
00:41
jao has joined #ocaml
00:41
keen__________13 has quit [Ping timeout: 276 seconds]
00:46
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
00:47
x47 has quit [Ping timeout: 246 seconds]
00:50
segmond has quit [Ping timeout: 244 seconds]
00:56
segmond has joined #ocaml
01:04
Hannibal_Smith has quit [Quit: Leaving]
01:07
sepp2k has quit [Quit: Leaving.]
01:09
ceryo has joined #ocaml
01:12
jyc_ has joined #ocaml
01:17
struktured has quit [Ping timeout: 252 seconds]
01:21
MrScout has quit [Ping timeout: 248 seconds]
01:22
sgnb has quit [Ping timeout: 256 seconds]
01:29
AltGr has joined #ocaml
01:52
shinnya has quit [Ping timeout: 264 seconds]
02:07
walter|r has joined #ocaml
02:10
mcclurmc has quit [Remote host closed the connection]
02:11
walter|r has quit [Ping timeout: 255 seconds]
02:20
lolisa has joined #ocaml
02:31
MrScout has joined #ocaml
02:35
darkf has joined #ocaml
02:38
ygrek has quit [Ping timeout: 256 seconds]
02:47
badkins has quit []
02:52
MrScout has quit [Remote host closed the connection]
03:10
walter|r has joined #ocaml
03:10
mcclurmc has joined #ocaml
03:14
walter|r has quit [Ping timeout: 246 seconds]
03:16
mcclurmc has quit [Ping timeout: 264 seconds]
03:23
waneck has quit [Read error: Connection reset by peer]
03:26
BitPuffin|osx has quit [Ping timeout: 264 seconds]
03:31
matason has joined #ocaml
03:43
ollehar1 has joined #ocaml
03:44
ollehar has quit [Ping timeout: 264 seconds]
04:00
jao has quit [Read error: Connection reset by peer]
04:05
ollehar has joined #ocaml
04:07
swgillespie has joined #ocaml
04:20
lolisa has quit [Quit: meow]
04:31
MercurialAlchemi has joined #ocaml
04:38
milosn has quit [Quit: Lost terminal]
04:42
Bhavya has joined #ocaml
04:50
MercurialAlchemi has quit [Ping timeout: 240 seconds]
04:56
Bhavya has quit [Quit: Quit the channel]
04:58
relrod has quit [Ping timeout: 256 seconds]
05:01
manud has quit [Quit: manud]
05:12
jyc_ is now known as jyc
05:18
ollehar1 has quit [Ping timeout: 256 seconds]
05:51
matason has quit [Ping timeout: 246 seconds]
06:00
moei has quit [Read error: Connection reset by peer]
06:01
moei has joined #ocaml
06:10
ygrek has joined #ocaml
06:23
kushal has joined #ocaml
06:23
Haudegen has quit [Ping timeout: 252 seconds]
06:25
mcclurmc has joined #ocaml
06:32
Haudegen has joined #ocaml
06:37
mcclurmc has quit [Remote host closed the connection]
07:00
KDr2 has joined #ocaml
07:09
accidus_benartiu has joined #ocaml
07:09
accidus has joined #ocaml
07:14
mcclurmc has joined #ocaml
07:17
jonludlam has quit [Ping timeout: 264 seconds]
07:22
mcclurmc has quit [Remote host closed the connection]
07:23
mcclurmc has joined #ocaml
07:32
matason has joined #ocaml
07:39
manud has joined #ocaml
07:43
hay207 has joined #ocaml
07:43
ygrek has quit [Ping timeout: 250 seconds]
07:45
sh0t has joined #ocaml
07:46
Simn has joined #ocaml
07:52
mcclurmc has quit [Remote host closed the connection]
07:53
dsheets has quit [Ping timeout: 256 seconds]
08:04
thomasga has joined #ocaml
08:09
<
companion_cube >
o/
08:11
sh0t has quit [Ping timeout: 265 seconds]
08:12
<
flux >
def`, hmm, but how does it fit here: type ('a, 'b) service = { kind : 'a; method : 'b } ?
08:19
accidus has quit [Ping timeout: 246 seconds]
08:19
accidus_benartiu has quit [Ping timeout: 252 seconds]
08:20
octachron has joined #ocaml
08:21
dsheets has joined #ocaml
08:21
<
ollehar >
jwatzman|work: here?
08:21
ggole has joined #ocaml
08:23
<
octachron >
flux: the idea is to use type constraint with object type: type 'a service = { x: 'b; y:'c } constraint 'a = <x:'b; y:'c>
08:23
<
companion_cube >
nice trick
08:24
<
octachron >
like this you can use type parameter selectively
08:25
<
octachron >
i.e let f: 'a service -> 'a service or let g: <x:int;..> service -> int
08:26
creichert has quit [Remote host closed the connection]
08:38
<
flux >
nice, I haven't used that ever
08:49
mort___ has joined #ocaml
08:55
mlamari_ has quit [Read error: Connection reset by peer]
08:56
mlamari_ has joined #ocaml
08:58
zpe has joined #ocaml
09:00
octachron has quit [Quit: Leaving]
09:04
KDr2 has quit [Ping timeout: 276 seconds]
09:06
jonludlam has joined #ocaml
09:19
kaustuv has joined #ocaml
09:25
<
rks` >
what progress do you expect/would you like to see?
09:32
<
kaustuv >
Hmm. I guess ocaml -ppx works with 4.03.0+trunk, so maybe it's no longer relevant
09:36
<
rks` >
should work with 4.02.2 too
09:44
Bhavya has joined #ocaml
09:45
Haudegen has quit [Ping timeout: 250 seconds]
09:53
Haudegen has joined #ocaml
09:53
stux|RC has quit [Ping timeout: 276 seconds]
09:56
KDr2 has joined #ocaml
09:59
stux|RC-only has joined #ocaml
10:16
thomasga has quit [Quit: Leaving.]
10:17
thomasga has joined #ocaml
10:21
thomasga has quit [Client Quit]
10:22
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
10:46
AltGr has left #ocaml [#ocaml]
10:46
martintrojer has quit [Ping timeout: 252 seconds]
10:48
martintrojer has joined #ocaml
11:19
Haudegen has quit [Ping timeout: 252 seconds]
11:20
_andre has joined #ocaml
11:28
Haudegen has joined #ocaml
11:38
Hannibal_Smith has joined #ocaml
11:38
ceryo has joined #ocaml
11:49
segmond has quit [Quit: Fail]
11:59
Kakadu has joined #ocaml
12:03
manud has quit [Quit: manud]
12:43
Bhavya has quit [Quit: Quit the channel]
12:44
amnn has joined #ocaml
12:50
amnn has quit [Ping timeout: 276 seconds]
12:57
pii4 has quit [Excess Flood]
12:58
amnn has joined #ocaml
12:58
pii4 has joined #ocaml
12:59
yomimono has quit [Ping timeout: 276 seconds]
13:03
amnn has quit [Ping timeout: 256 seconds]
13:09
amnn has joined #ocaml
13:14
tmtwd has joined #ocaml
13:15
Hannibal_Smith has quit [Quit: Leaving]
13:18
keep_learning has joined #ocaml
13:20
amnn has quit [Ping timeout: 252 seconds]
13:21
<
keep_learning >
Hello everyone.
13:22
<
keep_learning >
Any one familiar with codegraph from pfff.
13:22
amnn has joined #ocaml
13:22
<
keep_learning >
I am trying to use it to generate the dependency graph
13:22
<
keep_learning >
but it says
13:22
<
keep_learning >
Fatal error: exception Failure("go the directory you want")
13:23
<
keep_learning >
I have generated the file graph_code.marshall
13:35
tane has joined #ocaml
13:37
BitPuffin has joined #ocaml
13:43
badkins has joined #ocaml
13:44
keep_learning has quit [Ping timeout: 246 seconds]
13:50
<
haesbaert >
it seems I'm not getting the backtraces with lwt
13:50
<
haesbaert >
this is my ocamlc line:
13:50
<
haesbaert >
ocamlfind ocamlc -c -g -bin-annot -strict-sequence -package sexplib -package sexplib.syntax -package cmdliner -package ipaddr -package cstruct.unix -package tuntap -package cstruct -
13:50
<
haesbaert >
package cstruct.lwt -package cstruct.syntax -package lwt.unix -package lwt.syntax -ppopt -lwt-debug -syntax camlp4o -syntax pa_cstruct -o dhcp.cmi dhcp.mli
13:50
<
haesbaert >
is the order important ?
13:51
<
Drup >
the order seeps right
13:52
<
haesbaert >
I got a trace like this:
13:52
<
haesbaert >
ocamlfind ocamlc -c -g -bin-annot -strict-sequence -package sexplib -package sexplib.syntax -package cmdliner -package ipaddr -package cstruct.unix -package tuntap -package cstruct -
13:52
<
haesbaert >
hdhcpd: internal error, uncaught exception: Invalid_argument("packet too small 12 < 236") Raised at file "src/core/lwt.ml", line 788, characters 22-23 Called from file "src/unix/lwt_main.ml", line 34, characters 8-18
13:53
<
haesbaert >
there is stuff missing
13:53
<
Drup >
ah, well, OCAMLRUNPARAM=b
13:53
<
haesbaert >
I'm running native
13:53
<
Drup >
that's for native.
13:54
<
haesbaert >
leme reproduce
13:54
<
Drup >
you exported it before running the program ?
13:54
<
Drup >
it's not for compilation, it's for runtime
13:55
<
haesbaert >
yes, I also have this:
13:55
<
haesbaert >
let () = Printexc.record_backtrace true
13:55
<
haesbaert >
the funny thing is, if I raise an uncaught exception on the same module where the Lwt is created, I get a full backtrace
13:55
<
haesbaert >
example
13:56
<
haesbaert >
hdhcpd: internal error, uncaught exception: Failure("BOOOOM") Raised at file "pervasives.ml", line 30, characters 22-33 Called from file "hdhcpd.ml", line 326, characters 2-19 Called from file "list.ml", line 55, characters 20-23 Called from file "hdhcpd.ml", line 345, characters 4-90
13:56
<
haesbaert >
that's complete
13:56
<
ggole >
Is it just running on different threads?
13:57
<
Drup >
you raise with Lwt.fail, right ?
13:57
<
haesbaert >
whooops
13:57
<
haesbaert >
no, just failwith
13:57
<
Drup >
*always* use Lwt.fail
13:57
<
Drup >
when Lwt is involved
13:57
<
haesbaert >
but in this case I'm calling a module that doesn't know about lwt
13:57
<
Drup >
and Lwt.catch, and all that
13:57
<
haesbaert >
that module raises an exception
13:58
<
Drup >
Lwt.wrap is made for that
13:58
relrod_ has joined #ocaml
13:58
relrod_ has quit [Changing host]
13:58
relrod_ has joined #ocaml
13:58
<
haesbaert >
wait wait, say I call a module inside and Lwt thread that raises Not_found
13:59
<
haesbaert >
wait wait, say I call a module inside a Lwt thread that raises Not_found
13:59
<
haesbaert >
in that case, I'm not getting the backtrace, I also, would not enjoy changing the module to be Lwt aware
13:59
<
haesbaert >
that's where Lwt.wrap comes into play ?
14:00
<
Drup >
yes, at the boundary
14:00
<
Drup >
it wraps the non lwt function into an lwt-friendly one
14:00
<
Drup >
(wrt exceptions)
14:01
<
haesbaert >
but wrap also generates a Lwt
14:01
<
haesbaert >
I don't want that
14:01
<
Drup >
you just said it was inside a thread
14:02
<
haesbaert >
AHHHHHH I think now I get you, 1s
14:04
<
Drup >
basically, if an exception is raised inside a thread, it must be wrapped
14:04
relrod_ is now known as relrod
14:04
<
Drup >
otherwise, the stracktrace, even the partial one, is going to be complete bullshit
14:05
<
haesbaert >
so say I have this recursive Lwt, that calls shit loads of functions from modules which are not Lwt aware.
14:05
<
haesbaert >
I have to wrap every single call ?
14:08
ollehar has quit [Remote host closed the connection]
14:08
<
Drup >
or you wrap the whole thing
14:09
<
haesbaert >
but the whole thing is already a Lwt thingy
14:10
<
haesbaert >
My main is something like this Lwt_main.run (recv_thread), where recv_thread is a:
14:10
<
haesbaert >
let recv_thread = dhcp_recv config in
14:11
<
haesbaert >
dhcp_recv is type Config.t -> 'a Lwt.t
14:11
<
haesbaert >
so how I would wrap a 'a Lwt.t
14:27
<
haesbaert >
lwt pkt = wrap (fun () -> Dhcp.pkt_of_buf buffer n) in
14:27
<
haesbaert >
pkt_of_buf is the one raising invalid_arg
14:27
<
haesbaert >
I still don't get a nice backtrace :/
14:27
<
haesbaert >
no changes
14:33
jhaberku has joined #ocaml
14:44
tmtwd has quit [Ping timeout: 240 seconds]
14:47
<
haesbaert >
I still don't get the full backtrace
14:49
<
Drup >
that should work, yeah
14:50
<
haesbaert >
maybe it is my build options
14:50
slash^ has joined #ocaml
14:51
<
haesbaert >
Fatal error: exception Invalid_argument("BOOM")
14:51
<
haesbaert >
Raised at file "src/core/lwt.ml", line 788, characters 22-23
14:51
<
haesbaert >
Called from file "src/unix/lwt_main.ml", line 34, characters 8-18
14:51
<
haesbaert >
Called from file "exc.ml", line 13, characters 2-26
14:51
<
haesbaert >
well I do get the line from Lwt_main.run
14:52
tmtwd has joined #ocaml
14:53
<
Drup >
isn't that the correct backtrace
14:54
<
haesbaert >
not really, the exception is raised on line 7
14:56
<
haesbaert >
but there is a difference, on my original code I don't get a line for the Lwt_run
14:57
oscar_toro has quit [Ping timeout: 240 seconds]
14:58
sepp2k has joined #ocaml
15:00
<
Drup >
hum, right, I'm not sure
15:01
<
Drup >
ask on the bug tracker, because it seems to me that it should work
15:03
mort___ has quit [Ping timeout: 246 seconds]
15:05
MercurialAlchemi has joined #ocaml
15:09
<
haesbaert >
btw, I have the same behaviour with Lwt.fail_with "boom"
15:09
mort___ has joined #ocaml
15:09
ollehar has joined #ocaml
15:17
tmtwd has quit [Ping timeout: 240 seconds]
15:19
thomasga has joined #ocaml
15:23
tmtwd has joined #ocaml
15:29
zpe has quit [Remote host closed the connection]
15:34
struktured has joined #ocaml
15:36
Denommus has joined #ocaml
15:38
zpe has joined #ocaml
15:43
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
15:43
amnn has joined #ocaml
15:46
oscar_toro has joined #ocaml
15:53
struktured has quit [Ping timeout: 264 seconds]
15:56
mort___ has quit [Ping timeout: 256 seconds]
15:58
oscar_toro has quit [Ping timeout: 256 seconds]
16:09
jhaberku has quit [Ping timeout: 246 seconds]
16:09
sh0t has joined #ocaml
16:10
mort___ has joined #ocaml
16:11
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
16:12
<
ollehar >
how about that undecidability of type-inference in php...
16:12
<
ollehar >
would this be impossible to infer?
16:12
<
ollehar >
class C {} class D extends C {} function f(C $x) {}
16:12
<
ollehar >
if I feed D to f()
16:12
<
ollehar >
maybe ask on stackoverflow :P
16:13
jhaberku has joined #ocaml
16:16
<
ollehar >
that guy yesterday said it would be impossible. but if you enforce hinting?
16:20
oscar_toro has joined #ocaml
16:24
zpe has quit [Remote host closed the connection]
16:25
sh0t has quit [Ping timeout: 256 seconds]
16:26
sgnb has joined #ocaml
16:29
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
16:33
jhaberku has quit [Ping timeout: 256 seconds]
16:33
<
jyc >
if you enforce hinting, is it still type inference?
16:37
milosn has joined #ocaml
16:42
reynir has quit [Quit: WeeChat 1.1.1]
16:46
thomasga has quit [Quit: Leaving.]
16:46
thomasga has joined #ocaml
16:50
jonludlam has quit [Ping timeout: 252 seconds]
17:01
darkf has quit [Quit: Leaving]
17:10
oscar_toro has quit [Ping timeout: 265 seconds]
17:12
thomasga has quit [Quit: Leaving.]
17:12
gustav__1 has quit [Ping timeout: 246 seconds]
17:13
jhaberku has joined #ocaml
17:13
struktured has joined #ocaml
17:16
mort___ has quit [Quit: Leaving.]
17:17
<
ollehar >
jyc: well... not completely. still, better than vanilla php.
17:18
<
ollehar >
and there's no hint for int, string etc in PHP
17:18
<
ollehar >
so + and `.` have to be used for inference.
17:19
thomasga has joined #ocaml
17:21
dsheets has quit [Ping timeout: 246 seconds]
17:25
amnn has joined #ocaml
17:26
amnn has quit [Client Quit]
17:26
<
ollehar >
anyone know about a module called FileInfo? It's needed for the hacklang parser/ast, but I can't find it. :/
17:26
MrScout has joined #ocaml
17:28
<
ollehar >
gah, found it
17:28
<
ollehar >
filename fileInfo, not fileinfo
17:34
jwatzman|work has joined #ocaml
17:35
zpe has joined #ocaml
17:39
robogeoff has joined #ocaml
17:39
ygrek has joined #ocaml
17:40
zpe has quit [Ping timeout: 252 seconds]
17:44
struktured has quit [Ping timeout: 264 seconds]
17:48
reynir has joined #ocaml
17:51
milosn has quit [Ping timeout: 265 seconds]
17:51
rgrinberg has joined #ocaml
17:56
soultadu has joined #ocaml
17:58
Haudegen has quit [Ping timeout: 255 seconds]
18:06
yomimono has joined #ocaml
18:08
monod has joined #ocaml
18:09
gustav___ has joined #ocaml
18:11
jhaberku has quit [Ping timeout: 256 seconds]
18:15
Kakadu has quit [Quit: Page closed]
18:15
yomimono has quit [Ping timeout: 246 seconds]
18:19
Haudegen has joined #ocaml
18:19
soultadu has joined #ocaml
18:20
wraithm has joined #ocaml
18:29
xyh has joined #ocaml
18:33
thomasga has quit [Ping timeout: 256 seconds]
18:34
swgillespie has joined #ocaml
18:35
kushal has quit [Ping timeout: 255 seconds]
18:36
monod has quit [Quit: Sto andando via]
18:43
xyh has quit [Ping timeout: 264 seconds]
18:46
<
haesbaert >
I'm having issues with handling exceptions in lwt
18:46
<
haesbaert >
does try_lwt do a bind ?
18:47
<
haesbaert >
I have: lwt (n, ifid) = Util.lwt_cstruct_recvif socket buffer in
18:47
<
haesbaert >
Util.lwt_cstruct_recvif returns a (int * int) Lwt.t
18:48
<
haesbaert >
so I'm trying lwt (n, ifid) = try_lwt Util.... with _ -> here I wanted to call myself recursively
18:49
<
haesbaert >
bah let me try to get this straight
18:50
amnn has joined #ocaml
18:52
tane has quit [Ping timeout: 256 seconds]
18:55
monod has joined #ocaml
18:56
mort___ has joined #ocaml
18:57
lobo has joined #ocaml
19:02
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
19:04
tane has joined #ocaml
19:04
Kakadu has joined #ocaml
19:05
robogeoff has quit [Ping timeout: 246 seconds]
19:12
Hannibal_Smith has joined #ocaml
19:13
swgillespie has joined #ocaml
19:14
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
19:17
matason has quit [Ping timeout: 264 seconds]
19:25
rgrinberg has quit [Ping timeout: 246 seconds]
19:31
mcclurmc has joined #ocaml
19:32
mcclurmc has quit [Remote host closed the connection]
19:32
soultadu has joined #ocaml
19:33
mcclurmc has joined #ocaml
19:34
slash^ has quit [Read error: Connection reset by peer]
19:35
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
19:41
Haudegen has quit [Ping timeout: 264 seconds]
19:43
matason has joined #ocaml
19:44
j0sh__ is now known as j0sh
19:45
sh0t has joined #ocaml
19:50
Haudegen has joined #ocaml
19:53
rgrinberg has joined #ocaml
19:55
BitPuffin has quit [Ping timeout: 276 seconds]
20:01
mcclurmc has quit [Remote host closed the connection]
20:01
mcclurmc has joined #ocaml
20:03
Anarchos has joined #ocaml
20:06
robogeoff has joined #ocaml
20:09
Hannibal_Smith has quit [Quit: Leaving]
20:16
mcclurmc has quit [Remote host closed the connection]
20:17
swgillespie has joined #ocaml
20:18
swgillespie has quit [Client Quit]
20:21
sh0t has quit [Ping timeout: 256 seconds]
20:22
thomasga has joined #ocaml
20:23
_andre has quit [Quit: leaving]
20:25
mcclurmc has joined #ocaml
20:26
<
ollehar >
Error: Files /home/olle/.opam/4.02.1/lib/ocaml/str.cmx
20:26
<
ollehar >
and /home/olle/.opam/4.02.1/lib/ocaml/str.cmx
20:26
<
ollehar >
both define a module named Str
20:26
<
ollehar >
make:
*** [main] Error 2
20:26
<
ollehar >
it's exactly the same file, no?
20:27
<
ollehar >
ah, my Makefile is messy
20:30
jbrown has quit [Read error: Connection reset by peer]
20:30
mcclurmc has quit [Ping timeout: 256 seconds]
20:34
mcclurmc has joined #ocaml
20:39
Haudegen has quit [Ping timeout: 246 seconds]
20:45
swgillespie has joined #ocaml
20:48
matason has quit [Ping timeout: 246 seconds]
20:48
ceryo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
20:48
Haudegen has joined #ocaml
20:48
manud has joined #ocaml
20:51
manud has quit [Client Quit]
20:53
MercurialAlchemi has quit [Ping timeout: 252 seconds]
20:53
struktured has joined #ocaml
20:53
dsheets has joined #ocaml
20:58
<
ollehar >
debug ocaml program the seg faults? gdb?
20:58
ygrek has quit [Ping timeout: 276 seconds]
21:03
<
Drup >
dsheets: do you have other documentation questions for re ? I'm patching it now
21:03
manud has joined #ocaml
21:04
soultadu has quit [Ping timeout: 256 seconds]
21:08
<
haesbaert >
that function is not called anywhere, I can seem to be able to bind the value to return unit
21:09
manud has quit [Quit: manud]
21:09
<
haesbaert >
line 17
21:10
<
haesbaert >
for some reason it won't allow me to return unit, even though that function is not called anywhere
21:10
haythammed_ has joined #ocaml
21:10
<
Drup >
"lwt x = in ..."
21:10
<
Drup >
"lwt x = e1 in e2"
21:10
<
Drup >
e1 and e2 must be of type 'a Lwt.t
21:11
<
Drup >
(because it's sugar for e1 >>= fun x -> e2, and see the type of >>=
21:11
<
haesbaert >
so how would I ago about doing this ?
21:12
<
Drup >
can't you return Lwt.return_unit ?
21:12
<
haesbaert >
I could but I really didn't want to
21:13
hay207 has quit [Ping timeout: 252 seconds]
21:13
<
haesbaert >
cause then I need to change the future callers to expect a unit Lwt
21:13
<
Drup >
If you don't really case about when the Cstruct thing is executed, you could use Lwt.ignore_result
21:14
<
Drup >
Oh, no you can't
21:14
<
Drup >
sorry, no choice.
21:14
<
haesbaert >
hmm the thing is I want it to be sequential
21:14
<
haesbaert >
so I should just do lwt () = send_offer ...
21:14
<
Drup >
how is that an issue ?
21:15
haythammed__ has joined #ocaml
21:15
<
haesbaert >
hmm my whole stack expects a unit, now I'll have to change everything
21:16
<
Drup >
well yeah, it's a monad, it's contaminating the whole code ..
21:16
<
haesbaert >
that's sad
21:16
MrScout_ has joined #ocaml
21:16
<
haesbaert >
I thought it would be straight forward to bind a computation and go on
21:17
haythammed_ has quit [Ping timeout: 240 seconds]
21:18
<
Drup >
If it's really a huge issue, and you have access to Lwt_preemptive (iirc, not in mirage), you can use Lwt_preemptive.run_in_main
21:18
MrScout has quit [Ping timeout: 248 seconds]
21:18
<
haesbaert >
hmm nah, I think I'll just have to give in to changing it all
21:20
mcclurmc has quit [Remote host closed the connection]
21:22
mcclurmc has joined #ocaml
21:24
manud has joined #ocaml
21:24
manud has quit [Client Quit]
21:25
jonludlam has joined #ocaml
21:26
<
haesbaert >
oh it was easier than I thought
21:29
struktured has quit [Read error: Connection reset by peer]
21:29
<
rgrinberg >
Drup: yeah
21:32
haythammed_ has joined #ocaml
21:32
haythammed__ has quit [Ping timeout: 255 seconds]
21:36
soultadu has joined #ocaml
21:36
struktured has joined #ocaml
21:36
MrScout_ has quit [Remote host closed the connection]
21:37
gustav___ has quit [Ping timeout: 244 seconds]
21:37
MrScout has joined #ocaml
21:37
gustav___ has joined #ocaml
21:40
nicoo has quit [Ping timeout: 264 seconds]
21:40
systmkor has joined #ocaml
21:42
jao has joined #ocaml
21:42
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
21:46
haythammed_ has quit [Quit: Leaving]
21:47
tane has quit [Quit: Verlassend]
21:47
hay207 has joined #ocaml
21:47
ygrek has joined #ocaml
21:49
Simn has quit [Quit: Leaving]
21:49
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
21:49
jonludlam has quit [Ping timeout: 264 seconds]
21:50
matason has joined #ocaml
21:51
Denommus has quit [Quit: going home]
21:53
soultadu has quit [Ping timeout: 256 seconds]
21:55
struktured has quit [Ping timeout: 265 seconds]
21:57
struktured has joined #ocaml
22:01
MrScout has quit [Remote host closed the connection]
22:02
hay207 has quit [Ping timeout: 265 seconds]
22:03
wraithm has quit [Quit: leaving]
22:12
MrScout has joined #ocaml
22:12
soultadu has joined #ocaml
22:20
struktured has quit [Ping timeout: 265 seconds]
22:21
matason has quit [Ping timeout: 264 seconds]
22:25
walter|r has joined #ocaml
22:27
lobo has quit [Quit: leaving]
22:27
<
companion_cube >
you probably only have one thread?
22:28
<
companion_cube >
oh, it's just buffering
22:28
MrScout has quit [Remote host closed the connection]
22:29
hay207 has joined #ocaml
22:30
badkins has quit []
22:32
<
dmbaturin >
companion_cube: Yeah, one thread in this case. But what I find puzzling is that without sleep there's no need to flush the channel.
22:33
<
companion_cube >
without sleep it all prints too fast, doesn't it?
22:33
<
companion_cube >
I think you don't need to call flush with sleep either, only it takes several iterations before the buffer fills
22:35
<
dmbaturin >
Looks like not, I did wait for it. It never started printing anything. :)
22:37
<
companion_cube >
well you need to call one of the functions
22:38
<
companion_cube >
strange, it works for me
22:38
<
dmbaturin >
The one without flush?
22:39
<
companion_cube >
yes
22:39
<
companion_cube >
print_endline should flush anyway
22:41
<
dmbaturin >
Wait, I used print_endline there. Actual code that didn't work uses Printf.printf, I thought printf flushes automatically too. Or it doesn't?
22:44
|jbrown| has joined #ocaml
22:47
<
companion_cube >
it doesn't
22:47
<
companion_cube >
and indeed I remember having had to put additional flushes with Printf
22:47
<
companion_cube >
those days I tend to use Format anyway
22:54
monod has quit [Quit: Sto andando via]
22:54
hay207 has quit [Ping timeout: 240 seconds]
22:55
Sorella has quit [Ping timeout: 248 seconds]
22:56
manud has joined #ocaml
22:56
swgillespie has joined #ocaml
22:57
Sorella has joined #ocaml
22:58
Kakadu has quit [Remote host closed the connection]
22:59
<
ygrek >
use %! in printf to flush
23:00
<
dmbaturin >
companion_cube: Ah, this explains, thanks. I wonder how I didn't hit it earlier. :)
23:02
<
dmbaturin >
ygrek: Thanks, didn't know this either.
23:05
ollehar has quit [Quit: ollehar]
23:06
thomasga has quit [Quit: Leaving.]
23:16
manud has quit [Quit: manud]
23:16
hay207 has joined #ocaml
23:18
manud has joined #ocaml
23:21
mort___ has quit [Quit: Leaving.]
23:29
meteo has quit [Remote host closed the connection]
23:34
madroach has quit [Ping timeout: 264 seconds]
23:35
madroach has joined #ocaml
23:37
MrScout has joined #ocaml
23:46
hay207 has quit [Ping timeout: 276 seconds]
23:57
lupine has joined #ocaml