<ggole>
Because error messages might want to highlight the location of the name only, if there is a problem with it
<ggole>
(eg, it is a duplicate)
<ggole>
Location info tends to be somewhat redundant just because it's annoying to design it out
<ggole>
Eg, there are some expression constructors where the location is just going to be a copy of the location of the argument of the constructor
<Leonidas>
ok, I see :-)
jao has quit [Ping timeout: 245 seconds]
flux has joined #ocaml
jnavila has quit [Ping timeout: 246 seconds]
<Leonidas>
how do I inject outside values into a [%stri <code>] node in ppxlib.metaquot?
jnavila has joined #ocaml
<octachron>
with [%e ... ], [%p ...] and friends.
jbrown has quit [Read error: Connection reset by peer]
jbrown has joined #ocaml
tane has joined #ocaml
assemblyman has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
AnAverageHuman has joined #ocaml
jao has joined #ocaml
<companion_cube>
hmm, when the GC becomes super slow and displays (with adequate ocamlrunparam) "computed work = 0 words, sweeping 0 words, $work-done = 0u` in a loop… is it normal?
jao has quit [Ping timeout: 246 seconds]
<def`>
sounds like a bug
<companion_cube>
hmm ok we possibly trigger it, I'll come back if I figure it out
<companion_cube>
(there's also threads involved)
freusque has joined #ocaml
<companion_cube>
hum, setting o=200 in the GC does fix the issue… that's worrying
dhil has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
KeyJoo has quit [Ping timeout: 250 seconds]
ziyourenxiang_ has quit [Ping timeout: 246 seconds]
unyu has quit [Ping timeout: 257 seconds]
AnAverageHuman has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 258 seconds]
unyu has joined #ocaml
<Leonidas>
octachron: that doesn't seem to do anything. When I run it it compiles fine but then then I use my ppx it says "uninterpreted extension %e"
jbrown has joined #ocaml
<Leonidas>
[%stri let [%e _generator_name] = fun () -> ()] (if I use generator_name the compiler complains about unused values which signals that something funky is going on)
<Drup>
Leonidas: that's a pattern, you should use %p
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
<Leonidas>
Drup: interesting, that works. So if I use the wrong escape it just escapes down to the generated code?
<Drup>
yeah :/
<Drup>
honestly, it's not a very good design decision, we should change that
pera has joined #ocaml
<Leonidas>
I kinda wished it would tell me that whatever I am trying to insert there is not what belongs there, but I don't know if it can tell me what it would expect in that position.
<Drup>
honestly, we don't even need to have two different ones.
<Drup>
[%str ] is to create a structure, [%pat ] is to create a pattern
ygrek has joined #ocaml
<Leonidas>
Drup: yes, I get that, I use [%stri] and that is easy to understand since it essentially takes ocaml code, but I don't know what to pass to [%pat]
<Drup>
well, a pattern
<Drup>
[%pat? Foo | Bar ]
<Leonidas>
I tried [%pat foo] expecting it to get a pattern
<Drup>
You need the question mark.
<Leonidas>
what does that do?
<Drup>
It's a ppx rule. When you want the payload to be a pattern, you need to specifiy that by using the question mark
<Leonidas>
Ah, I was already confused by [%type: int]
<Leonidas>
I think metaquot is incredibly cool and the fact that it is less than 200 loc is really impressive but oh boy I wish it had some documentation.
pera has quit [Ping timeout: 255 seconds]
<Drup>
I agree
hdon has joined #ocaml
Serpent7776 has joined #ocaml
assemblyman has joined #ocaml
pera has joined #ocaml
jbrown has quit [Remote host closed the connection]
assemblyman has quit [Quit: ™]
jbrown has joined #ocaml
ravenousmoose has joined #ocaml
waleee has quit [Quit: WeeChat 2.4]
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
ravenousmoose has quit [Ping timeout: 258 seconds]
assemblyman has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
gravicappa has quit [Ping timeout: 250 seconds]
dhil has quit [Ping timeout: 250 seconds]
sapristi has joined #ocaml
SpiceGuid has joined #ocaml
themsay has quit [Ping timeout: 250 seconds]
assemblyman has quit [Quit: ™]
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
dhil has joined #ocaml
SpiceGuid has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.49.4/20180713174829]]
ravenousmoose has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
webshinra has quit [Read error: Connection reset by peer]
webshinra has joined #ocaml
dhil has quit [Ping timeout: 246 seconds]
ggole has quit [Quit: Leaving]
assemblyman has joined #ocaml
tane has quit [Quit: Leaving]
ygrek has joined #ocaml
ygrek_ has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
spew has quit [Quit: going home]
assemblyman has quit [Quit: ™]
assemblyman has joined #ocaml
ravenousmoose has quit [Ping timeout: 264 seconds]
orbifx has joined #ocaml
crowley95 has quit [Ping timeout: 245 seconds]
crowley95 has joined #ocaml
Denommus has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
asymptotically has quit [Quit: Leaving]
Serpent7776 has quit [Quit: leaving]
orbifx has quit [Ping timeout: 245 seconds]
<sapristi>
hello
<sapristi>
does anyone know how I could easily simulate a destructor in ocaml ?
<sapristi>
i would like to have files opened during a program execution, and have them cleanly closed when the program exits
pera has quit [Read error: Connection reset by peer]
bartholin has quit [Remote host closed the connection]