<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]
<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>
<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>
<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