fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
guest__ has joined #ruby
samrose has joined #ruby
stim371 has quit [Quit: stim371]
hbpoison has joined #ruby
ph^ has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
`brendan has joined #ruby
ssspiff has quit [Ping timeout: 245 seconds]
guest__ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hbpoison has quit [Ping timeout: 244 seconds]
guest__ has joined #ruby
thunderstrike has quit [Read error: Connection reset by peer]
manizzle has joined #ruby
tgraham has quit [Quit: Leaving...]
thunderstrike has joined #ruby
lggr has joined #ruby
rabidpraxis has joined #ruby
mikepack has quit [Remote host closed the connection]
mmitchell has joined #ruby
DarthGandalf has quit [Ping timeout: 260 seconds]
guest__ has left #ruby [#ruby]
jeffreybaird has quit [Quit: jeffreybaird]
cbuxton has quit [Ping timeout: 260 seconds]
hsbt_away is now known as hsbt
bbttxu has quit [Quit: bbttxu]
rabidpraxis has quit [Ping timeout: 245 seconds]
mmitchell has quit [Ping timeout: 245 seconds]
carson has quit [Quit: carson]
lggr has quit [Ping timeout: 246 seconds]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
SJr has quit [Excess Flood]
jrunning has quit [Ping timeout: 260 seconds]
SJr has joined #ruby
keppy has quit [Quit: leaving]
lggr has joined #ruby
jasonkuhrt has joined #ruby
thunderstrike has quit [Remote host closed the connection]
hsbt has quit [Ping timeout: 246 seconds]
gfontenot has joined #ruby
hsbt has joined #ruby
nykac_ has quit [Ping timeout: 240 seconds]
hackeron has quit [Ping timeout: 252 seconds]
slicslak has quit [Ping timeout: 245 seconds]
gfontenot has quit [Client Quit]
cakehero has joined #ruby
jrist-afk is now known as jrist
roz-monokeros has quit []
brianpWins has quit [Quit: brianpWins]
gllmpn has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 245 seconds]
cakehero_ has joined #ruby
eignerchris has quit [Remote host closed the connection]
phantasm66 has joined #ruby
cakehero has quit [Ping timeout: 248 seconds]
cj__ has joined #ruby
ph^ has joined #ruby
swarley has quit [Quit: Leaving]
swarley has joined #ruby
lggr has joined #ruby
slainer68 has quit [Remote host closed the connection]
jasonkuhrt has quit [Quit: Leaving...]
dagnachewa has joined #ruby
arubin_ has joined #ruby
yshh has joined #ruby
kiyoura has quit [Quit: Leaving]
arubin has quit [Ping timeout: 240 seconds]
arubin_ is now known as arubin
Averna has joined #ruby
sewardsfolly1344 has joined #ruby
cj__ has quit [Client Quit]
jasonkuhrt has joined #ruby
stim371 has joined #ruby
<swarley> dododo... waiting for my public key to register on rubyforge..
baroquebobcat has quit [Quit: baroquebobcat]
hsbt is now known as hsbt_away
pygmael has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
ph^ has quit [Ping timeout: 260 seconds]
dmiller has quit [Remote host closed the connection]
v0n has joined #ruby
BMF has joined #ruby
yshh has quit [Remote host closed the connection]
lggr has joined #ruby
yshh has joined #ruby
craq has quit [Quit: craq]
bricker has quit [Ping timeout: 245 seconds]
Synthead has joined #ruby
monkegjinni has joined #ruby
mmitchell has joined #ruby
bigoldrock has quit [Quit: Leaving.]
yshh has quit [Ping timeout: 240 seconds]
jimeh has quit [Ping timeout: 246 seconds]
carson has joined #ruby
carson has quit [Client Quit]
lggr has quit [Ping timeout: 260 seconds]
monkegjinni has quit [Ping timeout: 245 seconds]
Monie has quit [Ping timeout: 255 seconds]
Targen has joined #ruby
luckyruby has joined #ruby
stim371 has quit [Quit: stim371]
jrunning has joined #ruby
samrose has quit [Quit: Ex-Chat]
brianpWins has joined #ruby
lggr has joined #ruby
iori has joined #ruby
yshh has joined #ruby
glyytchy has quit [Quit: Leaving...]
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
arubin has quit [Quit: arubin]
rg8032u has joined #ruby
<falieson> lol
<falieson> I'm more laughing at your name
falieson has left #ruby [#ruby]
falieson has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
internet_user has quit [Remote host closed the connection]
davidcelis has joined #ruby
manizzle has quit [Ping timeout: 246 seconds]
slainer68 has joined #ruby
hbpoison has joined #ruby
chrishunt has quit [Ping timeout: 245 seconds]
jasonkuhrt has quit [Quit: Leaving...]
duracrisis_ has joined #ruby
swarley has quit [Ping timeout: 248 seconds]
glyytchy has joined #ruby
joelsbeard has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
jasonkuhrt has joined #ruby
ph^ has joined #ruby
v0n has quit [Ping timeout: 255 seconds]
Hanmac1 has joined #ruby
arubin has joined #ruby
hbpoison has quit [Ping timeout: 245 seconds]
pygmael has quit [Quit: pygmael]
yasushi_ has joined #ruby
Hanmac has quit [Ping timeout: 260 seconds]
scrogson has joined #ruby
CarlB_the_great has joined #ruby
digitalcakestudi has quit [Ping timeout: 252 seconds]
slainer68 has quit [Ping timeout: 248 seconds]
apok has quit [Quit: apok]
lggr has quit [Ping timeout: 246 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
CarlB_th_ has joined #ruby
mercwithamouth has joined #ruby
<rg8032u> Are you all so amazed with ruby as to be left speechless?
Dreamer3 has joined #ruby
seanstickle has quit [Quit: seanstickle]
chendo_ has quit [Ping timeout: 255 seconds]
tommyvyo has joined #ruby
CarlB_the_great has quit [Ping timeout: 260 seconds]
twoism has quit [Remote host closed the connection]
ph^ has quit [Ping timeout: 240 seconds]
chendo_ has joined #ruby
lggr has joined #ruby
tgraham_ has joined #ruby
umttumt has joined #ruby
BMF has left #ruby [#ruby]
pskosinski has quit [Ping timeout: 276 seconds]
Monie has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
tbbach has quit [Quit: tbbach]
jenrzzz has quit [Ping timeout: 252 seconds]
tbbach has joined #ruby
GoHuyGo has quit [Quit: Leaving]
lggr has quit [Ping timeout: 248 seconds]
chimkan has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
rg8032u has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
lggr has joined #ruby
Know1edge has joined #ruby
Know1edge has quit [Changing host]
Know1edge has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
jenrzzz has joined #ruby
falieson has quit [Quit: falieson]
cj__ has joined #ruby
xyzodiac has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
ryanf has joined #ruby
s0ber has quit [Ping timeout: 244 seconds]
ncr100 has quit [Ping timeout: 255 seconds]
lggr has joined #ruby
<davidcelis> no
<davidcelis> ruby is slow
s0ber has joined #ruby
<blazes816> *POSTed with Net::HTTP 3 days ago*
cj__ is now known as ruby_noob
sailias has quit [Quit: Leaving.]
ph^ has joined #ruby
forced_request has quit [Remote host closed the connection]
mercwithamouth has quit [Quit: Lost terminal]
lggr has quit [Ping timeout: 245 seconds]
headius has joined #ruby
hsbt_away is now known as hsbt
jblack has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
CaptainJet has joined #ruby
rads has quit [Quit: Computer has gone to sleep.]
ph^ has quit [Ping timeout: 260 seconds]
Goles has quit [Quit: Computer has gone to sleep.]
SirG has joined #ruby
jblack has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
pingfloyd has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
chrishunt has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
mikepack has joined #ruby
lggr has joined #ruby
hbpoison has joined #ruby
pipopopo has quit [Quit: ZNC - http://znc.sourceforge.net]
ttt has joined #ruby
pipopopo has joined #ruby
slainer68 has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
hbpoison has quit [Ping timeout: 260 seconds]
dagnachewa has quit [Quit: Leaving]
lggr has joined #ruby
v0n has joined #ruby
slacker has joined #ruby
chimkan has quit [Quit: chimkan]
umttumt has quit [Remote host closed the connection]
slainer68 has quit [Ping timeout: 246 seconds]
rmcafee has joined #ruby
headius has quit [Quit: headius]
rmcafee has quit [Client Quit]
hsbt is now known as hsbt_away
hbpoison has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
moshee has quit [Ping timeout: 246 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
glyytchy has quit [Quit: Leaving...]
botspot_87 has joined #ruby
<botspot_87> there is any way to require all rubygems that are specified on my Gemfile, or should I manually require all of them?
slacker has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
lggr has joined #ruby
peregrine81 has joined #ruby
flip_digits has joined #ruby
stopbit has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
stopbit has quit [Client Quit]
CaptainJet has quit []
<A124> %w{rubygems daemons eventmachine}.each { |x| require x } ?
<A124> botspot_87: ping
lggr has quit [Ping timeout: 260 seconds]
<botspot_87> A124: que problem is that still i have to write them all
alvaro_o has quit [Quit: Ex-Chat]
<botspot_87> A124: my questions is whether was possible to tell ruby to look for all gems that i specified on my gemfile....well, I can read the file for that anyway
v0n has quit [Quit: Leaving]
<A124> botspot_87: Ah I see. Yes. But. Don't you have to type them into the gemfile anyway?
rabidpraxis has joined #ruby
<botspot_87> A124: Yeah, that is why...just want to avoid code duplication...if i write them there, why should I write them inside my main.rb file
<A124> botspot_87: Oh. Well. If you find a way, give me a shout please. I'm not familiar with gemfiles, as my frameworks remain private so far.
lggr has joined #ruby
jonathanwallace has joined #ruby
<A124> botspot_87: require 'bundler/setup'; Bundler.require(:default)
sebastorama has joined #ruby
R3dy has joined #ruby
<R3dy> how do you convert all instances of '\' to '\\' in a ruby string?
<A124> R3dy: string.gsub
<blazes816> my_str = my_str.gsub '\', '\\'
<R3dy> ah yes gsub
<R3dy> thank you
<A124> Welcome.
ruby_noob has quit [Quit: ruby_noob]
lggr has quit [Ping timeout: 244 seconds]
<A124> botspot_87: Happy with that?
ruby_noob has joined #ruby
chendo_ has quit [Ping timeout: 245 seconds]
reset has quit [Ping timeout: 244 seconds]
chendo_ has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
lggr has joined #ruby
radic_ is now known as radic
<botspot_87> A124: I was not aware of that....nice... I will try to do it right now
<R3dy> blazes816: that gsub syntax returns an error for me
<A124> R3dy: irb or ruby ?
<R3dy> both
<R3dy> irb returns unterminated string
mikepack has quit [Remote host closed the connection]
<R3dy> ruby gives syntax error
<blazes816> my_str = my_str.gsub '\\', '\\\\'
<blazes816> ?
<R3dy> this works string.gsub(/\\/, '\\\\')
<R3dy> but the desired output is sitll only one \
<blazes816> yes
<R3dy> so I have a path like this ^
<blazes816> use string and not regex for both
<R3dy> ^
<R3dy> \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy44\WINDOWS\NTDS\ntds.dit
<R3dy> and I want to replase all \ with \\
<blazes816> my_str = my_str.gsub '\\', '\\\\'
<blazes816> just tested it
moted has quit [Ping timeout: 255 seconds]
DarthGandalf has joined #ruby
ph^ has joined #ruby
<blazes816> well, now it isn't :s
peregrine81 has quit [Quit: Computer sleeping.]
<R3dy> 1.9.2-p320 :004 > string.gsub '\\', '\\\\' => "\\?GLOBALROOTDeviceHarddiskVolumeShadowCopy44WINDOWSNTDS\ntds.dit"
<bnagy> you can't use "" when you define your original string
lggr has quit [Ping timeout: 256 seconds]
<A124> Agreed. Else it takes it as special characters
<R3dy> got it
<R3dy> thanks
forced_request has joined #ruby
chendo_ has quit [Ping timeout: 255 seconds]
<R3dy> I forgot about literal strings
lggr has joined #ruby
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
darthdeus has quit [Quit: Leaving...]
gani has joined #ruby
chendo_ has joined #ruby
manizzle has joined #ruby
rakl has joined #ruby
sent-hil has joined #ruby
<sent-hil> is it possible to use stalker with ironmq?
xuser has left #ruby [#ruby]
lggr has quit [Ping timeout: 240 seconds]
ph^ has quit [Ping timeout: 245 seconds]
slicslak has joined #ruby
maletor has joined #ruby
maek has joined #ruby
mvangal__ has joined #ruby
<maek> anyone know how to make Thor print its long_desc for a task?
brianpWins_ has joined #ruby
lggr has joined #ruby
jenrzzz has joined #ruby
tntc has joined #ruby
Coolhand_ has joined #ruby
Chryson has quit [Remote host closed the connection]
Chryson has joined #ruby
jrunning has quit [Quit: leaving]
rakl_ has joined #ruby
GeekOnCoffee has quit [Read error: Connection reset by peer]
Forevernade has quit [Read error: Connection reset by peer]
brianpWins has quit [Read error: Connection reset by peer]
rakl has quit [Ping timeout: 244 seconds]
brianpWins_ is now known as brianpWins
methoddk has quit [Ping timeout: 244 seconds]
Monie has quit [Ping timeout: 244 seconds]
mvangala has quit [Ping timeout: 244 seconds]
GeekOnCoffee has joined #ruby
Coolhand has quit [Ping timeout: 244 seconds]
methoddk has joined #ruby
methoddk has quit [Changing host]
methoddk has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
<Spooner> botspot_87 : Look at Bundler.require - it allows you to load all Bundled gems at once (or just certain groups).
<botspot_87> Spooner: thx
wargasm has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
Spooner has quit []
guns has joined #ruby
lggr has joined #ruby
sebastorama has joined #ruby
Onso has joined #ruby
tvw has joined #ruby
sent-hil has quit [Remote host closed the connection]
digitalcakestudi has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
Onso has quit [Quit: Page closed]
dmiller has joined #ruby
stan_man_can has quit [Quit: stan_man_can]
stan_man_can has joined #ruby
jarred has joined #ruby
lggr has joined #ruby
tvw has quit [Ping timeout: 245 seconds]
ph^ has joined #ruby
mmitchell has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 256 seconds]
Juul has quit [Quit: Leaving]
Juul has joined #ruby
Forevernade has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
hadees has quit [Read error: Connection reset by peer]
<A124> Spooner: I have sufested the same. Hence no idea why the duplicity.
<A124> *g
Banistergalaxy has joined #ruby
pfaff has quit [Ping timeout: 268 seconds]
lggr has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
Juul has quit [Ping timeout: 246 seconds]
CarlB_th_ has quit [Remote host closed the connection]
CarlB_the_great has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
quest88 has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
hadees has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
dmiller has quit [Remote host closed the connection]
slicslak has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
pfaff has joined #ruby
jarred has quit [Quit: jarred]
Banistergalaxy has quit [Ping timeout: 255 seconds]
AlbireoX`Laptop has joined #ruby
baroquebobcat has joined #ruby
jasonkuhrt has quit [Quit: Leaving...]
Banistergalaxy has joined #ruby
ffranz has quit [Quit: Leaving]
lggr has quit [Ping timeout: 252 seconds]
AlbireoX has quit [Ping timeout: 252 seconds]
jarred has joined #ruby
daniel_hinojosa has joined #ruby
daniel_hinojosa1 has joined #ruby
AlecTaylor has joined #ruby
<AlecTaylor> hi
pdtpatrick has joined #ruby
moted has joined #ruby
daniel_hinojosa1 has quit [Client Quit]
<maek> well hello
AlecTaylor has left #ruby [#ruby]
hsbt_away is now known as hsbt
<maek> o_0
AlecTaylor has joined #ruby
qos has joined #ruby
<AlecTaylor> Thinking to buy: "Ruby and MongoDB Web Development Beginner's Guide". Your thoughts?
CarlB_th_ has joined #ruby
baroquebobcat_ has joined #ruby
Forevernade has quit [Ping timeout: 246 seconds]
TorpedoSkyline is now known as other_tj
other_tj is now known as tjbarber
tommyvyo has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
adkron has joined #ruby
headius has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
<maek> AlecTaylor: it just so happens packt pub is giving away any free ebook until the end of this month to celebrate there 1000th book published http://www.packtpub.com/
<AlecTaylor> maek: Yeah, that's where I found it
<AlecTaylor> :P
<maek> ah
<maek> its free
<maek> who cares about thoughts
GeekOnCoffee has quit [Read error: Connection reset by peer]
baroquebobcat has quit [Read error: Connection reset by peer]
GeekOnCoffee has joined #ruby
baroquebobcat_ is now known as baroquebobcat
<AlecTaylor> Yeah, but it still takes time to read
<AlecTaylor> And my time is valuable :v
<AlecTaylor> So want to know if the book is worth it
ken_barber has joined #ruby
twoism has joined #ruby
ph^ has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
ruby_noob has quit [Quit: ruby_noob]
pfaff has quit [Ping timeout: 245 seconds]
Nisstyre-laptop has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
lggr has joined #ruby
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
yasushi_ has quit [Ping timeout: 255 seconds]
CarlB_th_ has quit [Remote host closed the connection]
ElderFain has quit [Read error: Connection reset by peer]
ph^ has quit [Ping timeout: 245 seconds]
ElderFain_ has joined #ruby
TomJ has quit [Quit: TomJ]
ananthakumaran has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
ryanlecompte has joined #ruby
jrist is now known as jrist-afk
lggr has joined #ruby
chimkan_ has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
jarred_ has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
voodoofish430 has quit [Quit: Leaving.]
pfaff has joined #ruby
jarred has quit [Read error: Connection reset by peer]
ryanf has quit [Quit: leaving]
ryanlecompte has quit [Remote host closed the connection]
jarred has joined #ruby
digitalcakestudi has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 245 seconds]
jarred_ has quit [Ping timeout: 245 seconds]
yoklov has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Client Quit]
<yoklov> nested lambda syntax gets messy :/
lggr has joined #ruby
<yoklov> or maybe i just need to break it up more.
ananthakumaran has quit [Quit: Leaving.]
chimkan_ has quit [Quit: chimkan_]
pfaff has quit [Ping timeout: 245 seconds]
daniel_hinojosa has quit [Quit: Leaving.]
moted has quit [Remote host closed the connection]
moted has joined #ruby
sewardsfolly1344 has left #ruby [#ruby]
pygmael has joined #ruby
jarred has quit [Quit: jarred]
quest88 has quit [Quit: quest88]
lggr has quit [Ping timeout: 244 seconds]
chimkan has joined #ruby
fredjean has joined #ruby
daniel_hinojosa1 has joined #ruby
joeycarmello has quit [Remote host closed the connection]
ph^ has joined #ruby
mikepack has joined #ruby
lggr has joined #ruby
tbbach has quit [Quit: tbbach]
tommyvyo has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
ryanf has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
ph^ has quit [Ping timeout: 245 seconds]
jarred has joined #ruby
Forevernade has joined #ruby
xnm has joined #ruby
lggr has joined #ruby
jasonkuhrt has joined #ruby
mk03 has quit [Ping timeout: 252 seconds]
icooba has quit [Quit: Computer has gone to sleep.]
chimkan has quit [Quit: chimkan]
pfaff has joined #ruby
jonahR has joined #ruby
cakehero_ has quit [Quit: Computer has gone to sleep.]
sent-hil has joined #ruby
jasonkuhrt has quit [Ping timeout: 245 seconds]
friskd has joined #ruby
fredjean has quit [Quit: Computer has gone to sleep.]
josh^ has quit [Remote host closed the connection]
josh^ has joined #ruby
fredjean has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
cakehero has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
gani has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
fredjean has quit [Client Quit]
gmci has quit [Quit: Computer has gone to sleep.]
falieson has joined #ruby
lggr has joined #ruby
gmci has joined #ruby
cjs226 has quit [Ping timeout: 260 seconds]
<jarred> Is anyone here familiar with Net::NTP (this one http://rubydoc.info/gems/ruby-net-nntp/frames)
fredjean has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
triptec has quit [Quit: triptec]
jenrzzz has quit [Read error: Connection reset by peer]
Hanmac1 has quit [Ping timeout: 240 seconds]
h4mz1d has joined #ruby
fredjean has quit [Client Quit]
stan_man_can has quit [Quit: stan_man_can]
headius has quit [Quit: headius]
Hanmac has joined #ruby
ken_barber has quit [Remote host closed the connection]
pfaff has quit [Ping timeout: 245 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 246 seconds]
Banistergalaxy has quit [Ping timeout: 246 seconds]
sent-hil has quit [Remote host closed the connection]
falieson has quit [Quit: falieson]
Targen has quit [Ping timeout: 244 seconds]
spaceships has joined #ruby
lggr has joined #ruby
icole has joined #ruby
Forevernade has quit [Ping timeout: 240 seconds]
spaceships has quit [Client Quit]
ph^ has joined #ruby
stan_man_can has joined #ruby
pfaff has joined #ruby
AwesomeGarethMan has quit [Changing host]
AwesomeGarethMan has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
ph^ has quit [Remote host closed the connection]
Hanmac has quit [Remote host closed the connection]
ph^ has joined #ruby
<AlecTaylor> Posted on comp.lang.ruby!
d3vic3 has quit [Read error: Operation timed out]
mohits has joined #ruby
RichieEvan has joined #ruby
RichieEvan is now known as Pochacco
Hanmac has joined #ruby
Bosma has quit [Ping timeout: 240 seconds]
eldariof has joined #ruby
lggr has joined #ruby
d3vic3 has joined #ruby
Guest64548 has joined #ruby
blazes816 has quit [Quit: blazes816]
AlbireoX`Laptop has quit [Remote host closed the connection]
Pochacco has quit [Quit: Pochacco]
richieevan has joined #ruby
AlbireoX has joined #ruby
icooba has joined #ruby
richieevan is now known as Pochacco
Pochacco has quit [Client Quit]
Pochacco has joined #ruby
jarred has quit [Quit: jarred]
lggr has quit [Ping timeout: 240 seconds]
rakl_ has quit [Remote host closed the connection]
ken_barber has joined #ruby
rakl has joined #ruby
falieson has joined #ruby
<deryl> damn, people still use the uunet groups? ;)
pfaff has quit [Ping timeout: 245 seconds]
xpen has joined #ruby
ananthakumaran has joined #ruby
Targen has joined #ruby
<SirG> and, sometimes, even usenet ones too ;)
Banistergalaxy has joined #ruby
<deryl> hehe tis waht i meant but was hoping to escape anyone's notice. oh well i tried
<deryl> err what
AlbireoX has quit [Ping timeout: 246 seconds]
<AlecTaylor> yup
AlecTaylor has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
tagrudev has joined #ruby
<SirG> I often discover I got my fingers from K-Mart too...
lggr has joined #ruby
<deryl> hehe
<rking> Is there a more idiomatic way to say foo.sub /a(.)b/ do $1 end #?
<rking> Kind of ungolfed compared to Perl's $foo =~ s/a(.)b/$1/
hbpoison has quit [Ping timeout: 244 seconds]
Kruppe has quit [Ping timeout: 245 seconds]
ShiintoRyuu has quit [Quit: Computer has gone to sleep.]
ABK has joined #ruby
pfaff has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
hsbt is now known as hsbt_away
<SirG> rking: foo.sub(/a(.)b/) {$1} ;)
<rking> SirG: Meh. Six of one, half-dozen of another on that one.
<rking> That's actually more tokens.
guns has quit [Ping timeout: 245 seconds]
<rking> But if there's not anything more succinct I'll be more than Ok with either; I just wanted to be sure I wasn't overlooking some other feature.
<bnagy> surely there is a way to have private functions in a module without having to extend self?
quazimodo has quit [Remote host closed the connection]
Pochacco has quit [Quit: Pochacco]
<Hanmac> SirG & rking: "a3b".sub(/a(.)b/,"\\1")
<rking> Ahoy!
<xnm> rking: foo.sub(/a(.)b/,$1)
<Hanmac> "a3b".sub(/a(.)b/,'\1')
<rking> xnm: *Surely* that doesn't work.
hsbt_away is now known as hsbt
tgraham_ has quit [Quit: Leaving...]
lggr has joined #ruby
<xnm> rking: try it out
<rking> xnm: I bet it worked because you ran a previous one that set $1
<SirG> rking: foo.sub(/a(.)b/, $1);
SegFaultAX has quit [Quit: Lost terminal]
lurraca has joined #ruby
<rking> SirG: Stop that!
<rking> You guys are being goofy.
<lurraca> Hello
<rking> Hanmac: Thank you for being a nongoof. =)
<Hanmac> Sirg & xnm no your code makes TypErrors for me because $1 is NOT set
<lurraca> Anyone familiar with web crawling with Mechanize?
<xnm> oh, damn
<xnm> you're right
R3dy has quit [Quit: Lost terminal]
<lurraca> Looking a way to recover from "Error 101 (net::ERR_CONNECTION_RESET): The connection was reset" when fetching a page?
guns has joined #ruby
JohnBat26 has joined #ruby
ken_barber has quit [Remote host closed the connection]
JohnBat26 has quit [Client Quit]
c0rn_ has quit [Quit: Computer has gone to sleep.]
h4mz1d has quit [Ping timeout: 245 seconds]
JohnBat26 has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber1 has joined #ruby
ken_barber1 has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
Pochacco has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<lurraca> anyone familiar with Mechanize for Ruby?
ken_barber has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
<A124> lurraca: Yes. The error is from mechanize?
ken_barber has quit [Read error: Connection reset by peer]
answer_42 has joined #ruby
ken_barber has joined #ruby
guns has quit [Ping timeout: 252 seconds]
ken_barber has quit [Read error: Connection reset by peer]
<lurraca> not sure if the error is from mechanize or from Net::HTTP::Persistent but I'm getting while trying to fetch a website that is broken (http://www.redclaymedia.com/)
dakine has quit [Remote host closed the connection]
bartj3 has joined #ruby
lggr has joined #ruby
<lurraca> A124: but what I want to do is recover from that error and do something in case I try to do the Mechanize.get() on a broken website.
diegoviola has quit [Ping timeout: 252 seconds]
ken_barber has joined #ruby
fredjean has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<A124> lurraca: I'm not sure how Mechanize processes page in current version, but it's connexction error, not a Mechanize's. Use begin; rescue; end or just rescue
moshee has quit [Ping timeout: 244 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
chendo_ has quit [Ping timeout: 255 seconds]
<lurraca> A124: I'm using exception handling for responsecodeerror but for some reason this one is not being caught.
chendo_ has joined #ruby
pfaff has quit [Ping timeout: 268 seconds]
<lurraca> begin
<lurraca> page = agent.get(@url)
<lurraca> if exception.response_code == '400' or exception.response_code == '500'
<lurraca> rescue Mechanize::ResponseCodeError => exception
<A124> This is not a response code error, but a connection error. And as you can see this one is not of a Mechanize class even
hsbt is now known as hsbt_away
<lurraca> A124: any idea how should I handle it then? thanks for the help btw
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
seoaqua has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 256 seconds]
Jellyg00se has quit [Remote host closed the connection]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<A124> lurraca: define one more rescue condition consisting of appropriate exception
jonahR has quit [Quit: jonahR]
lggr has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
manizzle has quit [Ping timeout: 256 seconds]
Chryson has quit [Quit: Leaving]
SirG has quit [Quit: Leaving]
yoklov has quit [Quit: computer sleeping]
daniel_hinojosa1 has quit [Remote host closed the connection]
rippa has joined #ruby
ZubKonst_ has quit [Read error: Connection reset by peer]
<A124> lurraca: Got it?
ZubKonst has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
Pochacco has quit [Quit: Pochacco]
arturaz has joined #ruby
<lurraca> A124: yeah, i think so, i'll you show what I come up with. Thanks btw.
ken_barber has joined #ruby
lggr has joined #ruby
Monie has quit [Ping timeout: 245 seconds]
ken_barber has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
ken_barber has joined #ruby
<lurraca> A124: I don't know what kind of exception is getting fire so I just catching everything rescue StandardError, I really don't care what the reason that the crawl failed I'm just interested on know if failed or not
ken_barber has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Quit: Leaving.]
bradhe has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
<A124> lurraca: When the exception is thrown, the class of the exception should be there
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
manizzle has joined #ruby
<A124> lurraca: Anyway, this is a Windows 7 related error. You are using Win 7 right?
<lurraca> no
ken_barber has joined #ruby
<lurraca> macos
<lurraca> Mac OSX
ken_barber has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 245 seconds]
<A124> Hm. Interesting. Else it's MTU problem, or a server problem. But the error seems as a link issue.
<lurraca> A124: why is this a Win 7 related error?
ken_barber has joined #ruby
<lurraca> its gotta a server problem
ken_barber has quit [Read error: Connection reset by peer]
Monie has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
Russell^^ has quit [Quit: Russell^^]
<A124> If you are sure, else you could try https://support.apple.com/kb/ht2532
<lurraca> A124: I think this is the way to go, else I had to implement a catch for all exceptions that might arise and I'm not familiar with Net::HTTP
<A124> This is Net error, not Net::HTTP
lggr has joined #ruby
uris has quit [Quit: leaving]
pfaff has joined #ruby
ken_barber has joined #ruby
chimay has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
arturaz has quit [Remote host closed the connection]
ken_barber has quit [Read error: Connection reset by peer]
chussenot has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
haxrbyte has quit [Ping timeout: 260 seconds]
ken_barber has joined #ruby
aganov has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
ken_barber has quit [Read error: Connection reset by peer]
rakl has quit [Quit: gone]
guns has joined #ruby
<A124> lurraca: rescue Net::ERR_CONNECTION_RESET .. maybe?
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber1 has joined #ruby
Synthead has quit [Quit: p33 ba115]
ken_barber1 has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has joined #ruby
Guest64548 has quit [Ping timeout: 240 seconds]
mars__ has joined #ruby
ken_barber has joined #ruby
_mak has joined #ruby
maesbn has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
<A124> lurraca: The problem is network specific, but website-wise, the fix should be to lower the mtu.
ken_barber has quit [Read error: Connection reset by peer]
zigomir has joined #ruby
eldariof has quit []
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<lurraca> A124: let me check that exception class
mikepack has quit [Remote host closed the connection]
arubin has quit [Quit: arubin]
<A124> It does not exist.
lggr has quit [Ping timeout: 260 seconds]
Seventoes has joined #ruby
Seventoes has quit [Client Quit]
ken_barber has joined #ruby
justinmcp has quit [Remote host closed the connection]
ken_barber has quit [Read error: Connection reset by peer]
guns has quit [Quit: guns]
timonv has quit [Remote host closed the connection]
twoism has quit [Ping timeout: 246 seconds]
Joel_re has joined #ruby
<Joel_re> hey, is it possible to view variable values of a ruby script thats currently running
<Joel_re> using gdb or something similar?
ken_barber has joined #ruby
lggr has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<bnagy> Joel_re: gem install pry, then in your script require 'pry' then put binding.pry where you want to drop into a repl
sspiff has joined #ruby
ken_barber has joined #ruby
<Joel_re> bnagy: ok, well I currently have a script run in progress and it didnt 'require pry'
<Joel_re> is there anyway I can still check the values?
ken_barber has quit [Read error: Connection reset by peer]
<bnagy> you could use a debugger, but it will be a gigantic pain in the ass
<Joel_re> hrm
<Joel_re> I tried that, was able to list out functions
seoaqua has quit [Ping timeout: 256 seconds]
<Joel_re> currently in the stack
ken_barber has joined #ruby
ken_barber1 has joined #ruby
ken_barber1 has quit [Read error: Connection reset by peer]
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
jenrzzz has joined #ruby
jasonkuhrt has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
Morkel has joined #ruby
arturaz has joined #ruby
cibs has quit [Quit: leaving]
<A124> lurraca: Ok, To be honest. You did not posted the whole exception thrown. If you do so, I could be able to help.
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
Seventoes has joined #ruby
<A124> lurraca: StandardError, or RuntimeError, or other.. you only specified a string, not class.
Seventoes has quit [Client Quit]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
AlecTaylor has joined #ruby
<AlecTaylor> Where do I find the source code to the `gem` program?
Seventoes has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
<A124> lib/ruby/gems
<A124> Oh, you mean the gem itself, sorry.
Pochacco has joined #ruby
ken_barber has joined #ruby
jasonkuhrt has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
<A124> A file named "gem" is a ruby script, there are require clauses.. so just start there
ken_barber has quit [Read error: Connection reset by peer]
Pochacco has left #ruby [#ruby]
\n has joined #ruby
<A124> AlecTaylor: ping
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<AlecTaylor> A124: Github link?
<\n> Hi, how can I get the client's IP address from a socket listener?
lggr has joined #ruby
<A124> AlecTaylor: Do you have gem installed on your computer?
<AlecTaylor> no
<AlecTaylor> Want to see how complex the code is
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<lurraca> A124: Thanks a lot for your help, I was able to solve the issue using StandardError.
<A124> AlecTaylor: You don't have ruby on your computer?
lolmaus has joined #ruby
<AlecTaylor> Correct. Is there a github page with the gem rb file?
<A124> AlecTaylor: Please try a Google https://github.com/ruby/ruby/blob/trunk/bin/gem
mucker has joined #ruby
<AlecTaylor> So where is rubygems?
rippa has quit [Ping timeout: 252 seconds]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<A124> AlecTaylor: I'm sorry, no spoon feeding.
margle has joined #ruby
ken_barber has joined #ruby
<A124> lurraca: Not a good idea though. rescue StandardError = > e; if e.message = "Error 101 (net::ERR_CONNECTION_RESET): The connection was reset" then; <Your Code>; end
ken_barber has quit [Read error: Connection reset by peer]
<A124> * else raise e
lggr has quit [Ping timeout: 245 seconds]
<bnagy> rescue rescues StandardError by default
<A124> bnagy: Oh, ok. That's true, thank you ^^
<bnagy> by the looks you probably want to rescue Net
ken_barber has joined #ruby
hbpoison has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<A124> In this case if it's the mentioned error, it will let you handle it else it will raise.
jgrevich has quit [Quit: jgrevich]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<lurraca> A124: Why rescue everything is not a good idea? In this particular case I'm not concerned about which particular exception was raised. I just want to be able to set a value and return if any kind of exception was raise while doing agent.get
AlbireoX has joined #ruby
lggr has joined #ruby
<A124> lurraca: It could be perhaps not network related exception. Just don't do it.
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<A124> lurraca: You never know. And when other error raises you will not know where is problem. And it will punch you in the face. Happened to me once.
<lurraca> A124: thanks, I will use what you gave me on the pastebin
ken_barber has joined #ruby
<_7894> Agreed
ken_barber has quit [Read error: Connection reset by peer]
<bnagy> rescue is ok (StandardError) but rescue Exception is bad
djdb has joined #ruby
baphled has quit [Ping timeout: 256 seconds]
<bnagy> cause lots of that stuff you can't recover from anyway, SystemError etc
awestroke has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
c0rn_ has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 246 seconds]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has joined #ruby
bobbbo has joined #ruby
areil has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
sepp2k has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
bobbbo has quit [Client Quit]
futilegames has joined #ruby
ken_barber has joined #ruby
bradhe has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
Elhu has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 260 seconds]
ShiintoRyuu has joined #ruby
daniel_- has joined #ruby
ken_barber has joined #ruby
AlecTaylor has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber1 has joined #ruby
ken_barber1 has quit [Read error: Connection reset by peer]
xnm has quit [Ping timeout: 245 seconds]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 260 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has joined #ruby
ken_barber has joined #ruby
samphippen has joined #ruby
Raimiss has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
\n has quit [Disconnected by services]
catphish has quit [Remote host closed the connection]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
chendo_ has quit [Ping timeout: 255 seconds]
AlbireoX has quit [Remote host closed the connection]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
AlbireoX has joined #ruby
rippa has joined #ruby
chendo_ has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
AlbireoX has quit [Ping timeout: 255 seconds]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
robustus has joined #ruby
jimeh has joined #ruby
ken_barber has joined #ruby
luckyruby has quit [Remote host closed the connection]
triptec has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
luckyruby has joined #ruby
ken_barber has joined #ruby
lggr has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
jasonkuhrt has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
rippa has quit [Ping timeout: 246 seconds]
noxoc has joined #ruby
ken_barber has joined #ruby
skogis has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
jasonkuhrt has quit [Ping timeout: 245 seconds]
adkron has quit [Ping timeout: 260 seconds]
gairola has joined #ruby
ken_barber has joined #ruby
chussenot has quit [Ping timeout: 245 seconds]
ken_barber has quit [Read error: Connection reset by peer]
twoism has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
colinbm has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
ken_barber has joined #ruby
twoism has quit [Ping timeout: 245 seconds]
JusticeXC has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
chimay has quit [Quit: WeeChat 0.3.9-rc1]
<JusticeXC> Can somebody help me? I cannot access Python, C, C++ and C# is talking about drugs.
lggr has joined #ruby
JohnBat26 has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
mengu has joined #ruby
<Joel_re> JusticeXC: lol
<Joel_re> JusticeXC: what help do you need
<JusticeXC> It's an assignment I;m doing with Python.
<JusticeXC> My logic is rusty, but I don't understand how to do the bonus question.
ken_barber has joined #ruby
<JusticeXC> I'll pastebin the code and question.
ken_barber has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
slainer68 has joined #ruby
matrixise has joined #ruby
ken_barber has joined #ruby
<Joel_re> hrm, cant really help with assignments
ken_barber has quit [Read error: Connection reset by peer]
<JusticeXC> It's a bonus question!
<Joel_re> else whats the point of them :p
<JusticeXC> I did the main assignment myself.
<JusticeXC> This I;m having difficulty with.
<JusticeXC> I came from C and my logic would be to use decision structures.
lggr has quit [Ping timeout: 244 seconds]
<JusticeXC> I don't see how using round() or abs() would work.
timonv has joined #ruby
futilegames has left #ruby [#ruby]
frogprince_mac has joined #ruby
<bnagy> abs works
<bnagy> you just need to think about it
<JusticeXC> How?
<JusticeXC> Hrm.
darthdeus has joined #ruby
futilegames has joined #ruby
<JusticeXC> Let's say the total amount of points is -7 and I abs that.
<JusticeXC> Now it's 7, no?
<bnagy> usually, yeah
<bnagy> in 'conventional' arithmetic
guns has joined #ruby
<JusticeXC> There is unconventional math?
ken_barber has joined #ruby
<bnagy> I'm just being sarcastic. Carry on.
<JusticeXC> :(
<JusticeXC> I can't carry on, I don't know the answer!
ken_barber has quit [Read error: Connection reset by peer]
<bnagy> no bonus points for you then I guess
<JusticeXC> But I love bonus points..
lggr has joined #ruby
Xeago has joined #ruby
<JusticeXC> Can you lead me in the right direction at least bnagy?
<bnagy> I did
<JusticeXC> I legitimately don't see how abs can work.
stephenjudkins has joined #ruby
<JusticeXC> Let's say total_points comes out to -3.
<bnagy> well I guess that's why they're bonus points
Xeago has quit [Read error: Connection reset by peer]
<JusticeXC> We didn't even learn any of this in class.
<JusticeXC> Not even remotely close.
<bnagy> HOW DARE THEY
<JusticeXC> It's a beginner Python course..
<kitofr> u never learn how to "think" in class.. that's something u have to figure out urself
<bnagy> encouraging logical thought should be banned
<JusticeXC> I don't understand your reasoning.
<bnagy> JusticeXC: I have never written a line of python in my life and I know how to do it
ken_barber has joined #ruby
<JusticeXC> We haven't so much even heard of a function called abs.
darthdeus has quit [Ping timeout: 248 seconds]
<bnagy> this is nothing to do with python
ken_barber has quit [Read error: Connection reset by peer]
<kitofr> bnagy: true
<JusticeXC> Try using what we've learned so far to come up with a solution.
<bnagy> it's like maths I learned when I was 10
ken_barber has joined #ruby
cezar has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
gani has joined #ruby
<bnagy> I think it's reasonable to assume that knowledge
<JusticeXC> I'm not saying it's unreasonable - I'm saying try doing it with the knowledge we have of Python thus far.
<JusticeXC> Which is to say, very little.
cezar has quit [Client Quit]
<bnagy> hence 'bonus points'
ephemerian has joined #ruby
<bnagy> anyway whit whining and just solve the problem already
<bnagy> think what you can do with abs
<JusticeXC> If your answer includes abs(), then it's already beyond the scope.
ken_barber has joined #ruby
<kitofr> then ask urself... how would u write abs urself?
<JusticeXC> With a decision structure.
<JusticeXC> Which I can't use..
elaptics`away is now known as elaptics
<bnagy> well presumably you're allowed to use points.abs()
<bnagy> so go from there
lggr has quit [Ping timeout: 244 seconds]
ken_barber has quit [Read error: Connection reset by peer]
<bnagy> or don't, I'm not a cop
ken_barber has joined #ruby
<JusticeXC> I tried looking that up in python documentation.
<JusticeXC> Couldn't find points.abs()
<bnagy> but I assure you that there is a working solution down this road
ken_barber has quit [Read error: Connection reset by peer]
<kitofr> JusticeXC: wish u good luck, i'll head back to work
<JusticeXC> thx
Vainoharhainen has joined #ruby
ken_barber has joined #ruby
seoaqua has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
<RubyPanther> In most languages you can just say x < 0 ? -x : x
ken_barber has quit [Read error: Connection reset by peer]
justinmcp has joined #ruby
ken_barber has joined #ruby
<JusticeXC> What I'm saying is that we haven't even been taught such functions.
<JusticeXC> Somebody's logic could be impeccable and wouldn't know ohw to translate it to python.
<JusticeXC> Because nobody know anything besides simple simple basics.
ken_barber has quit [Read error: Connection reset by peer]
lggr has joined #ruby
adeponte has joined #ruby
<bnagy> RubyPanther: that would be a decision structure
<RubyPanther> I guess in python you'd have to know to write out the if
<JusticeXC> AFAIK, abs() just returns any value as a positive value.
bobbbo has joined #ruby
<JusticeXC> Ruby: I can't write an if
<bnagy> JusticeXC: apparently the syntax is abs(total_points)
<JusticeXC> That's the problem.
<bnagy> or bonus points or whatever
<JusticeXC> bnagy, so if it's -3 it becomes 3
samphippen has quit [Quit: Computer has gone to sleep.]
<JusticeXC> That's still wrong.
<bnagy> yeah, you need a couple more steps
<JusticeXC> I'm hitting brick walls in my head cause I keep using if()
nari has quit [Ping timeout: 256 seconds]
ryanf has quit [Quit: broken pipes |||]
<bnagy> all you need is simple arithmetic
<RubyPanther> I used python for the first time in the robot car class, I'm not sure why it should be hard to use a new language. Open up a "cheat sheet" and bang out some code.
<JusticeXC> First off, how can the interpreter even tell that the total_points is negative
<JusticeXC> without using when or if
<RubyPanther> If it is too gross just generate it from Ruby :)
<bnagy> abs doesn't care, that's the beauty of it
<bnagy> abs(-3_ => 3 abs(3) => 3
<JusticeXC> So how can it differentiate between negative scores and positive scores
<JusticeXC> and which to keep and which to round down to 0
timmow has joined #ruby
<bnagy> magic!
<bnagy> or alternatively, arithmetic
ken_barber has joined #ruby
<JusticeXC> I'm sure I'll hit myself in the head when I see it bnagy, but I'm honestly stumped.
lggr has quit [Ping timeout: 240 seconds]
ken_barber has quit [Read error: Connection reset by peer]
<JusticeXC> It's embarrassing.
<bnagy> do some situps
<bnagy> fap
<JusticeXC> I just want to sleep :S
<JusticeXC> By getting this done.
matrixise has quit [Ping timeout: 248 seconds]
ken_barber has joined #ruby
c0rn_ has quit []
horrror has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
adeponte has quit [Remote host closed the connection]
timmow_ has joined #ruby
AndChat- has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
timmow_ is now known as timmow
xpen has quit [Remote host closed the connection]
Xeago has joined #ruby
<RubyPanther> JusticeXC: maybe sleep is a better bonus for you
<JusticeXC> It's due at 9:00 am
<JusticeXC> Sleep is no option
stephenjudkins has quit [Quit: stephenjudkins]
<JusticeXC> I don't get why everybody is so conservative
<bnagy> why can't I have stuff I don't deserve? I just don't understand! fml!
pingfloyd has quit [Quit: pingfloyd]
<JusticeXC> that's such an exaggerated mentality representation
Xeago has quit [Remote host closed the connection]
<bnagy> no, you're in an inappropriate channel, asking people to help you cheat on your assignment
matrixise has joined #ruby
<JusticeXC> I'm really not.
<bnagy> the fact you got any help at all is amazing
<RubyPanther> if I write it for you, will you promise to go away?
<JusticeXC> I don't need you to write it
<JusticeXC> just explain it
<JusticeXC> you think i'm asking for shit on a silver platter
<bnagy> you are
<JusticeXC> and by mosying around the answer and shit you'll get me to think
<bnagy> I already told you what you need
<JusticeXC> it's like kitchen nightmares
<RubyPanther> It is more keystrokes to explain than to write it, it is that eas
<RubyPanther> y
<bnagy> now you're just going to whine like a girl until someone cracks and does it for you because they can't resist showing off
<RubyPanther> You're just not bonus enough
<JusticeXC> honestly, i don't get it right now, i've been blunt about it many times
Raimiss has quit [Ping timeout: 246 seconds]
thomas has quit [Quit: Brb]
<RubyPanther> so why would you deserve bonus points?
<RubyPanther> who are bonus points for, people who do understand, or people who do not?
lggr has quit [Ping timeout: 246 seconds]
<JonnieCache> lol
NimeshNeema has quit []
NimeshNeema has joined #ruby
lggr has joined #ruby
<RubyPanther> in Ruby you could use something like "The total number of points you have is: %d" % [total_points,0].sort.reverse[0]
ken_barber has joined #ruby
<horrror> I want to be able to make image slideshow online (with transition effects)
ken_barber has quit [Read error: Connection reset by peer]
<Hanmac> RubyPanther: [total_points,0].max
LouisGB has joined #ruby
<horrror> that the user may edit (timestamps etc).. OpenCV is the waY?
<RubyPanther> I was intentionally avoiding that one Hanmac
<horrror> or something else I don't know?
guns has quit [Ping timeout: 245 seconds]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
icole has quit [Remote host closed the connection]
<whowantstolivefo> hı
imami|afk has quit [Excess Flood]
ken_barber has joined #ruby
<whowantstolivefo> What does the following ruby code print out? puts ((110.to_s * 2).to_i/2) << because i want to register for ruby-forum.. i think it is 555 ? i type that but it says wrong ?
ken_barber has quit [Read error: Connection reset by peer]
<bnagy> whowantstolivefo: why not just test it?
<bnagy> use irb
jasonkuhrt has joined #ruby
<horrror> 110110 / 2
banseljaj has joined #ruby
<whowantstolivefo> yes good idea irb is better :)
<_7894> 55055
lggr has quit [Ping timeout: 240 seconds]
icooba has quit [Quit: Textual IRC Client: www.textualapp.com]
<whowantstolivefo> 55055 is true answer in irb, again thank you
<nyuszika7h> hi, how can I handle ctrl-c?
Raimiss has joined #ruby
<_7894> Platform?
<_7894> Ah You want interrupt
<nyuszika7h> Linux cadoth 3.5.2-x86_64-linode26 #1 SMP Wed Aug 15 14:31:07 EDT 2012 x86_64 GNU/Linux
<bnagy> nyuszika7h: trap("INT") { #do stuff }
<nyuszika7h> yea, SIGINT
<nyuszika7h> thanks
<_7894> That's platform agnostic, yes, bnagy
<nyuszika7h> any idea why http://paste.debian.net/193897/ just hangs if I enter nothing for the port?
zz_chrismcg is now known as chrismcg
chussenot has joined #ruby
JusticeXC has quit [Quit: Leaving]
jasonkuhrt has quit [Ping timeout: 245 seconds]
<bnagy> I dunno if that's the logic you want for assigning the port
matrixise has quit [Ping timeout: 240 seconds]
<bnagy> cause an empty string is ruby truthy
<nyuszika7h> oh, it is?
<bnagy> may not be the issue, but it's a bug for sure
lggr has joined #ruby
<canton7> 'or' is for flow control. So (ports = gets.chomp) or 6667
<bnagy> you should probably test against empty? instead
<canton7> so if gets.chomp returns false, ports gets assigned to that falsy value, then the whole expression returns 6667 (but port doesn't get re-assigned)
daniel_- has quit [Ping timeout: 255 seconds]
<bnagy> I didn't think gets.chomp _could_ return false
<canton7> ^^ and that's a very true point
matrixise has joined #ruby
<nyuszika7h> also, is there a way to make puts use \r\n?
<nyuszika7h> for a socket
<canton7> port = gets.chomp; port = 6667 if port.empty?
<nyuszika7h> or do I have to print "text\r\n"
paolooo has joined #ruby
Raimiss has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
<bnagy> nyuszika7h: ugh... I would probably do it manually
<bnagy> but I would have to read docs to see if it's even possible
chussenot has quit [Read error: Connection reset by peer]
<nyuszika7h> okay
gmci has quit [Quit: Computer has gone to sleep.]
<bnagy> only time puts uses \r\n that I know is windows when you don't use the 'b' flag
<bnagy> if you do it manually it's clearer what's going on
gmci has joined #ruby
<nyuszika7h> yep, I'll do that
<nyuszika7h> though I don't see exactly *why* does the IRC standard have to use \r\n :P
<bnagy> ancient telnet formatting I guess
<nyuszika7h> some ircds support just \n (like ircd-seven which freenode runs), but it's best to be RFC-compliant
monkegjinni has joined #ruby
xpen has joined #ruby
Criztian has joined #ruby
<nyuszika7h> okay
<canton7> lines 12-14 can be replaced by 'port = 6667 if port.empty?'
<nyuszika7h> oh, thanks
<bnagy> but one way you';; get a string and the other you'll get a Fixnum
<canton7> also I'm not sure whether TCPSocket.new needs a Fixnum... that ^^
lggr has quit [Ping timeout: 246 seconds]
<bnagy> if you use Integer( ... ) it will try and convert it for you
<nyuszika7h> ok, thanks
<bnagy> TCPSocket.new host, Integer( port )
<bnagy> or something
duracrisis has quit [Changing host]
duracrisis has joined #ruby
duracrisis_ has joined #ruby
duracrisis_ has quit [Changing host]
justinmcp has quit [Remote host closed the connection]
<bnagy> that will raise if it can't covert it, like if they put 'aardvark' for port
luckyruby has quit [Remote host closed the connection]
<nyuszika7h> any idea on the IOError thing?
<nyuszika7h> oh fail
fantazo has quit [Remote host closed the connection]
<nyuszika7h> hmm
ken_barber has joined #ruby
d3vic3 has quit [Quit: leaving]
lggr has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
hakunin has quit [Remote host closed the connection]
xpen has quit [Ping timeout: 245 seconds]
ken_barber has joined #ruby
<bnagy> probably means your socket got closed on you
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
chussenot has joined #ruby
chimay has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
sagax has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
Iszak has joined #ruby
duracrisis has quit [Disconnected by services]
chussenot has quit [Remote host closed the connection]
chussenot has joined #ruby
duracrisis has joined #ruby
duracrisis has quit [Disconnected by services]
Forevernade has joined #ruby
duracrisis has joined #ruby
ken_barber has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<nyuszika7h> how can I get all items from the 1st item to the end, joined as a string with space as delimiter from an array?
<nyuszika7h> err
<nyuszika7h> I mean 2nd
<nyuszika7h> index 1, that's the 2nd item
<bnagy> check ruby-doc.org
<nyuszika7h> ok
lggr has joined #ruby
<bnagy> basically you need [] and join
<nyuszika7h> yea it's helpful, I just forget to check there sometimes :P
<bnagy> but you should definitely know Array and Enumerable almost by heart
JusticeXC has joined #ruby
<JusticeXC> I've submitted the assignment, but still curious how you would have done it
<nyuszika7h> I'm reading the Array doc now, and I found a neat thing:
<nyuszika7h> [ 1, 1, 3, 5 ] & [ 1, 2, 3 ] #=> [ 1, 3 ]
<JusticeXC> bnagy, are you here still
<bnagy> JusticeXC: come back tomorrow, I'll tell ya :)
<JusticeXC> I've already sent it in
<JusticeXC> I can show you if you are that skeptical
<bnagy> nyuszika7h: yeah & and - are cool
<bnagy> sometimes I wish that - didn't remove all matching elems though :/
<bnagy> some guy was asking about how you would get all _not_ unique items in a list the other day
<JusticeXC> bnagy, I used >>> total_points = max(total_points, 0)
<JusticeXC> what would you have done
<bnagy> and it was really torturous
<bnagy> JusticeXC: (p + abs(p)) / 2
areil_ has joined #ruby
<Hanmac> JusticeXC, [total_points, 0].max
PapaSierra has joined #ruby
<JusticeXC> so let me run it through my head here
areil_ has quit [Client Quit]
<JusticeXC> hm yea
<Iszak> what is the recommended way to install ruby 1.9.3 on ubuntu 12.04? I know I can use rvm, however I'm only going to run 1.9.3. Ideally I don't want to compile it, so maybe a PPA? Any recommendations?
<JusticeXC> see it's simple in retrospect
areil has quit [Ping timeout: 245 seconds]
<JusticeXC> thanks for being difficult
<bnagy> Iszak: personally I recommend rbenv
<bnagy> and NOT installing as root
<Hanmac> iszak: install the ruby1.9.1-full and than use "update-alternatives --config ruby","update-alternatives --config gem"
<bnagy> yeah, or you can be a nutcase like Hanmac :)
<Iszak> hmm, apparently it comes with 1.9.3 now anyway =x
<Iszak> should have cached apt before I asked.
<bnagy> JusticeXC: no worries - I told you someone would crack because they can't resist showing off
<JusticeXC> ?
<JusticeXC> i did it myself
ken_barber has joined #ruby
<nyuszika7h> my bot works :D
<bnagy> uh huh
<nyuszika7h> it connected and sent NICK/USER and stuff
<nyuszika7h> now to test if the ping-pong works!
lggr has quit [Ping timeout: 260 seconds]
ken_barber has quit [Read error: Connection reset by peer]
<PapaSierra> i'm using chef, which is written in ruby. i'm getting this error "FATAL: NoMethodError: undefined method `[]' for nil:NilClass". how would i start tracking that down?
<JusticeXC> don't care if you don't believe me
<JusticeXC> just know not everybody has a complex
<PapaSierra> (i.e. it's not giving a stacktrace of a line number)
<bnagy> tbh using max is a lot nicer than mine
<JusticeXC> and you don't have to have a pseudo philosophic know it all attitude
<JusticeXC> "trying to teach u stuff"
<JusticeXC> but anyway i digress
<JusticeXC> good night
JusticeXC has quit [Quit: Leaving]
mucker has quit [Ping timeout: 245 seconds]
hbpoison has quit [Ping timeout: 244 seconds]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has joined #ruby
<matti> Ohai
<bnagy> morning matti
<matti> Hi bnagy, sup?
<bnagy> nm, friday beer o clock
<bnagy> just did a week's work to be able to get one line of code
<matti> ;]
margle has quit [Quit: Computer has gone to sleep.]
<Joel_re> PapaSierra: you might want to ask the chef guys
ken_barber has joined #ruby
arietis has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 245 seconds]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
resure has joined #ruby
resure has joined #ruby
resure has quit [Changing host]
<PapaSierra> Joel_re yup. i'm busy tracking the error, and yeah it'll be a chef thing. thanks
Hanmac has quit [Remote host closed the connection]
margle has joined #ruby
frogprince_mac has quit [Quit: Leaving...]
lggr has joined #ruby
areil has joined #ruby
paolooo has quit [Quit: Page closed]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
josh^ has quit [Ping timeout: 245 seconds]
PapaSierra2 has joined #ruby
PapaSierra has quit [Ping timeout: 245 seconds]
gani has quit [Ping timeout: 255 seconds]
gairola has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 252 seconds]
josh^ has joined #ruby
chendo_ has quit [Ping timeout: 245 seconds]
jasonkuhrt has joined #ruby
lggr has joined #ruby
cantonic_ has joined #ruby
chendo_ has joined #ruby
seoaqua has quit [Ping timeout: 248 seconds]
cantonic has quit [Ping timeout: 248 seconds]
cantonic_ is now known as cantonic
jasonkuhrt has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 248 seconds]
josh_ has joined #ruby
icole has joined #ruby
josh_ has quit [Client Quit]
bobbbo has quit [Quit: bobbbo]
frogprince_mac has joined #ruby
PapaSierra2 has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
jimeh2 has joined #ruby
icole has quit [Ping timeout: 248 seconds]
jimeh has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
jimeh3 has joined #ruby
resure has quit [Quit: Leaving]
ken_barber has quit [Read error: Connection reset by peer]
thunderstrike has joined #ruby
chendo_ has quit [Ping timeout: 255 seconds]
gmci has quit [Quit: Computer has gone to sleep.]
gmci has joined #ruby
jimeh2 has quit [Ping timeout: 255 seconds]
chendo_ has joined #ruby
PapaSierra has joined #ruby
vlad_starkov has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
frogprince_mac has quit [Ping timeout: 255 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
justinmcp has joined #ruby
daniel_- has joined #ruby
chussenot has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
hbpoison has joined #ruby
bsilwal has joined #ruby
frogprince_mac has joined #ruby
<bsilwal> in ARGV.first what does first signify ?
alektos has joined #ruby
qos has quit [Quit: Linkinus - http://linkinus.com]
<bnagy> bsilwal: ...
awestroke has quit [Remote host closed the connection]
<bnagy> guess
<bnagy> go on...
<bsilwal> first argument?
ken_barber has joined #ruby
<bnagy> \o/
alektos has left #ruby [#ruby]
<bnagy> GOLD STAR
<bsilwal> if I dont keep first I can still get the argument
ken_barber has quit [Read error: Connection reset by peer]
chussenot has joined #ruby
<bnagy> well you can do everything with ARGV that you can do with any array
<nyuszika7h> are there any good yaml parsers for ruby?
hbpoison has quit [Ping timeout: 240 seconds]
<bnagy> nyuszika7h: there are tons, dunno about 'good' or not
<bnagy> I just use require 'yaml'
<bnagy> like... how fast do you need that to be? :P
<nyuszika7h> is that in ruby itself?
<nyuszika7h> it's for parsing a few options like nick, user, channels, password for an irc bot
<nyuszika7h> * I need it for
etehtsea has joined #ruby
<bsilwal> whats difference between STDIN.gets and gets alone ?
lggr has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
<gogiel> bsilwal: no difference in that case
horrror has quit [Quit: horrror]
ken_barber has joined #ruby
<JonnieCache> the normal yaml lib is good enough unless you need to parse megabytes of yaml
ken_barber has quit [Read error: Connection reset by peer]
<nyuszika7h> ok
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
lggr has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
zommi has joined #ruby
slainer68 has quit [Remote host closed the connection]
ando has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
vladyn_ has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
vladyn_ has quit [Client Quit]
ken_barber has joined #ruby
<matti> :)
ken_barber has quit [Read error: Connection reset by peer]
vladyn_ has joined #ruby
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
<matti> Hi Takehiro
<Takehiro> hi :o matti
lggr has joined #ruby
<Takehiro> whats up :D
<matti> All good :)
<matti> Writing C and Ruby for fun.
ken_barber has joined #ruby
<matti> Love the curly braces ']
<Takehiro> :D
duracrisis_ has quit [Ping timeout: 255 seconds]
ken_barber has quit [Read error: Connection reset by peer]
<clocKwize> Company I'm working at just hired a new c++ guy
ken_barber has joined #ruby
<matti> Hi clocKwize
<matti> C++?
<clocKwize> Have never actually met one in the flesh, been working in dev companies for past 7 years..
ken_barber has quit [Read error: Connection reset by peer]
<clocKwize> hey :)
bobbbo has joined #ruby
chussenot has quit [Quit: chussenot]
Mon_Ouie has joined #ruby
haxrbyte has joined #ruby
<clocKwize> working at AOL at the moment
<matti> Ah.
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
k610 has joined #ruby
<k610> i have defined amethod in a : module DB
<matti> I love Ruby's C API.
<matti> Feels almost like writing Ruby
<matti> So awesome.
<matti> Python's C API is so much pain and gore.
<k610> in some code i see i have to : DB::amethod
<k610> while in another amethod sufice
<matti> Comparing.
lggr has quit [Ping timeout: 245 seconds]
TomJ has quit [Quit: TomJ]
saschagehlich has joined #ruby
<k610> why is it so ?
SleepN0T has joined #ruby
<clocKwize> matti, I've only played with it once, it seems pretty nice, but its still C :) also there isn't a huge amount of (accurate/up to date) documentation regarding the C api, I ended up scanning the headers and stuff
<matti> clocKwize: I am reading Ruby's source to learn.
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<clocKwize> k610, if the code you are writing is inside an object that includes the module DB, it will be pulled in to that class, so can be accessed directly
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
haxrbyte_ has joined #ruby
lggr has joined #ruby
ando has quit [Remote host closed the connection]
ando has joined #ruby
haxrbyte has quit [Ping timeout: 260 seconds]
ken_barber has joined #ruby
jasonkuhrt has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 244 seconds]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
cjs226 has joined #ruby
lggr has joined #ruby
slainer68 has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lkba has joined #ruby
yshh has quit [Remote host closed the connection]
<nyuszika7h> is there something like stty +echo for ruby?
<nyuszika7h> basically, I want to read input from stdin without it being echoed
<nyuszika7h> I mean, -echo
mars__ has quit [Quit: Leaving]
ken_barber has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.8]
ken_barber has quit [Read error: Connection reset by peer]
vladyn_ has quit [Quit: vladyn_]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Remote host closed the connection]
lggr has joined #ruby
slainer68 has quit [Ping timeout: 260 seconds]
jasonkuhrt has quit [Quit: Leaving...]
colinbm has quit [Quit: colinbm]
mohits has quit [Ping timeout: 245 seconds]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<k610> clocKwize: thx
horrror has joined #ruby
jasonkuhrt has joined #ruby
Squarepy has joined #ruby
<ij> Has anyone read "Metaprogramming Ruby"? Is it worth the read?
lggr has quit [Ping timeout: 252 seconds]
TomJ has joined #ruby
TomJ has joined #ruby
TomJ has quit [Changing host]
* Hanmac looks at this imaginary books and find: "the Meta-Book of Metaprogamming"
hbpoison has joined #ruby
colinbm has joined #ruby
<horrror> is there a way to parse text (1000words) and get the topic that it is about?
mucker has joined #ruby
<horrror> I guess it relates to NLP but I am not sure how to fetch the subject of the piece. or how their rank works
<bnagy> horrror: srsly, do some ML / NLP courses
<bnagy> they're free online
<bnagy> topic searching is _hard_
<bnagy> you'll probably find you need to learn some Scheme / Java :S
lggr has joined #ruby
vlad_starkov has joined #ruby
<horrror> bnagy: i will fetch the keywords of a certain string and then cross it with wikipedia to define topics
robertotauille has joined #ruby
<horrror> the question is how to find the really KEY words of each string
hbpoison has quit [Ping timeout: 240 seconds]
<bnagy> yeah it is
<bnagy> even assuming your basic approach were sound
awestroke has joined #ruby
cjs226 has quit []
<bnagy> everything is about more than one topic, and this is honestly a complicated area
<awestroke> hello. I'm trying to create an unique identifier for a network node, and I figure I should use hostname + listeningport. I need it as a number though, and I want to avoid just hashing it. Is there a way to convert a string to a number?
<bnagy> awestroke: uuidgen is cheap
<bnagy> but the only way to get well distributed numbers out of strings is with a hash of some kind
<bnagy> murmur and friends are fast
<awestroke> bnagy: It doesn't need to be well distributed, just unique.
<awestroke> Also, it needs to work on vanilla 1.8.7
<awestroke> without gems
jasonkuhrt has quit [Quit: Leaving...]
<bnagy> those are not orthogonal requirements
<bnagy> if it's unix, srsly just use uuidgen
ken_barber has joined #ruby
<awestroke> isn't uuidgen a gem?
ken_barber has quit [Read error: Connection reset by peer]
<bnagy> no it's a command
<bnagy> should be there on almost all *nix
<awestroke> oh sorry now I get it
<awestroke> thank you
lggr has quit [Ping timeout: 260 seconds]
<bnagy> np
<bnagy> time for beerz and pool
<awestroke> how sure can I be that there will be no collisions with uuidgen?
<nyuszika7h> how can I check if a string is in an array?
<bnagy> because it's a universally unique id :)
<bnagy> it is unique in time and space
<awestroke> nyuszika7h: arr.include? str
<nyuszika7h> thanks
<bnagy> nyuszika7h: include?
<awestroke> bnagy: thank you
lggr has joined #ruby
<bnagy> you can read the manpage if you want deatils
<bnagy> but it's like lots of random plys macaddr plus timestamp etc
TomJ has quit [Quit: TomJ]
<awestroke> bnagy: it is not a number, though
aces1up has quit [Remote host closed the connection]
aces1up has joined #ruby
dpk has joined #ruby
ken_barber1 has joined #ruby
ken_barber1 has quit [Read error: Connection reset by peer]
icooba has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
<awestroke> Solved it: `uuidgen`.strip.gsub("-", "").hex
<awestroke> bnagy: thanks!
_love_color_text has joined #ruby
horrror has quit [Quit: horrror]
jamjam has joined #ruby
<k610> can i share a sqlite3 db connection in a module for it's methods : @@db = SQLite3::Database.new( "test.db" )
_love_color_text has quit [Client Quit]
keyvan has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
Criztian has quit [Remote host closed the connection]
lggr has joined #ruby
<JonnieCache> OH MY DAYS NEW RED DWARF IN LESS THAN A WEEK!
<awestroke> bnagy: fantastic. uuid does not exist on the target platform
<awestroke> uuidgen*
Takehiro has quit [Remote host closed the connection]
<JonnieCache> awestroke: you cannot be sure that there are no collisions, but they are astronomically unlikely so theres no need to worry about them
horrror has joined #ruby
<JonnieCache> your hair is many orders of mangitude more likely to set itself on fire than uuids are to collide, and i assume you dont worry about that
horrror has quit [Client Quit]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 246 seconds]
Squarepy has quit [Changing host]
Squarepy has joined #ruby
bluenemo has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
mklappstuhl has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
Raimiss has joined #ruby
pskosinski has joined #ruby
lggr has joined #ruby
frogprince_mac has quit [Quit: Leaving...]
F1skr has joined #ruby
<awestroke> JonnieCache: that is reassuring :)
larissa has joined #ruby
Raimiss has quit [Ping timeout: 245 seconds]
jeffreybaird has joined #ruby
bartj3 has quit []
Spooner has joined #ruby
<awestroke> I am running a program with backticks, but it outputs an error to stdout/stderr if the command is not found, how can I avoid it?
<JonnieCache> `command > /dev/null`
<ij> `command 2> /dev/null`
<JonnieCache> yeah thats better
<JonnieCache> its a bash thing, see http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html or many other pages
jeffreybaird has quit [Client Quit]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 248 seconds]
ando has quit [Ping timeout: 245 seconds]
BrokenCo1 has quit [Quit: leaving]
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
jtdowney has joined #ruby
lggr has joined #ruby
frogstarr78 has quit [Ping timeout: 246 seconds]
BrokenCog has left #ruby [#ruby]
<Spooner> On Windows, it is 2> NUL for the sake of being different ;)
hackeron has joined #ruby
chussenot has joined #ruby
und3f has joined #ruby
ken_barber has joined #ruby
icooba has quit [Quit: Textual IRC Client: www.textualapp.com]
ken_barber has quit [Read error: Connection reset by peer]
mark_locklear has joined #ruby
mklappstuhl has quit [Quit: Leaving]
lggr has quit [Ping timeout: 252 seconds]
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
ken_barber has joined #ruby
tvw has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
bradleyprice has quit [Remote host closed the connection]
<k610> i can successfully load 'db.rb' but require 'db' fails
<k610> where should such such a file be located for easy include from multiple files ?
F1skr has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
cibs has joined #ruby
<Hanmac> k610 what ruby version?
ABK has quit [Read error: Connection reset by peer]
<k610> Hanmac: 1.9.3p194
<Hanmac> use require_relative
margle has quit [Quit: Computer has gone to sleep.]
<k610> Hanmac: gg
horrror has joined #ruby
deadghost has quit [Ping timeout: 244 seconds]
wobr has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<theRoUS> what's the canonical/receommended way of creating a tree for developing a new gem?
hbpoison has joined #ruby
frogprince_mac has joined #ruby
bsilwal has left #ruby [#ruby]
rippa has joined #ruby
icooba has joined #ruby
horrror has left #ruby [#ruby]
axl_ has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
<JonnieCache> theRoUS: `bundle gem` creates a nice gem skeleton
<JonnieCache> thats what i always use
awestroke has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 246 seconds]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
lggr has joined #ruby
yshh has joined #ruby
Takehiro_ has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
<ij> Oh, nice.
PapaSierra has quit [Ping timeout: 244 seconds]
jasonkuhrt has joined #ruby
ken_barber has joined #ruby
<nyuszika7h> could someone tell me what am I doing wrong here? http://pastie.org/4855426 http://pastie.org/4855431
ken_barber has quit [Read error: Connection reset by peer]
<nyuszika7h> loading the YAML file from irb works fine
lggr has quit [Ping timeout: 248 seconds]
jasonkuhrt has quit [Ping timeout: 244 seconds]
cjs226 has joined #ruby
uris has joined #ruby
slainer68 has joined #ruby
<shevy> the yaml file is correct
<shevy> the question is what your code is doing with that dataset
wobr has left #ruby [#ruby]
<nyuszika7h> it's trying to parse it
Raduwen has joined #ruby
<shevy> YAML.load_file() works fine on that file.
nwest has joined #ruby
tgraham has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
cakehero has joined #ruby
lggr has joined #ruby
ksergio has joined #ruby
Esa_1 has quit []
ksergio has quit [Client Quit]
PapaSierra has joined #ruby
arya_ has joined #ruby
Morkel has quit [Quit: Morkel]
ken_barber has joined #ruby
<nyuszika7h> how do you explain the error when I run it?
ephemerian has quit [Quit: Leaving.]
ken_barber has quit [Read error: Connection reset by peer]
<nyuszika7h> it appears if I try to do puts 'Config'; puts config # not even the 'Config' line appears on the screen
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
<shevy> I dont get an error
frogstarr78 has joined #ruby
arya_ has quit [Client Quit]
<shevy> YAML.load_file() on the file you pasted on http://pastie.org/4855431 works without an error
mmitchell has joined #ruby
jeshyr has joined #ruby
<shevy> so wherever the real error is, it is not in the yaml file and rather in that ruby code
lggr has quit [Ping timeout: 256 seconds]
zinjacoder has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
reisl has joined #ruby
<nyuszika7h> oh I found out
ken_barber has joined #ruby
<nyuszika7h> send() might be a built-in function
ken_barber has quit [Read error: Connection reset by peer]
Joel_re has quit [Ping timeout: 245 seconds]
larissa has quit [Read error: Connection reset by peer]
<nyuszika7h> and overriding it ended up being weird
<nyuszika7h> replacing it with send_msg everywhere worked
lggr has joined #ruby
iori has quit [Remote host closed the connection]
Joel_re has joined #ruby
fmcgeough has joined #ruby
AlbireoX has joined #ruby
rippa has quit [Ping timeout: 260 seconds]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
jeshyr has left #ruby [#ruby]
Spooner has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 246 seconds]
TomJ has joined #ruby
cantonic has quit [Quit: cantonic]
Axsuul has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
ken_barber has joined #ruby
und3f has quit [Ping timeout: 245 seconds]
ken_barber has quit [Read error: Connection reset by peer]
Targen has quit [Ping timeout: 244 seconds]
tvw has quit [Remote host closed the connection]
ken_barber has joined #ruby
kermes has joined #ruby
und3f has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
cakehero has quit [Quit: Computer has gone to sleep.]
josh^ has quit [Remote host closed the connection]
tommyvyo has joined #ruby
k610 has quit [Ping timeout: 246 seconds]
cantonic has joined #ruby
baphled has joined #ruby
schickung has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
jtdowney has quit [Remote host closed the connection]
linoj has joined #ruby
joeycarmello has joined #ruby
justinmcp has quit [Remote host closed the connection]
binaryplease has joined #ruby
joofsh has joined #ruby
mohits has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
pu22l3r has joined #ruby
k610 has joined #ruby
lggr has joined #ruby
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
jeffreybaird has joined #ruby
<shevy> yeah, all objects in ruby can respond to .send()
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
fredjean has quit [Quit: Computer has gone to sleep.]
Raimiss has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
cjs226 has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 245 seconds]
paolooo has joined #ruby
yshh has quit [Remote host closed the connection]
17SABVBN6 has joined #ruby
ken_barber has joined #ruby
GoGoGarrett has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
yshh has joined #ruby
ken_barber has quit [Read error: Connection reset by peer]
pskosinski has quit [Remote host closed the connection]
Raimiss has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 248 seconds]
joeycarmello has quit [Remote host closed the connection]
lggr has joined #ruby
<ij> nil.send *[:send]*30000
<ij> SystemStackError: stack level too deep
chimay has quit [Ping timeout: 245 seconds]
futilegames has quit [Quit: futilegames]
yshh has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
<shevy> ij why are you not nicer to ruby :(
ken_barber has quit [Read error: Connection reset by peer]
daniel_- has joined #ruby
lolmaus has quit []
kitofr has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 255 seconds]
17SABVBN6 has quit [Quit: 17SABVBN6]
geekbri has joined #ruby
jasonkuhrt has joined #ruby
wallerdev has joined #ruby
joeycarmello has joined #ruby
<heftig> ij: not for me :p
<ij> Of course, your stack is always lonegr.
lggr has joined #ruby
<heftig> ij: interestingly, with parentheses it goes further
cjs226 has joined #ruby
<heftig> er, never mind
<heftig> just me being stupid
jasonkuhrt has quit [Ping timeout: 260 seconds]
futilegames has joined #ruby
jrist-afk is now known as jrist
<heftig> >> nil.send(*([:send]*131020))
timmow has quit [Quit: is having a nap]
<ij> >> 'does it even work?'
maesbn has quit [Remote host closed the connection]
JonnieCache has quit [Ping timeout: 248 seconds]
lggr has quit [Ping timeout: 245 seconds]
qos has joined #ruby
kpshek has joined #ruby
lggr has joined #ruby
Guest64548 has joined #ruby
thillux has quit [Remote host closed the connection]
virtualentity has joined #ruby
asteve has joined #ruby
bbttxu has joined #ruby
phantasm66 has joined #ruby
carloslopes has joined #ruby
JustinCampbell has joined #ruby
jtdowney has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
jrist is now known as dd
JonnieCache has joined #ruby
dd is now known as jrist
lggr has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
pskosinski has joined #ruby
krzkrzkrz has joined #ruby
jasonkuhrt has joined #ruby
cascalheira has joined #ruby
allanm has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
d3vic3 has joined #ruby
stopbit has joined #ruby
average_drifter has joined #ruby
DeviousDodo has joined #ruby
lggr has joined #ruby
indian has quit [Ping timeout: 260 seconds]
rabidpraxis has joined #ruby
baphled has quit [Ping timeout: 240 seconds]
Goles has joined #ruby
baphled has joined #ruby
<Xeago> anyone with bashfu/etc willing to make a vagrant for al2o3cr?
<Xeago> so we cna have the bot back
Bosma has joined #ruby
<Xeago> I don't have the skills for making it, however do have the capacity for hosting it
theRoUS has quit [Ping timeout: 246 seconds]
Criztian has joined #ruby
<matti> Xeago: FizzBuzz 0.0.2 related.
<matti> s/related/released/
asteve has quit [Changing host]
asteve has joined #ruby
<matti> LOL
ken_barber has joined #ruby
jhchabran has quit [Remote host closed the connection]
<Xeago> 0.0.2
<Xeago> to what versioning system?
<Xeago> semver.org?
lggr has quit [Ping timeout: 245 seconds]
bradleyprice has joined #ruby
baphled has quit [Ping timeout: 245 seconds]
F1skr has joined #ruby
lggr has joined #ruby
binaryplease has quit [Quit: WeeChat 0.3.8]
axl_ has quit [Quit: axl_]
frogprince_mac has quit [Quit: Leaving...]
fredjean has joined #ruby
zigomir has quit [Quit: Leaving]
philcrissman has joined #ruby
carwin|away is now known as carwin
ananthakumaran has quit [Quit: Leaving.]
Raimiss has joined #ruby
allanm is now known as amacgregor
lggr has quit [Ping timeout: 255 seconds]
Criztian has quit [Remote host closed the connection]
botspot_87 has quit [Quit: Leaving]
hoelzro|away is now known as hoelzro
ken_barber has quit [Remote host closed the connection]
hbpoison has joined #ruby
Raimiss has quit [Ping timeout: 260 seconds]
daniel_- has quit [Ping timeout: 255 seconds]
mucker has quit [Ping timeout: 252 seconds]
elderflower has joined #ruby
lggr has joined #ruby
Hanmac has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
adambeynon has joined #ruby
Virunga has joined #ruby
arya_ has joined #ruby
joshman_ has joined #ruby
ffranz has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
dbck has joined #ruby
sspiff has quit [Remote host closed the connection]
dbck has quit [Client Quit]
sailias has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
xyzodiac has joined #ruby
tagrudev has quit [Quit: fuckin cold]
obryan has joined #ruby
_bart has joined #ruby
erichmenge has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
mucker has joined #ruby
moshee has quit [Ping timeout: 245 seconds]
moshee has joined #ruby
jenrzzz has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
yekta has joined #ruby
lggr has joined #ruby
chimay has joined #ruby
Criztian has joined #ruby
<shevy> Xeago, the bot is dead
<shevy> long live the bot!
<shevy> let's allow it to rest in peace... :)
Criztian has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
margle has joined #ruby
ph^ has joined #ruby
luckyruby has joined #ruby
peregrine81 has joined #ruby
Raimiss has joined #ruby
philcrissman has quit [Remote host closed the connection]
<nyuszika7h> how can I have escape sequences like \001 in regex?
schickung has quit [Quit: schickung]
nari has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
nateberkopec has joined #ruby
Spooner has joined #ruby
<nyuszika7h> j53
<nyuszika7h> oops
<hoelzro> nyuszika7h: \001 doesn't work?
<nyuszika7h> I'll test
yshh has joined #ruby
matrixise has quit [Ping timeout: 248 seconds]
quest88 has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
jhchabran has joined #ruby
<nyuszika7h> apparently not
<nyuszika7h> 100 if text =~ /^\001VERSION\001}$/
<nyuszika7h> 101 send_msg(s, "NOTICE #{target} :\001VERSION nrubybot v0.7\001")
<nyuszika7h> 102 end
roadt has joined #ruby
<nyuszika7h> oh that }
<nyuszika7h> fail
ph^ has quit [Remote host closed the connection]
lggr has joined #ruby
<hoelzro> nyuszika7h: it worked for me
Raimiss has quit [Ping timeout: 246 seconds]
<nyuszika7h> works if I remove that {
<nyuszika7h> * }
adambeynon has quit [Quit: Computer has gone to sleep.]
philcrissman has joined #ruby
erichmenge has quit [Quit: Be back later]
matrixise has joined #ruby
joofsh2 has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
luckyruby has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 245 seconds]
dmiller_ has joined #ruby
futilegames has quit [Ping timeout: 272 seconds]
ShiintoRyuu has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
flype has joined #ruby
<nyuszika7h> any idea why the exception is simply ignored here? http://pastie.org/4856049
flype has quit [Client Quit]
Joel_re has quit [Ping timeout: 245 seconds]
v0n has joined #ruby
Spooner has quit [Ping timeout: 260 seconds]
blazes816 has joined #ruby
ph^ has joined #ruby
tnk1 has quit [Ping timeout: 246 seconds]
swarley has joined #ruby
arya_ has quit []
adeponte has joined #ruby
lurraca has quit [Quit: This computer has gone to sleep]
dmiller_ has quit [Remote host closed the connection]
jgwong has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
Joel_re has joined #ruby
kn330 has joined #ruby
ph^ has quit [Remote host closed the connection]
luckyruby has joined #ruby
lggr has joined #ruby
tnk1 has joined #ruby
quest88 has quit [Quit: quest88]
ttt has quit [Remote host closed the connection]
TomJ has quit [Read error: Connection reset by peer]
Squarepy has quit [Read error: Connection reset by peer]
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
TomJ has quit [Read error: Connection reset by peer]
theRoUS has quit [Ping timeout: 260 seconds]
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
nari_ has joined #ruby
kn330 has quit [Read error: Connection reset by peer]
linoj has quit [Quit: linoj]
kn330 has joined #ruby
jjbohn has joined #ruby
<JonnieCache> WTF i type in "conservation of information" into google and the top article is some creationist shite
Takehiro_ has quit [Remote host closed the connection]
luckyruby has quit [Remote host closed the connection]
nari has quit [Ping timeout: 244 seconds]
<JonnieCache> i hate it when god botherers abuse concepts like entropy and realativity
<JonnieCache> if you know what kolmogorov complexity is then you have no business not believing in evolution
lggr has quit [Ping timeout: 255 seconds]
ph^ has joined #ruby
kn330 has quit [Read error: Connection reset by peer]
<swarley> LOL
ph^ has quit [Read error: Connection reset by peer]
<JonnieCache> even the ontological argument makes more sense than this
kn330 has joined #ruby
lggr has joined #ruby
ph^ has joined #ruby
ph^ has quit [Remote host closed the connection]
skaczor has joined #ruby
davidcelis has quit [Quit: K-Lined.]
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
bobbbo has quit [Quit: bobbbo]
ph^ has joined #ruby
k611 has joined #ruby
ph^ has quit [Remote host closed the connection]
ruby_noob has joined #ruby
ph^ has joined #ruby
ph^ has quit [Remote host closed the connection]
malcolmva has quit [Ping timeout: 244 seconds]
jasonkuhrt has quit [Quit: Linkinus - http://linkinus.com]
gani has joined #ruby
yekta has quit [Quit: yekta]
guest__ has joined #ruby
k610 has quit [Ping timeout: 246 seconds]
kn330 has quit [Read error: Connection reset by peer]
ph^ has joined #ruby
kn330 has joined #ruby
ph^ has quit [Remote host closed the connection]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
whitenoise has joined #ruby
ph^ has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
ph^ has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
und3f has quit [Quit: Leaving.]
ph^ has joined #ruby
ph^ has quit [Read error: Connection reset by peer]
ph^ has joined #ruby
ph^ has quit [Read error: Connection reset by peer]
yshh has quit [Remote host closed the connection]
hbpoison has joined #ruby
TomJ has quit [Read error: Connection reset by peer]
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
kn330 has quit [Ping timeout: 248 seconds]
Kruppe has joined #ruby
jeff_sebring has joined #ruby
lggr has joined #ruby
duracrisis has quit [Changing host]
duracrisis has joined #ruby
malcolmva has joined #ruby
yshh has joined #ruby
hbpoison has quit [Ping timeout: 246 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
yshh has quit [Remote host closed the connection]
ltsstar has joined #ruby
triptec has quit [Ping timeout: 252 seconds]
Spooner has joined #ruby
ph^ has joined #ruby
ipoval has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
ph^ has quit [Remote host closed the connection]
Takehiro has joined #ruby
baroquebobcat has joined #ruby
beneggett has joined #ruby
ph^ has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
ph^ has quit [Remote host closed the connection]
mistergibson has joined #ruby
voodoofish430 has joined #ruby
dmiller_ has joined #ruby
ph^ has joined #ruby
kn330 has joined #ruby
ipoval has left #ruby [#ruby]
lggr has joined #ruby
cburyta has joined #ruby
_mak has quit [Quit: Ex-Chat]
Iszak has quit [Quit: User has gone to sleep.]
aganov has quit [Remote host closed the connection]
timmow has joined #ruby
hbpoison has joined #ruby
falieson has quit [Quit: falieson]
linoj has joined #ruby
k611 has quit [Ping timeout: 245 seconds]
stim371 has joined #ruby
matrixise has quit [Ping timeout: 260 seconds]
mengu has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
tommylommykins is now known as jvkTommy
lggr has joined #ruby
chrishunt has quit [Ping timeout: 255 seconds]
jgrevich has joined #ruby
carloslopes has quit [Quit: Leaving.]
br4ndon has joined #ruby
jtdowney has quit [Remote host closed the connection]
aantix has joined #ruby
yoklov has joined #ruby
noxoc1 has joined #ruby
deadghost has joined #ruby
iamlacroix has joined #ruby
hbpoison has quit [Remote host closed the connection]
iamlacroix has quit [Remote host closed the connection]
br4ndon has quit [Ping timeout: 256 seconds]
iamlacroix has joined #ruby
noxoc has quit [Ping timeout: 248 seconds]
gmci has quit [Ping timeout: 244 seconds]
lggr has quit [Ping timeout: 240 seconds]
brianpWins has quit [Quit: brianpWins]
ananthakumaran has joined #ruby
seoaqua has joined #ruby
swarley has quit [Ping timeout: 245 seconds]
Vainoharhainen has quit [Quit: Leaving...]
krzkrzkrz has quit [Quit: krzkrzkrz]
swarley has joined #ruby
CodeFriar has quit [Quit: Leaving...]
lggr has joined #ruby
vivmbbs has joined #ruby
vivmbbs has left #ruby ["Leaving"]
Dreamer3 has joined #ruby
davidcelis has joined #ruby
peregrine81 has quit [Quit: Goodbye.]
jimeh4 has joined #ruby
yoklov has quit [Quit: computer sleeping]
Raimiss has joined #ruby
elsifaka has quit [Quit: Veloma e!]
RegEchse has joined #ruby
jimeh3 has quit [Ping timeout: 255 seconds]
JonnieCache has quit [Ping timeout: 244 seconds]
berserkr has joined #ruby
deadghost has quit [Ping timeout: 252 seconds]
colinbm has quit [Quit: colinbm]
mucker has quit [Quit: leaving]
kn330 has quit [Ping timeout: 248 seconds]
mikepack has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
pkondzior has joined #ruby
msch has quit [Quit: Coyote finally caught me]
yakitori has joined #ruby
msch has joined #ruby
duracrisis is now known as cypher
kn330 has joined #ruby
Raimiss has quit [Ping timeout: 252 seconds]
Eldariof18-ru has quit []
h4mz1d has joined #ruby
tk__ has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
<Sou|cutter> I'm writing a gem (let's call it 'soul') that has a dependency whose require does not match the gem name. In bundler you can represent this as "gem 'foo', :require => 'bar'" - is there a way to represent this in 'soul's gemspec so that it is properly loaded when projects use the 'soul' gem?
dhruvasagar has joined #ruby
headius has joined #ruby
<Muz> In the gemspec, spec.add_dependency 'gemname'; in the root rb file in lib/ for your gem, add 'require "blah"'
timmow has quit [Quit: is having a nap]
Eplemosen has joined #ruby
<Muz> The gemspec'll cause the other gem to get downloaded and installed as a dependancy when they install your gem. The require line will then include it when they include your gem's library.
<Sou|cutter> Muz: *nod* that makes sense. I guess I was struggling to make it more conformant to bundler or something when that really isn't necessary
h4mz1d has quit [Read error: Connection reset by peer]
<Sou|cutter> thanks
beneggett has quit [Quit: Computer has gone to sleep.]
Criztian has joined #ruby
bluOxigen has joined #ruby
internet_user has joined #ruby
yshh has joined #ruby
cypher is now known as duracrisis
hadees has quit [Quit: hadees]
nari_ has quit [Ping timeout: 248 seconds]
areil has quit [Remote host closed the connection]
chrismcg is now known as zz_chrismcg
uris has quit [Ping timeout: 252 seconds]
Targen has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
mars__ has joined #ruby
beneggett has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
okapi has quit [Quit: Leaving]
dakine has joined #ruby
ttt has joined #ruby
stan_man_can has quit [Quit: stan_man_can]
lggr has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
mohits has quit [Read error: Connection reset by peer]
alvaro_o has joined #ruby
cakehero has joined #ruby
dmiller_ has quit [Remote host closed the connection]
erichmenge has joined #ruby
saschagehlich_ has joined #ruby
ttt has quit [Ping timeout: 240 seconds]
PapaSierra has quit [Ping timeout: 245 seconds]
slicslak has joined #ruby
PapaSierra has joined #ruby
deadghost has joined #ruby
saschagehlich_ is now known as saschagehlich
erichmenge has quit [Client Quit]
ZubKonst has quit [Read error: Connection reset by peer]
bradhe has quit [Remote host closed the connection]
erichmenge has joined #ruby
ZubKonst has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
h4mz1d has joined #ruby
maletor has joined #ruby
maek has left #ruby [#ruby]
ananthakumaran has quit [Ping timeout: 246 seconds]
axl_ has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
axl_ has quit [Client Quit]
codefyre has joined #ruby
axl_ has joined #ruby
jbw has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby
jbw has joined #ruby
recycle has joined #ruby
mark_locklear has quit [Quit: Leaving]
lggr has joined #ruby
recycle has quit [Remote host closed the connection]
mistergibson has quit [Remote host closed the connection]
hadees has joined #ruby
jenrzzz has joined #ruby
brianpWins has joined #ruby
ryanlecompte has joined #ruby
pfaff has quit [Ping timeout: 268 seconds]
Mon_Ouie has joined #ruby
Synthead has joined #ruby
pygmael has quit [Quit: pygmael]
Raimiss has joined #ruby
_bart has quit [Quit: _bart]
PapaSierra has quit [Ping timeout: 260 seconds]
jtdowney has joined #ruby
saschagehlich has quit [Ping timeout: 255 seconds]
saschagehlich has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
chrishunt has joined #ruby
ananthakumaran has joined #ruby
frogprince_mac has joined #ruby
pfaff has joined #ruby
lggr has joined #ruby
axl_ has quit [Quit: axl_]
Raimiss has quit [Ping timeout: 252 seconds]
bobbbo has joined #ruby
ruby_noob has quit [Quit: ruby_noob]
timonv has quit [Remote host closed the connection]
Spooner has quit [Ping timeout: 255 seconds]
<rabidpraxis> anyone else getting 500's from bundler, and gem install?
PapaSierra has joined #ruby
axl_ has joined #ruby
answer_42 has quit [Remote host closed the connection]
awarner has joined #ruby
nga4 has quit [Ping timeout: 260 seconds]
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
carloslopes has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
h4mz1d has quit [Ping timeout: 245 seconds]
answer_42 has joined #ruby
pfaff has quit [Ping timeout: 245 seconds]
cbuxton has joined #ruby
Rydefalk_ has joined #ruby
Rydefalk has quit [Read error: Connection reset by peer]
twoism has joined #ruby
lggr has joined #ruby
twoism has quit [Remote host closed the connection]
bradhe has joined #ruby
msch has quit [Remote host closed the connection]
twoism has joined #ruby
bricker has joined #ruby
msch has joined #ruby
twoism is now known as Guest68031
bobthebuilder has joined #ruby
pfaff has joined #ruby
stepnem has quit [Ping timeout: 252 seconds]
havenn has joined #ruby
bluenemo has quit [Remote host closed the connection]
awarner has quit [Remote host closed the connection]
beit has joined #ruby
arturaz has quit [Ping timeout: 245 seconds]
<nyuszika7h> how can I lost methods etc. of an object?
<nyuszika7h> * list
<nyuszika7h> like Python's dir()
<Hanmac> object.methods
lggr has quit [Ping timeout: 256 seconds]
hoelzro is now known as hoelzro|away
stepnem has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
Fretta has joined #ruby
lggr has joined #ruby
Agis__ has joined #ruby
slainer68 has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
apok has joined #ruby
JohnBat26 has quit [Ping timeout: 246 seconds]
timonv has joined #ruby
chrisja has joined #ruby
uris has joined #ruby
jonathanwallace has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
timonv has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
Targen has quit [Ping timeout: 260 seconds]
mikepack_ has joined #ruby
timonv has joined #ruby
DebianUT has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
d3vic3 has quit [Quit: leaving]
Mon_Ouie has quit [Ping timeout: 245 seconds]
swarley has quit [Ping timeout: 245 seconds]
seoaqua has quit [Ping timeout: 248 seconds]
tyfighter has joined #ruby
shevy has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
bradhe has quit [Remote host closed the connection]
jrist is now known as jrist-mtg
peter1 has joined #ruby
Raimiss has joined #ruby
bobthebuilder has quit [Quit: WeeChat 0.3.8]
ruby_noob has joined #ruby
notVert has quit [Remote host closed the connection]
Guest68031 has quit [Ping timeout: 246 seconds]
ruby_noob has quit [Client Quit]
Criztian_ has joined #ruby
dnstbr has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
Xeago has quit [Remote host closed the connection]
Criztian_ has quit [Read error: Connection reset by peer]
apok has quit [Remote host closed the connection]
pfaff has quit [Ping timeout: 268 seconds]
Criztian_ has joined #ruby
apok has joined #ruby
vderyagin has joined #ruby
Criztian has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 246 seconds]
Raimiss has quit [Ping timeout: 256 seconds]
rakl has joined #ruby
mmitchell has quit [Remote host closed the connection]
Synthead has quit [Remote host closed the connection]
mmitchell has joined #ruby
lggr has joined #ruby
elderflower has quit [Ping timeout: 240 seconds]
br4ndon has joined #ruby
whitenoise has quit [Read error: Connection reset by peer]
chussenot has quit [Quit: chussenot]
pfaff has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
mmitchell has joined #ruby
mwilson` has quit [Excess Flood]
havenn has quit [Remote host closed the connection]
ncr100 has joined #ruby
sebastorama has joined #ruby
mwilson` has joined #ruby
aldodelgado has joined #ruby
shevy has joined #ruby
Synthead has joined #ruby
axl_ has quit [Quit: axl_]
sneakyness_wk has joined #ruby
duracris1s has joined #ruby
<davidcelis> also Class.instance_methods
DeviousDodo has quit [Quit: leaving]
jasonkuhrt has joined #ruby
duracris1s has left #ruby [#ruby]
lggr has quit [Ping timeout: 240 seconds]
TomJ has quit [Quit: TomJ]
bradhe has joined #ruby
elderflower has joined #ruby
Synthead has quit [Remote host closed the connection]
Z0idberg has joined #ruby
moshee has quit [Ping timeout: 245 seconds]
moshee has joined #ruby
arya_ has joined #ruby
deadghost has quit [Ping timeout: 245 seconds]
ncr100_ has joined #ruby
lggr has joined #ruby
ncr100 has quit [Ping timeout: 246 seconds]
PapaSierra2 has joined #ruby
Synthead has joined #ruby
axl_ has joined #ruby
axl_ has quit [Client Quit]
Targen has joined #ruby
slicslak has quit [Ping timeout: 252 seconds]
Spooner has joined #ruby
axl_ has joined #ruby
PapaSierra has quit [Ping timeout: 245 seconds]
axl_ has quit [Client Quit]
burgestrand has joined #ruby
pfaff has quit [Ping timeout: 245 seconds]
mmitchell has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
arya_ has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 260 seconds]
pfaff has joined #ruby
jeff_sebring has quit [Quit: Leaving]
mmitchell has joined #ruby
twoism has joined #ruby
lggr has joined #ruby
twoism is now known as Guest86844
sepp2k1 has joined #ruby
sjuxax has joined #ruby
roadt has quit [Ping timeout: 245 seconds]
sepp2k has quit [Ping timeout: 245 seconds]
scrogson has left #ruby [#ruby]
<sjuxax> Hi all. I have a "final summary" that I would like to print even if the program receives Ctrl+C. Right now I am doing this with a begin-rescue Interrupt, but in this model I have copied the summary into this rescue block and also immediately under it, which is reached if the program exits successfully. How can I make it so I only have to have this summary written one time?
jrist-mtg is now known as jrist
arya_ has joined #ruby
<sjuxax> I'm tempted to use GOTO but apparently Ruby doesn't allow that ;)
pfaff has quit [Ping timeout: 245 seconds]
<sjuxax> I don't want to break it into a function because then I either have to make all the variables it uses global, or I have to make them all parameters that must be passed in
havenn has joined #ruby
elico has joined #ruby
<sjuxax> Since this is only used in a single spot (when the program exits, successfully or not), I would like not to deal with that. So any suggestions would be helpful.
mikepack_ has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 255 seconds]
lkba has joined #ruby
codefyre has quit [Quit: Leaving]
<Hanmac> sjuxax look for begin ... ensure ... end
axl_ has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
bluOxigen has joined #ruby
nga4 has joined #ruby
pfaff has joined #ruby
<sjuxax> Hanmac: thanks, that does look like it'll work. :)
Raduwen has quit [Quit: Leaving...]
timonv has quit [Remote host closed the connection]
mikepack has joined #ruby
Takehiro has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
lggr has joined #ruby
bencaron has joined #ruby
mmitchell has joined #ruby
dnstbr has quit [Quit: Computer has gone to sleep.]
<DebianUT> sjuxax, I think there is an event in Ruby for that, I just don't remember withc one it is
PapaSierra2 has quit [Read error: Connection reset by peer]
Criztian_ has quit [Remote host closed the connection]
PapaSierra has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
arya_ has quit [Ping timeout: 244 seconds]
DrShoggoth has joined #ruby
<burgestrand> sjuxax: at_exit
<burgestrand> DebianUT: ^
yshh has quit [Remote host closed the connection]
F1skr has quit [Read error: Connection reset by peer]
<DebianUT> that one
verto|off is now known as verto
adeponte has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
CodeFriar has joined #ruby
<Guest64548> can you suggest me a ruby server program? not for rails, just for a simple application what runs in a browser
lggr has quit [Ping timeout: 260 seconds]
Guest64548 is now known as Jackneill
Jackneill has quit [Changing host]
Jackneill has joined #ruby
arya_ has joined #ruby
dpk has quit [Disconnected by services]
havenn has quit [Remote host closed the connection]
tk__ has quit [Quit: ばいばい]
davidpk has joined #ruby
<TTilus> Jackneill: care to elaborate?
mwillhite has joined #ruby
<bnagy> sjuxax: trap("INT") { # do stuff }
<mwillhite> how do I load up rack middleware in rails 3.2.8?
<Jackneill> im still googleing on
<Jackneill> ;p
<Jackneill> just asked..
<mwillhite> i read on stack overflow that I just had to place it in app/middleware
jonathan_ has joined #ruby
<mwillhite> but that doesn't seem to be doing it
<bnagy> mwillhite: try a rails chan
<TTilus> Jackneill: i did not quite understanstand your question
<mwillhite> right thanks
<bnagy> #ror or #rubyonrails
<bencaron> Jackneill: you do want a web application?
dnstbr has joined #ruby
jgwong has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
jonathanwallace has quit [Read error: Connection reset by peer]
<Jackneill> bencaron yes, but i dont want for it a complete dev framework like rails, i just want to run a single file
<Jackneill> so something like apache for ruby
<TTilus> Jackneill: sinatra maybe?
triptec has joined #ruby
<bencaron> Jackneill: take a look at sinatra?
<Jackneill> i will now
<bencaron> TTilus: ahaha, great mind thinks alike
<TTilus> \o/
<bencaron> sinatra is very nice for simple app
kn330 has quit [Ping timeout: 248 seconds]
<bencaron> I love it for simple API
sailias has quit [Quit: Leaving.]
<DebianUT> I use sinatra for a quite big application
<DebianUT> no problems till now
axl_ has quit [Quit: axl_]
pfaff has quit [Ping timeout: 245 seconds]
kn330 has joined #ruby
<Jackneill> thank you, looks like sinatra will be good for me :)
aantix has quit [Quit: aantix]
vlad_starkov has quit [Remote host closed the connection]
keyvan has quit [Remote host closed the connection]
zinjacoder has quit [Read error: Connection reset by peer]
skryking has joined #ruby
adeponte has quit [Remote host closed the connection]
pfaff has joined #ruby
Takehiro has joined #ruby
daniel_- has joined #ruby
josh_ has joined #ruby
<josh_> how do I print to the screen?
lggr has quit [Ping timeout: 260 seconds]
sdegutis has joined #ruby
sdegutis has quit [Remote host closed the connection]
<mwillhite> josh_: echo $variable
ianblenke1 has joined #ruby
F1skr has joined #ruby
sdegutis has joined #ruby
mars__ has quit [Quit: Leaving]
Raimiss has joined #ruby
<shevy> josh_ puts 'HELLO WORLD'
NoNMaDDeN has joined #ruby
chrishunt has quit [Ping timeout: 260 seconds]
glyytchy has joined #ruby
wpaulson has joined #ruby
tommyvyo_ has joined #ruby
adeponte has joined #ruby
jgwong has joined #ruby
<matti> shevy: :D
lggr has joined #ruby
<sdegutis> josh: YOU DONT. YOU JUST DONT.
<sdegutis> fin.
deadSnowman has quit [Quit: leaving]
<shevy> hehe
<shevy> josh_ say something
yakitori has quit [Ping timeout: 246 seconds]
davidpk is now known as dpk
pfaff has quit [Ping timeout: 245 seconds]
chimay has quit [Ping timeout: 245 seconds]
icole has joined #ruby
Raimiss has quit [Ping timeout: 244 seconds]
SleepN0T has quit [Ping timeout: 245 seconds]
chimkan has joined #ruby
jbw has quit [Ping timeout: 248 seconds]
eldariof has joined #ruby
icole_ has joined #ruby
josh_ has quit [Ping timeout: 245 seconds]
babonk has joined #ruby
<babonk> whats the simplest way to get the index (i) of an array as i loop through it?
Morkel has joined #ruby
icole has quit [Read error: Connection reset by peer]
<bnagy> each.with_index
pfaff has joined #ruby
dnstbr has quit [Quit: Computer has gone to sleep.]
<shevy> yeah
lggr has quit [Ping timeout: 244 seconds]
duracrisis is now known as starship
kirun has joined #ruby
gmg85 has joined #ruby
Villadelfia has quit [Ping timeout: 246 seconds]
paolooo has quit [Quit: Page closed]
SeySayux has quit [Ping timeout: 240 seconds]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
havenn has joined #ruby
SeySayux has joined #ruby
<gmg85> what would be the best xml parsing gem/lib for ruby?
lggr has joined #ruby
<havenn> gmg85: Nokogiri
Mon_Ouie has joined #ruby
sdegutis has quit [Remote host closed the connection]
yshh has joined #ruby
<gmg85> nice..
<gmg85> let me check it out
pfaff has quit [Ping timeout: 245 seconds]
Villadelfia has joined #ruby
jbw has joined #ruby
adeponte has quit [Remote host closed the connection]
<gmg85> Looks good
<gmg85> way better than xmlsimple
akl has joined #ruby
arubin has joined #ruby
linoj has quit [Quit: linoj]
br4ndon has quit [Ping timeout: 256 seconds]
yigal has joined #ruby
babonk has quit [Quit: babonk]
pfaff has joined #ruby
linoj has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
lggr has quit [Ping timeout: 260 seconds]
milestone has joined #ruby
pu22l3r has quit [Ping timeout: 245 seconds]
<milestone> hi all, i am using rexml to parse an xml document. I am using XPatch to get a concrete Element with lots of subelements, which i would like to copy and rename an attribute
ianblenke1 has quit [Quit: Leaving.]
<milestone> der Elements Clone Method only does a shallow copy
<milestone> is there a way to copy the element and all its children together?
lggr has joined #ruby
beit has quit [Quit: beit]
arubin_ has joined #ruby
elaptics is now known as elaptics`away
elaptics`away is now known as elaptics
starship is now known as duracrisis
arubin has quit [Ping timeout: 245 seconds]
arubin_ is now known as arubin
My_Hearing has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 0.3.8]
haxrbyte_ has quit [Ping timeout: 245 seconds]
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
My_Hearing is now known as Mon_Ouie
pu22l3r has joined #ruby
burgestrand has quit [Quit: Leaving.]
jrist is now known as jrist-afk
lggr has quit [Ping timeout: 252 seconds]
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<milestone> hello ....
niklasb has quit [Ping timeout: 248 seconds]
answer_42 has quit [Ping timeout: 276 seconds]
jmtame has joined #ruby
niklasb has joined #ruby
<jmtame> if i wanted to have a doctor object, and then another patient object, and i wanted a patient's SSN attribute to only be visible to a doctor, would i make the patient inherit from the doctor? that seems off
<jmtame> trying to get a good grasp on encapsulation in ruby
<Mon_Ouie> You just wouldn't do it, you'd make the SSN attribute public — if something unrelated like a Doctor object may need, you might potentially need it anywhere you use the patient object
<Mon_Ouie> Don't forget visibility in code has nothing to do with a person really being able to access certain data
lggr has joined #ruby
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-rc2)]
havenn has quit [Remote host closed the connection]
kpshek has quit []
milestone has quit [Ping timeout: 252 seconds]
heftig has quit [Quit: leaving]
burgestrand has joined #ruby
mengu has joined #ruby
<shevy> jmtame, it is not logical to make a patient a subclass of a doctor
lggr has quit [Ping timeout: 246 seconds]
elaptics is now known as elaptics`away
rakl has quit [Quit: sleeping]
kpshek has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
<gmg85> Just installed a gem (nokogiri)...problem is...it is not listed when i run gem list
chrishunt has joined #ruby
Morkel_ has joined #ruby
<shevy> gmg85, do you use debian
<gmg85> oh...
<gmg85> my bad
<gmg85> its listed
<gmg85> damn grep's case sensitivity!!
arya_ has quit [Ping timeout: 248 seconds]
Morkel has quit [Ping timeout: 255 seconds]
Morkel_ is now known as Morkel
<asteve> can you generate an xsd document with nokogiri?
<jmtame> shevy: that's what i was thinking. any way to make sure i can only grant access to patient's SSN from a doctor?
mengu has quit [Read error: Connection reset by peer]
TomJ has joined #ruby
<jmtame> shevy: eg if a janitor object tries to access it, it won't work
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<gmg85> hmm...just started looking into it a few minutes ago..
havenn has joined #ruby
lggr has joined #ruby
arya_ has joined #ruby
Agis__ has quit [Quit: Agis__]
<gmg85> it does seem to have an XSD module
<Spooner> jmtame : Patient and Doctor are logically both Person (an abstract class).
<gmg85> jmtame:the XSD module does not appear to be well documented
<Spooner> jmtame As people have said, it doesn't make sense to have it work like as you say.
cburyta has quit [Remote host closed the connection]
<Spooner> Janitor objects aren't self-aware, so they won't try to access your SSN unless you ask them to.
yekta has joined #ruby
vderyagin has quit [Remote host closed the connection]
yekta has quit [Client Quit]
<shevy> jmtame simply pass in the information when you access the method
rads has joined #ruby
arya_ has quit [Ping timeout: 245 seconds]
ncr100_ has quit [Ping timeout: 246 seconds]
niklasb has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
lggr has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
heftig has joined #ruby
PapaSierra has quit [Ping timeout: 245 seconds]
PapaSierra has joined #ruby
saschagehlich_ has joined #ruby
mistergibson has joined #ruby
emsilva has joined #ruby
emsilva has quit [Changing host]
emsilva has joined #ruby
h4mz1d has joined #ruby
saschagehlich has quit [Ping timeout: 252 seconds]
saschagehlich_ is now known as saschagehlich
jimeh4 has quit [Ping timeout: 245 seconds]
margle has quit [Quit: Computer has gone to sleep.]
stim371 has quit [Quit: stim371]
arya_ has joined #ruby
margle has joined #ruby
<gmg85> anyone with cool ideas for projects i could work on to sharpen my ruby skills?
lggr has quit [Ping timeout: 245 seconds]
theRoUS has quit [Ping timeout: 252 seconds]
<mistergibson> gmg85: well, database work is always interesting and challenging, as well as file IO
<mistergibson> gmg85: also, perhaps some rule-based stuff via a DSL would be interesting
cakehero has quit [Ping timeout: 246 seconds]
arya_ has quit [Ping timeout: 248 seconds]
<gmg85> mistergibson:Nice..keep the suggestions coming :)
<mistergibson> gmg85: how about this: a rule translator between PF, ipfw, and ip-tables ...
<mistergibson> that should keep you plenty busy
NoNMaDDeN has quit [Ping timeout: 244 seconds]
<gmg85> thanks mistergibson...let me take note and see wht i can do
cakehero has joined #ruby
lggr has joined #ruby
kermes has quit [Read error: Connection reset by peer]
yshh has quit [Remote host closed the connection]
SeySayux has quit [Remote host closed the connection]
Villadelfia has quit [Remote host closed the connection]
SeySayux has joined #ruby
havenn has quit [Remote host closed the connection]
jenrzzz has quit [Read error: Operation timed out]
adeponte has joined #ruby
reset has joined #ruby
rburton- has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
hakunin has joined #ruby
jimeh4 has joined #ruby
gani has quit [Quit: leaving..]
lggr has joined #ruby
carloslopes has quit [Quit: Leaving.]
deadSnowman has joined #ruby
mxweas has quit [Quit: Computer has gone to sleep.]
the_jeebster has joined #ruby
<the_jeebster> hey guys, I have a class constant named DAYS_OF_WEEK, which is an array of strings. How can I query that constant to return the array?
arya_ has joined #ruby
<shevy> no
<shevy> class Foo; BLA = %w( abc def ghi ); end
<shevy> Foo::BLA[1] # => "def"
<the_jeebster> ahh ok
<the_jeebster> I see the syntax now, thanks shevy
<shevy> is always via :: btw
<shevy> :)
<the_jeebster> is there a name for that syntax?
<the_jeebster> ::
<shevy> you could even use :: rather than .
<shevy> for methods at least
<shevy> class Foo; def test; puts "hi"; end; end
<shevy> Foo.new::test
deryl has quit [Quit: Leaving.]
<shevy> but it looks ugly... and is one more character to type than
<shevy> Foo.new.test
lggr has quit [Ping timeout: 260 seconds]
<shevy> both ways work though
<the_jeebster> the dot syntax doesn't seem to work for me
<the_jeebster> but the :: does
<shevy> the_jeebster, dunno. I think the "scope operator"
<burgestrand> the_jeebster: we just call it constant lookup
<shevy> for constants not, yeah, for methods it would though
<burgestrand> many of the times
yoklov has joined #ruby
<shevy> the_jeebster, you could write a method, that returns the content of that DAYS_OF_WEEK constant :)
<the_jeebster> I think I'm just used to that :: marker because of rails and I think it's something that it's not
<burgestrand> There is yet another name but I forgot it…
<shevy> yeah
rburton- has quit [Quit: Linkinus - http://linkinus.com]
<the_jeebster> shevy: you're right, luckily I don't need to :)
<shevy> you can sometimes find things like
<shevy> ::Foo
<shevy> in code alone
<the_jeebster> ActiveRecord::Base, etc.
sailias has joined #ruby
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
rburton- has joined #ruby
<ryanlecompte> scope operator
<shevy> yeah, is always the same in all ruby code
<the_jeebster> well that's handy to know. thanks folks
<shevy> Name1::Name2::Name3
<shevy> I still did not understand ::Foo though
<the_jeebster> so I wonder if the scope operator will work for anything defined in the class then. would it work on methods?
lggr has joined #ruby
jjbohn has quit [Ping timeout: 245 seconds]
Takehiro has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 260 seconds]
arya_ has joined #ruby
<RubyPanther> you can use :: to call a method but only with explicit parens
<heftig> RubyPanther: doesn't need parens
lggr has quit [Ping timeout: 245 seconds]
kpshek has quit []
cburyta has joined #ruby
<RubyPanther> Okay, let me narrow that, if it starts with a capital like a constant would, it needs parens
<RubyPanther> so you typically can't replace a constant with a method transparently
bwlang has quit [Excess Flood]
bwlang has joined #ruby
jasonkuhrt has quit [Quit: Leaving...]
mogaj has joined #ruby
bwlang has quit [Excess Flood]
ananthakumaran has quit [Quit: Leaving.]
slainer68 has joined #ruby
<burgestrand> No it doesn’t
kpshek has joined #ruby
bwlang has joined #ruby
<mogaj> While executing rake commands am getting this error message http://pastebin.com/g88dfvtQ .... what should i do?
lggr has joined #ruby
jimeh4 has quit [Ping timeout: 256 seconds]
bwlang has quit [Excess Flood]
bwlang has joined #ruby
bwlang has quit [Excess Flood]
luckyruby has joined #ruby
bwlang has joined #ruby
bwlang has quit [Excess Flood]
mohit has joined #ruby
workmad3 has joined #ruby
<mogaj> While executing rake commands am getting this error message https://gist.github.com/3801767 .... what should i do?
bwlang has joined #ruby
etehtsea has quit [Quit: Computer has gone to sleep.]
w400z has joined #ruby
<Spooner> Shevy: Say you have module Foo and class Bar::Foo and inside the Bar module, if you use Foo, it refers to Bar::Foo and if you use ::Foo it refers to the module Foo - :: means search for the name in the global namespace first.
_bart has joined #ruby
deadghost has joined #ruby
<Spooner> *prefix of ::, that is
<workmad3> :: makes it the equivalent of doing a / absolute path
<Spooner> Good analogy, yes.
<shevy> hmm Spooner ... need to think about this first
zommi has quit [Quit: Leaving.]
<workmad3> what was the original issue, anyway? :)
<Spooner> However, not entirely, since if you have Foo and Bar::Cheese and ask for Foo in Bar, then it finds the global Foo. Normally it looks in the local namespace, then out to the global one. :: prefix means look in global first.
bwlang has quit [Excess Flood]
bwlang has joined #ruby
<RubyPanther> burgestrand: you don't even have a :: there lol :)
Goles has joined #ruby
<shevy> hmmmm
<shevy> let me try to make an example
lggr has quit [Ping timeout: 260 seconds]
<shevy> Spooner, http://pastie.org/4857419 this works but it confuses me
JonnieCache has joined #ruby
daniel_hinojosa1 has joined #ruby
bwlang has quit [Client Quit]
<workmad3> shevy: what's confusing?
<Spooner> Why? ::Foo::TEST or TEST are the same.
Guest86844 has quit [Ping timeout: 260 seconds]
<burgestrand> RubyPanther: http://codepad.org/8CivT0tK :)
bwlang has joined #ruby
<shevy> yeah in this example
<workmad3> the only annoying (and potentially slightly confusing) thing about constant lookup is the fricking lexical scope lookup
<RubyPanther> Ah yes, if you have an argument you can get away with it
<RubyPanther> narrowed further :)
<shevy> I understand that my example does not help me understand ::Foo much :)
<RubyPanther> consider though: class Foo; def self.OMG;"Ponies" end end ; puts Foo::OMG
<burgestrand> RubyPanther: however, now it gets annoying: http://codepad.org/HPuFy8a2
<burgestrand> :P
<shevy> I kill people who use upcased method names for a living!
<RubyPanther> what does, codepad?
gmg85 has quit [Quit: ChatZilla 0.9.89 [Firefox 10.0.5/20120622141109]]
<Virunga> shevy: +1 :D
swarley has joined #ruby
<Spooner> shevy : This one hopefully makes more sense: http://pastie.org/4857432
<RubyPanther> Well, an example is Integer()
<burgestrand> RubyPanther: Baz 5, Baz(5), Foo::Baz 5, ::Foo::Baz 5 all work, but not ::Baz 5. I suppose it makes sense, since it is really a constant lookup, but still.
<shevy> hmm this example confuses me as well
<RubyPanther> So when subclassing Numeric with Foo, I would also provide a ::Foo() method
<shevy> what is the difference to ::Bar and Bar?
<Spooner> You have to run it, of course.
<shevy> hehe ok
<RubyPanther> That works as Integer() or Float()
w400z has quit []
<workmad3> shevy: here's the difference ;) https://gist.github.com/00ff4d00b3098e6bcedf
sepp2k1 has quit [Remote host closed the connection]
<RubyPanther> shevy: :: only searches from the top, it doesn't search from the current module back
lggr has joined #ruby
jenrzzz has joined #ruby
Guedes is now known as Guedes_out
rads has quit [Quit: Computer has gone to sleep.]
acrocity has quit [Ping timeout: 268 seconds]
asteve has quit [Quit: Computer has gone to sleep.]
hvq has joined #ruby
brianpWins has quit [Read error: Connection reset by peer]
c0rn_ has joined #ruby
swarley has quit [Read error: Connection reset by peer]
aantix has joined #ruby
<shevy> hmm hmm hmm
Targen_ has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
rads has joined #ruby
<Spitfire> mhm mhm mhm
Targen has quit [Ping timeout: 245 seconds]
swarley has joined #ruby
acrocity has joined #ruby
msch has quit [Ping timeout: 248 seconds]
brianpWins has joined #ruby
<shevy> my poor old brain
kpshek has quit []
glyytchy has quit [Quit: Leaving...]
waxjar has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
reisl has quit [Quit: Leaving]
hadees has quit [Quit: hadees]
<shevy> I think my brain hates to learn new things
<shevy> I still don't get it :(
<shevy> perhaps I will get it this way ...
<blazes816> it's like the / in a url
<hvq> Hi guys, I am a Ruby beginner. Just wonder if I don't use Rails, can Ruby alone be used for web development? If so, any tutorial for setting up the thing and get it runs on localhost? Thanx :P
<shevy> when do I have to precisely use ::Foo because there is no other way?
<blazes816> im/a/relative/path
<shevy> blazes816 ok tell me more. the leading / I suppose?
<workmad3> shevy: take the example I constructed
eldariof has quit []
<blazes816> /im/an/absolute/path
<blazes816> shevy: yeah, just :: instead of /
<workmad3> shevy: if I wanted to access the top-level Bar then I *have* to use ::Bar
jenrzzz has quit [Ping timeout: 246 seconds]
<swarley> i use File::Separator
lggr has quit [Ping timeout: 255 seconds]
<swarley> o
jrist-afk is now known as jrist
<swarley> ["top", "mid", "bottom"].join File::Separator
<workmad3> shevy: because Bar without the :: will refer to ::Foo::Bar inside the ::Foo module
<swarley> but now i realize we aren't talking about that
<burgestrand> hvq: yes. A good way to start might be to check out Sinatra, but if you are completely new to ruby that might be confusing at first.
<blazes816> Im:::Relative::To:The::Scope
<burgestrand> hvq: http://sinatrarb.com/
<blazes816> ::Im::Absolute
<burgestrand> hvq: a good idea would be to check out smaller tutorials like http://tryruby.org/ or even http://rubykoans.com/, depending only on you and your mind.
<shevy> hmm I get it a little better now
<swarley> i like sinatra much more than rails. but that's just me
mwillhite has quit [Ping timeout: 240 seconds]
Takehiro has joined #ruby
<burgestrand> They are different things.
<hvq> burgestrand: sinatra is a web framework right? is it possible to use Ruby alone for web development?
<swarley> well, as far as web application programming goes
jasonkuhrt has joined #ruby
<burgestrand> hvq: yes, a very light framework. And yes, it is possible, and there are many ways.
<swarley> i'd much rather use sinatra than set up a full rails development environment
arya_ has quit [Ping timeout: 255 seconds]
<burgestrand> hvq: you could run ruby with CGI, if you really want to, but that’d be a bit crazy starting out, and very few people do ruby web development that way.
<swarley> there is also monkey bars or something isnt there?
<swarley> webrick is an option, but that's just working more to get the same thing
<hvq> burgestrand: I am looking for a tutorial to setup ruby for web development without using any framework. Do you know one?
<burgestrand> hvq: the standard way for ruby web applications is running them with a ruby web server (thin, puma, webrick, mongrel, etc…) and using rack to interface with the webserver. Rack is also a web framework, but you don’t get much lighter than that without going over from web development to masochism.
ncr100 has joined #ruby
bradhe_ has joined #ruby
recycle has joined #ruby
lggr has joined #ruby
<burgestrand> hvq: I am not sure you fully understand the scope of your own question.
recycle has quit [Remote host closed the connection]
<burgestrand> Actually, I’m pretty sure of that. :p
Bosma has quit [Quit: leaving]
<workmad3> shevy: as I said, the thing to keep in mind with constant lookup is that the lookup uses lexical scoping, so in this modified example: https://gist.github.com/00ff4d00b3098e6bcedf then doing Fizz::Buzz2.new.relative will *still* look up ::Foo::Bar::Buzz (the lexical scope) rather than trying to look for ::Fizz::Buzz2::Bar::Test
<burgestrand> hvq: have you written web applications in any other languages before?
bradhe has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
<hvq> burgestrand: hmm, yes but Im totally new to Ruby. Thanx for your help anyway :)
arubin has quit [Quit: arubin]
<mr-rich> Is there a way to test the ruby version in code?
<hvq> burgestrand: I will find what I really need.
<burgestrand> hvq: I’m sidestepping answering your questions to try and figure out what you’re really after. :)
<burgestrand> mr-rich: RUBY_VERSION
chaplain has joined #ruby
<hvq> burgestrand: nvm, sorry but it's a bit sensitive ;)
<burgestrand> hvq: alright. But do have a look at Rack, and Ruby CGI. Those would be your main two options.
<mr-rich> burgestrand: ty
mmitchell has quit [Remote host closed the connection]
<hvq> burgestrand: ok, thanx a lot!
<burgestrand> hvq: I would guess you’d sway towards Rack eventually, so don’t dismiss it just because it is a framework.
<swarley> why are you looking to avoid a framework?
<hvq> burgestrand: ok
cakehero has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
<workmad3> rack is more of a micro-framework/interface specification for web server communication
bradhe_ has quit [Ping timeout: 248 seconds]
<workmad3> rather than being a web app framework
<burgestrand> Yeah, I just noticed rack does not call itself a framework.
wpaulson has joined #ruby
Vinz_ has quit [Quit: Bye.]
xclite has quit [Remote host closed the connection]
bluenemo has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 244 seconds]
<workmad3> hvq: if what you basically want is to be able to interface a ruby app with a web server, I'd highly recommend you look at rack
Vinz_ has joined #ruby
<hvq> workmad3, burgestrand: ok, thank you. It seems that Sinatra actually fits my need. Let me check on that before asking you guys further!
<workmad3> sinatra is basically a lightweight framework built on rack ;)
lggr has quit [Ping timeout: 255 seconds]
cakehero has joined #ruby
<burgestrand> Hssh. Don’t say framework.
* burgestrand hides under the covers
<workmad3> :D
<workmad3> still, all sinatra really provides is routing and some hooks for templating, everything else you need to add yourself
hadees has joined #ruby
gmg85 has joined #ruby
<workmad3> it's probably the closest you can get to non-framework territory without using rack directly (but if you used rack directly, what you'd probably do first is write your own version of sinatra ;) )
<rburton-> One day I'll do a meet-up and whenever someone says framework, the entire room must do a shot
sailias has quit [Quit: Leaving.]
<burgestrand> But um!
<rburton-> The entire room would die
enrique has joined #ruby
<workmad3> rburton-: we could all talk about libraries
<workmad3> rburton-: but they aren't as fun :P
<rburton-> Or as cool right!
<hvq> ok, let's me see what all those things mean first!
<rburton-> The new term will be toolkit because of Akka
<swarley> what are ruby's functional aspects (in terms of programming style)?
dnstbr has joined #ruby
<burgestrand> blox.
<swarley> i can't identify them off hand
<enrique> hi guys, How can I build the ruby core documentation?. I am not using rvm
<swarley> ah
<burgestrand> or, you could call them lambdas for the functional guys.
<burgestrand> Couple them with ruby’s Enumerable (and similar things) you could have something looking very functional
cakehero has quit [Ping timeout: 248 seconds]
<burgestrand> But really, it’s all gravy.
<burgestrand> Ruby is not a functional language. It is a functional language, but it is not a functional language.
lggr has joined #ruby
<burgestrand> Functions either way, it’s all about which methods you use.
<burgestrand> I’ll stop now.
<workmad3> you can write in a functional style, and you can create a functional (as in, lambda calculus) subset of ruby using just procs
cakehero has joined #ruby
<gmg85> enrique: turns out its out of date anyway..dont download
<enrique> I wanna use the ri tool
<shevy> yeah
<shevy> commandline "ri Array" should work
<shevy> but it's been years since I last used it. google killed it for me
timonv has joined #ruby
<enrique> ok
<shevy> make install-doc
<gmg85> enrique: get the downloads from here http://www.ruby-doc.org/downloads/
<shevy> the ruby style to use lambdas still confuses me
gmg85 has left #ruby [#ruby]
<shevy> what can a lambda do what objects and methods can not do?
<enrique> is there a ruby or gem command like "rvm docs generate"?
<shevy> so you use rvm
Nisstyre has quit [Quit: Leaving]
<workmad3> shevy: ask yourself this instead... what can objects and methods do that a lambda cannot?
<swarley> i usually just build from source, so i have no idea
<shevy> workmad3 nothing! exactly! so why do we have lambdas :)
<shevy> swarley I too!
<workmad3> shevy: what can objects and methods do that cannot be done *just* with lambdas?
<shevy> nothing?
h4mz1d has quit [Ping timeout: 245 seconds]
<swarley> lambda's are just a control freak's proc
<workmad3> shevy: yup :)
<workmad3> swarley: lambda in the more general sense of an anonymous function ;)
<shevy> isn't a lambda almost the same as a proc swarley
<rcassidy> <3 lambdas
<shevy> why do you love lambdas rcassidy
<swarley> yes except lambda's can return from the scope of the caller
lggr has quit [Ping timeout: 256 seconds]
<rcassidy> because i learned programming through plt-scheme (now termed racket)
<rcassidy> and higher order functions / lambdas / functional programming are simple and mathy to me
<swarley> def test(lamb); lamb.call(); puts "hi"; end; test -> { return 1 }
<swarley> puts "hi" isnt reached (if i understand it correctly)
<rcassidy> i don't necessarily love them *in ruby*
<shevy> swarley hmm odd
<swarley> λ
joelsbeard has joined #ruby
<workmad3> shevy: basically, the whole lambda calculus is exactly as powerful as a more procedural computational model built on the turing machine model
<rcassidy> where is the bot when you need him? was great for examples on this stuff
<workmad3> shevy: but it's expressive in different ways
<shevy> hmmm
havenn has joined #ruby
<swarley> turns out i'm wrong
lggr has joined #ruby
waxjar has quit [Quit: Textual IRC Client: www.textualapp.com]
<swarley> [2] pry(main)> def test(lamb); lamb.call(); puts "hi"; end; test -> { return 1 }
<swarley> hi
<shevy> hi swarley
stephenjudkins has joined #ruby
<shevy> :>
<swarley> In a lambda-created proc, the return statement returns only from the proc itself
<swarley> In a Proc.new-created proc, the return statement is a little more surprising: it returns control not just from the proc, but also from the method enclosing the proc!
<swarley> wait isn't that what i said?
Nisstyre-laptop has quit [Ping timeout: 245 seconds]
mmitchell has joined #ruby
<Spooner> You said it the other way around.
<swarley> ah
<swarley> whoops
<swarley> my bad
chrishunt has quit [Ping timeout: 244 seconds]
<rcassidy> i don't think the right term is 'lamda-created-proc' - can we just say 'lambda'? :)
<swarley> well at least i sort of knew what i was doing
<workmad3> swarley: lambdas also raise an exception if you get the arguments wrong
<workmad3> swarley: as in, a = ->(foo, bar) {}; a.call(1) #error
<rcassidy> wait i take mine back
xclite has joined #ruby
<rcassidy> i didn't realize that when you use the lambda keyword the thing you get back is named a proc in ruby
<rcassidy> ew, that's not cool, especially if they act differently
<rcassidy> i mean you can call lambda? but
brianpWins_ has joined #ruby
<swarley> oh nifty
<swarley> => #<Proc:0x00000001bb7500@(pry):4 (lambda)>
<swarley> its classified as a lambda sort of
fmcgeough has quit [Quit: fmcgeough]
<swarley> in the inspect
havenn has quit [Ping timeout: 260 seconds]
chrishunt has joined #ruby
chaplain is now known as thomas
<mogaj> how to unistall ruby completely ?
chrisja has quit [Quit: leaving]
<swarley> mogaj, how did you install it?
<mogaj> rvm
<swarley> rvm remove i would assume
<swarley> unless it has a purge
lggr has quit [Ping timeout: 248 seconds]
brianpWins has quit [Ping timeout: 246 seconds]
brianpWins_ is now known as brianpWins
arya_ has joined #ruby
beneggett has joined #ruby
berserkr has quit [Read error: Connection reset by peer]
<mogaj> swarley: rvm install 1.9.3
<swarley> ah
<swarley> rvm remove 1.9.2
<swarley> errr
<swarley> .3*
<rcassidy> mogaj, are you looking to get rid of rvm as well?
<rcassidy> or just a version you installed with rvm
<swarley> is anyone else as excited as a fan girl for 2.0?
Chryson has joined #ruby
lggr has joined #ruby
<mogaj> rcassidy : i would like install ruby,rails,rail completly again as i am getting lot of errors .... so i want to first unistall all of them
<guest__> When working on a project that has a config.ru in the root, is there a difference between running "rackup" or using "pow.cx"?
<rcassidy> so if you want to get rif of *everything* 'rvm implode' does this i think
noxoc1 has quit [Quit: Leaving.]
<rcassidy> s/rif/rid
drkfiber has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<workmad3> Guest__: rackup will probably use webrick, I suspect pow will use something else
Jellyg00se has joined #ruby
<rcassidy> how did you install rvm?
<workmad3> Guest__: but most likel, nothing really important
Joel_re has quit [Quit: leaving]
<workmad3> *likely
sent-hil has joined #ruby
<guest__> Ahh, alright. Thanks! Just a little confused by all of this, haha.
<mogaj> rcassidy: how do i do it?
elderflower has quit [Quit: leaving]
lurraca has joined #ruby
<swarley> i think i want to call sockets suckits from now on
arya_ has quit [Ping timeout: 245 seconds]
wpaulson has joined #ruby
froy has quit [Quit: kablam!]
slainer68 has quit [Remote host closed the connection]
workmad3 has quit [Read error: Operation timed out]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
dnstbr has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 246 seconds]
mmitchell has quit [Remote host closed the connection]
chimkan has quit [Quit: chimkan]
CaptainJet has joined #ruby
Vinz_ has quit [Read error: Connection reset by peer]
Vinz_ has joined #ruby
geekbri has quit [Remote host closed the connection]
lggr has joined #ruby
robertotauille has quit [Quit: Leaving...]
bencaron has quit [Quit: bencaron]
joofsh has quit [Remote host closed the connection]
joofsh2 has quit [Remote host closed the connection]
patrickximenes has joined #ruby
joofsh has joined #ruby
cvig has joined #ruby
cvig has left #ruby [#ruby]
allsystemsarego has quit [Quit: Leaving]
peregrine81 has joined #ruby
zombor has joined #ruby
ph^ has quit [Remote host closed the connection]
yshh has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
<mogaj> while installing ruby am getting "No binary rubies available for: ///ruby-1.9.3-p194."
<zombor> is there a more efficient way to do this? https://gist.github.com/3802049
<burgestrand> zombor: you could write a C extension of it
<burgestrand> zombor: also, you can use &&= instead of the if-statement, if you like. Your preference decides.
<swarley> someone tell me if this looks acceptable for an IRC bot plugin https://github.com/swarley/YAIL/blob/master/plugins/hello_world.rb
JustinCampbell has quit [Remote host closed the connection]
<swarley> each on statement is just another test, they would almost never be in the same plugin together
Drewch has quit [Quit: ZNC - http://znc.in]
<zombor> burgestrand: was hoping to eliminate the loop
lggr has joined #ruby
<burgestrand> swarley: I suppose. Perhaps the plugin statement could be optional. Also, the "on" seems superfluous.
<swarley> the reason the plugin statement is used is because the Plugin.inherited isn't called until after all of the on statements
<burgestrand> swarley: it might also be confusing that you can use the object in match and command to reply (or send messages to the same room, I would assume, not just reply), while you cannot do that with all.
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<swarley> so it's hard to trap the name of the class
<swarley> reply send's back a formatted message, like
<swarley> "PRIVMSG #{target} :#{message}"
<swarley> send is raw
margle has quit [Quit: Computer has gone to sleep.]
<burgestrand> swarley: I understand the technical aspects of it, but I would be surprised.
<swarley> but it takes no work to remove that
<burgestrand> It’s your job to do the annoying work so the plugin authors don’t have to :p
<swarley> Good point
<swarley> That was just an example anywaty
<swarley> -t
codebrah has joined #ruby
<swarley> ping handling is internal
<burgestrand> Misread you and came out a bit blunt, oh well!
<davidcelis> !ping
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<davidcelis> also whatever happened to ruby bot
<swarley> no idea
<swarley> >>> nil
<davidcelis> >> puts "where am i"
<swarley> > nil
<swarley> i guess not
<burgestrand> The hoster used to come in here from time to time to make sure it was up.
manizzle has quit [Ping timeout: 256 seconds]
<burgestrand> Perhaps he got fed up with it, as many others before him hosting ruby bots.
msch has joined #ruby
<swarley> burgestrand, what would you do instead of "on"?
<burgestrand> swarley: I’d probably just use command, match, and all.
<swarley> ah
rakl has joined #ruby
rakl has quit [Client Quit]
<burgestrand> swarley: can’t say I have a subjective reasoning for it. Perhaps I’m biased by sinatra?
Takehiro has joined #ruby
mogaj has quit [Quit: Leaving]
<swarley> i think i'll use "always" instead of all
<swarley> and then every 5, :seconds or something
<swarley> for timers
bigkevmcd has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 255 seconds]
<swarley> burgestrand, any suggestions on how i can take out the plugin declaration?
cjs226 has quit []
bradhe_ has joined #ruby
<burgestrand> swarley: perhaps all the handlers could just add to some kind of list, and once the plugin-call is made, the up-until-now collected list of commands would be registered to that plugin. Perhaps I should explain this reasoning with some code, I realize it can be a bit confusing.
<swarley> oh no i get it
<burgestrand> It’s a lot of work for getting rid of the plugin-call though.
<swarley> like a stack
<burgestrand> Yeah. And you pop it once you call plugin, in your inherited hook.
<swarley> yeah that's a good idea
rubious has joined #ruby
<swarley> the reason it's in a class is because each bot gets an instance of the plugin
jonathan_ has quit [Remote host closed the connection]
<swarley> i'm aiming to be like cinch, but with easy interface for multiple bots and multiple instances of plugins
<burgestrand> I don’t understand why you need the plugin call at all though
<swarley> because on is Plugin.on
<swarley> err
<swarley> self.on
sebastorama has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Ping timeout: 244 seconds]
<swarley> the code using self.plugin is really dirty and i don't want to show it lol
<dominikh> swarley: Cinch has been designed around multiple instances of plugins ;)
jmtame has quit [Quit: jmtame]
bradhe has quit [Ping timeout: 246 seconds]
arya_ has joined #ruby
<burgestrand> swarley: I think I’m asking if you cannot allow anonymous plugins somhow
<swarley> dominikh, :p well i'm not using it right
<swarley> you can't as i currently have it
bwlang has left #ruby [#ruby]
milestone has joined #ruby
bradhe_ has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
lggr has joined #ruby
<swarley> i also have a weird plugin data storage thing i put in there
<swarley> which i like, i have no idea if anyone else likes it
stephenjudkins has quit [Ping timeout: 260 seconds]
bradhe_ has joined #ruby
stephenjudkins has joined #ruby
<swarley> ugh
<swarley> still can't push to rubyforge
bradhe_ has quit [Read error: Connection reset by peer]
<dominikh> people still use rubyforge?
<burgestrand> Cool.
bradhe_ has joined #ruby
mohit has quit [Ping timeout: 248 seconds]
<swarley> i'm thinking of doing per network databases and then plugin cursors
talking has quit [Quit: leaving]
* swarley needs a break from IRC
<dominikh> write a jabber bot framework then :P
<swarley> dominikh, once again sir. i salute you and think you did a wonderful job
zombor has left #ruby ["Leaving..."]
<swarley> fuck that
<dominikh> thanks :P
<swarley> i
<swarley> i'm going to go do some haskell or something
<dominikh> lol
<swarley> maybe something in D
bradhe has quit [Ping timeout: 244 seconds]
<davidcelis> swarley: how is YAIL going to compare to Cinch
<swarley> its going to be pretty awful
<davidcelis> lol
<davidcelis> i like your honesty
hvq has quit [Read error: Connection reset by peer]
<swarley> i don't know i like the buffered IO i'm using
<burgestrand> Huh, when did 2.0 core come onto ruby-doc?
<swarley> its simple as hell though
tjbarber has quit [Changing host]
tjbarber has joined #ruby
<swarley> mutex in the IRC instance controlling buffered writes
<swarley> nothing special
<swarley> now, i would start programming something else to take a break if my damn dog would get off my keyboard
<dominikh> tell your dog that he's not a cat.
lggr has quit [Ping timeout: 260 seconds]
yshh has quit [Remote host closed the connection]
milestone has quit [Remote host closed the connection]
milestone has joined #ruby
chimkan_ has joined #ruby
<shevy> lol
banseljaj is now known as neptunepink`
PapaSierra has quit [Read error: Connection reset by peer]
redpanda has joined #ruby
milestone has quit [Client Quit]
PapaSierra has joined #ruby
neptunepink` is now known as banseljaj
<codebrah> i cant chose between learning python and ruby :(
lggr has joined #ruby
<shevy> codebrah did you read the old matz interview
<blazes816> codebrah: as a developer of both I advise Ruby
<shevy> I read the interview back then and it made me try ruby first http://www.artima.com/intv/rubyP.html
<davidcelis> codebrah: as a developer of ruby i advise ruby
<sent-hil> codebrah: try writing a small program in both and then decide
<shevy> I advise you to read that interview
<davidcelis> also did you for reals pick "codebrah" as your nick
<davidcelis> like, rle?
<codebrah> k i will read it
<codebrah> ya why not?
<shevy> better than codebro or codebra
<davidcelis> shevy: its the same
<davidcelis> codebrah: lots of people don't respond very well to the whole brogrammer thing
<codebrah> What is a brogrammer?
<dominikh> a horrible word.
<davidcelis> codebrah: http://areyouabrogrammer.com
ph^ has joined #ruby
<codebrah> lol there's a website for everything!!
the_jeebster has quit [Quit: Leaving.]
Kruppe has quit [Ping timeout: 252 seconds]
emsilva has quit [Quit: Computer has gone to sleep.]
<JonnieCache> it was a joke that came true
<davidcelis> :(
<codebrah> my brogrammer score is -5
<codebrah> so I'm not
jrajav has joined #ruby
<shevy> lol
xyzodiac has quit [Ping timeout: 255 seconds]
lggr has quit [Ping timeout: 246 seconds]
haxrbyte has joined #ruby
<davidcelis> no tribal tattoo, huh?
<dominikh> -120 :)
<davidcelis> i've been thinking about getting one on my upper forearm. fuck me, right?
<davidcelis> :(
<codebrah> there's nothin wrong with it
<codebrah> if that's your belief
xyzodiac has joined #ruby
<davidcelis> im not tribal
<davidcelis> i dont think the symbol is actually even tribal, to be honest
<davidcelis> i dont think it means anything at all
kirun_ has joined #ruby
<codebrah> zyzz had a sleeve tat
<burgestrand> You could get Hello Kitty to make a statement.
<codebrah> if it's what you want then do it :)
<blazes816> -55
<davidcelis> hello kitty is such a bro tattoo, bro
bluOxigen has quit [Ping timeout: 244 seconds]
<blazes816> i wish i could bro around town with epic ink all over my skin piece
<davidcelis> lol'd @ "Cook up a pile of meat" though
jeffreybaird has quit [Quit: jeffreybaird]
arya_ has quit [Ping timeout: 240 seconds]
<davidcelis> -10
thunders_ has joined #ruby
lggr has joined #ruby
kirun has quit [Ping timeout: 265 seconds]
linoj has quit [Quit: linoj]
ph^ has quit [Remote host closed the connection]
stepnem has quit [Quit: ZNC - http://znc.sourceforge.net]
xyzodiac has quit [Quit: Computer has gone to sleep.]
thunderstrike has quit [Ping timeout: 245 seconds]
reuf has joined #ruby
xyzodiac has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
dakine has quit [Quit: Leaving]
Vinz_ has quit [Quit: Bye.]
Morkel has quit [Quit: Morkel]
PapaSierra has quit [Ping timeout: 246 seconds]
<codebrah> brahs u ever take jack3d?
manizzle has joined #ruby
xclite has quit [Quit: Leaving]
lggr has quit [Ping timeout: 246 seconds]
PapaSierra has joined #ruby
<blazes816> when im outsa 4loko
<codebrah> dude, i'm talking about before programming
enrique has quit [Remote host closed the connection]
<codebrah> idk about you, but i don't program drunk
<blazes816> interesting
<davidcelis> dude
<davidcelis> you gotta take advantage of the ballmer peak
timonv has quit [Remote host closed the connection]
<davidcelis> that's a total rookie mistake
<codebrah> u srs?
<davidcelis> randall doesn't lie
<blazes816> totes srs
<codebrah> You know what maybe ur right
<blazes816> down a 40 and cap production deploy like a real cowboy yo
<davidcelis> give drunk coding a shot
brianpWins has quit [Read error: Connection reset by peer]
rburton- has quit [Quit: Linkinus - http://linkinus.com]
<davidcelis> if you wake up the next morning, look at the code you wrote, and go "WTF"...
<davidcelis> then you probably didn't drink enough
<codebrah> hmm
<Beoran> what's that
nwest has quit [Quit: Computer has gone to sleep.]
<davidcelis> whats what
brianpWins has joined #ruby
<Beoran> dunk coding?
<davidcelis> drunk coding, dog
<davidcelis> DRUNK
ij has quit [Ping timeout: 245 seconds]
<Beoran> Well, as ong s it's properly commented and refactored, I don' tcare what you did
<blazes816> aka crunking
c0rn_ has quit [Quit: Computer has gone to sleep.]
<blazes816> bros don't refactor cuz that's ho work
lggr has joined #ruby
<arietis> hi, what's easiest way to run this snippet? http://snipplr.com/view/62442/extract-most-common-colors-from-an-image/
thone has joined #ruby
<arietis> use interactive cli?
kn330 has quit [Remote host closed the connection]
brianpWins has quit [Read error: Connection reset by peer]
<codebrah> i'm refactoring right now brahs
statbot has joined #ruby
stephenjudkins has joined #ruby
<blazes816> u already wrote the code brah it's done
<Beoran> blazes816, what's up with that ho's and bros too? That's just silly.
<blazes816> arietis: yeah probably. install imagemagick and try running it from irb
<Beoran> anyway I'm out of here
thaz has joined #ruby
JetAway has joined #ruby
CaptainJet has quit [Disconnected by services]
<blazes816> peace out home sauce
JetAway is now known as CaptainJet
<[diecast]> such hip lingo in here
thone_ has quit [Ping timeout: 240 seconds]
<blazes816> don't worry [diecast] i'm just satiring
<codebrah> I've got to
<codebrah> Actionscript 3 I wrote like 6 months ago LOL
<blazes816> haha
IPGlider has joined #ruby
bradhe_ has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
Jellyg00se has quit [Remote host closed the connection]
jasonkuhrt has quit [Quit: Leaving...]
Axsuul has joined #ruby
stim371 has joined #ruby
rubious has quit [Quit: Leaving...]
lggr has quit [Ping timeout: 252 seconds]
mistergibson has quit [Remote host closed the connection]
thaz has quit [Client Quit]
DrShoggoth has quit [Quit: Leaving]
icole_ has quit [Remote host closed the connection]
PapaSierra has left #ruby [#ruby]
<codebrah> I'm learning this Ruby and stuff on Codecademy, but I think Python looks more aesthetic
cjs226 has joined #ruby
<davidcelis> really
<blazes816> self.laugh()
<davidcelis> python's unfuckingreadable to me these days
icole has joined #ruby
obryan has quit [Ping timeout: 245 seconds]
<codebrah> it is? :(
ckrailo has joined #ruby
<davidcelis> after coding in ruby, yeah
robertotauille has joined #ruby
bbttxu has quit [Quit: bbttxu]
<blazes816> if __name__ == "__main__":
<blazes816> is all i need to see before throwing up
GoGoGarrett has quit [Remote host closed the connection]
lggr has joined #ruby
<codebrah> o :(
alanp has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
rubious has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
haxrbyte has quit [Ping timeout: 248 seconds]
apok_ has joined #ruby
jonathanwallace has joined #ruby
rubious has quit [Client Quit]
keyvan has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
<Mon_Ouie> Java is still worse. How do they not miss the ability to use and define higher-order functions?
lggr has quit [Ping timeout: 260 seconds]
fantazo has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
apok has quit [Ping timeout: 245 seconds]
apok_ is now known as apok
<blazes816> they never knew them in the first place
stim371 has quit [Quit: stim371]
ph^ has joined #ruby
<Mon_Ouie> I guess; but don't they notice they keep doing the same things over and over?
dobie_gillis is now known as Completely`soake
joshman_ has quit [Ping timeout: 240 seconds]
<blazes816> i think they enjoy it :s
icole has quit [Remote host closed the connection]
bradleyprice has quit [Remote host closed the connection]
lggr has joined #ruby
Takehiro has quit [Ping timeout: 244 seconds]
stopbit has quit [Quit: Leaving]
<jrajav> Mon_Ouie: Well, it was a little tricky because Java was never supposed to have functions at all
<jrajav> Just methods
<jrajav> Aren't first class functions in the works for Java 8 though?
deadghost has quit [Ping timeout: 255 seconds]
tgraham has quit [Quit: Leaving...]
<Mon_Ouie> Ruby has only methods yet it still has blocks
_bart has quit [Quit: _bart]
c0rn_ has joined #ruby
<Mon_Ouie> I think they are. They can also use some trick by using anonymous classes but… that'd usually be more complicated than just copy/pasting the same pattern
deadghost has joined #ruby
<jrajav> Blocks are blocks, not first class functions
c0rn_ has quit [Client Quit]
<jrajav> Anonymous classes aren't a trick, they're the ONLY way to accomplish pluggable functionality in Java right now
ph^ has quit [Ping timeout: 245 seconds]
<jrajav> They're literally everywhere even in standard libraries
<davidcelis> blox r prox
matrixise has joined #ruby
<davidcelis> oh java
c0rn_ has joined #ruby
c0rn_ has quit [Client Quit]
BrianJ has joined #ruby
BMF has joined #ruby
awarner has joined #ruby
c0rn_ has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
peregrine81 has quit [Quit: Computer sleeping.]
Targen_ has quit [Ping timeout: 245 seconds]
c0rn_ has quit [Client Quit]
icole has joined #ruby
c0rn_ has joined #ruby
lggr has joined #ruby
redpanda has quit [Remote host closed the connection]
robertotauille has quit [Quit: Leaving...]
xyzodiac has quit [Quit: Computer has gone to sleep.]
verto is now known as verto|off
<davidcelis> blazes816: __all__.remove('__init__')
<blazes816> (troll)
verto|off is now known as verto
<blazes816> you should see the crazy python module shit i had hacked up for some OpenStack stuff for work
<blazes816> it basically took one module and added the load paths of all the other OS projects to it so it was a like a massive global-singleton machine
<blazes816> it was horrible
lggr has quit [Ping timeout: 245 seconds]
Nisstyre-laptop has joined #ruby
swarley has quit [Read error: Operation timed out]
workmad3 has joined #ruby
internet_user has quit [Remote host closed the connection]
xyzodiac has joined #ruby
<shevy> hehe
<shevy> ARE YOU ASHAMED TO HAVE WRITTEN IT blazes816
<blazes816> more than you know
<shevy> jrajav everyone is now missing the bot :(
<blazes816> I added "# Copyright shevy from #ruby" at the top though so it's not too bad
<jrajav> shevy: Sorry :/
<jrajav> There was that one guy who offered to host it, but he's been missing for a while now
mikeycgto has quit [Remote host closed the connection]
<jrajav> Next week I might be able to clean up the virtualbox image and make it available as a torrent so anyone can host it
lggr has joined #ruby
<shevy> blazes816, lol
<shevy> jrajav, yeah I think Xeago... he said he could host it but he lacks something
thunders_ has quit [Remote host closed the connection]
k610 has joined #ruby
<shevy> bash-fu or cojones... something like that
<blazes816> jrajav: what's the issue? money, or time? or both?
<jrajav> Neither
<jrajav> I was hosting on my box at work but that's not an option now
<shevy> the issue is
<shevy> people always break it
<shevy> :>
Completely`soake is now known as Abo`aeuiob
<jrajav> Nothing bad, it's just that a scale utility runs on my box now which interferes with it
robertotauille has joined #ruby
<blazes816> hmm
<jrajav> I can't host it at home currently because I'm behind a private network that has a terrible configuration
<jrajav> But I don't control it
<jrajav> In a few months when I move into my own place I could host it again
msch has quit [Ping timeout: 252 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
robustus has quit [Quit: ZNC - http://znc.in]
baroquebobcat has joined #ruby
verto is now known as verto|off
lggr has quit [Ping timeout: 246 seconds]
ph^ has joined #ruby
<carwin> can I do an if statement in an IO.foreach block?
emsilva has joined #ruby
emsilva has quit [Changing host]
emsilva has joined #ruby
<davidcelis> why wouldn't you be able to
<carwin> Trying to pull out a single line of a long file
<carwin> davidcelis: no clue, i'm new to ruby and it wasn't working -- just double checking that it's my error :)
jrunning has joined #ruby
lggr has joined #ruby
Abo`aeuiob is now known as ghost88
manizzle has quit [Ping timeout: 260 seconds]
c0rn_ has quit [Quit: Computer has gone to sleep.]
jtdowney has quit [Remote host closed the connection]
centr0 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
ph^ has quit [Ping timeout: 245 seconds]
centr0 has left #ruby [#ruby]
swarley has joined #ruby
jasonkuhrt has joined #ruby
keyvan has quit [Remote host closed the connection]
rabidpraxis has quit [Remote host closed the connection]
statbot has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
guest__ has quit [Quit: Computer has gone to sleep.]
luckyruby has quit [Remote host closed the connection]
kirun_ has quit [Quit: Client exiting]
baroquebobcat has quit [Client Quit]
keyvan has joined #ruby
drkfiber has quit [Quit: leaving]
recycle has joined #ruby
baroquebobcat has joined #ruby
Virunga has quit [Remote host closed the connection]
baroquebobcat has quit [Client Quit]
lggr has joined #ruby
baroquebobcat has joined #ruby
bier has quit [Ping timeout: 252 seconds]
jasonkuhrt has quit [Ping timeout: 245 seconds]
tgraham has joined #ruby
bradhe has joined #ruby
manizzle has joined #ruby
rads has quit [Quit: Computer has gone to sleep.]
swarley has quit [Ping timeout: 244 seconds]
<carwin> while iterating over an array, how do I get the current iterations key? is it something like .key?
slicslak has joined #ruby
<blazes816> you probably want #each_with_index
<blazes816> %w(a b c).each_with_index{|val, index| puts index} #=> 1, 2, 3
<carwin> thanks blazes816
<blazes816> or perhaps 0, 1, 2, you should check, but that's the general idea
<blazes816> np
wallerdev has quit [Quit: wallerdev]
apok has quit [Remote host closed the connection]
apok has joined #ruby
codebrah has quit [Ping timeout: 245 seconds]
rads has joined #ruby
jhowarth has quit [Read error: Connection reset by peer]
im0b has quit [Read error: Connection reset by peer]
pkondzior has quit [Read error: Connection reset by peer]
dnyy has quit [Remote host closed the connection]
dkannan has quit [Remote host closed the connection]
[diecast] has quit [Remote host closed the connection]
notbrent has quit [Remote host closed the connection]
lectrick has quit [Read error: Connection reset by peer]
anildigital_work has quit [Remote host closed the connection]
moeSeth has quit [Remote host closed the connection]
fcoury has quit [Read error: Connection reset by peer]
JC_SoCal has quit [Read error: Connection reset by peer]
davidboy has quit [Read error: Connection reset by peer]
patricksroberts has quit [Read error: Connection reset by peer]
xrl has quit [Read error: Connection reset by peer]
randym has quit [Remote host closed the connection]
ctevie has quit [Read error: Connection reset by peer]
sr___ has quit [Read error: Connection reset by peer]
kapowaz has quit [Read error: Connection reset by peer]
rcsheets has quit [Remote host closed the connection]
octarine has quit [Remote host closed the connection]
SeanTAllen has quit [Read error: Connection reset by peer]
NimeshNeema has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 245 seconds]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
SeanTAllen has joined #ruby
<carwin> though maybe that isn't what I want to do, I'm trying to search a file for a multi-line block of text with variable bits -- essentially i'm looking for an array with set keys in a bunch of different php files, so my idea was to just find the line that started that array and add that line to a new ruby array and the next 7 lines
bricker_ has joined #ruby
wallerdev has joined #ruby
alienaut1 has joined #ruby
pu22l3r has quit [Ping timeout: 252 seconds]
alienaut has quit [Ping timeout: 246 seconds]
msch has joined #ruby
bricker has quit [Read error: Connection reset by peer]
jhowarth has joined #ruby
<blazes816> wat
<carwin> lol i knew that was coming
<blazes816> lol, text is hard to decipher sometimes
<carwin> I need to get a specific 7 lines out of multiple files -- the trouble is, these 7 lines are not always on the same line numbers
<carwin> additionally, their content changes just a little bit
jimeh4 has joined #ruby
<blazes816> hmmm
<carwin> i can pastebin what i've got so far
<blazes816> File('/path/to/file').read.scan(/array\((.*?\n){7}/)
DrShoggoth has joined #ruby
xrl has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
Takehiro has joined #ruby
<blazes816> that would do something like read the file into a string, then find "array(", followed by the next 7 lines
awarner has quit [Remote host closed the connection]
kapowaz has joined #ruby
lggr has joined #ruby
headius has quit [Quit: headius]
Goles has quit [Quit: Computer has gone to sleep.]
cburyta has quit [Remote host closed the connection]
jlogsdon has joined #ruby
Eplemosen has quit [Quit: NOPE]
bier has joined #ruby
icole has quit [Remote host closed the connection]
samphippen has joined #ruby
aantix has quit [Quit: aantix]
xrl has quit [Remote host closed the connection]
kapowaz has quit [Remote host closed the connection]
SeanTAllen has quit [Remote host closed the connection]
jhowarth has quit [Remote host closed the connection]
glyytchy has joined #ruby
cburyta has joined #ruby
Takehiro has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
recycle has quit [Remote host closed the connection]
<blazes816> so maybe on 32 have "puts content[index, 7]"
<blazes816> carwin^
kapowaz has joined #ruby
<carwin> blazes816: feels like i'm doing this the hard way :P
<blazes816> looks like it man
<blazes816> using drupal?
<carwin> blazes816: holy craaaap it worked
<blazes816> d
<blazes816> am
<blazes816> n
<blazes816> nice!
<carwin> blazes816: lol it's my job -- gotta do it
<blazes816> (just teasing about drupal)
<carwin> blazes816: at least until I can learn enough ruby to convince the boss-man to go to locomotivecms
<carwin> :P
lggr has quit [Ping timeout: 240 seconds]
icole has joined #ruby
jlogsdon has quit [Remote host closed the connection]
kapowaz has quit [Remote host closed the connection]
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
moted has quit [Remote host closed the connection]
jamjam has quit [Ping timeout: 244 seconds]
jimeh4 has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
jlogsdon has joined #ruby
<carwin> blazes816: so with that index dealio, can I call an each method on the index?
jlogsdon has quit [Client Quit]
fredjean has quit [Quit: Computer has gone to sleep.]
<carwin> blazes816: supposing I set content[index,7] to a variable
<blazes816> no, because the index is just an integer, not enumerable
<carwin> blazes816: ah I see
c0rn_ has joined #ruby
<blazes816> i'd do something like
<blazes816> creds = []
<blazes816> c
<blazes816> r
<blazes816> ed
<blazes816> s
<blazes816>
<blazes816> 
<blazes816> 
<blazes816> 
<blazes816> 
<blazes816> 
<blazes816> oh no
<blazes816> sorry about that :s
[diecast] has joined #ruby
<blazes816> creds << content[index, 7].join('\n')
<carwin> lol no worries
ph^ has joined #ruby
keyvan has quit [Remote host closed the connection]
<blazes816> creds = [] obviously is out of the loop, and the other line init
<blazes816> in it*
<carwin> blazes816: right
v0n has quit [Ping timeout: 246 seconds]
jhowarth has joined #ruby
jeffreybaird has joined #ruby
jhowarth has quit [Remote host closed the connection]
[diecast] has quit [Remote host closed the connection]
<carwin> blazes816: thanks for the help
<blazes816> np, good luck!
<carwin> quick non-projct question
<carwin> I know string interpolation only works with "" and not ''
<carwin> so in ruby should I just use "" for everything?
<blazes816> well, I normally ONLY use "" if I need interpolation
<blazes816> however, you may as well use "" for everything
<carwin> blazes816: that's kind of been doing, because I hate ""
<blazes816> in PHP it's the same way
<blazes816> and '' strings are actually much faster than ""
<blazes816> because "" is always checked for interpolation
<blazes816> so i kinda do it as a holdover
<carwin> blazes816: how do you benchmark that sort of thing?
<blazes816> even though in ruby it doesn't matter
lggr has quit [Ping timeout: 244 seconds]
<blazes816> <?php for($i=0;$i<99999999999999999;$i++){ $my_var = "asdf"; echo $my_var;} ?>
<carwin> well Ruby is pretty great so far - it's been much more fun to learn than php, js and sql
<blazes816> <?php for($i=0;$i<99999999999999999;$i++){ $my_var = 'asdf'; echo $my_var;} ?>
moeSeth has joined #ruby
<blazes816> that should make a noticeable difference in hp
<blazes816> php*
xrl has joined #ruby
<blazes816> definitely. I do all of them, but ruby is by far my favorite
hsbt_away is now known as hsbt
ctevie has joined #ruby
ctevie has joined #ruby
ctevie has quit [Changing host]
<carwin> i'm off to go poke around with this some more, later blazes816 thanks again.
<blazes816> np
<carwin> is there a karma system in this channel?
<carwin> blazes816++
<blazes816> haha, i wish
<blazes816> but in ruby it'd be blazes816 += 1
<blazes816> ;)
stkowski has joined #ruby
<carwin> rofl
rakl has joined #ruby
carwin is now known as carwin|away
skogis has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
carwin|away has quit [Quit: Lost terminal]
samphippen has quit [Quit: Computer has gone to sleep.]
ph^ has quit [Ping timeout: 245 seconds]
sent-hil has quit [Remote host closed the connection]
lggr has joined #ruby
octarine has joined #ruby
ForevernadeAFK has joined #ruby
slicslak has quit [Ping timeout: 260 seconds]
jhowarth has joined #ruby
lectrick has joined #ruby
lectrick has quit [Changing host]
lectrick has joined #ruby
patrickximenes has quit [Quit: patrickximenes]
tgraham has quit [Quit: Leaving...]
sent-hil has joined #ruby
notbrent has joined #ruby
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
Forevernade has quit [Ping timeout: 255 seconds]
dkannan has joined #ruby
Fretta has quit [Quit: Fretta]
rcsheets has joined #ruby
emmanuelux has joined #ruby
rakl has quit [Quit: sleeping]
SeanTAllen has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
davidboy has joined #ruby
cbuxton has quit [Quit: Leaving.]
baroquebobcat has quit [Quit: baroquebobcat]
lggr has joined #ruby
randym has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
emmanuelux has quit [Remote host closed the connection]
msch has quit [Quit: Coyote finally caught me]
pkondzior has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
cbuxton has joined #ruby
JC_SoCal has joined #ruby
codebrah has joined #ruby
<codebrah> Yo anyone seen the Katy Perry movie?
<matti> No.
lggr has quit [Ping timeout: 260 seconds]
IPGlider has quit []
<codebrah> I'm watching a screening at 8 :))
cbuxton has quit [Client Quit]
mikepack has quit [Remote host closed the connection]
hsbt is now known as hsbt_away
daniel_- has quit [Quit: WeeChat 0.3.8]
lggr has joined #ruby
fcoury has joined #ruby
k610 has quit [Read error: Connection reset by peer]
<davidcelis> codebrah: you are no longer welcome here
<matti> LOL
<codebrah> Why
<shevy> codebrah, you must be sacrificed now
<davidcelis> please make hasty egress from this fine establishment at your earliest leisure, good sure
<codebrah> ???
<shevy> we have a ruby knife and will sacrifice you with it
<codebrah> :( I thought Ruby was accepting
NimeshNeema has joined #ruby
<matti> codebrah: Ruby is, davidcelis not so much.
colinbm has joined #ruby
ph^ has joined #ruby
<codebrah> davidcelis pls
im0b has joined #ruby
<matti> codebrah: Say, that you are watching documentary about LHC.
<matti> codebrah: And he will forgive you ;p
chrishunt has quit [Ping timeout: 248 seconds]
<codebrah> I like Katy tho
<codebrah> Lhc good too :)
sneakyness_wk has quit [Quit: fried day]
ltsstar has quit [Quit: ltsstar]
jgwong has quit [Ping timeout: 245 seconds]
<davidcelis> matti: forgive?
<davidcelis> matti: what is this?
apok_ has joined #ruby
<codebrah> Pls
asobrasil has left #ruby [#ruby]
Jellyg00se has joined #ruby
<matti> davidcelis: Haha.
<matti> davidcelis: ;]
cakehero has quit [Ping timeout: 256 seconds]
patrickximenes has joined #ruby