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
zebrag has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
inkbottle has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
aaaaaa has joined #ocaml
malc_ has quit [Ping timeout: 272 seconds]
malc_ has joined #ocaml
bitmapper has quit [Ping timeout: 264 seconds]
_whitelogger has joined #ocaml
aaaaaa has quit [Quit: leaving]
dhil has quit [Ping timeout: 256 seconds]
inkbottle has joined #ocaml
zebrag has quit [Ping timeout: 256 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
zv has quit [Ping timeout: 260 seconds]
narimiran has joined #ocaml
mbuf has joined #ocaml
inkbottle has quit [Quit: Konversation terminated!]
osa1 has joined #ocaml
osa1 has quit [Remote host closed the connection]
osa1 has joined #ocaml
tsmc_ has quit [Quit: Connection closed for inactivity]
Haudegen has joined #ocaml
ScriptDevil has joined #ocaml
<ScriptDevil> Can someone explain why `|>` doesn't work with partially applied named functions? https://gist.github.com/ScriptDevil/1baf46c1b784c0c1822af62059091631
ollehar has quit [Ping timeout: 256 seconds]
ollehar has joined #ocaml
dckc has quit [Ping timeout: 256 seconds]
dckc has joined #ocaml
<malc_> ScriptDevil: i don't but Jacques Garrigue usually quite accommodating, you can ask him directly
<malc_> +is
<octachron> ScriptDevil, because labels are mandatory in general, and they can only be omitted with a full syntaxic application. In `x |> f`, `f` is not applied to anything.
copy has quit [Ping timeout: 264 seconds]
jbrown has joined #ocaml
malc_ has quit [Ping timeout: 272 seconds]
porchetta has quit [Ping timeout: 240 seconds]
porchetta has joined #ocaml
olle has joined #ocaml
<ScriptDevil> octachron: I was confused because I thought |> was defined as `let (|>) x f = f x`. So I thought `let named_tuple_appl = partialnamedf 42;;` and `let named_tuple_pipe = 42 |> partialnamedf;;` should be identical in behavior
<octachron> `|>` is defined as you say. But labelled application and non labelled application are not the same.
<octachron> In let (|>) x f = f x, `f` is not labelled.
<ScriptDevil> Is there any way I can make that work with a pipeline? Would for instance `42 |> (fun x -> partialnamedf ~name2:x)` be the right way to go about this?
<ScriptDevil> As an OCaml beginner, I proliferated named args in a lot of my functions. This particular function is somewhree in the middle of a long series of `|>` connected expressions
<ScriptDevil> I didn't realize named to unnamed casting was a little limited.
<octachron> Using a lambda should work
<ScriptDevil> Thanks. Also, is this by design or a current compiler limitation? Is there utility to getting in touch with Jacques Garrigue as malc_ suggested??
<octachron> It is by design.
<octachron> Label elision is just a small convenience shortcut that works in a limited niche
<ScriptDevil> Ok, I found a line that does backup what you say in the manul https://caml.inria.fr/pub/docs/manual-ocaml/lablexamples.html When a function is passed as an argument to a higher-order function, labels must match in both types. Neither adding nor removing labels are allowed.
<ScriptDevil> Thank you for your time.
<def> ScriptDevil: JaneStreet had a ppx rewriter that turned "x |> f" into "f x" syntactically (or (fun v -> f v) x, I don't recall exactly) such that you have label elision also when using
<def> |>
<ScriptDevil> Interesting! For future reference: https://github.com/janestreet/ppx_pipebang
waleee-cl has joined #ocaml
_whitelogger has joined #ocaml
dhil has joined #ocaml
osa1 has quit [Remote host closed the connection]
osa1 has joined #ocaml
ScriptDevil has quit [Remote host closed the connection]
sagax has quit [Quit: Konversation terminated!]
sagax has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
_whitelogger has joined #ocaml
vicfred_ has joined #ocaml
vicfred has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
octachron has quit [Read error: Connection reset by peer]
octachron_ has joined #ocaml
malc_ has joined #ocaml
brown121407 has joined #ocaml
malc_ has quit [Remote host closed the connection]
malc_ has joined #ocaml
dhil has quit [Ping timeout: 256 seconds]
ggole has joined #ocaml
copy has joined #ocaml
smondet[m] has joined #ocaml
dhil has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
jco has joined #ocaml
<jco> hi! given a list of 4 elements, is there a concise way to extract these and put in variables?
<jco> i was thinking of pattern matching it, like match s with a :: b :: c -> (a, b, c) | _ -> Error ""
<companion_cube> yeah, that's a clean way
<companion_cube> `match s with [a;b;c;d] -> … | _ -> Error "ohno"`
<jco> oh yeah, a::b::c::[]
<jco> good then, thank you :)
vicfred_ has quit [Quit: Leaving]
vicfred has joined #ocaml
<mbuf> What package needs to be installed to get ocaml-print-intf utility?
<d_bot> <craigfe> Conveniently enough, the `ocaml-print-intf` package 🙂
<mbuf> thanks!
dckc has quit [Ping timeout: 256 seconds]
dckc has joined #ocaml
jco has quit [Ping timeout: 272 seconds]
malc_ has quit [Ping timeout: 256 seconds]
narimiran has quit [Ping timeout: 256 seconds]
osa1 has quit [Ping timeout: 246 seconds]
waleee-cl has joined #ocaml
dhil has quit [Ping timeout: 264 seconds]
h14u has joined #ocaml
zebrag has joined #ocaml
osa1 has joined #ocaml
ggole has quit [Quit: Leaving]
olle has quit [Ping timeout: 272 seconds]
brown121407 has quit [Read error: Connection reset by peer]
malc_ has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
khady[m] has joined #ocaml
osa1 has quit [Ping timeout: 246 seconds]
dhil has joined #ocaml
muskan has joined #ocaml
dhil has quit [Quit: Leaving]
osa1 has joined #ocaml
Haudegen has joined #ocaml
zv has joined #ocaml
tane has joined #ocaml
<mbuf> Never mind. I hit this issue - https://github.com/realworldocaml/book/issues/3214
mbuf has quit [Quit: Leaving]
narimiran has joined #ocaml
osa1 has quit [Ping timeout: 258 seconds]
jco has joined #ocaml
<jco> hum I have issues with lwt
<jco> it looks like commands are executed twice
jco has quit [Quit: WeeChat 2.7]
jco has joined #ocaml
<jco> so basically it looks like the git command is executed twice each time
<jco> raising an error, so the post comment action is not executed
<jco> (the printf of the git command is not the issue, removing yields the same issue)
<jco> the function is sent to Lwt.async also
oriba has joined #ocaml
muskan has left #ocaml [#ocaml]
Hrundi_V_Bakshi has joined #ocaml
osa1 has joined #ocaml
narimiran has quit [Ping timeout: 240 seconds]
jco has quit [Ping timeout: 256 seconds]
jco has joined #ocaml
silver has joined #ocaml
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
averell- has joined #ocaml
averell has quit [Ping timeout: 258 seconds]
averell- is now known as averell
inkbottle has joined #ocaml
zebrag has quit [Ping timeout: 265 seconds]
jco has quit [Quit: WeeChat 2.7]
tane has quit [Quit: Leaving]
infinity0 has quit [Ping timeout: 260 seconds]
infinity0 has joined #ocaml
malc_ has quit [Ping timeout: 240 seconds]
malc_ has joined #ocaml
silver has quit [Read error: Connection reset by peer]
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
towel has quit [Quit: ZNC - https://znc.in]
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
towel has joined #ocaml
osa1 has quit [Ping timeout: 264 seconds]
Hrundi_V_Bakshi has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 272 seconds]
_whitelogger has joined #ocaml