companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Tuplanolla has quit [Quit: Leaving.]
waleee has quit [Ping timeout: 260 seconds]
John_Ivan has quit [Ping timeout: 260 seconds]
chrisz has quit [Ping timeout: 244 seconds]
chrisz has joined #ocaml
noonien has quit [Ping timeout: 250 seconds]
spip has quit [Quit: Konversation terminated!]
<discocaml> <quantumcat.> What do OCaml users call themselves?
<companion_cube> oh camel, my camel
code_chimp has joined #ocaml
xd1le has quit [Quit: xd1le]
bgs has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
mal`` has quit [Quit: Leaving]
Techcable has quit [Ping timeout: 245 seconds]
mal`` has joined #ocaml
bartholin has joined #ocaml
mima has joined #ocaml
Serpent7776 has joined #ocaml
mima has quit [Ping timeout: 250 seconds]
<discocaml> <davesnx> Developers who does OCaml
<discocaml> <froyo> someone in the forums said "camel riders" and I couldn't stop thinking of the gay discord community with the exact same name 😅
<discocaml> <davesnx> TIL there's a gay community called camel riders
<discocaml> <davesnx> TIL there's a gay discord community called camel riders
<discocaml> <froyo> davesnx: would be an even funnier story if I managed to get them into ocaml
<discocaml> <davesnx> that would be funny indeed
<discocaml> <froyo> which take though? there are a couple in that thread.. the first reply being true but a bit boring
<discocaml> <froyo> :')
<discocaml> <gantsev.denis> Cameleers? 🐪
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #ocaml
mima has joined #ocaml
<discocaml> <undu> cameleons, obviously
<discocaml> <lecondorduplateau> les camés
<discocaml> <lecondorduplateau> 🫡
<discocaml> <gantsev.denis> That's opensuse
waleee has joined #ocaml
<discocaml> <undu> but we're orange!
<discocaml> <bluddy5> camlinos
berberman_ has joined #ocaml
berberman has quit [Ping timeout: 246 seconds]
spip has joined #ocaml
reynir has joined #ocaml
berberman has joined #ocaml
berberman_ has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 245 seconds]
berberman has quit [Quit: ZNC 1.8.2 - https://znc.in]
xd1le has joined #ocaml
berberman has joined #ocaml
reynir has quit [Ping timeout: 260 seconds]
reynir has joined #ocaml
berberman has quit [Ping timeout: 260 seconds]
berberman has joined #ocaml
berberman has quit [Ping timeout: 260 seconds]
<discocaml> <eerbium> Can someone list some differences between Scala and OCaml?
reynir has quit [Ping timeout: 246 seconds]
<discocaml> <bluddy5> Scala is fully object oriented at every level. Functional programming sits on top of OOP.
reynir has joined #ocaml
berberman has joined #ocaml
<discocaml> <quantumcat.> Which take in this do you mean?
<discocaml> <quantumcat.>
<discocaml> <quantumcat.> Seems like some good points going around. Having a community name can make people feel a sense of identity connected to the technology. I can see that being either welcoming or not welcoming, beneficial or otherwise.
<discocaml> <quantumcat.>
<discocaml> <quantumcat.> Tbh I think it's more dependent on the people in the community than any other one factor. If you have a good experience with people who are interested in OCaml (like I have), then you'll feel welcomed. If not, you'll probably feel more hesitation to take their recommendations.
<discocaml> <quantumcat.>
<discocaml> <quantumcat.> Overall though I think one of the main benefits of a small programmer population for a given technology, is that there can be a sense of community, unlike say the JS or python ecosystem.
<discocaml> <quantumcat.>
<discocaml> <quantumcat.> Community doesn't mean "us vs them", it's more like "us and them".
reynir has quit [Ping timeout: 246 seconds]
reynir has joined #ocaml
bartholin has quit [Quit: Leaving]
Everything has joined #ocaml
berberman_ has joined #ocaml
berberman has quit [Ping timeout: 246 seconds]
<discocaml> <davesnx> I'm against trivalism and fighting over personal preferences
<discocaml> <davesnx> so, if you want to call yourself Camello, excelent
azimut has joined #ocaml
<discocaml> <davesnx> if you say all ocaml developers are Camellos 🟥
<discocaml> <vphantom> I don't care for names but it is nice indeed that a smaller community means more accessibility to the core developers. It would be unthinkable for say Java, but here we have Xavier Leroy and most of the core team hanging around the Discuss forums and/or here, with an eye on Stack Overflow, etc. The feedback loop between the core team and the developers is much tighter.
<discocaml> <vphantom> I don't care for names but it is nice indeed that a smaller community means more accessibility to the core developers. It would be unthinkable for say Java, but here we have Xavier Leroy and most of the core team hanging around the Discuss forums and/or here, with an eye on Stack Overflow, etc. The feedback loop between the core team and us developers is much tighter.
<discocaml> <vphantom> I don't care for names but it is nice indeed that a smaller community means more accessibility to the core developers. It would be unthinkable for say Java, but here we have Xavier Leroy and most of the core team hanging around the Discuss forums and/or here, with an eye on Stack Overflow, etc. The feedback loop between the core team and us developers is much tighter than I've seen anywhere else.
<discocaml> <quantumcat.> Tbh I'm brand new here and to OCaml, so I'm here to learn 😄 I'll take your points with the benefit of the doubt.
John_Ivan has joined #ocaml
kaptch has joined #ocaml
kaptch has quit [Client Quit]
reynir has quit [Ping timeout: 258 seconds]
<steenuil> I'll propose "kamelåså"
<steenuil> ...hoping somebody gets the reference ;)
<discocaml> <Kali> OCaml users could collectively be the "OCaravan" :)
<discocaml> <masterbuilder> steenuil: I did 😄 I love that video
berberman_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
<discocaml> <vphantom> As someone living on the road 🚐 I enjoy that one. 😛
<discocaml> <vphantom> @ steenuil Finnish?
gareppa has joined #ocaml
<discocaml> <Kali> no, finnish does not use å
<discocaml> <Kali> that would be swedish
<discocaml> <Kali> or norwegian
MarvelousWololo has joined #ocaml
<steenuil> yup, it's (fake) danish
Tuplanolla has joined #ocaml
mima has quit [Ping timeout: 252 seconds]
tom1212 has joined #ocaml
bartholin has joined #ocaml
<tom1212> if I've got a module for the integers Z and an other one for the complex numbers C, how could I cast (or promote) a Z.t to a C.t? with objects you can have subtyping and have Z inherit from C and you can pass a Z.t when a C.t is expected
<tom1212> sorry C inherit from Z
<tom1212> functions that do the numeric coercions are an option to consider
<discocaml> <Kali> `module C = struct include Z ... let of_int z = ...`
<discocaml> <Kali> oops, and an `end` at the end
<discocaml> <Kali> or perhaps `of_z`
<discocaml> <Kali> depends on how you want to name it, if it's distinct from the builtin int type
<discocaml> <Kali> so, yes, write a conversion function
<tom1212> thanks! my code looks like module P = module C = struct ... end val fft : (module Cyclic_sig with type t = C.t) -> t -> t but I'd like to relax the constraint so that Cyclic_sig.t "is a" C.t (for instance Cyclic_sig.t=Integer.t and C.t=Complex.t)
<tom1212> I guess I need a functor that maps a (module Cyclic_sig with type t = Integer.t) to a (module Cyclic_sig with type t = Complex.t) using the conversion function
gareppa has quit [Quit: WeeChat 3.8]
waleee has joined #ocaml
<tom1212> is it possible to have a self-referencing module type? for instance module type A_sig :type t sig val lift : (module A_sig with and type t = 'p) -> t -> 'p end (approximative syntax)?
bartholin has quit [Quit: Leaving]
<tom1212> if no, is there a trick do achieve this?
<tom1212> i'm smitten
<tom1212> ocaml <3
bgs has quit [Remote host closed the connection]
Serpent7776 has quit [Ping timeout: 260 seconds]
tom1212 has left #ocaml [#ocaml]
szkl has joined #ocaml
<dh`> does anyone know if one can rely on the optimizer to shortcut things like List.fold_left (fun z x -> match x with None -> None | Some x' -> ...) z very_large_list?
<dh`> er, that's all wrong but presumably you get the idea
<dh`> or is it better to write the recursion out if traversing the list once you hit None is going to waste measurable amounts of time?
<dh`> corrected: List.fold_left (fun optz x -> match optz with None -> None | Some z -> ...) (Some z) very_large_list
<dh`> i have some lists that are not all that long but they're being eval'd 85 million times
<discocaml> <sim642> If you want to end the fold early, just raise an exception
<dh`> ew
<dh`> :-p
<dh`> stopping explicitly (not with an exception) does seem to have an observable effect, though not a large one
<dh`> hmm, maybe not really
<dh`> however, this code is tidier with a terminating fold so I'll keep it
xd1le has quit [Quit: xd1le]
<dh`> more vexingly, I have a nonrecursive function eval_foo where I've both wrapped the (single) call site with time collection and the contents with time collection, and the total elapsed time for the contents is about a third of the total elapsed time at the call site
<dh`> time collection has many pitfalls but it should not do this
<dh`> (doing it with Unix.gettimeofday (), difference, and sum, which is imperfect but still should not exhibit such behavior)
<dh`> should probably use a real profiler, except it's bust on macos
<dh`> hmm, part of the contents is taking longer than all of the contents
<dh`> this is clearly rubbish
<dh`> (longer in the _same_ go, not between runs)