00:02
thomasga has quit [Quit: Leaving.]
00:02
ontologiae has quit [Ping timeout: 260 seconds]
00:03
thomasga has joined #ocaml
00:05
avsm has quit [Quit: Leaving.]
00:08
<
Drup >
orion: just use one of the asynchronous library, like Lwt or Async
00:08
Guest35536 has quit [Remote host closed the connection]
00:10
orion has left #ocaml []
00:15
avsm has joined #ocaml
00:20
avsm has quit [Ping timeout: 264 seconds]
00:28
f[x] has quit [Ping timeout: 252 seconds]
00:28
jao has joined #ocaml
00:28
jao has quit [Changing host]
00:28
jao has joined #ocaml
00:29
thomasga has quit [Quit: Leaving.]
00:36
avsm has joined #ocaml
00:41
talzeus has quit [Read error: Connection reset by peer]
00:47
ggherdov has quit [Ping timeout: 276 seconds]
00:50
philtor has quit [Ping timeout: 264 seconds]
00:58
avsm has quit [Ping timeout: 260 seconds]
00:58
oriba has quit [Quit: oriba]
00:59
ggherdov has joined #ocaml
01:07
f[x] has joined #ocaml
01:09
talzeus has joined #ocaml
01:13
kizzx2 has quit [Quit: Leaving.]
01:13
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
01:24
rand000 has quit [Quit: leaving]
01:29
cesar_ has joined #ocaml
01:30
cesar_ is now known as Guest50187
01:32
S11001001 has joined #ocaml
01:32
S11001001 has quit [Changing host]
01:32
S11001001 has joined #ocaml
01:44
Eyyub has quit [Ping timeout: 248 seconds]
01:58
kizzx2 has joined #ocaml
01:58
kizzx2 has quit [Max SendQ exceeded]
01:58
kizzx2 has joined #ocaml
01:58
kizzx2 has quit [Max SendQ exceeded]
01:59
kizzx2 has joined #ocaml
01:59
kizzx2 has quit [Max SendQ exceeded]
01:59
kizzx2 has joined #ocaml
01:59
kizzx2 has quit [Max SendQ exceeded]
01:59
kizzx2 has joined #ocaml
02:00
kizzx2 has quit [Max SendQ exceeded]
02:03
Eyyub has joined #ocaml
02:07
Guest50187 has quit [Remote host closed the connection]
02:11
wolfnn has quit [Ping timeout: 272 seconds]
02:14
teethed_birt has joined #ocaml
02:17
jao has quit [Ping timeout: 272 seconds]
02:38
Eyyub has quit [Read error: Operation timed out]
02:48
teethed_birt has quit [Quit: Page closed]
02:56
avsm has joined #ocaml
03:00
avsm has quit [Ping timeout: 252 seconds]
03:06
robink has joined #ocaml
03:11
kizzx2 has joined #ocaml
03:12
kizzx2 has quit [Max SendQ exceeded]
03:12
kizzx2 has joined #ocaml
03:17
kyrylo has quit [Ping timeout: 248 seconds]
03:22
nikki93 has quit [Remote host closed the connection]
03:25
thorsten` has quit [Ping timeout: 276 seconds]
03:45
mocrunsthecity has joined #ocaml
03:57
avsm has joined #ocaml
04:01
avsm has quit [Ping timeout: 260 seconds]
04:11
divyansr has joined #ocaml
04:43
divyansr has quit [Remote host closed the connection]
04:44
divyansr has joined #ocaml
04:51
f[x] has quit [Ping timeout: 252 seconds]
04:55
nikki93 has joined #ocaml
05:05
axiles has joined #ocaml
05:09
nikki93 has quit [Remote host closed the connection]
05:21
thorsten` has joined #ocaml
05:24
leo2007 has joined #ocaml
05:32
jdoles has quit [Ping timeout: 246 seconds]
05:34
ggole has joined #ocaml
05:36
jdoles has joined #ocaml
05:38
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
05:40
dant3 has joined #ocaml
05:50
f[x] has joined #ocaml
05:54
dant3 has quit [Remote host closed the connection]
05:54
dant3 has joined #ocaml
05:56
zpe has joined #ocaml
05:59
avsm has joined #ocaml
06:01
zpe has quit [Ping timeout: 264 seconds]
06:03
avsm has quit [Ping timeout: 252 seconds]
06:20
nikki93 has joined #ocaml
06:24
dant3 has quit [Remote host closed the connection]
06:24
dant3 has joined #ocaml
06:24
dant3 has quit [Remote host closed the connection]
06:25
dant3 has joined #ocaml
06:30
ddosia has quit [Remote host closed the connection]
06:32
mcclurmc has joined #ocaml
06:33
Yoric has joined #ocaml
06:44
ollehar has joined #ocaml
06:46
Kakadu has joined #ocaml
06:58
olliefr has joined #ocaml
07:00
avsm has joined #ocaml
07:00
divyansr has quit [Remote host closed the connection]
07:01
Kakadu has quit [Ping timeout: 272 seconds]
07:06
mcclurmc has quit [Remote host closed the connection]
07:06
divyansr has joined #ocaml
07:06
avsm has quit [Ping timeout: 272 seconds]
07:11
mcclurmc has joined #ocaml
07:13
mcclurmc has quit [Remote host closed the connection]
07:14
mcclurmc has joined #ocaml
07:19
mcclurmc has quit [Ping timeout: 265 seconds]
07:26
cago has joined #ocaml
07:40
Kakadu has joined #ocaml
07:44
mcclurmc has joined #ocaml
07:47
Simn has joined #ocaml
07:49
mcclurmc has quit [Ping timeout: 260 seconds]
07:53
ddosia has joined #ocaml
07:59
AltGr has joined #ocaml
08:03
rossberg has joined #ocaml
08:06
FreeArtMan has joined #ocaml
08:13
stomp has quit [Ping timeout: 245 seconds]
08:14
stomp has joined #ocaml
08:21
Yoric has quit [Ping timeout: 252 seconds]
08:27
thomasga has joined #ocaml
08:28
malo has joined #ocaml
08:42
olliefr has joined #ocaml
08:43
FreeArtMan has quit [Quit: main.lv]
08:43
skchrko has joined #ocaml
08:45
mcclurmc has joined #ocaml
08:46
ontologiae has joined #ocaml
08:49
olliefr has quit [Read error: Connection reset by peer]
08:54
olliefr has joined #ocaml
08:55
mcclurmc has quit [Ping timeout: 252 seconds]
08:58
zpe has joined #ocaml
09:02
zpe has quit [Ping timeout: 264 seconds]
09:09
_andre has joined #ocaml
09:09
contempt has quit [Ping timeout: 272 seconds]
09:12
maufred has joined #ocaml
09:17
skchrko has quit [Quit: Leaving]
09:31
FreeArtMan has joined #ocaml
09:44
kizzx2 has quit [Quit: Leaving.]
09:46
nikki93 has quit [Remote host closed the connection]
09:46
ollehar has quit [Ping timeout: 260 seconds]
09:49
rand000 has joined #ocaml
09:53
Yoric has joined #ocaml
10:01
jonludlam has joined #ocaml
10:06
contempt has joined #ocaml
10:13
contempt has quit [Ping timeout: 260 seconds]
10:15
dant3 has quit [Remote host closed the connection]
10:15
contempt has joined #ocaml
10:16
f[x] has quit [Ping timeout: 260 seconds]
10:17
Thooms has joined #ocaml
10:18
johnelse has quit [Quit: Lost terminal]
10:19
dant3 has joined #ocaml
10:19
johnelse has joined #ocaml
10:23
contempt has quit [Ping timeout: 260 seconds]
10:24
dant3 has quit [Ping timeout: 252 seconds]
10:24
contempt has joined #ocaml
10:25
skchrko has joined #ocaml
10:29
dant3 has joined #ocaml
10:32
contempt has quit [Ping timeout: 260 seconds]
10:33
contempt has joined #ocaml
10:41
contempt has quit [Ping timeout: 272 seconds]
10:43
contempt has joined #ocaml
10:46
nikki93 has joined #ocaml
10:46
kyrylo has joined #ocaml
10:48
nikki93 has quit [Read error: Operation timed out]
10:49
dsheets has quit [Ping timeout: 245 seconds]
10:50
avsm has joined #ocaml
10:50
contempt has quit [Ping timeout: 272 seconds]
10:52
contempt has joined #ocaml
10:56
thomasga has quit [Quit: Leaving.]
10:58
rand000 has quit [Quit: leaving]
11:00
contempt has quit [Ping timeout: 272 seconds]
11:01
contempt has joined #ocaml
11:01
mlh has quit [Read error: Connection reset by peer]
11:07
dsheets has joined #ocaml
11:08
dant3 has quit [Remote host closed the connection]
11:09
contempt has quit [Ping timeout: 264 seconds]
11:09
f[x] has joined #ocaml
11:10
contempt has joined #ocaml
11:19
contempt has quit [Ping timeout: 265 seconds]
11:19
talzeus has quit [Ping timeout: 272 seconds]
11:20
contempt has joined #ocaml
11:20
avsm has quit [Quit: Leaving.]
11:25
Kakadu has quit [Ping timeout: 272 seconds]
11:28
contempt has quit [Ping timeout: 260 seconds]
11:29
contempt has joined #ocaml
11:31
divyansr has quit [Remote host closed the connection]
11:32
dant3 has joined #ocaml
11:33
divyansr has joined #ocaml
11:35
AltGr has left #ocaml []
11:36
AltGr has joined #ocaml
11:37
contempt has quit [Ping timeout: 265 seconds]
11:39
contempt has joined #ocaml
11:39
wwilly has joined #ocaml
11:40
_andre has quit [Ping timeout: 246 seconds]
11:42
dant3 has quit [Remote host closed the connection]
11:42
_andre has joined #ocaml
11:47
contempt has quit [Ping timeout: 272 seconds]
11:47
dant3 has joined #ocaml
11:47
nikki93 has joined #ocaml
11:48
contempt has joined #ocaml
11:49
Kakadu has joined #ocaml
11:49
mhi^ has joined #ocaml
11:50
beginner has joined #ocaml
11:52
dant3 has quit [Ping timeout: 265 seconds]
11:52
nikki93 has quit [Ping timeout: 272 seconds]
11:52
<
beginner >
i installed utop and core with opam and tried to follow the examples in real world ocaml, but utop doesnt find Core?
11:54
dant3 has joined #ocaml
11:55
mcclurmc has joined #ocaml
11:56
contempt has quit [Ping timeout: 265 seconds]
11:56
<
ddosia >
I think you miss something in your ~/.ocamlinit
11:57
ollehar has joined #ocaml
11:57
contempt has joined #ocaml
11:58
<
companion_cube >
o/
11:59
nojb has joined #ocaml
12:00
nojb has quit [Remote host closed the connection]
12:00
mcclurmc has quit [Ping timeout: 264 seconds]
12:03
<
companion_cube >
o/\o
12:04
<
beginner >
thanks it worked
12:05
contempt has quit [Ping timeout: 252 seconds]
12:06
<
companion_cube >
welcome beginner, btw :)
12:07
contempt has joined #ocaml
12:15
contempt has quit [Ping timeout: 252 seconds]
12:17
Thooms has quit [Read error: Operation timed out]
12:17
contempt has joined #ocaml
12:20
ollehar has quit [Ping timeout: 260 seconds]
12:24
kyrylo has quit [Quit: Hi, Rob!]
12:25
contempt has quit [Ping timeout: 248 seconds]
12:26
thomasga has joined #ocaml
12:27
contempt has joined #ocaml
12:33
cesar_ has joined #ocaml
12:33
cesar_ is now known as Guest65938
12:35
contempt has quit [Ping timeout: 252 seconds]
12:36
contempt has joined #ocaml
12:37
darkf has quit [Quit: Leaving]
12:39
Eyyub has joined #ocaml
12:43
Guest65938 has quit [Remote host closed the connection]
12:44
contempt has quit [Ping timeout: 252 seconds]
12:45
dant3 has quit [Remote host closed the connection]
12:45
contempt has joined #ocaml
12:48
nikki93 has joined #ocaml
12:48
willy_ has joined #ocaml
12:50
thomasga has quit [Quit: Leaving.]
12:52
wwilly has quit [Ping timeout: 264 seconds]
12:52
nikki93 has quit [Ping timeout: 246 seconds]
12:52
thomasga has joined #ocaml
12:53
martintrojer has joined #ocaml
12:53
contempt has quit [Ping timeout: 272 seconds]
12:55
contempt has joined #ocaml
12:56
mcclurmc has joined #ocaml
13:01
mhi^ has quit [Quit: Lost terminal]
13:03
wolfnn has joined #ocaml
13:03
contempt has quit [Ping timeout: 260 seconds]
13:05
contempt has joined #ocaml
13:06
mcclurmc has quit [Ping timeout: 252 seconds]
13:08
nisstyre has quit [Quit: Leaving]
13:11
dant3 has joined #ocaml
13:13
mironov has joined #ocaml
13:13
contempt has quit [Ping timeout: 265 seconds]
13:15
contempt has joined #ocaml
13:16
mironov has quit [Remote host closed the connection]
13:16
talzeus has joined #ocaml
13:17
avsm has joined #ocaml
13:17
dsheets has quit [Ping timeout: 272 seconds]
13:21
dsheets has joined #ocaml
13:21
divyansr has quit [Remote host closed the connection]
13:22
contempt has quit [Ping timeout: 272 seconds]
13:24
contempt has joined #ocaml
13:32
contempt has quit [Ping timeout: 272 seconds]
13:33
contempt has joined #ocaml
13:37
metasyntax has joined #ocaml
13:42
contempt has quit [Ping timeout: 264 seconds]
13:43
contempt has joined #ocaml
13:51
contempt has quit [Ping timeout: 246 seconds]
13:52
leo2007 has quit [Ping timeout: 272 seconds]
13:53
contempt has joined #ocaml
13:54
ontologiae has quit [Ping timeout: 252 seconds]
14:01
contempt has quit [Ping timeout: 272 seconds]
14:02
contempt has joined #ocaml
14:03
mcclurmc has joined #ocaml
14:10
<
hcarty >
Is there an official/proper way to send/get a file descriptor to/from a C function using ctypes?
14:11
contempt has quit [Ping timeout: 264 seconds]
14:12
contempt has joined #ocaml
14:13
<
companion_cube >
that sounds difficult
14:13
mcclurmc has quit [Ping timeout: 248 seconds]
14:13
<
companion_cube >
especially if you use buffered channels :s
14:14
<
flux >
I don't know ctypes, but if it helps then Unix.file_descr is just a name for integer (though you probably knew this already..)
14:15
<
hcarty >
flux: I do - but unfortunately the representation is different on Windows.
14:15
<
flux >
the bane of ocaml :)
14:15
<
hcarty >
flux: I'm not using Windows for anything OCamly at the moment but I'd rather avoid explicitly breaking things there
14:15
<
hcarty >
flux: Indeed :-)
14:15
<
adrien_oww >
an fd is an int, at least on linux, so what would be the issue?
14:16
<
flux >
well, it's a float in windows
14:16
<
adrien_oww >
ah, for windows, well
14:16
<
flux >
well, an object probably :)
14:16
<
adrien_oww >
heh :)
14:16
<
companion_cube >
awww windows
14:16
<
hcarty >
The zeromq bindings (which are what I'm looking at now) handle this with some compile-time C stub #defines
14:16
<
adrien_oww >
isn't the main difference the check for negativity?
14:16
<
companion_cube >
flux: that sounds logical, a file descriptor is NotANumber
14:17
<
hcarty >
I'm curious to know if there is a clean way to do the same with ctypes. I expect that the answer is along the lines of "yes but not that clean"
14:18
<
adrien_oww >
you have Sys.os_type or something like that to test for windows
14:18
<
flux >
a number such as 1, 2 or 1.5, or NotANumber or FileNotFound
14:18
<
companion_cube >
type bool2 = True | False | FileNotFound;; (* new_pervasives.ml *)
14:18
<
hcarty >
adrien_oww: That's what I'm thinking too.
14:19
<
hcarty >
companion_cube: `true | `false so you can extend at will :-)
14:19
dant3 has quit [Remote host closed the connection]
14:21
dant3 has joined #ocaml
14:21
<
companion_cube >
:D
14:21
contempt has quit [Ping timeout: 252 seconds]
14:23
contempt has joined #ocaml
14:24
<
hcarty >
companion_cube: Is BatteriesExceptionless considered to be under the incubator umbrella or is it official and unbreakable until 3.0.0?
14:24
<
avsm >
hcarty: would recommend creating an issue for ctypes. the forthcoming stub generation will indeed support this via 'views'
14:24
leo2007 has joined #ocaml
14:25
dant3 has quit [Ping timeout: 272 seconds]
14:25
<
companion_cube >
hcarty: I don't know this. thelema or gasche may know
14:26
<
hcarty >
avsm: Thanks, I'll do that.
14:26
philtor has joined #ocaml
14:27
Thooms has joined #ocaml
14:29
leo2007 has quit [Ping timeout: 252 seconds]
14:30
zpe has joined #ocaml
14:31
contempt has quit [Ping timeout: 252 seconds]
14:31
cesar_ has joined #ocaml
14:32
cesar_ is now known as Guest87520
14:32
contempt has joined #ocaml
14:34
zpe has quit [Ping timeout: 248 seconds]
14:35
campwesl has joined #ocaml
14:36
talzeus has quit [Read error: Connection reset by peer]
14:38
<
gasche >
hcarty: I don't remember, but I think it is incubating (or at least should be)
14:39
<
gasche >
darn, I should have mentioned it in the release announcement
14:40
contempt has quit [Ping timeout: 272 seconds]
14:41
mhi^ has joined #ocaml
14:41
contempt has joined #ocaml
14:42
philtor has quit [Ping timeout: 252 seconds]
14:45
testcocoon has quit [Quit: Coyote finally caught me]
14:49
<
companion_cube >
about extension points, how will plugins interact with the compiler?
14:49
<
companion_cube >
will it be as complicated to compile as camlp4?
14:49
testcocoon has joined #ocaml
14:49
lilmicky has joined #ocaml
14:49
talzeus has joined #ocaml
14:49
talzeus has quit [Remote host closed the connection]
14:49
contempt has quit [Ping timeout: 246 seconds]
14:50
talzeus has joined #ocaml
14:51
contempt has joined #ocaml
14:52
amirmc has joined #ocaml
14:54
shinnya has joined #ocaml
14:55
<
jpdeplaix >
gasche: I agree :)
14:55
campwesl has quit [Ping timeout: 272 seconds]
14:57
lilmicky has quit [Ping timeout: 264 seconds]
14:58
Guest87520 has quit [Remote host closed the connection]
14:59
tvnguyen2014 has quit [Ping timeout: 246 seconds]
15:00
contempt has quit [Ping timeout: 252 seconds]
15:01
contempt has joined #ocaml
15:04
malo has quit [Quit: Leaving]
15:06
Eyyub has quit [Read error: Operation timed out]
15:07
jonludlam has quit [Ping timeout: 260 seconds]
15:09
caligula has joined #ocaml
15:10
contempt has quit [Ping timeout: 265 seconds]
15:10
FreeArtMan has quit [Ping timeout: 248 seconds]
15:11
<
gasche >
companion_cube: is Camlp4 difficult to compile when you use ocamlfind?
15:11
mcclurmc has joined #ocaml
15:11
<
companion_cube >
gasche: I mean, compiling files that use camlp4, not compiling camlp4 itself
15:11
<
gasche >
the only thing that doesn't work very well is passing command-line parameters to camlp4 extensions, but extension points do not provide any help with that
15:11
beginner has quit [Remote host closed the connection]
15:12
contempt has joined #ocaml
15:16
mcclurmc has quit [Ping timeout: 272 seconds]
15:20
contempt has quit [Ping timeout: 272 seconds]
15:21
contempt has joined #ocaml
15:29
contempt has quit [Ping timeout: 246 seconds]
15:30
f[x] has quit [Ping timeout: 252 seconds]
15:31
contempt has joined #ocaml
15:31
mhi^ has left #ocaml []
15:37
zpe has joined #ocaml
15:38
skchrko has quit [Remote host closed the connection]
15:39
maxxgso has joined #ocaml
15:40
shinnya has quit [Ping timeout: 252 seconds]
15:40
contempt has quit [Ping timeout: 272 seconds]
15:41
maxxgso has quit [Remote host closed the connection]
15:41
contempt has joined #ocaml
15:42
ollehar has joined #ocaml
15:48
mw1001 has joined #ocaml
15:48
<
companion_cube >
because the new code allows to test combine :p
15:48
<
hcarty >
companion_cube: BatSeq.combine still raises an exception for this example -- Seq.Exceptionless.combine (Seq.of_list [1;2]) (Seq.of_list [1]) |> Option.get |> Seq.iter (fun _ -> print_endline "hello")
15:48
<
companion_cube >
at least I think so
15:49
<
companion_cube >
hmmm
15:49
mw1001 has quit [Quit: Leaving]
15:50
contempt has quit [Ping timeout: 272 seconds]
15:50
<
hcarty >
Sorry, rather BatSeq.Exceptionless.combine still gives a sequence which raises an exception when you try to consume it.
15:50
<
companion_cube >
awwwwww, right
15:50
contempt has joined #ocaml
15:51
<
companion_cube >
how comes I did not test correctly?
15:51
<
companion_cube >
Seq.Exceptionless.combine (Seq.of_list [1;2]) (Seq.of_list ["a"; "b"; "c"]) |> Option.map (Seq.enum %> List.of_enum);; <--- does raise, indeed
15:51
<
hcarty >
I added that snippet to the bug report.
15:52
<
hcarty >
The fix really involves changing the behavior and signature of BatSeq.Exceptionless.combine, so again this may be something that has to wait until 3.0 for a full fix.
15:52
<
companion_cube >
ok, I see the bug now: evaluation is delayed
15:53
<
hcarty >
Updated with your prettier example :-)
15:53
<
companion_cube >
yes, one cannot return an option without traversing the whole sequences eagerly
15:54
<
hcarty >
And that defeats the purpose of using Seq
15:54
Kakadu has quit [Ping timeout: 272 seconds]
15:55
<
companion_cube >
exactly
15:55
<
companion_cube >
even the non Exceptionless version shouldn't raise
15:55
<
companion_cube >
because it raises later, during traversal, which imho is never a good thing
15:56
rand000 has joined #ocaml
15:57
kyrylo has joined #ocaml
15:57
Yoric has quit [Ping timeout: 252 seconds]
15:58
jonludlam has joined #ocaml
15:58
<
companion_cube >
we'll need to add this as a test
15:59
contempt has quit [Ping timeout: 246 seconds]
15:59
<
hcarty >
companion_cube: Which I can add to the bug report too, but wanted to point out here while on the subject of Batteries
16:01
contempt has joined #ocaml
16:02
<
gasche >
yes, to the bug tracker!
16:02
<
gasche >
(github discussions are unstructured enough, let's not make the chan part of batteries-devel memory)
16:03
<
hcarty >
gasche: Agreed. IRC is useful but not particularly permanent
16:04
<
companion_cube >
hcarty: yes, I see
16:05
<
companion_cube >
I don't understand much why ^ would be union, though
16:05
<
hcarty >
( + ) reads as "add"
16:06
<
adrien_oww >
we haz logs
16:06
<
companion_cube >
(^) is xor, so symmetric difference, imho
16:06
* adrien_oww
hands companion_cube an APL keyboard
16:06
<
companion_cube >
hey
16:07
<
hcarty >
companion_cube: ( ^ ) is used for string concatenation in OCaml
16:07
<
hcarty >
So not very xorish in context
16:07
ontologiae has joined #ocaml
16:07
<
companion_cube >
ah
16:07
<
companion_cube >
hmmm
16:08
<
adrien_oww >
what about
16:08
<
adrien_oww >
(lxor) ? :P
16:08
<
companion_cube >
:D
16:08
<
hcarty >
adrien_oww: Much better :-)
16:09
<
hcarty >
companion_cube: ( <-- ) is the one I've had the most reasonable uses for. The others are less important in my experience.
16:09
<
companion_cube >
sure
16:09
contempt has quit [Ping timeout: 248 seconds]
16:09
<
companion_cube >
but the asymmetry between union and intersection bothers me
16:11
contempt has joined #ocaml
16:11
<
hcarty >
I'm ok with ( + ) - it is a reasonable choice
16:12
<
companion_cube >
would &&& and ||| suit you?
16:12
<
companion_cube >
:D
16:12
<
hcarty >
Or go with adrien_oww's suggestion and use ( land ) and ( lor ) :-)
16:12
mcclurmc has joined #ocaml
16:13
<
hcarty >
Those are fine too :-)
16:13
<
companion_cube >
it would be better with & and |, but the latter is not accepted
16:13
<
companion_cube >
anyway, thanks for the remark about Seq
16:13
<
companion_cube >
I'm feeling stupid now
16:14
Thooms has quit [Quit: WeeChat 0.3.8]
16:18
mcclurmc has quit [Ping timeout: 260 seconds]
16:18
AltGr has left #ocaml []
16:19
willy_ has quit [Quit: Leaving]
16:19
contempt has quit [Ping timeout: 265 seconds]
16:20
<
hcarty >
The issue wasn't immediately obvious. Which seems to be a common theme in the lazy realm.
16:20
<
companion_cube >
indeed
16:21
<
companion_cube >
anyway, if Seq.t instances are very big, what's the point of asking for lengths to match?
16:21
<
companion_cube >
(for instance, one could combine a finite Seq with an infinite one)
16:21
contempt has joined #ocaml
16:21
<
hcarty >
companion_cube: Agreed
16:22
_andre has quit [Quit: leaving]
16:23
<
companion_cube >
ohhhh
16:23
<
companion_cube >
is it the abstraction over arrays/map we talked about?
16:23
<
hcarty >
If you have time to look, do you have any recommendations for improvement? This was my first attempt at using GADTs for something other than a throw away example.
16:23
<
hcarty >
companion_cube: Yes
16:24
<
companion_cube >
doesn't look easy :p
16:24
<
hcarty >
And I think it's much nicer in this state. I'll get it into opam at some point.
16:24
<
companion_cube >
and in batteries? :)
16:25
<
hcarty >
companion_cube: It's not easy compared to some things, but I think it is easier than the phantom type version
16:25
<
hcarty >
companion_cube: OR batteries! :-)
16:25
AltGr has joined #ocaml
16:25
<
companion_cube >
GADT are cool
16:25
tipm has joined #ocaml
16:25
<
companion_cube >
that would second Enum nicely, I think
16:26
<
hcarty >
I'm not sure if it shoudl go into Batteries directly or exist separately with a package to wraps some Batteries types (see batIndexMap.ml in the same repo)
16:27
<
hcarty >
companion_cube: GADTs are quite cool. The added type safety is nice, although all of the additional type annotations can be difficult to track.
16:27
jao has joined #ocaml
16:28
jao has quit [Changing host]
16:28
jao has joined #ocaml
16:29
contempt has quit [Ping timeout: 246 seconds]
16:29
<
hcarty >
('index_type, 'element_type, 'update_result_type, 'permission) t is not the shortest type around, but I'm not sure how to make it shorter and still allow easy use with Lwt and Batteries, for example.
16:29
<
companion_cube >
how is it related to Lwt?
16:29
<
companion_cube >
for memory-mapped files?
16:30
<
hcarty >
'update_result_type would be fixed as unit for anything which is monad-ish
16:30
<
hcarty >
val set : ('i, 'e, 'u, 'r * write) t -> 'i -> 'e -> 'u
16:30
<
companion_cube >
hmmmmmm
16:30
* companion_cube
wonders whether BatIO.{input,output} could be parametrized over a monad this way
16:30
contempt has joined #ocaml
16:31
<
companion_cube >
(using functors is very ugly, I've started to look)
16:33
<
hcarty >
It should be possible. Maybe tricky at first, but possible.
16:33
tristero has joined #ocaml
16:34
skchrko has joined #ocaml
16:34
<
companion_cube >
not sure it works, though, because it probably requires 2-rank types
16:35
<
companion_cube >
I think you can use more _ in types ;)
16:35
<
companion_cube >
val read : ('i, 'e, 'u, read * 'w) t -> 'i -> 'e <--- s/'w/_/ for instance, don't you think?
16:35
<
hcarty >
companion_cube: Both 'u and 'w, yes
16:36
<
companion_cube >
hmmm, but you use 'u only for writing, not reading?
16:36
<
companion_cube >
isn't this a problem with lwt?
16:36
<
hcarty >
I wasn't sure if that would make it more or less readable
16:36
<
hcarty >
'e would change in the Lwt case
16:36
<
hcarty >
ex. int vs int Lwt.t
16:36
<
companion_cube >
ah
16:37
<
gasche >
hcarty: no time to look before the middle of the week, I'd recommend that you ping me again with that; but it does sound interesting
16:37
<
hcarty >
(int, float) IndexMap.ro vs (int, float Lwt.t) IndexMap.ro
16:37
<
hcarty >
gasche: Ok, thank you
16:38
contempt has quit [Ping timeout: 248 seconds]
16:39
nikki93 has joined #ocaml
16:39
dant3 has joined #ocaml
16:40
contempt has joined #ocaml
16:40
tipm has quit [Quit: Page closed]
16:42
jonludlam has quit [Remote host closed the connection]
16:47
contempt has quit [Ping timeout: 252 seconds]
16:48
thomasga has quit [Remote host closed the connection]
16:48
cago has left #ocaml []
16:48
Kakadu has joined #ocaml
16:49
contempt has joined #ocaml
16:49
thomasga has joined #ocaml
16:57
contempt has quit [Ping timeout: 265 seconds]
16:58
ollehar has quit [Ping timeout: 260 seconds]
16:58
contempt has joined #ocaml
17:00
Eyyub has joined #ocaml
17:01
avsm has quit [Quit: Leaving.]
17:06
amirmc has quit [Quit: Leaving.]
17:07
contempt has quit [Ping timeout: 272 seconds]
17:08
contempt has joined #ocaml
17:13
mcclurmc has joined #ocaml
17:19
mcclurmc has quit [Ping timeout: 252 seconds]
17:25
nikki93 has quit [Remote host closed the connection]
17:33
FreeArtMan has joined #ocaml
17:40
mort___ has joined #ocaml
17:40
mcclurmc has joined #ocaml
17:47
mcclurmc has quit [Remote host closed the connection]
17:48
FreeArtMon has joined #ocaml
17:51
dsheets has quit [Ping timeout: 248 seconds]
17:52
FreeArtMan has quit [Ping timeout: 252 seconds]
17:52
FreeArtMan has joined #ocaml
17:58
<
mrvn >
let rec loop1 things = function | (' '::thing)::lines -> loop1 ((List.rev thing)::things) lines | lines -> (lines, things) in
17:58
<
mrvn >
Here is an example of a value that is not matched:
17:58
<
mrvn >
Why isn't that matched by lines?
17:58
<
adrien >
(' '::thing)
17:58
<
adrien >
remove the parens?
17:58
<
adrien >
it seems ocaml is seeing that as a list of lists
17:59
<
adrien >
char list list while you probably wanted char list
17:59
<
mrvn >
I have a list of exploded strings and want to match lines starting with ' '
18:00
<
adrien >
val loop1 : char list list -> char list list -> char list list * char list list = <fun>
18:00
<
adrien >
what is "things" ?
18:00
<
adrien >
ah, stupid me
18:00
<
mrvn >
I'M parsing some text. There is a description and then a list of things. Things start with an extra ' ' in the output.
18:00
<
adrien >
I need some rest; I'm doing worse than the guy on the ML :P
18:01
FreeArtMon has quit [Ping timeout: 254 seconds]
18:02
FreeArtMon has joined #ocaml
18:04
<
mrvn >
args, I'm looking in the wrong line. The loop1 isn't the not exhaustive one.
18:05
lostcuaz has joined #ocaml
18:07
mreca has joined #ocaml
18:23
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:24
FreeArtMon has quit [Ping timeout: 252 seconds]
18:24
FreeArtMan has quit [Ping timeout: 260 seconds]
18:25
FreeArtMan has joined #ocaml
18:25
FreeArtMon has joined #ocaml
18:27
zpe has quit [Remote host closed the connection]
18:28
zpe has joined #ocaml
18:29
Thooms has joined #ocaml
18:33
FreeArtMon has quit [Read error: Operation timed out]
18:33
FreeArtMan has quit [Write error: Broken pipe]
18:33
zpe has quit [Ping timeout: 272 seconds]
18:35
dant3 has quit [Remote host closed the connection]
18:36
amirmc has joined #ocaml
18:38
Xenasis has joined #ocaml
18:38
amirmc has quit [Read error: Connection reset by peer]
18:39
amirmc has joined #ocaml
18:39
<
Xenasis >
Does anyone see a silly error here I've not picked up?
18:40
<
Xenasis >
For some reason I keep getting a Sys_error on a file I can use Sys.is_directory properly in the REPL when I run this function
18:41
arj has joined #ocaml
18:42
Eyyub has quit [Ping timeout: 246 seconds]
18:42
<
adrien >
I'd strace the program
18:42
<
adrien >
strace -tt -f -o log ./a.out
18:42
<
adrien >
and read "log"
18:42
<
adrien >
look at ocaml-fileutils
18:43
<
Xenasis >
I will do, thanks
18:48
FreeArtMon has joined #ocaml
18:48
FreeArtMan has joined #ocaml
18:49
Xenasis has left #ocaml []
18:57
mort___ has left #ocaml []
19:00
dsheets has joined #ocaml
19:01
mreca has joined #ocaml
19:04
FreeArtMan has quit [Ping timeout: 252 seconds]
19:04
FreeArtMon has quit [Ping timeout: 252 seconds]
19:05
<
mrvn >
split_graphical must be the worst pattern matching I ever did.
19:06
<
Drup >
mrvn: what is it suppose to parse ?
19:06
<
companion_cube >
man, just use batteries :p
19:06
<
companion_cube >
String.implode/String.explode
19:06
<
mrvn >
companion_cube: thinking about it.
19:06
<
mrvn >
but to lazy for a test.
19:07
<
companion_cube >
hey, it's one "open Batteries";; away ;)
19:07
<
companion_cube >
(actually I load it in my .ocamlinit, makes things simpler)
19:07
<
mrvn >
if you have it compiled and installed
19:07
<
Drup >
I prefer to use BatModules directly, don't like to overload pervasives thingys.
19:08
<
Drup >
(and I wouldn't want to miss the delight of using BatMap.)
19:08
<
companion_cube >
Drup: but you miss the pervasives operators
19:09
<
companion_cube >
%> for instance
19:09
<
companion_cube >
mrvn: well, I presume you use opam? ^^
19:09
<
Drup >
what it is suppose to do ?
19:09
<
companion_cube >
it's composition
19:09
<
mrvn >
companion_cube: no, debian
19:09
<
companion_cube >
% is mathematical composition, %> is ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c
19:09
<
companion_cube >
mrvn: ah, I see
19:10
<
Drup >
yeah, this one is convenient
19:10
<
companion_cube >
all the combinators in Option, Tuple2...
19:11
<
Drup >
BatOption :3
19:11
<
mrvn >
Now I need to split the exits to give me a list of (exit, label)
19:12
<
mrvn >
somehow using char lists is much more fun then parsing strings.
19:13
arj has quit [Quit: Leaving.]
19:14
<
mrvn >
.oO(16 byte per input char. Luckily the text isn't long)
19:14
<
mrvn >
aeh, 24 even
19:16
wwilly has joined #ocaml
19:18
<
mrvn >
Does batteries have something that lets me pattern match enums?
19:19
<
companion_cube >
several elements, you mean?
19:19
<
companion_cube >
there is the get function
19:19
<
mrvn >
yes, like 'a'::'b'::'c'::_
19:19
ChristopheT has joined #ocaml
19:19
<
Drup >
mrvn: you don't want to use the syntax extension for parser streams ?
19:19
<
companion_cube >
I don't think so
19:20
<
mrvn >
Drup: no idea if I want to
19:20
<
Drup >
(It's still in the standard library, afaik)
19:20
<
mrvn >
Drup: does that let me take e.g. a string and pattern match it like I do a char list?
19:21
<
companion_cube >
BatStream.of_string is here, indeed
19:22
<
Drup >
oh, the syntax extension is in camlp4 now
19:24
<
companion_cube >
well, that where it belongs, doesn't it?
19:24
Xenasis has joined #ocaml
19:24
<
Xenasis >
How random is Random.bool?
19:24
<
Drup >
the syntax was in caml until 3.03, but that's pretty old indeed
19:24
<
mrvn >
do you happen to know offhand how to use it with _oasis?
19:25
<
companion_cube >
Xenasis: you mean, for cryptography?
19:25
<
mrvn >
let bool = false (* randomly determined by rolling a dice *)
19:25
<
Xenasis >
Mainly for a simple application, in honesty - the first run is the same every time
19:25
<
mrvn >
sorry, flipping a join
19:26
<
companion_cube >
Xenasis: ah, it's initialized with a fixed seed
19:26
<
mrvn >
Xenasis: did you initialize the state to something random?
19:26
<
companion_cube >
if you want different runs, call Random.self_init()
19:26
<
Xenasis >
ALright, I'll look into that o.o
19:26
<
companion_cube >
(only once, say, at the beginning)
19:26
<
companion_cube >
it uses a system-specific random source to get a seed
19:26
<
companion_cube >
and then proceed
19:27
<
companion_cube >
(pun intended)
19:28
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:28
<
Xenasis >
Awesome, that fixed my problem
19:28
<
Drup >
mrvn: for pattern matching streams, you use the keywrod "parser" instead of "function"
19:28
<
mrvn >
Drup: how does that answere my question?
19:29
<
companion_cube >
Xenasis: the point, I believe, is that you can choose not to do it, and provide a user seed instead
19:29
<
companion_cube >
for instance to repeat a previous run
19:29
<
Drup >
mrvn: for oasis, just add a tag like "true : camlp4o" or something like that
19:29
<
Xenasis >
Honestly, I don't think that's required for this program o.o
19:30
<
Xenasis >
it's a very small personal "select me a random subdirectory in my videos folder"
19:31
<
companion_cube >
Xenasis: yes, that was just to explain why this isn't called by default
19:31
<
companion_cube >
:)
19:32
<
Xenasis >
I see, yeah, it certainly makes sense o.o
19:33
<
Xenasis >
ooh, I was having fun with streams yesterday, this current conversation is of interest
19:33
amirmc has quit [Quit: Leaving.]
19:33
<
Xenasis >
I guess I didn't use that expression support thing o.o
19:35
<
mrvn >
Drup: "true : camlp4o" has the surprising effect that now nothing is build at all :)
19:35
<
Drup >
camlp4o magic !
19:35
<
mrvn >
no, I mean nothing. None of the targets even get called.
19:36
<
Drup >
mrvn: "syntax_camlp4o" ?
19:39
nikki93 has joined #ocaml
19:42
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:43
<
mrvn >
+ ocamlfind ocamldep -package unix -package ZMQ -syntax camlp4o -modules dealer/parser.ml > dealer/parser.ml.depends
19:43
<
mrvn >
ocamlfind: Using -syntax, but no package is selected specifying a preprocessor as required for -syntax
19:44
<
mrvn >
Drup: looks like I can't just use camlp4o without an extension
19:45
ollehar has joined #ocaml
19:46
dant3 has joined #ocaml
19:47
<
mrvn >
Drup: got it. I need to set "BuildDepends: camlp4" in _oasis and '"dealer/parser.ml": syntax_camlp4o' in _tags
19:47
jonludlam has joined #ocaml
19:49
mreca has joined #ocaml
19:51
dant3 has quit [Ping timeout: 272 seconds]
19:52
tobiasBora has joined #ocaml
19:53
<
mrvn >
Drup: do you have an example how to do pattern matching of a stream?
19:55
<
mrvn >
companion_cube: we already had that. no pattern matching there.
19:56
<
companion_cube >
hmm
19:57
<
companion_cube >
(uglier)
20:02
<
mrvn >
That alone would need 11 parser definitions.
20:02
<
companion_cube >
well, a parser is like a recursive function, I guess
20:02
<
companion_cube >
that doesn't change much
20:03
<
mrvn >
but "And you cannot start two patterns with the same elements."
20:03
<
mrvn >
major restriction.
20:04
<
companion_cube >
well, you're writing a parser, it has to be deterministic
20:04
Anarchos has joined #ocaml
20:04
<
companion_cube >
you can make a subparser for this case, I think
20:04
amirmc has joined #ocaml
20:05
<
mrvn >
how much lookahead does it do?
20:06
<
companion_cube >
it doesn't, that's why
20:06
<
companion_cube >
maybe you grammar is complicated enough that you would prefer to use ocamlyacc?
20:07
<
mrvn >
Checking if 2 lines further the 4th char is a ' ' or 'v' needs a lot of lookahead or I need to recover from a bad parse at that point.
20:07
<
mrvn >
companion_cube: Nah, I know this is totaly insane in yacc.
20:08
skchrko has quit [Quit: Leaving]
20:08
lpw25 has joined #ocaml
20:08
amirmc has quit [Ping timeout: 272 seconds]
20:09
lpw25 has quit [Client Quit]
20:11
<
mrvn >
well, at least now I know how to use camlp4o with _oasis
20:11
<
adrien >
fyi, 91.0.0.0/8 and 193.0.0.0/8 are filled with bots
20:13
<
companion_cube >
what should we do?
20:13
<
adrien >
shoot and ask questions later?
20:13
<
adrien >
errr, sorry
20:13
<
adrien >
this channel isn't filled with americans
20:16
<
companion_cube >
and you're our only op
20:17
tnguyen has joined #ocaml
20:17
<
adrien >
you know that until you're 25, you can change your glasses every year (or maybe two) and get reimbursed? :P
20:18
<
mrvn >
adrien: that will certainly depend on where you live
20:18
<
companion_cube >
adrien: cool, but I'm 26
20:18
<
companion_cube >
:D
20:19
<
adrien >
bedtime \o/
20:19
<
adrien >
companion_cube: you should have gotten new glasses last year then :P
20:19
<
mrvn >
lets check if they will spring for google glasses
20:19
<
companion_cube >
don't hope so
20:21
Yoric has joined #ocaml
20:22
Thooms has quit [Read error: No route to host]
20:23
jonludlam has quit [Remote host closed the connection]
20:24
Thooms has joined #ocaml
20:26
boogie has joined #ocaml
20:27
mocrunsthecity has quit [Read error: Connection reset by peer]
20:27
mocrunsthecity has joined #ocaml
20:30
<
adrien >
gasche: btw
20:30
<
adrien >
User-agent: *
20:30
<
adrien >
Disallow: /
20:31
<
companion_cube >
that's because it's a secret list, for people like Assange to discuss on
20:32
<
adrien >
but how can we "work" with that?
20:35
boogie has quit [Remote host closed the connection]
20:36
mreca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:42
nikki93 has quit [Remote host closed the connection]
20:46
<
companion_cube >
gasche: I'm surprised by how many things are in BatPervasives
20:51
Xenasis has left #ocaml []
20:57
axiles has quit [Remote host closed the connection]
21:00
nikki93 has joined #ocaml
21:05
AltGr has left #ocaml []
21:10
bondar has joined #ocaml
21:10
bondar has quit [Max SendQ exceeded]
21:13
wwilly has quit [Remote host closed the connection]
21:18
rand000 has quit [Quit: leaving]
21:23
thomasga has quit [Ping timeout: 276 seconds]
21:33
Anarchos has quit [Quit: Vision[0.9.7-H-20131020]: i've been blurred!]
21:47
nikki93 has quit [Remote host closed the connection]
21:54
jao has quit [Ping timeout: 264 seconds]
21:57
nikki93 has joined #ocaml
22:02
Redhasafn has left #ocaml []
22:07
milosn has quit [Read error: Connection reset by peer]
22:08
milosn has joined #ocaml
22:20
<
rgrinberg >
your ideas of streaming parsers reminded me of this
22:30
cesar_ has joined #ocaml
22:30
cesar_ is now known as Guest3890
22:30
pyx has joined #ocaml
22:31
lostcuaz has joined #ocaml
22:31
pyx has quit [Client Quit]
22:37
Thooms has quit [Ping timeout: 272 seconds]
22:40
Yoric has quit [Ping timeout: 251 seconds]
22:48
darkf has joined #ocaml
22:48
shinnya has joined #ocaml
22:53
ChristopheT has left #ocaml []
23:04
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:05
zxqdms has joined #ocaml
23:07
nikki93 has quit [Remote host closed the connection]
23:08
leo2007 has joined #ocaml
23:17
thomasga has joined #ocaml
23:19
murRz has joined #ocaml
23:19
<
murRz >
Why aren true and false written uppercase?
23:22
<
rgrinberg >
i believe it's a well known wart that's impossible to fix due to compatibility
23:22
leo2007 has quit [Quit: rcirc on GNU Emacs 24.3.1]
23:22
<
murRz >
Why were they originally lowercase?
23:23
nikki93 has joined #ocaml
23:30
skchrko has joined #ocaml
23:31
Eyyub has joined #ocaml
23:31
thomasga has quit [Quit: Leaving.]
23:31
kyrylo has quit [Quit: Hi, Rob!]
23:31
thomasga has joined #ocaml
23:34
testcocoon has quit [Ping timeout: 252 seconds]
23:34
kyrylo has joined #ocaml
23:35
thomasga has quit [Client Quit]
23:37
Simn has quit [Quit: Leaving]
23:37
madroach has quit [Ping timeout: 252 seconds]
23:38
thomasga has joined #ocaml
23:39
madroach has joined #ocaml
23:42
tobiasBora has quit [Quit: Konversation terminated!]
23:42
ontologiae has quit [Ping timeout: 252 seconds]
23:59
<
rgrinberg >
you'll have to do some archeology to find that out. IIRC the revised syntax uses uppercase True/False