jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
jetchisel has joined #ruby
victori has joined #ruby
comet23 has quit [Ping timeout: 252 seconds]
TomyLobo has quit [Read error: Connection reset by peer]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
Guimauve has joined #ruby
polishdub has quit [Quit: leaving]
jpn has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
mitt3ns has joined #ruby
mitt3ns has left #ruby [#ruby]
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
victori has joined #ruby
jetchisel has quit [Ping timeout: 264 seconds]
jetchisel has joined #ruby
jetchisel has quit [Ping timeout: 268 seconds]
jetchisel has joined #ruby
jetchisel has quit [Client Quit]
dviola has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
protektwar has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
dionysus69 has joined #ruby
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
victori has joined #ruby
Guimauve has quit [Quit: Client closed]
jpn has joined #ruby
jpn has quit [Ping timeout: 264 seconds]
dviola has quit [Quit: WeeChat 3.6]
dviola has joined #ruby
skuntee4 has joined #ruby
perdent has quit [Ping timeout: 252 seconds]
teclator has joined #ruby
skuntee4 has quit [Ping timeout: 268 seconds]
<rapha> morning all!
<rapha> can somebody explain to me like i'm five _why_ ruby can parse `if x.include? :y` just fine, but not `if x.include? :y && y.include? :z` (i do know it works with parentheses, i'm interested in the _why_ because it looks like the '&&' would be good enough to keep it unambiguous?
<leftylink> see, not even https://ruby-doc.org/core-3.1.0/doc/syntax/precedence_rdoc.html is good enough to answer this questoin, since it doesn't tell when function application goes in the order
<rapha> hmm
<rapha> "function application" means "executing the function"?
<rapha> && and || do come smack in the middle of the table
<rapha> and what's "unary -" as opposed to "-"?
<rapha> {} blocks are at the very end of the table, so perhaps "function application" is the very bottom?
<rapha> leftylink: but since you immediately looked at the precedence table to try and answer the question ... that means you suspect it's by design, not by necessity?
<leftylink> well, since it's ambiguous, that's why I expected it's necessary to look at precedence
<leftylink> but, it didn't help
<leftylink> either way, even a simpler thing doesn't parse
<leftylink> pandabot: rb 5 && p 5
<pandabot> stderr: playpen: timeout triggered! - exit 1 - https://carc.in/#/r/ds90
<leftylink> pandabot: rb 5 && p 5
<pandabot> stderr: -e:2: syntax error, unexpected integer literal, expecting `do' or '{' or '(' - exit 1 - https://carc.in/#/r/ds91
<rapha> ah, yes, my example could/should have been simpler, thanks
<leftylink> an explanation I would advise NOT to accept is: "well it's ambiguous, does `5 && p 5` mean `(5 && p) 5` or `5 && (p 5)`". I think that explanation is inadequate. there are ambiguous situations where the parser does make a decision one way or the other
<leftylink> pandabot: rb p 1 && 2
<pandabot> 2 - 1 more lines - https://carc.in/#/r/ds94
<leftylink> that's obviously ambiguous, but a choice was made
jpn has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
jhawthorn_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
Rounin has joined #ruby
Rounin has joined #ruby
Rounin has quit [Changing host]
jhawthorn has joined #ruby
dviola has quit [Quit: WeeChat 3.6]
jpn has joined #ruby
jetchisel has joined #ruby
skuntee4 has joined #ruby
skuntee4 has quit [Ping timeout: 268 seconds]
protektwar has quit [Ping timeout: 250 seconds]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
dviola has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
nmollerup has quit [Remote host closed the connection]
nmollerup has joined #ruby
ur5us has joined #ruby
protektwar has quit [Ping timeout: 250 seconds]
perrierjouet has quit [Quit: WeeChat 3.6]
dviola has quit [Quit: WeeChat 3.6]
perrierjouet has joined #ruby
Xeago has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
dionysus70 is now known as dionysus69
szkl has joined #ruby
dviola has joined #ruby
skuntee4 has joined #ruby
skuntee4 has quit [Remote host closed the connection]
<rapha> mean one :o)
<rapha> although i feel since x 1 && x 2 results in a syntax error, it'd be consistent if that had resulted in one, too
<leftylink> I would maybe be happier if it were as simple as saying "oh since `p 1 + 1` parses and `1 + p 1` doesn't, obviously it just means that a function call without parentheses can only be the first thing in an expression", but there would need to be some nuance as to what is meant by an expression because `1 .+ p 1` parses and does what you would expect it to do, and so does `p p p p 1`
jpn has quit [Ping timeout: 265 seconds]
mikecmpbll has joined #ruby
rhe7 has joined #ruby
rhe has quit [Ping timeout: 240 seconds]
rhe7 is now known as rhe
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
dionysus69 has joined #ruby
zoknert has joined #ruby
SteveR has joined #ruby
zoknert has quit [Ping timeout: 268 seconds]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
zoknert has joined #ruby
_root has quit [Ping timeout: 268 seconds]
Tempesta has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
eddof13 has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
zoknert has quit [Ping timeout: 244 seconds]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has quit [Excess Flood]
dorian_ has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
protektwar has quit [Ping timeout: 260 seconds]
eddof13 has joined #ruby
smp has quit [Quit: ZNC 1.8.2 - https://znc.in]
smp has joined #ruby
smp has quit [Client Quit]
smp has joined #ruby
smp has quit [Client Quit]
smp has joined #ruby
smp has quit [Client Quit]
smp has joined #ruby
mitt3ns has joined #ruby
yellowstone has joined #ruby
mitt3ns_ has joined #ruby
mitt3ns has quit [Ping timeout: 244 seconds]
mitt3ns_ has quit [Client Quit]
dionysus69 has quit [Ping timeout: 244 seconds]
jetchisel has quit [Ping timeout: 244 seconds]
jetchisel has joined #ruby
mikecmpbll has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
yellowstone has quit [Ping timeout: 244 seconds]
mikecmpbll has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
yellowstone has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
mikecmpbll has quit [Ping timeout: 264 seconds]
havenwood has quit [Quit: The Lounge - https://thelounge.chat]
havenwood has joined #ruby
jpn has quit [Ping timeout: 244 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #ruby
jpn has joined #ruby
yellowstone has quit [Ping timeout: 250 seconds]
yCrazyEdd has quit [Ping timeout: 244 seconds]
yellowstone has joined #ruby
jpn has quit [Ping timeout: 268 seconds]
moldorcoder7_ has joined #ruby
moldorcoder7 has quit [Ping timeout: 265 seconds]
jpn has joined #ruby
SteveR has quit [Ping timeout: 252 seconds]
_ht has joined #ruby
jpn has quit [Ping timeout: 265 seconds]
jimeh has quit [Ping timeout: 252 seconds]
jimeh has joined #ruby
dionysus69 has joined #ruby
roura has joined #ruby
yellowstone has quit [Read error: Connection reset by peer]
jpn has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
roura has quit [K-Lined]
jpn has quit [Ping timeout: 252 seconds]
jpn has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Ping timeout: 265 seconds]
jpn has quit [Ping timeout: 264 seconds]
smurfke has joined #ruby
smurfke has quit [Client Quit]
Sankalp has quit [Ping timeout: 265 seconds]
jpn has joined #ruby
Sankalp has joined #ruby
skuntee4 has joined #ruby
_aeris_ has joined #ruby
aeris has quit [Remote host closed the connection]
_aeris_ is now known as aeris
hightower3 has joined #ruby
_ht has quit [Remote host closed the connection]
hightower2 has quit [Ping timeout: 268 seconds]
skuntee4 has quit [Ping timeout: 260 seconds]
jpn has quit [Ping timeout: 268 seconds]
_root has joined #ruby
scuntee5 has joined #ruby
jpn has joined #ruby
scuntee5 has quit [Ping timeout: 252 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
skuntee4 has joined #ruby
skuntee4 has quit [Ping timeout: 265 seconds]
polishdub has joined #ruby
jpn has quit [Ping timeout: 265 seconds]
ur5us has joined #ruby
jpn has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aeris has quit [Quit: ZNC - http://znc.sourceforge.net]
aeris has joined #ruby
skuntee4 has joined #ruby
skuntee4 has quit [Client Quit]
skuntee4 has joined #ruby
skuntee4 has quit [Ping timeout: 265 seconds]
skuntee4 has joined #ruby
skuntee4 has quit [Read error: Connection reset by peer]
eddof13 has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
eddof13 has quit [Client Quit]
Rounin has quit [Ping timeout: 244 seconds]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
Tempesta has quit [Excess Flood]
entropie has quit [Ping timeout: 255 seconds]
entropie has joined #ruby
mdemo has joined #ruby
mikecmpbll has joined #ruby
ollysmith has quit [Quit: ZNC 1.8.2+deb2+b5 - https://znc.in]
ollysmith has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]