companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Soni has quit [Ping timeout: 255 seconds]
Soni has joined #ocaml
rgrinberg has joined #ocaml
gdd1 has quit [Ping timeout: 268 seconds]
chrisz has quit [Ping timeout: 268 seconds]
gdd1 has joined #ocaml
chrisz has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
perdent has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
spip has quit [Ping timeout: 240 seconds]
spip has joined #ocaml
justache has quit [Quit: ZNC 1.8.2 - https://znc.in]
azimut_ has quit [Ping timeout: 268 seconds]
trev has joined #ocaml
octachron has quit [*.net *.split]
perrierjouet has quit [*.net *.split]
thizanne has quit [*.net *.split]
Riviera has quit [*.net *.split]
notnotdan has quit [*.net *.split]
Fardale has quit [*.net *.split]
Fardale has joined #ocaml
Riviera has joined #ocaml
notnotdan has joined #ocaml
thizanne has joined #ocaml
perrierjouet has joined #ocaml
octachron has joined #ocaml
landonf has quit [*.net *.split]
habnabit_ has quit [*.net *.split]
zozozo has quit [*.net *.split]
drewolson has quit [*.net *.split]
jsoo has quit [*.net *.split]
drakonis has quit [*.net *.split]
drewolson has joined #ocaml
drakonis has joined #ocaml
zozozo has joined #ocaml
landonf has joined #ocaml
drakonis has quit [Signing in (drakonis)]
drakonis has joined #ocaml
habnabit_ has joined #ocaml
jsoo has joined #ocaml
williewillus_ has quit [Quit: Leaving]
perdent has joined #ocaml
ccx has quit [Ping timeout: 268 seconds]
zebrag has quit [Quit: Konversation terminated!]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
rgrinberg has joined #ocaml
olle has joined #ocaml
olle has quit [Remote host closed the connection]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
olle has joined #ocaml
rgrinberg has joined #ocaml
justache has joined #ocaml
rgrinberg has quit [Ping timeout: 248 seconds]
orbifx has joined #ocaml
perdent has quit [Quit: Client closed]
asm has quit [Changing host]
asm has joined #ocaml
bartholin has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 244 seconds]
adanwan_ has quit [Remote host closed the connection]
adanwan has joined #ocaml
rgrinberg has joined #ocaml
mbuf has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has quit [Ping timeout: 248 seconds]
dnh has joined #ocaml
kakadu has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 255 seconds]
justache has quit [Quit: ZNC 1.8.2 - https://znc.in]
justache has joined #ocaml
justache has quit [Remote host closed the connection]
justache has joined #ocaml
justache has quit [Remote host closed the connection]
justache has joined #ocaml
justache has quit [Remote host closed the connection]
justache has joined #ocaml
justache has quit [Remote host closed the connection]
justache has joined #ocaml
justache has quit [Remote host closed the connection]
justache has joined #ocaml
justache has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
justache has joined #ocaml
justache has quit [Remote host closed the connection]
<lthms> so you can reduce the maximum number of jobs dune uses with the `jobs` field in `.config/dune/config'. For instance, `(jobs 5)'
justache has joined #ocaml
John_Ivan has quit [Read error: Connection reset by peer]
John_Ivan has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
justache has quit [Quit: ZNC 1.8.2 - https://znc.in]
justache has joined #ocaml
trev has quit [Remote host closed the connection]
<orbifx> lthms: well found. Where was it?
justache has quit [Quit: ZNC 1.8.2 - https://znc.in]
justache has joined #ocaml
bobo_ has joined #ocaml
spip has quit [Ping timeout: 268 seconds]
adanwan has quit [Ping timeout: 268 seconds]
adanwan has joined #ocaml
orbifx has quit [Ping timeout: 252 seconds]
dnh has quit [Quit: Textual IRC Client: www.textualapp.com]
Tuplanolla has joined #ocaml
John_Ivan has quit [Quit: Ghost of the future.]
mro has joined #ocaml
azimut has joined #ocaml
rgrinberg has joined #ocaml
justache has quit [Remote host closed the connection]
justache has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
orbifx has joined #ocaml
spip has joined #ocaml
bobo_ has quit [Ping timeout: 256 seconds]
mbuf has quit [Quit: Leaving]
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
<lthms> I created an issue, and then I went reading the source code of dune to actually implement it, and found it was already there
<lthms> as far as I know the '.config/dune/config' file is not really documented in the manual, but I might be wrong
xgqt has quit [Ping timeout: 264 seconds]
xgqt has joined #ocaml
<orbifx> lthms: perhaps if it's not documented yet, it's not regarded stable for use?
<orbifx> I.e. you will have to keep an eye out it doesn't change & break your config
mro has joined #ocaml
bartholin has quit [Quit: Leaving]
mro has quit [Ping timeout: 248 seconds]
Anarchos has joined #ocaml
zebrag has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
doesntgolf has joined #ocaml
orbifx has quit [Ping timeout: 256 seconds]
doesntgolf has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
waleee has joined #ocaml
rgrinberg has quit [Client Quit]
mro has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Quit: Leaving]
<olle> I can't have executable and library in the same dune file?
<olle> I hate learning build systems :(
<companion_cube> you can, they just can't share modules
<olle> Hmmmmm
<olle> Any other alternatives to this? https://dev.realworldocaml.org/testing.html
rgrinberg has joined #ocaml
<companion_cube> search for "other testing tools"
<olle> OK, so this is useless, since they only show snippets of dune configs x(
<companion_cube> but running them from dune is good, anyway
mro_ has joined #ocaml
mro_ has quit [Remote host closed the connection]
mro has quit [Ping timeout: 256 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<olle> companion_cube: What does that mean, "share libraries"?
<olle> Sorry, share modules*
mro has joined #ocaml
<companion_cube> a module cannot belong to both a library and executable (or to several libraries for that matter)
<companion_cube> if you put them in the same directory it's annoying
<companion_cube> you need to use `(modules a b c)` to specify the modules for each thing (executable, library)
<companion_cube> just put them in separate directories and your life will be simpler
<olle> companion_cube: Is there an example app you can point me to?
<companion_cube> hmm, any dune project probably
<companion_cube> tbh it's a bad idea
<companion_cube> just put the binaries in bin/ or whatever
<olle> I wouldn'd mind, but still have no idea how, haha
<olle> Here's a tiny app
<companion_cube> ah, well, see the `modules` stanzas?
<olle> The heck is a "stanza"??
<olle> "A stanza is a series of lines grouped together in order to divide a poem;"
<companion_cube> it's the name dune uses for the things in dune files
<companion_cube> (library …) is a stanza
<companion_cube> 🤷🤷
<olle> Can't see emojis, sorry...
<olle> Got it ^^
rgrinberg has joined #ocaml
<olle> companion_cube: OK, so dune expect a folder to be *either* an executable OR a library?
<companion_cube> no
<olle> ><
<companion_cube> but by default, if you write `(library …)` it will assume that all files in the directory are in the library
<companion_cube> same with executable
<companion_cube> and because a module cannot be in both, it'll fail
<companion_cube> so you have to use `(modules …)` in both to prevent that from happening and it's not worth the effort imho
<olle> companion_cube: OK, so my project only has TWO files: pholyglot.ml and run.ml which uses pholyglot and runs it
<olle> Plus parser and lexer generated by menhir
<olle> And the ast.ml file
<olle> Damn
<olle> But phyloglot.ml is the file I wanna test
<olle> So I should put that in a separate folder together with its own tests?
<companion_cube> so you have 5 files, right
<companion_cube> ?
<companion_cube> imho I'd make a library with everything but the run.ml, in src/lib/ (for example)
<companion_cube> put run.ml in src/bin
<companion_cube> and put the tests somewhere else. Both run.ml and the tests use the library.
<olle> Nice
<olle> so src/lib, src/bin and src/test?
<companion_cube> for example, yeah
<olle> Hm, and there's also "dune init project"
<olle> Gonna try it, thanks companion_cube , phew
<companion_cube> dune tends to encourage you to have lots of libraries
<olle> And oh, each folder needs its own dune file?
<companion_cube> which I personally like
<companion_cube> yeah
<companion_cube> all of that is not the only way, it's just the easiest one
<olle> Yes, always be idiomatic unless you have good reason
williewillus_ has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<olle> So yeah
<olle> Nope, still lost
<olle> Trying the dune init project thingy
<olle> lulz, after running opam init project, you still can't run dune build in that folder
<olle> "Error: I cannot find the root of the current workspace/project.
<olle> "
<companion_cube> opam or dune?
<olle> dune
<olle> oops
<olle> sorry, yes
<olle> companion_cube: Eh, does dune expect mli files?
<olle> For modules
<companion_cube> no
<companion_cube> well you may get a warning on 4.14
<companion_cube> which I disable as soon as possible, because ugh
<olle> ^^
<olle> Ya ok, restarted with dune init project, instead of trying to copy files over. Seems to work so far
<olle> Urgh
<olle> But the bug with an extra _build folder seems to be there still, at least on my system. :)
<olle> Thanks for your help, companion_cube, always appriceated
<olle> appreciated?
<companion_cube> appreciated*
<companion_cube> you're welcome :)
olle has quit [Ping timeout: 248 seconds]
orbifx has joined #ocaml
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
John_Ivan has joined #ocaml
mro has quit [Quit: Leaving...]
rgrinberg has joined #ocaml
sagax has joined #ocaml
adanwan_ has joined #ocaml
adanwan has quit [Quit: _]
Tuplanolla has quit [Quit: Leaving.]