<mkaito>
hey is there something more succinct than `foo = bar if bar`?
<mkaito>
that is, set foo to bar unless bar is falsey, presumably nil
sylario has quit [Quit: Connection closed for inactivity]
cagomez has joined #ruby
juggler has quit [Ping timeout: 258 seconds]
harai has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
jenrzzz_ has quit [Ping timeout: 240 seconds]
raul782 has joined #ruby
claudevandort has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kies has joined #ruby
cagomez has quit [Read error: Connection reset by peer]
cagomez has joined #ruby
raul782 has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has quit [Ping timeout: 248 seconds]
enterprisey has joined #ruby
tamouse__ has joined #ruby
jphase_ has joined #ruby
orbyt_ has joined #ruby
jphase has quit [Ping timeout: 258 seconds]
tamouse__ has quit [Ping timeout: 260 seconds]
j416 has quit [Ping timeout: 260 seconds]
AnoHito_ has joined #ruby
j416 has joined #ruby
reaVer_ has quit [Ping timeout: 240 seconds]
AnoHito has quit [Ping timeout: 240 seconds]
reaVer has joined #ruby
nuck has joined #ruby
j416 has quit [Ping timeout: 248 seconds]
Defenestrate has quit [Quit: This computer has gone to sleep]
Emmanuel_Chanel has joined #ruby
Defenestrate has joined #ruby
j416 has joined #ruby
cdg has joined #ruby
jinie has quit [Ping timeout: 258 seconds]
jinie has joined #ruby
Defenestrate has quit [Client Quit]
cdg has quit [Ping timeout: 246 seconds]
guardianx has joined #ruby
guardianx is now known as WinnebagoMan
cagomez has quit [Remote host closed the connection]
Defenestrate has joined #ruby
Defenestrate has quit [Max SendQ exceeded]
Defenestrate has joined #ruby
Defenestrate has quit [Changing host]
Defenestrate has joined #ruby
Defenestrate has quit [Quit: This computer has gone to sleep]
_aeris_ has quit [Ping timeout: 248 seconds]
kies has quit [Ping timeout: 255 seconds]
elsevero has quit [Ping timeout: 260 seconds]
jphase_ is now known as jphase
bronson has joined #ruby
govg has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
gnufied has joined #ruby
Ouchy`w has quit []
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bambanx has joined #ruby
treeveins has joined #ruby
<tcopeland>
xco: perhaps the objects in locations have overridden the comparison operator?
<tcopeland>
>> class String ; def <=>(s2) ; nil ; end ; end ; ["1", "2"].sort {|a,b| a <=> b }
<ruby[bot]>
tcopeland: # => comparison of String with String failed (ArgumentError) ...check link for more (https://eval.in/870733)
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
gnufied has quit [Ping timeout: 246 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<treeveins>
first time caller. i'm trying to extract a value from a key-value pair after retrieving using httparty. not quite sure how to do it though. help?
_aeris_ has joined #ruby
<xco>
tcopeland: thank you :)
<tcopeland>
you bet!
gix has quit [Ping timeout: 248 seconds]
jdawgaz has joined #ruby
uneeb has joined #ruby
xco has quit [Read error: Connection reset by peer]
WinnebagoMan has quit []
mim1k has joined #ruby
xco has joined #ruby
gix has joined #ruby
Caius has quit [Ping timeout: 264 seconds]
uneeb has quit [Read error: Connection reset by peer]
kaibro has quit [Ping timeout: 248 seconds]
skweek has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
mim1k has quit [Ping timeout: 258 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
treeveins: probably deserialize it and then check that key's value
<havenwood>
treeveins: JSON?
<havenwood>
treeveins: HTTParty has some fancy JSON stuff if you want to use that instead of doing it straightforwardly.
<treeveins>
thanks, all. i'll poke around with those suggestions. in case it changes anything, here's an example of what i'm pulling and then looking through... page = HTTParty.get('https://itunes.apple.com/lookup?id=1224213087';)
tamouse__ has joined #ruby
enterprisey has quit [Remote host closed the connection]
cagomez has quit [Ping timeout: 258 seconds]
milardovich has joined #ruby
dviola has quit [Quit: WeeChat 1.9.1]
joelwallis has quit []
tamouse__ has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 260 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
kies has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgr has joined #ruby
gusrub has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 246 seconds]
rgr has quit [Client Quit]
ramfjord has joined #ruby
ElDoggo has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
bronson has joined #ruby
ur5us has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 258 seconds]
alfiemax has joined #ruby
ElDoggo has quit [Ping timeout: 258 seconds]
<alfiemax>
hi guys..
<alfiemax>
nee some help formating a date object to look like "2017-09-27T23:59:59.999"
bronson has quit [Ping timeout: 258 seconds]
alfiemax_ has joined #ruby
<alfiemax_>
anyone?
rgr has joined #ruby
mim1k has joined #ruby
Ouchy`w has joined #ruby
rabajaj has joined #ruby
Ouchy`w has quit [Client Quit]
millerti has quit [Ping timeout: 258 seconds]
Dimik has quit []
Dimik has joined #ruby
ElDoggo_ has joined #ruby
<elomatreb>
Is that just ISO8601? Because there is a prebuilt method for that
<elomatreb>
Otherwise, strftime is your friend
<alfiemax_>
yea i think that is
<alfiemax_>
i did it using strftime.. but was wondering if there in a builtin method
ledestin has joined #ruby
alfiemax has quit [Ping timeout: 258 seconds]
ElDoggo has joined #ruby
Ouchy has quit [Ping timeout: 246 seconds]
<alfiemax_>
found it
<elomatreb>
There is, #iso_8601
Defenestrate has joined #ruby
Defenestrate has quit [Max SendQ exceeded]
mim1k has quit [Ping timeout: 248 seconds]
Defenestrate has joined #ruby
ElDoggo_ has quit [Ping timeout: 260 seconds]
ElDoggo__ has joined #ruby
ElDoggo has quit [Ping timeout: 240 seconds]
ElDogg___ has joined #ruby
ElDoggo_ has joined #ruby
ElDoggo__ has quit [Ping timeout: 258 seconds]
cagomez has joined #ruby
ElDogg___ has quit [Ping timeout: 240 seconds]
ElDoggo__ has joined #ruby
ElDoggo_ has quit [Ping timeout: 248 seconds]
cagomez has quit [Ping timeout: 258 seconds]
ElDoggo_ has joined #ruby
noobineer has joined #ruby
ElDoggo__ has quit [Ping timeout: 240 seconds]
csk has quit [Quit: ZZZzzz…]
ElDoggo_ has quit [Ping timeout: 248 seconds]
ElDoggo_ has joined #ruby
roshanavand_ has joined #ruby
csk has joined #ruby
AnoHito has joined #ruby
roshanavand has quit [Ping timeout: 258 seconds]
ElDoggo_ has quit [Ping timeout: 248 seconds]
AnoHito_ has quit [Ping timeout: 240 seconds]
paradisaeidae has joined #ruby
paradisaeidae_ has joined #ruby
acalycine has joined #ruby
ElDoggo has joined #ruby
acalycine has quit [Client Quit]
shinnya has quit [Ping timeout: 240 seconds]
treeveins has quit [Quit: Page closed]
ElDoggo_ has joined #ruby
Miron has quit [Ping timeout: 255 seconds]
cats has quit [Ping timeout: 255 seconds]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ElDoggo__ has joined #ruby
ElDoggo has quit [Ping timeout: 258 seconds]
noobineer has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
ElDoggo has joined #ruby
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
ElDogg___ has joined #ruby
ElDoggo_ has quit [Ping timeout: 240 seconds]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
ElDoggo__ has quit [Ping timeout: 240 seconds]
tamouse__ has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
ElDoggo has quit [Ping timeout: 248 seconds]
jdawgaz has joined #ruby
ElDoggo has joined #ruby
jdawgaz has quit [Client Quit]
smelnicki has quit [Remote host closed the connection]
Heph_ has quit [Quit: Leaving]
ElDogg___ has quit [Ping timeout: 248 seconds]
ElDogg___ has joined #ruby
tamouse__ has quit [Ping timeout: 248 seconds]
enterprisey has joined #ruby
gusrub has joined #ruby
ElDoggo has quit [Ping timeout: 258 seconds]
ElDogg___ has quit [Ping timeout: 258 seconds]
Bock has joined #ruby
cjs226 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troys_ is now known as troys
ElDoggo has joined #ruby
ElDogg___ has joined #ruby
ElDoggo has quit [Ping timeout: 240 seconds]
Ishido has joined #ruby
gusrub has quit [Remote host closed the connection]
jphase has quit [Remote host closed the connection]
ElDogg___ has quit [Ping timeout: 240 seconds]
rgr_ has joined #ruby
rgr has quit [Remote host closed the connection]
raul782 has joined #ruby
raul782 has quit [Ping timeout: 248 seconds]
Defenestrate has quit [Quit: This computer has gone to sleep]
Defenestrate has joined #ruby
Defenestrate has quit [Client Quit]
Defenestrate has joined #ruby
Defenestrate has quit [Client Quit]
Defenestrate has joined #ruby
ElDoggo has joined #ruby
Defenestrate has quit [Remote host closed the connection]
Defenestrate has joined #ruby
Defenestrate has quit [Client Quit]
Defenestrate has joined #ruby
Defenestrate has quit [Changing host]
Defenestrate has joined #ruby
Defenestrate has quit [Client Quit]
jphase has joined #ruby
ElDoggo_ has joined #ruby
ElDoggo has quit [Ping timeout: 248 seconds]
cagomez has joined #ruby
aupadhye has joined #ruby
paolo_ has joined #ruby
oleo has quit [Quit: Leaving]
jphase has quit [Ping timeout: 258 seconds]
ElDoggo_ has quit [Ping timeout: 248 seconds]
jamesaxl has quit [Quit: WeeChat 1.8]
cagomez has quit [Ping timeout: 264 seconds]
capadesu has joined #ruby
djbkd has joined #ruby
BaconOverflow has joined #ruby
pilne has quit [Quit: Quitting!]
ElDoggo has joined #ruby
anisha has joined #ruby
uZiel has joined #ruby
ElDoggo has quit [Ping timeout: 255 seconds]
ElDoggo has joined #ruby
psmolen has quit [Ping timeout: 240 seconds]
ElDoggo_ has joined #ruby
psmolen has joined #ruby
ElDoggo__ has joined #ruby
ElDoggo has quit [Ping timeout: 248 seconds]
ElDogg___ has joined #ruby
vondruch has quit [Quit: vondruch]
ElDoggo_ has quit [Ping timeout: 246 seconds]
vondruch has joined #ruby
ElDoggo has joined #ruby
ElDoggo__ has quit [Ping timeout: 258 seconds]
ElDoggo_ has joined #ruby
milardovich has joined #ruby
ElDogg___ has quit [Ping timeout: 248 seconds]
vondruch has quit [Client Quit]
ElDoggo has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
ElDoggo has joined #ruby
ElDoggo_ has quit [Ping timeout: 248 seconds]
ElDoggo_ has joined #ruby
milardovich has quit [Ping timeout: 258 seconds]
oetjenj has joined #ruby
snickers has joined #ruby
quobo has joined #ruby
ElDoggo has quit [Ping timeout: 258 seconds]
psmolen has quit [Ping timeout: 258 seconds]
ElDoggo_ has quit [Ping timeout: 258 seconds]
psmolen has joined #ruby
claudiuinberlin has joined #ruby
jphase has joined #ruby
ElDoggo_ has joined #ruby
gusrub has joined #ruby
andikr has joined #ruby
ElDogg___ has joined #ruby
jphase has quit [Ping timeout: 258 seconds]
ramfjord has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.93 [Firefox 55.0.3/20170824123605]]
paradisaeidae_ has quit [Quit: ChatZilla 0.9.93 [Firefox 55.0.3/20170824123605]]
ElDoggo_ has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
mostlybadfly has joined #ruby
ElDoggo has joined #ruby
ElDogg___ has quit [Ping timeout: 240 seconds]
shime has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
MarkBilk has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rabajaj has quit [Quit: Leaving]
ramfjord has joined #ruby
rabajaj has joined #ruby
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
ElDoggo has quit [Ping timeout: 248 seconds]
bronson has quit [Ping timeout: 248 seconds]
alfiemax_ has quit [Remote host closed the connection]
naprimer2 has joined #ruby
alfiemax has joined #ruby
gusrub has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 240 seconds]
naprimer has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
ElDoggo_ has joined #ruby
cdg has joined #ruby
ElDoggo has joined #ruby
conta has joined #ruby
alfiemax has quit [Ping timeout: 258 seconds]
ElDoggo_ has quit [Ping timeout: 258 seconds]
ElDoggo_ has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
cdg has quit [Ping timeout: 258 seconds]
ElDogg___ has joined #ruby
ElDoggo has quit [Ping timeout: 258 seconds]
ElDoggo has joined #ruby
capadesu has quit []
ElDoggo__ has joined #ruby
cjs226 has joined #ruby
guardianx has joined #ruby
ElDoggo_ has quit [Ping timeout: 248 seconds]
ElDog____ has joined #ruby
ElDogg___ has quit [Ping timeout: 248 seconds]
shime has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
ElDoggo has quit [Ping timeout: 248 seconds]
ElDoggo__ has quit [Ping timeout: 258 seconds]
mtkd has quit [Read error: Connection reset by peer]
^mtkd has joined #ruby
ElDog____ has quit [Ping timeout: 255 seconds]
harai has quit [Ping timeout: 248 seconds]
djbkd has quit []
troys has quit [Quit: Bye]
ElDoggo_ has joined #ruby
rabajaj has quit [Remote host closed the connection]
cjs226 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
TomyWork has quit [Remote host closed the connection]
ams__ has joined #ruby
marr has joined #ruby
TomyWork has joined #ruby
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 255 seconds]
Silthias has joined #ruby
ElDoggo has joined #ruby
tamouse__ has joined #ruby
Silthias1 has quit [Ping timeout: 240 seconds]
ElDoggo_ has joined #ruby
ElDoggo has quit [Ping timeout: 240 seconds]
tamouse__ has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
ElDoggo_ has quit [Ping timeout: 258 seconds]
tvw has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
mikecmpbll has joined #ruby
ElDogg___ has joined #ruby
ElDog____ has joined #ruby
ElDogg___ has quit [Ping timeout: 258 seconds]
ElDog____ has quit [Ping timeout: 258 seconds]
bronson has joined #ruby
ElDoggo__ has joined #ruby
ElDogg___ has joined #ruby
ElDog____ has joined #ruby
bronson has quit [Ping timeout: 246 seconds]
uZiel has quit [Ping timeout: 248 seconds]
ElDoggo__ has quit [Ping timeout: 240 seconds]
ElDogg___ has quit [Ping timeout: 240 seconds]
ElDogg___ has joined #ruby
ElDog____ has quit [Ping timeout: 240 seconds]
imode has quit [Ping timeout: 255 seconds]
ElDogg___ has quit [Ping timeout: 248 seconds]
lxsameer has joined #ruby
jaruga has joined #ruby
ElDoggo has joined #ruby
ElDoggo__ has joined #ruby
ElDoggo has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
ElDogg___ has joined #ruby
BaconOverflow has quit [Quit: Connection closed for inactivity]
cjs226 has joined #ruby
ElDoggo__ has quit [Ping timeout: 248 seconds]
ElDoggo__ has joined #ruby
ElDoggo has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
Beams has joined #ruby
ElDogg___ has quit [Ping timeout: 240 seconds]
cjs226 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ElDoggo__ has quit [Ping timeout: 240 seconds]
ElDoggo_ has joined #ruby
ElDoggo has quit [Ping timeout: 246 seconds]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
ElDoggo_ has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
enterprisey has quit [Quit: Leaving]
milardovich has quit [Ping timeout: 240 seconds]
quobo has quit [Quit: Connection closed for inactivity]
uZiel has joined #ruby
ElDoggo has joined #ruby
ElDoggo_ has joined #ruby
roshanavand__ has joined #ruby
ElDoggo__ has joined #ruby
roshanavand_ has quit [Remote host closed the connection]
ElDogg___ has joined #ruby
ElDoggo has quit [Ping timeout: 240 seconds]
ElDoggo has joined #ruby
ElDoggo_ has quit [Ping timeout: 240 seconds]
ElDoggo_ has joined #ruby
Valkyrie_ has joined #ruby
ElDoggo__ has quit [Ping timeout: 248 seconds]
ElDoggo__ has joined #ruby
shinnya has joined #ruby
ElDogg___ has quit [Ping timeout: 258 seconds]
ElDog____ has joined #ruby
Tempesta has quit [Ping timeout: 248 seconds]
Valkyrie_ is now known as Tempesta
Tempesta has quit [Changing host]
Tempesta has joined #ruby
ElDoggo has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
ElDoggo has joined #ruby
ElDoggo_ has quit [Ping timeout: 248 seconds]
ElDoggo__ has quit [Ping timeout: 248 seconds]
quobo has joined #ruby
ElDoggo__ has joined #ruby
Serpent7776 has joined #ruby
ElDog____ has quit [Ping timeout: 258 seconds]
ElDogg___ has joined #ruby
ElDoggo has quit [Ping timeout: 248 seconds]
ElDoggo has joined #ruby
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ElDoggo__ has quit [Ping timeout: 264 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
ElDoggo_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
ElDoggo__ has joined #ruby
ElDogg___ has quit [Ping timeout: 248 seconds]
ElDoggo has quit [Ping timeout: 248 seconds]
rabajaj has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
ElDoggo_ has quit [Ping timeout: 260 seconds]
ElDoggo__ has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
rabajaj has quit [Quit: Leaving]
rikkipitt has joined #ruby
ElDoggo_ has joined #ruby
gregf_ has quit [Ping timeout: 260 seconds]
ElDoggo_ has quit [Ping timeout: 258 seconds]
r7c has quit [Quit: Leaving]
paranoicsan has joined #ruby
paranoicsan is now known as paranoicsan[Away
paranoicsan[Away is now known as paranoicsan
paranoicsan is now known as paranoicsan[Away
paranoicsan[Away has quit [Client Quit]
jenrzzz has quit [Ping timeout: 240 seconds]
ElDoggo has joined #ruby
ElDoggo has quit [Ping timeout: 240 seconds]
syndikate has quit [Ping timeout: 248 seconds]
NightMonkey has quit [Ping timeout: 248 seconds]
pabs has quit [Ping timeout: 248 seconds]
pabs has joined #ruby
solos has quit [Ping timeout: 248 seconds]
xco has quit [Ping timeout: 240 seconds]
syndikate has joined #ruby
tamouse__ has joined #ruby
ElDoggo has joined #ruby
cats has joined #ruby
Miron has joined #ruby
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ElDoggo_ has joined #ruby
rikkipitt has quit [Remote host closed the connection]
rikkipitt has joined #ruby
tamouse__ has quit [Ping timeout: 248 seconds]
NightMonkey has joined #ruby
ElDoggo has quit [Ping timeout: 260 seconds]
jameser has quit [Ping timeout: 258 seconds]
ElDoggo has joined #ruby
ElDoggo_ has quit [Ping timeout: 260 seconds]
ElDoggo__ has joined #ruby
r7c has joined #ruby
ElDoggo_ has joined #ruby
jameser has joined #ruby
ElDoggo has quit [Ping timeout: 258 seconds]
ElDoggo has joined #ruby
ElDoggo__ has quit [Ping timeout: 260 seconds]
solos has joined #ruby
ElDoggo_ has quit [Ping timeout: 248 seconds]
ElDoggo_ has joined #ruby
tvw has quit [Remote host closed the connection]
ElDoggo has quit [Ping timeout: 248 seconds]
ElDoggo has joined #ruby
FastJack has quit [Read error: Connection reset by peer]
xco has joined #ruby
jameser has quit [Read error: Connection reset by peer]
ElDoggo_ has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
ElDoggo has quit [Ping timeout: 248 seconds]
anisha has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
anisha has joined #ruby
FastJack has joined #ruby
charliesome has quit [Client Quit]
xco has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.9.1]
tcopeland has quit [Quit: tcopeland]
cdg has quit [Ping timeout: 258 seconds]
biberu has joined #ruby
ElDoggo has joined #ruby
doublemalt_ has joined #ruby
elsevero has joined #ruby
ElDoggo has quit [Ping timeout: 248 seconds]
gr33n7007h has joined #ruby
DoubleMalt has quit [Ping timeout: 248 seconds]
digitalowl has joined #ruby
ElDoggo has joined #ruby
<digitalowl>
Hello, guys. Who can help me with 'require' and autoloading modules?
ramfjord has joined #ruby
<elomatreb>
1. State your problem, don't ask to ask. 2. Autoloading isn't exactly common in Ruby, generally explicit requires for everything are used
ElDoggo__ has joined #ruby
gr33n7007h has quit [Ping timeout: 240 seconds]
ElDogg___ has joined #ruby
<digitalowl>
Ok, sorry for my mistake. I have two linux distros in prod - Arch and CentOS. On each distro I have same versions of ruby (2.0.0) and gems. I use rails for some applications and run same code on each distros.
ElDog____ has joined #ruby
ElDoggo has quit [Ping timeout: 240 seconds]
<digitalowl>
And I have a problem with module Resolv. On CentOS in rails console thats module is loaded by default, but on Arch is not and application don't working.
ramfjord has quit [Ping timeout: 248 seconds]
ElDoggo__ has quit [Ping timeout: 258 seconds]
ElDogg___ has quit [Ping timeout: 264 seconds]
ElDog____ has quit [Ping timeout: 248 seconds]
sepp2k has joined #ruby
rikkipitt has quit [Quit: Leaving...]
doublemalt_ has quit [Remote host closed the connection]
John__ has joined #ruby
chmurifree is now known as chmuri
apparition has joined #ruby
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
dionysus69 has quit [Ping timeout: 260 seconds]
raz has left #ruby ["*fump*"]
ElDoggo has joined #ruby
charliesome has joined #ruby
apparition has quit [Quit: Bye]
tamouse__ has joined #ruby
johnbox has joined #ruby
ElDoggo has quit [Ping timeout: 260 seconds]
ElDoggo has joined #ruby
tvw has joined #ruby
ElDoggo__ has joined #ruby
ta has quit [Quit: Leaving...]
tamouse__ has quit [Ping timeout: 258 seconds]
ElDoggo has quit [Ping timeout: 248 seconds]
ElDoggo__ has quit [Ping timeout: 240 seconds]
DTZUZU has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
rrichardsr3 has joined #ruby
MarkBilk_ has joined #ruby
MarkBilk has quit [Ping timeout: 240 seconds]
rrichardsr3 is now known as rrichards
rabajaj has joined #ruby
DTZUZU has joined #ruby
rabajaj has quit [Remote host closed the connection]
nadir has quit [Quit: Connection closed for inactivity]
ElDoggo__ has joined #ruby
ElDoggo__ has quit [Ping timeout: 248 seconds]
r7c has quit [Ping timeout: 255 seconds]
govg has quit [Ping timeout: 248 seconds]
DoubleMalt has joined #ruby
govg has joined #ruby
<frojnd>
Hi tehre
<frojnd>
I have a question regarding each loops in ruby,... let say I see syntax like this on a wiki: `for j = i2, i2+i, i2+2i, i2+3i, ..., not exceeding n:` how would I implement this in ruby with each loop?
<teatime>
I have no idea what that's supposed to do.
ramfjord has joined #ruby
dionysus69 has joined #ruby
al2o3-cr has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
Silthias1 has joined #ruby
<frojnd>
well first, it's a pseudocode and I paste it as an example, j would be index from current for loop and i from previous for loop
<frojnd>
For example `for i = 2, 3, 4, ..., not exceeding √n:` would be in ruby smth like this: (2..Math.sqrt(@input)).to_a.each.with_index { |num, i| ... }
Beams_ has joined #ruby
jphase has joined #ruby
LastWhisper____ has joined #ruby
Beams has quit [Ping timeout: 258 seconds]
AlienMayn has joined #ruby
Beams has joined #ruby
Beams_ has quit [Remote host closed the connection]
<AlienMayn>
Newbie question: How do I check if an array element within an array of arrays holds the last index position?
<lupine>
ary.last == thingy ?
synthroid has joined #ruby
<tobiasvl>
AlienMayn: not sure what you mean but: foo.last.last == element ?
<AlienMayn>
tobiasvl: Thanks. Really, silly of me, I forgot that ='s should be double. Thanks a bunch!
cagomez has joined #ruby
synthroi_ has joined #ruby
jphase has quit [Ping timeout: 248 seconds]
AlienMayn has quit [Quit: Leaving]
synthroid has quit [Ping timeout: 246 seconds]
vb333 has joined #ruby
vb333 has quit [Client Quit]
cagomez has quit [Ping timeout: 246 seconds]
<tobiasvl>
ah, hehe.
<tobiasvl>
that's an important difference.
<tobiasvl>
oh, they quit.
jphase has joined #ruby
jinie has quit [Ping timeout: 240 seconds]
tvw has quit []
jinie has joined #ruby
thinkpad has quit [Read error: Connection reset by peer]
BackEndCoder has quit [Excess Flood]
rrichards has quit [Quit: Apparantly my attempt to stay awake has failed...]
BackEndCoder has joined #ruby
thinkpad has joined #ruby
ta has joined #ruby
jphase has quit [Ping timeout: 246 seconds]
ur5us has joined #ruby
mson has joined #ruby
jphase has joined #ruby
gnufied has joined #ruby
bronson has joined #ruby
nertzy has quit [Read error: Connection reset by peer]
xco has left #ruby [#ruby]
truenito has joined #ruby
nertzy has joined #ruby
ur5us has quit [Ping timeout: 246 seconds]
bronson has quit [Ping timeout: 248 seconds]
InfinityFye has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
DoubleMalt has quit [Ping timeout: 240 seconds]
skweek has joined #ruby
skweek has quit [Max SendQ exceeded]
skweek has joined #ruby
jphase has quit [Ping timeout: 248 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Beams has quit [Quit: .]
uZiel has quit [Ping timeout: 248 seconds]
jphase has joined #ruby
cpruitt has joined #ruby
Beams has joined #ruby
<frojnd>
While I'm here... I have a hash { 1 => "true", 5 => "false", 2 => "true } What I would like to do is return the same hash where values are true
csk has quit [Quit: ZZZzzz…]
cpruitt has quit [Client Quit]
ShalokShalom_ has joined #ruby
fmcgeough has joined #ruby
bruno- has joined #ruby
sylario has joined #ruby
nasaa has joined #ruby
<nasaa>
hello
nasaa has left #ruby [#ruby]
cadillac_ has joined #ruby
griffindy has joined #ruby
<frojnd>
reject it is
ShalokShalom has quit [Ping timeout: 240 seconds]
<tobiasvl>
reject or select
_aeris_ has quit [Ping timeout: 248 seconds]
<tobiasvl>
hash.select { |k, v| v }
jphase has quit [Ping timeout: 240 seconds]
<frojnd>
or maybe select is even more appropriate in my case, thank you
ramfjord has joined #ruby
tcopeland has joined #ruby
jphase has joined #ruby
bmurt has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
elsevero has quit [Quit: elsevero]
jphase has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
cjs226 has joined #ruby
tamouse__ has joined #ruby
<frojnd>
Anyone dare to check my Sieve algorithm for primes? https://repl.it/LQ0s/10 for one reason when I enter Sieve.new(10).primes I get wrong numbers
<MarkBilk_>
s = "abcdef"; t = s ; s.slice! "cd" ; puts t # prints abef -- t is an alias of s # had to do t = "#{s}" to assign the value of s to a different variable.
jphase has joined #ruby
<MarkBilk_>
This seems silly. Is there a better way?
ta has quit [Quit: Leaving...]
tamouse__ has quit [Ping timeout: 248 seconds]
uZiel has joined #ruby
ta has joined #ruby
_aeris_ has joined #ruby
ta has quit [Client Quit]
cpruitt has joined #ruby
AnotherNick has joined #ruby
chouhoulis has joined #ruby
cdg_ has joined #ruby
jphase has quit [Ping timeout: 246 seconds]
<ljarvis>
MarkBilk_: I don't really understand your question. t and s will be the same value, so why would you do t = "#{s}" ?
johnbox has quit [Read error: Connection reset by peer]
<tobiasvl>
MarkBilk_: not sure what you mean exactly, the code you pasted is the behavior you don't want, and you used interpolation as a workaround?
<tobiasvl>
are you looking for s.dup ?
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 248 seconds]
<ljarvis>
looks like it
<ljarvis>
t = s.dup # MarkBilk_, now you can change them independantly
<Burgestrand>
MarkBilk_ String#sub will allow you to remove a substring from a string, and it returns a duplicate, keeping the original intact
cjs226 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FahmeF_ has joined #ruby
phaul has joined #ruby
FahmeF has quit [Ping timeout: 240 seconds]
snickers has quit [Ping timeout: 240 seconds]
ResidentBiscuit has quit [Ping timeout: 246 seconds]
FahmeF has joined #ruby
<phaul>
hi all, I'm trying to write yard for a C extension, and I'm struggling a bit with @param, and where to write it in the first place. Does it go to rb_define_method or the actual C function? Is there some code on github that I can use as a reference?
apparition has joined #ruby
gnufied has joined #ruby
FahmeF_ has quit [Ping timeout: 258 seconds]
jphase has joined #ruby
<phaul>
with writing @params before rb_define_method, it actually generates the right string but with warnings on the terminal..
<phaul>
s/string/thing/
roshanavand__ has quit [Ping timeout: 240 seconds]
elomatreb has quit [Quit: mep mep]
elomatreb has joined #ruby
csk has joined #ruby
raul782 has joined #ruby
DLSteve has joined #ruby
ResidentBiscuit has joined #ruby
marcux has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
jphase has quit [Ping timeout: 260 seconds]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
chouhoul_ has joined #ruby
ResidentBiscuit has joined #ruby
tvw has joined #ruby
elomatreb has quit [Quit: mep mep]
elomatreb has joined #ruby
chouhoulis has quit [Ping timeout: 248 seconds]
jphase has joined #ruby
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
rippa has joined #ruby
f3ttX] has joined #ruby
csk has quit [Quit: ZZZzzz…]
jphase has quit [Ping timeout: 240 seconds]
vee_ has quit [Quit: WeeChat 1.9.1]
jphase has joined #ruby
roshanavand__ has joined #ruby
sysvalve has joined #ruby
truenito has quit [Ping timeout: 248 seconds]
jphase has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
ShalokShalom_ is now known as ShalokShalom
jdawgaz has joined #ruby
synthroi_ has quit [Remote host closed the connection]
<phaul>
nm, figured it out :) one has to use @overload for instance methods
ramfjord has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
FrostCandy has joined #ruby
jphase has quit [Ping timeout: 248 seconds]
gigetoo has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 248 seconds]
^mtkd has quit [Ping timeout: 258 seconds]
Axy has joined #ruby
jphase has joined #ruby
mtkd has joined #ruby
Mia has quit [Read error: Connection reset by peer]
r_rios has joined #ruby
chouhoulis has joined #ruby
<r_rios>
Hello, all. Is there a pure Ruby gem (or, at least, a Ruby gem with very few native deps) to create simple GUI dialogs?
<r_rios>
To be clear, I don't want a full-fledged GUI toolkit, just dialogs
bronson has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
rgr_ has quit [Remote host closed the connection]
jphase has quit [Remote host closed the connection]
aupadhye has quit [Ping timeout: 240 seconds]
chouhoul_ has quit [Ping timeout: 248 seconds]
jphase has joined #ruby
imode has joined #ruby
bronson has quit [Ping timeout: 258 seconds]
shime has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
jphase has quit [Ping timeout: 240 seconds]
mson has quit [Quit: Connection closed for inactivity]
<havenwood>
r_rios: Ruby shipped with Tk in the stdlib until 2.4.
<havenwood>
r_rios: They gemified it since there are other contenders now.
<r_rios>
Which are those
<havenwood>
the usual suspects
<havenwood>
gtk2, wx, qt
<elomatreb>
You could shell out to something like zenity for quick and dirty dialogs
theunraveler has joined #ruby
rrichardsr3 has joined #ruby
dinfuehr has quit [Ping timeout: 248 seconds]
<havenwood>
r_rios: There's a Rubyish solution to guis called Shoes, and there are many versions of that as well. They'll wrap one or more of the other gui libs.
<r_rios>
havenwood, I've taken a look at shoes, but I really just want to add a bunch of dialogs to a script
<r_rios>
Not write a GUI application, which seems to be the purpose of shoes
<havenwood>
r_rios: elomatreb's suggestion is good for what you're doing
<havenwood>
"Gtk+ dialog boxes"
<r_rios>
The script is supposed to run on Linux and Windows, though
<r_rios>
I don't think Windows has something like zenity
chouhoulis has quit [Ping timeout: 258 seconds]
<elomatreb>
There's probably a way to do something like than on windows as well, but I doubt you'll find a cross-platform solution like this
jphase has quit [Ping timeout: 240 seconds]
<r_rios>
Not even Tk?
shinnya has quit [Ping timeout: 260 seconds]
<ineb>
maybe you can write your own wrapper if its really just dialog boxes
<havenwood>
r_rios: as long as you don't care much how they look, should be fine
<ineb>
for fancy stuff, i would look at qt
<elomatreb>
Can you still use the old tk gem or did it break?
<havenwood>
r_rios: qt, swt, etc should look fine
<havenwood>
elomatreb: You can still use it.
<havenwood>
It's just not shipped with 2.4.
<r_rios>
Qt's Ruby binding is abandoned, afaik
<havenwood>
r_rios: try tk
<r_rios>
I'll do that
<havenwood>
r_rios: not JRuby or do you care?
<havenwood>
r_rios: SWT in JRuby.
<ineb>
rwx is another option. (bindings for wxWidgets)
<r_rios>
I'm running normal Ruby, so it better not be JRuby, I think
<r_rios>
I think I'll go with Tk, since it seems to be the simplest to install
uZiel has quit [Ping timeout: 248 seconds]
_aeris_ has quit [Remote host closed the connection]
jphase has joined #ruby
<r_rios>
Thanks for the help, everyone
<r_rios>
elomatreb, ineb, and havenwood
jordanm has quit [Read error: Connection reset by peer]
polishdub has joined #ruby
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
ForeignBiscuit has joined #ruby
ForeignBiscuit has quit [Max SendQ exceeded]
marcux has quit [Ping timeout: 240 seconds]
ForeignBiscuit has joined #ruby
ForeignBiscuit has quit [Max SendQ exceeded]
ForeignBiscuit has joined #ruby
ForeignBiscuit has quit [Max SendQ exceeded]
paranoicsan has joined #ruby
ForeignBiscuit has joined #ruby
ResidentBiscuit has quit [Ping timeout: 260 seconds]
paranoicsan has left #ruby [#ruby]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoul_ has quit [Remote host closed the connection]
rrichard_ has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rrichardsr3 has quit [Ping timeout: 246 seconds]
conta has quit [Ping timeout: 248 seconds]
raul782 has quit [Remote host closed the connection]
<MarkBilk_>
Is there a way to make the match in String#sub be case-insensitive without using a regex? Because the first argument to sub is full of backslashes.
<havenwood>
MarkBilk_: You can use the %r{} form so you don't have to escape slashes.
<teatime>
MarkBilk_: you can pick-your-own-quotes so you don't have to use {} either if those don't work good for a given a string
jnollette has joined #ruby
alfiemax has joined #ruby
jphase has quit [Ping timeout: 260 seconds]
ElDoggo has joined #ruby
jdawgaz has joined #ruby
ramfjord has joined #ruby
raul782 has joined #ruby
chouhoulis has joined #ruby
Puffball_ has joined #ruby
jordanm has joined #ruby
Puffball has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
ramfjord has joined #ruby
<TheBrayn>
is there a list of characters I can use somewhere?
<havenwood>
TheBrayn: Use for what? Why can't you use characters?
<MarkBilk_>
havenwood: With %r I'm still getting the same error -- "too short meta escape". Does %r work on backslashes? The example you gave had forward-slash.
Doow has quit [Read error: Connection reset by peer]
<TheBrayn>
havenwood: for %r
<teatime>
MarkBilk_: hrm, no it doesn't help with backslashes actually
raul782 has quit [Remote host closed the connection]
milardovich has joined #ruby
<teatime>
MarkBilk_: there is Regexp.quote though
<havenwood>
MarkBilk_: Can you show us what you're trying to sub?
raul782 has quit [Remote host closed the connection]
<teatime>
MarkBilk_: it's a lot of extra chars so it still doesn't make me very happy, but I guess it's about all you got.
mim1k has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<r_rios>
tk's installation is failing. It failed to build the native gem extension. I think the ruby.h header is missing, but I installed msys when I was asked by RubyInstaller
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
Pisuke has joined #ruby
<elomatreb>
havenwood: \t and \n work as well, in a way Oo
<elomatreb>
>> eval "%\ntest\n"
<MarkBilk_>
teatime: How do you look up regex stuff in ri?
<ruby[bot]>
havenwood: # => (eval):1: warning: encountered \r in middle of line, treated as a mere space ...check link for more (https://eval.in/871209)
<teatime>
oh, or maybe it was just " " getting word-wrapped
<havenwood>
MarkBilk_: case insensitive ^ glob >.>
<frojnd>
Anyone dare to check my Sieve algorithm for primes? https://repl.it/LQ0s/10 for one reason when I enter Sieve.new(10).primes I get wrong numbers
SURAJIT has quit [Quit: Leaving]
<frojnd>
Sieve.new(10).prime should return [2,3,5,7] instead it returns [2,3,4,5,6,7,8,9,10]
<frojnd>
Sieve.new(10).primes
LazerCat has left #ruby [#ruby]
<havenwood>
frojnd: In your initializer consider making the instance variable name match the local variable name that you're setting it to.
<havenwood>
frojnd: `@my_array` is... a Hash!
<havenwood>
frojnd: On line 9, you don't need to turn a Range into an Array to use #each. You should omit that #to_a.
<havenwood>
frojnd: Same with the other to_a
ramfjord has quit [Ping timeout: 240 seconds]
<havenwood>
all of them.
<havenwood>
frojnd: You can combine `.each.with_index` into the single method `each_with_index`.
raul782 has joined #ruby
<havenwood>
frojnd: I think these might read better as: `2.upto(stuff_here).with_index` instead of `(2..stuff_here).each_with_index`
<havenwood>
frojnd: I think those fixes would make it easier to read and get feedback on.
goyox86 has joined #ruby
raynold has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
daveomcd_ has quit [Read error: Connection reset by peer]
Sembei has joined #ruby
daveomcd_ has joined #ruby
Pisuke has quit [Ping timeout: 240 seconds]
AndBobsYourUncle has joined #ruby
tamouse__ has joined #ruby
goyox86 has quit [Quit: goyox86]
WebDawg has quit [Ping timeout: 252 seconds]
rt has quit [Excess Flood]
jaruga has quit [Quit: jaruga]
andikr has quit [Remote host closed the connection]
rt has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 248 seconds]
sysvalve has quit [Read error: Connection reset by peer]
tamouse__ has quit [Ping timeout: 246 seconds]
mim1k has quit [Ping timeout: 258 seconds]
Serpent7776 has quit [Quit: Leaving]
orbyt_ has joined #ruby
<matthewd>
frojnd: In general, if I'm not getting the behaviour I expect, I'd start by adding some puts calls to track what it's actually doing / how it's getting to the value it is
WebDawg has joined #ruby
<matthewd>
frojnd: Also, is this homework, a book exercise, or a real-world problem?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lxsameer has quit [Quit: WeeChat 1.7]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rutix has quit []
bmurt has joined #ruby
lagweezle_away is now known as lagweezle
Beams has quit [Quit: .]
rrawlins has joined #ruby
hahuang65 has quit [Quit: WeeChat 1.9.1]
charliesome has joined #ruby
raul782 has quit [Remote host closed the connection]
hahuang65 has joined #ruby
jrafanie_ has joined #ruby
rrichard_ has quit [Quit: Apparantly my attempt to stay awake has failed...]
bronson has joined #ruby
kies has quit [Ping timeout: 258 seconds]
jrafanie has quit [Ping timeout: 240 seconds]
Mon_Ouie has joined #ruby
kassav_ has quit [Quit: kassav_]
nadir has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
rrawlins has quit []
ycyclist has joined #ruby
<ycyclist>
How do I check that an object has elements of a certain size? I want to check length, but it has to be length in terms of 256bit items.
<ycyclist>
I guess I should be using the term octets.
tcopeland has joined #ruby
troys has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
raul782 has joined #ruby
SeepingN has joined #ruby
<ycyclist>
Going close to the theme that has_a is better than is_a for checking, I want to make sure my size measurement is of octets, as per an RFC requirement.
<teatime>
are these elements strings?
cjs226 has joined #ruby
<ycyclist>
I want to make sure it is octet size no matter what. It appears bytesize is a method I may use.
<ycyclist>
Typically they will be strings, but no reason to limit it.
ramfjord has joined #ruby
bmurt has joined #ruby
<teatime>
you're being so vague it's impossible to answer, though
<teatime>
it's not like every object is required to implement .bytesize or even .size/.length
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ycyclist>
Yes, well I have a simple boolean method is_compliant_with_rfc2181? and I want it to fail if it is out of range of 1 to 63 octets.
bmurt has quit [Client Quit]
charliesome has joined #ruby
jdawgaz has joined #ruby
<ycyclist>
The requirement is octets, but the object could have multi-byte charaters in it.
jdawgaz has quit [Client Quit]
<teatime>
I think you should say 'string' instead of object because you clearly mean string.
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
<ycyclist>
The right way to say it, apparently, is that code points are variable byte size, but the size limit is 1 to 63.
jdawgaz has joined #ruby
<ycyclist>
Given I will never see a root label.
<ycyclist>
size limit 1 to 63 octets.
ramfjord has quit [Ping timeout: 255 seconds]
mikecmpbll has joined #ruby
chouhoul_ has joined #ruby
<ycyclist>
But could it be that another object could occur, given some cases may have multi-byte code points? Plus why omit use of daughter objects?
<teatime>
talking about "codepoints" already pretty much implies you're talking about strings.
<teatime>
anyway, yes, .bytesize seems to be what you're looking for.
Ishido has quit [Ping timeout: 240 seconds]
rrichardsr3 has joined #ruby
jdawgaz has quit [Client Quit]
chouhoulis has quit [Ping timeout: 258 seconds]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
Quentinius has joined #ruby
knight33 has joined #ruby
Axy has quit [Read error: Connection reset by peer]
<Quentinius>
Hi, I have two quick questions: I would like to edit content of multiple arrays with one method and then I would like to convert that arrays to string with same formating as it have (it’s just bunch of lines), thanks :)
gusrub has quit [Ping timeout: 258 seconds]
pavelz has quit [Quit: updating tmux to true color]
Cohedrin_ has joined #ruby
tamouse__ has joined #ruby
raul782 has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
<teatime>
ycyclist: were you thinking you might get passed something like an array of bytes, and wanted your routine to handle that case too?
AndBobsYourUncle has joined #ruby
<frojnd>
havenwood: thanx
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
<frojnd>
matthewd: this is me improving ruby by doing exercism :)
<frojnd>
Much appreciated all the comments
audy has joined #ruby
mark_66 has quit [Ping timeout: 258 seconds]
claudevandort has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gusrub has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
kies has joined #ruby
raul782 has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snath has joined #ruby
snath has left #ruby [#ruby]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
_aeris_ has joined #ruby
zachk has joined #ruby
shortdudey123 has quit [Ping timeout: 246 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shortdudey123 has joined #ruby
claudevandort has joined #ruby
raul782 has quit [Remote host closed the connection]
orbyt_ has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
Quentinius has joined #ruby
_aeris_ has quit [Remote host closed the connection]
lagweezle is now known as lagweezle_away
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LastWhisper____ has joined #ruby
Quentinius has quit [Client Quit]
jeanlinux has joined #ruby
_aeris_ has joined #ruby
jeanlinux has quit [Client Quit]
raul782 has joined #ruby
_aeris_ has quit [Remote host closed the connection]
conta3 has joined #ruby
tamouse__ has joined #ruby
_aeris_ has joined #ruby
bmurt has joined #ruby
lagweezle_away is now known as lagweezle
chouhoulis has joined #ruby
apparition has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
tamouse__ has quit [Ping timeout: 240 seconds]
conta3 has quit [Ping timeout: 260 seconds]
roshanavand__ has quit [Quit: Leaving]
raul782 has quit [Read error: Connection reset by peer]
cdg has joined #ruby
dminuoso_ has joined #ruby
agent_white has joined #ruby
cdg_ has quit [Ping timeout: 248 seconds]
sp4rrow has joined #ruby
armyriad has quit [Ping timeout: 248 seconds]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<agent_white>
Afternoon' folks
cdg has quit [Ping timeout: 258 seconds]
sp4rrow has quit [Client Quit]
ramfjord has joined #ruby
LastWhisper____ has joined #ruby
Bock has quit [Ping timeout: 258 seconds]
bronson has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
amirite has joined #ruby
<amirite>
how do i drop into a debugger
<amirite>
this is not rails
sp4rrow has joined #ruby
Heph_ has joined #ruby
<Papierkorb>
amirite: There's no real debugger. But you can use pry for this using `binding.pry` to drop you into a REPL right there within the scope of that code block. iirc, Ruby2.4 also has `binding.irb` if you don't want/have pry. For both, you need to require the library first
<Papierkorb>
I mean, require "pry" or "irb"
truenito has joined #ruby
dminuoso_ has quit [Ping timeout: 240 seconds]
<amirite>
thanks
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 240 seconds]
<Papierkorb>
amirite, maybe you're interested in the `pry-rescue` gem. Install it, then call your script like `rescue my_script.rb` (So, replace "ruby" with "rescue"). This'll automatically drop you into a pry shell at the #raise-site of an unhandled exception.
<Papierkorb>
In any case, you may also enjoy the `pry-stack_explorer` gem. This adds `up` and `down` commands to the pry shell for walking the stack frames :)
sp4rrow has quit [Ping timeout: 240 seconds]
zhunting has joined #ruby
truenito has quit [Ping timeout: 240 seconds]
<zhunting>
Hello, does anyone have experience hosting gems on a personal gem server?
Dimik has joined #ruby
troys is now known as troys_
alfiemax has quit [Remote host closed the connection]
<amirite>
i run vagrant and print out RUBY_VERSION from it and I get 2.2.3
<amirite>
but I have 4 different versions of ruby on my system, and i can't find 2.2.3
<amirite>
how do I determine or control what version of ruby is getting called with vagrant?
stan has quit [Read error: Connection reset by peer]
mson has joined #ruby
armyriad has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
tvw has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stan has joined #ruby
tvw has quit [Read error: Connection reset by peer]
stan has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
AndBobsYourUncle has joined #ruby
selim has quit [Ping timeout: 248 seconds]
stan has joined #ruby
stan has quit [Read error: Connection reset by peer]
stan has joined #ruby
raul782 has joined #ruby
stan has quit [Read error: Connection reset by peer]
dviola has joined #ruby
LastWhisper____ has joined #ruby
morfin has joined #ruby
<morfin>
hello
armyriad has quit [Ping timeout: 248 seconds]
shinnya has joined #ruby
<morfin>
i have some issues with json 1.8.3(does not build with 2.3.0 and 2.4.0) - i should upgrade it?
<morfin>
2.4.1
stan_ has joined #ruby
stan_ has quit [Read error: Connection reset by peer]
imode has quit [Ping timeout: 240 seconds]
<kyle__>
details might help
bmurt has joined #ruby
perniciouscaffei has joined #ruby
selim has joined #ruby
rrichardsr3 has joined #ruby
stan_ has joined #ruby
ur5us has joined #ruby
phaul has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit []
bmurt has joined #ruby
InfinityFye has quit [Quit: Leaving]
stan_ has quit [Ping timeout: 255 seconds]
phaul has quit [Ping timeout: 248 seconds]
stan_ has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stan_ has quit [Read error: Connection reset by peer]
ta has joined #ruby
DTZUZU has quit [Quit: WeeChat 1.9]
stan_ has joined #ruby
armyriad has joined #ruby
stan_ has quit [Read error: Connection reset by peer]
Algebr` has joined #ruby
Silthias1 has quit [Ping timeout: 255 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Silthias has joined #ruby
dionysus69 has quit [Remote host closed the connection]
ams__ has quit [Quit: Connection closed for inactivity]
stan_ has joined #ruby
bmurt has joined #ruby
<morfin>
it complains about missing symbols in 2.3.0 / 2.4.1
<havenwood>
morfin: update the json gem
dionysus69 has joined #ruby
<zhunting>
When using gem generate_index I run it with a directory that contains a gems folder like it describes I should in the help on it, but it never seems to find the gems, is there something I'm missing about how the command should be used?
milardovich has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
ta has quit [Remote host closed the connection]
ta has joined #ruby
arup_r has joined #ruby
milardovich has joined #ruby
stan_ has quit [Quit: No Ping reply in 180 seconds.]
cagomez has quit [Remote host closed the connection]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
r7c has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Anthaas has joined #ruby
bronson has joined #ruby
raul782 has quit [Remote host closed the connection]
mkali has joined #ruby
AlexRussia has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
John__ has joined #ruby
AlexRussia has quit [Client Quit]
<morfin>
i need 0.3.21(otherwise activerecord do not load it)
FrostCandy has quit []
orbyt_ has joined #ruby
mkali has left #ruby [#ruby]
truenito has joined #ruby
truenito has quit [Ping timeout: 255 seconds]
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
mson has quit [Quit: Connection closed for inactivity]
biberu has quit []
VeryBewitching has quit [Quit: Konversation terminated!]
cpruitt has quit [Quit: cpruitt]
cjs226 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<morfin>
i am doing some weird crap to build old gem =\
eckhardt has joined #ruby
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
mtkd has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
Mia has quit [Read error: Connection reset by peer]
imode has joined #ruby
mtkd has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt has joined #ruby
eckhardt has quit [Read error: Connection reset by peer]
eckhardt_ has joined #ruby
<Algebr`>
in this: app = Spaceship::Portal.app.create!(bundle_id: "com.krausefx.app_name", name: "fastlane App") does ruby now have named parameters? , like bundle_id:
troys_ is now known as troys
Azure has quit [Quit: Oops.]
<Papierkorb>
Algebr`: That's just implicit hash notation there. However, Ruby also supports key-word-arguments ("kw-args") since .. 2.1 or 2.2. They're separate from the normal arguments though. Notation mirrors the symbol notation from the call site: `def foo(bar: , baz: "Some default value")`
<Algebr`>
but I thought hash notation had to use =>
<Papierkorb>
That hasn't been the case for a long time at this point
<Algebr`>
so you can use either => or :
<Papierkorb>
`:foo => 1` is equivalent to `foo: 1`. Prefer the latter.
<Algebr`>
because its newer?
<Papierkorb>
Because it's clearer. And has been with us for .. >3 years.
dionysus70 has joined #ruby
raul782 has joined #ruby
<Algebr`>
so in this case create is a method which is going to mutate app and takes just 1 parameter
dionysus69 has quit [Ping timeout: 248 seconds]
dionysus70 is now known as dionysus69
<Papierkorb>
We can say that #create! is a method. What it does we can't know from just the snippet.
phaul has joined #ruby
fChanX has joined #ruby
<Algebr`>
but I mean from the !
<fChanX>
Hello World.
charliesome has joined #ruby
5EXAAC0LJ has joined #ruby
5EXAAC0LJ has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Papierkorb>
Algebr`: ..huh? the bang has no effect. It's canonical use indicates possibly unexpected behaviour. It doesn't (always) indicate a change of the underlying structure at all.
hahuang65 has quit [Quit: WeeChat 1.9.1]
ta has joined #ruby
r7c has quit [Quit: Leaving]
cagomez has joined #ruby
<Algebr`>
I thought the convention in ruby was that ! was a dangerous, possibly mutating method
<Papierkorb>
Yes: Possibly. It's a call for attention to the programmer. Nothing else.
fChanX has quit [Quit: Changing server]
fusta has joined #ruby
<tobiasvl>
it usually means "there is a variant without the ! as well and this one is different"
FastJack has quit [Read error: Connection reset by peer]
<tobiasvl>
"possibly it's a mutating variation"
FastJack_ has joined #ruby
<Algebr`>
irb is kinda crappy, is there an upped ipython style replacement ?
<tobiasvl>
Algebr`: pry?
cagomez has quit [Ping timeout: 248 seconds]
<SeepingN>
pry, or something in between like wirb/wirble
hahuang65 has joined #ruby
jenrzzz has joined #ruby
raul782 has quit [Remote host closed the connection]
<Algebr`>
ah pry
mtkd has quit [Read error: Connection reset by peer]
jrafanie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
<Algebr`>
can pry show me show source
erlend has joined #ruby
erlend has quit [Client Quit]
<Algebr`>
like in ipython I can do foo?? and it shows me source code of foo
<Papierkorb>
`$ foo`.
theunraveler has quit []
amirite has joined #ruby
<havenwood>
?pry Algebr`
<ruby[bot]>
Algebr`: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
claudevandort has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Algebr`>
most excellent
code_zombie has joined #ruby
milardovich has joined #ruby
<Algebr`>
assignment is an expression and returns the RHS, correct
<Papierkorb>
?try
<Papierkorb>
Have you tried it?
<Algebr`>
I did, then asked here for verification
<Algebr`>
hence the 'correct'
<Papierkorb>
Then you already have your answer.
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Algebr`>
I prefer asking knowledgable ruby folks before assuming I'm correct
chouhoul_ has joined #ruby
<Algebr`>
In this code: module Spaceship module Portal class << self, what is self in this instance? Portal?
amirite has quit [Quit: leaving]
<Algebr`>
and why is it using, what, anonymous classes?
<havenwood>
>> module Spaceship; module Portal; p self end end # Algebr`
<ruby[bot]>
havenwood: # => Spaceship::Portal ...check link for more (https://eval.in/871306)
<havenwood>
>> module Spaceship; module Portal; class << self; p self end end end
<ruby[bot]>
havenwood: # => #<Class:Spaceship::Portal> ...check link for more (https://eval.in/871307)
milardovich has quit [Ping timeout: 248 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<havenwood>
Algebr`: you can put a `bining.pry` or `binding.irb` in there to jump to that point of execution and check: self
<havenwood>
Algebr`: Or p-based debug printing like above ^
chouhoulis has quit [Ping timeout: 248 seconds]
<havenwood>
Algebr`: In your code, Spaceship is just a namespace.