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/
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 joined #ocaml
Tuplanolla has joined #ocaml
Serpent7776 has joined #ocaml
dnaq has quit [Remote host closed the connection]
dnaq has joined #ocaml
alexherbo2 has joined #ocaml
dnaq has quit [Remote host closed the connection]
dnaq has joined #ocaml
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
julien is now known as neiluj
<neiluj> does that sound familiar?
wingsorc__ has quit [Read error: Connection reset by peer]
wingsorc__ has joined #ocaml
troydm has quit [Ping timeout: 260 seconds]
<discocaml> <._null._> Weird. Did you install the external packages that are required ?
julien has joined #ocaml
neiluj has quit [Read error: Connection reset by peer]
<julien> yes, gtk3 and gtk3-devel, as well as gtksourceview3
troydm has joined #ocaml
<discocaml> <._null._> Do you have any conf-* package installed already ?
<julien> ocaml packages?
<discocaml> <._null._> Yes
<julien> yes, conf-zlib for example
Anarchos has joined #ocaml
<julien> okay my bad some software is changing the pkgconfig paths
dnh has joined #ocaml
Serpent7776 has joined #ocaml
julien has quit [Quit: julien]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
Serpent7776 has quit [Ping timeout: 276 seconds]
alexherbo2 has joined #ocaml
bartholin has quit [Quit: Leaving]
Anarchos has quit [Quit: time to sleep]
xd1le has quit [Quit: xd1le]
greenbagels has quit [Ping timeout: 255 seconds]
Tuplanolla has quit [Ping timeout: 245 seconds]
Tuplanolla has joined #ocaml
greenbagels has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]