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
ollehar has quit [Ping timeout: 240 seconds]
ollehar has joined #ocaml
rig0rmortis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rig0rmortis has joined #ocaml
amiloradovsky has quit [Ping timeout: 260 seconds]
kleisli has quit [Ping timeout: 244 seconds]
Haudegen has quit [Ping timeout: 240 seconds]
daimrod has quit [Ping timeout: 256 seconds]
mfp has quit [Ping timeout: 258 seconds]
mfp has joined #ocaml
mfp has quit [Ping timeout: 256 seconds]
rig0rmortis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rig0rmortis has joined #ocaml
kleisli has joined #ocaml
decentpenguin has joined #ocaml
rig0rmortis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rig0rmortis has joined #ocaml
rig0rmortis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
malc_ has quit [Ping timeout: 272 seconds]
nullcone has quit [Quit: Connection closed for inactivity]
brown121407 has quit [Remote host closed the connection]
brown121407 has joined #ocaml
nullcone has joined #ocaml
malc_ has joined #ocaml
narimiran has joined #ocaml
kleisli_ has joined #ocaml
kleisli has quit [Ping timeout: 244 seconds]
_whitelogger has joined #ocaml
Tuplanolla has joined #ocaml
malc_ has quit [Ping timeout: 246 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
_whitelogger has joined #ocaml
decentpenguin has quit [Read error: Connection reset by peer]
reynir has quit [Ping timeout: 246 seconds]
decentpenguin has joined #ocaml
reynir has joined #ocaml
ggole has joined #ocaml
mbuf has joined #ocaml
narimiran has quit [Ping timeout: 246 seconds]
osa1 has joined #ocaml
bartholin has joined #ocaml
_whitelogger has joined #ocaml
brown121407 has quit [Read error: Connection reset by peer]
malc_ has joined #ocaml
brown121407 has joined #ocaml
brown121407 has quit [Ping timeout: 240 seconds]
brown121407 has joined #ocaml
brown121407 has quit [Remote host closed the connection]
mfp has joined #ocaml
kleisli_ has quit [Ping timeout: 264 seconds]
laokz has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
<laokz> how can understand this: let ($) x y = x * y <br> 2 $ 3 + 2 ==> 10 <br> ($) 2 3 + 2 ==> 8 ?
<d_bot> <Et7f3> `let ($) x y = x * y` we declare operator `$` to be the same has `*`
<d_bot> <Et7f3> so `2 $ 3 + 2` is like `2 * (3 + 2)` because `$` has lower precedence than `+`
<sonologico> but `$` has different precedence, so you get different results for an expression without parens if you just replace `*` with `$`
artart78 has quit [Ping timeout: 244 seconds]
<d_bot> <Et7f3> on the other side it is not a operator but a function call
artart78 has joined #ocaml
<laokz> no mater how ($) declared, its evaluation precedence is according $'s original precedence ?
malc_ has quit [*.net *.split]
worc3131 has quit [*.net *.split]
swapnilrajOld[m] has quit [*.net *.split]
Manis[m] has quit [*.net *.split]
l1x has quit [*.net *.split]
<sonologico> laokz: Yes. In OCaml, operator precedence is determined by the first character of the operator. (http://caml.inria.fr/pub/docs/manual-ocaml/expr.html#ss:precedence-and-associativity)
<laokz> even for eventually new operator? sonologico
<sonologico> yes, so all operators that you define starting with `$` will have the same precedence
l1x has joined #ocaml
malc_ has joined #ocaml
Manis[m] has joined #ocaml
swapnilrajOld[m] has joined #ocaml
worc3131 has joined #ocaml
worc3131 has quit [Max SendQ exceeded]
<laokz> sonologico: cleared. thanks.
<laokz> d_bot:thanks.
Haudegen has joined #ocaml
osa1 has quit [Remote host closed the connection]
nullcone has joined #ocaml
Niamkik has quit [Ping timeout: 264 seconds]
sonologico has quit [Remote host closed the connection]
Niamkik has joined #ocaml
kvik has quit [Read error: Connection reset by peer]
malc_ has quit [Ping timeout: 246 seconds]
malc_ has joined #ocaml
laokz has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
osa1 has joined #ocaml
amiloradovsky has joined #ocaml
tane has joined #ocaml
rig0rmortis has joined #ocaml
delysin has quit [Read error: Connection reset by peer]
delysin_ has joined #ocaml
laokz has joined #ocaml
amiloradovsky has quit [Ping timeout: 240 seconds]
osa1 has quit [Quit: osa1]
mbuf has quit [Quit: Leaving]
sonologico has joined #ocaml
rig0rmortis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rig0rmortis has joined #ocaml
malc_ has left #ocaml ["ERC (IRC client for Emacs 28.0.50)"]
rig0rmortis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
laokz has quit [Quit: Leaving]
waleee-cl has joined #ocaml
Serpent7776 has quit [Quit: leaving]
rig0rmortis has joined #ocaml
ransom has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
jnavila has joined #ocaml
narimiran has joined #ocaml
vicfred has quit [Ping timeout: 256 seconds]
rig0rmortis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raver has quit [Quit: Gateway shutdown]
sonologico has quit [Remote host closed the connection]
reynir has quit [Ping timeout: 240 seconds]
reynir has joined #ocaml
worc3131 has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
<d_bot> <EduardoRFS> what if two operators starts with the same token?
Haudegen has quit [Ping timeout: 240 seconds]
<octachron> Then they have the same precedence and associativity. Thus it is the associativity that is used to determine how they are grouped together
nullcone has joined #ocaml
Haudegen has joined #ocaml
amiloradovsky has joined #ocaml
tane has quit [Quit: Leaving]
kvik has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
ransom has quit [Ping timeout: 240 seconds]
amiloradovsky has quit [Remote host closed the connection]
jnavila has quit [Quit: Konversation terminated!]
rig0rmortis has joined #ocaml
oriba has joined #ocaml
Haudegen has joined #ocaml
worc3131 has quit [Remote host closed the connection]
nullcone has quit [Quit: Connection closed for inactivity]
ggole has quit [Quit: Leaving]
narimiran has quit [Quit: leaving]
vicfred has joined #ocaml
<d_bot> <Aaron Christianson> > how can understand this: let ($) x y = x * y <br> 2 $ 3 + 2 ==> 10 <br> ($) 2 3 + 2 ==> 8 ?
<d_bot> <Aaron Christianson> @laokz#0000 Is this real code or just learning material?
<d_bot> <Aaron Christianson> because I would go on a murderous rampage if I found this in the wild.
<companion_cube> that's probably an example
<companion_cube> but you can find infix operators in the wild, like, in cmdliner
<d_bot> <Aaron Christianson> Well, I like my monad operators as much as anyone, but defining `$` as `*` is a bridge too far! (but you're probably right and it's just an example)
<companion_cube> ah, yeah
rig0rmortis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rig0rmortis has joined #ocaml
aaaaaa has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
rig0rmortis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rig0rmortis has joined #ocaml
Haudegen has quit [Ping timeout: 258 seconds]
nullcone has joined #ocaml