companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.2.0 released: https://ocaml.org/releases/5.2.0 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
gdiazlo_caml has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
gdiazlo_caml has quit [Ping timeout: 252 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 276 seconds]
neuroevolutus has joined #ocaml
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 272 seconds]
neuroevolutus has quit [Ping timeout: 256 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 252 seconds]
terrorjack4 has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack4 has joined #ocaml
neuroevolutus has joined #ocaml
gdiazlo_caml has joined #ocaml
neuroevolutus has quit [Quit: Client closed]
bartholin has joined #ocaml
<twobitsprite> can someone pretty plx help me with my dune setup? I've been banging my head against the wall over this, and arguing with ChatGPT about it's misunderstandings about what I'm asking over and over... but I still can't get this to build. https://github.com/memotype/olarn/tree/test
<twobitsprite> I'm probably going to bed soon, but I'll stay online and read any advice in the morning
<twobitsprite> I feel like the root of my issue is not really understanding how dune interprets (name ...) and (public_name ...), but idk... I'm just tearing my hair out at this point
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #ocaml
YuGiOhJCJ has joined #ocaml
<discocaml> <hockletock> @twobitsprite - the lib/dune says that the library being defined depends on "fmts" but fmts.ml is a module IN the library - I think you need to remove it from the lib/dune (libraries...) field
<discocaml> <hockletock> then in the executable bin/main.ml , instead of referring to Fmts you can refer to Olarn.Fmts
<discocaml> <hockletock> the default behavior of dune when defining a library is to put all the modules in the folder where the library is defined into a single top-level library module
<discocaml> <hockletock> You can refine the interface of that top level module by defining it yourself to e.g. exclude certain non-user-facing modules, or to bring common functions or values to the top level of your module
<discocaml> <hockletock> anyway it's a bit mysterious but a very useful default that makes it much less likely two packages with different names will define the same module
raskol has joined #ocaml
<discocaml> <hockletock> a quick 'n' dirty edit just removing fmts from the (libraries...) of lib/dune and adding `module Fmts = Olarn.Fmts` near the top of bin/main.ml compiles and runs and gives a blank SDL window and a very verbose console logging keypresses and such
twobitsp1ite has joined #ocaml
raskol has quit [Quit: leaving]
twobitsprite has quit [Ping timeout: 246 seconds]
neuroevolutus has joined #ocaml
toastal has joined #ocaml
patrick has quit [Changing host]
patrick_ has joined #ocaml
euphores has quit [Quit: Leaving.]
euphores has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
toastal has quit [Ping timeout: 252 seconds]
neuroevolutus has quit [Quit: Client closed]
masterbuilder has quit [Ping timeout: 252 seconds]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #ocaml
bartholin has quit [Quit: Leaving]
Tuplanolla has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 246 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 276 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 252 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 260 seconds]
<twobitsp1ite> hockletock: I appreciate the help, but I think you're looking at the master branch, but I've made a lot of changes to the test branch, which is what I need help with
twobitsp1ite is now known as twobitsprite
<twobitsprite> ugh, looks like I got disconnected at some point last night
Anarchos has joined #ocaml
gdiazlo_caml has joined #ocaml
twobitsp1ite has joined #ocaml
twobitsprite has quit [Read error: Connection reset by peer]
sailorCat has quit [Quit: ZNC 1.8.2 - https://znc.in]
gdiazlo_caml has quit [Ping timeout: 248 seconds]
bartholin has joined #ocaml
sailorCat has joined #ocaml
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 248 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 260 seconds]
gdiazlo_caml has joined #ocaml
sailorCat has quit [Ping timeout: 244 seconds]
gdiazlo_caml has quit [Ping timeout: 276 seconds]
sailorCat has joined #ocaml
sailorCat has quit [Remote host closed the connection]
gdiazlo_caml has joined #ocaml
twobitsp1ite has quit [Ping timeout: 252 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
pi3ce_ has quit [Read error: Connection reset by peer]
pi3ce has joined #ocaml
sailorCat has joined #ocaml
twobitsprite has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 264 seconds]
twobitsp1ite has joined #ocaml
twobitsprite has quit [Ping timeout: 276 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 252 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 248 seconds]
gdiazlo_caml has joined #ocaml
sailorCat has quit [Remote host closed the connection]
sailorCat has joined #ocaml
twobitsp1ite is now known as twobitsprite
masterbuilder has joined #ocaml
sailorCat has quit [Remote host closed the connection]
sailorCat has joined #ocaml
sailorCat has quit [Remote host closed the connection]
sailorCat has joined #ocaml
<twobitsprite> I feel like I'm missing something very basic with dune... I just can't get subdirectories to build...
<twobitsprite> like lib/submodule/submodule.ml ... I have dune files at every level and just can't get dune to recognize that they exist
<twobitsprite> I like to think of myself as a fairly intelligent person, but dune makes me feel dumb :P
<twobitsprite> maybe I'm just getting old, because I know I've built ocaml projects years ago with just a Makefile, and I'm tempted to just go back to that XD
Anarchos has joined #ocaml
<discocaml> <darrenldl> twobitsprite: so dune built it successfully at some point in main branch?
<twobitsprite> darrenldl: yes, and now I'm trying to refactor into subdirectories
<discocaml> <darrenldl> ah...yeah never tried this much nesting myself
<twobitsprite> I've thought about just keeping all the .ml files in lib/ and just adding `module` definitions in each .ml, but I feel like I'm just going to end up with dozens of files in one directory, and maybe this is just my neurosis, but I want to avoid that
<discocaml> <darrenldl> whats the error right now?
<twobitsprite> oh, jeez, I've been tinkering with it so much...
<twobitsprite> sec, I'll git stash and check
<twobitsprite> lot's of errors like: Error: Unbound module Olarn.Server
<discocaml> <darrenldl> i just dump a ton of files into lib/ and bin/ and stopp caring, cause renaming and refactoring with nested dirs is kinda pain in the ass
<discocaml> <darrenldl> re error: okay i see
<twobitsprite> darrenldl: ok, maybe I'll just do that
<discocaml> <darrenldl> so 1) your olarn.ml is empty, 2) you may need to add each subdir, e.g. server, which are now individual libs, into the dune file for olarn
sailorCat has quit [Remote host closed the connection]
<twobitsprite> darrenldl: I've tried all sorts of variations of that approach
sailorCat has joined #ocaml
<twobitsprite> I've even looked at the dune files in the dune github source to try and figure it out. they have subdirs, but I can't figure out how the dune files make that work
<twobitsprite> I guess I'll just let me desire to write this project in ocaml override my neurosis about lots of files in the same dir *shrug* XD
<discocaml> <darrenldl> looking at the dune repo
<discocaml> <darrenldl> i dont think they are trying to the olarn.server kind of pattern
<discocaml> <darrenldl> i.e. you'd be trying just Server if you follow their pattern
<discocaml> <darrenldl> (and put server under libraries stanza)
<twobitsprite> so... if I gave up on the Olarn.Server pattern, should I just do Olarn_server?
<twobitsprite> I'd just like to make sure that the server binary doesn't have all the SDL stuff bloating it up
<discocaml> <darrenldl> i mean dead code doesnt get compiled in anyway
<twobitsprite> have you ever seen the Robin Williams movie "Toys"?
<discocaml> <darrenldl> oh wait i dont know how dead code elim behaves with linking to os libs
<discocaml> <darrenldl> nope, dont think ive seen Toys
<twobitsprite> There's a scene where some army guy is eating in the toy factory's caffeteria, and he's complaining that his food is touching, and rants about "I'm a military man! I like a military meal! I don't want a fortification around my meantloaf! I don't want my mashed potatoes invading my greenbeans!" or something like that XD
<twobitsprite> (btw, great movie, highly recommend)
<twobitsprite> anyways, that's kind of how I feel about organizing my code *shrug* lol
<discocaml> <darrenldl> sounds like sth id enjoy given the time
<twobitsprite> classic Robin Williams
<discocaml> <darrenldl> yeah my organisation is just "put everything in a bag, things going to move wildly anyway"
<twobitsprite> lol, fair enough
<twobitsprite> I'll just try it that way for now
<discocaml> <darrenldl> the prefix approach is quite commonly used afaik, e.g. containers
<discocaml> <darrenldl> so gd enough in my book
<twobitsprite> fair enough, thanks
Serpent7776 has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 252 seconds]
gdiazlo_caml has joined #ocaml
f[x] has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 265 seconds]
gdiazlo_caml has joined #ocaml
germ has quit [Read error: Connection reset by peer]
germ has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 252 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 260 seconds]
f[x] has quit [Remote host closed the connection]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 246 seconds]
gdiazlo_caml has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Anarchos has joined #ocaml
dh` has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 248 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 272 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
gdiazlo_caml has joined #ocaml
Anarchos has joined #ocaml
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #ocaml
Serpent7776 has quit [Ping timeout: 260 seconds]
bartholin has quit [Quit: Leaving]
gdiazlo_caml has quit [Ping timeout: 276 seconds]
myrkraverk has quit [Ping timeout: 276 seconds]
myrkraverk has joined #ocaml
gdiazlo_caml has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
gdiazlo_caml has quit [Ping timeout: 252 seconds]
f[x] has joined #ocaml
neuroevolutus has joined #ocaml
gdiazlo_caml has joined #ocaml