ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
ygrek has quit [Remote host closed the connection]
mange has joined #ocaml
<discocaml>
<contificate> and you eventually run out of interesting topics and sell out
<discocaml>
<contificate> start producing slop with "pondering emoji" thumbnails, where you discuss inheritance vs composition and cite Uncle Bob et al (2025)
<discocaml>
<cod1r> there are tech content creators that just talk about "tech news"
<discocaml>
<cod1r> even if they aren't subject matter experts
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 244 seconds]
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 276 seconds]
inline has joined #ocaml
toastal has joined #ocaml
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 265 seconds]
toastal has left #ocaml [#ocaml]
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 244 seconds]
<discocaml>
<aguluman> 😶
toastal has joined #ocaml
Frostillicus has joined #ocaml
Serpent7776 has joined #ocaml
bartholin has joined #ocaml
ygrek has joined #ocaml
germ_ has quit [Read error: Connection reset by peer]
germ_ has joined #ocaml
Frostillicus has quit [Read error: Connection reset by peer]
ygrek has quit [Remote host closed the connection]
Haudegen has joined #ocaml
dhil has joined #ocaml
Frostillicus has joined #ocaml
szkl has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
Frostillicus has quit [Read error: Connection reset by peer]
dhil has joined #ocaml
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 245 seconds]
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 244 seconds]
iNomad has joined #ocaml
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 252 seconds]
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 248 seconds]
toastal has left #ocaml [#ocaml]
Frostillicus has joined #ocaml
<discocaml>
<gooby_diatonic> Is it good practice to use `modules_without_implementation` with dune? In one of my executable files I want to be able to have a few modules from a library with the same signature, which would be passed to a function as first class modules depending on some condition, so I need to add a signature for them. I thought I'd define that signature in a separate `mli` file, but now I'm questioning if that's good practice or not
Frostillicus has quit [Quit: Frostillicus]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 252 seconds]
Frostillicus has joined #ocaml
<companion_cube>
just use a .ml
Haudegen has quit [Quit: Bin weg.]
Frostillicus has quit [Ping timeout: 248 seconds]
inline has quit [Quit: Leaving]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 260 seconds]
Frostillicus has joined #ocaml
omegatron has joined #ocaml
<discocaml>
<._null._> So you have a ml file with `module type S = sig ... end` *and* the accompanying mli file which is a carbon copy of the ml file?
<companion_cube>
I just use a .ml without .mli in this case
<companion_cube>
and silence the stupid warning
<discocaml>
<gooby_diatonic> Honestly I've always found it a bit weird that the convention is to create a mli file for absolutely every ml file, as opposed to creating mli files when needed
<companion_cube>
conventions can be stupid too :p
<companion_cube>
I think there's a good balance
<companion_cube>
also since, err, 4.08 ? you can do `open struct … end` to write private stuff in a .ml-only module
<companion_cube>
that + type annotations means it's often nice to just have a .ml if most of it is public
<companion_cube>
simple types, and functions around these, no complex invariants
<discocaml>
<gooby_diatonic> Elegant
wbooze_ has joined #ocaml
<companion_cube>
(I annotate types anyway so it's kind of redundant to have a .mli, except in cases where the .ml is big but its .mli would be super short)
<discocaml>
<diligentclerk> never heard of `open struct ... end`. that's really nice.
<companion_cube>
yeah it's a nice trick
Haudegen has joined #ocaml
<discocaml>
<gooby_diatonic> I annotate just to get `merlin-destruct` to work, then I remove the annotations 8)
<discocaml>
<deepspacejohn> > except in cases where the .ml is big but its .mli would be super short
<discocaml>
<deepspacejohn> I'm afraid this is 99% of cases for the code I write.
<discocaml>
<deepspacejohn> It would be nice if type annotations in ml and mli had exactly the same meaning, i.e. were both universally quantified
<discocaml>
<gooby_diatonic> companion_cube: I agree, it's just that in OCaml I don't really like how either style of inline annotation works, although I think I might just give in and annotate non-obvious things with `let f : ... = fun ... -> ...` from now on
<discocaml>
<gooby_diatonic> Since I noticed some things are very confusing without annotations, and I can avoid opening modules when matching on variants from them with a type annotation I believe
<discocaml>
<gooby_diatonic> But I wish OCaml had Haskell-style annotations tbh
wbooze_ is now known as inline
<companion_cube>
`let f (x:a) (y:b) : c = ...` is nicer imho
mange has quit [Quit: Zzz...]
<discocaml>
<gooby_diatonic> I feel like I've had issues with it before but I can't remember what it was :7 I think when I had to do a `type a.`, and I happened to be writing a lot of that. But maybe I'll give it a go in non-GADT situations and see if it starts getting too verbose or not
inline has quit [Ping timeout: 252 seconds]
wbooze has joined #ocaml
wbooze_ has joined #ocaml
wbooze is now known as Guest8788
wbooze_ is now known as inline
Guest8788 has quit [Ping timeout: 276 seconds]
<discocaml>
<deepspacejohn> IIRC `: type a.` is necessary for certain recursive functions
<discocaml>
<froyo> in the gadts `cast` example in the manual it's used unnecessarily
<companion_cube>
sure, it's pretty rare though
<discocaml>
<froyo> iirc the manual does say it is needed for polymorphic recursion, but using it outside of that can make its utility appear a little fuzzy
<companion_cube>
I'd keep this only for gnarly, localized GADT stuff
<companion_cube>
(GADT stuff needs to be localized anyway for sanity)
inline has quit [Quit: Leaving]
wbooze_ has joined #ocaml
wbooze_ is now known as wbooze
wbooze is now known as inline
inline has quit [Client Quit]
wbooze_ has joined #ocaml
wbooze_ is now known as wbooze
iNomad has quit [Quit: leaving]
Haudegen has quit [Quit: Bin weg.]
wbooze has quit [Ping timeout: 245 seconds]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 260 seconds]
deavmi has joined #ocaml
wbooze has joined #ocaml
ygrek has joined #ocaml
omegatron has quit [Quit: Power is a curious thing. It can be contained, hidden, locked away, and yet it always breaks free.]
Haudegen has joined #ocaml
Frostillicus has joined #ocaml
Frostillicus has quit [Read error: Connection reset by peer]
nlocalhost has quit [Remote host closed the connection]
nlocalhost_ has joined #ocaml
euphores has quit [Quit: Leaving.]
nlocalhost_ has quit [Remote host closed the connection]
nlocalhost has joined #ocaml
nlocalhost has quit [Remote host closed the connection]
nlocalhost_ has joined #ocaml
nlocalhost_ has quit [Remote host closed the connection]
nlocalhost has joined #ocaml
euphores has joined #ocaml
Frostillicus has joined #ocaml
Anarchos has joined #ocaml
Frostillicus has quit [Ping timeout: 252 seconds]
Frostillicus has joined #ocaml
Everything has joined #ocaml
Frostillicus has quit [Ping timeout: 252 seconds]
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
Frostillicus has joined #ocaml
<discocaml>
<dubious245> I'd love to just write a function signature (with holes) above the top level let bind rather than interspersing the type annotations into the let binding.
<discocaml>
<deepspacejohn> It's not above the signature, but you can put "holes" as `_` in function annotations: `let f: int -> _ -> string -> _ -> blah = fun ...`
<discocaml>
<deepspacejohn> I do that when I need polymorphic recursion but don't want to annotate the whole function, e.g. `let rec f : 'a. 'a -> _ = fun ...`
<discocaml>
<deepspacejohn> `_` is just a type variable like `'a` except without giving it a name.
Tuplanolla has joined #ocaml
Frostillicus has quit [Ping timeout: 252 seconds]
Everything has quit [Quit: leaving]
Frostillicus has joined #ocaml
f[x] has joined #ocaml
ygrek has quit [Remote host closed the connection]
hanker has quit [Remote host closed the connection]
Serpent7776 has quit [Ping timeout: 244 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml>
<diligentclerk> through networking I got put in touch with a guy who wants to make a convenient, easy to use tool for formal verification of models for distributed and concurrent system, part of the tool is kind of a compiler from the language for writing the model spec into the internal representation for finite model checking
<discocaml>
<diligentclerk> and he's writing it in Go, which took me by surprise a little bit lol. He doesn't even love Go, he says it's not a very good language and refactoring is a pain. The only thing he seemed to like is the fast compilation and good performance. It shines on small projects. It surprises me when somebody in the formal methods community would reach for Go for a project instead of something with more influence from PL theory and bindings.
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 244 seconds]
<discocaml>
<froyo> and the pros he mentioned are already in ocaml, perhaps to a better degree
ridcully_ has joined #ocaml
ridcully has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 268 seconds]
bartholin has quit [Remote host closed the connection]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 265 seconds]
Frostillicus has quit [Ping timeout: 276 seconds]
humasect has joined #ocaml
hanker has joined #ocaml
<companion_cube>
Go has a better stdlib and static compilation story, but static analysis is one of these niches where ocaml actually does shine