havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ http://irclog.whitequark.org/ruby/
hxegon is now known as hxegon_afk
alotofnoodles has quit [Ping timeout: 258 seconds]
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
aberen has joined #ruby
JakFrist has joined #ruby
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rcvalle has quit [Quit: rcvalle]
JakFrist has quit [Client Quit]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JakFrist has joined #ruby
Brklyn_ has quit [Ping timeout: 272 seconds]
aberen has quit [Ping timeout: 244 seconds]
smathy_afk is now known as smathy
NightMonkey has joined #ruby
Cohedrin has quit [Quit: Textual IRC Client: www.textualapp.com]
jancel has joined #ruby
elifoster has joined #ruby
ledestin has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
roamingdog has joined #ruby
jancel has quit [Read error: Connection reset by peer]
dopie has joined #ruby
saneax is now known as saneax_AFK
jancel has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
maloik has quit [Remote host closed the connection]
tristanp has joined #ruby
maloik has joined #ruby
roamingdog has quit [Ping timeout: 244 seconds]
skade has quit [Quit: Computer has gone to sleep.]
SilverKey has quit [Quit: Halted.]
ekinmur has joined #ruby
jancel has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
tristanp has quit [Remote host closed the connection]
ekinmur has quit [Client Quit]
Es0teric has joined #ruby
gnufied has joined #ruby
tvw has quit [Ping timeout: 264 seconds]
tristanp has joined #ruby
smccarthy has quit []
marr has quit [Remote host closed the connection]
King_DuckZ has quit [Quit: Konversation terminated!]
freerobby has joined #ruby
jancel has joined #ruby
ensyde__ has joined #ruby
ensyde__ has quit [Read error: Connection reset by peer]
rueben has joined #ruby
rueben has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Quit: Leaving.]
roamingdog has joined #ruby
karmatr0n has joined #ruby
gnufied has quit [Ping timeout: 250 seconds]
karmatr0n has quit [Ping timeout: 272 seconds]
jgt2 has quit [Ping timeout: 264 seconds]
vdamewood has quit [Quit: Life beckons.]
roamingdog has quit [Remote host closed the connection]
certainty has joined #ruby
jancel has quit [Remote host closed the connection]
certainty has quit [Ping timeout: 252 seconds]
Ropeney has joined #ruby
charliesome has joined #ruby
sepp2k has quit [Quit: Leaving.]
diegoviola has quit [Quit: WeeChat 1.5]
charliesome has quit [Client Quit]
RegulationD has quit [Remote host closed the connection]
charliesome has joined #ruby
allcentury has joined #ruby
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar_ has joined #ruby
senayar_ has quit [Remote host closed the connection]
nankyokusei has joined #ruby
elifoster has quit [Ping timeout: 250 seconds]
matp has joined #ruby
ElFerna has joined #ruby
saneax_AFK is now known as saneax
ekinmur has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
aberen has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
roamingdog has joined #ruby
norc__ has joined #ruby
<postmodern> TIL uri = URI.parse(uri), ruby will assume uri is nil, since it's being defined as a local variable
aberen has quit [Ping timeout: 258 seconds]
<jhass> yup
<jhass> unless defined as local before of course
<postmodern> ran into that with a parslet bug, since they use method_missing to expose Transform captures
rueben has joined #ruby
hutch34 has joined #ruby
smathy is now known as smathy_afk
norc_ has quit [Ping timeout: 264 seconds]
swills has joined #ruby
elementaru has quit [Remote host closed the connection]
skweek has joined #ruby
hutch34 has quit [Ping timeout: 244 seconds]
AcidCras_ has joined #ruby
hahuang62 has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
toretore has quit [Ping timeout: 252 seconds]
A124 has quit [Quit: '']
AcidCrash has quit [Ping timeout: 258 seconds]
A124 has joined #ruby
hahuang62 has quit [Ping timeout: 264 seconds]
romistrub_ has quit [Ping timeout: 250 seconds]
lightt has quit [Remote host closed the connection]
tristanp has quit [Remote host closed the connection]
elton has joined #ruby
cisco has quit [Quit: Leaving.]
karmatr0n has joined #ruby
allcentury has quit [Ping timeout: 246 seconds]
spiette has quit [Quit: :qa!]
jaguarmagenta has joined #ruby
dcunit3d has quit [Ping timeout: 244 seconds]
karmatr0n has quit [Ping timeout: 250 seconds]
tildes has quit [Ping timeout: 252 seconds]
jaguarmagenta has quit [Ping timeout: 244 seconds]
certainty has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
diegoaguilar has quit [Remote host closed the connection]
Dios has joined #ruby
jancel has joined #ruby
certainty has quit [Ping timeout: 244 seconds]
sarbs has quit [Ping timeout: 250 seconds]
jancel has quit [Ping timeout: 250 seconds]
xxneolithicxx has joined #ruby
jord-n has quit [Quit: leaving]
safetypin has joined #ruby
pr0ton has joined #ruby
safetypin has quit [Client Quit]
jord-n has joined #ruby
jord-n has quit [Client Quit]
jord-n has joined #ruby
sarbs has joined #ruby
jord-n has quit [Client Quit]
jord-n has joined #ruby
saneax is now known as saneax_AFK
blackmesa has joined #ruby
jhack has joined #ruby
dcunit3d has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
aberen has joined #ruby
axisys has quit [Ping timeout: 250 seconds]
rkazak has quit [Quit: Sleep.....ing....]
Dimik has quit [Ping timeout: 250 seconds]
tgeeky has joined #ruby
gnufied has joined #ruby
aberen has quit [Ping timeout: 272 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous_ has quit [Ping timeout: 246 seconds]
wilsonc91 has joined #ruby
freerobby has quit [Quit: Leaving.]
matp has quit [Remote host closed the connection]
tjbiddle has joined #ruby
rueben has quit [Ping timeout: 250 seconds]
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
freerobby has joined #ruby
smathy_afk is now known as smathy
hutch34 has joined #ruby
tubuliferous_ has joined #ruby
ketherah has joined #ruby
ebbflowgo has joined #ruby
jennings has left #ruby [#ruby]
hutch34 has quit [Ping timeout: 244 seconds]
pilne has quit [Quit: Quitting!]
flashpoi_ has joined #ruby
elton has quit []
Silthias has quit [Ping timeout: 244 seconds]
certainty has joined #ruby
wilsonc91 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
confounds has joined #ruby
binaryplease1 has joined #ruby
Nahra has quit [Ping timeout: 244 seconds]
Silthias has joined #ruby
hutch34 has joined #ruby
ergobfmv has joined #ruby
davedev24 has quit []
arescorpio has quit [Ping timeout: 250 seconds]
lessless has joined #ruby
certainty has quit [Ping timeout: 244 seconds]
ergobfmv has quit [Client Quit]
binaryplease has quit [Ping timeout: 276 seconds]
ElFerna has quit [Ping timeout: 264 seconds]
flashpoi_ has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 252 seconds]
kgrz has quit [Quit: leaving]
RegulationD has joined #ruby
binaryplease1 is now known as binaryplease
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
CloCkWeRX has joined #ruby
flashpoint9 has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xue has quit [Ping timeout: 240 seconds]
SilverKey has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
null__ has left #ruby ["Textual IRC Client: www.textualapp.com"]
blackmesa has joined #ruby
sandstrom has joined #ruby
Rodya_ has joined #ruby
Klumben has quit [Ping timeout: 258 seconds]
alem0lars has quit [Ping timeout: 260 seconds]
Dios has quit [Quit: Textual IRC Client: www.textualapp.com]
aberen has joined #ruby
braincrash has quit [Quit: bye bye]
blackmesa has quit [Ping timeout: 252 seconds]
aberen has quit [Ping timeout: 258 seconds]
karmatr0n has joined #ruby
alem0lars has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
jhack has quit [Quit: jhack]
gnufied has quit [Quit: Leaving]
centrx has quit [Quit: centrx]
hutch34 has joined #ruby
charliesome has quit [Max SendQ exceeded]
karmatr0n has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
saneax_AFK is now known as saneax
UserInNeed has quit [Changing host]
UserInNeed has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
UserInNeed is now known as InexpensiveCompu
InexpensiveCompu is now known as UserInNeed
hutch34 has quit [Ping timeout: 250 seconds]
hahuang62 has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
k3rn31 has joined #ruby
tristanp has joined #ruby
jhack has joined #ruby
pr0ton has quit [Quit: pr0ton]
rkazak has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
havenn has joined #ruby
hutch34 has joined #ruby
havenn is now known as Guest61380
aries_liuxueyang has quit [Quit: No Ping reply in 180 seconds.]
hahuang62 has quit [Ping timeout: 258 seconds]
aries_liuxueyang has joined #ruby
tmtwd has joined #ruby
TomyLobo has quit [Ping timeout: 240 seconds]
crystal77 has quit [Quit: Textual IRC Client: www.textualapp.com]
smathy is now known as smathy_afk
hutch34 has quit [Ping timeout: 258 seconds]
sdothum has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
Es0teric has quit [Quit: Computer has gone to sleep.]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
mosh has quit [Ping timeout: 258 seconds]
jaguarmagenta has joined #ruby
sdothum has quit [Client Quit]
beatdown has joined #ruby
confound_ has joined #ruby
Klumben has joined #ruby
Es0teric has joined #ruby
howdoi has joined #ruby
gix has quit [Ping timeout: 244 seconds]
Brklyn has joined #ruby
jaguarmagenta has quit [Ping timeout: 252 seconds]
kareeoleez has joined #ruby
hutch34 has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
confounds has quit [Ping timeout: 250 seconds]
roamingdog has quit []
SilverKey has quit [Quit: Halted.]
lessless has quit [Quit: Textual IRC Client: www.textualapp.com]
gix has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
certainty has joined #ruby
hutch34 has quit [Ping timeout: 272 seconds]
kraken has joined #ruby
kraken is now known as kraken_
<kraken_> In terms of finding a job after a while of doing this stuff, does a guy with only a minor in computer science, instead of a major, have a realistic chance?
Brklyn has quit [Ping timeout: 258 seconds]
certainty has quit [Ping timeout: 240 seconds]
<Radar> kraken_: I only had qualifications in network administration when I got my first programming job
hk238 has joined #ruby
xue has joined #ruby
hutch34 has joined #ruby
jaguarmagenta has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
k3rn31 has joined #ruby
kgrz has joined #ruby
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
duncannz has quit [Max SendQ exceeded]
rueben has joined #ruby
duncannz has joined #ruby
tildes has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
bluOxigen has joined #ruby
charliesome has quit [Ping timeout: 250 seconds]
craigp has joined #ruby
Rodya_ has quit [Remote host closed the connection]
blackmesa has joined #ruby
charliesome has joined #ruby
aberen has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
jhack has quit [Quit: jhack]
blackmesa has quit [Ping timeout: 240 seconds]
aberen has quit [Ping timeout: 272 seconds]
confound_ has quit []
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
kraken_ has quit [Quit: Leaving]
karmatr0n has joined #ruby
hahuang62 has joined #ruby
gregf has joined #ruby
hahuang62 has quit [Ping timeout: 250 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
Es0teric has quit [Quit: Computer has gone to sleep.]
Rickmasta has joined #ruby
tristanp has quit [Remote host closed the connection]
phredus_ has joined #ruby
phredus_ has quit [Remote host closed the connection]
p337rB has joined #ruby
ketherah has quit [Quit: Connection closed for inactivity]
p337rB has quit [Ping timeout: 244 seconds]
certainty has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
duncannz has quit [Ping timeout: 244 seconds]
hutch34 has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
Sashimi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karmatr0n has quit [Ping timeout: 258 seconds]
certainty has quit [Ping timeout: 272 seconds]
hutch34 has quit [Ping timeout: 272 seconds]
skade has joined #ruby
aryaching has quit [Remote host closed the connection]
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
neanderslob has quit [Remote host closed the connection]
Brklyn has joined #ruby
kgrz has quit [Quit: leaving]
pawnbox has joined #ruby
specialblend_ has joined #ruby
kgrz has joined #ruby
neanderslob has joined #ruby
sevenonezero has joined #ruby
blackmesa has joined #ruby
aberen has joined #ruby
Brklyn has quit [Ping timeout: 244 seconds]
mdw has joined #ruby
aberen has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 264 seconds]
Madplatypus has joined #ruby
postmodern has quit [Quit: Leaving]
jenrzzz has joined #ruby
specialblend_ has quit [Quit: specialblend_]
anna` has quit [Ping timeout: 276 seconds]
anna` has joined #ruby
kareeoleez has quit [Remote host closed the connection]
hahuang62 has joined #ruby
jancel has joined #ruby
hutch34 has joined #ruby
hahuang62 has quit [Ping timeout: 250 seconds]
jancel has quit [Ping timeout: 252 seconds]
hutch34 has quit [Ping timeout: 244 seconds]
craigp has quit [Ping timeout: 250 seconds]
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
TomyLobo has joined #ruby
dionysus69 has joined #ruby
yfeldblum has quit [Remote host closed the connection]
chris3492 has quit [Ping timeout: 244 seconds]
craigp has joined #ruby
tildes has quit [Ping timeout: 250 seconds]
n1x-nz has joined #ruby
certainty has joined #ruby
craigp has quit [Ping timeout: 276 seconds]
skade has quit [Quit: Computer has gone to sleep.]
Es0teric has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
aeterne has quit [Read error: Connection reset by peer]
certainty has quit [Ping timeout: 252 seconds]
lightt has joined #ruby
d0nn1e has quit [Ping timeout: 272 seconds]
KnownSyntax has joined #ruby
chris3492 has joined #ruby
lightt has quit [Remote host closed the connection]
d0nn1e has joined #ruby
tjbiddle has quit [Read error: Connection reset by peer]
hutch34 has joined #ruby
RegulationD has joined #ruby
ciampix has joined #ruby
ciampix has quit [Client Quit]
vuoto has joined #ruby
ciampix_ has joined #ruby
lightt has joined #ruby
lightt has quit [Read error: Connection reset by peer]
kareeoleez has joined #ruby
ptierno has joined #ruby
certainty has joined #ruby
d0lph1n98 has joined #ruby
pontiki has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
ur5us has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 244 seconds]
kareeoleez has quit [Remote host closed the connection]
kareeoleez has joined #ruby
elifoster has joined #ruby
kareeoleez has quit [Remote host closed the connection]
certainty has quit [Ping timeout: 258 seconds]
elifoster has quit [Client Quit]
saneax is now known as saneax_AFK
craigp has joined #ruby
blackmesa has joined #ruby
aberen has joined #ruby
kareeoleez has joined #ruby
Niham has joined #ruby
Dimik has joined #ruby
aberen has quit [Ping timeout: 246 seconds]
the_drow has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
rkazak has quit [Quit: Sleep.....ing....]
mtkd has joined #ruby
certainty has joined #ruby
sandelius has joined #ruby
dextertzu has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
ciampix_ has quit [Quit: Leaving]
amclain has quit [Quit: Leaving]
yfeldblum has quit [Ping timeout: 250 seconds]
arooni has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Nahra has joined #ruby
the_drow has joined #ruby
yfeldblum has joined #ruby
madgen has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
phrozen77 has joined #ruby
alfiemax has joined #ruby
firstdayonthejob has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
axxyhtrx has joined #ruby
solars has joined #ruby
madgen has quit [Ping timeout: 250 seconds]
phrozen77 has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
phrozen77_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
dionysus69 has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
duncannz has quit [Read error: Connection reset by peer]
p337rB has joined #ruby
pawnbox has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
duncannz has joined #ruby
DoubleMalt has joined #ruby
duncannz has quit [Read error: Connection reset by peer]
augcesar has quit [Quit: Connection closed for inactivity]
xue has quit [Ping timeout: 240 seconds]
TvL2386 has quit [Quit: Ex-Chat]
craigp has quit [Ping timeout: 244 seconds]
p337rB has quit [Ping timeout: 246 seconds]
the_drow_ has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
lightt has joined #ruby
AlexRussia has quit [Ping timeout: 260 seconds]
the_drow_ has quit [Read error: Connection reset by peer]
karmatr0n has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
blackgoat has quit [Ping timeout: 252 seconds]
TomyLobo has quit [Ping timeout: 250 seconds]
the_drow has joined #ruby
firstdayonthejob has quit [Ping timeout: 272 seconds]
the_drow has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
karmatr0n has quit [Ping timeout: 252 seconds]
vuoto has quit [Remote host closed the connection]
charliesome has quit [Max SendQ exceeded]
joconcepts has quit [Remote host closed the connection]
joconcepts has joined #ruby
vuoto has joined #ruby
charliesome has joined #ruby
aufi has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
hirvi has joined #ruby
the_drow has joined #ruby
solocshaw has joined #ruby
duncannz has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
sid_fules has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
duncannz has quit [Read error: Connection reset by peer]
dEPy has joined #ruby
jaruga___ has joined #ruby
alfiemax has joined #ruby
jaruga___ is now known as jaruga____
anisha has joined #ruby
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
Niham has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dEPy has quit [Quit: (null)]
dEPy has joined #ruby
SubjectiveBias has joined #ruby
aberen has joined #ruby
TomyWork has joined #ruby
blackmesa has joined #ruby
dsea has quit [Ping timeout: 250 seconds]
DoubleMalt has quit [Ping timeout: 246 seconds]
aganov has joined #ruby
minimalism has quit [Quit: minimalism]
aberen has quit [Ping timeout: 240 seconds]
hanalsx has joined #ruby
<hanalsx> hi
duncannz has joined #ruby
Niham has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
<manveru> hi
Silthias1 has joined #ruby
<manveru> welcome to ruby support, your one-stop shop for everything apart from rails :)
saneax_AFK is now known as saneax
<hanalsx> well i do have a strange question
<hanalsx> the top code doesn't work
<hanalsx> and the bottom one works
<hanalsx> well they both work
k3rn31 has quit [Quit: Computer has gone to sleep.]
<hanalsx> except the bottom one gets the right answer and the top one doesn't
Silthias has quit [Ping timeout: 244 seconds]
<hanalsx> i don't understand why
Niham has quit [Max SendQ exceeded]
Niham has joined #ruby
digneety has joined #ruby
digneety has quit [Changing host]
digneety has joined #ruby
blaxter has joined #ruby
ta_ has joined #ruby
<Mon_Ouie> Because the value of cubed does not update when you change the value of a
jas02 has joined #ruby
<Mon_Ouie> You would need to re-execute the assignment every time a changes
<hanalsx> oh
<hanalsx> thank you :)
<hanalsx> now i know
bluOxigen has quit [Ping timeout: 250 seconds]
tercenya has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
tercenya has joined #ruby
deimos__ has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
hahuang62 has joined #ruby
deimos__ has joined #ruby
ryker has joined #ruby
Dolby_ has quit [Read error: Connection reset by peer]
k3rn31 has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
fuso has quit [Read error: Connection reset by peer]
hahuang62 has quit [Ping timeout: 260 seconds]
Niham has quit [Quit: Textual IRC Client: www.textualapp.com]
Dimik has quit []
Couch has joined #ruby
Niham has joined #ruby
linoespinoza has joined #ruby
linoespinoza has quit [Client Quit]
electrostat has quit [Remote host closed the connection]
ElFerna has joined #ruby
ryker has quit []
vuoto has quit [Remote host closed the connection]
antgel has joined #ruby
tristanp has joined #ruby
blaxter has quit [Quit: foo]
<shevy> in particular with such a nick
sandstrom has joined #ruby
ElFerna has quit [Ping timeout: 244 seconds]
electrostat has joined #ruby
rueben has quit [Ping timeout: 276 seconds]
nhhc has joined #ruby
tristanp has quit [Ping timeout: 244 seconds]
CloCkWeRX has quit [Ping timeout: 244 seconds]
rueben has joined #ruby
iCHAIT has joined #ruby
eGGshke has joined #ruby
digneety has quit [Ping timeout: 244 seconds]
<iCHAIT> I am trying to post json response with rest-client
<iCHAIT> this what I have written
<iCHAIT> response = RestClient.post(url, auth_hash, :content_type => :json, :accept => :json)
<iCHAIT> can anyone tell me what's wrong with that?
<iCHAIT> It gives me an error - Connection refused - connect(2) for nil port 80
alfiemax has quit [Ping timeout: 252 seconds]
digneety has joined #ruby
andikr has joined #ruby
sebstrax has joined #ruby
Dimik has joined #ruby
<hanalsx> i've never done a json request in ruby but that sounds like it's saying that something isn't being set
<al2o3-cr> response = RestClient.post(url, {data: auth_hash}, {:content_type => :json, :accept => :json}) # try this iCHAIT
dEPy has quit [Ping timeout: 272 seconds]
<iCHAIT> Extremely sorry guys, I had wrong url setup, nothing wrong with my code.
<iCHAIT> al2o3-cr: my snippet works, thanks anyway :)
<al2o3-cr> iCHAIT: sweet, no bother :)
GinoManWorks has quit [Read error: Connection reset by peer]
kedare has joined #ruby
tjbiddle has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
bluOxigen has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
craigp has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
<iCHAIT> I am working on some code, and I observing some weird behavior
mooman has quit [Quit: bb]
<iCHAIT> Here's my code - http://dpaste.com/2HVY00X
<iCHAIT> output of line 39 is -
<iCHAIT> name
<iCHAIT> slug
<iCHAIT> output of line 40 is -
<iCHAIT> name
<iCHAIT> but line 41 prints "false"
fenre has joined #ruby
aberen has joined #ruby
<iCHAIT> I believe it should be printing "true", shouldn't it, the array missing_list contains "name" and my key is also set to "name".
Hounddog has joined #ruby
<iCHAIT> What's possibly wrong here?
fenre has quit [Remote host closed the connection]
<Radar> iCHAIT: Do you have a smaller example? Can you narrow down the code to just the part which is breaking?
fenre has joined #ruby
<iCHAIT> Radar: Sure, just a sec
ocbtec has joined #ruby
<Radar> I'm about to leave for the night, but with a simpler example I think it'll make it easier for other people to help you.
<sandelius> is it possible tto remove all the instance variable @instance_variable not initialized warings? it's driving me crazy :)
<sandelius> it's from sequel
elaptics`away is now known as elaptics
<shevy> sandelius I think there is no simple way to effectively control on a per-warning basis, what warnings to enable or disable
<sandelius> shevy grr that's what I thought :/
ElFerna has joined #ruby
<shevy> my hack approach is to temporarily set $VERBOSE to nil, then set it to the old value again ... but I usually only do this for warnings that happen on load/require time, not for warnings that will appear lateron during runtime of code
<sandelius> shevy it's during test it bugs me so that might work. I see on ruby tracker that it's proposed to to be able to disable it per gem basis
n1x-nz has quit [Quit: Computer says no]
lightt has quit [Remote host closed the connection]
pwnd_nsfw has joined #ruby
sid_fules has quit [Read error: Connection reset by peer]
mozzarella has quit [Remote host closed the connection]
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
biberu has joined #ruby
<iCHAIT> Can anyone help me?
mozzarella has joined #ruby
hutch34 has joined #ruby
blackmesa has joined #ruby
<sandelius> iCHAIT what's password in to actual?
<sandelius> iCHAIT what's passed* in to actual?
<sandelius> what does it contain
Dimik has quit [Ping timeout: 264 seconds]
dsea has joined #ruby
<iCHAIT> it contains a Hash
Silthias has joined #ruby
ElFerna has quit [Ping timeout: 264 seconds]
<sandelius> change Array[@required_params[object_name]] to @required_params[object_name]
gamov_ has joined #ruby
skweek has quit [Ping timeout: 244 seconds]
gamov_ has quit [Client Quit]
Silthias1 has quit [Ping timeout: 258 seconds]
sandstrom has joined #ruby
hutch34 has quit [Ping timeout: 244 seconds]
<iCHAIT> woah, looks like that works.
<iCHAIT> I get "true" now
Shashikant86 has joined #ruby
<sandelius> iCHAIT yeah you got an array inside an array
<sandelius> iCHAIT %w(name slugs) is an array
<iCHAIT> Ah, yes.
blackmesa has quit [Ping timeout: 272 seconds]
<sandelius> iCHAIT you could write it as ['name', 'slugs'] aswell
zacstewart has quit [Ping timeout: 244 seconds]
<iCHAIT> Thanks a lot.
<sandelius> np
<iCHAIT> So now,
<iCHAIT> missing_list.delete(key)
<iCHAIT> ^ This should work right?
tvw has joined #ruby
charliesome has quit [Ping timeout: 244 seconds]
<sandelius> yes bur remember to dup the array or else it will be gone forever
<sandelius> @required_params[object_name].dup
<iCHAIT> sandelius: okay.
tjohnson has quit [Quit: Connection closed for inactivity]
<iCHAIT> BTW< for deleting I can also do missing_list.delete_at(missing_list.index(key)) , right?
<sandelius> since @required_params is defined outside the method and ruby is object oriented xd
<iCHAIT> which one is better?
xcesariox has joined #ruby
<sandelius> if you know the name to delete then use delete
<iCHAIT> okay, thanks :)
<sandelius> micro optimization :)
<sandelius> micro optimization is stupid is what I ment :)
craigp has quit [Ping timeout: 240 seconds]
sid_fules has joined #ruby
<sandelius> iCHAIT for loops are rarely use tho. Use each instead: actual.each do |key, value|
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
codecop has joined #ruby
Charles_CV has joined #ruby
<iCHAIT> sandelius: yeah, I am already having a hard time with rubocop, it is never satisfied, will keep that in mind :)
sid_fules has quit [Remote host closed the connection]
sid_fules has joined #ruby
Shashikant86 has quit [Quit: Textual IRC Client: www.textualapp.com]
sid_fules has quit [Remote host closed the connection]
ceej has quit [Remote host closed the connection]
mtkd has quit [Ping timeout: 244 seconds]
mtkd has joined #ruby
ceej has joined #ruby
joonty has joined #ruby
pawnbox has quit [Remote host closed the connection]
aswen has joined #ruby
charliesome has joined #ruby
edwinvdgraaf has joined #ruby
c0mrad3 has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
blackmesa has joined #ruby
p337rB has joined #ruby
certainty has quit [Ping timeout: 260 seconds]
axxyhtrx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
terlar has joined #ruby
AcidCras_ is now known as AcidCrash
p337rB has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
rueben has quit [Ping timeout: 250 seconds]
skade has joined #ruby
rueben has joined #ruby
Charles_CV has quit [Quit: Leaving]
skweek has joined #ruby
Charles_CV has joined #ruby
norc has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
evidex has joined #ruby
the_drow has joined #ruby
certainty has joined #ruby
Coldblackice has quit [Ping timeout: 240 seconds]
ElFerna has joined #ruby
vuoto has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
senayar has joined #ruby
LoneHerm_ has joined #ruby
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ur5us has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
Es0teric has quit [Quit: Computer has gone to sleep.]
sid_fules has joined #ruby
lightt has joined #ruby
vdamewood has joined #ruby
ElFerna has quit [Ping timeout: 272 seconds]
evidex has quit [Ping timeout: 244 seconds]
jancel has joined #ruby
axxyhtrx has joined #ruby
moeabdol has joined #ruby
yardenbar has joined #ruby
Ishido has joined #ruby
jancel has quit [Ping timeout: 250 seconds]
tjbiddle has joined #ruby
yfeldblum has joined #ruby
<solars> quick question, how can I undefine a subclass Channels::Testchannel < Channels::Base ?
kgrz has quit [Ping timeout: 244 seconds]
craigp has joined #ruby
<solars> Object.send(:remove_const, 'Channels::Testchannel') doesn't seem to be allowed
Brklyn has joined #ruby
marr has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Brklyn has quit [Ping timeout: 246 seconds]
<apeiros> Channels.remove_const
<apeiros> also it technically does not undefine the class, it only removes the constant
aswen has quit [Quit: WeeChat 1.5]
<apeiros> >> class X; end; x = X; Object.send(:remove_const; :X); x.new
<ruby[bot]> apeiros: # => /tmp/execpad-df11dc4dbffc/source-df11dc4dbffc:2: syntax error, unexpected ';', expecting ')' ...check link for more (https://eval.in/589411)
mensvaga has quit [Ping timeout: 260 seconds]
<apeiros> whoops
<apeiros> >> class X; end; x = X; Object.send(:remove_const, :X); x.new
<ruby[bot]> apeiros: # => #<X:0x40a35a30> (https://eval.in/589412)
allcentury has joined #ruby
zacstewart has joined #ruby
nofxx has quit [Ping timeout: 250 seconds]
ur5us has quit [Remote host closed the connection]
jgt2 has joined #ruby
<norc> apeiros: https://eval.in/589414
<norc> Look!
<norc> Casting classes is useful after all!
<norc> I can finally instantiate Module. No more do I need Class.
<solars> apeiros, I see it doesn't work with active support .subclasses :/ it is still defined there
* norc has always wanted to instantiate the Math module.
j416 has joined #ruby
<norc> (Note this has a tendency to crash on OSX for reasons I have not yet determined)
<solars> apeiros, although related to rails, do you have any idea how I could remove it from here? http://apidock.com/rails/Class/subclasses
<norc> solars: You cannot really do that.
<norc> solars: Other than removing all references to an object and forcing the GC to clean it up.
zacstewart has quit [Ping timeout: 244 seconds]
<apeiros> solars: I don't know the inner workings of rails' autoloader. quite possible that it interferes. can't help with that, sorry.
<solars> norc, mmm alright then I have to filter them out
<norc> apeiros: Autoloading is a Ruby feature.
<apeiros> norc: not rails' autoloader
<apeiros> it doesn't use Kernel#autoload
<norc> apeiros: It does not?
mensvaga has joined #ruby
<apeiros> it uses const_missing and some shenanigans
<apeiros> afaik one reason is to enable reloading
<norc> apeiros: You meant Module#autoload btw
hanalsx has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<norc> &ri Kernel#autoload
<norc> oh
<apeiros> norc: you can observe it easily - Module#autoload will already list a constant via Module#constants
<norc> O.o
<apeiros> rails' autoloader does not
<norc> apeiros: Things I learn.
<norc> apeiros: Now I need to find a reason to instantiate modules..
<apeiros> norc: isn't "confusing fellow ruby coders" enough of a reason? :)
evidex has joined #ruby
jenrzzz has joined #ruby
Sashimi has joined #ruby
koooge has quit [Quit: Leaving...]
lightt has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
hahuang62 has joined #ruby
charliesome has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jaguarmagenta has quit [Ping timeout: 260 seconds]
hahuang62 has quit [Ping timeout: 250 seconds]
<apeiros> norc: fun fact: only very few ruby developers know that you can subclass Module (which can actually be useful)
<norc> apeiros: well Module is just a class. ;-)
<apeiros> sure
<apeiros> still only few know :)
<norc> I'm wondering what useful things you can do with it though.
<norc> Oh!
<norc> apeiros: I suspect ActiveSupport::Concern to be derived from Module.
<apeiros> no idea. I still haven't used that.
<norc> Well its an ugly hack that nobody should use.
<apeiros> still feels like a solution to a problem called "developers who don't know ruby basics"
<norc> But you can #include it, so it must be derived from Module.
<norc> Indeed.
<norc> apeiros: But Rails kind of attracts people and shows them the amazing scaffolding magic you can do with just a few commands - so they immediately figure you don't need to understand the language.
duncannz has quit [Remote host closed the connection]
<norc> Which results in people quite frequently asking "How do I add an action to a controller" - or at least along those lines.
<apeiros> I think it's not just a rails issue
ElFerna has joined #ruby
<apeiros> some fields attract people (and rightly so) who don't identify primarily as programmers and hence don't have and maybe don't even want a strong background in it
<norc> apeiros: Web development in particular..
<apeiros> not just
<apeiros> in ruby there seem to be quite some biology/biochemistry people. often not strong programmers either.
neanderslob has quit [Remote host closed the connection]
<norc> Interesting
MarcWeber has quit [Quit: Lost terminal]
ElFerna has quit [Ping timeout: 244 seconds]
alfiemax has joined #ruby
<apeiros> but as said, IMO that's ok, maybe even great :)
startupality has joined #ruby
Niham has quit [Ping timeout: 250 seconds]
joast has quit [Ping timeout: 240 seconds]
lightt has joined #ruby
workmad3 has joined #ruby
<gregf_> >> module Foo;end; module Bar < Foo;end ## subclass a module?
kgrz has joined #ruby
<ruby[bot]> gregf_: # => /tmp/execpad-113c0defd2da/source-113c0defd2da:2: syntax error, unexpected '<' ...check link for more (https://eval.in/589443)
codecop has quit [Remote host closed the connection]
<norc> gregf_: No, not in that sense.
<norc> >> class A < Module; end
<ruby[bot]> norc: # => nil (https://eval.in/589446)
<norc> That is subclassing Module. :)
<gregf_> ehh
sid_fules has quit [Read error: Connection reset by peer]
symm- has joined #ruby
<gregf_> norc: would that force the class to implement abstract methods from the module?
<iCHAIT> How is a string reinitialized in ruby?
Niham has joined #ruby
<norc> Huh?
<gregf_> oh - nevrmind
<iCHAIT> should I use .replace?
<norc> gregf_: Classes and modules are exactly the same thing.
<gregf_> >> module Foo;end; class Bar < Foo;end # like this *see the error*
<ruby[bot]> gregf_: # => superclass must be a Class (Module given) (TypeError) ...check link for more (https://eval.in/589450)
<norc> gregf_: Yup those are the tiny differences, but under the hood a module and class is practically identical.
<gregf_> norc: but modules cannot be instantiated?
M-Kodo has quit [Remote host closed the connection]
M-mistake has quit [Remote host closed the connection]
M-shine has quit [Remote host closed the connection]
<gregf_> >> class A < Module; end; A.new
<ruby[bot]> gregf_: # => #<A:0x40fb5b54> (https://eval.in/589451)
<norc> gregf_: Only because Module has no class method new and allocate.
<gregf_> oh - ok
<gregf_> norc++
lightt has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
dcunit3d has quit [Ping timeout: 246 seconds]
fiifi has joined #ruby
slackbotgz has joined #ruby
pocketprotector has quit [Ping timeout: 260 seconds]
sevenonezero has quit [Ping timeout: 240 seconds]
chris3492 has quit [Ping timeout: 244 seconds]
Mon_Ouie has quit [Quit: WeeChat 1.5]
joast has joined #ruby
fiifi has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
RegulationD has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
chris3492 has joined #ruby
pocketprotector has joined #ruby
Brklyn has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
matp has joined #ruby
ElFerna has joined #ruby
Guest___ has joined #ruby
Guest___ is now known as greenarrow
Brklyn has quit [Ping timeout: 272 seconds]
<norc> gregf_: In fact if you look up, I just provided an eval.in snippet to show that if you try hard enough you can even instantiate modules. ;-)
evidex has quit [Ping timeout: 244 seconds]
ElFerna has quit [Ping timeout: 264 seconds]
alfiemax has quit [Ping timeout: 246 seconds]
startupality has quit [Quit: startupality]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rodfersou has joined #ruby
rodfersou is now known as rodfersou|afk
startupality has joined #ruby
vuoto has quit [Ping timeout: 246 seconds]
zacstewart has joined #ruby
c355e3b has joined #ruby
vuoto has joined #ruby
M-shine has joined #ruby
<iCHAIT> ^ is this a correct way to reinitialize a string.
pawnbox has joined #ruby
<iCHAIT> "if the cond fails"?
sdothum has joined #ruby
craigp has quit [Ping timeout: 250 seconds]
ebbflowgo has joined #ruby
<gregf_> iCHAIT: "" is not nil
<gregf_> >> "" || "yay"
<ruby[bot]> gregf_: # => "" (https://eval.in/589482)
<gregf_> >> nil || "yay"
<ruby[bot]> gregf_: # => "yay" (https://eval.in/589483)
<gregf_> >> foo = "" ; foo || "yay"
<ruby[bot]> gregf_: # => "" (https://eval.in/589484)
CJKinni has joined #ruby
<iCHAIT> that should be str = ""
<gregf_> >> foo = "" ; !foo.empty? ? foo : "yay"
craigp has joined #ruby
<ljarvis> iCHAIT: yes
<ljarvis> that is correct
<ljarvis> it's re-assign a new string to that variable
<ljarvis> it'll*
zacstewart has quit [Ping timeout: 244 seconds]
<gregf_> oh cond != str *seeing double*
<iCHAIT> ljarvis: but it doesn't seem to work.
<gregf_> iCHAIT: what ljarvis said
<iCHAIT> Obviously it does not give me an error
<iCHAIT> but the logic isn't working
<gregf_> iCHAIT: whats in cond?
<ljarvis> could you elaborate on "doesn't seem to work"?
ebbflowgo has quit [Ping timeout: 244 seconds]
<iCHAIT> def get_times(query = nil)
<iCHAIT> # query is a dict
<iCHAIT> str = ""
<iCHAIT> if query
<iCHAIT> # do something
<iCHAIT> else
<iCHAIT> str = "?"
<iCHAIT> ^ this is my method.
<ljarvis> iCHAIT: paste > 3 lines to gist.github.com as per the topic please
<iCHAIT> sorry
M-Kodo has joined #ruby
<ljarvis> just to be clear, what's a "dict"? a hash? (ruby doesn't have 'dict's)
AlexRussia has joined #ruby
<iCHAIT> yeah, query is a hash.
<iCHAIT> just want to know whether that is correct or not?
<ljarvis> basically I think your query is never returning a non-truthly value.
<ljarvis> yes it's correct
<iCHAIT> ljarvis: Okay, thanks, yeah, then I think the problem may be with query itself.
<ljarvis> although unless you're using "str" inside the truth branch of your condition, it's a bit pointless
alfiemax has joined #ruby
<ljarvis> I would do something like this: https://eval.in/589492
slackbotgz has quit [Remote host closed the connection]
<gregf_> def get_times(query = nil); str = ""; if query; puts "something";else; str = "?";end; p str;end; p [nil, {}].map { |x| get_times(x) } # works for me
<gregf_> well {} needs to be false :|
mikecmpbll has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
<ljarvis> also if query is meant to be a hash, using get_times() e.g. with no arguments seems pointless. So I'm a bit confused why you default query to nil if it's not passed in. If you expect query to be a hash and want to return "?" if it's empty then you should have something like: `def get_times(query); return "?" if query.empty? ...`
ur5us has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
<ljarvis> you're obviously writing tests for this, so you should be able to tweak it easily :) https://eval.in/589501
symm- has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
yeticry has joined #ruby
hutch34 has joined #ruby
pandaant has joined #ruby
toretore has joined #ruby
axxyhtrx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
axxyhtrx has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Ping timeout: 272 seconds]
blackgoat has joined #ruby
araujo_ has joined #ruby
yfeldblum has quit [Ping timeout: 258 seconds]
alfiemax has quit [Ping timeout: 272 seconds]
araujo_ has quit [Max SendQ exceeded]
araujo has quit [Ping timeout: 252 seconds]
JakFrist has joined #ruby
Niham has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
axxyhtrx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandstrom has quit [Quit: My computer has gone to sleep.]
hutch34 has joined #ruby
vuoto has quit [Quit: Lost terminal]
chridal has quit [Ping timeout: 258 seconds]
vuoto has joined #ruby
DoubleMalt has quit [Ping timeout: 246 seconds]
hutch34 has quit [Ping timeout: 250 seconds]
rueben has quit [Ping timeout: 258 seconds]
SubjectiveBias has quit [Quit: leaving]
moeabdol has quit [Ping timeout: 252 seconds]
Brklyn has joined #ruby
CJKinni has quit [Ping timeout: 240 seconds]
tjbiddle has quit [Quit: tjbiddle]
axxyhtrx has joined #ruby
moeabdol has joined #ruby
Brklyn has quit [Ping timeout: 276 seconds]
chridal has joined #ruby
jgt2 has quit [Ping timeout: 244 seconds]
DoubleMalt has joined #ruby
evidex has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has quit [Ping timeout: 260 seconds]
craigp has quit [Ping timeout: 258 seconds]
matp has quit [Remote host closed the connection]
chridal has quit [Ping timeout: 246 seconds]
Silthias has quit [Ping timeout: 240 seconds]
amtrivedi has joined #ruby
<amtrivedi> Can I ask question relating to porting code from another language into ruby?
hutch34 has joined #ruby
zacstewart has joined #ruby
<amtrivedi> I am trying to port the following python code into ruby - https://eval.in/589539
<amtrivedi> here queries is a dictionary containing some key, value pairs.
<amtrivedi> What will be its ruby equivalent?
hutch34 has quit [Ping timeout: 246 seconds]
<amtrivedi> key=operator.itemgetter(0) is the part that I am not sure about.
pwnd_nsfw` has joined #ruby
<amtrivedi> I have figured out the rest of it.
<amtrivedi> CAn anyone help?
Silthias has joined #ruby
greenarrow has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<norc> amtrivedi: What is your specific question?
chridal has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
johnmilton has joined #ruby
<amtrivedi> I want to know how can I write - key=operator.itemgetter(0) in ruby
<norc> amtrivedi: what does it do?
Fernando-Basso has joined #ruby
alfiemax has joined #ruby
zacstewart has quit [Ping timeout: 264 seconds]
<norc> amtrivedi: Mmm sounds a bit like Method#curry
<norc> amtrivedi: Though I would not re-write line by line.
<norc> amtrivedi: What does the entirety of the code do?
blackmesa has quit [Ping timeout: 246 seconds]
hanle has joined #ruby
<norc> amtrivedi: Okay nevermind I misunderstood slightly. Ruby advocates the usage of blocks for these cases.
<norc> amtrivedi: so you would have { |obj| obj.first } for example.
jgt2 has joined #ruby
d0lph1n98 has quit [Ping timeout: 240 seconds]
johnmilton has quit [Ping timeout: 250 seconds]
jnoob22 has joined #ruby
jenrzzz has joined #ruby
<amtrivedi> I didn't understand completely, can you share a link from the official ruby docs?
jaguarmagenta has joined #ruby
hahuang62 has joined #ruby
<norc> amtrivedi: Think of an "itemgetter" as just a lambda with a bizarre syntax and it might become more clear.
blackgoat has quit [Read error: Connection reset by peer]
Dysp has joined #ruby
startupality has quit [Quit: startupality]
jenrzzz has quit [Ping timeout: 250 seconds]
jaguarmagenta has quit [Ping timeout: 244 seconds]
<amtrivedi> norc: That would work for a Hash as well?
<amtrivedi> I mean I am performing that operation on a Hash.
hahuang62 has quit [Ping timeout: 250 seconds]
blackgoat has joined #ruby
<norc> amtrivedi: Enumerable can work for any object that implements #each
matp has joined #ruby
k3rn31 has joined #ruby
rodfersou|afk is now known as rodfersou
Guest__ has joined #ruby
<norc> amtrivedi: And Hash just happens to have #each. :)
<amtrivedi> oh, okay.
solocshaw has quit [Ping timeout: 250 seconds]
<norc> amtrivedi: That might be a useful read by the way.
sandstrom has joined #ruby
moeabdol has joined #ruby
blackmesa has joined #ruby
mdw has joined #ruby
<Dysp> Hi there. Any with experience using rubyXL? I find it extremely hard to understand their documentation.
craigp has joined #ruby
<amtrivedi> norc: Thanks.
<Dysp> I simply want to get an array of sheets in a workbook, but I can simply not figure out how to do it.
<norc> Dysp: workbook.worksheets ?
ur5us has quit [Remote host closed the connection]
<Dysp> Hm. Yeah, tried that. Got confused. Thx, I'll look into were it went wrong in my brain again
Niham has joined #ruby
<Dysp> Good with some confirmation that I was on the right track, just doing something wrong
balo has joined #ruby
johnmilton has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
kknight has joined #ruby
amtrivedi has left #ruby [#ruby]
iCHAIT has left #ruby [#ruby]
k3rn31 has joined #ruby
d0lph1n98 has joined #ruby
johnmilton has quit [Client Quit]
hanmac has quit [Ping timeout: 250 seconds]
johnmilton has joined #ruby
nettoweb has joined #ruby
ldnunes has joined #ruby
kus has joined #ruby
kus has quit [Max SendQ exceeded]
dcunit3d has joined #ruby
hutch34 has joined #ruby
duoi has quit [Ping timeout: 250 seconds]
duoi has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
matp has quit [Remote host closed the connection]
startupality has joined #ruby
charliesome has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
senayar has quit [Remote host closed the connection]
dcunit3d has quit [Ping timeout: 260 seconds]
senayar has joined #ruby
bruce_lee has quit [Ping timeout: 244 seconds]
bruce_lee has joined #ruby
john0123 has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hanmac has joined #ruby
codecop has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Dysp> Can someone explain to me in words what is going on here?
<Dysp> My issue is that I don't fully understand what the AND is doing.
senayar has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
senayar has joined #ruby
rkoller has joined #ruby
matp has joined #ruby
<apeiros> Dysp: it'll shortcut. if row is nil, the row.cells.each do … won't be executed
<apeiros> in some places this is nice. but in the code you gisted, it's IMO a bad replacement for an `if`
<Dysp> Maybe that's why I dont get it.
<Dysp> It's directly from the api of rubyXL
fiifi has joined #ruby
<apeiros> or a .compact a level higher (s.compact.each do |row| …)
<lupine> mm, I'd have a "next unless row" or "next unless cell" myself
<lupine> Using compact might have unexpected memory implications
<lupine> (but might not)
blackmesa has quit [Ping timeout: 250 seconds]
<apeiros> I still go with as little mid-loop-termination as possible
<apeiros> though next is not termination, but goes into the same
<Dysp> For now I simply need to understand what I am doing. Optimization is of less concern.
kedare_ has joined #ruby
anisha has quit [Quit: Leaving]
<Dysp> I've posted the entire function.
<lupine> sure. if your enumerator is a cursor behind the scenes, though, next unless .. is alright. composable iterator behaviours would be cool
roamingdog has joined #ruby
<Dysp> Hm
snebel has joined #ruby
<Dysp> What I need to know to move on is.. what is val actually being set to?
<apeiros> lupine: you can always chain enumerators
alfiemax has left #ruby ["Leaving"]
<Dysp> I've learnt SO MUCH programming in the past few months
<lupine> Dysp: it's being set to the value of each cell that isn't nil
<lupine> but AFAICT it' sjust being thrown away
<Dysp> Really. I am fucking shining.
<Dysp> Then I come in here
tlaxkit has joined #ruby
<Dysp> And I again feel like I am a 2 year old trying to speak
<Dysp> You goddamned nerds (compliment)
<apeiros> that method looks… pointless?
<Dysp> Oh it is.
<Dysp> I will put it all in an array
<apeiros> could be replaced by a single `sheets`
kedare has quit [Ping timeout: 264 seconds]
<Dysp> But can't really do it before I understand :D
<Dysp> So what I would do next is push it into an array, I guess.
ElFerna has joined #ruby
<Dysp> Let me try to rewrite it; maybe I do actually get it.
<Dysp> brb
<Dysp> ^^^
<toretore> looking forward to your reaction when you learn about map and inject
pandaant has quit [Remote host closed the connection]
karmatr0n has joined #ruby
synthroid has joined #ruby
marr has quit [Ping timeout: 260 seconds]
startupality has quit [Quit: startupality]
<Dysp> toretore: what do you mean? I do have a minor knowledge about it ^^
fiifi has quit [Quit: leaving]
pawnbox has joined #ruby
<lupine> Dysp: or use map instead of each
<lupine> depends on what you want the output to look like
Jamo has quit [Ping timeout: 246 seconds]
<Dysp> Simply wanna take a column in the excel sheet and put it into an array.
Jamo has joined #ruby
<Dysp> values that is
DoubleMalt has quit [Ping timeout: 240 seconds]
craigp has quit [Quit: WeeChat 1.5]
karmatr0n has quit [Ping timeout: 240 seconds]
jhack has joined #ruby
evidex has quit [Ping timeout: 244 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
<Dysp> lupine: Wouldn't collect be better than map?
<lupine> same thing
<lupine> shorter name
<Dysp> I just realized.
<Dysp> Oh the learns
<lupine> :D
<apeiros> damit!
<apeiros> I want .each_rest, so I can do: first_row = enum.next; enum.each_rest do |row| …
<apeiros> .each rewinds the enumerator, so just plain enum.each won't do (would repeat the special first row)
evidex has joined #ruby
<lupine> hmm, presumbly enum[1..-1].each has bad effects
AndyBotwin has quit [Ping timeout: 244 seconds]
* lupine cuddles slices
<apeiros> I don't want an array
<apeiros> that's why I have an enumerator in the first place :)
<lupine> :D
<lupine> maybe you could wrap each_with_index and have an each_except(1, ...) { ... }
<lupine> 0*
vuoto has quit [Ping timeout: 246 seconds]
<lupine> the hoops we jump through, eh
<apeiros> I can write a .each_rest just fine
ljarvis has quit [Ping timeout: 246 seconds]
<apeiros> I want it in ruby core/stdlib
vuoto has joined #ruby
<apeiros> class Enumerator; def each_rest; yield(self.next); end; end # done
JakFrist has joined #ruby
<apeiros> errr
<apeiros> class Enumerator; def each_rest; loop do; yield(self.next); end; end; end # done
spiette has joined #ruby
DoubleMalt has joined #ruby
JakFrist has quit [Client Quit]
marr has joined #ruby
ffgghhj has joined #ruby
rkazak has joined #ruby
<gregf_> amtrivedi: i guess thats a sort_by
<gregf_> oops :/
craigp has joined #ruby
houhoulis has joined #ruby
vdamewood has quit [Ping timeout: 240 seconds]
<norc> gregf_: Took you only an hour to understand the Python code.
<norc> I feel your pain.
<norc> ;-)
ElFerna has quit [Ping timeout: 250 seconds]
Jamo has quit [Ping timeout: 240 seconds]
jancel has joined #ruby
<jhass> apeiros: I think I'd rather want something like first_row = enum.next; enum.rest.each .., so that rest returns a new Enumerator without the already consumed elements and I have all of Enumerable available
<gregf_> norc: heh, just saw it :|
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<gregf_> *had to scroll to the bottom*
<jhass> that's just def rest; Enumerator.new do |y| y << next; end; I guess
zacstewart has joined #ruby
Dreamer3_ has quit [Quit: Leaving...]
<jhass> and remaining might be a clearer name
<norc> gregf_: Don't worry. Python code can be quite unreadable, no apology needed.
<norc> :o)
<Dysp> When inspecting array, why am I not getting an array of simple floats?
<gregf_> norc: well, thats why they decided to move to python lol
<jhass> Dysp: jeez, but the unless in line into is own line and indent properly
<apeiros> jhass: makes sense, yes
<Dysp> Shouldn't map return a new array?
<gregf_> Dysp: it does
<jhass> Dysp: it does but .each does not return the blocks return value
lxsameer has quit [Quit: WeeChat 1.5]
evidex has quit [Ping timeout: 244 seconds]
<jhass> and the return value of the outer each is what your method returns
<Dysp> I see! That makes perfect sense.
mikecmpbll has joined #ruby
jancel has quit [Ping timeout: 244 seconds]
<Dysp> That could be fixed defining and calling functions individually, right?
<jhass> not necessarily
<jhass> you could just nest a bunch of .flat_map's
sergio_101 has joined #ruby
<Dysp> Instead of each?
<jhass> yes
<Dysp> Looking it up, thank you.
jhack has quit [Quit: jhack]
moeabdol has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
<Dysp> And I can't get atom to use spaces instead of tabs for some reason. I've tried, but didn't feel like spending hours trying to sort it out
Jamo has joined #ruby
<jhass> heh would expect that to be the default for ruby mode
<jhass> your gist seems to use spaces just fine
swills has quit [Ping timeout: 250 seconds]
dstarh has joined #ruby
<Dysp> Well, then is just my newbieness.
<Dysp> I don't think I understand how flat_map would do any good. At least I don't understand how to use the method to get what I want.
<norc> Dysp: It is quite easy to figure out whether you are using spaces or tabs.
<norc> Dysp: Place some gists into this channel. If you get crucified within a minute you are using tabs.
Vile` has quit [Ping timeout: 272 seconds]
<Dysp> True. True.
rikkipitt has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
<Dysp> I could fix this the newbie way by simply creating a new array and pushing in values and then pass the new array. But I wanna learn how to do it the "proper way" without using work-arounds. jhass: Would you care to explain to me how flat_map would work the way I want?
joonty has quit [Quit: This computer has gone to sleep]
hk238 has quit [Ping timeout: 240 seconds]
nadir has quit [Quit: Connection closed for inactivity]
augcesar has joined #ruby
<Dysp> What confuses me the most is wrapping my head around all the loops nested inside eachother.
<Dysp> which are not loops
<Dysp> iterations.
vuoto has quit [Remote host closed the connection]
fenre has quit []
<jhass> sheets.flat_map {|sheet| sheet.flat_map {|row| row ? row.cells.map {|cell| cell.value if cell } : [] } }.compact I guess
madgen has joined #ruby
<lupine> hurk
<Dysp> I will try to figure out what it does. Thank you.
flashpoint9 has joined #ruby
rikkipitt has quit [Quit: Leaving...]
xcesariox has joined #ruby
tk__ has joined #ruby
hs366 has joined #ruby
charliesome has joined #ruby
mdw has joined #ruby
braincras has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
Brklyn has joined #ruby
moeabdol has joined #ruby
kgrz_ has joined #ruby
blackmesa has joined #ruby
kgrz has quit [Ping timeout: 250 seconds]
jgt2 has quit [Ping timeout: 244 seconds]
d0lph1n98 has quit [Ping timeout: 252 seconds]
Brklyn has quit [Ping timeout: 244 seconds]
mtkd has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
Brklyn has joined #ruby
norc has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
ChiefAlexander has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
last_staff has quit [Quit: last_staff]
Brklyn has quit [Ping timeout: 258 seconds]
ramortegui has joined #ruby
d0lph1n98 has joined #ruby
karmatr0n has joined #ruby
gix- has quit [Quit: Client exiting]
p337rB has joined #ruby
Mia has quit [Read error: Connection reset by peer]
hightower2 has quit [Ping timeout: 258 seconds]
aegis3121 has joined #ruby
k3dare has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
gregf has quit [Read error: Connection reset by peer]
Bish has quit [Read error: Connection reset by peer]
certainty has quit [Ping timeout: 240 seconds]
solocshaw has joined #ruby
gix has joined #ruby
kedare_ has quit [Ping timeout: 264 seconds]
andikr has quit [Remote host closed the connection]
Guest79 has joined #ruby
JakFrist has joined #ruby
blackgoat has quit [Ping timeout: 264 seconds]
allcentury has quit [Ping timeout: 250 seconds]
Guest79 is now known as moonman
frem_ has joined #ruby
hk238 has joined #ruby
jrafanie has joined #ruby
tjbiddle has joined #ruby
tjbiddle has quit [Client Quit]
jaguarmagenta has joined #ruby
hahuang62 has joined #ruby
moeabdol has joined #ruby
swills has joined #ruby
solocshaw has quit [Ping timeout: 276 seconds]
<CustosLimen> hi
<CustosLimen> for parsing command line options - is OptionParser latest and greatest ruby builtin ?
<CustosLimen> I ask cos python has two
<Dysp> jhass: I've spent the last 35 minutes trying to figure out something, but I've ended up at another dead end. I don't know what to do. It's a mixture of the confusing rubyXL api (for me) and nested iterations. Every single cell value in a row is grabbed. I only need the 2nd column.
stardiviner has quit [Ping timeout: 276 seconds]
k3rn31 has joined #ruby
fenre has joined #ruby
<apeiros> CustosLimen: in stdlib, yes
nadir has joined #ruby
malconis has joined #ruby
<shevy> CustosLimen ruby also has get_opt_long :D
ddffg has joined #ruby
malconis has quit [Remote host closed the connection]
<shevy> ruby-doc.org/stdlib/libdoc/getoptlong/rdoc/GetoptLong.html
jaguarmagenta has quit [Ping timeout: 250 seconds]
aegis3121 has quit [Ping timeout: 264 seconds]
hahuang62 has quit [Ping timeout: 250 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
<Dysp> jhass: I've spent the last 35 minutes trying to figure out something, but I've ended up at another dead end. I don't know what to do. It's a mixture of the confusing rubyXL api (for me) and nested iterations. Every single cell value in a row is grabbed. I only need the 2nd column.
solocshaw has joined #ruby
moeabdol has quit [Ping timeout: 252 seconds]
<Dysp> Sorry for repeating, took me longer to paste. Wanted the two lines together
fenre has quit [Remote host closed the connection]
Saloun has quit [Ping timeout: 250 seconds]
kgrz_ has quit [Quit: leaving]
fenre has joined #ruby
sameerynho has joined #ruby
whiteline has quit [Read error: Connection reset by peer]
Saloun has joined #ruby
Saloun has quit [Changing host]
Saloun has joined #ruby
<CustosLimen> is there some ruby conventions for indentation and function/class/variable names ?
Robtop__ has joined #ruby
whiteline has joined #ruby
malconis has joined #ruby
<jhass> Dysp: so don't map over all cells, only take the second one
kgrz has joined #ruby
<jhass> Dysp: .cells[1].value if I had to guess
<jhass> CustosLimen: two spaces for indentation (no tabs)
<jhass> CustosLimen: underscore_case for methods, variables
kareeole_ has joined #ruby
allcentury has joined #ruby
<jhass> CustosLimen: WhateverYouKnowActuallyCallThisVariant for classes/modules
<CustosLimen> is this widely accepted: https://github.com/bbatsov/ruby-style-guide ?
<jhass> some use ^ for constants too, but SCREAMING_SNAKE_CASE is more common
<jhass> yes
the_drow has joined #ruby
nixcluster has joined #ruby
karmatr0n has quit [Ping timeout: 244 seconds]
<Dysp> jhass: Unfortunately I thought that far myself, but no. Returns undefined method []. Which does make sense, because the cells are accessed through rows. So it has to be on the row level.
<nixcluster> Hello. Can someone here possibly answer a ruby question for someone semi new
the_drow has quit [Max SendQ exceeded]
<toretore> SCREAMING_SNAKE_CASE
<CustosLimen> I see nothing in there about column/line length limit - is it just me missing it or is there nothing about it ?
morochena has joined #ruby
morochena has quit [Client Quit]
tristanp has joined #ruby
kareeoleez has quit [Ping timeout: 252 seconds]
wilsonc91 has joined #ruby
the_drow has joined #ruby
<Dysp> nixcluster: Just post your question
<toretore> CustosLimen: you either do 80 or you don't, depending on what kind of person you are
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
the_drow has quit [Max SendQ exceeded]
<CustosLimen> ok
gregf has joined #ruby
<jhass> CustosLimen: 80 is still enforced by default by linters, but many people up that to 120 by now
johnmilton has quit [Ping timeout: 252 seconds]
the_drow has joined #ruby
the_drow has quit [Max SendQ exceeded]
joonty has joined #ruby
the_drow has joined #ruby
the_drow has quit [Max SendQ exceeded]
the_drow has joined #ruby
the_drow has quit [Max SendQ exceeded]
<nixcluster> nevermind actually
<jhass> personally I have a ruler at 70, 80 and 100, as ideal, soft limit and hard limit
the_drow has joined #ruby
ta_ has quit [Remote host closed the connection]
the_drow has quit [Max SendQ exceeded]
the_drow has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
the_drow has quit [Max SendQ exceeded]
mdw has joined #ruby
tristanp has quit [Ping timeout: 272 seconds]
mattwashere has joined #ruby
mattwashere has quit [Remote host closed the connection]
mattwashere has joined #ruby
solocshaw has quit [Ping timeout: 244 seconds]
<shevy> what if you reach 101
<apeiros> 80, 100 and 120 for me
<apeiros> and none of them is hard. yolo!
<shevy> :D
callen92 has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DoubleMalt has quit [Ping timeout: 250 seconds]
xcesariox has joined #ruby
aegis3121 has joined #ruby
diegoaguilar has joined #ruby
platzhirsch has joined #ruby
freerobby has quit [Quit: Leaving.]
dcunit3d has joined #ruby
eljimbo has quit [Quit: This computer has gone to sleep]
ljarvis has joined #ruby
ekinmur has joined #ruby
ljarvis has quit [Client Quit]
terlar has quit [Ping timeout: 240 seconds]
karmatr0n has joined #ruby
dcunit3d has quit [Ping timeout: 244 seconds]
Es0teric has joined #ruby
<jhass> yeah even the hard limit is "soft" by about 10%
d0lph1n98 has quit [Ping timeout: 244 seconds]
certainty has joined #ruby
<jhass> and there are always exceptions
ramfjord has quit [Ping timeout: 252 seconds]
JJM has joined #ruby
JJM is now known as Guest25261
Es0teric has quit [Client Quit]
Es0teric has joined #ruby
DoubleMalt has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
zeroDi has joined #ruby
CJKinni has joined #ruby
blackmesa has joined #ruby
dionysus69 has joined #ruby
JakFrist has left #ruby ["Textual IRC Client: www.textualapp.com"]
roshanavand has joined #ruby
chris3492 has quit [Ping timeout: 244 seconds]
czerasz has joined #ruby
ramfjord has joined #ruby
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
axxyhtrx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eGGshke has quit [Quit: Leaving...]
cdg has joined #ruby
snebel has quit [Ping timeout: 272 seconds]
wilsonc91 has quit [Quit: Textual IRC Client: www.textualapp.com]
Dysp has quit [Quit: Page closed]
kareeole_ has quit [Remote host closed the connection]
snebel has joined #ruby
ncthom91 has joined #ruby
SilverKey has joined #ruby
chris3492 has joined #ruby
kgrz has quit [Ping timeout: 260 seconds]
<nixcluster> Okay sorry about that..i do have a question
<nixcluster> Whats the easiest way to strip the first character off a string? (for example Having :test: and stripping the first :)
freerobby has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
jas02 has quit [Quit: jas02]
mdw has joined #ruby
<apeiros> nixcluster: do you want a new string or modify in-place?
<nixcluster> Moify in place
houhoulis has quit [Remote host closed the connection]
<apeiros> str[0,1] = ""
TheHodge has joined #ruby
davedev24 has joined #ruby
<nixcluster> str =my string right?
<nixcluster> sorry for the dumb question
<nixcluster> Still fairly new
<apeiros> yes, str would be the variable containing your string
<apeiros> >> str = ":test:"; str[0,1] = ""; str
<ruby[bot]> apeiros: # => "test:" (https://eval.in/589693)
<apeiros> the ; are like newlines
<apeiros> so above would normally be 3 lines of code
gnufied has joined #ruby
hutch34 has joined #ruby
<nixcluster> Ah i see
Es0teric has quit [Quit: Computer has gone to sleep.]
<nixcluster> Can the same be done to a variable in an array?
Es0teric has joined #ruby
<nixcluster> nevermind answered my own question
johnmilton has joined #ruby
tristanp has joined #ruby
chouhoulis has joined #ruby
blackmes1 has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
chouhoulis has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Renich has joined #ruby
chouhoulis has joined #ruby
kareeoleez has joined #ruby
palms has joined #ruby
safetypin has joined #ruby
aganov has quit [Remote host closed the connection]
Guest60 has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
kareeoleez has quit [Remote host closed the connection]
ljarvis has joined #ruby
cdg has quit [Remote host closed the connection]
tristanp has quit [Remote host closed the connection]
kies has quit [Ping timeout: 252 seconds]
xcesariox has quit [Remote host closed the connection]
suchness has joined #ruby
bmurt has joined #ruby
kareeoleez has joined #ruby
<nixcluster> Is it possible to have an array of..lets say (
<nixcluster> oops didnt mean to press enter
bmurt has quit [Read error: Connection reset by peer]
Renich has quit [Ping timeout: 276 seconds]
<suchness> So, I have a method that takes in any possible arguments (not blocks and such) like this: def method(*args). I want to take those args and make a key out of them. My first thought was alright, I will just flatten a call .hash. Problem is, I need this key to be consistent. There are other ways I could do this, like inspect the args and do a base64 or something, but I am curious if anyone here has a better idea.
eljimbo has joined #ruby
<nixcluster> Is it possible to have an array of..lets say array(1, 2, 3, 4, 5, 6) and then turn from array[2] onwards into one string? not all of the array?
SilverKey has quit [Quit: Halted.]
<suchness> array[2..-1].join()
bmurt has joined #ruby
sameerynho has quit [Ping timeout: 272 seconds]
snath has quit [Ping timeout: 272 seconds]
Renich has joined #ruby
<nixcluster> thank you
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
bmurt has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
<nixcluster> So in my example array(1, 2, 3, 4, 5, 6) Would array[1..array.length].join output a string of 23456 ?
<nixcluster> nevermind....
<nixcluster> stupid question
ramfjord has quit [Ping timeout: 258 seconds]
<suchness> array[1..array.length - 1].join should
<suchness> well
startupality has joined #ruby
<suchness> array[1..(array.length - 1)].join should
<nixcluster> Why array.length - 1 if you dont mind me asking
solars has quit [Ping timeout: 250 seconds]
Dimik has joined #ruby
<ljarvis> suchness: to be consistent? can you sort it first?
tjohnson has joined #ruby
<suchness> nixcluster: I think you're right, you don't need the minus one
startupality has quit [Client Quit]
<suchness> ljarvis: Might make sense, but I don't know how I would sort it
<ljarvis> nixcluster: array.drop(1)
<ljarvis> .join
<ljarvis> suchness: what's in the array? consistent types?
<suchness> ljarvis: The reason for this is I am generating pdfs, which I need to sync to a cdn, and I don't want to persist in my db, so the parameters coming in will just link to a generated file name, if the file is a little to old, I regenerate and sync again
polishdub has joined #ruby
<suchness> ljarvis: So the arguments could be literally anything
koooge has joined #ruby
solocshaw has joined #ruby
SilverKey has joined #ruby
<suchness> So I get a request from one user to get his account record since blah, i check for the key cdn/account_pdfs/(user, date), if it's there I send that back, if it's old I recreate and sync, and if it's not there I create and sync
<suchness> that's an artificial example but you get my drift
digneety has quit [Quit: digneety]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<suchness> Maybe someone wants a pdf of generate_pdf(user, 'purple', Avocado.new, 234235345, Tricycle.all) or something
armin_ has joined #ruby
fenre has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby
<ljarvis> I think you'd need to provide some kind of keys to each object you send to generate_pdf, otherwise stuff like Avocado.new will never work. There must be some way this PDF generates data from those arguments though, does it call .to_s on them all or something?
<suchness> And after some messing around, inspecting and base64 is way to big in most cases
armin has quit [Ping timeout: 246 seconds]
bmurt has quit [Ping timeout: 258 seconds]
<suchness> ljarvis: Well the pdfs are specific, I mean, an account pdf is always going to get a user and date, and each pdf can have it's own to_key method that's specifically for that type of pdf
tk__ has quit [Quit: ばいばい]
bmurt has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<suchness> if to_key returns one stored in s3 we are good to go
rippa has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
kknight has quit [Quit: Leaving]
crameth has joined #ruby
crameth has quit [Max SendQ exceeded]
bmurt has quit [Read error: Connection reset by peer]
armin_ has quit [Quit: relate to the matter as i drop the bomb]
sameerynho has joined #ruby
pawnbox has quit [Remote host closed the connection]
Niham has quit [Max SendQ exceeded]
aryaching has joined #ruby
zeroDi has quit [Quit: WeeChat 1.5]
Niham has joined #ruby
JesseH2 has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
Niham has quit [Max SendQ exceeded]
startupality has joined #ruby
ChiefAlexander has joined #ruby
Niham has joined #ruby
dionysus69 has joined #ruby
agent_white has joined #ruby
bogn has joined #ruby
Niham has quit [Max SendQ exceeded]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
Niham has joined #ruby
SilverKey has quit [Quit: Halted.]
araujo has quit [Max SendQ exceeded]
araujo has joined #ruby
Niham has quit [Max SendQ exceeded]
norc__ is now known as norc
Niham has joined #ruby
Niham has quit [Max SendQ exceeded]
Niham has joined #ruby
certainty has quit [Ping timeout: 244 seconds]
mattwashere has quit [Remote host closed the connection]
solocshaw has quit [Ping timeout: 272 seconds]
SilverKey has joined #ruby
Niham has quit [Max SendQ exceeded]
Niham has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
rodfersou is now known as rodfersou|lunch
mattwashere has joined #ruby
Niham has quit [Client Quit]
bkxd has joined #ruby
sameerynho has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
Guest60 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
rapha has quit [Ping timeout: 258 seconds]
snath has joined #ruby
bmurt has quit [Max SendQ exceeded]
bmurt has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
diegoviola has joined #ruby
cschneid has joined #ruby
GinoManWorks has joined #ruby
sameerynho has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
Vingador has joined #ruby
codecop has quit [Remote host closed the connection]
ljarvis has quit [Ping timeout: 264 seconds]
Guest60 has joined #ruby
bmurt has quit [Read error: Connection reset by peer]
yardenbar has quit [Quit: Leaving]
kareeoleez has quit [Remote host closed the connection]
mistermocha has joined #ruby
snebel has quit [Quit: Leaving]
CJKinni has quit [Read error: Connection reset by peer]
Guest60 has quit [Client Quit]
kareeoleez has joined #ruby
jaguarmagenta has joined #ruby
hahuang62 has joined #ruby
nixcluster has left #ruby [#ruby]
aufi has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kareeoleez has quit [Remote host closed the connection]
jenrzzz has joined #ruby
synthroid has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
jgt2 has joined #ruby
jancel has joined #ruby
ferr1 has joined #ruby
jaguarmagenta has quit [Ping timeout: 272 seconds]
hahuang62 has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
zacstewart has quit [Read error: Connection reset by peer]
zacstewart has joined #ruby
smathy has joined #ruby
mrmortondk has quit [Quit: Textual IRC Client: www.textualapp.com]
blackmes1 has quit [Ping timeout: 250 seconds]
koooge has quit [Quit: Leaving...]
sphex_ has quit [Ping timeout: 264 seconds]
CJKinni has joined #ruby
sphex has joined #ruby
agentmeerkat has quit [Quit: Lost terminal]
saneax is now known as saneax_AFK
sameerynho has quit [Ping timeout: 244 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
bkxd has quit [Ping timeout: 272 seconds]
ItSANgo has quit [Quit: Leaving...]
matp has quit [Ping timeout: 276 seconds]
synthroid has joined #ruby
stardiviner has joined #ruby
dcunit3d has joined #ruby
synthroid has quit [Ping timeout: 250 seconds]
synthroid has joined #ruby
edwinvdgraaf has quit [Ping timeout: 252 seconds]
dcunit3d has quit [Ping timeout: 244 seconds]
duckpuppy has joined #ruby
hirvi has quit [Quit: leaving]
madgen has quit [Ping timeout: 250 seconds]
amclain has joined #ruby
certainty has joined #ruby
rgs_ has quit [Ping timeout: 264 seconds]
hxegon_afk is now known as hxegon
Dimik has quit [Ping timeout: 244 seconds]
hutch34 has quit [Quit: WeeChat 1.5]
joonty has quit [Quit: This computer has gone to sleep]
k3dare has quit [Quit: Leaving]
hutch34 has joined #ruby
ramfjord has joined #ruby
jancel has quit [Read error: Connection reset by peer]
aryaching has quit [Remote host closed the connection]
certainty has quit [Ping timeout: 272 seconds]
Couch has quit [Ping timeout: 244 seconds]
KriMZ has joined #ruby
fujinuma has joined #ruby
whathappens has joined #ruby
hutch34 has quit [Client Quit]
roamingdog has quit [Remote host closed the connection]
ljarvis has joined #ruby
roamingdog has joined #ruby
aryaching has joined #ruby
aegis3121 has quit [Ping timeout: 250 seconds]
wrkrcoop has joined #ruby
mistermocha has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
<wrkrcoop> in my code if there is an error e.g. parameter is not of the right type, i want to stop the execution of the method, to do this do i want to use raise and rescue?
jancel has joined #ruby
kareeoleez has joined #ruby
<wrkrcoop> i was just checking the type and returning “Error” but code review had a comment to raise and rescue
<wrkrcoop> when i raise and rescue it seems that the method continues the execution
blackmes1 has joined #ruby
araujo_ has joined #ruby
<wrkrcoop> how do i get it to stop execution?
<jhass> ?code
<ruby[bot]> We can't help you without your code, please post it to https://gist.github.com
<wrkrcoop> i cant show code its for work
<wrkrcoop> basically i have a method that takes a hash, i check if its a hash and if its not i want it to not execute the rest of the code
<[ace]> the rescue should be at the end of the method then
<[ace]> well, just use return then
<fujinuma> I've a job interview just about next week and I already read "The Well-Grounded Rubyist" and "Rails 4 in Action" books last month. what do you suggest about review my understanding?
<jhass> show an example that clearly demonstrates your problem, it should be runnable
<apeiros> wrkrcoop: write code you can show then
<[ace]> or abort
<wrkrcoop> ace: code review said not to
<apeiros> wrkrcoop: otherwise get a consultant (which means paid)
<wrkrcoop> fujinuma: write an app
<[ace]> can you get whoever did the code review in this channel?
araujo_ has quit [Client Quit]
<wrkrcoop> [ace]: nope
mistermocha has quit [Ping timeout: 250 seconds]
<wrkrcoop> so just put the rescue at the end of the method?
araujo_ has joined #ruby
<fujinuma> wrkrcoop: I did it but last month.
<wrkrcoop> fujinuma: build another
<fujinuma> wrkrcoop: OK
<wrkrcoop> fujinuma: work on your weaknesses
<jhass> wrkrcoop: this is all incredibly specific to the real code and usecase
<fujinuma> fujinuma: how about read the books again?
araujo has quit [Ping timeout: 252 seconds]
nettoweb has joined #ruby
<fujinuma> wrkrcoop: how about read the books again?
kobain has joined #ruby
<wrkrcoop> fujinuma: i think experience is better than theory
<fujinuma> wrkrcoop: OK, thanks for the mention.
bratchley has joined #ruby
<bratchley> I'm looking through the Readline doc and I can't seem to find an option for getting readline to cycle through the possibilities by continuing to hit "tab"
<bratchley> which is behavior I've seen in other programs and I'd like to emulate in my script
Guest__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wrkrcoop> i had the first one, i think im supposde to implement something like the 2nd, but when i do the 2nd it continues in the method
tlaxkit has quit [Quit: ¡Adiós!]
<ljarvis> you think you're supposed to?
<toretore> wrkrcoop: the exception is supposed to be rescued outside the method
<jhass> wrkrcoop: rescuing a exception you raise within the same method seems bad style to me
SCHAAP137 has joined #ruby
<toretore> and don't do `api_request.class != Hash`
<jhass> are you sure you're supposed to rescue it in the same method
Hounddog has quit [Remote host closed the connection]
<wrkrcoop> jhass: yeah but i have this error checking thing throughout the method
<jhass> toretore: you already told them yesterday, give up already :P
<ljarvis> is this an assignment or something? im confused
<jhass> wrkrcoop: then extract it to a private method
cek has joined #ruby
<jhass> solve redundant code through extraction, not control flow with exceptions
<toretore> jhass: it didn't help them do what they want: get it done, make the boss happy so they can go home from work
aswen has joined #ruby
<cek> How would you tell ERB template to start next line from 0 column, assuming it's inside indented block?
Charles_CV has quit [Quit: Leaving]
<toretore> not helping with homework is one thing, practically doing someone's job for them is something else
<wrkrcoop> toretore: what was your solution to .class?
<ljarvis> cek: you should stop trying to format the return value of an erb template :P
<wrkrcoop> .class
aryaching has quit [Remote host closed the connection]
<toretore> wrkrcoop: you've been told this several times, but you chose to ignore it
<apeiros> cek: what? did the people in the true and only ruby help channel (##ruby) not help you?
<wrkrcoop> toretore: ok i’m listening
<ljarvis> wat
<cek> let me check that channel
<ljarvis> sigh
<cek> okay, that channel is better than this, indeed.
pawnbox has joined #ruby
<cek> You don't see stupid questions asked in it.
<ljarvis> what is happening
<cek> ljarvis: I would stop trying to do that , but package builder complaints about format.
<cek> that's something i can't control sadly
<ljarvis> the package builder?
<cek> yes, rpmbuild.
<wrkrcoop> toretore: whats the better way for checking class
<cek> i'm preprocessing the spec. Now, anyone knows the answer?
jancel has quit [Remote host closed the connection]
<ljarvis> cek: in which case you should avoid indenting inside the erb
<cek> ljarvis: thanks cap. any more genius ideas?
cdg has joined #ruby
<ljarvis> cek: how many ideas do you want?
<cek> 3
<ljarvis> well, you better outsource for the other 2
<toretore> wrkrcoop: in order of preference: 1) use duck typing, as in obj.respond_to?(:message), 2) use obj.is_a?(Klass) 3) don't use obj.class == Klass, 0) don't rely on any of these techniques
<cek> <%- sounds like fun.
<toretore> wrkrcoop: this is me literally using the up arrow to paste exactly what i told you earlier
mattwashere has quit [Remote host closed the connection]
<wrkrcoop> toretore: why is is_a? better than .class == ?
mattwashere has joined #ruby
<ljarvis> >> [Class.is_a?(Module), Class.class == Module]
ChiefAlexander has quit [Remote host closed the connection]
<ljarvis> :/
<ljarvis> no more eval?
<jhass> ljarvis: you identified?
<ljarvis> o
<ljarvis> >> [Class.is_a?(Module), Class.class == Module]
B1n4r10 has joined #ruby
<ruby[bot]> ljarvis: # => [true, false] (https://eval.in/589803)
<ljarvis> :|
<apeiros> I guess I should inform on unidentified and simply shield the info with the floodshield
<apeiros> >> Class.instance_of?(Module)
<ruby[bot]> apeiros: # => false (https://eval.in/589804)
<apeiros> in case you want that behavior
<apeiros> though I'd presume that's rather the exception and .class == is in error
<cek> Module === Class.new
sebstrax has quit [Quit: Connection closed for inactivity]
davedev2_ has joined #ruby
<jhass> Module#=== is for case and some few core methods like Array#grep
<jhass> don't use it explicitly, that's ugly
ChiefAlexander has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has quit [Ping timeout: 250 seconds]
jhack has joined #ruby
<cek> >> a=->{a[]};a[]
<ruby[bot]> cek: # => stack level too deep (SystemStackError) ...check link for more (https://eval.in/589805)
mattwashere has quit [Remote host closed the connection]
bmurt has joined #ruby
nhhc has quit [Remote host closed the connection]
<apeiros> !kick cek trying to break the bot is against the rules, don't.
cek was kicked from #ruby by ruby[bot] [trying to break the bot is against the rules, don't.]
<ljarvis> :)
<ljarvis> I had my finger on the trigger anyway
DoubleMalt has quit [Remote host closed the connection]
jaruga____ has quit [Quit: jaruga____]
pr0ton has joined #ruby
danostrowski has joined #ruby
Saloun has quit [Ping timeout: 250 seconds]
czerasz has quit [Ping timeout: 260 seconds]
dcunit3d has joined #ruby
bmurt has quit [Ping timeout: 244 seconds]
flashpoint9 has quit [Remote host closed the connection]
axisys has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
moeabdol has joined #ruby
aswen has quit [Ping timeout: 276 seconds]
bmurt has joined #ruby
infra-red has joined #ruby
tubuliferous_ has quit [Ping timeout: 244 seconds]
infra-red has quit [Remote host closed the connection]
nb_bez___ has joined #ruby
Saloun has joined #ruby
Saloun has quit [Changing host]
Saloun has joined #ruby
pr0ton has quit [Ping timeout: 252 seconds]
bmurt has quit [Max SendQ exceeded]
[Butch] has joined #ruby
Cisne has joined #ruby
Cisne has left #ruby [#ruby]
JakFrist has joined #ruby
vuoto has joined #ruby
bmurt has joined #ruby
Liacost has joined #ruby
bmurt has quit [Max SendQ exceeded]
aberen has quit [Ping timeout: 250 seconds]
rodfersou|lunch is now known as rodfersou
bmurt has joined #ruby
<Liacost> hello
mistermocha has joined #ruby
<havenwood> Liacost: hi
mistermo_ has joined #ruby
<havenwood> Liacost: Welcome!
<Liacost> new to irc and trying to figure it out
TomyWork has quit [Ping timeout: 244 seconds]
Vingador has quit [Remote host closed the connection]
senayar has quit []
sameerynho has joined #ruby
Coldblackice has joined #ruby
edwinvdgraaf has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
the_drow has joined #ruby
whathappens has quit [Remote host closed the connection]
pilne has joined #ruby
whathappens has joined #ruby
ferr1 has quit [Quit: WeeChat 1.5]
Liacost has quit [Quit: Leaving]
jetpackjoe has joined #ruby
pr0ton has joined #ruby
platzhirsch has quit [Quit: WeeChat 1.4]
B1n4r10 has quit [Ping timeout: 276 seconds]
JakFrist has left #ruby ["Textual IRC Client: www.textualapp.com"]
chouhoulis has quit [Remote host closed the connection]
rueben has joined #ruby
whathappens has quit [Ping timeout: 252 seconds]
jas02 has joined #ruby
chopin has joined #ruby
certainty has joined #ruby
LinuxHippie has quit [Ping timeout: 250 seconds]
acerna has quit [Ping timeout: 250 seconds]
jxf has quit [Ping timeout: 250 seconds]
rflot has quit [Ping timeout: 260 seconds]
Meow-J has quit [Ping timeout: 250 seconds]
the_drow has quit [Read error: Connection reset by peer]
c0mrad3 has quit [Ping timeout: 260 seconds]
vcoinminer has quit [Ping timeout: 260 seconds]
acerna has joined #ruby
LinuxHippie has joined #ruby
Travis-42 has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
stardiviner has quit [Ping timeout: 260 seconds]
rflot has joined #ruby
vcoinminer has joined #ruby
c0mrad3 has joined #ruby
jxf has joined #ruby
fujinuma has quit [Quit: WeeChat 1.4]
Meow-J has joined #ruby
whathappens has joined #ruby
Travis-42 has joined #ruby
the_drow has joined #ruby
certainty has quit [Ping timeout: 250 seconds]
startupality has quit [Quit: startupality]
bogn has quit [Quit: Leaving.]
rueben has quit [Read error: Connection reset by peer]
edwinvdgraaf has quit [Remote host closed the connection]
the_drow has quit [Read error: Connection reset by peer]
skweek has quit [Ping timeout: 250 seconds]
solars has joined #ruby
renderful has joined #ruby
the_drow has joined #ruby
mdw has joined #ruby
mdw has quit [Max SendQ exceeded]
Silthias has quit [Quit: Leaving.]
spider-mario has joined #ruby
hutch34 has joined #ruby
mdw has joined #ruby
jgt2 has quit [Ping timeout: 244 seconds]
<wrkrcoop> toretore: ok using is_a?
<wrkrcoop> implement duck typing some other time
<wrkrcoop> if I raise ‘something went wrong’ in order to catch this do i just do “ rescue => ‘something went wrong’ {code to execute} “
TomyLobo has joined #ruby
replay has joined #ruby
mdw_ has joined #ruby
tomchapin has joined #ruby
mdw_ has quit [Max SendQ exceeded]
chopin has quit [Ping timeout: 272 seconds]
flashpoint9 has joined #ruby
SilverKey has quit [Quit: Halted.]
mdw_ has joined #ruby
Akuma has quit [Ping timeout: 240 seconds]
Guest60 has joined #ruby
jancel has joined #ruby
aldodelgado has joined #ruby
mdw has quit [Ping timeout: 240 seconds]
safetypin has quit [Quit: ZZZzzz…]
the_drow has quit [Read error: Connection reset by peer]
safetypin has joined #ruby
roamingdog has quit [Remote host closed the connection]
Guest60 has quit [Client Quit]
the_drow has joined #ruby
rueben has joined #ruby
norc has quit [Ping timeout: 264 seconds]
<ljarvis> wrkrcoop: do you have a resource for learning Ruby?
mattwashere has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
aegis3121 has joined #ruby
<wrkrcoop> ljarvis: no im in communicating from inside a cave
<wrkrcoop> plato’s cave
<ljarvis> ah i see you're a comedian
<wrkrcoop> all i see are shadows, i’m relying on the wise to explain the shadows
the_drow has quit [Read error: Connection reset by peer]
zeroDi has joined #ruby
<ljarvis> well, from your questions that sounds pretty accurate
<wrkrcoop> i see youre trying to be a comedian
<ljarvis> i'll get there one day
<wrkrcoop> many caves
<elomatreb> hello
<ljarvis> anyway, perhaps you should try looking/trying for yourself before asking someone to help?
<ljarvis> what did you try? why doesn't it work?
jenrzzz has joined #ruby
<wrkrcoop> ljarvis: its not a matter of it not working, i’m interested in best practices
<wrkrcoop> e.g. i used .class == Hash, someone said ‘dude dont do that'
<ljarvis> your suggestion isn't even valid Ruby
<ljarvis> so it is a matter of it working
<ljarvis> show us some code and we'll make suggestions on it
elaptics is now known as elaptics`away
Sashimi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
the_drow has joined #ruby
aberen has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
<shevy> wrkrcoop it is rare to see .class == Something; people tend to either use .is_a? or .respond_to? instead
pr0ton has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
safetypin has quit [Ping timeout: 250 seconds]
aberen has quit [Ping timeout: 240 seconds]
jancel has quit [Read error: Connection reset by peer]
bmurt has quit [Ping timeout: 252 seconds]
Akuma has joined #ruby
mdw has joined #ruby
circ-user-BTdkW has joined #ruby
aldodelgado has joined #ruby
mdw_ has quit [Ping timeout: 244 seconds]
hahuang62 has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
danostrowski has joined #ruby
RegulationD has joined #ruby
Jayson_Virissimo has joined #ruby
the_drow has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
Guest60 has joined #ruby
jancel has joined #ruby
hahuang62 has quit [Ping timeout: 264 seconds]
aberen has joined #ruby
yfeldblum has joined #ruby
hirvi has joined #ruby
wldcordeiro has quit [Ping timeout: 250 seconds]
roshanavand has quit [Quit: Leaving]
hirvi has quit [Client Quit]
k3rn31 has joined #ruby
SCHAAP137 has quit [Ping timeout: 276 seconds]
the_drow has quit [Read error: Connection reset by peer]
mattwashere has quit [Remote host closed the connection]
mattwashere has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
hirvi has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
Sashimi has joined #ruby
wilsonc91 has joined #ruby
the_drow has joined #ruby
babblebre has joined #ruby
mdw_ has joined #ruby
minimalism has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
Guest60 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SilverKey has joined #ruby
jhack has quit [Quit: jhack]
hahuang62 has joined #ruby
sameerynho has quit [Ping timeout: 240 seconds]
mdw has quit [Ping timeout: 272 seconds]
circ-user-BTdkW has quit [Remote host closed the connection]
the_drow has quit [Read error: Connection reset by peer]
Sashimi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
travisxcode has joined #ruby
wldcordeiro has joined #ruby
sameerynho has joined #ruby
flashpoint9 has joined #ruby
dfockler has joined #ruby
roamingdog has joined #ruby
mwlang has joined #ruby
SilverKey has quit [Quit: Halted.]
the_drow has joined #ruby
bmurt has joined #ruby
JakFrist has joined #ruby
bmurt has quit [Max SendQ exceeded]
<pilne> there are "style guides" an guides to what is and isn't "idiomatic" ruby availiable online.
hahuang62 has quit [Ping timeout: 272 seconds]
wilsonc9_ has joined #ruby
bmurt has joined #ruby
certainty has joined #ruby
wilsonc91 has quit [Ping timeout: 246 seconds]
DanyC has joined #ruby
roamingdog has quit [Remote host closed the connection]
chopin_ has joined #ruby
freerobby1 has joined #ruby
freerobby has quit [Read error: No route to host]
<pilne> maybe i should check timestamps better
roamingdog has joined #ruby
chopin_ has quit [Remote host closed the connection]
jas02 has quit [Quit: jas02]
chopin_ has joined #ruby
vuoto_ has joined #ruby
vuoto has quit [Read error: Connection reset by peer]
blackmes1 has quit [Ping timeout: 250 seconds]
schuuu1 has joined #ruby
certainty has quit [Ping timeout: 244 seconds]
roamingdog has quit [Read error: No route to host]
vuoto has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
the_drow_ has joined #ruby
the_drow_ has quit [Read error: Connection reset by peer]
jancel has quit [Remote host closed the connection]
aldodelgado has quit [Quit: aldodelgado]
wilsonc9_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bluOxigen has quit [Ping timeout: 240 seconds]
vuoto_ has quit [Remote host closed the connection]
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
SilverKey has joined #ruby
vuoto has quit [Remote host closed the connection]
wilsonc91 has joined #ruby
the_drow has joined #ruby
vuoto has joined #ruby
tubuliferous_ has joined #ruby
fnux has quit [Ping timeout: 264 seconds]
Renich has quit [Ping timeout: 250 seconds]
callen92 has quit [Quit: Leaving]
<shevy> yeah but who decided on these styles
roamingdog has joined #ruby
<shevy> some make sense, others are quite peculiar
wilsonc91 has quit [Client Quit]
fnux has joined #ruby
vuoto has quit [Read error: Connection reset by peer]
vuoto_ has joined #ruby
wilsonc91 has joined #ruby
whathapp_ has joined #ruby
ramfjord has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
travisxcode has quit [Ping timeout: 252 seconds]
tubuliferous_ has quit [Ping timeout: 264 seconds]
maucar has joined #ruby
wilsonc91 has quit [Client Quit]
whathappens has quit [Ping timeout: 244 seconds]
<Jayson_Virissimo> I follow style guides pretty closely, since it improves readability if an entire project uses the same style, but I would like to see a style guide with at least attempts at justifying each guideline.
DanyC has quit [Remote host closed the connection]
wilsonc91 has joined #ruby
DanyC has joined #ruby
allcentury has quit [Ping timeout: 272 seconds]
stuffandthings has joined #ruby
hahuang61 has joined #ruby
hahuang65 has quit [Ping timeout: 258 seconds]
<shevy> yeah!
norc has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
<stuffandthings> I've got this line of code, get_ids(items).all? { |id| Product.exists?(id) } which will do N queries if items is of length N. How can I do this in a single query?
Guest60 has joined #ruby
<jhass> Jayson_Virissimo: https://gist.github.com/jhass/a5ae80d87f18e53e7b56 tries to justify the deviations from rubocop's defaults at least
<jhass> stuffandthings: Product.exists?(id: get_ids(items)) should work
wilsonc91 has quit [Client Quit]
<jhass> ah no, nvm, all
<smathy> Compare the counts
<jhass> ids = get_ids(items); Product.count(id: ids) == ids.size
schuuu1 has quit [Quit: Leaving]
<Jayson_Virissimo> That'll fail in special cases, won't it?
<jhass> Jayson_Virissimo: like?
<jhass> well, id not being unique
<jhass> but that's not too likely
<Jayson_Virissimo> Hmmm...yeah, should be fine.
B1n4r10 has joined #ruby
rapha_ has joined #ruby
<stuffandthings> id is unique so I'm all set, thanks jhass
roamingdog has quit [Remote host closed the connection]
<stuffandthings> oh wait
<stuffandthings> the first one is incorrect? Product.exists?(id: get_ids(items))
<Jayson_Virissimo> jhass: That's pretty kewl, I haven't really seen that done. Although, I don't agree with their 20 line method max.
sauvin has quit [Read error: Connection reset by peer]
<jhass> stuffandthings: yes the first one is incorrect
<jhass> that'd be any?
the_drow has quit [Read error: Connection reset by peer]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<stuffandthings> so what I need is for that to be true if every id has a product, and false if any of the id's doesn't have a corresponding product
<stuffandthings> I may have just been wrong about my original use of .all?
roamingdog has joined #ruby
edwinvdg_ has joined #ruby
allcentury has joined #ruby
<jhass> no sounds like an .all?, to phrase it more clearly: each given id should exist
DanyC has quit []
vuoto_ has quit [Remote host closed the connection]
<stuffandthings> I'm unclear on why Product.exists?(id: get_ids(items)) won't work
vuoto has joined #ruby
<jhass> it's any?
<jhass> it'll return true if any exists
<stuffandthings> ohh
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jas02 has joined #ruby
<stuffandthings> of course. Makes sense. Thanks!
Es0teric has quit [Quit: Computer has gone to sleep.]
Es0teric has joined #ruby
eljimbo has quit [Quit: This computer has gone to sleep]
chopin_ has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
kszarlej has quit [Quit: leaving]
the_drow has joined #ruby
bluOxigen has joined #ruby
roamingdog has quit [Remote host closed the connection]
nfk has joined #ruby
sandstrom has joined #ruby
wilsonc91 has joined #ruby
agentmeerkat has joined #ruby
DoubleMalt has joined #ruby
roamingdog has joined #ruby
Mon_Ouie has joined #ruby
yfeldblum has joined #ruby
rodfersou is now known as rodfersou|afk
miqlas-H has joined #ruby
choke has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karmatr0n has quit [Ping timeout: 250 seconds]
wilsonc91 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
multi_io has quit [Ping timeout: 252 seconds]
freerobby1 has quit [Quit: Leaving.]
hutch34 has quit [Ping timeout: 244 seconds]
moeabdol has quit [Ping timeout: 250 seconds]
mikecmpbll has joined #ruby
multi_io has joined #ruby
blaxter has joined #ruby
evie_hammond has joined #ruby
wilsonc91 has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
roamingdog has quit [Remote host closed the connection]
bmurt has quit [Read error: Connection reset by peer]
codecop has joined #ruby
matp has joined #ruby
roamingdog has joined #ruby
wilsonc91 has quit [Client Quit]
tildes has joined #ruby
evie_hammond has quit [Quit: WeeChat 1.5]
the_drow has joined #ruby
Jayson_Virissimo has quit []
duoi has quit [Ping timeout: 250 seconds]
moeabdol has quit [Ping timeout: 244 seconds]
roamingdog has quit [Remote host closed the connection]
blaxter has quit [Quit: KTHXBYE]
roamingdog has joined #ruby
duoi has joined #ruby
wilsonc91 has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
idletask has joined #ruby
SilverKey has quit [Quit: Halted.]
LastWhisper____ has joined #ruby
LastWhisper____ has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
wilsonc91 has quit [Client Quit]
B1n4r10 has quit [Ping timeout: 264 seconds]
eljimbo has joined #ruby
blackmes1 has joined #ruby
certainty has joined #ruby
SilverKey has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
SilverKey has quit [Client Quit]
SilverKey has joined #ruby
roamingdog has quit [Remote host closed the connection]
certainty has quit [Ping timeout: 272 seconds]
rodfersou|afk is now known as rodfersou
nankyokusei has joined #ruby
blackmes1 has quit [Ping timeout: 276 seconds]
roamingdog has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
kristofferR has joined #ruby
jancel has joined #ruby
hutch34 has joined #ruby
stuffandthings has quit [Ping timeout: 250 seconds]
ornerymoose has joined #ruby
the_drow has joined #ruby
wilsonc91 has joined #ruby
arooni has joined #ruby
SilverKey has quit [Read error: Connection reset by peer]
symm- has joined #ruby
nankyokusei has quit [Ping timeout: 264 seconds]
SilverKey has joined #ruby
<ornerymoose> Hello. I’m having trouble getting the first two arguments of my Haversine formula to work without hardcoded values. I’ve used Array#zip on the 3rd and fourth parameters and that is working well (with params 1 and 2 being hardcoded). Any suggestions? https://gist.github.com/ornerymoose/c4a45540304706e78191894dfe6b2539 .
mtkd has quit [Ping timeout: 258 seconds]
SCHAAP137 has joined #ruby
ur5us has joined #ruby
tubuliferous_ has joined #ruby
mtkd has joined #ruby
jancel has quit [Ping timeout: 272 seconds]
frem_ has quit [Quit: Connection closed for inactivity]
the_drow has quit [Read error: Connection reset by peer]
wilsonc91 has quit [Client Quit]
nb_bez___ has quit [Quit: Connection closed for inactivity]
duoi has quit [Ping timeout: 250 seconds]
matp has quit [Ping timeout: 250 seconds]
johnmilton has quit [Remote host closed the connection]
duoi has joined #ruby
tubuliferous_ has quit [Ping timeout: 240 seconds]
edwinvdg_ has quit [Remote host closed the connection]
yqt has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
kirun has joined #ruby
the_drow has joined #ruby
wilsonc91 has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
neha_ has joined #ruby
dfockler has quit [Ping timeout: 250 seconds]
arooni has quit [Ping timeout: 272 seconds]
blackmes1 has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tricon has joined #ruby
dcunit3d has quit [Ping timeout: 250 seconds]
lightt has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
neha_ is now known as neha-
jaguarmagenta has joined #ruby
tokynet has joined #ruby
arooni has joined #ruby
duoi has quit [Ping timeout: 250 seconds]
diegoaguilar has quit [Remote host closed the connection]
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
dcunit3d has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
duoi has joined #ruby
KriMZ has quit [Quit: Lost terminal]
the_drow has joined #ruby
sepp2k has joined #ruby
jaguarmagenta has quit [Ping timeout: 240 seconds]
aswen has joined #ruby
p337rB_ has joined #ruby
diegoviola has quit [Quit: WeeChat 1.5]
arooni has quit [Ping timeout: 250 seconds]
mwlang has quit [Quit: mwlang]
skweek has joined #ruby
postmodern has joined #ruby
symm- has quit [Quit: Leaving...]
codecop has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 264 seconds]
mdw_ has quit [Quit: Sleeping Zzzzz]
p337rB has quit [Ping timeout: 244 seconds]
palms has quit [Ping timeout: 252 seconds]
jas02 has quit [Quit: jas02]
pawnbox has quit [Remote host closed the connection]
the_drow has quit [Read error: Connection reset by peer]
prestorium has joined #ruby
nofxx has joined #ruby
AndyBotwin has joined #ruby
giz|work has joined #ruby
freerobby has joined #ruby
ornerymoose has left #ruby [#ruby]
ornerymoose has joined #ruby
ornerymoose has left #ruby [#ruby]
ornerymoose has joined #ruby
statelesscode has quit [Ping timeout: 258 seconds]
SilverKey has quit [Quit: Halted.]
statelesscode has joined #ruby
hutch34 has joined #ruby
SilverKey has joined #ruby
choke has joined #ruby
tildes has quit [Ping timeout: 264 seconds]
camilasan has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 264 seconds]
<bratchley> this should return everything after the last '/' shouldn't it? sharePath[ sharePath.rindex /\// ]
<bratchley> for some reason the variable I set that equal to is "47" instead of a string
<bratchley> even though sharePath is a string
bluOxigen has joined #ruby
<jhass> bratchley: not it would only return "/" or nil, on Ruby 1.9+ that is
whathapp_ has quit [Remote host closed the connection]
<jhass> if it returns 47 for you your Ruby is probably older than you are
camilasan has joined #ruby
yardenbar has joined #ruby
<bratchley> 1.8
moeabdol has joined #ruby
<bratchley> what's the proper syntax then?
<jhass> yes, dead, unsupported, eol, a pain to work with
<bratchley> I've also tried sharePath[ sharePath.rindex /\//, sharePath.length ]
<jhass> idk on a modern ruby .rpartition("/").last
<jhass> or just File.basename really
the_drow has joined #ruby
hutch34 has quit [Ping timeout: 244 seconds]
<jhass> >> File.basename("/foo/bar/baz")
<ruby[bot]> jhass: # => "baz" (https://eval.in/589920)
Dreamer3 has quit [Quit: Computer has gone to sleep.]
solars has quit [Ping timeout: 260 seconds]
the_drow has quit [Read error: Connection reset by peer]
<bratchley> .split('/').last seems to work for me
<bratchley> File.basename might be better though
mattwashere has quit []
jackjackdripper has joined #ruby
<jhass> why don't you use a ruby without security issues btw?
aberen has quit [Ping timeout: 246 seconds]
B1n4r10 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
<bratchley> this is the version that comes with RHEL6
<bratchley> so I have to code according to what's there
dionysus69 has joined #ruby
the_drow has joined #ruby
<bratchley> they backport security patches unless it breaks compatibility
moeabdol has quit [Ping timeout: 240 seconds]
mattwashere has joined #ruby
<adaedra> use the software collections to get something a little bit more recent if you don't want to build your own ruby
Es0teric has joined #ruby
<jhass> the codebase moved on so much that it's an insane amount of work to even determine whether an issue already existed
the_drow has quit [Read error: Connection reset by peer]
<bratchley> this is to be used on a wide variety of systems it's not something I'm coding for just one machine
nerium has joined #ruby
<jhass> also "compatibility over security", I just...
<bratchley> it's just a script to automate the config of samba shares
<bratchley> even if it has security issues it's running as the user
<jhass> I mean as a general paradigm for anything
the_drow has joined #ruby
hahuang62 has joined #ruby
<bratchley> right I get what you're saying, it's just sometimes it doesn't matter, like in this case, I'm just doing something to save people time
aberen has joined #ruby
palms has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
danostrowski has joined #ruby
JakFrist has joined #ruby
edwinvdgraaf has joined #ruby
<bratchley> If I were creating a web app or something I'd do the software collection thing but for this anything that works is fine
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
shinnya has quit [Ping timeout: 252 seconds]
<jhass> it's just that it scares me as a paradigm for a distribution
<jhass> "No, we won't patch openssh here because then RHEL5 clients can't connect but they used to be able as we released RHEL6"
<jhass> I'm going hyperbole, but still....
certainty has joined #ruby
<neha-> hey how do i get as_json to print the value of an enum instead of the key
ddffg has quit [Quit: Leaving]
blackgoat has joined #ruby
<norc> neha-, what do you mean?
ramfjord has quit [Ping timeout: 240 seconds]
skweek has quit [Ping timeout: 250 seconds]
<neha-> so i have a class (activerecord model) with an enum type, however on as_json, it serializes out the key name instead of the value (what is stored in the db)
the_drow has quit [Read error: Connection reset by peer]
<neha-> my enum is enum duration: {no: 0, day:1, week:7 }
<neha-> but on as_json for this obj i get "duration": "day"
<neha-> but i would like "duration": 1
certainty has quit [Ping timeout: 240 seconds]
slappy16 has joined #ruby
jenrzzz has joined #ruby
solars has joined #ruby
djbkd has joined #ruby
the_drow has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
<neha-> did that make sense norc
Es0teric has quit [Quit: Computer has gone to sleep.]
Es0teric has joined #ruby
jgt2 has joined #ruby
Guest25261 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
tomchapin has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
PlasmaStar has quit [Quit: ZNC - http://znc.in]
ptierno has quit [Quit: Lost terminal]
PlasmaStar has joined #ruby
tubuliferous_ has joined #ruby
JJM has joined #ruby
ljarvis_ has joined #ruby
JJM is now known as Guest26821
jgt2 has quit [Ping timeout: 250 seconds]
hutch34 has quit [Client Quit]
the_drow has joined #ruby
suchness has quit [Remote host closed the connection]
ljarvis has quit [Ping timeout: 244 seconds]
<norc> neha-, this might be a dumb question but...
<norc> Since when do we have enums in Ruby?
<aegis3121> Rails has them for ActiveRecord
<neha-> ya maybe it's just rails
<neha-> sorry no one was answering in the rails room
<havenwood> Enumerable and Enumerator alone weren't confusing enough so Rails thought they'd add more to the mix.
<neha-> lol
<norc> havenwood, my first thought was C enums actually..
JesseH2 has quit [Remote host closed the connection]
maucar has quit [Quit: Leaving]
Eiam_ has joined #ruby
tubuliferous_ has quit [Ping timeout: 260 seconds]
choke has joined #ruby
hutch34 has joined #ruby
Madplatypus has joined #ruby
<shevy> oh god
synthroid has quit []
arooni has joined #ruby
hahuang62 has quit [Ping timeout: 240 seconds]
bmurt has quit [Read error: Connection reset by peer]
Fernando-Basso has quit [Quit: Leaving]
<shevy> the fearsome enum method
the_drow has quit [Read error: Connection reset by peer]
roamingdog has quit [Remote host closed the connection]
<shevy> enum_values = ActiveSupport::HashWithIndifferentAccess.new
<shevy> :)
danostrowski has joined #ruby
nullfxn has quit [Ping timeout: 258 seconds]
<neha-> how do i override as_json to like replace an existing key though
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
the_drow has joined #ruby
giz|work has quit [Read error: Connection reset by peer]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
giz|work has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<neha-> this is so gross
<neha-> maybe i should just use an int
edwinvdgraaf has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
FooMunki has quit [Quit: FooMunki]
SilverKey has quit [Quit: Halted.]
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
B1n4r10 has quit [Quit: leaving]
ips|malc has joined #ruby
cdg has quit [Remote host closed the connection]
aries_liuxueyang has quit [Quit: No Ping reply in 180 seconds.]
camilasan has quit [Remote host closed the connection]
ornerymoose has quit [Ping timeout: 276 seconds]
the_drow has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
aries_liuxueyang has joined #ruby
the_drow has joined #ruby
camilasan has joined #ruby
roamingdog has joined #ruby
SilverKey has joined #ruby
edwinvdg_ has joined #ruby
truenito has joined #ruby
nettoweb has quit [Ping timeout: 240 seconds]
ips|malc has quit [Ping timeout: 244 seconds]
d0nn1e has quit [Ping timeout: 260 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
Emmanuel_Chanel has quit [Quit: Leaving]
nullfxn has joined #ruby
d0nn1e has joined #ruby
sameerynho has quit [Ping timeout: 250 seconds]
edwinvdgraaf has quit [Ping timeout: 272 seconds]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
choke has joined #ruby
rcvalle has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
the_drow has quit [Read error: Connection reset by peer]
nullfxn has quit [Client Quit]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
danostrowski has joined #ruby
gusrub has quit [Quit: Leaving]
swills has quit [Ping timeout: 252 seconds]
Emmanuel_Chanel has joined #ruby
dcunit3d has quit [Ping timeout: 258 seconds]
Emmanuel_Chanel has quit [Max SendQ exceeded]
the_drow has joined #ruby
Emmanuel_Chanel has joined #ruby
Sashimi has joined #ruby
giz|work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
VeryBewitching has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
gusrub has joined #ruby
arlek has joined #ruby
dcunit3d has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
AcidCrash has quit [Read error: Connection reset by peer]
Dreamer3 has joined #ruby
AcidCrash has joined #ruby
RedNifre has joined #ruby
RedNifre has quit [Client Quit]
whathappens has joined #ruby
Eiam_ has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
Eiam_ has quit [Client Quit]
<tokynet> hello, i need to add 3 dashes to a string, i found this insert(index, other_str) → str which allows me to add 1 dash, any suggestions on how to add the other 2 dashes?
blackgoat has quit [Quit: WeeChat 1.5]
<tokynet> OUTACCOUNT.insert(4, '-') <= this gave me the string w/ 1 dash
the_drow has joined #ruby
blackgoat has joined #ruby
<shevy> "abcdef".insert(4, '----') # => "abcd----ef"
the_drow has quit [Max SendQ exceeded]
<tokynet> OUTACCOUNT.insert(4,8 '-') <= this failed
dar123 has joined #ruby
aswen has quit [Quit: WeeChat 1.5]
<tokynet> my bad, what i need is a dash every 4 chars...i see i didnt explain right...
the_drow has joined #ruby
<shevy> aha
<shevy> a regex might do then
whathappens has quit [Ping timeout: 276 seconds]
<shevy> "abcdefghijkl".gsub(/(.{1,4})/, "\\1-") # => "abcd-efgh-ijkl-"
<shevy> hmm
<shevy> is that four? or rather fifth... guess you change 1,4 to 1,3 ... not sure I am counting correctly
<danostrowski> So... where's the best room to ask an activerecord question?
<toretore> >> '1111222233334444'.chars.each_slice(4).map{|s| s.join }.join('-')
<ruby[bot]> toretore: # => "1111-2222-3333-4444" (https://eval.in/589943)
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tokynet> thanks shevy
tomchapin has joined #ruby
<toretore> if you know that it's always 3 dashes, just insert 3 times
<norc> tokynet, scan and join.
wilsonc91 has quit [Quit: Textual IRC Client: www.textualapp.com]
prestorium has quit [Ping timeout: 250 seconds]
jancel has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
<shevy> \o/
palms has quit [Quit: leaving]
<norc> toretore, what is your goal?
<shevy> total world domination!
allcentury has quit [Ping timeout: 244 seconds]
<tokynet> yea, we have this account number which some appteams break into xxxx-xxxx-xxxx-xxxx so it will always be that
the_drow has joined #ruby
<shevy> hmm... looks like some hashed format... don't UUIDs also have some similar schemata?
<jhass> I feel like there's a zero-width regex match solution to this but I can't find it :/
the_drow has quit [Max SendQ exceeded]
the_drow has joined #ruby
dfockler has joined #ruby
Guest26821 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> too much crystal is spoiling ya, I tell ya
duckpuppy has joined #ruby
jetpackj1 has joined #ruby
<jhass> nah, I don't have a libpcre solution for it either
jancel has quit [Ping timeout: 258 seconds]
joaumg has joined #ruby
certainty has joined #ruby
jetpackjoe has quit [Ping timeout: 264 seconds]
<norc> tokynet, is the string length guaranteed to be constant?
dar123 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<norc> fixed that is.
the_drow has quit [Read error: Connection reset by peer]
joaumg has quit [Quit: WeeChat 1.0.1]
tubuliferous_ has joined #ruby
Guest63 has joined #ruby
<tokynet> hmm that is a good one, i know right now it is, not sure if it will grow out of 16 chars long
vuoto has quit [Quit: Lost terminal]
moeabdol has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
chipotle has quit [Quit: cheerio]
yardenbar has quit [Quit: Leaving]
matp has joined #ruby
certainty has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
the_drow has joined #ruby
Guest63 has quit [Client Quit]
<tokynet> i can do ACCOUNTNUMBER.chars.each_slice(4).map{|s| s.join }.join('-') ?
<tokynet> where accountnumber is a variable
prestorium has joined #ruby
<tokynet> well, i'll just try
diegoaguilar has joined #ruby
whathappens has joined #ruby
jgt2 has joined #ruby
sergio_101 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 244 seconds]
rodfersou has quit [Quit: leaving]
araujo_ has quit [Ping timeout: 246 seconds]
Guest63 has joined #ruby
Regulati_ has joined #ruby
<toretore> it will not modify ACCOUNTNUMBER
araujo_ has joined #ruby
<tokynet> yup, that did it!
<tokynet> now to add some logic to keep this from running if file is there
<havenwood> tokynet: another similar alternative is to scan: scan(/.{1,4}/).join('-')
<toretore> scan is probably better
mtkd has quit [Ping timeout: 244 seconds]
chipotle has joined #ruby
jgt2 has quit [Ping timeout: 258 seconds]
<tokynet> this is what i went wtih:
<tokynet> ACCOUNT.chars.each_slice(4).map{|s| s.join }.join('-')
RegulationD has quit [Ping timeout: 250 seconds]
ldnunes has quit [Quit: Leaving]
<tokynet> i like the syntax of each slice of 4 do x
mtkd has joined #ruby
<jhass> .map(&:join) at least :P
p0p0pr37 has quit [Ping timeout: 240 seconds]
SilverKey has quit [Quit: Halted.]
<tokynet> im thinking i can use FileUtils to check if a file exists to end the script, right?
the_drow has quit [Ping timeout: 244 seconds]
hahuang62 has joined #ruby
<jhass> &ri File.exist?
cdg has joined #ruby
<jhass> &ri Kernel#abort
<havenwood> tokynet: or for "fun": gsub(/.{1,4}/) { "#{Regexp.last_match}-" }.chomp('-')
<jhass> havenwood: "abcdefghijkl".gsub(/(?<=^....|-....)/, "-") make this one work! :P
p0p0pr37 has joined #ruby
<havenwood> hmmm
<shevy> havenwood cool
<shevy> have not seen Regexp.last_match yet
cdg has quit [Remote host closed the connection]
<danostrowski> VeryBewitching: I was confused because I didn't realize that .includes() will run a SECOND query for the included tables, I guess?
solocshaw has joined #ruby
<havenwood> shevy: there's also: gsub(/(.{1,4})/, '\1-')
<VeryBewitching> danostrowski: Yup.
freerobby has quit [Quit: Leaving.]
cdg has joined #ruby
joaumg has joined #ruby
SilverKey has joined #ruby
<danostrowski> I want ONE query that pre-populates the related models.... which maybe works with .includes() and .joins() put together, but I'm not sure how I'd really verify that it's only doing one query... maybe there's some debugging log I can turn on and just run it in the console...
<smathy> .gsub /(?<=.)(?=(.{4})+$)/, '-'
<shevy> havenwood hmm so Regexp.last_match is the verbose variant of \1 ?
<havenwood> smathy: hehe: reverse.gsub(/(?<=.)(?=(.{4})+$)/, '-').reverse
<danostrowski> VeryBewitching: It actually doesn't say that anywhere.
<toretore> danostrowski: sometimes it does one query, sometimes it does two, depending on which is presumed to be faster
<danostrowski> VeryBewitching the comment might say it, but the docs there don't mention it at all.
<havenwood> shevy: note the capture in the latter
<havenwood> shevy: ()
<toretore> danostrowski: one query is not always faster than two
symm- has joined #ruby
lightt has quit [Remote host closed the connection]
<havenwood> shevy: the first arg difference
hahuang62 has quit [Ping timeout: 240 seconds]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
<shevy> ah I see
<VeryBewitching> danostrowski: This might clear it up http://tomdallimore.com/blog/includes-vs-joins-in-rails-when-and-where/
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
Guest60 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<danostrowski> VeryBewitching it doesn't, really, it's actually quite confusing.
<danostrowski> "However, when using the includes method, it has already eagerly loaded the associated person table, so this block only required a single query. Awesome, right?!"
<danostrowski> but that doesn't actually happen every time with .includes() apparently.
<danostrowski> if the query planner decides that's what it will do, it will do it.
jaguarmagenta has joined #ruby
kareeole_ has joined #ruby
<danostrowski> I get it, but you seem to not be able to force predictable behavior and it was confusing to look at the .to_sql output.
firstdayonthejob has joined #ruby
kareeole_ is now known as kareeoleez_
kareeoleez has quit [Ping timeout: 244 seconds]
ChiefAlexander has quit [Remote host closed the connection]
zacstewart has quit [Read error: Connection reset by peer]
zacstewart has joined #ruby
Guest63 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
jaguarmagenta has quit [Ping timeout: 258 seconds]
ramfjord has joined #ruby
evie_hammond has joined #ruby
truenito has quit [Remote host closed the connection]
Guest63 has joined #ruby
ItSANgo has joined #ruby
chouhoul_ has joined #ruby
rattatmatt has joined #ruby
<tokynet> is there a 'proper' way to end a ruby script? all the script does is read an account number, add the dashes and put the account number with dashes in a txt file. I'm closing the file after the 2 puts im doing, should i do something more?
p337rB_ has quit [Ping timeout: 240 seconds]
roamingdog has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 264 seconds]
nerium has quit [Quit: nerium]
chouhoul_ has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
ramfjord_ has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
n_blownapart has joined #ruby
Guest63 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aeterne has joined #ruby
flashpoint9 has joined #ruby
mattwashere has quit [Remote host closed the connection]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kies has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
mattwashere has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
prestorium has quit [Quit: Leaving]
dcunit3d has quit [Ping timeout: 244 seconds]
flashpoint9 has quit [Remote host closed the connection]
danostrowski has joined #ruby
kareeoleez_ has quit [Remote host closed the connection]
<al2o3-cr> tokynet: put a bomb on the muthafucka
<tokynet> mkay
<tokynet> ;)
SilverKey has quit [Quit: Halted.]
mattwashere has quit [Remote host closed the connection]
jhack has joined #ruby
jhack has quit [Client Quit]
jhack has joined #ruby
norc has quit [Read error: Connection reset by peer]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
jord-n has quit [Quit: leaving]
mattwashere has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest60 has joined #ruby
kies has quit [Ping timeout: 246 seconds]
jhack has quit [Ping timeout: 250 seconds]
SilverKey has joined #ruby
malconis has quit [Ping timeout: 276 seconds]
neha- has quit [Read error: Connection reset by peer]
tlaxkit has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
lightt has joined #ruby
certainty has joined #ruby
jenrzzz_ has joined #ruby
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> tokynet as long as you properly close the file handle
GodFather has joined #ruby
<toretore> tokynet: as long as you don't have threads or forks to care about, the only other thing is the return status
edwinvdg_ has quit [Remote host closed the connection]
GodFather has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 244 seconds]
GodFather has joined #ruby
certainty has quit [Ping timeout: 258 seconds]
<tokynet> no, no threads, this is super simple, check if file exists, (if yes exit) , check operating system (to define path of file to be created) make a curl call to get some json, add dashes and write it to a file.
roamingdog has joined #ruby
arlek has quit [Ping timeout: 240 seconds]
ffgghhj has quit [Ping timeout: 252 seconds]
roamingdog has quit [Remote host closed the connection]
whathappens has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
skweek has joined #ruby
cdg has quit [Remote host closed the connection]
nankyokusei has joined #ruby
cdg has joined #ruby
ljarvis_ has quit [Ping timeout: 252 seconds]
lightt has quit [Remote host closed the connection]
lightt has joined #ruby
ljarvis has joined #ruby
heinrich5991 has quit [Ping timeout: 250 seconds]
<al2o3-cr> set it fire
solars has quit [Ping timeout: 252 seconds]
ta_ has quit [Read error: Connection reset by peer]
ta__ has joined #ruby
aberen has quit [Ping timeout: 276 seconds]
<al2o3-cr> cos computers don't care about sin
<shevy> marry a computer!
<al2o3-cr> shevy: ride solo pal
jgt2 has joined #ruby
jetpackjoe has joined #ruby
ljarvis has quit [Ping timeout: 240 seconds]
<al2o3-cr> it's for the best
craigp has quit [Ping timeout: 244 seconds]
<al2o3-cr> unless you're a veteran
whathappens has joined #ruby
polishdub has quit [Quit: Leaving]
snath has quit [Ping timeout: 250 seconds]
jetpackj1 has quit [Ping timeout: 258 seconds]
dcunit3d has joined #ruby
BillSussman has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord_ has quit [Ping timeout: 252 seconds]
mistermo_ has quit [Remote host closed the connection]
solars has joined #ruby
rattatmatt has quit []
AndyBotwin has quit [Ping timeout: 252 seconds]
skade has joined #ruby
skade has quit [Client Quit]
workmad3 has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
startupality has joined #ruby
heinrich5991 has joined #ruby
nankyokusei has quit [Remote host closed the connection]
solars has quit [Ping timeout: 260 seconds]
<tokynet> thanks for all the help :)
bruce_lee has quit [Remote host closed the connection]
yfeldblum has joined #ruby
dfockler has quit [Ping timeout: 264 seconds]
Guest60 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
solars has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
choke has joined #ruby
Guest60 has joined #ruby
mistermocha has joined #ruby
<shevy> al2o3-cr hahaha
ryotarai has quit [Ping timeout: 240 seconds]
aegis3121 has quit [Ping timeout: 276 seconds]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kirun has quit [Quit: Client exiting]
Guest60 has quit [Ping timeout: 258 seconds]
ryotarai has joined #ruby
mattwashere has quit [Remote host closed the connection]
solars has quit [Ping timeout: 244 seconds]
slappy16 has quit [Quit: Leaving.]
snath has joined #ruby
slappy16 has joined #ruby
ramfjord has joined #ruby
cschneid has quit [Remote host closed the connection]
n_blownapart has quit []
solars has joined #ruby
augcesar has quit [Quit: Connection closed for inactivity]
rkazak has quit [Ping timeout: 246 seconds]
choke has joined #ruby
tristanp has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
`0ctayn has joined #ruby
jancel has joined #ruby
<`0ctayn> hello
danostrowski has joined #ruby
ocbtec has quit [Quit: leaving]
<havenwood> `0ctayn: hi!
yfeldblu_ has joined #ruby
spiette has quit [Quit: :qa!]
skade has joined #ruby
mdw has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TomyLobo has quit [Ping timeout: 258 seconds]
Tempesta_ has joined #ruby
ornerymoose has joined #ruby
spider-mario has quit [Remote host closed the connection]
certainty has joined #ruby
atom3 has joined #ruby
arooni has quit [Ping timeout: 250 seconds]
ornerymoose has quit [Read error: Connection reset by peer]
dling` has joined #ruby
malconis has joined #ruby
Rutix`away has joined #ruby
Rutix`away has joined #ruby
Rutix`away has quit [Changing host]
ornerymoose has joined #ruby
charles81_ has joined #ruby
iamvery has quit [Ping timeout: 244 seconds]
Regulati_ has quit [Remote host closed the connection]
marens_ has joined #ruby
marens_ has quit [Changing host]
marens_ has joined #ruby
havenn has joined #ruby
havenn has joined #ruby
havenn has quit [Changing host]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
utkarsh_ has joined #ruby
knight_ has joined #ruby
rikai_ has joined #ruby
daemoen_ has joined #ruby
justinmcp_ has joined #ruby
jtd_ has joined #ruby
karmatr0n has joined #ruby
ur5us has quit [Remote host closed the connection]
Rodya_ has joined #ruby
mic_e_ has joined #ruby
ahuman_ has joined #ruby
aberen has joined #ruby
ozzloy_ has joined #ruby
Kuukunen- has joined #ruby
hxegon_ has joined #ruby
Drakx_ has joined #ruby
bob_f_ has joined #ruby
Drakevr_ has joined #ruby
ihme-TTilus has joined #ruby
rubirc_ has joined #ruby
sunnyparkeunji has joined #ruby
mc_fail_ has joined #ruby
gypsydav15 has joined #ruby
izaac_ has joined #ruby
arooni has joined #ruby
jericon_ has joined #ruby
Muz_ has joined #ruby
matti_ has joined #ruby
olblak_ has joined #ruby
parus_ has joined #ruby
ejnahc_ has joined #ruby
jancel has quit [Remote host closed the connection]
abort has joined #ruby
ironcame1 has joined #ruby
gigetoo_ has joined #ruby
certainty has quit [Ping timeout: 252 seconds]
chrisarc1nd has joined #ruby
Skelz0r_ has joined #ruby
sunya7a_ has joined #ruby
Prira_ has joined #ruby
cout_ has joined #ruby
miah_ has joined #ruby
crankhar1er has joined #ruby
lnx_ has joined #ruby
pabs_ has joined #ruby
ltd has joined #ruby
ammar_ has joined #ruby
ruisanto1 has joined #ruby
pleiosau1 has joined #ruby
Sebastia1Thorn has joined #ruby
badeball_ has joined #ruby
DefV has joined #ruby
slash_ni1k has joined #ruby
_ht_ has joined #ruby
janno_ has joined #ruby
bnjf_ has joined #ruby
iszak_ has joined #ruby
rahc_ has joined #ruby
valeri_uF0 has joined #ruby
netwoodle has joined #ruby
bradland_ has joined #ruby
sunya7a_1 has joined #ruby
sysanthrope_ has joined #ruby
tristanp has quit [Read error: Connection reset by peer]
tristanp has joined #ruby
malconis has quit [Ping timeout: 272 seconds]
aef_ has joined #ruby
roamingdog has joined #ruby
agent_white has quit [Quit: brb]
jgt3 has joined #ruby
whathappens has quit [Remote host closed the connection]
yeltzooo9 has joined #ruby
ozzloy has quit [Disconnected by services]
nullwarp_ has joined #ruby
kenichi_ has joined #ruby
whathappens has joined #ruby
IcyDragon has joined #ruby
cfillion_ has joined #ruby
mayamai has joined #ruby
dunj4 has joined #ruby
pragmati- has joined #ruby
Karunamon|2 has joined #ruby
SenpaiSilver_ has joined #ruby
SirCmpwn_ has joined #ruby
NET||abu- has joined #ruby
aep_ has joined #ruby
joeyjones_ has joined #ruby
twistedpixels_ has joined #ruby
twistedpixels_ has quit [Changing host]
twistedpixels_ has joined #ruby
mosheee has joined #ruby
Nilium_ has joined #ruby
grumpycat has joined #ruby
maxmanders_ has joined #ruby
adam^ has joined #ruby
Radar_ has joined #ruby
Shidash_ has joined #ruby
DenSchub_ has joined #ruby
Jello_Raptor_ has joined #ruby
Miron_ has joined #ruby
dupin has joined #ruby
Danielss89_ has joined #ruby
varesa_ has joined #ruby
samuelkadolph_ has joined #ruby
rhg331 has joined #ruby
scottschecter_ has joined #ruby
ahammond_ has joined #ruby
bgresham has joined #ruby
tubbo` has joined #ruby
Radar has quit [Disconnected by services]
ozzloy_ is now known as ozzloy
lady3bean_ has joined #ruby
Radar_ is now known as Radar
mburns_ has joined #ruby
cb_ has joined #ruby
_ko1 has joined #ruby
hfp_ has joined #ruby
Radar has quit [Changing host]
Radar has joined #ruby
KrzaQ- has joined #ruby
dupin is now known as Guest24104
kkh has joined #ruby
sonne_ has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
g3funk has joined #ruby
adeponte has joined #ruby
uranellus_ has joined #ruby
Ankhers_ has joined #ruby
tgeeky has quit [*.net *.split]
bnjf has quit [*.net *.split]
noodle has quit [*.net *.split]
Tempesta has quit [*.net *.split]
graft has quit [*.net *.split]
_ht has quit [*.net *.split]
ahuman has quit [*.net *.split]
tubbo has quit [*.net *.split]
braidn has quit [*.net *.split]
scottschecter has quit [*.net *.split]
DefV_ has quit [*.net *.split]
jtd has quit [*.net *.split]
Omni_ has quit [*.net *.split]
Todd has quit [*.net *.split]
kriskropd has quit [*.net *.split]
atom3_ has quit [*.net *.split]
aef has quit [*.net *.split]
blingrang has quit [*.net *.split]
crankharder has quit [*.net *.split]
marens has quit [*.net *.split]
daemoen has quit [*.net *.split]
sonne has quit [*.net *.split]
mic_e has quit [*.net *.split]
Nilium has quit [*.net *.split]
Drakx has quit [*.net *.split]
moshee has quit [*.net *.split]
madhatter has quit [*.net *.split]
Danielss89 has quit [*.net *.split]
uranellus has quit [*.net *.split]
Miron has quit [*.net *.split]
marienz has quit [*.net *.split]
Karunamon has quit [*.net *.split]
cb has quit [*.net *.split]
coffeejunk has quit [*.net *.split]
inukshuk has quit [*.net *.split]
hxegon has quit [*.net *.split]
mexis has quit [*.net *.split]
xybre has quit [*.net *.split]
havenwood has quit [*.net *.split]
justinmcp has quit [*.net *.split]
ahammond has quit [*.net *.split]
gnarf has quit [*.net *.split]
jtperreault has quit [*.net *.split]
rahc has quit [*.net *.split]
sysanthrope has quit [*.net *.split]
knight- has quit [*.net *.split]
chrisarcand has quit [*.net *.split]
demophoon has quit [*.net *.split]
Ankhers has quit [*.net *.split]
Muz has quit [*.net *.split]
miah has quit [*.net *.split]
Silex has quit [*.net *.split]
bradland has quit [*.net *.split]
hplar has quit [*.net *.split]
_ko10 has quit [*.net *.split]
maxmanders has quit [*.net *.split]
izaac has quit [*.net *.split]
varesa has quit [*.net *.split]
Koshian_ has quit [*.net *.split]
Prira has quit [*.net *.split]
ruisantos has quit [*.net *.split]
iszak has quit [*.net *.split]
lady3bean has quit [*.net *.split]
matti has quit [*.net *.split]
jericon has quit [*.net *.split]
bob_f has quit [*.net *.split]
SCHAAP137 has quit [*.net *.split]
iamayam has quit [*.net *.split]
Rutix has quit [*.net *.split]
dling has quit [*.net *.split]
DenSchub has quit [*.net *.split]
gigetoo has quit [*.net *.split]
pragmatism has quit [*.net *.split]
moredhel has quit [*.net *.split]
SirCmpwn has quit [*.net *.split]
Skelz0r has quit [*.net *.split]
Qommand0r has quit [*.net *.split]
aep has quit [*.net *.split]
kenichi has quit [*.net *.split]
cfillion has quit [*.net *.split]
nullwarp has quit [*.net *.split]
twistedpixels has quit [*.net *.split]
xpt has quit [*.net *.split]
cats has quit [*.net *.split]
hfp has quit [*.net *.split]
YaknotiS has quit [*.net *.split]
janno has quit [*.net *.split]
Log1x has quit [*.net *.split]
rikai has quit [*.net *.split]
mburns has quit [*.net *.split]
duracrisis has quit [*.net *.split]
samuelkadolph has quit [*.net *.split]
ejnahc has quit [*.net *.split]
valeri_ufo has quit [*.net *.split]
thomas has quit [*.net *.split]
TTilus has quit [*.net *.split]
charles81 has quit [*.net *.split]
Shidash has quit [*.net *.split]
mc_fail has quit [*.net *.split]
sunya7a__ has quit [*.net *.split]
ltd_ has quit [*.net *.split]
sunya7a has quit [*.net *.split]
bokayio has quit [*.net *.split]
greister has quit [*.net *.split]
pabs has quit [*.net *.split]
fold4 has quit [*.net *.split]
SenpaiSilver has quit [*.net *.split]
rhg135 has quit [*.net *.split]
chandlerbing has quit [*.net *.split]
joeyjones has quit [*.net *.split]
rubirc has quit [*.net *.split]
timonv has quit [*.net *.split]
arthurnn has quit [*.net *.split]
dunj3 has quit [*.net *.split]
Takumo has quit [*.net *.split]
cyphactor has quit [*.net *.split]
Jello_Raptor has quit [*.net *.split]
slash_nick has quit [*.net *.split]
utkarsh has quit [*.net *.split]
gypsydave5 has quit [*.net *.split]
pleiosaur has quit [*.net *.split]
IceDragon has quit [*.net *.split]
Drakevr has quit [*.net *.split]
ammar has quit [*.net *.split]
cout has quit [*.net *.split]
JoL1hAHN has quit [*.net *.split]
adam12 has quit [*.net *.split]
SebastianThorn has quit [*.net *.split]
abort_ has quit [*.net *.split]
KrzaQ has quit [*.net *.split]
NET||abuse has quit [*.net *.split]
Kuukunen has quit [*.net *.split]
badeball has quit [*.net *.split]
sunnypar1eunji has quit [*.net *.split]
oddmunds has quit [*.net *.split]
lnx has quit [*.net *.split]
low-profile has quit [*.net *.split]
yeltzooo has quit [*.net *.split]
parus has quit [*.net *.split]
olblak has quit [*.net *.split]
ironcamel has quit [*.net *.split]
joeyjones_ is now known as joeyjones
Guest24104 is now known as inukshuk
ahammond_ is now known as ahammond
tubbo` is now known as tubbo
matti_ is now known as matti
netwoodle is now known as noodle
Log1x_ has joined #ruby
Nilium_ is now known as Nilium
havenn is now known as havenwood
cb_ is now known as cb
samuelkadolph_ is now known as samuelkadolph
valeri_uF0 is now known as valeri_ufo
KrzaQ- is now known as KrzaQ
grumpycat is now known as cats
nullwarp_ is now known as nullwarp
hfp_ is now known as hfp
gigetoo_ is now known as gigetoo
Shidash_ is now known as Shidash
Guest18897 has joined #ruby
gnarf_ has joined #ruby
jgt2 has quit [Ping timeout: 250 seconds]
SirCmpwn_ is now known as SirCmpwn
CloCkWeRX has quit [Ping timeout: 246 seconds]
arthurnn has joined #ruby
roamingdog has quit [Ping timeout: 246 seconds]
DenSchub_ is now known as DenSchub
graft has joined #ruby
moredhel has joined #ruby
whathappens has quit [Ping timeout: 250 seconds]
ljarvis has joined #ruby
charles81_ is now known as charles81
ta__ has quit [Remote host closed the connection]
solars has quit [Ping timeout: 252 seconds]
xpt has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
hplar has joined #ruby
greister has joined #ruby
YaknotiS has joined #ruby
thomas has joined #ruby
timonv has joined #ruby
oddmunds has joined #ruby
JoL1hAHN has joined #ruby
Silex has joined #ruby
coffeejunk has joined #ruby
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
Todd has joined #ruby
blingrang has joined #ruby
xybre has joined #ruby
madhatter has joined #ruby
jtperreault has joined #ruby
marienz has joined #ruby
mexis has joined #ruby
low-profile has joined #ruby
fold4 has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
ruby[bot] has joined #ruby
smathy is now known as smathy_afk
ljarvis has quit [Ping timeout: 250 seconds]
hahuang62 has joined #ruby
Koshian_ has joined #ruby
kriskropd has joined #ruby
mtkd has joined #ruby
wrkrcoop has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<wrkrcoop> would i use raise in an if else
Azure has quit [Ping timeout: 240 seconds]
<wrkrcoop> like if this_thing_is_not_nil do x, else raise ‘some error’
moeabdol has quit [Ping timeout: 250 seconds]
Azure has joined #ruby
<al2o3-cr> >> [[255].pack('c').unpack('B8')[0],[~255].pack('c').unpack('B8')[0]] # swaps anyone wanna play?
<ruby[bot]> al2o3-cr: # => ["11111111", "00000000"] (https://eval.in/590012)
<jhass> unconditionally raising is rarely a good idea
Vile` has joined #ruby
whathappens has joined #ruby
moeabdol has joined #ruby
<al2o3-cr> wrkrcoop: you'd be good a poker, no?
<wrkrcoop> jhass so id do if x then raise
CloCkWeRX has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
SCHAAP137 has quit [Quit: Leaving]
hahuang62 has quit [Ping timeout: 272 seconds]
ornerymoose has quit [Quit: ornerymoose]
ljarvis has joined #ruby
ta_ has joined #ruby
zeroDi has quit [Quit: WeeChat 1.5]
jaguarmagenta has joined #ruby
bgresham is now known as demophoon
eam has quit [Changing host]
eam has joined #ruby
meinside has joined #ruby
tubuliferous_ has quit [Ping timeout: 260 seconds]
<al2o3-cr> wrkrcoop: would you raise the fire alarm if peanuts were spilt?
mattwashere has joined #ruby
koooge has joined #ruby
duoi has quit [Max SendQ exceeded]
<wrkrcoop> no but id tell someone about it
moeabdol has quit [Ping timeout: 272 seconds]
duoi has joined #ruby
jancel has joined #ruby
SilverKey has quit [Quit: Halted.]
<al2o3-cr> wrkrcoop: then why are you trying to raise everying in sight?
<wrkrcoop> al2o3-cr: to log it and not crash the server
<al2o3-cr> then log then
<al2o3-cr> don't raise for no reason
ljarvis has quit [Ping timeout: 252 seconds]
jaguarmagenta has quit [Ping timeout: 240 seconds]
<al2o3-cr> wrkrcoop: are you grasping the ideology?
<shevy> wrkrcoop you need to stop thinking about exceptions in terms of if/else
<wrkrcoop> if something in the method prevents me from continuing on, i’m instructed to raise an exception
<wrkrcoop> whats the dif between returning and raising an exception that returns an object
CloCkWeRX has quit [Ping timeout: 272 seconds]
moeabdol has joined #ruby
smathy_afk is now known as smathy
lictor36 has quit [Ping timeout: 252 seconds]
roamingdog has joined #ruby
hostess_ is now known as hostess
<al2o3-cr> wrkrcoop: return, does exacty that 'it returns from a method of execution'. raising does what it says on the tin too 'raises an exception' and boom
jackjackdripper has quit [Quit: Leaving.]
<al2o3-cr> unless you rescue and 'puts "well shit"'
moeabdol has quit [Ping timeout: 240 seconds]
dstarh has joined #ruby
whathappens has quit [Quit: Leaving...]
<al2o3-cr> lets make this easy
<shevy> al2o3-cr finds the best words :)
startupality has quit [Quit: startupality]
IcyDragon is now known as IceDragon
symm- has quit [Ping timeout: 250 seconds]
biberu has quit []
neha_ has joined #ruby
neha_ has quit [Client Quit]
neha- has joined #ruby
ornerymoose has joined #ruby
hutch34 has quit [Ping timeout: 244 seconds]
chouhoulis has joined #ruby
tomchapin has quit [Ping timeout: 250 seconds]
jenrzzz_ has quit [Ping timeout: 258 seconds]
freerobby has quit [Quit: Leaving.]
veloutin has quit [Ping timeout: 244 seconds]
CloCkWeRX has joined #ruby
rueben has quit [Ping timeout: 240 seconds]
<al2o3-cr> wrkrcoop: also think about what raises exceptions
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr> like
<al2o3-cr> >> a rescue NameError; "whoa, i'm not even born yet"
<ruby[bot]> al2o3-cr: # => "whoa, i'm not even born yet" (https://eval.in/590020)
roamingdog has quit []
cdg has quit [Remote host closed the connection]
Dios has joined #ruby
roamingdog has joined #ruby
<al2o3-cr> or
cdg has joined #ruby
<al2o3-cr> >> 1/0
<ruby[bot]> al2o3-cr: # => divided by 0 (ZeroDivisionError) ...check link for more (https://eval.in/590021)
toretore has quit [Ping timeout: 240 seconds]
chris3492 has quit [Quit: Leaving]
veloutin has joined #ruby
mistermocha has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 250 seconds]
<al2o3-cr> wrkrcoop: if something in your method prevents you from going on are you 1. abort, 2. raise, 3. rescue, 4. other logic
mattwashere has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
diegoaguilar has quit [Max SendQ exceeded]
diegoaguilar has joined #ruby
diegoaguilar has quit [Max SendQ exceeded]
hahuang62 has joined #ruby
<al2o3-cr> wrkrcoop: we will make you a pro (believe)
diegoaguilar has joined #ruby
rcvalle has quit [Quit: rcvalle]
ramfjord has joined #ruby
hutch34 has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
rkazak has joined #ruby
<al2o3-cr> martee mcfly left :(
rikai_ is now known as rikai