Leonidas changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.1.1 released: https://ocaml.org/releases/5.1.1 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
motherfsck has joined #ocaml
pi3ce has joined #ocaml
<dh`> menhir uses the syntax a=b to bind the value of token a to variable b, right? as in, read as an assignment it's backwards?
<discocaml> <._null._> No?
<dh`> no? good
<dh`> that was what I thought, I'd be relieved to be wrong
<dh`> (don't have it installed so can't just check so easily)
<dh`> now, where did I get that idea...
zanetti has joined #ocaml
zanetti has quit [Quit: zanetti]
waleee has quit [Ping timeout: 264 seconds]
jabuxas has quit [Ping timeout: 255 seconds]
deadmarshal_ has quit [Quit: IRCNow and Forever!]
deadmarshal_ has joined #ocaml
zanetti has joined #ocaml
zanetti has quit [Client Quit]
mbuf has joined #ocaml
<discocaml> <123_go_> Anyone know the best place to ask questions about js_of_ocaml? Specifically with the react bindings
<discocaml> <froyo> TIL that the compiler takes the opportunity to sometimes optimize away calls that are not necessarily in tail position but are still trivial to transform to tailrec. For example something in this form: `let rec f x = ... && f x'`
<discocaml> <froyo> it's easy to see how that happens: `a && f x` <=> `if a then f x else false`
mima has joined #ocaml
Serpent7776 has joined #ocaml
<discocaml> <hhugo6365> #webdev probably
olle has joined #ocaml
deadmarshal_ has quit [Quit: IRCNow and Forever!]
bartholin has joined #ocaml
mima has quit [Ping timeout: 264 seconds]
deadmarshal_ has joined #ocaml
deadmarshal_ has quit [Quit: IRCNow and Forever!]
Tuplanolla has joined #ocaml
deadmarshal_ has joined #ocaml
Tuplanolla has quit [Ping timeout: 272 seconds]
Tuplanolla has joined #ocaml
<discocaml> <limp.biskit> all links to ocaml manual on google are broken for me
<discocaml> <limp.biskit> lead to ocaml.org/manual/x.html but instead of redirecting to manual/5.1 they just show a blank page
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
ohperitel has quit [Quit: ZNC 1.9.0 - https://znc.in]
ohperitel has joined #ocaml
jabuxas has joined #ocaml
<discocaml> <contextfreebeer> are there any tools for aggressive dead code analysis? not necessarily for optimization purposes just to see which part of a module's interface are actually used throughout the whole program
n8n has quit [Quit: WeeChat 4.2.2]
<discocaml> <contextfreebeer> otherwise I suppose grep is bearable
<discocaml> <deepspacejohn> delete each line from the mli until there's a compile error? (I don't have a suggestion for a tool)
<discocaml> <contextfreebeer> Yeah I have also done that, to me that is more painful, it just feels a bit wrong and a slow way to do it
<discocaml> <contextfreebeer> I did find a few linters/static analyzers but they all seem to be unmaintained or don't support ocaml5
<discocaml> <contextfreebeer> if the compiler showed you all of the missing functions in one go, so you could just delete all function signatures, that would be really nice
mima has joined #ocaml
<discocaml> <Kali> aren't there warnings for unused values? or is that not strict enough
<discocaml> <contextfreebeer> I mean across the whole program
<discocaml> <limp.biskit> don't mli files stop those?
<discocaml> <limp.biskit> when ive built stuff unused value warnings have only shown on things not exposed in the mli
<discocaml> <Kali> unused code warnings +26+27+32+33+34+35+36+37+38+39
<discocaml> <deepspacejohn> If you have thorough tests then you can use bisect to see what isn't being covered (and presumably is dead code) https://ocaml.org/p/bisect/latest
<discocaml> <Kali> unused code warnings +26+27+K
<discocaml> <deepspacejohn> oops I think this is the right package https://ocaml.org/p/bisect_ppx/latest
<discocaml> <contextfreebeer> oh, that seems perfect
<discocaml> <contextfreebeer> does it only work for dune tests?
<discocaml> <deepspacejohn> I think it's build-system agnostic, although I've only used it with Dune. IIRC it adds code to your executables that writes coverage data when the executable runs.
<discocaml> <contextfreebeer> I'm using dune but my tests don't use dune
<discocaml> <regularspatula> yeah i accidentally left the instrumentation on a production executable once somehow
<discocaml> <regularspatula> So I think your use case should be fine
<discocaml> <contextfreebeer> Dune build also allows instrumentation I see yeah
<discocaml> <contextfreebeer> oooh boy I didn't think about the fact that it will generate a coverage file for each test -_-
<discocaml> <contextfreebeer> it's supposed to put it in _coverage but it put it on the top level instead
<discocaml> <contextfreebeer> right? or is this the normal behavior
<discocaml> <deepspacejohn> It's supposed to go in _coverage AFAIK
<discocaml> <contextfreebeer> well no matter I can just mass delete after generating the report I guess
<discocaml> <contextfreebeer> this is super nice by the way, thank you for the recommendation
<discocaml> <deepspacejohn> you're welcome! yep it's pretty slick
waleee has joined #ocaml
waleee has quit [Ping timeout: 252 seconds]
jabuxas has quit [Ping timeout: 260 seconds]
mbuf has quit [Quit: Leaving]
olle has quit [Ping timeout: 260 seconds]
jabuxas has joined #ocaml
<discocaml> <yawaramin> did you file a bug report?
<discocaml> <limp.biskit> no, i only noticed it trying to look smth up super quick
<discocaml> <limp.biskit> don't they use dream, if its just a redirect to latest docs i could probably PR
szkl has quit [Quit: Connection closed for inactivity]
jabuxas has quit [Ping timeout: 260 seconds]
<discocaml> <27theo> 👋 hi all
Serpent7776 has quit [Ping timeout: 246 seconds]
pi3ce has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
waleee has joined #ocaml
olle has joined #ocaml
jabuxas has joined #ocaml
migalmoreno has left #ocaml [#ocaml]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #ocaml
waleee has quit [Ping timeout: 264 seconds]
waleee has joined #ocaml
n8n has joined #ocaml
olle has quit [Ping timeout: 260 seconds]
motherfsck has quit [Ping timeout: 255 seconds]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #ocaml
motherfsck has joined #ocaml
bartholin has quit [Quit: Leaving]
torretto_ has joined #ocaml
torretto has quit [Ping timeout: 260 seconds]
jabuxas has quit [Ping timeout: 260 seconds]