<whirm>
adrien: I managed to build the x86 to arm crosscompiler :)
noplamodo_ has joined #ocaml
ninja-maid-robot has quit [Quit: fix config]
noplamodo has quit [Ping timeout: 248 seconds]
pyon has joined #ocaml
jonludlam has joined #ocaml
pyon has quit [Client Quit]
magical-imouto has joined #ocaml
lyxia has quit [Ping timeout: 256 seconds]
kushal has quit [Ping timeout: 264 seconds]
matason has quit [Ping timeout: 244 seconds]
hay207 has joined #ocaml
Bhavya has quit [Ping timeout: 255 seconds]
matason has joined #ocaml
hay207 has quit [Ping timeout: 265 seconds]
lyxia has joined #ocaml
_andre has joined #ocaml
Bhavya has joined #ocaml
nicoo has joined #ocaml
jonludlam has quit [Ping timeout: 246 seconds]
lyxia has quit [Ping timeout: 250 seconds]
hay207 has joined #ocaml
nicoo has quit [Ping timeout: 246 seconds]
lyxia has joined #ocaml
nicoo has joined #ocaml
Hannibal_Smith has joined #ocaml
mlen has joined #ocaml
walter|r has joined #ocaml
matason has quit [Quit: matason]
Haudegen has quit [Ping timeout: 256 seconds]
matason has joined #ocaml
Haudegen has joined #ocaml
Bhavya has quit [Ping timeout: 264 seconds]
jonludlam has joined #ocaml
siddharthv is now known as siddharthv_away
walter|r has quit [Remote host closed the connection]
antegallya has joined #ocaml
mudri has joined #ocaml
magical-imouto has quit [Quit: fix config]
ninja-maid-robot has joined #ocaml
kdr2_ has quit [Ping timeout: 250 seconds]
<mudri>
Hi, I'm new to OCaml, coming from Haskell (primarily). Is there a library defining something equivalent to Haskell's Either, plus functor/applicative/monad instances for all (Either a)?
<thizanne>
there are a lot of library defining Either, and the type definition will be part of the standard lib in the next (I believe) release
<mudri>
Ah, it's normally called “result”. Thanks!
kdr2_ has joined #ocaml
kdr2__ has joined #ocaml
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
walter|r has joined #ocaml
kdr2_ has quit [Ping timeout: 276 seconds]
rand000 has joined #ocaml
walter|r_ has joined #ocaml
walter|r has quit [Read error: Connection reset by peer]
mort___ has left #ocaml [#ocaml]
walter|r_ has quit [Ping timeout: 256 seconds]
idegen has joined #ocaml
nullcat_ has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rand000 has quit [Ping timeout: 264 seconds]
Hannibal_Smith has quit [Quit: Leaving]
BitPuffin|osx has joined #ocaml
zpe has quit [Remote host closed the connection]
fantasticsid has joined #ocaml
<mudri>
Okay, I have a file with `open Batteries` being compiled with `ocamlfind ... -package batteries ...`. It seems to find `Ok` and `Bad`, but not `>>=` or `bind`. What am I missing?
AltGr has left #ocaml [#ocaml]
<Drup>
it's in BatResult
<Drup>
(and BatResult.Monad)
kushal has joined #ocaml
<mudri>
That seems to have worked.
<mudri>
I've been looking through the code a bit. Why does BatResult need to repeat the definition of a monad in its .mli file?
<Drup>
you kinda I have a strong case of "I want to do exactly like in haskell" don't you ? ;)
<Drup>
-I
<Drup>
there are no typeclasses in OCaml, and no general way of saying "this is a monad" except by providing the operations that correspond to it
tmtwd has joined #ocaml
<Leonidas>
THIS! IS! MONAAAAAAD!
<mudri>
Ah, okay. I've never used a language with ML-style modules before, so I don't really understand them.
jhaberku has joined #ocaml
fantasti` has joined #ocaml
fantasti` has quit [Remote host closed the connection]
obadz has quit [Ping timeout: 265 seconds]
obadz has joined #ocaml
fantasti` has joined #ocaml
fantasticsid has quit [Ping timeout: 265 seconds]
fantasti` has quit [Remote host closed the connection]
fantasticsid has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
<mudri>
So, do functions like `mapM : ('a -> 'b t) -> 'a list -> 'b list t` have to be redefined for each `t`?
<companion_cube>
sadly, yes
<companion_cube>
and they will generally not be optimized as well as in Haskell
<Leonidas>
yes, usually there is a Module.map function for every monad :-/
<jhaberku>
Leonidas: Not actually tried this, just throwing it out there: why couldn't the monad ops be a functor in module supporting "unit" and "bind"?
jonludlam has quit [Ping timeout: 276 seconds]
<jhaberku>
*in the module
<Drup>
you can do that
jonludlam has joined #ocaml
<Drup>
it's remarquably non-optimal
<jhaberku>
Drup: In terms of code boilerplate and declarations, or compiled code?
<Drup>
both :)
<Drup>
companion_cube commited such thing in containers
<companion_cube>
that might be better with flambda though
<companion_cube>
yes, I needed it
<companion_cube>
for code that would have been to complicated otherwise
<jhaberku>
Drup: Ah, interesting. I'm really curious to see what OCaml looks like soon with the implicit modules and multicore stuff.
<companion_cube>
but we have no idea when (or whether) OCaml will have those some day
seanmcl has joined #ocaml
<Leonidas>
communication from inria is kinda meh
<Drup>
I didn't knew there was such thing as communication from inria related to OCaml
Kakadu has quit [Ping timeout: 246 seconds]
<Drup>
for some specific developers, maybe, but from inria ...
badkins has joined #ocaml
seanmcl has quit [Remote host closed the connection]
<octachron>
Is Inria even aware of the existence of ocaml?
seanmcl has joined #ocaml
<Drup>
it is very aware
<companion_cube>
really?
Kakadu has joined #ocaml
cml has joined #ocaml
<Drup>
well, it has been aware, at least :D
antegallya has quit [Ping timeout: 264 seconds]
jonludlam has quit [Ping timeout: 255 seconds]
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uris77 has joined #ocaml
jhaberku has quit [Ping timeout: 250 seconds]
<octachron>
for some limited definition of aware, I imagine. Finding any mention of ocaml on www.inria.fr is already quite difficult
nullcat_ has joined #ocaml
jhaberku has joined #ocaml
fantasticsid has quit [Read error: Connection reset by peer]
nullcat_ has quit [Ping timeout: 252 seconds]
BitPuffin|osx has quit [Remote host closed the connection]
fantasticsid has joined #ocaml
BitPuffin|osx has joined #ocaml
<cml>
writing pattern matching for polymorphic invariants like this raises error: | `V1 (x, y) | `V2 (x, y) -> func. but this works: | `V1 (x, y) -> func | `V2 (x, y) -> func. what is the right syntax for the first version?
<Drup>
the first version is correct, your issue is probably somewhere else
<companion_cube>
unless (x,y) have different types in `V1 and `V2 cases
<cml>
they have same types
<Drup>
cml: show the whole thing
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<struktured>
Drup: that's for module types though right? not modules.
<cml>
sure
<Drup>
struktured: both
<Drup>
or rather, you do it for a module type and you constraint the module
<struktured>
I worked around it just by defining functors which don't expose "type t" and then composing them with a module that does later
<struktured>
but do u have an example? module C = struct include A include B end..A and B both define tyep t
<Drup>
include (M: module type of M with type t := t)
<struktured>
! argh.spent hours looking for just that
johnf_ has joined #ocaml
<struktured>
is that documented on that page?
<struktured>
thanks a bunch drop, owe you a drink
<struktured>
*drup
<Drup>
well ...it's a combination of various things, I guess ?
<struktured>
yeah I didn't pull it all together myself, despite 8 hours of experimenting
<Drup>
don't worry, I spend far more than 8 hours doing weird stuff with functor application/module inclusions in eliom/tyxml
<struktured>
I think I didn't know include allowed the ":" constraint operator
lordkryss has joined #ocaml
slash^ has joined #ocaml
sh0t has joined #ocaml
seanmcl has joined #ocaml
Enjolras has joined #ocaml
<Enjolras>
hi
<Enjolras>
I'm trying to use sedlex, but i don't understand how i am supposed to track line numbers. It doesn't look like there is an API for that
<Enjolras>
hence, i'm not sure how to give the line position easily with menhir, unless i wrap the sedlex api in a custom module
jefus_ has joined #ocaml
jefus has quit [Ping timeout: 264 seconds]
jefus_ is now known as jefus
jonludlam has joined #ocaml
seanmcl has quit [Ping timeout: 276 seconds]
nullcat_ has joined #ocaml
walter|r has joined #ocaml
<Enjolras>
ok, i got it. It's easy to wrap it in a custom struct as long as i don't want to recover from errors in menhir
<Enjolras>
(which i don't)
jabesed has joined #ocaml
jabesed has quit [Client Quit]
walter|r has quit [Ping timeout: 250 seconds]
nullcat_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
octachron has quit [Quit: Leaving]
mlen has quit [Quit: WeeChat 1.1]
Submarine has quit [Remote host closed the connection]
hay207 has quit [Quit: Leaving]
Reventlov has quit [Ping timeout: 252 seconds]
wraithm has joined #ocaml
SGrondin has joined #ocaml
MrScout has joined #ocaml
johnf_ has quit [Read error: Connection reset by peer]
Hannibal_Smith has joined #ocaml
<SGrondin>
Hi, is there a way to capture the STDOUT and exit code when execv'ing a command?
shinnya has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 256 seconds]
<S11001001>
SGrondin: execv replaces your process with the called one; you need a different function
<SGrondin>
I just found Lwt_process, it looks perfect, except I'm not sure how to create a file descriptor to handle the STDOUT. Can it be an Lwt_stream somehow?
<SGrondin>
I'm refering to the fact that Lwt_process.exec takes a 'redirection' as argument for ~stdout
<smondet>
the function `with_process_full` gives an object to play with; it's `stdin` method gives you a Lwt_io.channel
<smondet>
s/it's/its/
<SGrondin>
Sadly it doesn't provide the exit code afaik
<SGrondin>
Would this work?: call Lwt.exec, and pass an Lwt_unix.pipe_in for the ~stdout?
<smondet>
it does with the `#status` method
<smondet>
SGrondin: yes exec + pipe work; it's more old school, and easier to get wrong
psy_ has joined #ocaml
<SGrondin>
#status looks good
<SGrondin>
I'm gonna try it out, thanks a lot for your help
wraithm has quit [Ping timeout: 256 seconds]
darkf has quit [Quit: Leaving]
yomimono has quit [Ping timeout: 272 seconds]
jhaberku has quit [Ping timeout: 256 seconds]
walter|r has joined #ocaml
jhaberku has joined #ocaml
Reventlov has joined #ocaml
johnf_ has joined #ocaml
keen___________7 has joined #ocaml
walter|r has quit [Ping timeout: 256 seconds]
keen___________6 has quit [Ping timeout: 264 seconds]
creichert has joined #ocaml
jhaberku has quit [Ping timeout: 248 seconds]
dsheets has quit [Ping timeout: 272 seconds]
jhaberku has joined #ocaml
keen___________7 has quit [Read error: Connection reset by peer]
keen___________7 has joined #ocaml
kdr2__ has quit [Ping timeout: 255 seconds]
kdr2__ has joined #ocaml
amnn has joined #ocaml
dhil has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
<SGrondin>
I'm getting a stupid issue that I've had before, but I forgot how to fix it.
<SGrondin>
Error: No implementations provided for the following modules:
<SGrondin>
Lwt_process referenced from test.cmx
<SGrondin>
Lwt_io referenced from test.cmx
<SGrondin>
I'm using ocamlbuild and I'm already doing "-pkg lwt,lwt.syntax"
<SGrondin>
Oh, it could be because I forgot to load the unix module
wraithm has joined #ocaml
<SGrondin>
Nope, that's not it
Haudegen has joined #ocaml
wraithm has quit [Client Quit]
<SGrondin>
It was lwt.unix, in case someone searches irc logs for answers :)
kdr2_ has joined #ocaml
kdr2__ has quit [Ping timeout: 264 seconds]
mudri has quit [Quit: Leaving]
Anarchos has joined #ocaml
zpe has joined #ocaml
SGrondin has left #ocaml [#ocaml]
djellemah_ has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 244 seconds]
rand000 has quit [Ping timeout: 246 seconds]
djellemah has quit [Ping timeout: 256 seconds]
jonludlam has quit [Ping timeout: 246 seconds]
zpe_ has quit [Remote host closed the connection]
rand000 has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]