companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
ursa-major has quit [Ping timeout: 248 seconds]
ursa-major has joined #ocaml
<discocaml> <froyo> Terence: the channel is likely closed from undrenath your feet
<discocaml> <froyo> oh already mentioned
<discocaml> <_terence_> Yup , but I still appreciate your help !
<companion_cube> Another little rant: the channels are full of global state, iirc there's a list or hashmap of all of them so that the program can close them at exit 😨
count3rmeasure has joined #ocaml
xmachina has quit [Quit: WeeChat 4.0.4]
John_Ivan has quit [Ping timeout: 260 seconds]
azimut has joined #ocaml
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mima has quit [Ping timeout: 248 seconds]
waleee has quit [Ping timeout: 244 seconds]
chrisz has quit [Ping timeout: 246 seconds]
chrisz has joined #ocaml
amk has quit [Ping timeout: 258 seconds]
amk has joined #ocaml
<discocaml> <hockletock> olpppppppppp
<discocaml> <hockletock> sorry, cat
bartholin has joined #ocaml
count3rmeasure has quit [Quit: Leaving]
waleee has joined #ocaml
bartholin has quit [Quit: Leaving]
bobo has joined #ocaml
hrberg_ has joined #ocaml
masterbu1lder has joined #ocaml
kitzman_ has joined #ocaml
masterbuilder has quit [*.net *.split]
spip has quit [*.net *.split]
hrberg has quit [*.net *.split]
kitzman has quit [*.net *.split]
waleee has quit [Quit: updating]
xd1le has joined #ocaml
Serpent7776 has joined #ocaml
mima has joined #ocaml
mima has quit [Ping timeout: 250 seconds]
mima has joined #ocaml
szkl has joined #ocaml
justache is now known as reddit-bot
reddit-bot is now known as justache
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
mima has quit [Ping timeout: 240 seconds]
dnh has joined #ocaml
mima has joined #ocaml
<discocaml> <fham_> If I want to print something in the happy and the error case, do I need to use both `Printf.printf` and `Printf.eprintf` with the same format string?
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mima has quit [Ping timeout: 260 seconds]
dnh has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<discocaml> <octachron> If you want to print the same contents in both branch, you can use `fprintf (if happy the stdout else stderr) ...` but printing the same contents on either `stdout` or `stderr` sounds like a strange occurence.
infinity0 has quit [Remote host closed the connection]
<discocaml> <froyo> you can write the format string once (prepended with format_of_string identity to let the compiler know) and supply it to either function too
infinity0 has joined #ocaml
szkl has quit [Quit: Connection closed for inactivity]
dnh has joined #ocaml
Anarchos has joined #ocaml
amk has quit [Ping timeout: 250 seconds]
amk has joined #ocaml
<discocaml> <fham_> Maybe my program is structured the wrong way, but I have a verbose mode that prints out every file that is currently processed, which should also work if there is an error.
<discocaml> <octachron> Why change your logging to stderr if there was an unrelated error ?
<discocaml> <fham_> Because otherwise I only see the error, and not the files that were processed before.
<discocaml> <octachron> Why would you not see what you are logging on stdout in case of an error?
<discocaml> <octachron> ?
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml> <fham_> Maybe there is also something misconfigured and I should see an output with this line
<discocaml> <fham_>
<discocaml> <fham_> ```ocaml
<discocaml> <fham_> if verbose then Printf.printf "Processing file: %s\n" path;
<discocaml> <fham_> ```
<discocaml> <fham_> but I only see something with `eprintf` and afterwards the unrelated error comes.
<discocaml> <octachron> You should flush the channel with `%!`
<discocaml> <fham_> I figured, but it doesn't change the log output
<discocaml> <fham_> Oh.
<discocaml> <fham_> I should have not called it with a node script.
<discocaml> <fham_> it piped stdout directly into my files, oops
<discocaml> <fham_> Yes, I will gladly only use eprintf then, thank you anyway.
Tuplanolla has joined #ocaml
dhil has joined #ocaml
gareppa has joined #ocaml
dhil has quit [Ping timeout: 248 seconds]
mima has joined #ocaml
gareppa has quit [Quit: WeeChat 3.8]
John_Ivan has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
ursa-major has quit [Quit: WeeChat 4.0.4]
bartholin has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Serpent7776 has quit [Ping timeout: 244 seconds]
jusensei2 has quit [Quit: The Lounge - https://thelounge.chat]
jusensei2 has joined #ocaml
jusensei2 has quit [Client Quit]
jusensei2 has joined #ocaml
rgrinberg has joined #ocaml
dhil has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
landonf has quit [Server closed connection]
landonf has joined #ocaml
dhil has quit [Ping timeout: 255 seconds]
<discocaml> <geoff> Oh the Oxidizing OCaml series finally got it's third part and was posted to discuss
Serpent7776 has joined #ocaml
<companion_cube> is there no way to take a virtual class C, and say (in a .mli) "this class inherits C but is entirely concrete"?
<octachron> For methods, you can go in the reverse direction with a constraint on 'self: `class virtual v: object('self) constraint 'self = #concrete end`
<companion_cube> hmm what I want is to succintly say "this concrete class inherits this virtual class"
<companion_cube> seems like the constraint doesn't work :/
<companion_cube> ("this non-virtual class type has undeclared virtual methods […]"
<companion_cube> )
<octachron> Indeed, the more natural direction doesn't work without someone explicitly defining a concrete method as far as can see.
<companion_cube> yeah I have to copy the signature of every method :(
waleee has joined #ocaml
azimut has quit [Ping timeout: 246 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
Serpent7776 has quit [Ping timeout: 246 seconds]
mima has quit [Ping timeout: 246 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bartholin has quit [Quit: Leaving]
<discocaml> <aramya> Hey everyone :)
<discocaml> <aramya> Is there an easy way to use the ``mmap`` UNIX function, and then to jump on the allocated chunk (which would have been declared as executable)?
<companion_cube> I really doubt it, for the second part
conjunctive has quit [Server closed connection]
conjunctive has joined #ocaml
<discocaml> <Et7f3 (@me on reply)> This probably better handled in C so just write a small stub
Tuplanolla has quit [Quit: Leaving.]
ec has joined #ocaml