apeiros changed the topic of #ruby-lang to: RIP Jim || Ruby 2.1.1; 2.0.0-p451; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
Coincidental has quit [Remote host closed the connection]
dorei has quit []
Coincidental has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
mykoweb_ has joined #ruby-lang
mykoweb has quit [Read error: No route to host]
arooni-mobile has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
nertzy3 has joined #ruby-lang
mykoweb_ has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
arooni-mobile has left #ruby-lang [#ruby-lang]
dik_dak has quit [Quit: Leaving]
skammer has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Speed has joined #ruby-lang
imperator has joined #ruby-lang
mykoweb has quit [Ping timeout: 265 seconds]
Coincidental has quit [Remote host closed the connection]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Cakey has joined #ruby-lang
trapless has joined #ruby-lang
trapless has left #ruby-lang [#ruby-lang]
Squarepy has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
<imperator> evenin'
nertzy3 has quit [Quit: This computer has gone to sleep]
wallerdev has joined #ruby-lang
Cakey has quit [Ping timeout: 268 seconds]
Coincidental has joined #ruby-lang
chichou has quit [Remote host closed the connection]
uberjar has joined #ruby-lang
<uberjar> how does bundler decide which Ruby engine you're currently using ?
<uberjar> for some reason it thinks I'm still using MRI even though I'm now rocking Jruby
<uberjar> I tried deleting the Gemfile.lock to no avail
<centrx> Try the #! line in the bundler shell script?
<uberjar> centrx: thanks a bunch! that was totally it.
mykoweb has joined #ruby-lang
dstynchula has quit []
<imperator> trying to redefine :new on a class that explicitly undef'd it is proving to be....tricky
Lewix has joined #ruby-lang
<wallerdev> that sounds like a bad idea lol
ikrima has quit [Ping timeout: 240 seconds]
ikrima has joined #ruby-lang
<imperator> they've given me no choice!
ascarter has joined #ruby-lang
amsi has quit [Quit: Leaving]
chichou has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
soahccc has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
mykoweb_ has joined #ruby-lang
mykoweb has quit [Ping timeout: 268 seconds]
mykoweb_ has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mykoweb has joined #ruby-lang
mykoweb has quit [Ping timeout: 265 seconds]
amclain has joined #ruby-lang
jhass is now known as jhass|off
iliketurtles has joined #ruby-lang
kukyakya has joined #ruby-lang
|jemc| has joined #ruby-lang
imperator has quit [Quit: Leaving]
lsegal has joined #ruby-lang
arBmind1 has joined #ruby-lang
yfeldblum has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
arBmind has quit [Ping timeout: 268 seconds]
mistym has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 240 seconds]
rahul_j has joined #ruby-lang
<apeiros> hm, too bad imperator is gone…
<apeiros> I'd expect Class.instance_method(:new).bind(self).call to work. otherwise, allocate + __send__(:initialize, …)
zlogan has joined #ruby-lang
kgrz has joined #ruby-lang
thiagoborges has joined #ruby-lang
zlogan has quit [Ping timeout: 240 seconds]
kgrz has quit [Ping timeout: 268 seconds]
rahul_j_ has joined #ruby-lang
rahul_j has quit [Ping timeout: 255 seconds]
rahul_j_ is now known as rahul_j
pixelhandler has joined #ruby-lang
pixelhandler has quit [Client Quit]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
Coincidental has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
rahul_j has joined #ruby-lang
diegoviola has joined #ruby-lang
symm- has quit [Quit: Leaving...]
jsutt has joined #ruby-lang
nisstyre has quit [Quit: WeeChat 0.4.3]
symm- has joined #ruby-lang
tkuchiki has joined #ruby-lang
thiagoborges has quit []
tkuchiki has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
tkuchiki has joined #ruby-lang
tkuchiki has quit [Ping timeout: 268 seconds]
Lewix has quit [Remote host closed the connection]
jason__ has joined #ruby-lang
amclain_ has joined #ruby-lang
robbyoconnor has joined #ruby-lang
yfeldblum has joined #ruby-lang
amclain has quit [Ping timeout: 255 seconds]
amclain has joined #ruby-lang
iTrojan has quit [Quit: Leaving.]
amclain_ has quit [Ping timeout: 265 seconds]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Remote host closed the connection]
Aerlinger has joined #ruby-lang
centrx has quit [Quit: All this computer hacking is making me thirsty]
robbyoconnor has quit [Ping timeout: 240 seconds]
benlovell has joined #ruby-lang
iliketurtles has quit [Quit: Textual IRC Client: www.textualapp.com]
robbyoconnor has joined #ruby-lang
mistym has joined #ruby-lang
mbj has quit [Ping timeout: 240 seconds]
lsegal has quit [Read error: Connection reset by peer]
phansch has joined #ruby-lang
lsegal has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
toastynerd has joined #ruby-lang
mbj has joined #ruby-lang
benlovell has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Quit: ciao.]
davispuh has quit [Remote host closed the connection]
jfarmer has joined #ruby-lang
toastynerd has quit [Ping timeout: 252 seconds]
djinni` has quit [Ping timeout: 268 seconds]
djinni` has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
jfarmer has quit [Quit: Textual IRC Client: www.textualapp.com]
phansch has quit [Quit: WeeChat 0.4.2]
yfeldblum has joined #ruby-lang
mib_mib has joined #ruby-lang
mib_mib has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 240 seconds]
centrx has joined #ruby-lang
centrx has quit [Client Quit]
ryez has quit [Ping timeout: 245 seconds]
chichou has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
mr-foobar has quit [Ping timeout: 252 seconds]
sepp2k has quit [Quit: Leaving.]
mr-foobar has joined #ruby-lang
nisstyre has joined #ruby-lang
nisstyre has quit [Changing host]
nisstyre has joined #ruby-lang
Splourian has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
Splourian has quit [Ping timeout: 245 seconds]
toastynerd has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
yfeldblum has quit [Read error: Operation timed out]
tylersmith has joined #ruby-lang
cub1c has quit [Ping timeout: 245 seconds]
tylersmith has quit [Ping timeout: 240 seconds]
toastynerd has quit [Remote host closed the connection]
vsorlov has joined #ruby-lang
mbj has quit [Remote host closed the connection]
RobertBirnie has joined #ruby-lang
ikrima has quit [Ping timeout: 240 seconds]
jason__ has quit [Remote host closed the connection]
jason__ has joined #ruby-lang
vsorlov has quit [Read error: Operation timed out]
jsutt has quit [Ping timeout: 240 seconds]
khaase has joined #ruby-lang
mr-foobar has quit [Read error: Connection reset by peer]
mr-foobar has joined #ruby-lang
Splourian has joined #ruby-lang
glide has joined #ruby-lang
<glide> Hey everyone. I have a question about arrays. Anyone around to help?
jason__ has quit [Remote host closed the connection]
eam has quit [Ping timeout: 240 seconds]
jason__ has joined #ruby-lang
eam has joined #ruby-lang
jason__ has quit [Ping timeout: 240 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby-lang
<momomomomo> glide: whats up?
LMity has joined #ruby-lang
achal has joined #ruby-lang
<glide> Hi momomo, thanks
<glide> I have a list of entries in a text file. Each section starts with the year, like "2005", then has about 100 entries.
<glide> What I want to do is to move all the entries between, for example, 2005 and 2006 and put them into another array named two_thousand_five
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<glide> So to summarize. I have a text file with "2005", then about 100 entries, "2006", then 100 entries, etc. I put all of these into one big array, and would like to put them into smaller arrays by year.
<glide> I was hoping that there'd be a method where I can say something like "send all slots between "2005" and "2006" to array two_k_five"
<momomomomo> glide: it sounds to me like you just want to take all the lines from 2005, and put them in a hash
<momomomomo> etc etc
<momomomomo> so you’d have {“2005” => [all, of, these, items], “2006” => [all, of, these]}
<glide> Oh cool, so there can be multiple values for each key? (I'm a beginner here)
toastynerd has joined #ruby-lang
<glide> My ultimate goal is to determine whether there are repeats between years. I'm sure I can do that with hashes.
guns has quit [Quit: guns]
toastynerd has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
dbussink has quit [Ping timeout: 265 seconds]
dbussink has joined #ruby-lang
ledestin has quit [Ping timeout: 268 seconds]
ledestin has joined #ruby-lang
<momomomomo> glide: You might be better served reading the documentation for Array and Hash
mistym has quit [Remote host closed the connection]
<momomomomo> also, after this project, consider getting the Well Grounded Rubyist book
<momomomomo> the second ed is in MEAP
toastynerd has joined #ruby-lang
<glide> Thanks, momomomo. I'll check that out. I'm sifting through the documentation now... Maybe I should print it out and go through it thoroughly
toastynerd has quit [Remote host closed the connection]
jcs222 has joined #ruby-lang
Prandium has quit [Ping timeout: 264 seconds]
Prandium has joined #ruby-lang
khaase has quit [Remote host closed the connection]
khaase has joined #ruby-lang
khaase has quit [Ping timeout: 240 seconds]
eval-in has quit [Remote host closed the connection]
eval-in has joined #ruby-lang
mechan1c_ has joined #ruby-lang
rahul_j has joined #ruby-lang
yfeldblum has joined #ruby-lang
mechan1c has quit [Ping timeout: 268 seconds]
<Senjai> glide: Full disclosure, momomomomo gets 10% of well grounded rubyist sales
<Senjai> glide: Totally should take his/her word with a grain of salt ;)
tbuehlmann has joined #ruby-lang
<momomomomo> i’m not affiliated :p
<Senjai> That's what you want them to think
<glide> Senjai: LOL!
<glide> Good information is good information! I'll look through it and see if it helps me. :)
ayonkhan has joined #ruby-lang
eval-in has quit [Remote host closed the connection]
eval-in has joined #ruby-lang
saarinen has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
LMity has quit [Ping timeout: 252 seconds]
saarinen has quit [Quit: saarinen]
|jemc| has quit [Ping timeout: 240 seconds]
relix has joined #ruby-lang
x0f_ has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
centrx has joined #ruby-lang
robmiller has joined #ruby-lang
x0f has quit [Ping timeout: 255 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Splourian has quit [Quit: Page closed]
charliesome has joined #ruby-lang
robmiller has quit [Ping timeout: 255 seconds]
MartynKeigher has quit [Ping timeout: 255 seconds]
robmiller has joined #ruby-lang
[spoiler] has joined #ruby-lang
MartynKeigher has joined #ruby-lang
glide has quit [Quit: Leaving]
ayonkhan has quit [Remote host closed the connection]
robmiller has quit [Ping timeout: 240 seconds]
francisfish has joined #ruby-lang
_ht has joined #ruby-lang
butterbrei has quit [Quit: butterbrei]
butterbrei has joined #ruby-lang
centrx has quit [Quit: All this computer hacking is making me thirsty]
banister has joined #ruby-lang
araujo has quit [Quit: Leaving]
MartynKeigher has quit [Ping timeout: 246 seconds]
MartynKeigher has joined #ruby-lang
robmiller has joined #ruby-lang
t4nk924 has joined #ruby-lang
<t4nk924> こんばんは
Coincidental has quit [Remote host closed the connection]
robmiller has quit [Ping timeout: 255 seconds]
t4nk924 has quit [Ping timeout: 245 seconds]
robmiller has joined #ruby-lang
CaptainJet has quit []
uberjar has quit [Ping timeout: 240 seconds]
dc5ala has joined #ruby-lang
mib_mib has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
fdinara has joined #ruby-lang
mib_mib has quit [Remote host closed the connection]
robmiller has quit [Ping timeout: 240 seconds]
mistym has joined #ruby-lang
soahccc has quit [Read error: Connection reset by peer]
mistym has quit [Remote host closed the connection]
fdinara has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
MartynKeigher has quit [Ping timeout: 245 seconds]
soahccc has joined #ruby-lang
rizidoro has joined #ruby-lang
soahccc^ has joined #ruby-lang
walking has joined #ruby-lang
soahccc has quit [Ping timeout: 240 seconds]
MartynKeigher has joined #ruby-lang
mistym has joined #ruby-lang
mehlah has joined #ruby-lang
MartynKeigher has quit [Ping timeout: 265 seconds]
walking has quit [Ping timeout: 240 seconds]
MartynKeigher has joined #ruby-lang
ikrima has joined #ruby-lang
karamazov has joined #ruby-lang
skade has joined #ruby-lang
kgrz has joined #ruby-lang
kgrz has quit [Ping timeout: 240 seconds]
MartynKeigher has quit [Ping timeout: 240 seconds]
MartynKeigher has joined #ruby-lang
MartynKeigher has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
rizidoro has quit [Remote host closed the connection]
soahccc^ is now known as soahccc
diegoviola has quit [Quit: WeeChat 0.4.3]
rippa has joined #ruby-lang
elia has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
dc5ala has quit [Quit: Ex-Chat]
elia has quit [Client Quit]
stamina has joined #ruby-lang
skammer has joined #ruby-lang
karamazov has quit []
trapless has joined #ruby-lang
trapless has quit [Client Quit]
kgrz has quit [Read error: Connection reset by peer]
kgrz has joined #ruby-lang
rizidoro has joined #ruby-lang
retro|cz has quit [Ping timeout: 240 seconds]
cnivolle has joined #ruby-lang
mistym has quit [Remote host closed the connection]
cnivolle has quit [Remote host closed the connection]
tbuehlmann has joined #ruby-lang
rizidoro has quit [Read error: Connection reset by peer]
ikrima has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
kgrz_ has joined #ruby-lang
francisfish has joined #ruby-lang
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
Lewix has joined #ruby-lang
kgrz has quit [Ping timeout: 268 seconds]
Lewix has quit [Remote host closed the connection]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
Rickmast- has quit [Ping timeout: 240 seconds]
Lewix has joined #ruby-lang
benlovell has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Rickmasta has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
yfeldblum has joined #ruby-lang
benlovell has quit [Ping timeout: 255 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
Cakey has quit [Ping timeout: 268 seconds]
mib_mib has joined #ruby-lang
mib_mib has quit [Remote host closed the connection]
[spoiler] has quit [Quit: Leaving]
benlovell has joined #ruby-lang
Cakey has joined #ruby-lang
elia has joined #ruby-lang
benlovell has quit [Ping timeout: 240 seconds]
elia has quit [Client Quit]
tkuchiki has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
elia has joined #ruby-lang
cored has joined #ruby-lang
retro|cz has joined #ruby-lang
Cakey has quit [Ping timeout: 255 seconds]
zommi has joined #ruby-lang
yfeldblum has joined #ruby-lang
rubyduby has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
cored has quit [Ping timeout: 255 seconds]
<rubyduby> hello group... well i am really having a hard time on grasping "instance variables"... like i am not getting the basic purpose of there use in classes. can someone explain it. thanks
<rubyduby> anybody??
yfeldblum has quit [Ping timeout: 268 seconds]
elia has joined #ruby-lang
benlovell has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
LMity has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 240 seconds]
LMity has quit [Ping timeout: 255 seconds]
Cakey has joined #ruby-lang
sepp2k has joined #ruby-lang
charlies_ has joined #ruby-lang
<apeiros> rubyduby: when you say "in classes", do you mean at class level or at instance level?
<apeiros> instance variables are used to store state associated with an object
charliesome has quit [Ping timeout: 252 seconds]
vsorlov has joined #ruby-lang
cnivolle has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
sepp2k has quit [Quit: Leaving.]
tkuchiki has quit [Remote host closed the connection]
cnivolle has quit [Remote host closed the connection]
Cakey has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby-lang
Speed has joined #ruby-lang
khaase has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
benlovell has quit [Ping timeout: 252 seconds]
houhoulis has joined #ruby-lang
centrx has joined #ruby-lang
benlovell has joined #ruby-lang
houhoulis has quit [Remote host closed the connection]
Aerlinger has quit [Remote host closed the connection]
Aerlinger has joined #ruby-lang
benlovell has quit [Ping timeout: 252 seconds]
Aerlinger has quit [Ping timeout: 252 seconds]
Lewix has joined #ruby-lang
jhass|off is now known as jhass
|jemc| has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
rahul_j has joined #ruby-lang
<rubyduby> aspeiros: what is state of an object?
<rubyduby> aspeiros: i mean at instance level...
<centrx> rubyduby, An object has state (data) and behavior (code).
<rubyduby> apeiros: what is state of an object? like we say instance variables are used to store state associated with an object! and i am asking about instance variables in general like on instance level
<rubyduby> centrx: i dont get it, can you explain it with an example please
<centrx> state: "a station, position, place; way of standing, posture; order, arrangement, condition"
skade has joined #ruby-lang
<apeiros> rubyduby: rubyduby = Person.new("ruby", "duby"); rubyduby.first_name # => "ruby"
<apeiros> first_name and last_name would be state of the object rubyduby
<apeiros> the class Person describes what state (ivars) and what code (instance methods) person instances have
<apeiros> just like in reality, there are many people. all have the same behavior (code) but can have different state (ivars)
cnivolle has joined #ruby-lang
<apeiros> since e.g not all share the same first- or last_name, but all can respond (= behavior) to the question "what's your fist_name/last_name"
jason_ has joined #ruby-lang
Speed has quit [Read error: Connection reset by peer]
Speed has joined #ruby-lang
jason_ has quit [Ping timeout: 255 seconds]
<rubyduby> apeiros: like when i define a new class instance, Person.new('ruby', 'duby'), the instance variables try to store the first and last name i have given to the object, like if an object asks us automatically please give me first and last name for this particular class.. how we can do that like during intanciation of the object, if we dont give the parameters it asks us to give me names, otherwise it fails to initiate
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
<apeiros> rubyduby: errr, what?
<yxhuvud> sense, it is not captured.
<rubyduby> apeiros: i mean can we define this in class that the object which belongs to a particular class, asks us if we dont pass particular sets of arguments during object creation. like ruby throw an error if we dont proviode a particular set of arguments that are necessary for creation of that object
<centrx> Do it by throwing an error when a particular set of arguments is not provided.
Speed has quit [Read error: Connection reset by peer]
<centrx> Arguments are required by default anyway
<apeiros> rubyduby: if you write the code, sure
Cakey has joined #ruby-lang
<apeiros> rubyduby: also, if your args don't have default values, ruby will raise if you don't pass the arguments (unlike e.g. javascript)
Speed has joined #ruby-lang
RobertBirnie has joined #ruby-lang
<rubyduby> thanks guys!!
cnivolle has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
RobertBirnie has quit [Client Quit]
RobertBirnie has joined #ruby-lang
rubyduby has quit [Ping timeout: 245 seconds]
kgrz_ has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
futilegames has joined #ruby-lang
elia has joined #ruby-lang
banister has quit [Ping timeout: 240 seconds]
relix has joined #ruby-lang
Aerlinger has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Aerlinger has quit [Read error: No route to host]
centrx has quit [Quit: All this computer hacking is making me thirsty]
Aerlinger has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerling__ has joined #ruby-lang
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerling__ has quit [Ping timeout: 268 seconds]
RobertBirnie has joined #ruby-lang
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerling__ has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
nertzy3 has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Aerlinger has quit [Read error: No route to host]
Lewix has joined #ruby-lang
Aerling__ has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
jason_ has joined #ruby-lang
rofel has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
<|jemc|> I thought I saw at one point a site that gave free gem documentation hosting with yard support, but I can't find it now
<|jemc|> ringing a bell for anyone?
shinnya has quit [Ping timeout: 240 seconds]
Aerlinger has quit [Read error: No route to host]
khaase has quit [Remote host closed the connection]
Aerlinger has joined #ruby-lang
<|jemc|> maybe I'll just use github-pages...
khaase has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
skade has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
khaase has quit [Ping timeout: 268 seconds]
jason_ has quit [Remote host closed the connection]
Aerlinger has joined #ruby-lang
<jhass> |jemc|: rubydoc.info does that
jason_ has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
<|jemc|> that was it, thanks
Aerlinge_ has joined #ruby-lang
jason_ has quit [Ping timeout: 240 seconds]
Aerling__ has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
Speed has quit [Read error: Connection reset by peer]
Speed has joined #ruby-lang
Aerling__ has quit [Read error: No route to host]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
Aerlinger has quit [Read error: Connection reset by peer]
stamina has quit [Ping timeout: 240 seconds]
Aerlinge_ has quit [Ping timeout: 268 seconds]
Mon_Ouie has joined #ruby-lang
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
miezis has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
tbuehlmann has quit [Remote host closed the connection]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
skade has joined #ruby-lang
Aerling__ has joined #ruby-lang
mib_mib has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
Aerling__ has quit [Read error: Connection reset by peer]
mib_mib has quit [Remote host closed the connection]
Aerlinger has joined #ruby-lang
Aerlinge_ has quit [Ping timeout: 268 seconds]
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
skade has quit [Ping timeout: 255 seconds]
Aerlinger has quit [Read error: No route to host]
Lewix has joined #ruby-lang
Aerlinger has joined #ruby-lang
ascarter has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerling__ has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinge_ has quit [Ping timeout: 268 seconds]
workmad3 has joined #ruby-lang
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerling__ has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinge_ has quit [Read error: No route to host]
Aerlinge_ has joined #ruby-lang
mib_mib has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinge_ has quit [Read error: No route to host]
mib_mib has quit [Remote host closed the connection]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
chichou has joined #ruby-lang
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerling__ has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
dorei has joined #ruby-lang
Aerling__ has quit [Read error: Connection reset by peer]
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
uberjar has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinger has joined #ruby-lang
jarto has joined #ruby-lang
matp has joined #ruby-lang
pixelhandler has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerling__ has joined #ruby-lang
miezis has quit [Remote host closed the connection]
Aerlinge_ has quit [Ping timeout: 268 seconds]
Aerling__ has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerlinge_ has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
soahccc^ has joined #ruby-lang
soahccc has quit [Read error: Operation timed out]
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
yfeldblum has joined #ruby-lang
\marrub has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
charlies_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elia has quit [Quit: Computer has gone to sleep.]
Aerlinger has quit [Read error: Connection reset by peer]
Cakey has quit [Ping timeout: 240 seconds]
Aerlinger has joined #ruby-lang
yfeldblum has quit [Ping timeout: 268 seconds]
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
kgrz has quit [Read error: Connection reset by peer]
uberjar has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
kgrz has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinge_ has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
elia has joined #ruby-lang
toastynerd has joined #ruby-lang
Speed has quit [Ping timeout: 268 seconds]
ascarter has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
jason_ has joined #ruby-lang
Aerlinge_ has quit [Read error: Connection reset by peer]
alex-quiterio has joined #ruby-lang
jason_ has quit [Remote host closed the connection]
Aerlinge_ has joined #ruby-lang
alex-quiterio has left #ruby-lang [#ruby-lang]
jason_ has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
Aerlinger has joined #ruby-lang
chichou has quit [Remote host closed the connection]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
Aerling__ has joined #ruby-lang
Aerlinge_ has quit [Ping timeout: 268 seconds]
Aerlinge_ has joined #ruby-lang
jason_ has quit [Ping timeout: 268 seconds]
Aerlinge_ has quit [Read error: No route to host]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
Aerling__ has quit [Ping timeout: 268 seconds]
retro|cz has quit [Read error: Operation timed out]
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
toastynerd has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinge_ has quit [Read error: Connection reset by peer]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
glide has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
kgrz has quit [Read error: Connection reset by peer]
uberjar has joined #ruby-lang
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
|jemc| has quit [Ping timeout: 255 seconds]
Aerlinger has quit [Read error: No route to host]
kgrz has joined #ruby-lang
Aerlinger has joined #ruby-lang
momomomomo has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerling__ has joined #ruby-lang
chichou has joined #ruby-lang
soahccc^ has quit [Ping timeout: 268 seconds]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerling__ has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinge_ has quit [Ping timeout: 268 seconds]
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
kgrz has quit [Read error: Connection reset by peer]
momomomomo has quit [Quit: momomomomo]
Speed has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
kgrz has joined #ruby-lang
Aerlinger has joined #ruby-lang
ylluminate has joined #ruby-lang
yfeldblum has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby-lang
Aerlinge_ has quit [Read error: No route to host]
Aerlinge_ has joined #ruby-lang
tbuehlmann has joined #ruby-lang
retro|cz has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 240 seconds]
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
rofel has quit [Read error: Connection reset by peer]
Aerlinger has quit [Read error: No route to host]
chichou has quit [Remote host closed the connection]
rofel has joined #ruby-lang
Aerlinge_ has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
stardiviner has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
chichou has joined #ruby-lang
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
kukyakya has quit [Remote host closed the connection]
Aerlinger has joined #ruby-lang
davispuh has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
banister has quit [Ping timeout: 255 seconds]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerling__ has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
Aerlinger has quit [Ping timeout: 268 seconds]
banister has joined #ruby-lang
kgrz has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
jhass is now known as jhass|off
kgrz has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinge_ has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerling__ has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
havenwood has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinge_ has quit [Read error: No route to host]
Oak has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Oak has left #ruby-lang [#ruby-lang]
Cakey has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
Aerlinger has quit [Ping timeout: 268 seconds]
jsutt has joined #ruby-lang
nertzy3 has quit [Quit: This computer has gone to sleep]
Aerlinger has joined #ruby-lang
cnivolle has quit [Ping timeout: 246 seconds]
Aerling__ has joined #ruby-lang
cnivolle has joined #ruby-lang
Aerlinge_ has quit [Ping timeout: 268 seconds]
Aerlinge_ has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinge_ has quit [Read error: No route to host]
Aerling__ has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
jhass|off is now known as jhass
DEac- has quit [Ping timeout: 268 seconds]
Aerlinge_ has quit [Read error: No route to host]
Aerlinge_ has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
Aerlinge_ has quit [Read error: No route to host]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinge_ has quit [Read error: No route to host]
Aerlinge_ has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinge_ has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
lolmaus has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinge_ has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
yfeldblum has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
Aerlinge_ has joined #ruby-lang
Aerlinge_ has quit [Read error: No route to host]
Aerlinge_ has joined #ruby-lang
Aerlinge_ has quit [Read error: No route to host]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
saarinen has joined #ruby-lang
Coincidental has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
nvll has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
nvll has left #ruby-lang [#ruby-lang]
soahccc has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinge_ has quit [Read error: No route to host]
vlad_starkov has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Lewix has joined #ruby-lang
CaptainJet has joined #ruby-lang
Aerlinge_ has quit [Ping timeout: 268 seconds]
RobertBirnie has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
havenwood has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerling__ has joined #ruby-lang
soahccc has quit [Quit: Legalize it!]
Cakey has quit [Ping timeout: 255 seconds]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
robmiller has joined #ruby-lang
amclain has joined #ruby-lang
DEac- has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
skade has joined #ruby-lang
Aerling__ has quit [Ping timeout: 268 seconds]
Aerlinge_ has joined #ruby-lang
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerlinge_ has joined #ruby-lang
mistym has joined #ruby-lang
LMity has joined #ruby-lang
lolmaus has quit [Ping timeout: 251 seconds]
lolmaus has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
Smatic has joined #ruby-lang
amclain_ has joined #ruby-lang
amclain_ has quit [Read error: Connection reset by peer]
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
jarto has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
Aerlinge_ has quit [Ping timeout: 268 seconds]
Aerlinge_ has joined #ruby-lang
amclain has quit [Ping timeout: 255 seconds]
Aerling__ has joined #ruby-lang
LMity has quit [Ping timeout: 268 seconds]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerling__ has quit [Read error: No route to host]
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Smatic has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
Aerlinge_ has joined #ruby-lang
<glide> Hey all. Can someone hold my hand through this program I'm working on? It's my first and I'm stumped...
Aerlinge_ has quit [Read error: No route to host]
Aerlinge_ has joined #ruby-lang
<glide> I have a file with years, and underneath names. My end goal is to find out if any of the names underneath appear in multiple years or consecutive years.
Aerlinge_ has quit [Read error: No route to host]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
centrx has joined #ruby-lang
Aerlinge_ has quit [Read error: No route to host]
ylluminate` has joined #ruby-lang
ylluminate has quit [Read error: Connection reset by peer]
Aerlinge_ has joined #ruby-lang
riffraff has joined #ruby-lang
Cakey has joined #ruby-lang
vsorlov has quit [Ping timeout: 268 seconds]
Aerlinge_ has quit [Read error: No route to host]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
kgrz has joined #ruby-lang
uberjar has quit [Quit: Lost terminal]
<jhass> glide: what do you have so far? came up with a data structure yet?
kgrz has quit [Ping timeout: 240 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Aerlinge_ has joined #ruby-lang
Aerlinger has quit [Ping timeout: 268 seconds]
saarinen has quit [Quit: saarinen]
lolmaus has quit [Ping timeout: 252 seconds]
Cakey has quit [Ping timeout: 268 seconds]
<glide> jhass, I'm trying :\. What I did first was read open the file and put each line into a slot in an array.
kitak has joined #ruby-lang
<jhass> so lines = File.readlines("data") ? ;)
<glide> Then I found the years by using the index method, and then entered all the names between each year into smaller arrays based on the year.
jsutt has quit [Ping timeout: 268 seconds]
<glide> I used f = File.open('prog1", "r"); f.each_line do |line|; line = line.chomp; all_lines.push line; end; f.close
<glide> (I've been programming for ~1 week so if that looks awful please go easy on me)
<jhass> always use the block form of File.open, it ensures that file is closed properly in all cases
<jhass> and as said that's all_lines = File.readlines("prog1").map(&:chomp)
<jhass> ruby has lots of convenience methods for such stuff
<jhass> so let's think about the easy one first, people appearing in multiple years
<glide> Ok
<jhass> I'd built a hash with the year as key, pointing to an array with the names
<glide> Ok. I think I've done that.
<jhass> people_by_year = Hash.new {|h, k| h[k] = [] } # We make us a hash that automatically assigns an empty array for missing keys
<jhass> File.readlines("prog1").each_cons(2) do |year, name| people_by_year[year.chomp] << name.chomp end
<jhass> er, actually I got that the wrong way around
<glide> *brain explodes*
<jhass> years_by_name = Hash.new {|h, k| h[k] = [] }; File.readlines("prog1").each_cons(2) do |year, name| people_by_year[name.chomp] << year.chomp end;, now all the people appearing in more than one year is: names = years_by_name.select {|name, years| years.size > 1 }.map(&:last)
<jhass> .map(&:first) not used to typing that out into my IRC client :P
automationaddict has joined #ruby-lang
<glide> :)
<glide> Man I don't understand any of this
<glide> lol
<glide> Give me a minute I'm going to go through it.
<jhass> sure, don't fear to ask for explanations of a specific part
vlad_starkov has quit []
<glide> How do you research what things mean? Do you use the ruby-doc.org site? or the Pick-Axe? or google?
<jhass> I mostly use ruby-doc.org / rubydoc.info. Other approaches are ri (command line docs), local rdocs or things like pry + pry-doc
<glide> Ok, thanks
amclain has joined #ruby-lang
kitak has quit [Remote host closed the connection]
kitak has joined #ruby-lang
heftig has quit [Quit: Quitting]
lolmaus has joined #ruby-lang
saarinen has joined #ruby-lang
zommi has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
lolmaus has quit [Ping timeout: 255 seconds]
lolmaus has joined #ruby-lang
<jhass> glide: whoops, meant .each_slice(2) not each_cons(2)
<glide> k
retro|cz has quit [Ping timeout: 255 seconds]
<glide> Still lost :/ I'm getting an error saying can't convert String into Integer on the line starting with File.readlines
<jhass> do you have example data?
<glide> What's example data?
<glide> (Sorry I'm so clueless!)
<jhass> can you share (some of) your input
<glide> I can explain it. It's pretty simple. Each year/name is on a new line, so: 2004 Joe Johnson Bill Murphy 2005 Jack Keroac Bill Murphy 2006 Jane Madison
<jhass> yeah, I really just don't want to type that all out
<jhass> so if you had something one could copy paste..
<glide> Sure. Should I upload it somewhere?
<jhass> gist.github.com
banister has quit [Ping timeout: 252 seconds]
maloik has quit [Ping timeout: 255 seconds]
<jtoy> if i have an array like words=['foo','bar'] how can I join them into a single regex like /foo|bar/i programmatically?
maloik has joined #ruby-lang
<jhass> jtoy: Regepx.union
<jhass> glide: oh, okay I thought it be only one name and year always alternating
<jtoy> jhass: nice, didnt know about that, how do I make sure an I is passed though?
<glide> Sorry about that. I should have been more clear.
<jtoy> so its all case insensitive?
havenwood has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
<jhass> jtoy: hm, nothing too smart from the API, I'd probably just /#{Regexp.union(stuff)}/i
<jtoy> oh, didint know I could put it in // like that, thx
stardiviner has quit [Ping timeout: 240 seconds]
<jtoy> shouldnt this match? "hArd" =~ /#{Regexp.union(['car','ha'])}/i
jason__ has joined #ruby-lang
<jtoy> ;eval 1
<jtoy> bot?
<centrx> >> "hArd" =~ /#{Regexp.union(['car','ha'])}/i
<eval-in> centrx => nil (https://eval.in/132593)
<jtoy> >> "hard" =~ /#{Regexp.union(['car','ha'])}/i
<eval-in> jtoy => 0 (https://eval.in/132594)
<centrx> Looks like Regexp.union forces the literal -i
<jtoy> >> "Hard" =~ /#{['car','dha'].join('|')}/i
<eval-in> jtoy => nil (https://eval.in/132595)
<jtoy> >> "Hard" =~ /#{['car','ha'].join('|')}/i
<eval-in> jtoy => 0 (https://eval.in/132596)
<jtoy> that works
kgrz has quit [Ping timeout: 252 seconds]
Lewix has quit [Remote host closed the connection]
heftig has joined #ruby-lang
jason__ has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
jason__ has joined #ruby-lang
lsegal has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
jason__ has quit [Ping timeout: 252 seconds]
cnivolle_ has joined #ruby-lang
<glide> jhass: Thank you. I'm reading it now.
jason__ has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
<glide> I'm going to look through it point by point so it will probably take a while
cnivolle has quit [Ping timeout: 246 seconds]
cnivolle_ has quit [Ping timeout: 246 seconds]
<jhass> as said, feel free to ask to get something explained
<glide> Thanks. Well a beginning question is why is the 2nd argument in .foreach() "\n\n"? Doesn't it automatically go line-by-line?
<jhass> yes, by default it goes line by line
<jhass> I want it to divide by consecutive newlines here
<jhass> two of them that is
robmiller has quit [Quit: Leaving.]
<jhass> so that the block is invoked for each year + all the names
skammer has quit [Ping timeout: 255 seconds]
skammer has joined #ruby-lang
riffraff has quit [Quit: Leaving]
<glide> Hmm. I don't understand that.
<glide> "divide by consecutive newlines". So divide the lists two at a time?
<glide> Oh - maybe the following functions link the 2nd line with the year in the first line? (?)
momomomomo has joined #ruby-lang
LMity has joined #ruby-lang
<jhass> your years are separated by two newlines
<jhass> I'm dividing the file at those
<jhass> glide: fire up irb or install pry and start that and look at the output of the individual parts
<glide> Ah, yes. Ok
<glide> Ok, good idea.
jason__ has quit [Remote host closed the connection]
nertzy3 has joined #ruby-lang
butterbrei has quit [Quit: butterbrei]
futilegames has quit [Quit: futilegames]
mbj has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
skade has joined #ruby-lang
nisstyre has quit [Quit: WeeChat 0.4.3]
kgrz has joined #ruby-lang
iTrojan has joined #ruby-lang
nertzy3 has quit [Quit: This computer has gone to sleep]
iTrojan has quit [Client Quit]
kgrz has quit [Ping timeout: 255 seconds]
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
mbj has quit [Ping timeout: 268 seconds]
<glide> jhass: can't figure out why there's ", *" after years on the second line
<jhass> glide: that's array decomposition during assignment, year is the first item of the array of the right hand side, *names collects the items left in the array
<glide> Sheesh. I have no idea how I'm going to learn all this.
<jhass> with time
<jhass> one week is nothing
lsegal has quit [Read error: Connection reset by peer]
lsegal has joined #ruby-lang
jaimef has quit [Excess Flood]
<glide> How is [year.to_i, names] connected syntactically?
flak has joined #ruby-lang
<jhass> That's a two element array consisting of year converted to a number and the names array
rippa has quit [Ping timeout: 240 seconds]
<glide> Ok. It's the last instruction in the block that (1) takes the first line and calls it year, (2) processes the remaining lines and call them names.
<glide> *puts them into the array names
<jhass> yes
<jhass> now look up what map does
<glide> It goes through each element during the decomposition and performs .chomp?
<jhass> not during and almost, focus on the one after .readlines() for now
<glide> Hehe I was looking at that one. On line two after year.chomp.lines, right?
<glide> So I guess it is performing something within the actual line, but I don't know what.
<jhass> File.foreach("data.txt", "\n\n").map {|year| <- that one
<glide> Oh, ok.
<glide> It takes the first line (the year), and couples it with each remaining line. Right?
<jhass> no
<jhass> do you understand what File.foreach("data.txt", "\n\n") reaturns by now?
<glide> The block of data from the top to the first "\n\n" (open line)
jaimef has joined #ruby-lang
<jhass> just that one block?
<glide> For each line in that block.. do something
<jhass> no, that's still not right
<jhass> the foreach's subject are the parts of the file
<glide> No, for each block (although when I tried it in irb it looked like it only created a hash for 2004
<glide> Ok.
<jhass> so, it returns an array of the blocks in the file
<jhass> now we call map on that array
<jhass> what does map do?
<glide> Goes through each line and does something.
<jhass> that's .each
<jhass> map does something more
<glide> Ok - it "runs the block for each element", and outputs the returned value from the block
<jhass> "outputs"?
skade has quit [Ping timeout: 255 seconds]
<glide> It performs the operation and somehow returns something
<jhass> what do the docs say about map
<glide> Ok. It creates a new array based on the original but with values modified by the block.
<jhass> almost, with values _returned_ from the block
<jhass> these could be made up but that's untypical use
<glide> Ok.
<jhass> so to summarize, we build an array of two element arrays, each two element array represents one of the block in the file. The first element of the two element array is the year converted to a number, the second element is an array of the names
<jhass> onto Hash.[] (yes, that's a method too)
<glide> Ok. How many two element arrays are there?
<glide> One per year?
<jhass> yes, since each represents one of the blocks in the file
<glide> Ok. An array of arrays. How does that go "onto Hash"?
<jhass> missing space, on to
<jhass> as in let's move to
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
<glide> Ok. But let me ask one more q here.
<jhass> sure
<jhass> probably the (&:method) syntax I haven't explained yet, right?
<glide> No, one the two element arrays.
jmeeuwen has joined #ruby-lang
<glide> So the first element, the year, is indexed at 0, and the second element, the array of names, is indexed at 1?
stardiviner has joined #ruby-lang
<jhass> yes, though you rarely need access by index in ruby
<jhass> though I prefer to call them first, second etc.
<jhass> s/though/so/
<glide> Ok.
deg- has quit [Ping timeout: 246 seconds]
shinnya has joined #ruby-lang
deg- has joined #ruby-lang
<glide> So we want to take each of those arrays and make the first element a key and the second element a value, right?
<glide> (to make Hashes)
<jhass> to make on hash, yes
<jhass> and surprise, that's exactly what Hash.[] does: http://ruby-doc.org/core-2.1.1/Hash.html#method-c-5B-5D
LMity2 has joined #ruby-lang
<glide> Ok. sheesh. So everything inside the [] after Hash return something that Hash can process and make into that hash structure we want, right?
<jhass> not quite
LMity has quit [Ping timeout: 255 seconds]
<jhass> Hash[] is a method call, it's calling Hash::[], the class method [] defined on the class Hash (class Hash; def self.[](args); ...; end; end;)
<jhass> writing Hash[foo] is calling Hash.[](foo)
<glide> Ok. So the Hash method is being called on the return of everything in the []?
kgrz has joined #ruby-lang
<jhass> not on, with it as argument. and it's not the Hash method (Hash is class though you could define a method that's called Hash), it's the Hash::[] method, the class method [] on the class Hash
caral has joined #ruby-lang
<jhass> if you're doing array = [1,2,3]; array[1] that's calling the instance method [] on the class Array, Arrry#[] for short
<Mon_Ouie> There is in fact a method called Hash (for converting things to hashes). But that's not what's being called here.
alex-quiterio has joined #ruby-lang
<glide> Why is a class method necessary?
cnivolle has joined #ruby-lang
<jhass> a class method is simply a normal method called on a class instead of instance of a class (a class is actually an instance of the class Class but that's not important for now). It's not "necessary", it's simply defined there
LMity2 has quit [Ping timeout: 255 seconds]
<glide> Ok.
<Mon_Ouie> And the reason it's there is that it's related to the Hash class, but it doesn't use a hash so it would not make sense as an instance method
skammer has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kgrz has quit [Ping timeout: 252 seconds]
<glide> Ok. The Hash class method takes the stuff inside [] as arguments. ?
<jhass> yes
<jhass> since all [] methods do that
<glide> Ok. Do all class methods use []?
<jhass> something[something_else] is syntax sugar for something.[](something_else) in ruby
<glide> I see, ok.
<jhass> no, class methods are simply methods defined on a class. File.foreach is another example of a class method
<glide> So instead of Hash[args] it could have been Hash.[](args)?
<jhass> yes
<glide> Or Hash::[](args)? Does it matter?
<jhass> >> Hash.[]([:a, 1], [:b, 2])
<eval-in> jhass => {[:a, 1]=>[:b, 2]} (https://eval.in/132627)
<jhass> Hash::[]() works too, but is discouraged and only used as documentation style
<glide> Ok.
<glide> Ok. We have an array of 10 two element arrays. The class method Hash creates hashes out of them, taking the first element as the key and the second elements as the values.
<jhass> exactly
<jhass> still, don't call it "class method Hash" though, call it Hash.[] or Hash::[]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
<glide> Ok. Hash.[]. Wow... there's a LOT going on here.
<glide> (at least for me!)
<jhass> ruby code tends to be dense, yes
banister has joined #ruby-lang
slawrence00 has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
araujo has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
<glide> I'm being called for dinner. Will be back as soon as I can.
<glide> jhass: I owe you a million. Thanks so much for guiding me!
banister has quit [Max SendQ exceeded]
LMity has joined #ruby-lang
<jhass> you're welcome
banister has joined #ruby-lang
gix has quit [Ping timeout: 240 seconds]
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
stevew_ has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
LMity has quit [Ping timeout: 252 seconds]
caral has quit [Quit: caral]
workmad3 has quit [Ping timeout: 240 seconds]
Aerlinge_ has quit [Remote host closed the connection]
csfrancis has joined #ruby-lang
danijoo has quit [Remote host closed the connection]
danijoo has joined #ruby-lang
dorei has quit [Read error: Connection reset by peer]
dorei has joined #ruby-lang
achal has quit [Quit: Connection closed for inactivity]
mikecmpbll has joined #ruby-lang
davispuh has quit [Remote host closed the connection]
mikecmpbll has quit [Client Quit]
mikecmpbll has joined #ruby-lang
mykoweb has joined #ruby-lang
saarinen has joined #ruby-lang
hahuang65 has quit [Quit: WeeChat 0.4.3]
hahuang65 has joined #ruby-lang
glide has quit [Ping timeout: 255 seconds]
danijoo has quit [Remote host closed the connection]
gix has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
grayWolf has joined #ruby-lang
saarinen has quit [Quit: saarinen]
Speed has quit [Ping timeout: 255 seconds]
Aerlinger has joined #ruby-lang
glide has joined #ruby-lang
mykoweb has quit [Ping timeout: 265 seconds]
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
grayWolf is now known as Speed
lolmaus has quit [Quit: No Ping reply in 180 seconds.]
yfeldblu_ has joined #ruby-lang
lolmaus has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerling__ has joined #ruby-lang
kukyakya has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
Aerlinger has quit [Ping timeout: 268 seconds]
Aerling__ has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinge_ has quit [Ping timeout: 268 seconds]
Aerlinger has joined #ruby-lang
dorei has quit []
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
centrx has left #ruby-lang ["End transmission"]
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
rofel has quit [Quit: Leaving...]
centrx has joined #ruby-lang
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
MKeigher has joined #ruby-lang
<MKeigher> hey all... is anyone here using the MYSQL2 gem? - need some help, if someone is available, please and Thank you!
Aerlinge_ has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
<apeiros> MKeigher: while I won't be able to help, your chances of getting help are much bigger if you describe your problem instead of "need some help".
<MKeigher> ah ok....
kitak has quit [Remote host closed the connection]
Aerlinger has joined #ruby-lang
kitak has joined #ruby-lang
<MKeigher> So i am using the MYSQL2 gem and every db query is returning a value of 1. each sql query is designed to bring back a VALUE (or COUNT) and the queries are working fine in Sqlyog, so i know the queries good. just wondering why the mysql2 gem just returns a 1.
<MKeigher> to see what i mean.. please go here: http://dash.managedservic.es:3030/home and look at the AGENTS tile. thanks
Aerlinger has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
skade has joined #ruby-lang
Aerlinge_ has quit [Ping timeout: 268 seconds]
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinge_ has joined #ruby-lang
<MKeigher> there is a sql query behind the tile which SHOULD bring in a value that the sql query results to, but it sticks to 1.
<centrx> MKeigher, Show code
<MKeigher> my "oddc" connection is in a file name my_db.rb: https://gist.github.com/MartynKeigher/9999574
<MKeigher> odBc i mean!
<MKeigher> lol
Aerlinge_ has quit [Read error: No route to host]
kukyakya has quit [Remote host closed the connection]
<MKeigher> and here is my agentcount.rb file....
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
<MKeigher> i'm creating a odbc file and SEPERATE 'query files' so that IF i need to change the password (not likely, but you never know!) i dont have to change it MULTIPLE times in each 'query file'
Aerlinger has joined #ruby-lang
<centrx> MKeigher, Okay, results.count returns a count of the number of rows in the result, which is 1
<centrx> MKeigher, SELECT COUNT(*) returns one row
<MKeigher> ah.....
<MKeigher> so.. my result is ONE row...its just a count of rows in a table
<centrx> Yes
Aerlinger has quit [Read error: No route to host]
<MKeigher> so " current_agentcount = results.count " needs to change?
<MKeigher> how do i get it to return 17 in my tile ?
stevew_ has quit [Ping timeout: 252 seconds]
<centrx> MKeigher, Whatever the method is to get values from mysql2 results
Aerlinge_ has joined #ruby-lang
<MKeigher> ok... i'll dig into it! thanks for the pointer!
<MKeigher> at elast I know that by the tile displaying a 1 right now... means my odbc is correct and the 2 files are working together.
<MKeigher> *least
saarinen has joined #ruby-lang
Aerlinge_ has quit [Read error: No route to host]
Aerlinger has joined #ruby-lang
Aerlinge_ has joined #ruby-lang
Aerlinger has quit [Read error: Connection reset by peer]
Aerlinge_ has quit [Read error: Connection reset by peer]
Aerlinger has joined #ruby-lang
Aerlinger has quit [Read error: No route to host]
skade has quit [Quit: Computer has gone to sleep.]