<Manis>
But I'd much rather have something that looks roughly like this:
<octachron>
You could define an application operator with `#`-level of precedence as `let (#%) f x = f x`
<Manis>
print_endline (new calc # add 44 # sub 2 # to_string)
<olle>
Is customer operator feature part of the Menhir grammar?
<olle>
custom*
<octachron>
and end up with "new calc # add#%44 # sub#%2 # to_string"
<octachron>
olle: Not really? It is the lexer itself which classify operators into operator classes.
<Manis>
octachron: That looks a bit strange. But following this idea, would it be possible to define some sort of paranthesis operator or something that allows something like C-style function calls `x#add(2)` or similar?
<octachron>
No, this is not possible as far as I can see.
<olle>
octachron: hm
Anarchos has joined #ocaml
<Anarchos>
hi
mro has joined #ocaml
favonia has joined #ocaml
glassofethanol has joined #ocaml
mro has quit [Ping timeout: 250 seconds]
<olle>
octachron: so the lexer has already all possible operators defined?
<Manis>
I guess I'll need to do a lot more digging into operators.
<Manis>
It looks like a huge question mark to me atm.
<olle>
octachron: thanks
<olle>
octachron: can a custom operator have any length?
<olle>
Like #####
<olle>
|>>>>>
<olle>
SUPER PIPE
<d_bot>
<ggole> Yep
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #ocaml
<d_bot>
<froyo> super pipe lol
waleee has joined #ocaml
hackinghorn has joined #ocaml
Manis has quit [Quit: Manis]
Manis has joined #ocaml
Manis has quit [Client Quit]
hornhack has joined #ocaml
hackinghorn has quit [Ping timeout: 248 seconds]
mbuf has quit [Quit: Leaving]
Haudegen has quit [Quit: Bin weg.]
olle has quit [Ping timeout: 252 seconds]
glassofethanol has quit [Quit: leaving]
waleee has quit [Quit: WeeChat 3.2]
<d_bot>
<mimoo> hello, anyone knows how to run a single test with dune and inline tests?
waleee has joined #ocaml
<fluxm>
libvirt depends: "ocaml" {< "4.03.0"} :(. I wonder why such a hard limit.
<fluxm>
it seems it has fallen out of maintenance and the easy solution is to just use the command line tools where applicable
<fluxm>
well, at least it doesn't compile :)
<fluxm>
what a suberb combination, -Wall and -Werror -> new warnings result in code not compiling (well, also old errors)
<fluxm>
such as: libvirt_c_epilogue.c:89:1: error: ‘not_supported’ defined but not used [-Werror=unused-function]
<fluxm>
now I'm pondering if it would be worthwhile to actually convert this project to use Dune, so it would be easy to use as a directory as-is.. probably not :)
<companion_cube>
-Werror sucks, but well :p
<fluxm>
lol, https://gitlab.com/libvirt/libvirt-ocaml has the exact same changes I made. however I'm unable to compile that one because autoconf/automake is not happy.
<fluxm>
but, it has ci, so I can see how it should be compiled :)
<fluxm>
they must have fixed the actual C issues as well, because they have Werror :) (got it compiling)
zebrag has joined #ocaml
Tuplanolla has joined #ocaml
Haudegen has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
olle has joined #ocaml
rgrinberg has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
<d_bot>
<EduardoRFS> If changing behavior of (==) is allowed, why not deprecate it and move to Obj module?
hornhack has quit [Ping timeout: 250 seconds]
<companion_cube>
wdym, you can't change `==`, only shadow it
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oriba has joined #ocaml
<oriba>
when I have partial application by accident in my code, I get the warning, that that expression should be of unit type! I remember, there was a warning about partial application (which I prefer) in older compilers
<oriba>
looks bad to me
<oriba>
is this a known issue?
<oriba>
or are there reasons to get such a warning about unit type?
<d_bot>
<NULL> You mean this warning message : `Warning 10 [non-unit-statement]: this expression should have type unit.` ? What's wrong with it ?
<d_bot>
<NULL> After re-reading, I infer that you're not getting this warning when you thought you should get it : `Warning 5 [ignored-partial-application]: this function application is partial, maybe some arguments are missing.`. What's the expression ?
<oriba>
yes
<oriba>
I thought toget the one and not the other warning
<d_bot>
<NULL> The unusual `(:=) (ref 0); 0;;` triggers Warning 5, what's your expression that should also trigger it ?
<oriba>
don't have that stuff at hand now (it's on my working laptop), try to find it out.
rgrinberg has joined #ocaml
<d_bot>
<NULL> The less unusual `let add = (+) in add 0; 0;;` also triggers it
<d_bot>
<NULL> Also, "try to find it out" is an order; as you also skipped the subject in the first clause I imagine you meant "I *am trying* to find it out"
<oriba>
I have a yojson object and use Yojson.Basic.show on that object. Just seeing, it is not partial application. it just jields string type.
<oriba>
so my assumption was wrong, I did not partial application
<oriba>
ah, the name mislead me
<oriba>
show does not show (print) the value
<oriba>
it converts to string
<oriba>
hmhhh
<oriba>
so it is a string value standing alone
<oriba>
using print_endline (YB.show myson) and the warning goes away
mro has joined #ocaml
gravicappa has joined #ocaml
<d_bot>
<NULL> Then next time, make sure your problem truly is an issue of the software you're using (here, OCaml) before claiming it as one