companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.12 released: https://ocaml.org/releases/4.12.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
vicfred has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
jfrent has joined #ocaml
waleee has quit [Ping timeout: 245 seconds]
dh` has joined #ocaml
dh` has joined #ocaml
dh` has quit [Changing host]
<d_bot> <darrenldl> oooo i did want to write a multiplayer sandbox game at some point
<d_bot> <darrenldl> thought FP is well suited to entity component system
zebrag has quit [Quit: Konversation terminated!]
gravicappa has joined #ocaml
<kevinsjoberg> Anyone using ocp-indent with Emacs? I just started using Emacs for OCaml development but it looks like ocp-indent does nothing? If I call ocp-indent-line it does what I expect, but I get no auto-indentation by default.
<d_bot> <ggole> @KevinSjoberg did you add the usual stanza to your .emacs? (I think opam suggests it when you install ocp-indent.)
<kevinsjoberg> d_bot: I installed the ocp-indent package and tuareg. ocp-indent seem to have hooks in place for calling `ocp-setup-indent` whenever Tuareg is enabled.
<kevinsjoberg> Here's an excerpt from my `init.el`.
<kevinsjoberg> oh, I ping the Discord bot, lol. I meant @ggole.
<d_bot> <ggole> Hmm. Did you install ocp-indent and tuareg through the emacs package system?
<kevinsjoberg> @ggole, yes. Both of them. Tuareg works as advertiseed, although the indentation was off, so I was recommended to try ocp-indent. I installed it via opam first (`opam install ocp-indent`) and then the Emacs bindings via `package-install`.
<d_bot> <ggole> That might be the problem; opam sets up a `site-lisp` directory which you are supposed to add to the `load-path`
<d_bot> <ggole> I have no idea how `package-install` interacts with that.
<kevinsjoberg> By the looks of it, it just uses whatever Emacs bindings ship with ocp-indent.
<kevinsjoberg> It works when I call the functions manually, it's just that nothing happens upon pressing <RET>.
<d_bot> <ggole> Do you get indentation when you press TAB?
<kevinsjoberg> Pressing TAB give me some kind of indent, but it's not working correctly to my knowledge.
<kevinsjoberg> Let me demonstrate.
<d_bot> <ggole> I ask because AFAIK, ocp-indent will arrange to set indent-line-function and indent-region-function, and doesn't touch key bindings at all
<d_bot> <KevinSjoberg> This is what I'm seeing when pressing TAB.
<kevinsjoberg> This is what I see when I press TAB.
<d_bot> <ggole> That certainly doesn't seem right
<d_bot> <ggole> What is TAB bound to? It should be `indent-for-tab-command` iirc
<kevinsjoberg> How do I check that? I'm a complete Emacs noob.
<d_bot> <ggole> Change to a buffer that is in tuareg-mode and `C-h k <press the key>`
<kevinsjoberg> It's bound to `indent-for-tab-command`.
<d_bot> <ggole> ...huh
<d_bot> <ggole> Could you also (again, in a tuareg-mode buffer) tell me what `C-h v indent-line-function` says it is bound to?
<d_bot> <ggole> ocp-indent *should* be setting that variable, but I'm guessing that it is not.
<kevinsjoberg> It's value is `ocp-indent-line`.
<d_bot> <ggole> What the hell
<d_bot> <ggole> Your emacs is haunted
<kevinsjoberg> Yes, I don't understand what's going on. And If I call `ocp-indent-line` on the broken line, it adjusts itself accordingly.
<d_bot> <ggole> Yeah, I'm really not sure how to fix this
<kevinsjoberg> Hmm. Enabling `electric-indent-mode` seems to solve it?
<kevinsjoberg> People told me disable it.
mattil has joined #ocaml
<d_bot> <ggole> Oh, maybe that's it
<d_bot> <ggole> Presumably it is changing the behaviour of `indent-for-tab-command`
<d_bot> <ggole> So OCP doesn't get to do its thing
mattil has quit [Remote host closed the connection]
<kevinsjoberg> I see. Seems to be working much better now. Not great though. Now comments are aligned weirdly.
mattil has joined #ocaml
mattil has quit [Remote host closed the connection]
<d_bot> <ggole> You can configure some of that iirc
mattil has joined #ocaml
mattil has quit [Remote host closed the connection]
mattil has joined #ocaml
<d_bot> <ggole> That's a bug, it will go away if you close the `sig` with an `end`
<d_bot> <ggole> Hmm, should probably report that one
<kevinsjoberg> Yep. Closing the signature did solve that.
mbuf has joined #ocaml
<kevinsjoberg> Thanks for the help!
<d_bot> <ggole> np
yoctocell has joined #ocaml
bartholin has joined #ocaml
olle has joined #ocaml
Tuplanolla has joined #ocaml
elf_fortrez has joined #ocaml
Serpent7776 has joined #ocaml
Haudegen has joined #ocaml
olle has quit [Ping timeout: 248 seconds]
waleee has joined #ocaml
kvik has quit [Ping timeout: 245 seconds]
kvik has joined #ocaml
mattil has quit [Remote host closed the connection]
mattil has joined #ocaml
mbuf has quit [Quit: Leaving]
yoctocell has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
yoctocell has joined #ocaml
yoctocell has quit [Remote host closed the connection]
berberman has quit [Quit: ZNC 1.8.2 - https://znc.in]
berberman has joined #ocaml
neiluj has joined #ocaml
<neiluj> Hi! Trying to test a library with QCheck. Is it possible to test functions in the lib that are not exposed?
<neiluj> I have a test/ folder with (libraries my_lib)
mro has joined #ocaml
nerdypepper has joined #ocaml
<nerdypepper> evening o/
<nerdypepper> is there a way i can use dune as a library?
<nerdypepper> i am looking to find the dune project root of a given file or directory
<neiluj> nevermind, adding __ as a suffix to the libary gives access to the hidden functions :)
<neiluj> hellow!
<nerdypepper> hiya neiluj, was your previous message for me? im not sure i understand, a little new to the whole ecosystem
neiluj_ has joined #ocaml
neiluj_ has quit [Client Quit]
neiluj_ has joined #ocaml
neiluj has quit [Ping timeout: 268 seconds]
elf_fortrez has quit [Ping timeout: 246 seconds]
mro has quit [Remote host closed the connection]
mbuf has joined #ocaml
neiluj has joined #ocaml
neiluj_ has quit [Ping timeout: 258 seconds]
neiluj has quit [Ping timeout: 268 seconds]
cross has joined #ocaml
mattil has quit [Read error: Connection reset by peer]
mattil has joined #ocaml
mattil has quit [Remote host closed the connection]
mattil has joined #ocaml
mattil has quit [Remote host closed the connection]
mattil has joined #ocaml
mattil has quit [Remote host closed the connection]
mattil has joined #ocaml
mattil has quit [Remote host closed the connection]
mattil has joined #ocaml
mattil has quit [Remote host closed the connection]
mattil has joined #ocaml
mattil has quit [Remote host closed the connection]
mbuf has quit [Quit: Leaving]
darxun has quit [Ping timeout: 258 seconds]
darxun has joined #ocaml
cedric has joined #ocaml
scriptdevil has joined #ocaml
<scriptdevil> Is there a dune equivalent of `cargo check` as in something that only checks for compiler errors but doesn't need to link?
<scriptdevil> I am on a low-RAM laptop presently and was depending on non-exhaustive pattern errors to guide me through adding a variant
<scriptdevil> Incidentally, I hit a weird build issue where I added a new tag to a variant, but incremental compilation didn't really catch missing patterns and I hit a runtime error (probably because some of the object files were already built with the old variant)
wonko has quit [Ping timeout: 268 seconds]
wonko has joined #ocaml
wonko has quit [Ping timeout: 258 seconds]
<companion_cube> dune build @check
<companion_cube> that really shouldn't happen, exhaustive pattern checking works extremely well
vicfred has quit [Ping timeout: 248 seconds]
<scriptdevil> Thank you!
wonko has joined #ocaml
wonko has quit [Ping timeout: 248 seconds]
<scriptdevil> @companion_cube: Thanks a tonne once again. dune build @check helped me get my job done!
<companion_cube> ✔
<companion_cube> now you can try `dune build @check -w` if your battery permits :p
<companion_cube> -w is super nice
<scriptdevil> Nice! check + watch is neat. I am plugged into a wall socket - so power shouldn't be a problem.
vicfred has joined #ocaml
scriptdevil has quit [Remote host closed the connection]
<d_bot> <froyo> darrenldl: in my experience, leaving them out produced better inlining and better perf haha
<d_bot> <froyo> also another one: how do you get processor count? Is a function for such defined anywhere in Sys or Unix?
conjunctive has quit [Ping timeout: 258 seconds]
cbarrett has quit [Ping timeout: 252 seconds]
cbarrett has joined #ocaml
conjunctive has joined #ocaml
kevinsjoberg has quit [Ping timeout: 256 seconds]
cemerick has joined #ocaml
kevinsjoberg has joined #ocaml
v0idpwn has joined #ocaml
JSharp has joined #ocaml
caasih has joined #ocaml
gravicappa has quit [Ping timeout: 268 seconds]
olle has joined #ocaml
<d_bot> <froyo> seems like there isn't
<d_bot> <froyo> in multicore even
wonko has joined #ocaml
olle has quit [Ping timeout: 272 seconds]
spip has quit [Quit: Konversation terminated!]
spip has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Read error: Connection reset by peer]
mro_ has joined #ocaml
wonko has quit [Ping timeout: 268 seconds]
Serpent7776 has quit [Quit: leaving]
cedric has quit [Quit: Konversation terminated!]
Tuplanolla has quit [Quit: Leaving.]
mro_ has quit [Quit: Leaving...]
<companion_cube> maybe the `cpuid` package?