havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.1, 3.0.3, 2.7.5: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
Guest48 has joined #ruby
Guest48 has quit [Client Quit]
phryk has quit [Read error: Connection reset by peer]
phryk has joined #ruby
moldorcoder7 has quit [Quit: %bye mirc%]
danjo0 has quit [Remote host closed the connection]
_aeris_ has joined #ruby
aeris has quit [Ping timeout: 240 seconds]
danjo0 has joined #ruby
_aeris_ is now known as aeris
moldorcoder7 has joined #ruby
goepsilongo has joined #ruby
ur5us_ has joined #ruby
freeworld has joined #ruby
freeworld has quit [Client Quit]
eddof13 has joined #ruby
Guest65 has joined #ruby
Guest48 has joined #ruby
Guest48 has quit [Client Quit]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gr33n7007h has quit [Ping timeout: 272 seconds]
gr33n7007h has joined #ruby
dka has quit [Ping timeout: 272 seconds]
dka has joined #ruby
Rounin has quit [Ping timeout: 260 seconds]
mixfix41 has quit [Ping timeout: 246 seconds]
mixfix41 has joined #ruby
libsys has quit [Remote host closed the connection]
libsys has joined #ruby
justOkay has quit [Quit: The Lounge - https://thelounge.chat]
justOkay has joined #ruby
Guest48 has joined #ruby
Guest65 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reset has quit [Quit: reset]
neshpion has joined #ruby
<ox1eef> that's one of the cool features of ruby, where other languages would yell about a syntax error.
Buggys has joined #ruby
o|||||o has quit [Ping timeout: 260 seconds]
RedNifre2 has quit [Ping timeout: 260 seconds]
comet23 has joined #ruby
RedNifre2 has joined #ruby
ur5us_ has quit [Ping timeout: 260 seconds]
Guest65 has joined #ruby
davidw has quit [Ping timeout: 272 seconds]
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
Guest65 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
Guest65 has joined #ruby
Guest65 has quit [Client Quit]
donofrio has quit [Ping timeout: 260 seconds]
neshpion has quit [Quit: neshpion]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
comet23 has quit [Ping timeout: 250 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
ur5us_ has joined #ruby
Guest48 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_ht has joined #ruby
teclator has joined #ruby
unyu has quit [Ping timeout: 240 seconds]
unyu has joined #ruby
roadie has joined #ruby
Guest48 has joined #ruby
Thanzex has quit [Read error: Connection reset by peer]
Thanzex has joined #ruby
_ht has quit [Remote host closed the connection]
ur5us_ has quit [Remote host closed the connection]
fef has joined #ruby
ur5us_ has joined #ruby
AEtherC0r3 has joined #ruby
szkl has joined #ruby
goepsilongo_ has joined #ruby
goepsilongo has quit [Ping timeout: 250 seconds]
d-s has joined #ruby
Rounin has joined #ruby
some14u has joined #ruby
ur5us_ has quit [Ping timeout: 245 seconds]
ur5us has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GvJordan has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
wand has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
oxfuxxx has joined #ruby
Tempesta has quit [Quit: See ya!]
gproto23 has joined #ruby
d-s|pl has joined #ruby
d-s has quit [Remote host closed the connection]
some14u has joined #ruby
donofrio has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
some14u has quit [Client Quit]
szkl has quit [Quit: Connection closed for inactivity]
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
some14u has quit [Client Quit]
some14u has joined #ruby
taupiqueur has joined #ruby
Tempesta has joined #ruby
gproto23 has quit [Quit: Leaving]
dionysus69 has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
taupiqueur has quit [Ping timeout: 260 seconds]
taupiqueur_ has joined #ruby
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
yxhuvud has joined #ruby
oxfuxxx has quit [Ping timeout: 260 seconds]
oxfuxxx has joined #ruby
markong has joined #ruby
SobiX has joined #ruby
Guest48 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SobiX98 has joined #ruby
SobiX98 has quit [Client Quit]
SobiX64 has joined #ruby
SobiX has quit [Ping timeout: 250 seconds]
oxfuxxx has quit [Ping timeout: 272 seconds]
Guest11 has joined #ruby
SobiX64 has quit [Client Quit]
Guest11 is now known as SobiX
SobiX is now known as SicilianSilicon
d-s|pl has quit [Read error: Connection reset by peer]
mbrndtgn has quit [Quit: The Lounge - https://thelounge.chat]
SicilianSilicon has quit [Quit: Client closed]
mbrndtgn has joined #ruby
SicilianSilicon has joined #ruby
d-s has joined #ruby
SicilianSilicon has quit [Client Quit]
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
<SobiX> Hola
<mooff> cahoots: def fn(allow_failure: false, show_output: true, **kwargs)
Fusl has quit [Quit: K-Lined]
Fusl has joined #ruby
szkl has joined #ruby
<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…]
AEtherC0r3 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
AEtherC0r3 has joined #ruby
cahoots has quit [Ping timeout: 260 seconds]
<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.
<adam12> Tho not entirely, so YMMV
<John_Ivan> adam12, yeah, something like that.
<John_Ivan> still looks a little raw but you get the point.
<jhass[m]> A simple .each_char do |c| case c; when x; update_some_state; end; end } can also go a long way
<adam12> jhass[m]: Interesting that it can be done so simple.
<adam12> I've been slightly obsessed with parsers lately.
<adam12> Tho that API seems kinda similar to StringScanner.
<adam12> @scanner.scan(/./) style.
<jhass[m]> Crystal's entire lexer basically looks the same, just... bigger :D
<jhass[m]> and it's even fast too!
<jhass[m]> Yes, it's called a pull parser
<jhass[m]> https://github.com/crystal-lang/crystal/blob/master/src/json/any.cr that's the turn it into a bag of objects thingy (you wouldn't use this much in crystal though)
taupiqueur has joined #ruby
taupiqueur_ has quit [Ping timeout: 260 seconds]
reset has quit [Quit: reset]
some14u has joined #ruby
some14u has quit [Client Quit]
_ht has quit [Remote host closed the connection]
heumeu has quit [Remote host closed the connection]
some14u has joined #ruby
ur5us has joined #ruby
TomyWork has quit [Quit: Leaving]
dviola has quit [Quit: WeeChat 3.4]
d-s has quit [Ping timeout: 260 seconds]
d-s has joined #ruby
seydar has joined #ruby
seydar has quit [Client Quit]
seydar has joined #ruby
<seydar> What's the preferred audio library for us? I'm looking to play wav files
<weaksauce> not sure there is one
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
<mooff> it might not be a bad idea to use Gosu
<mooff> (got the idea from https://stackoverflow.com/a/14993521)
SobiX has quit [Ping timeout: 250 seconds]
rawley has quit [Remote host closed the connection]
<weaksauce> big dependency but probably worth it
<mooff> audio playback is very OS specific
<seydar> i guess i just got jealous looking at rust's "audio" library
<mooff> it looks nice
<mooff> someone should make Ruby bindings for it :)
<seydar> grumble grumble grumble
<seydar> that would be a good project to do
<mooff> it's enough of an ordeal that the go-to libraries are usually portaudio or SDL2
<mooff> there are Ruby wrappers for both fwiw
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<mooff> on Linux alone there are 3 or 4 sound servers to support
<seydar> man it's odd that googling "ruby audio library" turned up like no results from the past 10 years
<seydar> ffi-portaudio is a library that was last updated 5 months ago, so thank you for specifically mentioning it, else i never would've found it
SobiX has joined #ruby
<weaksauce> damn that's a really tiny library wrapper
taupiqueur has quit [Ping timeout: 272 seconds]
taupiqueur has joined #ruby
Furai has quit [Quit: WeeChat 3.5]
<seydar> yeah, it's also super thin
emcb58 has joined #ruby
markong has joined #ruby
emcb5 has quit [Ping timeout: 260 seconds]
emcb58 is now known as emcb5
emcb54 has joined #ruby
<seydar> ruby2d is another alternative
emcb5 has quit [Ping timeout: 272 seconds]
emcb54 is now known as emcb5
o|||||o has quit [Remote host closed the connection]
o|||||o has joined #ruby
seydar has quit [Quit: leaving]
d-s has quit [Remote host closed the connection]
SobiX has quit [Ping timeout: 250 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
taupiqueur has quit [Quit: taupiqueur]
SobiX has joined #ruby
markong has quit [Ping timeout: 272 seconds]
SobiX has quit [Ping timeout: 250 seconds]
SobiX has joined #ruby
szkl has joined #ruby
howdoi has joined #ruby
hololeap has quit [Excess Flood]
hololeap has joined #ruby
reset has joined #ruby
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
weaksauce has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
rawley has joined #ruby