adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
nullcone has quit [Quit: Connection closed for inactivity]
ziyourenxiang has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
Hrundi_V_Bakshi has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Haudegen has quit [Ping timeout: 265 seconds]
unyu has quit [Quit: Redemption. Redemption for humanity.]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
brettgilio has joined #ocaml
silver_ has quit [Read error: Connection reset by peer]
mfp has quit [Ping timeout: 250 seconds]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 240 seconds]
vicfred has joined #ocaml
unyu has joined #ocaml
jao has quit [Remote host closed the connection]
dborisog has joined #ocaml
gravicappa has joined #ocaml
narimiran has joined #ocaml
dborisog has quit [Ping timeout: 268 seconds]
ggole has joined #ocaml
barockobamo has joined #ocaml
dborisog has joined #ocaml
FreeBirdLjj has joined #ocaml
<narimiran> is there some better idiomatic way to write `List.fold_left (fun acc x -> acc + f x) 0`?
FreeBirdLjj has quit [Ping timeout: 246 seconds]
gravicappa has quit [Ping timeout: 250 seconds]
<companion_cube> not that I know of
<companion_cube> at least that's pretty explicit
<narimiran> companion_cube: one can do `List.map f |> List.fold_left ( + ) 0`, and i'm not sure what is more readable. i guess i'm always looking if there's some "sugar", e.g. for this some kind of `map_fold`
<companion_cube> I have `CCList.fold_map` but it's probably not exactly the same
<companion_cube> (also, the `List.map` version is less efficient, as it'll allocate an intermediate list)
<narimiran> yeah, i thought that might be (quick `perf stat` shows some extra instructions)
<companion_cube> it's really straightforward compilation, so List.map will allocate, so it'll be a bit slower than directly folding :)
_whitelogger has joined #ocaml
_whitelogger has joined #ocaml
andreas303 has quit [Ping timeout: 260 seconds]
andreas303 has joined #ocaml
jnavila has joined #ocaml
gravicappa has joined #ocaml
gareppa has joined #ocaml
Haudegen has joined #ocaml
unyu has quit [Read error: Connection reset by peer]
unyu has joined #ocaml
carlosdagos has joined #ocaml
carlosdagos has quit [Ping timeout: 265 seconds]
jnavila has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
<Leonidas> companion_cube: no. I'd be surprised if it would support macos builds, due to Apples terrible "no VMs" clauses
<Leonidas> and non-macos works on Travis for time being
jco has joined #ocaml
mfp has joined #ocaml
gareppa has quit [Ping timeout: 268 seconds]
unyu has quit [Quit: ERC (IRC client for Emacs 26.3)]
unyu has joined #ocaml
Serpent7776 has joined #ocaml
FreeBirdLjj has joined #ocaml
Jenz has joined #ocaml
tane has joined #ocaml
Jenz has quit [Quit: leaving]
<tane> narimiran, I see you succeeded on AoC01 :D
<narimiran> tane: yeah! but now i feel the consequences of sleeping just 4 hours :D
<tane> Oo
<tane> you wanted to get to the leaderboard? :)
<narimiran> naaah, no chance for that
<tane> I gotta say, I really dislike competitive programming where time is the deciding factor. I enjoy competitions over 3-6 months though :)
<tane> anyway, I wasn't sure whether to use nim or ocaml, went with the latter for now
<narimiran> why not both? :)
<tane> for the easy exercises that may still make sense, yeah :D
<tane> narimiran, ok, now I have both
<tane> will be interesting how far that'll go
<narimiran> :)
FreeBirdLjj has quit [Ping timeout: 250 seconds]
gravicappa has quit [Ping timeout: 240 seconds]
gravicappa has joined #ocaml
tane has quit [Quit: Leaving]
barockobamo has quit [Remote host closed the connection]
jnavila has joined #ocaml
vicfred has quit [Quit: Leaving]
brettgilio has quit [Ping timeout: 245 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 252 seconds]
jnavila has quit [Ping timeout: 246 seconds]
gravicappa has quit [Ping timeout: 265 seconds]
gravicappa has joined #ocaml
tane has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<ggole> "Unbound value _a__095_ Hint: Did you mean a__083_?" Sometimes merlin's suggestions aren't all that helpful
<def`> :D sounds like a ppx rewriting going wrong
<ggole> Seems it was due to a datatype to which I was introducing an argument, and I forgot one
<ggole> There was indeed a ppx attached to it
alexc50 has joined #ocaml
alexc50 has quit [Remote host closed the connection]
brettgilio has joined #ocaml
JeanMax has joined #ocaml
_whitelogger has joined #ocaml
jnavila has joined #ocaml
<companion_cube> Leonidas: github actions has macOS support afaict
<Leonidas> oh, nice. Gotta check it out then!
kakadu has joined #ocaml
ziyourenxiang has quit [Ping timeout: 268 seconds]
Anarchos has joined #ocaml
jao has joined #ocaml
<companion_cube> ahah now I know why narimiran asked for the map_fold
<companion_cube> narimiran: are you doing AoC ?
jao has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
seastack has quit [Remote host closed the connection]
<Leonidas> core, of course, has List.fold_map
<companion_cube> what's the signature?
mfp has quit [Ping timeout: 268 seconds]
<narimiran> companion_cube: of course i am :)
jao has joined #ocaml
jao has quit [Remote host closed the connection]
<companion_cube> ah, fold_map looks like containers' fold_map
jao has joined #ocaml
unyu has quit [*.net *.split]
kakadu has quit [*.net *.split]
regnat[m] has quit [*.net *.split]
Virgile[m] has quit [*.net *.split]
aspiwack[m] has quit [*.net *.split]
vesper11 has quit [*.net *.split]
heredoc has quit [*.net *.split]
nkaretnikov has quit [*.net *.split]
lynn has quit [*.net *.split]
seb_ has quit [*.net *.split]
mrallen1 has quit [*.net *.split]
stylewarning has quit [*.net *.split]
sspi__ has quit [*.net *.split]
chewbranca has quit [*.net *.split]
adi_________ has quit [*.net *.split]
aspiwack[m] has joined #ocaml
Virgile[m] has joined #ocaml
regnat[m] has joined #ocaml
unyu has joined #ocaml
kakadu has joined #ocaml
vesper11 has joined #ocaml
heredoc has joined #ocaml
stylewarning has joined #ocaml
nkaretnikov has joined #ocaml
lynn has joined #ocaml
seb_ has joined #ocaml
chewbranca has joined #ocaml
mrallen1 has joined #ocaml
sspi__ has joined #ocaml
adi_________ has joined #ocaml
jao has quit [Remote host closed the connection]
<ggole> Is that the ('a -> 'b -> 'a * 'c) -> 'a -> 'b list -> 'a * 'c list one?
narimiran has quit [Ping timeout: 268 seconds]
<companion_cube> yeah
<ggole> I called that one map_fold :/
<ggole> I wonder if there's a good systematic approach to naming these fused operations
jnavila has quit [Ping timeout: 276 seconds]
<companion_cube> use iterators? :D
<companion_cube> the natural way should be `mylist.iter().map(f).fold(+,0)`, roughly
<companion_cube> (too bad we don't have dot notation)
<ggole> Ooh, somebody's been doing too much Rust!
<companion_cube> well I wish I had that in OCaml, is all
<companion_cube> I'd trade global type inference for local type-based dispatch :p
<ggole> I do find iteration is unnecessarily clumsy, yeah
<Armael> we have Seq for that kind of things
<Armael> ofc not with that syntax
<companion_cube> yes, but you have to write `Seq.`
<companion_cube> (and possibly use a library of combinators, ahem)
<companion_cube> (also, the compiler isn't too good at optimizing Seq yet, I imagine :/)
jco has quit [Quit: WeeChat 2.6]
<Armael> you yourself did some benchmarks showing that Seq was inlined into a loop when using flambda, didn't you?
<companion_cube> Iter is, Seq I'm not so sure
<companion_cube> (I use `Iter` more than Seq, still, because a lot of my code already uses it and it's well optimized)
<Armael> ah yes my bad
unyu has quit [Read error: Connection reset by peer]
unyu has joined #ocaml
jnavila has joined #ocaml
amiloradovsky has joined #ocaml
jco has joined #ocaml
dborisog has quit [Ping timeout: 240 seconds]
mfp has joined #ocaml
unyu has quit [Quit: unyu~]
unyu has joined #ocaml
ggole has quit [Quit: Leaving]
dckc has quit [Ping timeout: 250 seconds]
brettgilio has quit [Quit: Quit]
brettgilio has joined #ocaml
dckc has joined #ocaml
unyu has quit [Read error: Connection reset by peer]
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
unyu has joined #ocaml
narimiran has joined #ocaml
gravicappa has quit [Ping timeout: 265 seconds]
vicfred has joined #ocaml
jco has quit [Quit: WeeChat 2.6]
narimiran has quit [Ping timeout: 240 seconds]
tane has quit [Quit: Leaving]
amiloradovsky has quit [Ping timeout: 276 seconds]
jnavila has quit [Ping timeout: 246 seconds]
Haudegen has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
kakadu has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 276 seconds]
ziyourenxiang has joined #ocaml