adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
orbifx1 has joined #ocaml
orbifx has quit [Ping timeout: 240 seconds]
orbifx1 is now known as orbifx
<Leonidas> cemerick: that's then probably one of the flags dune sets
<Leonidas> -g maybe?
ostera1974 has joined #ocaml
<Drup> Pretty sure -g is on all the time
ostera1974 has quit [Ping timeout: 244 seconds]
mfp has quit [Ping timeout: 245 seconds]
<Drup> cemerick: have you reported the bug ? It should be easy to figure out if you give a file to reproduce it
mfp has joined #ocaml
<cemerick> Leonidas: yeah, haven't diffed the commands being issued
webshinra has joined #ocaml
orbifx has quit [Quit: WeeChat 2.3]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 250 seconds]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 250 seconds]
slondr has left #ocaml ["Leaving"]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 245 seconds]
omarramo has joined #ocaml
<ec> really need to bridge Discord #general to here v.v
<ec> I always forget it's bridged, ask in general there, then remember it's bridged, and feel bad about cross-posting to two channels.
mfp has quit [Ping timeout: 272 seconds]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 246 seconds]
<cemerick> ec: there's an ocaml discord, besides the technically-reasonml one?
<cemerick> Drup: haven't, will poke at it more later
<companion_cube> yes there is
<companion_cube> sadly writing discord bots in OCaml doesn't seem easy
<ec> cemerick: yep! they're separate, which is soups annoying
<ec> but hey it's far from the biggest way the OCaml and Reason communities need to start talking to one another …
<cemerick> found it
<cemerick> surprised it's not prominently linked @ https://ocaml.org/community/
<ec> for anybody else looking: OCaml is https://discord.gg/cCYQbqN, ReasonML (with a quiet OCaml channel) is https://discord.gg/reasonml
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 245 seconds]
ostera1974 has joined #ocaml
silver has quit [Read error: Connection reset by peer]
ostera1974 has quit [Ping timeout: 245 seconds]
<omarramo> can anybody assess my chances of writing reasonml in a frontend project professionally at some point? i'm relatively new at ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
ostera1974 has joined #ocaml
wklm has joined #ocaml
ostera1974 has quit [Ping timeout: 245 seconds]
wklm has quit [Ping timeout: 245 seconds]
bobajett has joined #ocaml
ostera1974 has joined #ocaml
<bobajett> Hello. Complete newbie question here. I have a directory "my_project". Which which I have foo.ml and bar.ml. How do I get merlin to recognize the definitions in bar.ml?
<bobajett> bar.ml contains a simple function called "sum". But when I try to do this in foo.ml: let s = sum [1;2;3];; I get an "Unbound value sum" message in emacs.
ostera1974 has quit [Ping timeout: 240 seconds]
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 272 seconds]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 245 seconds]
keep_learning has quit [Quit: Ping timeout (120 seconds)]
ostera1974 has joined #ocaml
keep_learning has joined #ocaml
ostera1974 has quit [Ping timeout: 246 seconds]
keep_learning has quit [Client Quit]
keep_learning has joined #ocaml
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 245 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 272 seconds]
gravicappa has joined #ocaml
kjak has quit [Ping timeout: 244 seconds]
ziyourenxiang has quit [Remote host closed the connection]
omarramo has quit [Ping timeout: 245 seconds]
bobajett has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ostera1974 has joined #ocaml
omarramo has joined #ocaml
omarramo has quit [Client Quit]
omarramo has joined #ocaml
ostera1974 has quit [Ping timeout: 245 seconds]
FreeBirdLjj has joined #ocaml
JimmyRcom has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 250 seconds]
ostera1974 has joined #ocaml
omarramo has quit [Ping timeout: 268 seconds]
ostera1974 has quit [Ping timeout: 245 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 250 seconds]
jao has quit [Ping timeout: 240 seconds]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 246 seconds]
steenuil has quit [Remote host closed the connection]
iovec has quit [Quit: Connection closed for inactivity]
rymdhund has joined #ocaml
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 240 seconds]
freyr69 has joined #ocaml
ziyourenxiang has joined #ocaml
kalio has quit [Ping timeout: 250 seconds]
kalio has joined #ocaml
_whitelogger has joined #ocaml
Spetznaz_ has quit [Ping timeout: 240 seconds]
rymdhund has quit [Ping timeout: 272 seconds]
themsay has joined #ocaml
ostera1974 has joined #ocaml
sagotch has joined #ocaml
wklm has joined #ocaml
ostera1974 has quit [Ping timeout: 268 seconds]
nullifidian_ has joined #ocaml
nullifidian__ has quit [Read error: Connection reset by peer]
try-again has quit [Ping timeout: 240 seconds]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 246 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 245 seconds]
Haudegen has joined #ocaml
gareppa has joined #ocaml
omarramo has joined #ocaml
<Leonidas> Bar.sum [1;2;3]
<Leonidas> because how should ocaml know that sum is defined in the Bar module
<Leonidas> omarramo: how do you mean?
<Leonidas> I've run across a company ~1 year ago that was desperately searching for reason programmers.
gareppa has quit [Quit: Leaving]
ostera1974 has joined #ocaml
nikivi has quit [Quit: ZNC is awesome]
themsay has quit [Ping timeout: 250 seconds]
ostera1974 has quit [Ping timeout: 246 seconds]
nikivi has joined #ocaml
kolontaev has joined #ocaml
<kolontaev> Hi all. Maybe this is crazy, but can I write a program in Ocaml so that it will be compiled to .so/.dll and called from pure C, C++, Python, etc?
mfp has joined #ocaml
<Leonidas> yes, you can
kolontaev has quit [Quit: leaving]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 240 seconds]
themsay has joined #ocaml
orbifx has joined #ocaml
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 268 seconds]
kakadu has joined #ocaml
ostera1974 has joined #ocaml
themsay has quit [Ping timeout: 272 seconds]
ostera1974 has quit [Ping timeout: 246 seconds]
gareppa has joined #ocaml
gareppa has quit [Quit: Leaving]
decentpenguin has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
gareppa has joined #ocaml
pierpal has joined #ocaml
gareppa has quit [Quit: Leaving]
pierpal has quit [Ping timeout: 246 seconds]
pierpal has joined #ocaml
ostera1974 has joined #ocaml
iovec has joined #ocaml
ostera1974 has quit [Ping timeout: 250 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sagotch has quit [Ping timeout: 245 seconds]
ostera1974 has joined #ocaml
Haudegen has quit [Remote host closed the connection]
ostera1974 has quit [Ping timeout: 245 seconds]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 246 seconds]
silver has joined #ocaml
kjak has joined #ocaml
kjak_ has joined #ocaml
kjak_ has left #ocaml [#ocaml]
ostera1974 has joined #ocaml
omarramo has quit [Quit: Konversation terminated!]
omarramo has joined #ocaml
ostera1974 has quit [Ping timeout: 250 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 245 seconds]
omarramo has quit [Ping timeout: 244 seconds]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
sagotch has joined #ocaml
rymdhund has joined #ocaml
govg has joined #ocaml
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
jao has joined #ocaml
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 246 seconds]
jao has quit [Ping timeout: 268 seconds]
CcxWrk has quit [Ping timeout: 240 seconds]
ostera1974 has joined #ocaml
CcxWrk has joined #ocaml
ostera1974 has quit [Ping timeout: 250 seconds]
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 268 seconds]
spew has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
ostera1974 has joined #ocaml
ostera1974 has quit [Ping timeout: 244 seconds]
JimmyRcom has joined #ocaml
ostera1974 has joined #ocaml
KeyJoo has joined #ocaml
ostera1974 has quit [Ping timeout: 250 seconds]
layeredeggplant has joined #ocaml
layeredeggplant has quit [Client Quit]
freyr69 has left #ocaml ["ERC (IRC client for Emacs 26.1)"]
freyr69 has joined #ocaml
freyr69 has left #ocaml ["ERC (IRC client for Emacs 26.1)"]
ostera1974 has joined #ocaml
twopoint718 has joined #ocaml
twopoint718 has joined #ocaml
opt9 has left #ocaml [#ocaml]
al-damiri has joined #ocaml
layeredeggplant has joined #ocaml
layeredeggplant has quit [Quit: WeeChat 2.3]
wklm has quit [Ping timeout: 245 seconds]
JimmyRcom has quit [Ping timeout: 245 seconds]
interaxia has joined #ocaml
<cemerick> I'm trying out Core; but this is brutal: https://gist.github.com/cemerick/aad0c135dd15fc769b09fed93797a254
<Drup> Core is not intended for beginners
<def`> cemerick: List.fold [1;2;3] ~init:0 ~f:(+)
<cemerick> the manual says "if an application is total (omitting all optional arguments), labels may be omitted. In practice, many applications are total, so that labels can often be omitted."
<Drup> (Also, you should probably use base nowadays I guess)
<def`> (+1)
<Drup> (or *cough* containers)
<cemerick> But that caveat is of no use insofar as the return type is polymorphic
<cemerick> Drup: I guess I'm wondering _anyone_ uses it? The noise induced by having to explicitly name most of one's arguments is grating. Nevermind that you can't partially apply them usefully.
<cemerick> The upside of Core_kernel (for me) was the quickcheck impl, which looks very nice
<Drup> Actually, label is much nicer for partial application
<Drup> `List.fold ~init:3` is valid, for instance.
<theblatte> naming arguments is <3
<cemerick> Drup: fair, but also rarely needed in that arrangement (IME)
iovec has quit [Quit: Connection closed for inactivity]
<Drup> Core goes really full-steam-ahead with the labels, but they are generally quite used in ocaml for some use-cases
twopoint718 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ostera1974 has quit [Ping timeout: 246 seconds]
<cemerick> they make a lot more sense to me for usually-unfamiliar domain-specific APIs; essentials like data and control structures are used so constantly that the syntactic cost pays off
<Drup> I don't know about core's quickcheck (I'm pretty happy about the one in ... the quickcheck package)
<cemerick> Drup: you mean actually `quickcheck`, or `qcheck`? The former appears unmaintained, and is a haskell quickcheck port apparently.
<cemerick> right, ok
<Drup> Hmm, didn't even noticed there were two of them
<Drup> it would be nice to clean that up ...
wklm has joined #ocaml
<cemerick> it seems a lot of people use afl-based fuzzers, which I assume is why more sophisticated property-based testing hasn't come along
<Drup> qcheck is not sophisticated enough ?
layeredeggplant has joined #ocaml
layeredeggplant has quit [Remote host closed the connection]
<def`> Aren't they complementary? I see afl as a way to skew the distribution of the quickcheck generator.
<Drup> def`: Well, the crowbar API is very similar, but it's not compatible, you have to rewrite your test handlers
<cemerick> def`: perhaps, I've not used afl, so I'm foggy on how the pieces fit together concretely
Haudegen has quit [Remote host closed the connection]
<def`> Drup: yes, I had crowbar in mind, not qcheck
<cemerick> Drup: qcheck is _much_ better than haskell quickcheck, but it does lag in some fundamental respects
<Drup> cemerick: I'm sure companion_cube will like to hear them :3
ostera1974 has joined #ocaml
<Drup> def`: let's say that if you write your property-based tests using the quickcheck API, you can't just swap out the underlying test-generator for crowbar, it's more effort than that
layeredeggplant has joined #ocaml
layeredeggplant has quit [Remote host closed the connection]
layeredeggplant has joined #ocaml
<cemerick> Drup: I assume the critique wouldn't be a surprise; quickcheck is just a much older design that hasn't grown or changed a lot since..whenever v2 was released, I suppose
ostera1974 has quit [Ping timeout: 240 seconds]
<Drup> (whenver I say "quickcheck", read "qcheck")
layeredeggplant has quit [Remote host closed the connection]
layeredeggplant has joined #ocaml
layeredeggplant has quit [Client Quit]
twopoint718 has joined #ocaml
layeredeggplant has joined #ocaml
layeredeggplant has quit [Remote host closed the connection]
layeredeggplant has joined #ocaml
<cemerick> 🤷‍♂️ https://github.com/hedgehogqa/haskell-hedgehog is the best impl I'm aware of for a typed lang; test.check probably has the best integrated shrinking among open source options; and quviq is ofc a certain gold standard
layeredeggplant has quit [Client Quit]
layeredeggplant has joined #ocaml
layeredeggplant has quit [Remote host closed the connection]
layeredeggplant has joined #ocaml
layeredeggplant has quit [Remote host closed the connection]
twopoint718 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Leonidas> cemerick: Yes, core is used quite a lot. I know multiple companies using it.
decentpenguin has quit [Ping timeout: 250 seconds]
decentpenguin has joined #ocaml
<Leonidas> cemerick: sometimes named params is nice, because in clojure I sometimes want a mix of -> and ->> and then as-> becomse a pain. If I can apply by name, the problem goes away.
ostera1974 has joined #ocaml
<Leonidas> of course I can also use an ungodly combination of flips to make my code absolutely unreadable instead ;-)
<cemerick> I posted here FWIW. Honestly the first thing I've encountered that feels like a language wart. https://discuss.ocaml.org/t/the-ergonomics-of-labels/3250
<cemerick> Leonidas: well `as->` yields pretty clean code; you're just dropping the named param along the way in each form. This is a lot more cumbersome, IMO
ollehar has quit [Ping timeout: 246 seconds]
<cemerick> it's actually exactly like the tradeoff with clojure's keyword arg support, which is similarly unpleasant
<cemerick> (and pretty rarely used, thankfully)
ostera1974 has quit [Ping timeout: 246 seconds]
ollehar has joined #ocaml
decentpenguin has quit [Quit: WeeChat 2.3]
layeredeggplant has joined #ocaml
layeredeggplant has quit [Remote host closed the connection]
decentpenguin has joined #ocaml
lokydor has quit [Ping timeout: 272 seconds]
<Leonidas> cemerick: the naming is btw inspired from the standard library: https://caml.inria.fr/pub/docs/manual-ocaml/libref/ListLabels.html
<companion_cube> cemerick: if you don't like labels, give a try to containers ;-)
<Leonidas> I think the rule about labels is to not overuse them
<Leonidas> they are very useful if your function has a signature of string -> string -> string otherwise
<Leonidas> and I can't ever remember the argument order of fold anyway and the order in the Standard library indents horribly
orbifx has quit [Quit: WeeChat 2.3]
<cemerick> you mean that the potentially largest expression can be off to the right?
<cemerick> `f init inputs` is the Right Way, as I've learned/used FP langs...and sort of necessary if you want to be able to run pipes
<Leonidas> cemerick: yes, so I can List.fold ~init input ~f:(…)
<Armael> cemerick: well I think the point of labels is that they work better with pipes
<Leonidas> cemerick: yes, that's nice if you want to pipe, but often you don't
ostera1974 has joined #ocaml
<Leonidas> but I should just post in your thread in a more structured way
ollehar has quit [Ping timeout: 268 seconds]
<Drup> Leonidas: that piece of code is begging for lot's of additional let-bindings. :)
ostera1974 has quit [Ping timeout: 240 seconds]
<haesbaert> `opam switch list` only returns the current system compile for me, any tips ?
<Drup> haesbaert: `-a` if you want to see all available switchs
<Drup> otherwise, you only get the installed ones
<haesbaert> switch list-available
<haesbaert> got it, thanks
<haesbaert> everyone is in opam 2 now right ?
<Drup> Yes, everyone indeed :3
<haesbaert> it's a brave new world
<companion_cube> cemerick: I'm not sure, but does JST's quickcheck do the "modern" Hypothesis-like shrinking?
<companion_cube> otherwise, I suppose both qcheck and core-quickcheck (or whatever it's called) are late to the party
<companion_cube> and we should indeed write a modern version with the better shrinking
<Leonidas> Drup: I sort of disagree :p
<companion_cube> I've used a bit proptest in rust, it's neat
<cemerick> companion_cube: JST?
<companion_cube> janestreet
<companion_cube> (so what do they have that qcheck doesn't?)
<companion_cube> (I haven't looked in a while)
<Drup> Leonidas: honestly, every match on an expression that is not a one-liner should let-bound it.
<companion_cube> err, why
<companion_cube> ah, *on* an expression
<Drup> `match <long-ass-expression> with ...`
<cemerick> companion_cube: ah, no, their shrinking is comparable to qcheck. What caught my eye was that it does have some pretty solid-looking tools for controlling generated distributions and such (which is hard to get right)
<zozozo> Drup: except if the expression is expected to raise ? (well in any case, I agree that expression being matched on shouldn't use more than one line)
<companion_cube> cemerick: ah yes, that :/
ostera1974 has joined #ocaml
<companion_cube> qcheck can log stuff, but it's probably not as robust indeed
<Drup> zozozo: debatable, but then it's more like a try/with and should be formatted as such
<Drup> companion_cube: yeah, that's okay
<companion_cube> you can collect string messages, and integers (with a display of distributions)
<companion_cube> it's just not very documented
layeredeggplant has joined #ocaml
layeredeggplant has quit [Client Quit]
Serpent7776 has joined #ocaml
jao has joined #ocaml
layeredeggplant has joined #ocaml
layeredeggplant has quit [Client Quit]
nullifidian__ has joined #ocaml
layeredeggplant has joined #ocaml
Haudegen has joined #ocaml
layeredeggplant has quit [Client Quit]
layeredeggplant has joined #ocaml
nullifidian_ has quit [Ping timeout: 246 seconds]
pierpal has joined #ocaml
layeredeggplant has quit [Client Quit]
layeredeggplant has joined #ocaml
ostera1974 has quit [Ping timeout: 245 seconds]
pierpal has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
iovec has joined #ocaml
layeredeggplant has quit [Client Quit]
layeredeggplant has joined #ocaml
ostera1974 has joined #ocaml
pierpal has joined #ocaml
layeredeggplant has quit [Remote host closed the connection]
layeredeggplant has joined #ocaml
layeredeggplant has quit [Remote host closed the connection]
layeredeggplant has joined #ocaml
pierpal has quit [Ping timeout: 268 seconds]
layeredeggplant has quit [Client Quit]
layeredeggplant has joined #ocaml
pierpal has joined #ocaml
layeredeggplant has quit [Remote host closed the connection]
sagotch has quit [Ping timeout: 268 seconds]
layeredeggplant has joined #ocaml
steenuil has joined #ocaml
layeredeggplant has quit [Quit: WeeChat 2.3]
layeredeggplant has joined #ocaml
<cemerick> companion_cube: FYI, https://simon.cedeela.fr/iter/ is 404
layeredeggplant has quit [Remote host closed the connection]
layeredeggplant has joined #ocaml
layeredeggplant has quit [Client Quit]
layeredeggplant has joined #ocaml
<companion_cube> grrr
kakadu has quit [Quit: Konversation terminated!]
jnavila has joined #ocaml
<Drup> companion_cube: I'm susprised you haven't already made a cubiverse with combined documentation of all your packages :3
<companion_cube> that requires too much effort :/
<companion_cube> I haven't groked duniverse yet
orbifx has joined #ocaml
<companion_cube> ugh, this migration to `Iter`… not sure it's a good idea…
ostera1974 has quit [Ping timeout: 245 seconds]
<companion_cube> it breaks a *lot* of stuff
layeredeggplant has quit [Remote host closed the connection]
ostera1974 has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
layeredeggplant has joined #ocaml
layeredeggplant has quit [Client Quit]
<orbifx> companion_cube: migration to Iter?
<cemerick> companion_cube: just FWIW, it took me seeing recommendations of containers ~4-5 times before I realized it was intended as a stdlib alternative
<companion_cube> :D
<companion_cube> orbifx: of sequence. a renaming. maybe not the best idea, really.
layeredeggplant has joined #ocaml
ostera1974 has quit [Ping timeout: 245 seconds]
<orbifx> yeah
<orbifx> sequence has both a structural and active connotations, can't get better than that
ostera1974 has joined #ocaml
<companion_cube> naming it `Iter` is also cool because it's literally just iter functions
<companion_cube> but then maybe it's a bit late for that.
<Drup> I feel like it's better to swallow it now, than to live forever with the ambiguiity between Core.Sequence, Seq, and Sequence
<Drup> it's just ... so much worse
layeredeggplant has quit [Remote host closed the connection]
<companion_cube> but it breaks my code ;_;
<Drup> `Iter` *should* be a standard package, might as well name it like one.
<companion_cube> (maybe I shouldn't add a deprecation warning yet, though)
<companion_cube> heh
layeredeggplant has joined #ocaml
layeredeggplant has quit [Remote host closed the connection]
<Armael> yeah I vastly prefer Iter than Sequence as a name
<Armael> especially since we now have Seq which is different
layeredeggplant has joined #ocaml
webshinra has quit [Ping timeout: 252 seconds]
<Drup> companion_cube: if it's too much effort, you could propose Iter to the stdlib :D
<companion_cube> the one thing i won't do is rename the repo (because it breaks stupid github's hashing of releases)
<companion_cube> Drup: how about no? :D
<Drup> doh.
<companion_cube> oh s**** I still have this PR about safe IO…
<Armael> aha
<companion_cube> you can do it since you have so much motivation ;)
<Drup> ahah
<Drup> no.
<cemerick> so is Iter basically the same semantics as Rust's Iter? Feels like it scanning the API.
<Armael> what's the policy for moving repos in the ocaml/ org?
<Armael> cemerick: it's basically composable "iter" functions/combinators
<Drup> Armael: you ask damien and maybe he says yes ?
<Drup> Most of things in ocaml/ org should not be there, imho
<Armael> is there an informal criterium for what should be there or not?
<Armael> criterion*
<Drup> Armael: afaik, no
<cemerick> Armael: right, that describes both, it seems
<companion_cube> Armael: you want to move sequence into ocaml/ ? :D
<companion_cube> (ocaml-community would probably make more sense tho)
<Drup> Armael: Actually, yes "one of the member of `core team ∪ Anil` felt like it"
<Drup> But yeah, I would suggest ocaml-community instead, unless it's opam/ocaml.org/ocaml basic infrastructure
<Armael> companion_cube: more generally, I was wondering if we had a way of pinpointing libraries that are recognized as public utility and best in their class
<companion_cube> awesome-ocaml? :s
<Armael> ocaml-community is somewhat that and also stuff that are useful and maintained by the community
<Armael> I guess...
<Drup> awesome-ocaml is really bad at this, it tries too much to appeal to everyone, including people that are .. wrong.
<companion_cube> maybe a smaller version of Iter could go into the stdlib, I have no idea, really
<companion_cube> (same as Seq/OSeq :°)
<Armael> It's a bit weird to have this "duplication" between Iter and Seq
<Armael> the two are different, but they look very similar at a first glance
<Armael> I guess if we had both we would need to have some good documentation explaining the tradeoffs
<companion_cube> :°
pierpal has quit [Quit: Poof]
<companion_cube> oh boy, so many deprecation warnings
pierpal has joined #ocaml
<Armael> companion_cube: just curious, now that there is seq in the stdlib, would you still want to use Iter in some places?
<Drup> Iter is much faster
<companion_cube> yes, definitely
<Armael> for performance reasons ?
<companion_cube> Iter.flat_map is crazy fast, and also it works on all types even on ocaml < 4.07
<cemerick> Seq also has....6 fns?
<companion_cube> mostly, also because I don't feel like rewriting several 30kloc projects
<Armael> and ignoring retrocompat?
<companion_cube> cemerick: the standard one, yes, but there are libraries that provide a lot of combinators
<Drup> s/libraries/OSeq/
<companion_cube> :°
<Drup> companion_cube: don't play coy
<Armael> yea just use OSeq
<Drup> own it! :D
<Armael> btw
<Armael> OSeq has no find_map
<companion_cube> how much shilling should I do ? :D
<Armael> I should make a pull request
<companion_cube> :o
<companion_cube> yes you should
<Armael> I felt the need for it more than a couple times now
<companion_cube> maybe oseq should go to ocaml-community, though, in this particular instance (since it's half standard)
<Drup> cemerick: as you might have seen, the ocaml stdlib is a bit ... cautious
* cemerick goes off to read up on all of companion_cube's repos
<Drup> Good initiative x)
<cemerick> Drup: for sure. I don't mind. It'd be nice if what's there weren't quarter-measures tho.
<Drup> Armael: Basically, The tradeoff between Iter and Seq is that you sacrifice the ability to write convolution and zip for zero allocation and free fusion
<Drup> So, yeah, Iter is still very valuable
<cemerick> seems like unifying types like Seq.t or Uchar.t are good; putting things out with painfully minimal APIs is more questionable
<Armael> I guess the idea is that we can first only put a minimal API in the stdlib
<Armael> so that people can try things out
<Armael> and when the API converge
<Armael> and there's a clear winner
<Armael> we can integrate things in the stdlib
<companion_cube> also, the stdlib is used to give a unique type definition
<Drup> Yeah, `Seq` needs to live in the stdlib to be useful, unfortunatly
<Drup> We should really add all the other functions now
<Drup> People had time to chill out x)
<cemerick> I can't say I've ever seen that kind of community → blessed progression work out in general.
<companion_cube> cemerick: to give a bit more context, the PR that added Seq to the stdlib took several years to be discussed
<cemerick> exactly
<Armael> it's only been there for 1 version
<companion_cube> and it was just simpler to add a minimal consensual API, than to also expose a full API people could bikeshed to death
<cemerick> lots of case studies of batteries-included langs, and small-core langs, but incrementally going from the latter to the former is unprecedented I think
<companion_cube> it'll always be small core, but modules on an individual basis can grow
ravenousmoose has joined #ocaml
<Armael> well, it's also that manpower is scarce, and most of the people involved in the compiler do not want to lose their time on API bikeshedding
<companion_cube> seriously though, I'm a bit burnt when it comes to compiler PRs, for a little while
<companion_cube> if y'all want to champion adding a subset of OSeq to Seq, awesome, but I don't want to do it myself :(
<Drup> Armael: in practice, that argument is very poor. Everything would be much simpler if there was a couple of people that cut through the bikeshedding and the useless argument and decide on stdlib issues, independently of core-compiler folks
<Drup> well, semi-independently
<Drup> to be fair, it seems like this is precisely what is going to happen
FreeBirdLjj has quit [Remote host closed the connection]
kakadu has joined #ocaml
decentpenguin has quit [Quit: WeeChat 2.3]
<companion_cube> is anything going to happen?
<companion_cube> (I hear gasche is now grand master of OCaml, btw, that's cool)
<Armael> grand master?
kvik has quit [Changing host]
kvik has joined #ocaml
<Drup> He is ? I'm ... surprised
layeredeggplant has quit [Remote host closed the connection]
<Armael> ah yeah, AFAIR Xavier said that he was okay being the spiritual guru still, but wanted to step back as the actual "chief"
<Armael> if that's what you mean by grand master
gravicappa has quit [Ping timeout: 240 seconds]
<cemerick> companion_cube: containers is 👍
<cemerick> took about 5m, and feels niiiiice
<companion_cube> well gasche is the new director of the OCaml foundation, or something like that, right?
<companion_cube> cemerick: \o/
<cemerick> companion_cube: would you be interested in a <|> definition for Option?
<companion_cube> you mean <+> ?
<Armael> ah that
<Armael> i'm not sure it's related to the actual project governance
<cemerick> companion_cube: you devil you
<cemerick> where did + come from there?
<companion_cube> tbh there could be a lazy variant (with `unit -> 'b option` on the RHS)
<companion_cube> from my tired brain I suppose
<Drup> companion_cube: oh, wow, really ? It's not michel mauny anymore ?
<companion_cube> I haven't done much Haskell
<cemerick> ah-ha
<companion_cube> Drup: it's recent, I think
<cemerick> it's definitely <|> over there, if you care at all
<companion_cube> PRs are always welcome, anyway :)
<companion_cube> I don't promise I merge all of them, but still
<cemerick> Sure
<cemerick> are you actually interested in a breaking change like that tho?
<companion_cube> breaking changes are bad, but adding `<|>` is a possibility
<cemerick> eh two infixes with the same meaning is worse than one that is different than is found elsewhere
<Armael> Drup: michel is at tezos^w nomadic labs now
<cemerick> maybe <|> can be the lazy variant, if that comes together
<Drup> Armael: I know that, but I though he was still head of the fundation
<Armael> wasn't he at the head of the inria foundation as well? I'm confused
<companion_cube> cemerick: yes, that'd be neat
<companion_cube> although associatibity has to be checked
<companion_cube> it's better if `a <|> b <|> c` is right-associative, for more lazyness, I think
<companion_cube> anyway, I, for one, welcome our new gasche overlord
<cemerick> companion_cube: <... is definitionally left-associative, no? Besides, that's what you want for consistency with short-circuiting expectations
<companion_cube> err, left-associative, right parenthesed, yes, sorry
<companion_cube> I mean `a <|> (b <|> c)` -_-
<cemerick> yes, I think that's right
<companion_cube> sadly < seems to not be this way
<Armael> companion_cube: https://github.com/c-cube/oseq/pull/8
<companion_cube> 👍
bugabinga has joined #ocaml
wklm has quit [Ping timeout: 240 seconds]
ocabot has quit [Ping timeout: 240 seconds]
companion_cube has quit [Ping timeout: 250 seconds]
ocabot has joined #ocaml
Haudegen has quit [Remote host closed the connection]
henrytill_ has joined #ocaml
henrytill_ has quit [Changing host]
henrytill_ has joined #ocaml
henrytill has quit [Ping timeout: 252 seconds]
henrytill_ is now known as henrytill
cantstanya has quit [Ping timeout: 256 seconds]
<Leonidas> cemerick: I don't think I understand your criticism of labels, to be honest.
companion_cube has joined #ocaml
cantstanya has joined #ocaml
<Leonidas> awesome-ocaml has the issue that it tries hard to recommend you something for every case even if that something that it recommends ends up not bing particularly… awesome. IMHO.
<companion_cube> right.
<cemerick> Leonidas: I guess the tl;dr is "I don't like the noise", and "they seem to trivially break inference"
<Leonidas> Breaking the inference? I haven't seen it.
<cemerick> I included an instance of it in the post?
<cemerick> someone might say "that's how it's supposed to work", but that'd be a bad response IMO :-P
<Armael> what doesn't work well is if you try to use a function with labelled arguments without providing the labels
<cemerick> looks like using containers came with a ~20% performance hit, hum
<companion_cube> hmm, what do you use?
<companion_cube> (20% seems like a lot…)
<cemerick> Armael: I've yet to fully wrap my head around exactly why polymorphic return types cause what certainly seems like a total application to be considered otherwise
<Leonidas> (but yea, if you don't like core/base I think containers is completely fine)
<cemerick> companion_cube: Set, Option, and monomorphic float ops
<Leonidas> cemerick: I think the example is puzzling. I'll have to wrap my head around it because I never encountered such a problem
<companion_cube> cemerick: what kind of program are you writing? if there's 20% perf to be gained (without resorting to C) that sounbds interesting
govg has quit [Ping timeout: 268 seconds]
<companion_cube> hmm Set is not the same type, I guess — I just delegate to the stdlib's
<cemerick> companion_cube: I'll be doing some profiling; https://gist.github.com/cemerick/36641e4aafaeab50a184f4c63eaac32a
<companion_cube> interesting
<companion_cube> I don't know anything about JST's Set implementation
<Armael> hm, I agree, your List.fold example is puzzling
<Leonidas> I don't know, everything about the implementation of JST stuff just sort of weird and unexpected.
<companion_cube> they have cool stuff, like trees in their hashtables to mitigate collisions, but it's certainly more complicated
themsay has joined #ocaml
ravenousmoose has quit [Quit: Taking a quick nap...ZZzzz]
Haudegen has joined #ocaml
<Leonidas> okay, I was about to say that labels aren't ordered, but they sort of are and can be applied without their label. I am very confused. I need a long distance call to Nagoya now to get this explained.
<cemerick> Leonidas: "without their label", iff all required args are provided and the return type isn't polymorphic AFAICT
<theblatte> well that's why you do -w +6 ^^
<Leonidas> I'm trying to find the paper by Jaques Garrique.
<cemerick> theblatte: tbc, the manual cites this as a feature, not a pattern to be avoided
<Armael> cemerick: the code above basically implements what you just said AFAICT
<cemerick> But yes, +6 is default with dune
<cemerick> Armael: no, because fold returns 'b or whatever
<Armael> "not tvar" checks that the return type isn't a type variable
<cemerick> Oh, the code you linked
<cemerick> (Thought you meant my example)
<Armael> and when you have "List.fold [1;2;3]" its return type is still a type variable (for the type of the accumulator)
<Armael> ah, yea
<Leonidas> oh, Jun Furuse was also involved in formalizing labels and optional arguments
<Leonidas> A label-selective lambda-calculus with optional arguments and its compilation method.
spew has quit [Quit: going home]
<Leonidas> https://www.math.nagoya-u.ac.jp/~garrigue/papers/ppl2001.pdf here's a paper on how that lambda-calculus is implemented in ocaml
<cemerick> Oooohkay, right, things are always curried one step at a time, so theres never a point where totality can be determined and figure out the types considering the full context
ocabot has quit [Ping timeout: 250 seconds]
companion_cube has quit [Ping timeout: 240 seconds]
ocabot has joined #ocaml
<Leonidas> I find it very un-ML-y that you can suddenly reduce arrows in the middle of a signature
<Leonidas> but it works just like wrapping additional functions around it, sideeffects are only happening when you apply the leftmost label/argument
<Leonidas> `let f ~a = print_endline "foo"; fun ~b -> ()`
JimmyRcom has joined #ocaml
Serpent7776 has quit [Quit: leaving]
Spetznaz_ has joined #ocaml
ocabot has quit [Remote host closed the connection]
jnavila has quit [Remote host closed the connection]
nullifidian_ has joined #ocaml
KeyJoo has quit [Quit: KeyJoo]
nullifidian__ has quit [Ping timeout: 240 seconds]
iovec has quit [Quit: Connection closed for inactivity]
<Drup> cemerick, Armael: it's to support high order functions
steenuil_ has joined #ocaml
<Drup> cemerick: that benchmark is weird, what are you using apart from sets ?
kvda has joined #ocaml
steenuil has quit [Ping timeout: 240 seconds]
rymdhund has quit [Ping timeout: 252 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
ravenousmoose[aw has joined #ocaml
ravenousmoose[aw has quit [Client Quit]
themsay has quit [Ping timeout: 246 seconds]
themsay has joined #ocaml
henrytill has quit [Quit: ZNC 1.6.5 - http://znc.in]
henrytill has joined #ocaml
henrytill has quit [Client Quit]
henrytill has joined #ocaml
kakadu has quit [Remote host closed the connection]
henrytill has quit [Client Quit]
try-again has joined #ocaml
ostera1974 has quit [Ping timeout: 246 seconds]
wklm has joined #ocaml
wklm has quit [Ping timeout: 240 seconds]
Haudegen has quit [Remote host closed the connection]
cantstanya has quit [Remote host closed the connection]
<cemerick> Drup: yeah, I'm going to tweak it to take a number of samples. The variance is relatively high on the containers version.
cantstanya has joined #ocaml