l1x has quit [Quit: Connection closed for inactivity]
mxns has quit [Ping timeout: 264 seconds]
mxns has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
mxns has quit [Ping timeout: 272 seconds]
smazga has quit [Ping timeout: 264 seconds]
Tuplanolla has quit [Quit: Leaving.]
smazga has joined #ocaml
smazga has quit [Ping timeout: 264 seconds]
borne has quit [Ping timeout: 260 seconds]
steenuil has quit [Read error: Connection reset by peer]
smazga has joined #ocaml
djellemah has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
djellemah has quit [Client Quit]
xenu_ has joined #ocaml
xenu has quit [Read error: Connection reset by peer]
smazga has joined #ocaml
smazga has quit [Ping timeout: 265 seconds]
smazga has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
mfp has quit [Ping timeout: 256 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
smazga has quit [Ping timeout: 264 seconds]
dborisog has joined #ocaml
narimiran has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 272 seconds]
decentpenguin has quit [Read error: Connection reset by peer]
decentpenguin has joined #ocaml
Serpent7776 has joined #ocaml
vicfred has quit [Quit: Leaving]
chripell has quit [Remote host closed the connection]
chripell has joined #ocaml
amiloradovsky has joined #ocaml
shawnw has joined #ocaml
<d_bot>
<ELLIOTTCABLE> Anybody know why I might be having trouble building 4.02.3 on macOS? I'm trying to pick back up a project that's languished for a year or so; I have an opam-lockfile with all my dependencies, but I'm having trouble replicating my configuration in 2021, lol.
<d_bot>
<ELLIOTTCABLE> Getting `Fatal error: exception Invalid_argument("inet_addr_of_string not implemented")`; full log: https://asciinema.org/a/384460
Haudegen has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
<vsiles>
macos changed glibc (or gcc, can't remember exactly) and some default flags changed. You probably are hitting such a case
<vsiles>
no clue how to fix this
smazga has joined #ocaml
bartholin has joined #ocaml
smazga has quit [Ping timeout: 264 seconds]
borne has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
Tuplanolla has joined #ocaml
steenuil has joined #ocaml
madroach has joined #ocaml
olle has joined #ocaml
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
borne has quit [Ping timeout: 264 seconds]
smazga has joined #ocaml
Serpent7776 has quit [Ping timeout: 260 seconds]
smazga has quit [Ping timeout: 256 seconds]
jbrown has quit [Quit: Leaving]
borne has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
Serpent7776 has joined #ocaml
ArthurStrong has joined #ocaml
shawnw has quit [Read error: Connection reset by peer]
shawnw has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 265 seconds]
smazga has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
jbrown has joined #ocaml
smazga has joined #ocaml
xenu_ is now known as xenu
smazga has quit [Ping timeout: 240 seconds]
smazga has joined #ocaml
smazga has quit [Ping timeout: 260 seconds]
smazga has joined #ocaml
mfp has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
nullcone has quit [Quit: Connection closed for inactivity]
Haudegen has quit [Quit: Bin weg.]
smazga has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
zebrag has joined #ocaml
shawnw has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
waleee-cl has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 246 seconds]
smazga has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
smazga has joined #ocaml
steenuil has quit [Read error: Connection reset by peer]
steenuil has joined #ocaml
neiluj has joined #ocaml
neiluj has joined #ocaml
mxns has joined #ocaml
smazga has quit [Ping timeout: 256 seconds]
<neiluj>
hi! there's something wrong with my dune file I suspect: this runs fine in utop: https://tpaste.us/8jLy
<neiluj>
but when i compile with dune this program prints nothing
<companion_cube>
you need Lwt_main.run
<companion_cube>
utop does it for you, but not a normal program
<neiluj>
ah!!! many thanks!!!
<companion_cube>
(might need to link with lwt.unix iirc)
<neiluj>
yeah did it :)
<neiluj>
works fine!
<companion_cube>
✔
brian__ has joined #ocaml
tane has quit [Remote host closed the connection]
tane has joined #ocaml
smazga has joined #ocaml
hnOsmium0001 has joined #ocaml
borne has quit [Ping timeout: 264 seconds]
sm2n_ has joined #ocaml
sm2n has quit [Read error: Connection reset by peer]
schlaftier has quit [Read error: Connection reset by peer]
<neiluj>
openfile gives a file descriptor to an existing file, but don't create a new one if it doesn't exist
Haudegen has quit [Quit: Bin weg.]
zebrag has quit [Quit: Konversation terminated!]
<neiluj>
nevrmind, found open_file
<d_bot>
<stab> Lol this is such a strange bug.... somehow two different commands are getting run. Like i have my parser parsing the arguments then infer is running it's own command off of the command line args... I think it has something to do with the logging module
<neiluj>
is this function ok (it works just fine)? https://tpaste.us/PKb1. Looks a bit complicated
nullcone has joined #ocaml
<d_bot>
<stab> that looks off to me
<d_bot>
<stab> i guess it depends on what you want the function to do
<neiluj>
just write on a new file
<d_bot>
<stab> But to be clear this function is going to write to the file and block on that then close the file i believe
<neiluj>
yes, fine with that
zebrag has joined #ocaml
<reynir>
does that type check?
<d_bot>
<stab> eh seems to me you want more want the close to be part of the write promise ie. using >>> to have the close run upon the end of the write
<neiluj>
reynir: it does, and runs as expected
<d_bot>
<stab> ive only used async tho and not Lwt but that feels much more like what you mean
<neiluj>
stab: yeah, but fprintf does not return the file stream
<reynir>
Ah I see, the indentation threw me off
zebrag has quit [Client Quit]
<d_bot>
<stab> neiluji: why would that matter?
<d_bot>
<stab> well actually you could just use map no?
<d_bot>
<stab> so basically like do printf then return the out_channel then map close over it?
<d_bot>
<stab> which would create a promise of type unit
<neiluj>
oh yeah
<neiluj>
thanks^^
<reynir>
You return Lwt_result.t but you always return Ok and don't catch any of the exceptions
<reynir>
so I'm thinking you maybe want to catch the exceptions or just return Lwt.t
<reynir>
(can't this code close the file before it's been written to?)
zebrag has joined #ocaml
<d_bot>
<stab> Yeah that's what i was thinking but im not sure if Lwt.async is just the same as run so it would block?
<d_bot>
<stab> not familiar but either way i would think everything should be in one promise
<d_bot>
<stab> Ugh this is infuriating... any code that uses the logging module in infer somehow instantiates the infer command and tries to run it...
Serpent7776 has quit [Ping timeout: 260 seconds]
bartholin has quit [Quit: Leaving]
<theblatte>
@stab: I think it goes deeper than this (although not sure how anything useful actually *runs* unless you load infer.ml itself): anything that ends up initialising the Config module will make infer parse the command line and run some code
<theblatte>
the code is really not organised to be used as a library
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
<neiluj>
oh there's Lwt_list!
<neiluj>
ok, i've identified the problem: the function in question executes an executable, so each promise is blocking
<neiluj>
it works with functions that make some random calculation
<neiluj>
nevermind, found another way to tackle the problem
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
Serpent7776 has quit [Read error: Connection reset by peer]
jnavila_ has quit [Quit: Konversation terminated!]
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
<motherfsck>
I'm new to cohttp and lwt in general. I'm fumbling throught the docs looking for how to have cohttp write the contents of a response to an output channel. I'm more than capable reading documentation, so if anyone could point me in the right direction I'd greatly appreciate it.
<motherfsck>
other relevant info I know how to read and write with LWT, I've been using the `get` for most things without issue so far, but suspect that for downloading arbitrary binary data I may have to switch to `call`
rock64 has quit [Ping timeout: 240 seconds]
rock64 has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
<d_bot>
<hcarty> motherfsck: re: writing a response to an output channel - are you trying to take, for example, a response body from a `GET` and write that to disk/another network connection/etc? The functions in https://mirage.github.io/ocaml-cohttp/cohttp-lwt/Cohttp_lwt/Body/index.html should give what you want in that case. Specifically `to_string` or `to_stream`
<d_bot>
<hcarty> `get` should work for arbitrary binary data. `call` is only necessary in some cases, for example if the callsite doesn't know at compile time which verb to use in a request