havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.5, 2.5.7, 2.7.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
salinasc has quit [Ping timeout: 264 seconds]
salinasc has joined #ruby
akemhp_ has joined #ruby
akem__ has quit [Ping timeout: 240 seconds]
akemhp has joined #ruby
akemhp_ has quit [Ping timeout: 246 seconds]
ElFerna has quit [Quit: Leaving.]
tau has joined #ruby
jhass has quit [Quit: Bye]
ElFerna has joined #ruby
jhass has joined #ruby
MzrE has quit [Read error: Connection reset by peer]
poontangmessiah has quit [Read error: Connection reset by peer]
_whitelogger has joined #ruby
absolutejam2 has quit [Ping timeout: 268 seconds]
Esa_ has joined #ruby
absolutejam2 has joined #ruby
absolutejam2 has quit [Ping timeout: 246 seconds]
matheusmoreira has quit [Ping timeout: 268 seconds]
matheusmoreira has joined #ruby
galaxie has quit [Remote host closed the connection]
galaxie has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ruby
kyrylo has joined #ruby
ElFerna has quit [Quit: Leaving.]
matheusmoreira has quit [Ping timeout: 268 seconds]
bvdw has quit [Read error: Connection reset by peer]
tau has quit [Remote host closed the connection]
bvdw has joined #ruby
matheusmoreira has joined #ruby
chalkmonster has joined #ruby
mdsn has joined #ruby
johnny56 has quit [Read error: Connection reset by peer]
johnny56 has joined #ruby
mre- has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
xall has joined #ruby
johnny56 has joined #ruby
matheusmoreira has quit [Ping timeout: 240 seconds]
greengriminal has joined #ruby
foo66 has joined #ruby
Swyper has joined #ruby
foo66 has quit [Ping timeout: 260 seconds]
Frobozz has quit [Quit: quit]
matheusmoreira has joined #ruby
chalkmonster has quit [Ping timeout: 240 seconds]
foo66 has joined #ruby
mre- has quit [Ping timeout: 240 seconds]
<foo66> Anybody know if sqlite3 will work with ruby >2.3?
Esa_ has quit []
chalkmonster has joined #ruby
mre- has joined #ruby
mdsn has quit [Ping timeout: 245 seconds]
mre- has quit [Ping timeout: 245 seconds]
teardown has joined #ruby
chalkmonster has quit [Ping timeout: 268 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has quit [Quit: AJA4350]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
gix has quit [Ping timeout: 240 seconds]
imadper has joined #ruby
d^sh has quit [Ping timeout: 264 seconds]
brool has quit [Ping timeout: 252 seconds]
d^sh has joined #ruby
foo66 has quit [Ping timeout: 260 seconds]
jcalla has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
imadper has quit [Remote host closed the connection]
Swyper has joined #ruby
Technodrome has joined #ruby
queip has quit [Ping timeout: 240 seconds]
queip has joined #ruby
akemhp has quit [Ping timeout: 276 seconds]
foo66 has joined #ruby
salinasc has quit [Quit: Konversation terminated!]
drincruz has joined #ruby
<Rudolph> im using sqlite3 with ruby 2.6 in a project right now
<Rudolph> ah, they quit
foo66 has quit [Ping timeout: 260 seconds]
cd has quit [Quit: cd]
arandomandy has quit [Quit: leaving]
foo66 has joined #ruby
foo66 has quit [Ping timeout: 260 seconds]
postmodern has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
matheusmoreira has quit [Ping timeout: 240 seconds]
matheusmoreira has joined #ruby
nixy3 has joined #ruby
mre- has joined #ruby
mre- has quit [Ping timeout: 265 seconds]
dasher00 has quit [Ping timeout: 245 seconds]
claw has quit [Ping timeout: 252 seconds]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has joined #ruby
cyclonis_ has quit [Ping timeout: 268 seconds]
claw has joined #ruby
foo66 has joined #ruby
xall has quit [Quit: xall]
jordanm has quit [Ping timeout: 246 seconds]
mdsn has joined #ruby
Intelo has quit [Ping timeout: 265 seconds]
teardown has quit [Ping timeout: 265 seconds]
foo66 has quit [Ping timeout: 260 seconds]
teardown has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
jordanm has joined #ruby
absolutejam2 has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
mdsn has quit [Remote host closed the connection]
conta has quit [Quit: conta]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
mossplix has joined #ruby
Intelo has joined #ruby
MrCrackPot has joined #ruby
bambanx has quit [Quit: Leaving]
Swyper has quit [Remote host closed the connection]
* baweaver wanders in
schne1der has joined #ruby
skx86 has quit [Quit: Connection closed for inactivity]
DTZUZO has quit [Ping timeout: 265 seconds]
duderonomy has quit [Ping timeout: 268 seconds]
johnny56 has quit [Ping timeout: 240 seconds]
johnny56 has joined #ruby
sandstrom has joined #ruby
absolutejam2 has quit [Ping timeout: 264 seconds]
schne1der has quit [Ping timeout: 264 seconds]
mre- has joined #ruby
mre- has quit [Ping timeout: 268 seconds]
Intelo has quit [Remote host closed the connection]
Intelo has joined #ruby
savasyilmaz has joined #ruby
dellavg has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
blackmesa has joined #ruby
mossplix has quit [Ping timeout: 276 seconds]
blackmesa has quit [Ping timeout: 246 seconds]
johnny56 has quit [Ping timeout: 240 seconds]
johnny56_ has joined #ruby
DTZUZU has quit [Ping timeout: 240 seconds]
xall has joined #ruby
Intelo has quit [Ping timeout: 268 seconds]
mossplix has joined #ruby
blackmesa has joined #ruby
savasyilmaz has quit [Quit: #physics]
johnny56_ has quit [Ping timeout: 240 seconds]
Intelo has joined #ruby
johnny56 has joined #ruby
Intelo has quit [Remote host closed the connection]
Intelo has joined #ruby
WOLF has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
Intelo has quit [Read error: Connection reset by peer]
Intelo has joined #ruby
dionysus69 has joined #ruby
Intelo has quit [Remote host closed the connection]
mozzarella has quit [Remote host closed the connection]
Intelo has joined #ruby
mozzarella has joined #ruby
DTZUZU has joined #ruby
absolutejam2 has joined #ruby
tpanarch1st has quit [Ping timeout: 240 seconds]
ta has quit [Quit: WeeChat 2.5]
ta has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
bvdw has joined #ruby
johnny56 has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
meinside has joined #ruby
reber has joined #ruby
schne1der has joined #ruby
akemhp has joined #ruby
mossplix has quit [Remote host closed the connection]
mre- has joined #ruby
mossplix has joined #ruby
mre- has quit [Ping timeout: 268 seconds]
suukim has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
bitwinery has quit [Quit: Leaving]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
sandstrom has joined #ruby
peirama has joined #ruby
johnny56_ has joined #ruby
johnny56 has quit [Ping timeout: 240 seconds]
WOLF has quit []
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
ellcs has joined #ruby
dbugger has joined #ruby
mikecmpbll has joined #ruby
nibbo has quit [Ping timeout: 246 seconds]
Intelo_ has joined #ruby
DTZUZO has joined #ruby
Intelo_ has quit [Client Quit]
Intelo__ has joined #ruby
Intelo__ has quit [Remote host closed the connection]
Intelo_ has joined #ruby
Intelo_ has quit [Remote host closed the connection]
Intelo__ has joined #ruby
Intelo has quit [Disconnected by services]
Intelo__ has quit [Remote host closed the connection]
Intelo has joined #ruby
DTZUZO has quit [Ping timeout: 245 seconds]
DTZUZO has joined #ruby
al2o3-cr has quit [Ping timeout: 246 seconds]
nibbo has joined #ruby
nibbo has quit [Remote host closed the connection]
DTZUZO has quit [Ping timeout: 265 seconds]
akemhp has quit [Quit: Leaving]
nibbo has joined #ruby
Jonopoly has joined #ruby
DTZUZO has joined #ruby
absolutejam2 has quit [Ping timeout: 268 seconds]
xall has quit [Quit: xall]
dionysus70 has joined #ruby
DTZUZO has quit [Ping timeout: 276 seconds]
dionysus69 has quit [Ping timeout: 268 seconds]
dionysus70 is now known as dionysus69
dasher00 has joined #ruby
DTZUZO has joined #ruby
ellcs1 has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #ruby
ellcs1 has quit [Ping timeout: 268 seconds]
DTZUZO has quit [Ping timeout: 245 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
DTZUZO has joined #ruby
johnny56_ has quit [Ping timeout: 240 seconds]
johnny56_ has joined #ruby
chalkmonster has joined #ruby
xall has joined #ruby
postmodern has quit [Quit: Leaving]
NL3limin4t0r_afk is now known as NL3limin4t0r
ur5us has quit [Ping timeout: 245 seconds]
akemhp has joined #ruby
paraxial has quit [Quit: The Lounge - https://thelounge.chat]
paraxial has joined #ruby
paraxial has quit [Ping timeout: 240 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
paraxial has joined #ruby
sarna has joined #ruby
Technodrome has joined #ruby
MinSrodowiska has joined #ruby
johnny56_ has quit [Read error: Connection reset by peer]
mossplix_ has joined #ruby
mossplix has quit [Read error: Connection reset by peer]
clemens3 has joined #ruby
johnny56_ has joined #ruby
xall has quit [Ping timeout: 265 seconds]
sarna has quit [Remote host closed the connection]
sarna has joined #ruby
johnny56_ has quit [Ping timeout: 240 seconds]
johnny56_ has joined #ruby
akemhp has quit [Ping timeout: 246 seconds]
AJA4350 has joined #ruby
Guest47 has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
absolutejam2 has joined #ruby
mre- has joined #ruby
queip has quit [Ping timeout: 245 seconds]
queip_ has joined #ruby
queip_ is now known as queip
drincruz has quit [Ping timeout: 240 seconds]
johnny56_ has quit [Remote host closed the connection]
mre- has quit [Ping timeout: 276 seconds]
mossplix_ has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
hiroaki has joined #ruby
akemhp has joined #ruby
akemhp has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Quit: dionysus69]
yann-kaelig has joined #ruby
absolutejam2 has quit [Ping timeout: 264 seconds]
dionysus69 has joined #ruby
MinSrodowiska has quit [Quit: Bye Bye]
absolutejam2 has joined #ruby
<ellcs> >>> URI.escape('domain\username:password@host.tl')
<ellcs> >>> URI.escape('domain\username:password@host.tl')
blackmesa has quit [Ping timeout: 276 seconds]
<ellcs> &>> URI.escape('domain\username:password@host.tl')
<rubydoc> # => "domain%5Cusername:password@host.tl" (https://carc.in/#/r/7wgt)
<ellcs> &>> URI.parse(URI.escape('domain\username:password@host.tl')
<rubydoc> stderr: -e:5: syntax error, unexpected end, expecting ')'... check link for more (https://carc.in/#/r/7wgu)
<ellcs> URI.parse(URI.escape('domain\username:password@host.tl'))
<ellcs> sorry, for spaming :)
<ellcs> can someone explain, why URI can not handle this?
<ellcs> &>> URI.parse(URI.escape('domain\username:password@host.tl'))
<rubydoc> stderr: /usr/lib/ruby/2.6.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?):... check link for more (https://carc.in/#/r/7wgv)
Jonopoly has quit [Quit: WeeChat 2.5]
johnny56_ has joined #ruby
fakebl00d has joined #ruby
mossplix has quit [Remote host closed the connection]
gregf_ has joined #ruby
<NL3limin4t0r> ellcs: That might be due to the fact that your string isn't an URI.
<NL3limin4t0r> &>> URI.parse(URI.escape('ssh://domain\username:password@host.tl'))
<rubydoc> # => #<URI::Generic ssh://domain%5Cusername:password@host.tl> (https://carc.in/#/r/7wgw)
<NL3limin4t0r> From wikipedia:
<NL3limin4t0r> > Each URI begins with a scheme name that refers to a specification for assigning identifiers within that scheme.
<ellcs> i see. so URI is just nice parsing 'foo.org'
<ellcs> URI.parse('foo.org')
<ellcs> &>> URI.parse('foo.org')
<rubydoc> # => #<URI::Generic foo.org> (https://carc.in/#/r/7wgx)
<ellcs> i have a look, thank you, NL3limin4tor.
<NL3limin4t0r> ellcs: 'foo.org' isn't a valid URI either, but I guess URI assumes https as default if no protocol is given
<NL3limin4t0r> 'foo.org' is a valid domain name though
<ellcs> &>> URI.parse(URI.escape('http://domain%5Cusername:password@host.tl'))
<rubydoc> # => #<URI::HTTP http://domain%255Cusername:password@host.tl> (https://carc.in/#/r/7wgy)
<ellcs> you're great NL3limin4tor.
<ellcs> merci!
absolutejam2 has quit [Ping timeout: 240 seconds]
rbruchal has joined #ruby
rbruchal has quit [Client Quit]
chalkmonster has quit [Quit: WeeChat 2.6]
d^sh has quit [Ping timeout: 240 seconds]
d^sh has joined #ruby
mossplix has joined #ruby
xco has joined #ruby
lucasb has joined #ruby
sandstro_ has joined #ruby
sandstrom has quit [Ping timeout: 252 seconds]
jcalla has joined #ruby
fakebl00d has quit [Ping timeout: 264 seconds]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
drincruz has joined #ruby
al2o3-cr has joined #ruby
duderonomy has joined #ruby
MinSrodowiska has joined #ruby
mre- has joined #ruby
blackmesa has joined #ruby
queip_ has joined #ruby
queip has quit [Ping timeout: 264 seconds]
schne1der has quit [Ping timeout: 265 seconds]
queip_ is now known as queip
gnufied__ has joined #ruby
johnny56_ has quit [Ping timeout: 240 seconds]
gregf_ has quit [Remote host closed the connection]
MinSrodowiska has quit [Quit: Bye Bye]
mre- has quit [Ping timeout: 240 seconds]
johnny56_ has joined #ruby
Guest47 has quit [Quit: Textual IRC Client: www.textualapp.com]
Intelo has quit [Remote host closed the connection]
yann-kaelig has quit [Quit: yann-kaelig]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
mre- has joined #ruby
mre- has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
jeremycw has joined #ruby
xco has quit [Ping timeout: 240 seconds]
MinSrodowiska has joined #ruby
xco has joined #ruby
Inline__ has joined #ruby
mre- has joined #ruby
Inline has quit [Ping timeout: 264 seconds]
queip has quit [Ping timeout: 268 seconds]
queip_ has joined #ruby
Inline__ has quit [Client Quit]
queip_ is now known as queip
krawchyk has joined #ruby
Inline has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
Swyper has joined #ruby
greengriminal has joined #ruby
Swyper has quit [Remote host closed the connection]
tsujp has joined #ruby
ElFerna has joined #ruby
queip has quit [Ping timeout: 240 seconds]
brool has joined #ruby
queip has joined #ruby
eljimmy has joined #ruby
mossplix has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
ElFerna has quit [Ping timeout: 268 seconds]
schne1der has joined #ruby
johnny56_ has quit [Ping timeout: 240 seconds]
gnufied__ has quit [Quit: Leaving]
cek has joined #ruby
cek has left #ruby [#ruby]
sarna has quit [Remote host closed the connection]
NL3limin4t0r has quit [Ping timeout: 265 seconds]
NL3limin4t0r has joined #ruby
absolutejam2 has joined #ruby
Swyper has joined #ruby
mossplix_ has joined #ruby
mossplix_ has quit [Read error: Connection reset by peer]
mossplix_ has joined #ruby
mossplix has quit [Read error: Connection reset by peer]
johnny56_ has joined #ruby
MinSrodowiska has quit [Quit: Bye Bye]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
mossplix has joined #ruby
mossplix_ has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
johnny56_ has quit [Ping timeout: 240 seconds]
Mia has quit [Ping timeout: 250 seconds]
akemhp has joined #ruby
akemhp has quit [Max SendQ exceeded]
akemhp has joined #ruby
dionysus69 has joined #ruby
queip has quit [Ping timeout: 240 seconds]
queip_ has joined #ruby
queip_ is now known as queip
yann-kaelig has joined #ruby
ellcs has quit [Ping timeout: 246 seconds]
johnny56_ has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4351 has joined #ruby
Esa_ has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
bhaubert has joined #ruby
dionysus70 has joined #ruby
absolutejam2 has quit [Ping timeout: 268 seconds]
queip_ has joined #ruby
queip has quit [Ping timeout: 265 seconds]
queip_ is now known as queip
dionysus69 has quit [Ping timeout: 246 seconds]
dionysus70 is now known as dionysus69
_dbugger has joined #ruby
akemhp has quit [Remote host closed the connection]
_dbugger has quit [Client Quit]
akemhp has joined #ruby
dbugger has quit [Ping timeout: 250 seconds]
mossplix has quit [Read error: Connection reset by peer]
mossplix_ has joined #ruby
kenichi has quit [Quit: ZNC - http://znc.in]
akemhp has quit [Ping timeout: 265 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kenichi has joined #ruby
Technodrome has joined #ruby
akemhp_ has joined #ruby
leitz has joined #ruby
queip has quit [Ping timeout: 268 seconds]
queip_ has joined #ruby
clemens3 has quit [Ping timeout: 268 seconds]
queip_ is now known as queip
code_zombie has joined #ruby
orbyt_ has joined #ruby
mre- has quit [Ping timeout: 276 seconds]
rippa has joined #ruby
cliluw has joined #ruby
cthulchu has joined #ruby
mossplix_ has quit [Remote host closed the connection]
mre- has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
gix has joined #ruby
random-jellyfish has joined #ruby
<random-jellyfish> I have multil ine string
mossplix has joined #ruby
<random-jellyfish> I have a multi line string and I want to remove everything that begins with a '#' and ends with a newline
<random-jellyfish> aka I wanna remove all ruby/python-like comments
<random-jellyfish> how do I do that?
mikecmpbll has quit [Quit: inabit. zz.]
<random-jellyfish> my_string.sub /#.*\n/, "" doesn't work
dbugger has joined #ruby
<leftylink> &ri String#sub
<adam12> random-jellyfish: You'd have to benchmark this to see what's faster but iterating over it as an array might do it as well, depending on if there's leading whitespace ahead of the #
<leftylink> indeed, we can see that `sub` removes just one occurrence.
<leftylink> therefore, one suggestion may be to use String#gsub instead, which removes all of them
<adam12> my_string.each_line.reject { |line| line.start_with?("#") }.join
<random-jellyfish> I don't want to reject entire lines
<random-jellyfish> I just want to remove the comment
<random-jellyfish> some comments can show up in the middle of a line
<random-jellyfish> and continue until the end of line
<random-jellyfish> but yes, gsub does the trick
<adam12> random-jellyfish: Oh I see. So comments _anywhere_ and not just at the beginning of the line. I was thinking the latter.
<leftylink> let us hope that there is not anything weird like a string containing a #, or any other context where # is not to be interpreted as starting a comment
<leftylink> wishing luck!
<random-jellyfish> no it's basically just a list of tests that I have to run in a regression, one per line
<random-jellyfish> and I want to be able to add comments in the file to add some extra info or to comment out some tests that I don't want to run
<random-jellyfish> there's won't be any #'s in the test names
dionysus70 has joined #ruby
<random-jellyfish> but hey, thanks for the help!
dionysus69 has quit [Ping timeout: 265 seconds]
dionysus70 is now known as dionysus69
queip has quit [Ping timeout: 252 seconds]
queip_ has joined #ruby
leitz has quit [Quit: Leaving]
queip_ is now known as queip
<al2o3-cr> random-jellyfish: String#delete
<random-jellyfish> delete doesn't seem to take a regex as argument : TypeError (no implicit conversion of Regexp into String)
AJA4350 has joined #ruby
<al2o3-cr> random-jellyfish: no, match with regex then delete line
<random-jellyfish> I just want to delete the comment no the whole line
AJA4351 has joined #ruby
<al2o3-cr> ah, right. then String#sub
<NL3limin4t0r> random-jellyfish: Keep in mind that /#.*\n/ also removes the newline character, so you would have to use "\n" for the replacement. Alternatively you can use /#.*$/ keep in mind that this is greedy and you most likely want to use /#.*?$/ or /#[^\n]*/ but you still would have issues with the # character in string or symbol context.
<NL3limin4t0r> The above /#[^\n*]*/ should have been /#[^\n]*$/
<random-jellyfish> NL3limin4t0r that's true, I'll use /#[^\n]*\n/
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
blackmesa has joined #ruby
cd has joined #ruby
wildtrees has joined #ruby
<NL3limin4t0r> You can negate string context with something like: string.gsub(/(?<string>"(?:[^"\\]|\\.)*")|(?<string>'(?:[^'\\]|\\.)*')|#[^\n]*$/m, '\k<string>')
bhaubert has quit [Quit: bhaubert]
<NL3limin4t0r> But that isn't fool proof and still doesn't work with things like heredoc.
<random-jellyfish> I won't apply it to complicated text
<random-jellyfish> just a list of test names...kind of like identifiers
<random-jellyfish> one per line
<random-jellyfish> and I want to be able to add some comments here and there
queip_ has joined #ruby
queip has quit [Ping timeout: 268 seconds]
queip_ is now known as queip
peirama has left #ruby ["ERC (IRC client for Emacs 26.3)"]
johnny56_ has quit [Ping timeout: 240 seconds]
<al2o3-cr> ?xy random-jellyfish
<ruby[bot]> random-jellyfish: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
bitwinery has joined #ruby
krawchyk has quit [Quit: krawchyk]
mre- has quit [Ping timeout: 240 seconds]
brendan- has quit [Ping timeout: 264 seconds]
jacksoow has quit [Ping timeout: 265 seconds]
jacksoow has joined #ruby
sandstro_ has quit [Quit: My computer has gone to sleep.]
brendan- has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
queip_ has joined #ruby
queip has quit [Ping timeout: 240 seconds]
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip_ is now known as queip
brendan- has quit [Ping timeout: 264 seconds]
AJA4351 has joined #ruby
bhaubert has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
freedom has joined #ruby
bhaubert has quit [Quit: bhaubert]
AJA4351 has joined #ruby
bhaubert has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
<al2o3-cr> &>> test ?M, __FILE__
<rubydoc> stderr: -e:4:in `test': No such file or directory @ rb_f_test - -e (Errno::ENOENT)... check link for more (https://carc.in/#/r/7wkt)
<al2o3-cr> &>> test ?M, File.expand_path(__FILE__)
greengriminal has quit [Ping timeout: 264 seconds]
<rubydoc> stderr: playpen: application terminated abnormally with signal 31 (Bad system call) (https://carc.in/#/r/7wku)
greengriminal has joined #ruby
mossplix has quit []
skx86 has joined #ruby
random-jellyfish has quit [Remote host closed the connection]
energizer has joined #ruby
bhaubert has quit [Quit: bhaubert]
ouemt has joined #ruby
yann-kaelig has quit [Quit: yann-kaelig]
<ouemt> is "if A and B or C" evaluated as "if (A and B ) or C" or "if A and (B or C)"?
<leftylink> (first of all, one should use && and || for boolean operations, and only use `and` and `or` for flow control) a useful mnemonic is to remember that `&&` is multiplication and `||` is addition. and since multiplication has higher precedence than addition, `&&` has higher precedence. why is it that `&&` is multiplication? because if we think of just 1s and 0s, if either signal is 0, the result is 0. thus
<leftylink> `&&` is like multiplication
<ouemt> leftylink: I appreciate the detail, but all I'm doing is translating some ruby code to python. The existing code uses "and" and "or" :/
<leftylink> doesn't affect my answer.
<ouemt> leftylink: so I can just substitute 'and' for '&&' in your answer? making the answer to my question "if (A and B ) or C" ?
<leftylink> why don't we remove all doubt by checking in code?
<leftylink> &>> b = [false, true]; b.product(b, b).all? { |a, b, c| (a and b or c) == ((a and b) or c) }
<rubydoc> # => true (https://carc.in/#/r/7wkz)
<leftylink> &>> b = [false, true]; b.product(b, b).all? { |a, b, c| (a and b or c) == (a and (b or c)) }
<rubydoc> # => false (https://carc.in/#/r/7wl0)
<leftylink> also HAHAHAHA (singsong) LEFTY IS WRONG LEFTY IS WRONG
<leftylink> &>> b = [false, true]; b.product(b, b).all? { |a, b, c| (a or b and c) == ((a or b) and c) }
<rubydoc> # => true (https://carc.in/#/r/7wl2)
<leftylink> hahahahahahahahhahahahahahahaha
mossplix has joined #ruby
<leftylink> &>> b = [false, true]; b.product(b, b).all? { |a, b, c| (a or b and c) == (a or (b and c)) }
<rubydoc> # => false (https://carc.in/#/r/7wl3)
mre- has joined #ruby
<leftylink> shows how much I know about this language!!!
<ytti> || and && may work more to expectation
<leftylink> they do
<leftylink> this I know
<ouemt> ytti: I wish the original author had used it
Fusl has quit [Excess Flood]
<ytti> i've made that mistake few times
<ytti> because or and and look better
<ytti> and i like aesthethics
Fusl has joined #ruby
<leftylink> well, that was my TIL I guess!
<leftylink> if the question had never been asked, I would have never learned it!
<leftylink> dang
<ouemt> I'm struggling with reading your code leftylink I'm not a ruby dev, but playing around with an online editor makes it look like your original statement was right?
<leftylink> no, counterexmaple
<leftylink> &>> b = [false, true]; b.product(b, b).all? { |a, b, c| (a or b and c) == (a or (b and c)) }
<rubydoc> # => false (https://carc.in/#/r/7wl4)
<leftylink> false!
<ouemt> yeah, I don't know what that line means
brendan- has joined #ruby
<leftylink> but at least it shows the spirit. using that as inspiration, one is able to perform one's own tests, and not rely on the help of the wrong leftylink. since leftylink was just publicly proven to be wrong, it is clear that leftylink cannot be trusted
<leftylink> I am sorry for saying wrong things of course
<leftylink> as I said, my TIL for the day
<ouemt> leftylink, I don't understand your code, I don't do ruby. Can you just tell me if it should be "(A and B ) or C" or "A and (B or C)"?
<ouemt> I'm trying to understand, but I'm python dev, lol
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shirak has joined #ruby
wilkir has joined #ruby
<leftylink> as we can see from https://ruby-doc.org/core-2.6.3/doc/syntax/precedence_rdoc.html, the words `and` and `or` are of equal precedence. but, uhm, does someone know where in the docs it shows me whether an operator is left associative or right associative? I can't seem to find it anywhere
<leftylink> apparently there's a table in the book "The Ruby Programming Language: Everything you need to know", but I would have thought there would be a table in the ruby docs too?
bhaubert has joined #ruby
<leftylink> good enough I guess
<leftylink> thank you
<al2o3-cr> np
nowhere_man has joined #ruby
<ouemt> I just did a truth table with all three formats, "if A and B or C" and "if (A and B ) or C" and "if A and (B or C)"
<ouemt> "if A and B or C" evaluates the same as "if (A and B ) or C"
queip has quit [Ping timeout: 265 seconds]
renich has joined #ruby
<havenwood> ouemt: This page is handy for precedence questions: https://docs.ruby-lang.org/en/2.6.0/syntax/precedence_rdoc.html
<leftylink> I did not find the associativity in the included docs, since I did `grep -ri assoc ruby-2.6.3/doc | grep -v ChangeLog` and got nothing useful. I will see if ruby-2.6.5 has any change in the docs, though I find it unlikely it will have
suukim has quit [Quit: Konversation terminated!]
queip has joined #ruby
absolutejam2 has joined #ruby
ElFerna has joined #ruby
sagax has joined #ruby
rubydoc has quit [Ping timeout: 268 seconds]
<NL3limin4t0r> ouemt: `and` and `or` have the same precedence and are executed from left to right. They are not the same as `&&` and `||` both have a mutch higher precedence and `&&` has a higher precendence then `||`.
<leftylink> dang, `grep -ri assoc ruby-2.6.5/doc | grep -v ChangeLog` did not give more information about the associativity
akemhp_ has quit [Ping timeout: 265 seconds]
<al2o3-cr> leftylink: i don't think it is documented.
<leftylink> dang
energizer has left #ruby ["Leaving"]
clemens3 has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
<al2o3-cr> thus, the only docment recording associativity is the link i posted above.
<al2o3-cr> *document
<al2o3-cr> afaik anyway
bvdw has joined #ruby
poontangmessiah has joined #ruby
poontangmessiah_ has joined #ruby
poontangmessiah_ has quit [Remote host closed the connection]
poontangmessiah_ has joined #ruby
xco has joined #ruby
poontangmessiah has quit [Ping timeout: 268 seconds]
akemhp has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
mossplix has quit [Client Quit]
teardown has quit [Ping timeout: 240 seconds]
queip has quit [Ping timeout: 252 seconds]
queip_ has joined #ruby
queip_ is now known as queip
mossplix has joined #ruby
yann-kaelig has joined #ruby
<NL3limin4t0r> al2o3-cr: Although this proves again that wikis are not to be trusted. Their description of &&= is wrong.
<NL3limin4t0r> > &&= | A &&=B does A = A && B
<NL3limin4t0r> Which should be: A &&= B does A && A = B
mossplix has quit [Remote host closed the connection]
<NL3limin4t0r> Strangly their description of ||= is correct: A ||= B assigns B to A iff A is nil or false
mossplix has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
<NL3limin4t0r> Which makes you wonder why they didn't copy that to the &&= description: A &&= B assigns B to A if A is **not** nil or false
<al2o3-cr> NL3limin4t0r: strangely enough i didn't notice that.
freedom has quit [Remote host closed the connection]
mossplix has quit [Ping timeout: 250 seconds]
<NL3limin4t0r> &>> module AccessorA; def a; puts "getter a called, current value: #{@a.inspect}"; @a; end; def a=(a); puts "setter a called, current value: #{@a.inspect}, new value: #{a.inspect}"; @a = a; end; end; obj = Object.new; obj.extend(AccessorA); obj.a &&= 1; obj.a = 2; obj.a &&= 3
<NL3limin4t0r> ^ shows that the setter is never called for `obj.a &&= 1`
mossplix has joined #ruby
freedom has joined #ruby
<al2o3-cr> NL3limin4t0r: try pasting it again.
<phaul> rubybot
<NL3limin4t0r> &>> module AccessorA; def a; puts "getter a called, current value: #{@a.inspect}"; @a; end; def a=(a); puts "setter a called, current value: #{@a.inspect}, new value: #{a.inspect}"; @a = a; end; end; obj = Object.new; obj.extend(AccessorA); obj.a &&= 1; obj.a = 2; obj.a &&= 3
<phaul> it's offline.. I look into it
<al2o3-cr> phaul: oh, ok.
ElFerna has quit [Quit: Leaving.]
<NL3limin4t0r> np, you can past the line in your own irb to see the results
<al2o3-cr> i did and it's correct.
ske3bal has joined #ruby
<leftylink> nice way to check
AJA4351 has joined #ruby
<leftylink> the quickest way I thought of was a `[]=`
AJA4350 has quit [Ping timeout: 250 seconds]
AJA4351 is now known as AJA4350
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
johnny56_ has joined #ruby
ske3bal has left #ruby [#ruby]
ur5us has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ElFerna has joined #ruby
MinSrodowiska has joined #ruby
queip has quit [Ping timeout: 265 seconds]
teardown has joined #ruby
queip_ has joined #ruby
queip_ is now known as queip
ellcs has joined #ruby
brendan- has quit [Ping timeout: 276 seconds]
NL3limin4t0r has quit [Ping timeout: 240 seconds]
akem__ has joined #ruby
akem__ is now known as akem
brendan- has joined #ruby
akemhp has quit [Ping timeout: 240 seconds]
brendan- has quit [Read error: Connection reset by peer]
ouemt has left #ruby [#ruby]
ur5us has quit [Read error: Connection reset by peer]
NL3limin4t0r has joined #ruby
ur5us has joined #ruby
akem__ has joined #ruby
johnny56_ has quit [Read error: Connection reset by peer]
brendan- has joined #ruby
<NL3limin4t0r> ^ For the people that are interested and haven't ran the code themselfs.
<NL3limin4t0r> got to go though, have a good night
<phaul> good night NL3limin4t0r
NL3limin4t0r is now known as NL3limin4t0r_afk
tpanarch1st has joined #ruby
rubydoc has joined #ruby
akem has quit [Ping timeout: 265 seconds]
poontangmessiah has joined #ruby
<phaul> &>> 'I am back, folks'
<rubydoc> # => "I am back, folks" (https://carc.in/#/r/7wld)
poontangmessiah_ has quit [Ping timeout: 240 seconds]
<bougyman> gah.
ElFerna has quit [Ping timeout: 265 seconds]
<bougyman> spent valuable hours just reproducing an 'em' that works in a pipe.
tpanarch1st has quit [Client Quit]
tpanarch1st has joined #ruby
<bougyman> codified in the 'remoji' gem
<bougyman> 🐼
<bougyman> I lost my emoji input when I got rid of gnome. needed a replacement
deepsteep has joined #ruby
<deepsteep> Hi there!
<phaul> hello deepsteep
queip has quit [Ping timeout: 240 seconds]
queip_ has joined #ruby
<bougyman> hey deepsteep
queip_ is now known as queip
al2o3-cr has quit [Quit: WeeChat 2.6]
akem__ has quit [Ping timeout: 240 seconds]
akemhp has joined #ruby
al2o3-cr has joined #ruby
akemhp_ has joined #ruby
deepsteep has quit [Quit: deepsteep]
akemhp has quit [Ping timeout: 252 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freedom has quit [Remote host closed the connection]
freedom has joined #ruby
mre- has quit [Ping timeout: 240 seconds]
spectra has quit [Ping timeout: 276 seconds]
poontangmessiah_ has joined #ruby
freedom has quit [Quit: freedom]
poontangmessiah has quit [Ping timeout: 276 seconds]
greengriminal has quit [Quit: Leaving]
spectra has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
bradland has joined #ruby
mossplix has quit [Ping timeout: 250 seconds]
bhaubert has quit [Quit: bhaubert]
poontangmessiah has joined #ruby
AJA4351 has joined #ruby
poontangmessiah_ has quit [Ping timeout: 245 seconds]
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
mre- has joined #ruby
poontangmessiah has quit [Remote host closed the connection]
snickers has joined #ruby
<havenwood> reminds me of steep https://github.com/soutaro/steep
ellcs has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
queip has quit [Ping timeout: 265 seconds]
ellcs has joined #ruby
bhaubert has joined #ruby
blackmesa has joined #ruby
queip has joined #ruby
dellavg has quit [Ping timeout: 265 seconds]
bhaubert has quit [Client Quit]
schne1der has quit [Ping timeout: 240 seconds]
spectra has quit [Ping timeout: 248 seconds]
mossplix has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quazimodo has quit [Ping timeout: 276 seconds]
yann-kaelig has quit [Quit: yann-kaelig]
MinSrodowiska has quit [Quit: Bye Bye]
hutch1 has quit [Ping timeout: 245 seconds]
mre- has quit [Ping timeout: 240 seconds]
queip_ has joined #ruby
queip has quit [Ping timeout: 240 seconds]
queip_ is now known as queip
mre- has joined #ruby
bhaubert has joined #ruby
bhaubert has quit [Client Quit]
mre- has quit [Ping timeout: 240 seconds]
spectra has joined #ruby
queip_ has joined #ruby
queip has quit [Ping timeout: 276 seconds]
queip_ is now known as queip
brendan- has quit [Ping timeout: 245 seconds]
jeremycw has quit [Ping timeout: 240 seconds]
brendan- has joined #ruby
dbugger has quit [Ping timeout: 264 seconds]
quazimodo has joined #ruby
johnny56_ has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4351 is now known as AJA4350
quazimodo has quit [Ping timeout: 276 seconds]
<al2o3-cr> havenwood: o?
<al2o3-cr> been gym pal ;)
<havenwood> al2o3-cr: gym? is that a gem?
<al2o3-cr> noooo, gym!
<al2o3-cr> big biceps
<al2o3-cr> it does look like pop eye though ;)
SeepingN has joined #ruby
<al2o3-cr> anyone training @ gym. STOP!!! swim instead.
shirak_ has joined #ruby
<al2o3-cr> havenwood: nice, but it's written in ruby
<havenwood> al2o3-cr: interesting they did Sorbet in C++
spectra has quit [Ping timeout: 276 seconds]
<al2o3-cr> havenwood: it's gonna be fast
<havenwood> al2o3-cr: though it'll ruby-signature sigs too once Ruby 3 lands, afaik
dionysus69 has quit [Ping timeout: 240 seconds]
shirak has quit [Ping timeout: 268 seconds]
ellcs has quit [Ping timeout: 264 seconds]
<al2o3-cr> sorbet look good tbh.
<al2o3-cr> so, does steep.
<al2o3-cr> create an advisory?
<havenwood> al2o3-cr: Don't forget the one that'll ship with Ruby 3! https://github.com/mame/ruby-type-profiler
<havenwood> level 1 profiler ftw
<al2o3-cr> havenwood: please tell me you practice hyptotism?
snickers has quit [Read error: Connection reset by peer]
chalkmonster has joined #ruby
<havenwood> al2o3-cr: yeah
<al2o3-cr> havenwood: practice on mame
<havenwood> al2o3-cr: I only do self hypnosis ¯\_(ツ)_/¯
<havenwood> And I'm not mame
<al2o3-cr> havenwood: what do you want?
<havenwood> al2o3-cr: a level 1 type profiler, where I don't have to type annotations
Azure|dc has quit [Ping timeout: 265 seconds]
Azure has joined #ruby
<al2o3-cr> havenwood: why though? times changing?
<havenwood> as matz says, Ruby is a shark that must swim
<al2o3-cr> havenwood: sometimes the shark dies
<havenwood> Matz keynotes have turtles, sharks and rabbits, every year.
<havenwood> al2o3-cr: Yeah, just swimming isn't always enough after some time.
<havenwood> al2o3-cr: I'm not sure if programming languages face biological mortality in the same way.
<havenwood> Maybe there's a Zebrafish language.
<al2o3-cr> havenwood: whoa dude! chill
<al2o3-cr> i love the ruby language
<al2o3-cr> havenwood: anyway, they're phys******* pro-nouns
<havenwood> At some point it's a naming question. Is the language alive or is a descendant of it alive? How about after hundreds of generations, assuming it survives that long?
<al2o3-cr> we're here aren't we?
<havenwood> I was thinking more Ruby after we're gone.
spectra has joined #ruby
<havenwood> But yes, we're here. :)
<al2o3-cr> havenwood: i don't think ruby is going anywhere
mossplix has quit [Remote host closed the connection]
<havenwood> al2o3-cr: not anytime soon. in the distant future its progeny may be what survives. dunno! we don't have any history to reference for programming language evolution over centuries.
<al2o3-cr> dying, anywhere. the BEST interpreted language by far.
<havenwood> al2o3-cr: will it be in 3019? or will one of its descendants? or both? neither?
<al2o3-cr> havenwood: all of the above ;)
<havenwood> Larry Wall mentioned once that Perl 6 is designed to be an appealing language for an AI to master.
<al2o3-cr> havenwood: absolutly true.
<al2o3-cr> people underestimate ruby.
ElFerna has joined #ruby
dkmueller has joined #ruby
<al2o3-cr> it's an interpreted language that can ... absolutly anything to a degeree.
drincruz has quit [Ping timeout: 276 seconds]
johnny56_ has quit [Ping timeout: 240 seconds]
<al2o3-cr> havenwood: steep vs sorbet?
chalkmonster has quit [Quit: WeeChat 2.6]
<al2o3-cr> sorbet for me
<havenwood> al2o3-cr: sorbet seems further along but more obtrusive. i'm most interested in type-profiler, since I like free wins.
mossplix has joined #ruby
reber has quit [Read error: Connection reset by peer]
<havenwood> al2o3-cr: tooling to just analyze your program seems nicer than annotations. i think i'd rather do parallel annotations rather than inline if we're doing annotations, but i don't feel strongly about that.
<al2o3-cr> havenwood: so you don't feel strongly about: def foo(x ¬x, ¬y)?
<havenwood> al2o3-cr: On first impression, I like to keep my code as-is and have something parallel for signatures
akemhp_ has quit [Ping timeout: 252 seconds]
akemhp has joined #ruby
<al2o3-cr> havenwood: would you like it inline though?
<havenwood> al2o3-cr: I don't want to knock it, but I don't see adding current Sorbet annotations to my code.
<havenwood> al2o3-cr: But annotations could feel more native. I don't like it.
<havenwood> "I hate annotations." -Matz
brendan- has quit [Read error: Connection reset by peer]
ElFerna has quit [Quit: Leaving.]
<al2o3-cr> havenwood: you are your own, matz is his own? everyone got an opinion?
<havenwood> al2o3-cr: i happen to agree with matz on this one
mossplix has quit [Remote host closed the connection]
<al2o3-cr> havenwood: why?
jeremycw has joined #ruby
<havenwood> al2o3-cr: with a level 1 profiler, the wins outweigh the losses - guaranteed
<havenwood> al2o3-cr: there are no losses
<havenwood> if my code stays the same and a tool and analyze it - awesome!
brendan- has joined #ruby
<havenwood> between inline and parallel annotation, i feel parallel reflects it being opt in and not enforced
<al2o3-cr> hmm... going with consensus?
AJA4351 has joined #ruby
<havenwood> the two inline annotation tools that exist are both awesome, but not code I want to opt in to.
<al2o3-cr> maybe it's right, maybe it's not?
<havenwood> i'll use type-profiler if it ships with Ruby 3, of course.
<havenwood> i hope there'll be something nice to opt in to for annotations for widely used programs that can take advantage of signatures
hutch1 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
<havenwood> i'm not in love with the current level 2 type profilers
<havenwood> but they're early efforts
<al2o3-cr> havenwood: and great effots at that
jeremycw has quit [Ping timeout: 276 seconds]
<al2o3-cr> *effors
<al2o3-cr> ffs
<havenwood> yeah, all remarkable
<al2o3-cr> too right.
dkmueller has quit [Quit: WeeChat 2.3]
quazimodo has joined #ruby
hiroaki has quit [Ping timeout: 250 seconds]
ellcs has joined #ruby
orbyt_ has joined #ruby
hutch1 has quit [Ping timeout: 264 seconds]