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/
Haudegen has quit [Quit: Bin weg.]
habnabit has joined #ocaml
habnabit_ has quit [Ping timeout: 252 seconds]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 252 seconds]
Humean has joined #ocaml
chrisz has quit [Ping timeout: 272 seconds]
chrisz has joined #ocaml
<discocaml> <restrictedchoice> any thoughts on a new channel for oxcaml?
<companion_cube> if you want even less traffic than here… :D
<discocaml> <yawaramin> there's a #rocq channel so an OxCaml channel seems reasonable to me
<companion_cube> oh yeah, sorry, on discord
humasect has joined #ocaml
toastal has joined #ocaml
humasect has quit [Quit: Leaving...]
iNomad has joined #ocaml
bartholin has joined #ocaml
inline has quit [Ping timeout: 268 seconds]
toastal has left #ocaml [#ocaml]
Humean has quit [Ping timeout: 276 seconds]
germ- has quit [Read error: Connection reset by peer]
bartholin has quit [Remote host closed the connection]
germ_ has joined #ocaml
keyboard has quit [Quit: keyboard]
keyboard has joined #ocaml
keyboard has quit [Remote host closed the connection]
keyboard has joined #ocaml
Haudegen has joined #ocaml
olle has joined #ocaml
<olle> Anyone know anything about first-class function _calls_?
<olle> Or, in OOP parleur, first-class message passing.
toastal has joined #ocaml
Frostillicus has joined #ocaml
<discocaml> <kayceesrk> There is an #oxcaml channel now. Thanks for creating this channel.
Frostillicus has quit [Ping timeout: 276 seconds]
Frostillicus has joined #ocaml
Serpent7776 has joined #ocaml
inline has joined #ocaml
inline has quit [Remote host closed the connection]
szkl has joined #ocaml
kurfen has quit [Ping timeout: 260 seconds]
wbooze has joined #ocaml
<discocaml> <aguluman> I have OxCaml installed. 🥂🫂🐫🧡
Tuplanolla has joined #ocaml
Frostillicus has quit [Ping timeout: 252 seconds]
johnridesabike has joined #ocaml
germ_ has quit [Read error: Connection reset by peer]
germ_ has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
<olle> Would some 0xcaml stuff be merged into core? is there a roadmap or plan?
<olle> Oxcaml perhaps
<companion_cube> yes, it's supposed to eventually be all upstreamed
<companion_cube> if the core team accepts
<olle> companion_cube: neat! pretty impressive package they made.
<discocaml> <deepspacejohn> Some of it is already being merged, some of the "miscellaneous extensions"
<olle> Kewl
bartholin has joined #ocaml
olle has quit [Ping timeout: 252 seconds]
<discocaml> <lukstafi> I've started using agentic LLMs / Cursor and the expect-test harness is a pain for them. To be honest it's also not pleasant for debugging for me. I'll probably keep the tests I have but the new tests gonna be the single-executable `with-stdout-to` then `diff output.expected` idiom.
<dh`> what would first-class function calls even be?
<discocaml> <lukstafi> (By single-executable I mean one executable per a not-too-broad set of tests, sorry for confusion. Unlike the big library with all the tests.)
<discocaml> <deepspacejohn> My personal preference for a long time has been the Dune-style stdout `.expected` tests too. Other options always end up being more trouble than they're worth.
<discocaml> <deepspacejohn> or cram tests (which are basically the same principle) when I want to test a whole program.
<discocaml> <lukstafi> The appeal of expect-test is that they are supposed to work as tutorials, poor-man's Jupyter notebooks.
euphores has quit [Quit: Leaving.]
<discocaml> <yawaramin> i'm doing this too, works well for me. dune has special support for this so you don't even need explicit rules any more. see https://dev.to/yawaramin/bare-bones-unit-testing-in-ocaml-with-dune-1lkb
euphores has joined #ocaml
bartholin has quit [Ping timeout: 252 seconds]
toastal has quit [Ping timeout: 260 seconds]
<discocaml> <undu> They are called cram tests. They're really useful as regression tests for CLI tools. Although I've used them with dune rules to specify what package are they attached to
<discocaml> <yawaramin> cram tests are actually slightly different from what i described, see https://dune.readthedocs.io/en/stable/tests.html#cram-tests
<discocaml> <deepspacejohn> Cram tests are very nice too, though.
<discocaml> <yawaramin> eg in my tests i don't need `(cram enable)`
<discocaml> <deepspacejohn> Cram tests also have the advantage of forcing you to make a good CLI
<discocaml> <yawaramin> right they are meant for testing CLIs; dune's built-in 'bare-bones' diffing can be even if your project is not a CLI
wbooze has quit [Quit: Leaving]
<discocaml> <undu> ahh, I see how they're different, nice, I didn't know about these
<discocaml> <undu> does it have tools to be able to filter output? (like timestamps or current working dir)
<discocaml> <yawaramin> not really...the output has to be exactly the same as the expected file every time to pass the test
<discocaml> <lukstafi> Do you get a per-file executable with just one `test` rule, or only with one `(test (modules file.ml))` rule per `file.ml`?
<discocaml> <yawaramin> i always do one directory per test executable
<discocaml> <lukstafi> Right... That feels heavier... But it does seem like an unjustified feeling.
<discocaml> <yawaramin> actually, i'm wrong. i'm also using `(modules ...)` to have multiple test executables. see https://github.com/yawaramin/dream-html/blob/main/test/dune
<discocaml> <deepspacejohn> Hopefully when one of the associated PRs here gets merged, we'll have an automatic alias for each test https://github.com/ocaml/dune/issues/10239
Anarchos has joined #ocaml
humasect has joined #ocaml
euphores has quit [Quit: Leaving.]
euphores has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Humean has joined #ocaml
bartholin has joined #ocaml
wbooze has joined #ocaml
zor has joined #ocaml
<discocaml> <lukstafi> Yes, you can already do `dune exec` on these test stanza files, but it's just a part of what `dune test` does.
YuGiOhJCJ has joined #ocaml
wbooze has quit [Quit: Leaving]
Frostillicus has joined #ocaml
humasect has quit [Quit: Leaving...]
euphores has quit [Quit: Leaving.]
euphores has joined #ocaml
kurfen has joined #ocaml
bartholin has quit [Remote host closed the connection]
iNomad has quit [Quit: leaving]
Frostillicus has quit [Ping timeout: 245 seconds]
wbooze has joined #ocaml
Mooncairn has joined #ocaml
johnridesabike has quit [Quit: johnridesabike]
Serpent7776 has quit [Ping timeout: 252 seconds]
eilvelia has quit [Ping timeout: 276 seconds]
eilvelia has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
Haudegen has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
Haudegen has quit [Quit: Bin weg.]
wbooze_ has joined #ocaml
wbooze_ has quit [Client Quit]
wbooze has quit [Ping timeout: 260 seconds]