d-s has quit [Read error: Connection reset by peer]
d-s has joined #ruby
SobiX has joined #ruby
reset has joined #ruby
robotmay has joined #ruby
comet23 has joined #ruby
fef has quit [Remote host closed the connection]
fef has joined #ruby
o|||||o has joined #ruby
gr33n7007h has quit [Quit: WeeChat 3.4.1]
heumeu has joined #ruby
Guest48 has joined #ruby
some14u has joined #ruby
gproto23 has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
Guest48 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has quit [Client Quit]
some14u has joined #ruby
some14u has quit [Client Quit]
Guest48 has joined #ruby
Guest65 has joined #ruby
Guest48 has quit [Client Quit]
libsys has quit [Ping timeout: 260 seconds]
libsys has joined #ruby
some14u has joined #ruby
comet23 has quit [Quit: Client closed]
taupiqueur_ has quit [Ping timeout: 272 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
some14u has quit [Client Quit]
oxfuxxx has joined #ruby
SobiX_ has joined #ruby
SobiX94 has joined #ruby
SobiX has quit [Quit: Ping timeout (120 seconds)]
oxfuxxx has quit [Read error: Connection reset by peer]
oxfuxxx has joined #ruby
SobiX94 has quit [Client Quit]
gproto23 has quit [Remote host closed the connection]
SobiX has joined #ruby
SobiX_ has quit [Read error: Connection reset by peer]
SobiX has quit [Client Quit]
some14u has joined #ruby
oxfuxxx has quit [Ping timeout: 245 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oxfuxxx has joined #ruby
ivanf has joined #ruby
SobiX has joined #ruby
oxfuxxx has quit [Ping timeout: 260 seconds]
shiru has joined #ruby
Guest48 has joined #ruby
splud has quit [Ping timeout: 240 seconds]
donofrio has quit [Ping timeout: 260 seconds]
Numocha has joined #ruby
Numocha has quit [Client Quit]
John_Ivan has joined #ruby
SobiX has quit [Quit: Client closed]
Guest48 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shiru has quit [Quit: leaving]
SobiX has joined #ruby
o|||||o has quit [Ping timeout: 260 seconds]
o|||||o has joined #ruby
goepsilongo has joined #ruby
goepsilongo_ has quit [Ping timeout: 250 seconds]
SobiX has quit [Ping timeout: 250 seconds]
some14u has joined #ruby
<adam12>
Morning
<Guest65>
Hello.
Guest65 is now known as nirvdrum
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest48 has joined #ruby
<adam12>
nirvdrum: Hello!
<heumeu>
'ello
splud has joined #ruby
SobiX has joined #ruby
<mooff>
hi there
cahoots has joined #ruby
<cahoots>
hi, is it possible to do named args + a variable arg in a function? i tried "def fn(allow_failure: false, show_output: true, *args)", but it doesn't work
<cahoots>
mooff, ty. also, if i just put *args at the start, it magically works
<mooff>
cahoots: that might be for backwards compatibility :)
<mooff>
before keyword args were added in Ruby 2, everyone used opts={} as a last parameter
<cahoots>
nice
<cahoots>
another q: what are people's favorite ways of writing an array of strings to be used in a shell command? e.g. system("echo", "hi") vs. system(*%W[echo hi])
<adam12>
cahoots: I manually quote, because some args might have spaces.
<adam12>
system("echo", "hello world")
hololeap has quit [Remote host closed the connection]
hololeap has joined #ruby
taupiqueur has joined #ruby
<mooff>
i have to check the docs each time, but be sure to use the form of system() etc that lets you pass user args safely :)
Tempesta has quit [Ping timeout: 265 seconds]
<mooff>
e.g. system("echo", "hello", unsafe_user_arg, "lol")
<mooff>
is there a good way to document "returns a Hash extended by ThisMixin" in yard?
rawley has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
spuz has joined #ruby
<spuz>
how do I find which versions of ruby I have installed using rbenv? when I run "rbenv install -L" as shown in the documentation, it lists dozens of ruby versions which are not actually installed locally
<heumeu>
spuz: rbenv install -l
<heumeu>
mind the casing
<spuz>
heumeu, actually looks like what I wanted was "rbenv versions". I think I dismissed that because it only lists "system" which is not what I expected
<spuz>
I wonder what -L actually does then - the docs say it lists "local versions". What is the difference between a local version of ruby and a locally installed version or ruby?
heumeu has quit [Remote host closed the connection]
taupiqueur_ has joined #ruby
d-s has quit [Remote host closed the connection]
taupiqueur has quit [Read error: Connection reset by peer]
heumeu has joined #ruby
<heumeu>
sorry went offline
taupiqueur has joined #ruby
taupiqueur_ has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
davidw has joined #ruby
<cahoots>
mooff, actually, it appears with my trick, i can't put named args at the start, which i want, and when i try your way with fn(['echo', 'hi']) it gives me an error
<cahoots>
i wonder if this is even possible
some14u has joined #ruby
<cahoots>
it appears not
some14u has quit [Client Quit]
wand has joined #ruby
nirvdrum has quit [Remote host closed the connection]
some14u has joined #ruby
some14u has quit [Client Quit]
Tempesta has joined #ruby
d-s has joined #ruby
<mooff>
yeah, the keyword args have to go last :(
<mooff>
btw, i think system(['echo', 'hi']) may not be what you want
<mooff>
you must be looking for system('echo', 'hi') ;)
<cahoots>
*%W :)
<havenwood>
cahoots separate arguments, so you'd have to splat the %w
<havenwood>
cahoots: ah, you put a splat - haha
nirvdrum has joined #ruby
SobiX has quit [Quit: Client closed]
SobiX has joined #ruby
nirvdrum has quit [Ping timeout: 250 seconds]
rawley has quit [Remote host closed the connection]
rawley has joined #ruby
dionysus69 has joined #ruby
TomyWork has joined #ruby
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
dionysus70 is now known as dionysus69
dionysus69 has quit [Ping timeout: 260 seconds]
Guest48 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12>
Possibly a good argument to not build an Array with %W in this case..
<oz>
iirc, there's also %x, if you want to use backticks instead of system
goepsilongo_ has joined #ruby
goepsilongo has quit [Ping timeout: 260 seconds]
szkl has quit [Quit: Connection closed for inactivity]
_ht has joined #ruby
goepsilongo has joined #ruby
goepsilongo_ has quit [Ping timeout: 260 seconds]
markong has quit [Ping timeout: 272 seconds]
nirvdrum has joined #ruby
SobiX has quit [Quit: Client closed]
SobiX has joined #ruby
emcb51 has joined #ruby
emcb5 has quit [Ping timeout: 260 seconds]
emcb51 is now known as emcb5
goepsilongo_ has joined #ruby
goepsilongo has quit [Ping timeout: 272 seconds]
mkara has joined #ruby
taupiqueur_ has joined #ruby
taupiqueur has quit [Ping timeout: 272 seconds]
mkara has left #ruby [Good Bye]
hd1 has joined #ruby
hd1 has left #ruby [#ruby]
fef has quit [Ping timeout: 240 seconds]
<John_Ivan>
hi, is there a more advanced string library/gem available for ruby?
<adam12>
John_Ivan: In what way?
spuz has quit [Ping timeout: 250 seconds]
<John_Ivan>
adam12, I find regex a little too unreadable and difficult to learn. I find that there's no middle ground between "basic string lib" and "complicated regex"
<adam12>
John_Ivan: What are you trying to do?
<weaksauce>
John_Ivan you can turn the regex into space agnostic and do it on many lines with comments if you need to
<weaksauce>
downside is you need to explicitly do spaces
<John_Ivan>
that middle ground I hope it to be a more advanced string library. perhaps with methods such as "getStringBetween() or getSubStringUntilChar(), substringFromPosition(), removeSubstringAtOccurenceOfString(), prefixStringToString, suffixStringToString, etc."
<John_Ivan>
if there's no such thing, then it's fine. I'll make my own. just wanted to make sure I'm not reinventing the wheel.
<weaksauce>
maybe
<weaksauce>
check awesome ruby
goepsilongo has joined #ruby
<John_Ivan>
alright. thanks.
goepsilongo_ has quit [Ping timeout: 260 seconds]
<adam12>
John_Ivan: Looks kind of like StringScanner.