<andrewlitteken>
Can someone with 4.08 try something for me? I was going to work on issue: https://github.com/ocaml/ocaml/issues/7886, but am reasonably sure this doesn't occur anymore in the current version of the repository
AnAverageHuman has quit [Ping timeout: 256 seconds]
ricekrispie has left #ocaml ["Leaving"]
stux|RC-only has quit [Ping timeout: 268 seconds]
stux|RC-only has joined #ocaml
stux|RC-only has quit [Ping timeout: 250 seconds]
ygrek__ has quit [Ping timeout: 268 seconds]
eskatrem has joined #ocaml
assemblyman has joined #ocaml
_whitelogger has joined #ocaml
SomeDamnBody has joined #ocaml
nullifidian_ is now known as nullifidian
jao has quit [Ping timeout: 245 seconds]
gravicappa has quit [Ping timeout: 246 seconds]
Birdface has joined #ocaml
assemblyman has quit [Quit: ™]
nullifidian_ has joined #ocaml
nullifidian has quit [Read error: Connection reset by peer]
keep_learning_M has quit [Ping timeout: 258 seconds]
sonologico has quit [Ping timeout: 252 seconds]
ggole has joined #ocaml
sonologico has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
nikolaos2 has joined #ocaml
nullifidian__ has joined #ocaml
<Armael>
andrewlitteken: indeed, it was fixed (cf my answer on github)
nullifidian_ has quit [Ping timeout: 268 seconds]
<Armael>
(thanks for pointing it out, at least we can properly close the issue!)
kakadu has joined #ocaml
powerbit has joined #ocaml
mfp has joined #ocaml
carlos1 has joined #ocaml
carlos1 has quit [Quit: WeeChat 2.2]
carlosdagos has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
ravenousmoose has joined #ocaml
Anarchos has joined #ocaml
gravicappa has joined #ocaml
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
vsss has quit []
silver has joined #ocaml
carlosdagos has quit [Ping timeout: 250 seconds]
carlosdagos has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
FreeBirdLjj has joined #ocaml
<eskatrem>
Hi, is there a way to use List.map for a function of multiple arguments? something like `List.map (fun a b -> a + b) [1; 2; 3] [4; 5; 6];;` (which obviously doesnt work)
<kakadu>
you need specialized map (List.map2 in that case)
<eskatrem>
oh, thanks kakadu I didnt know about map2
<eskatrem>
yes, map2 works, thanks again
Haudegen has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
keep_learning_M has joined #ocaml
ihavelotsoffries has joined #ocaml
<ihavelotsoffries>
hello everyone
<eskatrem>
hi ihavelotsoffries
<ihavelotsoffries>
Hello eskatrem :)
<ihavelotsoffries>
Is it possible to match for multiple variants when matching a tuple component?
<ihavelotsoffries>
in `match (a, b) with .... ` I want to match a case where a is either A, B or C, and b is D or E.
<octachron>
(A|B|C), (D|E)
<otini>
btw you can also write `match a,b with ...`. The parentheses are not necessary to denote a tuple in OCaml.
<ihavelotsoffries>
Ah, excellent.
<ihavelotsoffries>
Let me try! thank you ocabot and otini.
AnAverageHuman has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
ihavelotsoffries has quit [Ping timeout: 258 seconds]
FreeBirdLjj has joined #ocaml
unyu has quit [Quit: ERC (IRC client for Emacs 26.1)]
FreeBirdLjj has quit [Remote host closed the connection]
unyu has joined #ocaml
ygrek__ has joined #ocaml
keep_learning_M has quit [Quit: This computer has gone to sleep]
nicoo has quit [Ping timeout: 256 seconds]
nicoo has joined #ocaml
okuu has joined #ocaml
nikolaos2 has quit [Ping timeout: 252 seconds]
eskatrem has quit [Read error: Connection reset by peer]
loli has quit [Quit: WeeChat 2.4]
zolk3ri has joined #ocaml
okuu has quit [Remote host closed the connection]
<Ankhers>
How common is it to be explicit with your functions type definitions instead of letting them be inferred?
* companion_cube
does it, but it's quite uncommon afaik
<Ankhers>
Any particular reason it is uncommon?
<ggole>
It's annoying to type them twice if you have a .mli
<ggole>
And the annotation syntax is kinda noisy
<companion_cube>
the cool thing is, you can do it partially
<companion_cube>
I tend to at least annotate the return type, or parts of it
<companion_cube>
let f x y : foo = …
<ggole>
It is nice that you can skip bits with _
<companion_cube>
but repeating the types is pretty acceptable imho, it makes the code more readable anyway
<companion_cube>
yeah exactly
<companion_cube>
let f x : _ list = …
stux|RC-only has joined #ocaml
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
tarptaeya_ has left #ocaml [#ocaml]
tane has joined #ocaml
ravenousmoose has joined #ocaml
Haudegen has quit [Remote host closed the connection]
raduom has joined #ocaml
ziyourenxiang_ has quit [Ping timeout: 245 seconds]
raduom has quit [Read error: Connection reset by peer]
gravicappa has quit [Ping timeout: 268 seconds]
Haudegen has joined #ocaml
wiml has joined #ocaml
ggole has quit [Quit: Leaving]
<wiml>
Can anyone explain to me (or point to docs) about the interaction of libraries (.mllib, .cma) and packs (-for-pack, etc)? I have module foo.ml with various toplevel items, I want to split out just some of its submodules into separate .ml files (e.g. Foo.Bar). Is this possible or am I just barking up the wrong tree?
<companion_cube>
use dune, forget about packs
<wiml>
What do you mean?
<wiml>
(I mean, I know about dune.)
<companion_cube>
dune does packing of libraries automatically, so in a library Foo, a file bar.ml will be Foo.Bar
<wiml>
Can you have both foo.ml and bar.ml and have dune produce Foo and Foo.Bar (as opposed to A.Foo and A.Bar, which I already know how to do)? I do use dune, but I couldn't get it to do this, so I was dropping down a level.
<companion_cube>
if your lib is `foo`, Foo.ml will be the toplevel module
<companion_cube>
and inside you can `module Bar = Bar` to re-export
<wiml>
Oh, I see. So Bar still exists as a toplevel module?
<wiml>
It's just re-exported as a submodule.
<companion_cube>
it's in scope as Bar inside the foo lib, as `Foo.Bar` outside
tane has quit [Quit: Leaving]
<wiml>
Huh. Okay, I thought it was also in scope as Bar to the outside world, which would cause problems in my case (pretty generic submodule names like S). If not, then that works.
<wiml>
Or, right, dune renames it to Foo__Bar to avoid that, doesn't it.
<companion_cube>
it does magic inside, yes
<companion_cube>
but functionally you get the equivalent of pack, but more lightweight
Jeanne-Kamikaze has joined #ocaml
<wiml>
Hmmm, so what dune does is compile them as Foo__Bar, then create a wrapper module Foo__ with module Bar = Foo__Bar, then implicitly open Foo__ in Foo