dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
John_Ivan has joined #ocaml
Tuplanolla has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 268 seconds]
motherfsck has quit [Quit: quit]
motherfsck has joined #ocaml
<greenbagels>
i apologize for the flood of basic questions (especially opinion-based ones) but uh
<greenbagels>
generally defining an interface before an implementation helps better organize modules, right? are there any decent heuristics for knowing when to start making submodules?
noonien85 has quit [Ping timeout: 255 seconds]
<discocaml>
<Et7f3 (@me on reply)> I would first implement/draft the consumer implementation, analyse it's need and create an interface out of it, then really implementing the sub module. If you start interface right away you might over engineer (usefule if you are a library author)
<discocaml>
<Et7f3 (@me on reply)> You start submodule in case where a public module isn't necessary (directly opened module, local helper, ...) other than that juste follow heuristic for module: create it one piece of data need it own treatment.
<companion_cube>
yeah, in a .ml I tend to use submodules to group stuff together when it makes sense
<companion_cube>
(e.g. a lot of code that only exports one or two public things at the end)
<companion_cube>
in a .mli I'd only use them either: for sub-features (e.g. infix operators, etc.) or for ancilliary types that don't deserve their own file
<companion_cube>
(but more and more I just give these a file anyway)
<dh`>
I don't think I've ever written anything in ocaml that had one file big enough to need submodules for organizational purposes
<dh`>
though I've done it for evil namespace reasons at times
<dh`>
but, most of what I've written in ocaml is compilers and they tend to be structurally very simple
<companion_cube>
pre-refactoring, in a largeish work project, we've had files run over 3k loc
<companion_cube>
with submodules
<companion_cube>
well in compilers you might have very large passes, right?
<dh`>
yes, but they don't have much in the way of internal structure
<greenbagels>
i see...
<dh`>
a generic pass has one function per type in your IR, plus some top-level interface bits, plus some operations on the pass context, plus typically small amounts of support code
<dh`>
these could be divided into modules but it doesn't really serve much purpose
<dh`>
if you have a self-contained data structure going on it probably belongs in its own file anyway
<dh`>
but also, it depends on your standards of large
<dh`>
3000 lines doesn't necessarily seem that large, depending on what it is
azimut has quit [Ping timeout: 240 seconds]
dnaq has quit [Remote host closed the connection]
dnaq has joined #ocaml
bibi_ has quit [Quit: Konversation terminated!]
<greenbagels>
hmm is there a way to have ocamldoc generate both subscripts and superscripts on the same character
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
average has quit [Quit: Connection closed for inactivity]
azimut has joined #ocaml
waleee has joined #ocaml
Serpent7776 has quit [Ping timeout: 255 seconds]
dnh has joined #ocaml
<companion_cube>
Yeah that's fair re: self contained data structures
<companion_cube>
Oh. An obvious case of submodule is to export specializations for the current types, ofc
dnh has quit [Read error: Connection reset by peer]
<companion_cube>
Like exporting Map, Tbl, Set for this module's type
dnh has joined #ocaml
bartholin has quit [Quit: Leaving]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
mro has joined #ocaml
wingsorc__ has joined #ocaml
wingsorc has quit [Ping timeout: 256 seconds]
Serpent7776 has joined #ocaml
<discocaml>
<avicebron0> I've been trying to get `ocp-indent` recognized by emacs, following the instruction with `echo '(load-file "'"$(opam config var prefix)"'/share/typerex/ocp-indent/ocp-indent.el")' >>~/.emacs` , after which emacs throws an error that it can't find `ocp-indent.el`. Does anyone have any suggestions on how I can either find the correct path needed or another installation method to make ocp-indent work? My indentation has been pretty messed up
alexherbo2 has quit [Remote host closed the connection]
Serpent7776 has quit [Ping timeout: 260 seconds]
bibi_ has joined #ocaml
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
mro has quit [Quit: Leaving]
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
bartholin has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
szkl has joined #ocaml
process0 has joined #ocaml
julien has joined #ocaml
<julien>
Hello! Trying to install frama-c on fedora 39 but getting the errorNo package 'gtk+-3.0' found while it is installed