adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
chripell_ has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
ollehar has joined #ocaml
chripell has quit [Ping timeout: 260 seconds]
jbrown has quit [Ping timeout: 272 seconds]
jbrown has joined #ocaml
vicfred_ has joined #ocaml
vicfred has quit [Ping timeout: 240 seconds]
Tekk_ has joined #ocaml
<Tekk_> Is it possible to derive show on multiple types in a module? I've got a couple of mutually recursive types which would be nice to pretty print and (afaik?) there's no way to have mutually recursive types in different modules.
<Tekk_> nvm, it just handles it.
malc_ has joined #ocaml
inkbottle has joined #ocaml
zebrag has quit [Read error: Connection reset by peer]
dborisog has joined #ocaml
sagax has quit [Remote host closed the connection]
waleee-cl has quit [Quit: Connection closed for inactivity]
sagax has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
mbuf has joined #ocaml
malc_ has quit [Ping timeout: 240 seconds]
malc_ has joined #ocaml
vicfred_ has quit [Quit: Leaving]
inkbottle has quit [Read error: Connection reset by peer]
inkbottle has joined #ocaml
shmibs has quit [Quit: leaving =o]
nullcone has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
narimiran has joined #ocaml
mbuf has quit [Ping timeout: 246 seconds]
osa1 has joined #ocaml
mbuf has joined #ocaml
sarna has joined #ocaml
waleee-cl has joined #ocaml
terrorjack has quit [Ping timeout: 244 seconds]
terrorjack has joined #ocaml
def has quit [Remote host closed the connection]
def has joined #ocaml
Haudegen has joined #ocaml
sarna has quit [Quit: Connection closed]
sarna has joined #ocaml
dckc has quit [Ping timeout: 260 seconds]
dckc has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
ipavlo has quit [Read error: Connection reset by peer]
rfv has quit [Ping timeout: 272 seconds]
ipavlo has joined #ocaml
rfv has joined #ocaml
stephe has quit [Ping timeout: 260 seconds]
stephe has joined #ocaml
<mbuf> Where and how are the arguments passed to the "build" step mentioned in an opam file? For example, where is "name" and "jobs" passed to in the build steps here https://github.com/ocaml/opam-repository/blob/master/packages/eqaf/eqaf.0.7/opam
olle has joined #ocaml
sarna has quit [Ping timeout: 272 seconds]
olle_ has joined #ocaml
malc_ has quit [Remote host closed the connection]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shmibs has joined #ocaml
gahr has quit [Remote host closed the connection]
gahr has joined #ocaml
sarna has joined #ocaml
rockethead has joined #ocaml
rockethead has quit [Client Quit]
nullcone has quit [Quit: Connection closed for inactivity]
waleee-cl has quit [Quit: Connection closed for inactivity]
sarna has quit [Ping timeout: 246 seconds]
<Leonidas> hmm, is it expected that dune does not update opam files on `dune build @all`?
<zozozo> Leonidas: it might only be build with dune build @install ?
malc_ has joined #ocaml
<Leonidas> Yes, that seems to be the case
<Leonidas> Unfortunately the docs don't state which @target specifically writes opam files
<zozozo> yeah, the one thing that annoys me with dune is I can never understand how the targets work (as in how to build a particular executable for instance)
sagax has quit [Remote host closed the connection]
<Fardale> zozozo: for a particular executable: dune build path/to/main/module.exe
malc_ has left #ocaml ["ERC (IRC client for Emacs 28.0.50)"]
<Leonidas> Fardale: In theory I know that, but in practice I find it easy to forget, especially the `.exe` part requires me to know how dune will name the targets.
brown121407 has joined #ocaml
<Leonidas> given `.exe` is not a common file extension on unix to begin with
<Fardale> I agree, it took me some time to get use to it
<Fardale> Then you add the public executable or not and it get really hard
<zozozo> I also always forget the leading ./ when the target is in the current dir
jco has joined #ocaml
kleisli_ has quit [Ping timeout: 246 seconds]
vicfred has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
<jco> Hello!
<jco> so tge quick fix to conform to the new lwt.async signature breaks the server
<jco> that is we used the old ltw.async signature which was (unit -> 'a Lwt.t) -> unit
<jco> which became (unit -> unit Lwt.t) -> unit
<jco> so i append |> fun _ -> Lwt.return () to the functions given to async, so that they get the good signature: unit -> unit Lwt.t
<jco> but it looks like our server is blocked, as if the promises which evaluated to errors aren't ignored
<Fardale> What did this breaks?
<jco> the server doesn't respond to client requests
<jco> it doesn't print any error
<jco> (we set Lwt.async_exception_hook to print unhandled errors)
<Fardale> What do you do in the async function?
<Leonidas> jco: you should probably use `>>= fun _ -> Lwt.return ()` instead
<jco> we send answers to the clients
<jco> oh yeah
<Leonidas> since you want to bind on that 'a promise and replace it with a unit promise
<jco> because we're manipulating promises
<jco> right
<Fardale> oh right I did not catch this
<jco> ahh that's bad
waleee-cl has joined #ocaml
<Leonidas> Personally I am somewhat concerned about stuff that's just Lwt.async'd away
<jco> yeah, but the promises are just the results of server requests
<jco> thanks for the catch
<Leonidas> and the server does not want to have the result? why would the result be a `unit`?
<jco> i agree that if there are errors, then connectivity is really bad, and the server should shut down
<Leonidas> I would expect a handler to be Request.t -> Response.t Lwt.t or something like that.
Haudegen has quit [Quit: Bin weg.]
dckc has quit [Ping timeout: 272 seconds]
dckc has joined #ocaml
govg has joined #ocaml
Anarchos has joined #ocaml
<jco> Leonidas: the answers are wrapped in tuples of primitive types that store the relevant info, which we then analyse
<jco> but async requires a function which yields a unit Lwt.t
<Leonidas> so, did my solution fix your issue?
<jco> yes, thank you :)
<jco> the fix i had simply "dropped" the promises
<jco> i was relying to much on ocaml type checker ^^
<Leonidas> yeah, that's sort of the problem with the type system that it won't warn you on such things
<Leonidas> in the case of Lwt it might actually work some of the time since the promises are evaluated eagerly
<Leonidas> so dropping them might work just fine since they are already resolved
narimiran has quit [Ping timeout: 258 seconds]
govg has quit [Quit: leaving]
<jco> yeah, except they were not evaluated yet to block the server like that :)
govg has joined #ocaml
sarna has joined #ocaml
govg has quit [Client Quit]
<sarna> hey, how do I create credentials with cohttp? I'm here https://mirage.github.io/ocaml-cohttp/cohttp/Cohttp/Auth/index.html#type-credential , but I can't find a function that would just take an username and a password and give me basic auth back
<sarna> I've tried ``Basic ("username", "password")` but that's not it, it seems like
govg has joined #ocaml
Haudegen has joined #ocaml
<sarna> okay lol it worked, I typo'd and had `Header.add_authorization_req` instead of `add_authorization` :)
inkbottle has quit [Ping timeout: 246 seconds]
zebrag has joined #ocaml
<sarna> is there something like `read_line` that wouldn't print what's being written? I want the user to enter their password
muskan has joined #ocaml
<companion_cube> I think you need to change the terminal mode
<sarna> with escape codes?
<companion_cube> yeah, or a library that would do that (not sure which one)
<sarna> thanks, I'll try to find something
<sarna> or brew something on my own :)
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
sarna has quit [Ping timeout: 258 seconds]
sagax has joined #ocaml
<flux1> oh I guess sarna left already
<companion_cube> oh I forgot unix had that internally
osa1 has quit [Ping timeout: 246 seconds]
rak has quit [Quit: reboot]
KeyJoo has joined #ocaml
rak has joined #ocaml
olle_ has quit [Ping timeout: 260 seconds]
olle has quit [Ping timeout: 272 seconds]
tane has joined #ocaml
osa1 has joined #ocaml
jeroud_ has joined #ocaml
wildsebastian_ has joined #ocaml
ksft_ has joined #ocaml
muskan has quit [Remote host closed the connection]
wildsebastian has quit [*.net *.split]
bytesighs has quit [*.net *.split]
jeroud has quit [*.net *.split]
rdivyanshu_ has quit [*.net *.split]
adi_________ has quit [*.net *.split]
flux1 has quit [*.net *.split]
ksft has quit [*.net *.split]
jimt[m] has quit [*.net *.split]
lnxw37d4 has quit [*.net *.split]
jeroud_ is now known as jeroud
wildsebastian_ is now known as wildsebastian
stan[m] has quit [Remote host closed the connection]
swapnilraj[m] has quit [Read error: Connection reset by peer]
sepp2k has quit [Remote host closed the connection]
camlriot42 has quit [Read error: Connection reset by peer]
aspiwack[m] has quit [Read error: Connection reset by peer]
lubegasimon[m] has quit [Remote host closed the connection]
bglm[m] has quit [Remote host closed the connection]
prsafont[m] has quit [Read error: Connection reset by peer]
cgenie[m] has quit [Read error: Connection reset by peer]
aecepoglu[m] has quit [Read error: Connection reset by peer]
Manis[m] has quit [Read error: Connection reset by peer]
damienkrine[m] has quit [Remote host closed the connection]
foocraft[m] has quit [Write error: Connection reset by peer]
dash has quit [Read error: Connection reset by peer]
peddie has quit [Write error: Connection reset by peer]
labor[m] has quit [Read error: Connection reset by peer]
bytesighs has joined #ocaml
adi_________ has joined #ocaml
rdivyanshu_ has joined #ocaml
osa1 has quit [Remote host closed the connection]
aecepoglu[m] has joined #ocaml
camlriot42 has joined #ocaml
dash has joined #ocaml
bglm[m] has joined #ocaml
flux has joined #ocaml
peddie has joined #ocaml
aspiwack[m] has joined #ocaml
jimt[m] has joined #ocaml
labor[m] has joined #ocaml
prsafont[m] has joined #ocaml
Manis[m] has joined #ocaml
lnxw37d4 has joined #ocaml
stan[m] has joined #ocaml
foocraft[m] has joined #ocaml
sepp2k has joined #ocaml
cgenie[m] has joined #ocaml
swapnilraj[m] has joined #ocaml
lubegasimon[m] has joined #ocaml
damienkrine[m] has joined #ocaml
KeyJoo has quit [Quit: KeyJoo]
kleisli_ has joined #ocaml
jnavila has joined #ocaml
jnavila has quit [Remote host closed the connection]
jnavila has joined #ocaml
narimiran has joined #ocaml
nullcone has joined #ocaml
dborisog has quit [Ping timeout: 272 seconds]
porchetta has joined #ocaml
mbuf has quit [Quit: Leaving]
kleisli_ has quit [Ping timeout: 260 seconds]
<ollehar> if you guys happen to be interested, a blog post about ownership in PHP: http://olleharstedt.github.io/php/2020/07/08/immutable-at-borrow.html
sarna has joined #ocaml
<sarna> flux: thanks for the link! saw it on the discord bridge :)
sarna has quit [Remote host closed the connection]
infinity0 has quit [Ping timeout: 246 seconds]
infinity0 has joined #ocaml
brown121407 has quit [Remote host closed the connection]
jnavila has quit [Quit: Konversation terminated!]
narimiran has quit [Ping timeout: 240 seconds]
jco has quit [Quit: WeeChat 2.7]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
kleisli has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
Serpent7776 has quit [Quit: leaving]
oturtle has quit [Ping timeout: 260 seconds]
tane has quit [Quit: Leaving]
Jesin has quit [Quit: Leaving]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
Jesin has joined #ocaml
ksft_ is now known as ksft
Haudegen has quit [Quit: Bin weg.]
kleisli has quit [Ping timeout: 244 seconds]
kvda has joined #ocaml