baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.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!
<nfk> so... why aren't you using it for everything?
<havenwood> I usually do command line apps. I've spent a lot more time making those. I'd like to hone my GUI skill though.
jane_booty_doe has quit [Quit: Leaving]
<havenwood> nfk: With command line, web and mobile - desktop guis are kinda last on my list. I like the idea of being able to do more on that front. Ruby doesn't have the best bindings story. Python has a lot more thorough coverage.
<nfk> i know, on one hand ffi sounds great, on the other when you get to writing your own binding, you know you made a bad life-choice :D
<baweaver> One chapter off to the reviewers, aiming for one more today.
<nfk> congratulations, i guess
<baweaver> the lemurs are coming
mostlybadfly has joined #ruby
Freshnuts has quit [Quit: Leaving]
<nfk> lovely, i like them; also as i was making more tea I realised the stiff in why the lucky stiff is not a penile joke as i had initially inferred but, considering the wikipedia article, likely is an idealization of a recently dead body
dviola has joined #ruby
jottr has joined #ruby
bryanray has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
peirama has joined #ruby
<nfk> wait, isn't Midas in "The Book" the marlboro guy?
peirama has quit [Ping timeout: 268 seconds]
m27frogy has joined #ruby
<nfk> oh no, gentoo has dropped jruby...
peirama has joined #ruby
faitswulff has joined #ruby
<dviola> archlinux has it on [community] :P
jottr has joined #ruby
t0xik is now known as t0x
dviola has quit [Quit: WeeChat 2.2]
faitswulff has quit [Ping timeout: 264 seconds]
dviola has joined #ruby
orbyt_ has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
gizmore has quit [Ping timeout: 252 seconds]
RedNifre has joined #ruby
<RedNifre> good evening
<RedNifre> how do I get the index of the first (or last) element in an array that matches the predicate of a given block, or nil if none matches?
<apeiros> see find_index
<RedNifre> ah, and rindex... thanks. Why is it named rindex and not find_index_r or something?
<apeiros> though rindex is the reverse of index, not of find_index
<apeiros> there's no reverse for find_index :-/
nadir has joined #ruby
<weaksauce> as they say... there are only two hard problems in computer science: cache invalidation, naming things and off by one errors
faitswulff has joined #ruby
<RedNifre> hang on... index with a block seems to do the same as find_index?
<RedNifre> ...so I'll pick index and rindex, to keep the naming consistent then.
* apeiros blinks
<apeiros> either I misremembered or something changed. but yes, it indeed seems index and find_index are one and the same. so rindex is the reverse of find_index.
<apeiros> ruby has too many aliases :(
nfk has quit [Quit: night]
arescorpio has quit [Quit: Leaving.]
bmurt has joined #ruby
apeiros has quit []
apeiros_ has joined #ruby
apeiros_ has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
llua has joined #ruby
RedNifre_ has joined #ruby
Azure has joined #ruby
RedNifre has quit [Ping timeout: 268 seconds]
\void has joined #ruby
Dabo has left #ruby ["Disconnected"]
donofrio_ has joined #ruby
donofrio has quit [Ping timeout: 268 seconds]
apeiros_ has joined #ruby
orbyt_ has joined #ruby
thy0 has quit [Quit: TTFN]
faitswulff has quit [Remote host closed the connection]
code_zombie has joined #ruby
bmurt has quit [Read error: Connection reset by peer]
siery has quit [Ping timeout: 268 seconds]
bryanray has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
segy has quit [Quit: ZNC - http://znc.in]
hfp_work has quit [Quit: bye]
hfp has quit [Quit: bye]
kapil___ has joined #ruby
segy has joined #ruby
braincrash has quit [Quit: bye bye]
donofrio__ has joined #ruby
jottr has joined #ruby
braincrash has joined #ruby
donofrio_ has quit [Ping timeout: 252 seconds]
jottr has quit [Ping timeout: 272 seconds]
crankhar1er has quit [Remote host closed the connection]
Rootsudo has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
faitswulff has joined #ruby
bryanray has joined #ruby
bryanray has quit [Client Quit]
bmurt has joined #ruby
faitswulff has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
segy has quit [Quit: ZNC - http://znc.in]
samort7 has quit [Quit: Leaving]
segy has joined #ruby
RedNifre_ has quit [Ping timeout: 244 seconds]
jaszhix has joined #ruby
LiftLeft2 has joined #ruby
LiftLeft has quit [Ping timeout: 264 seconds]
donofrio__ has quit [Read error: Connection reset by peer]
LiftLeft2 has quit [Ping timeout: 264 seconds]
donofrio has joined #ruby
segy has quit [Quit: ZNC - http://znc.in]
tdy has quit [Ping timeout: 268 seconds]
segy has joined #ruby
LiftLeft2 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
ramfjord has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
Freshnuts has joined #ruby
AJA4350 has quit [Quit: AJA4350]
\void has quit [Quit: So long, and thanks for all the fish.]
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
dbz has quit [Ping timeout: 268 seconds]
AndroidKitKat has joined #ruby
DTZUZO has quit [Ping timeout: 252 seconds]
jaszhix has quit [Remote host closed the connection]
jaszhix has joined #ruby
rippa has joined #ruby
nOgAnOo_ has quit [Ping timeout: 260 seconds]
peirama has quit [Remote host closed the connection]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
peirama has joined #ruby
doubledup has joined #ruby
peirama has quit [Remote host closed the connection]
peirama has joined #ruby
BTRE has joined #ruby
dbz has joined #ruby
jaszhix has quit [Remote host closed the connection]
jaszhix has joined #ruby
dbz has quit [Ping timeout: 272 seconds]
reber has joined #ruby
dbz has joined #ruby
dbz_ has joined #ruby
dbz has quit [Ping timeout: 252 seconds]
dbz_ has quit [Ping timeout: 264 seconds]
peirama has quit [Remote host closed the connection]
dbz has joined #ruby
tens0r has joined #ruby
dbz has quit [Ping timeout: 252 seconds]
dbz has joined #ruby
dbz has quit [Ping timeout: 244 seconds]
dbz has joined #ruby
jottr has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
jottr has quit [Ping timeout: 244 seconds]
dbz has quit [Ping timeout: 268 seconds]
ineb has quit [Quit: WeeChat 2.1]
bak1an has joined #ruby
tens0r has quit [Quit: tens0r]
dbz has joined #ruby
jaszhix has quit [Remote host closed the connection]
dbz has quit [Ping timeout: 264 seconds]
JoshS has quit [Ping timeout: 252 seconds]
JoshS has joined #ruby
peirama has joined #ruby
dbz has joined #ruby
peirama has quit [Ping timeout: 272 seconds]
dbz has quit [Ping timeout: 272 seconds]
dbz has joined #ruby
peirama has joined #ruby
Rootsudo has quit [Quit: Textual IRC Client: www.textualapp.com]
peirama has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby
duderonomy has quit [Ping timeout: 252 seconds]
peirama has joined #ruby
r3dc0d3r has quit [Ping timeout: 260 seconds]
r3dc0d3r has joined #ruby
peirama has quit [Ping timeout: 272 seconds]
rprimus has joined #ruby
jasmith has quit [Ping timeout: 272 seconds]
clemens3 has joined #ruby
peirama has joined #ruby
sameerynho has joined #ruby
dbz has quit [Remote host closed the connection]
peirama has quit [Ping timeout: 272 seconds]
DoubleMalt has quit [Remote host closed the connection]
peirama has joined #ruby
peirama has quit [Remote host closed the connection]
donofrio_ has joined #ruby
peirama has joined #ruby
conta has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
peirama has quit [Client Quit]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
donofrio has quit [Ping timeout: 252 seconds]
Freshnuts has quit [Quit: Leaving]
ramfjord has joined #ruby
jottr has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
ramfjord has joined #ruby
dbz has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
dbz has quit [Ping timeout: 264 seconds]
conta has quit [Quit: conta]
kapil___ has joined #ruby
dinfuehr has joined #ruby
mike11 has joined #ruby
alex`` has joined #ruby
ramfjord has joined #ruby
eb0t is now known as eblip
ramfjord has quit [Remote host closed the connection]
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
conta has joined #ruby
ramfjord has joined #ruby
code_zombie has quit [Quit: Leaving]
conta has quit [Quit: conta]
<isene> Using getoptlong, what is the best way to catch an error where the user fails to supply a required argument? Cause right now my script simply fails and spews out the usual Ruby errors.
LiftLeft2 is now known as LiftLeft
<apeiros_> isene: can you paste the exception you get here? (not the full backtrace, only the exception)
apeiros_ is now known as apeiros
<isene> Sorry, afk, will be back to laptop later. Just want to catch any error thrown for lacking required argument with an getoptlong option.
<apeiros> I understood that.
DTZUZO has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_whitelogger has joined #ruby
donofrio__ has joined #ruby
donofrio_ has quit [Ping timeout: 252 seconds]
lomex has joined #ruby
roshanavand has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
ferhaty has joined #ruby
thy0 has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RedNifre_ has joined #ruby
nfk has joined #ruby
faitswulff has joined #ruby
AJA4350 has joined #ruby
jottr has joined #ruby
faitswulff has quit [Ping timeout: 252 seconds]
jottr has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
hfp_work has joined #ruby
hfp has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
ferhaty has quit [Quit: ferhaty]
cliluw has quit [Ping timeout: 252 seconds]
dviola has quit [Quit: WeeChat 2.2]
faitswulff has joined #ruby
ikbenhet has joined #ruby
ikbenhet has quit [Client Quit]
trif has joined #ruby
postmodern has quit [Quit: Leaving]
mike11 has quit [Ping timeout: 264 seconds]
JoshS has quit [Ping timeout: 252 seconds]
rann has joined #ruby
doubledup has quit [Remote host closed the connection]
doubledup has joined #ruby
doubledup has quit [Remote host closed the connection]
doubledup has joined #ruby
lomex has joined #ruby
sarna has joined #ruby
ramfjord has joined #ruby
faitswulff has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 244 seconds]
faitswulff has joined #ruby
faitswulff has quit [Remote host closed the connection]
<isene> apeiros: Finally back from the trip to town, here's the error: https://dpaste.de/60KU
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lomex has joined #ruby
lomex has quit [Client Quit]
<apeiros> isene: ok, so take look at the last line there. it tells you which exception to rescue.
faitswulff has joined #ruby
faitswulff has quit [Remote host closed the connection]
faitswulff has joined #ruby
faitswulff has quit [Remote host closed the connection]
faitswulff has joined #ruby
ArahaelPi has quit [Ping timeout: 244 seconds]
DTZUZO has quit [Ping timeout: 268 seconds]
lomex has joined #ruby
doubledup has quit [Quit: Leaving]
jane_booty_doe has joined #ruby
RedNifre_ has quit [Ping timeout: 252 seconds]
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lomex has joined #ruby
lomex has quit [Client Quit]
<isene> But where do I rescue it?
<apeiros> isene: if you look at the backtrace, go up until you hit one of your files. that's usually where you want to place your rescue.
jane_booty_doe has quit [Quit: Leaving]
RedNifre_ has joined #ruby
bryanray has joined #ruby
bryanray has quit [Client Quit]
faitswulff has quit [Remote host closed the connection]
bryanray has joined #ruby
faitswulff has joined #ruby
ArahaelPi has joined #ruby
bryanray has quit [Client Quit]
bak1an has joined #ruby
faitswulff has quit [Client Quit]
mikhael_k33hl has quit [Quit: Page closed]
doubledup has joined #ruby
_whitelogger has joined #ruby
manakanapa5 has quit [Quit: The Lounge - https://thelounge.chat]
despai has joined #ruby
AndroidKitKat has quit []
fmcgeough has quit [Quit: fmcgeough]
RedNifre_ has quit [Quit: ZZ]
ramfjord has joined #ruby
mroutis has joined #ruby
dellavg_ has joined #ruby
ramfjord has quit [Ping timeout: 268 seconds]
sarna has quit [Quit: Quit]
orbyt_ has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
dbz has joined #ruby
sticaz has quit [Quit: My name Heff]
dbz has quit [Ping timeout: 268 seconds]
sarna has joined #ruby
<sarna> hey guys, how does ruby compare to python/go when it comes to non-webby stuff? CLI tools and such
<apeiros> since I don't do python or go, I can't compare. but IMO it suits itself well for CLI tools. there's plenty of library support and for silly short one-line scripts, ruby has inherited some nice options from perl (-p and -n mainly)
<sarna> apeiros: I'm just curious about how rails-centered is ruby these days
<sarna> I'd really like to use it for something, I've been learning it on exercism and it's just wonderful, the language and the community
<sarna> but I don't do any web stuff :^(
<apeiros> sarna: then don't do webstuff. ruby is a general purpose language. do whatever you feel like with it :)
<mroutis> to replace tools like AWK processing ^
<sarna> mroutis: thanks!!
<mroutis> your welcome, sarna
<sarna> apeiros: well yeah, but are there many general-purpose libraries?
<bougyman> word of warning: ruby can do awkish stuff, but awk does a lot of awk stuff better.
<bougyman> sarna: of course.
<sarna> bougyman: very nice :^)
<mroutis> sarna: here's a list with a lot of libraries http://awesome-ruby.com/
<sarna> then I'll be asking some silly questions soon, see ya o/ and thanks for help
<sarna> mroutis: thank you :)
<mroutis> sarna: there's a Robotics, Video, etc.
* sarna gets even more excited
RedNifre has joined #ruby
<RedNifre> Is there something like hoogle where I can enter a function signature and find matching ruby functions?
<mroutis> I don't think so, RedNifre, as ruby is more OOP than functional; I mean there's the concept of sending messages to objects, rather than functions applied to structures or something like that
<mroutis> you can search the ruby docs, is pretty neat!
<mroutis> RedNifre: if you wan't to know what messages you can send to the object you are using, just search for it on the docs, like: https://ruby-doc.org/core-2.5.1/Array.html
<RedNifre> Yeah, but how to search for a function that takes three numbers and returns a bounded result, e.g. boundBy(0, x, 5) returns x if it is between 0 and 5 , and 0 or 5 otherwise
<RedNifre> I'd like to do number -> number -> number -> number and see all matching functions or methods or something.
<RedNifre> right now, implementing that function seems easier than finding it
<sarna> hey, should I install rbenv with `rbenv-installer` or with my package manager? (I'm on Arch Linux)
<mroutis> sarna: I did package manager (for the system wide ruby) and ruby-install/chruby for different rubies; Some packages in arch requires Ruby, probably, you'll end up installing a system wide ruby anyways
<sarna> mroutis: I see, thanks
nowhereman is now known as nowhere_man
<mroutis> RedNifre: is `(0..5).include? x` is what you are looking fur?
<mroutis> >> (0..5).include? 1
<ruby[bot]> mroutis: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
blandflakes has joined #ruby
<mroutis> >> (0..5).include?(1)
<ruby[bot]> mroutis: # => true (https://eval.in/1050826)
fmcgeough has joined #ruby
tdy has joined #ruby
sarna has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 252 seconds]
tdy has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
dbz has joined #ruby
Nicmavr has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dbz has quit [Ping timeout: 268 seconds]
dbz has joined #ruby
<RedNifre> no, not boolean, I want it to return 1 because 1 is between 0 and 5
jamesaxl has joined #ruby
conta has joined #ruby
solocshaw has joined #ruby
gr33n7007h1 has joined #ruby
gr33n7007h1 is now known as al2o3-cr
duderonomy has joined #ruby
tdy has quit [Ping timeout: 268 seconds]
salasrod has quit [Quit: /quit]
salasrod has joined #ruby
<RedNifre> Can I do a switch/case with regexes?
ellcs has joined #ruby
<RedNifre> oh, i can... nice
kevinsjoberg has joined #ruby
ellcs has quit [Ping timeout: 276 seconds]
segy has quit [Ping timeout: 272 seconds]
pskosinski has joined #ruby
solocshaw has quit [Quit: solocshaw]
conta has quit [Quit: conta]
segy has joined #ruby
Alina-malina has quit [Ping timeout: 268 seconds]
orbyt_ has joined #ruby
<weaksauce> >> x = 1; 1 if (0..5).include?(x)
<ruby[bot]> weaksauce: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<weaksauce> >> x = 1; x if (0..5).include?(x)
<ruby[bot]> weaksauce: # => 1 (https://eval.in/1050838)
<weaksauce> one thing about ruby is "can i do xyz with asd?" usually is a oh wow they added that too answer
<weaksauce> how convenient
segy has quit [Ping timeout: 268 seconds]
<weaksauce> little slow today ruby[bot] eh?
segy has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
nielsk has quit [Read error: Connection reset by peer]
nielsk has joined #ruby
jasmith has joined #ruby
ByronJohnson has quit [Remote host closed the connection]
ByronJohnson has joined #ruby
kapil___ has joined #ruby
ByronJohnson has quit [Ping timeout: 244 seconds]
Guest9940 has joined #ruby
Guest9940 is now known as levifig
tdy has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
<apeiros> ?bot
<ruby[bot]> apeiros: I don't know anything about bot
<apeiros> weaksauce: na, just eval.in being slow and broken :(
<apeiros> we need a replacement for that
mroutis has quit [Ping timeout: 272 seconds]
BaroMeter has joined #ruby
<weaksauce> ah
BaroMeter has quit [Client Quit]
<apeiros> unless somebody else does it before me, I intend to at least fix the "NoMethodError:undefined method `[]' for nil:NilClass" bug and add a timer to respond after ~1s with "I sent your code to eval.in for evaluation and don't yet have a result, I'll report as soon as I get it" (or somesuch)
<apeiros> +around april next year.
<weaksauce> lol
<weaksauce> is it opensource?
<apeiros> no, but I can provide you its source if you're interested in working on it.
<weaksauce> sure
Alina-malina has joined #ruby
ellcs has joined #ruby
nfk has joined #ruby
<nfk> what's this visual ruby thing? i don't recall anyone ever mentioning it and the ruby toolbox does not list it as a gui framework either
Freshnuts has joined #ruby
Freshnuts has quit [Excess Flood]
Freshnuts has joined #ruby
Freshnuts has quit [Excess Flood]
Freshnuts has joined #ruby
tdy has quit [Ping timeout: 272 seconds]
ellcs has quit [Ping timeout: 276 seconds]
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doubledup has quit [Quit: Leaving]
dellavg_ has quit [Ping timeout: 252 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bryanray has joined #ruby
bryanray has quit [Client Quit]
ur5us has joined #ruby
dbz has quit [Remote host closed the connection]
donofrio__ has quit [Quit: Leaving]
donofrio__ has joined #ruby
JoshS has joined #ruby
jaszhix has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
kapil___ has quit [Quit: Connection closed for inactivity]
tdy has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
graphene has joined #ruby
DTZUZO has joined #ruby
alex`` has quit [Quit: WeeChat 2.2]
nofxx has quit [Remote host closed the connection]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
despai has quit [Ping timeout: 252 seconds]
reber has quit [Remote host closed the connection]
dbz has joined #ruby
dbz has quit [Remote host closed the connection]
DTZUZO has quit [Ping timeout: 244 seconds]
segy has quit [Max SendQ exceeded]
segy has joined #ruby
Azure has quit [Ping timeout: 244 seconds]
dbz has joined #ruby
k0mpa has joined #ruby
bryanray has joined #ruby
tdy has quit [Ping timeout: 268 seconds]
DTZUZO has joined #ruby
JoshS has quit [Remote host closed the connection]
JoshS has joined #ruby
<RedNifre> what's the simplest way to read/write yaml? Reading seems to be YAML.read_file, but I can't find the right documentation for any of this.
<havenwood> ?ri Psych
<ruby[bot]> havenwood: I don't see no Psych, whom should I tell about ri?
JoshS has quit [Ping timeout: 252 seconds]
zenspider has joined #ruby