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/
amk has joined #ocaml
wingsorc has quit [Read error: Connection reset by peer]
wingsorc__ has joined #ocaml
MarvelousWololo has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 246 seconds]
ursa-major has joined #ocaml
micro has quit [Ping timeout: 258 seconds]
micro has joined #ocaml
chrisz has quit [Ping timeout: 245 seconds]
chrisz has joined #ocaml
mima has quit [Ping timeout: 252 seconds]
spip has quit [Quit: Konversation terminated!]
azimut has quit [Read error: Connection reset by peer]
azimut has joined #ocaml
MarvelousWololo has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
bgs has joined #ocaml
Serpent7776 has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
bgs has quit [Remote host closed the connection]
mima has joined #ocaml
anpad has quit [Quit: ZNC 1.8.2 - https://znc.in]
anpad has joined #ocaml
bartholin has joined #ocaml
spip has joined #ocaml
MarvelousWololo has quit [Read error: Connection reset by peer]
Anarchos has joined #ocaml
wingsorc__ has quit [Ping timeout: 246 seconds]
Anarchos has quit [Read error: Connection reset by peer]
mima has quit [Ping timeout: 252 seconds]
Anarchos has joined #ocaml
azimut has joined #ocaml
MuqiuHan[m] has quit [Read error: Connection reset by peer]
reynir[m] has quit [Remote host closed the connection]
mclovin has quit [Remote host closed the connection]
jmcantrell has quit [Read error: Connection reset by peer]
zebrag[m] has quit [Remote host closed the connection]
lobo[m] has quit [Remote host closed the connection]
Anarchos has quit [Ping timeout: 246 seconds]
mclovin has joined #ocaml
waleee has joined #ocaml
Anarchos has joined #ocaml
Anarchos has quit [Read error: Connection reset by peer]
bgs has joined #ocaml
waleee has quit [Ping timeout: 246 seconds]
MarvelousWololo has joined #ocaml
bgs has quit [Remote host closed the connection]
Anarchos has joined #ocaml
mima has joined #ocaml
troydm has quit [Ping timeout: 246 seconds]
<discocaml> <xavierm02_> Is there a common name for the function `fun f x -> ignore (f x); x`?
lobo[m] has joined #ocaml
reynir[m] has joined #ocaml
zebrag[m] has joined #ocaml
jmcantrell has joined #ocaml
MuqiuHan[m] has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml> <masterbuilder> I was just wondering this myself earlier
<discocaml> <deepspacejohn> I’ve seen that called `tap`
<discocaml> <xavierm02_> Ah nice. Thank you!
<discocaml> <masterbuilder> Nice
<discocaml> <masterbuilder> I was trying to find something like that in containers, didn't look in there
<discocaml> <masterbuilder> I was trying to find a function that does that on a container, i.e. instead of `map (tap ...) ...` something that does it directly
<companion_cube> tap (Foo.iter …) ?
<discocaml> <masterbuilder> huh, does that work? that idea didn't occur to me
<companion_cube> currying :)
<companion_cube> `[1;2;3] |> CCFun.tap (List.iter (Printf.printf "hello %d\n"))`
<discocaml> <masterbuilder> not sure which I prefer
<discocaml> <masterbuilder> I think that might be cleaner
<companion_cube> it's better than `map` because it doesn't allocate a new list
<discocaml> <masterbuilder> yeah, I like it
<discocaml> <masterbuilder> good stuff ^^
Serpent7776 has quit [Ping timeout: 245 seconds]
bartholin has quit [Quit: Leaving]
waleee has joined #ocaml
mima has quit [Ping timeout: 240 seconds]
Tuplanolla has joined #ocaml
ursa-major has quit [Ping timeout: 245 seconds]
ursa-major has joined #ocaml
tom1212 has joined #ocaml
tom1212 has left #ocaml [#ocaml]
bartholin has joined #ocaml
Anarchos has joined #ocaml
mechap has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
tom1212 has joined #ocaml
<tom1212> hi! is it possible to refer to a module type inner module?
<tom1212> the dot notation doesn't seem to work
<discocaml> <froyo> i love tap
<discocaml> <froyo> wish it was in stdlib
<discocaml> <froyo> such a cute function
<tom1212> ah managed to do something equivalent with module types and functor signature constraints
<discocaml> <._null._> tom1212: it should
<tom1212> hmm
<discocaml> <._null._> Why does it ignore the return value ? I could see it if it expected a function returning unit
<tom1212> module types are not modules is the error I get
<discocaml> <._null._> That is true
<discocaml> <._null._> What are you trying to do ?
<discocaml> <froyo> NULL: `tap: ('a -> unit) -> 'a -> 'a`
<discocaml> <._null._> I would get behind that more than I would containers' `('a -> 'b) -> 'a -> 'a`
<tom1212> mb it works
<discocaml> <froyo> oh containers is polymorphic on return? probs more flexible like that tbh.
<discocaml> <froyo> i consider it useful in logging and mutations in a pipeline
<discocaml> <froyo> i dont see a downside to it being polymorphic on return.. maybe it can be a tiny footgun
<discocaml> <froyo> would be nice to not have to worry about side-effectful functions that e.g. return an int
<discocaml> <froyo> like unix stuff
<discocaml> <._null._> If it does, ignore it yourself
<discocaml> <froyo> might as well just write the lambda instead of using the combinator :P
bartholin has quit [Quit: Leaving]
szkl has joined #ocaml
<tom1212> damn you can express relations between modules using functors
wingsorc__ has joined #ocaml
tom1212 has quit [Remote host closed the connection]
reynir[m] has quit [Ping timeout: 245 seconds]
kaptch has joined #ocaml
kaptch has quit [Client Quit]
MuqiuHan[m] has quit [Ping timeout: 245 seconds]
jmcantrell has quit [Ping timeout: 245 seconds]
zebrag[m] has quit [Ping timeout: 246 seconds]
lobo[m] has quit [Ping timeout: 246 seconds]
mclovin has quit [Ping timeout: 246 seconds]
mima has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
mechap has quit [Quit: WeeChat 4.0.2]
waleee has quit [Ping timeout: 260 seconds]