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