Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby
<cozmoo> shevy u got it working?
<shevy> never tried it
<shevy> is it on github at least?
<cozmoo> i got it from external
frist44 [frist44!~Adium@c-69-253-163-29.hsd1.pa.comcast.net] has joined #ruby
<matti> cozmoo: Try sudo -i, then try running start.rb
<matti> cozmoo: I am not sure why do you need root for it?
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby
<matti> Oh I see.
<matti> < 1024
stringoO [stringoO!~JLstring@bas1-toronto42-1279599212.dsl.bell.ca] has joined #ruby
<cozmoo> i need port forwarding help
<matti> ?
<cozmoo> can u help me matti
grooveaway [grooveaway!~flo@p549B4D47.dip.t-dialin.net] has quit ["Verlassend"]
<matti> cozmoo: I do not understand what it is that you are having problems with.
<matti> cozmoo: And "its does not work, help, fix it" attitude you seem to be having is not helping :)
<cozmoo> pm?
<matti> cozmoo: Did you follow the instruction on github?
<cozmoo> im using a different fork
<matti> Well.
<matti> Perhaps it has a bug.
<cozmoo> but right now thats not my problem
<cozmoo> first i need to get this vpn's ports forwarded
<workmad3> cozmoo: maybe ask in a networking chan or google port forwarding for your OS?
<shevy> one problem rarely comes alone
<cozmoo> i am on the port forwarding site now
<cozmoo> its asking me for which application i need ot forward the port
<cozmoo> "pptp" is not listed there
jkyle [jkyle!~krunk-@unaffiliated/krunk-] has joined #ruby
<matti> cozmoo: Good luck :)
<cozmoo> ?
<workmad3> shevy: problems get lonely, they like to travel in packs :)
<matti> workmad3: Hence "cluster fuck" :]
albemuth [albemuth!~albemuth@190.241.1.170] has joined #ruby
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby
Tuxi [Tuxi!~quassel@dyndsl-085-016-194-063.ewe-ip-backbone.de] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
MUILTR [MUILTR!~MLINTH@adsl-98-80-239-106.mcn.bellsouth.net] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@adsl-65-3-161-18.mia.bellsouth.net] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@adsl-65-3-161-18.mia.bellsouth.net] has joined #ruby
Liothen [Liothen!~liothen@pdpc/supporter/professional/liothen] has joined #ruby
virunga [virunga!~virunga@151.64.4.53] has joined #ruby
Gekz [Gekz!~gekz@159.253.5.25] has joined #ruby
Gekz [Gekz!~gekz@unaffiliated/gekz] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
edward_ [edward_!~ipsifendu@c-67-169-223-202.hsd1.or.comcast.net] has joined #ruby
Seisatsu [Seisatsu!~seisatsu@adsl-99-159-46-47.dsl.pltn13.sbcglobal.net] has joined #ruby
bbttxu [bbttxu!~adam@pool-71-96-208-205.dfw.dsl-w.verizon.net] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@173-228-63-32.dsl.static.sonic.net] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
skinnymuch_ [skinnymuch_!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby
<shevy> workmad3 yeah
alse [alse!~Alex@108.162.180.72] has joined #ruby
spooort [spooort!~textual@user-24-214-93-234.knology.net] has joined #ruby
cachemoney [cachemoney!~cachemone@71-94-132-42.static.mtpk.ca.charter.com] has joined #ruby
nonotza [nonotza!~nonotza@66.246.94.130] has joined #ruby
colint [colint!~ColinT@187.146.208.69] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
jbw [jbw!~jbw@dsl-044-084.cust.imagine.ie] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<Keva161> Can some help me? I can't figure out why this simple code won't work.. http://pastebin.com/YqbHtaTs
spooort [spooort!~textual@user-24-214-93-234.knology.net] has joined #ruby
end3r- [end3r-!~ender@ec2-107-22-14-168.compute-1.amazonaws.com] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has quit [#ruby]
end3r- [end3r-!~ender@ec2-107-22-14-168.compute-1.amazonaws.com] has joined #ruby
fermion [fermion!~textual@pool-108-7-224-176.bstnma.fios.verizon.net] has joined #ruby
<mattyohe> Keva161: Because what you're typing in is not equal
syamajala [syamajala!~syamajala@c-75-68-106-118.hsd1.ma.comcast.net] has joined #ruby
<Keva161> mattyyohe: hmm im typing in he exact value for it to be true.. but it just spiits out a blank line
<mattyohe> Well, if you were typing the exact value, then it would print what you wanted
esparkman [esparkman!~esparkman@unaffiliated/esparkman] has joined #ruby
<mattyohe> So, when you press enter in gets, you're adding a newline, thus move is actually "Star Wars\n"
end3r- [end3r-!~ender@ec2-107-22-14-168.compute-1.amazonaws.com] has joined #ruby
<mattyohe> change line 2 to move = gets.chomp
<Keva161> ok it sorta worked.. heres the output
<Keva161> ruby ex11.rb
<Keva161> What is your favourite movie? Star Wars
<Keva161> May the force be with you..
<Keva161> Your taste is disturbing..
<Keva161> so its orinting the else automaticlly
<Keva161> printing*
<mattyohe> well right, because look at your code
<mattyohe> it's doing what you told it to do
<Keva161> okk i think i got it
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
dasfugufish [dasfugufish!~Adium@208-38-192-20.mammothnetworks.com] has joined #ruby
flip_digits [flip_digits!~textual@c-71-199-243-97.hsd1.fl.comcast.net] has joined #ruby
quest88 [quest88!~quest88@c-98-207-205-137.hsd1.ca.comcast.net] has joined #ruby
jonathanwallace [jonathanwallace!~jonathanw@99-11-165-168.lightspeed.tukrga.sbcglobal.net] has joined #ruby
strife25 [strife25!~strife25@cpe-098-026-018-050.nc.res.rr.com] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
Nerof [Nerof!~Miranda@c-24-20-108-253.hsd1.wa.comcast.net] has joined #ruby
dcarper1 [dcarper1!~Adium@c-76-125-233-64.hsd1.pa.comcast.net] has joined #ruby
mxweas [mxweas!~max@mobile-198-228-199-234.mycingular.net] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@adsl-98-85-42-124.mco.bellsouth.net] has joined #ruby
achiu [achiu!~Adium@adsl-99-56-252-11.dsl.lsan03.sbcglobal.net] has joined #ruby
jergason [jergason!~jergason@c-67-182-209-164.hsd1.ut.comcast.net] has joined #ruby
juarlex [juarlex!~juarlex@189.136.14.66] has joined #ruby
iamjarvo1 [iamjarvo1!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
<iamjarvo1> whats the purpose of this http://pastie.org/3141069
<banisterfiend> iamjarvo1: to confuse u
<td123> can you open the singleton class without an end?
<banisterfiend> no
<td123> so that wont even run
vjacob [vjacob!~vjacob@87.61.170.233] has joined #ruby
<iamjarvo1> banisterfiend: shorthand way to declare static methods?
<SpitfireWP> Hi folks.
<banisterfiend> iamjarvo1: it's much deeper than that, look up the ruby notion of an eigenclass
<banisterfiend> iamjarvo1: google it ;) there's a tonne of info on eigenclasses
<SpitfireWP> Someone who knows something about threads and sockets and such stuff mind taking a look through quite a lot of code and trying to work out why something is hanging for me? :P
<iamjarvo1> banisterfiend: thanks
BrianE [BrianE!~brian@181.93.125.91.rb4.adsl.brightview.com] has joined #ruby
<SpitfireWP> this http://www.privatepaste.com/9ceabbb219 is using this class http://www.privatepaste.com/b684cca3a8 (and an irc class which I haven't pasted) to do some simple portscanning (and yes, I know this is mostly pointless. It's mainly just as a programming exercises)
<SpitfireWP> However, it keeps on hanging on the check function in the portscanner class. Manges to join one of the threads, put just stops there and doesn't seem to come back.
<SpitfireWP> I've been fiddling around with the mutexs, but that doesn't seem to be helping. Additionally, when I had a mutex over the '@threads[ipaddress].each do |threadr|' at the end of the thread spawnings it resulted in a deadlock.
<SpitfireWP> Anyway, yeah... I'm baffled.
Doppp [Doppp!~Doppp@unaffiliated/doppp] has joined #ruby
Azure [Azure!~azt@99.192.18.235] has joined #ruby
Azure|netbook [Azure|netbook!~azt@99.192.18.235] has joined #ruby
Azure|netbook [Azure|netbook!~azt@unaffiliated/azure] has joined #ruby
Azure [Azure!~azt@unaffiliated/azure] has joined #ruby
ciopte7_ [ciopte7_!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
achiu [achiu!~Adium@adsl-99-56-252-11.dsl.lsan03.sbcglobal.net] has joined #ruby
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.46] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
looopy [looopy!~looopy@pool-141-156-51-14.washdc.btas.verizon.net] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
vitoravelino [vitoravelino!~rockhampt@unaffiliated/vtr] has joined #ruby
jkyle [jkyle!~krunk-@unaffiliated/krunk-] has joined #ruby
leoncamel [leoncamel!~user@KD175129170046.ppp-bb.dion.ne.jp] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
[RHQme]stringo0 [[RHQme]stringo0!~JLstring@bas1-toronto42-1279600012.dsl.bell.ca] has joined #ruby
newton10471 [newton10471!~newton104@ool-18e46276.dyn.optonline.net] has joined #ruby
ewag [ewag!~ewagner@s247.n194.n222.n216.static.myhostcenter.com] has joined #ruby
looopy [looopy!~looopy@pool-141-156-51-14.washdc.btas.verizon.net] has joined #ruby
TheNatd [TheNatd!~natd@89-138-252-82.bb.netvision.net.il] has quit [#ruby]
mk03 [mk03!~mk03@61.245.119.34.er.eaccess.ne.jp] has joined #ruby
hcchien [hcchien!~hcchien@74.117.61.202] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
oxez [oxez!~teppei@oxez.net] has joined #ruby
dotnull [dotnull!~dot_null@173-31-158-182.client.mchsi.com] has joined #ruby
kevinbond [kevinbond!~kevinbond@adsl-070-147-101-131.sip.mco.bellsouth.net] has joined #ruby
fourcolors [fourcolors!~fourcolor@rrcs-74-87-23-120.west.biz.rr.com] has joined #ruby
<fourcolors> hi, I have an object say.. foo and I do something like @thing = Foo.new I was wondering, is it possible to someone grab the name "foo" from my instance variable?
<fourcolors> if that makes sence
<fourcolors> sense
cyri__ [cyri__!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
<td123> fourcolors: you can't do something like foo.@thing if that's what you're wondering about
mikeric [mikeric!~mike@96.49.104.11] has joined #ruby
fayimora [fayimora!~fayimora@109.175.187.154] has joined #ruby
<fourcolors> well im trying to print "foo"
<td123> fourcolors: you can only access @thing with methods
<fourcolors> just print the name
<Okasu> fourcolors: Foo.class_eval {@foo}
<fourcolors> oh so to do that within the actual class i would do something like puts Foo.class_eval {self}
apok [apok!~apok@96.24.67.22] has joined #ruby
<fourcolors> that doesn't seem to work
td123 [td123!~tom@archlinux/trusteduser/td123] has quit ["WeeChat 0.3.6"]
ndch [ndch!~ndch@c-69-181-107-222.hsd1.ca.comcast.net] has joined #ruby
<shevy> fourcolors, where does "foo" come from?
<shevy> or rather, where is the variable foo defined
<shevy> but in general...
<fourcolors> foo is the class name
<Okasu> nope
<Okasu> Foo is the class name
<fourcolors> sorry thats coorect Foo is the class name
<fourcolors> @thing is the variable
<banisterfiend> Okasu: ten thousand years of hiding and hating and left me like this with no way of relating to them when they kill me for stopping me sating my anger
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
<shevy> fourcolors from within a class, you can get the name of the class via something like puts self.class
<fourcolors> So more specific I have a Foo.class_eval{self.class} which is defined inside of the class but that doesn't seem to work...
<fourcolors> wait
<shevy> yeah the question is what you want to make anyway and why you want to use eval
<fourcolors> oh nm
<fourcolors> Well I'm just print out peoples names and each person is creating a class
<fourcolors> if that makes sense
<Okasu> banisterfiend: sorry
<fourcolors> bob = Foo.new etc...
<fourcolors> so I want to print out "bob did something interesting"
nowthatsamatt [nowthatsamatt!~nowthatsa@adsl-98-85-42-124.mco.bellsouth.net] has joined #ruby
newton10471 [newton10471!~newton104@ool-18e46276.dyn.optonline.net] has quit [#ruby]
<shevy> well, define a method in Foo and call that on bob
<shevy> bob.call_bob
<fourcolors> oh and store their name when initalized or something?
ferbass [ferbass!~ferbass@177.35.204.136] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
<shevy> what name? but yeah you can do that ...
<shevy> bob = Foo.new('bob')
<shevy> charlie = Foo.new('charlie')
<aces1up> having some trouble creating class level attr_accessor methods, can someone check out this code for me... the question is at the bottom. http://pastebin.com/wFxNzW9u
<shevy> if for some reason you really need to know the name of the assigned variable, fourcolors, you can keep an array with those entries... array << 'bob'
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
radic_ [radic_!~radic@dslb-178-002-223-120.pools.arcor-ip.net] has joined #ruby
<shevy> but I am very sure you don't really need to know the name
<shevy> and you probably dont need to use eval either
<banisterfiend> shevy: do you love me
<shevy> banisterfiend only on odd days
Silker [Silker!~ponies@87.115.38.58] has joined #ruby
ferbass [ferbass!~ferbass@177.35.204.136] has joined #ruby
cableray [cableray!~cableray@75-145-121-174-Colorado.hfc.comcastbusiness.net] has joined #ruby
p0y [p0y!~p0y@125.212.56.116] has joined #ruby
ferbass [ferbass!~ferbass@177.35.204.136] has joined #ruby
<shevy> I want a fully object orientated pipe :(
<aces1up> banisterfiend you tried and help me with my question yesterday can you check out this bit of code and let me know how i setup the attr_accessor method? http://pastebin.com/wFxNzW9u
kevinbond [kevinbond!~kevinbond@adsl-070-147-101-131.sip.mco.bellsouth.net] has joined #ruby
<shevy> you use attr_accessor in your class
<shevy> but I really have no idea what's going on, so I leave that in banisterfiend's able hands
<aces1up> shevy i can't set attr_accessor methods in my modules for class level vars that are created in my modules?
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<shevy> not sure I get that question. typically you use attr_* on your class... class Foo; attr_reader :bla ... x = Foo.new; x.bla # <-- getter for @bla
<shevy> well actually, you use those attr* things only for instance variables, not class vars
<shevy> but you dont have any @@class vars in your code
<shevy> you probably mean instance variables anyway or? I was confused by "class level vars"
<aces1up> class vars do not have to be just @@
<aces1up> they can be @
<shevy> aha?
<shevy> and they are shared across all instances of that class?
<aces1up> no well when they are just @ they are just used in the class itself.
<aces1up> @@ are used in the instances.. so i get what u mean.
colint [colint!~ColinT@187.146.208.69] has joined #ruby
<shevy> yeah @@ are a bit like limited global variables
<shevy> I dont find them too overly useful though
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby
tshauck [tshauck!~tshauck@cpe-69-76-176-108.kc.res.rr.com] has joined #ruby
niklasb [niklasb!~codeslay0@p5B310C95.dip0.t-ipconnect.de] has joined #ruby
_|christian|_ [_|christian|_!~christian@190.236.233.157] has joined #ruby
j3r0m3 [j3r0m3!~j3r0m3@50-0-128-97.dsl.dynamic.sonic.net] has joined #ruby
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has quit [#ruby]
achiu [achiu!~Adium@ip68-5-18-17.oc.oc.cox.net] has joined #ruby
ryh [ryh!~ryh@174.45.125.160] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
MUILTR [MUILTR!~MLINTH@adsl-98-80-213-39.mcn.bellsouth.net] has joined #ruby
p0y [p0y!~p0y@125.212.56.116] has joined #ruby
tayy [tayy!~tayy@208.59.93.230] has joined #ruby
philcrissman_ [philcrissman_!~philcriss@c-174-53-217-149.hsd1.mn.comcast.net] has joined #ruby
looopy [looopy!~looopy@pool-141-156-51-14.washdc.btas.verizon.net] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
AndChat| [AndChat|!~AndChat@222.153.223.43] has joined #ruby
janissary [janissary!~user@adsl-98-85-0-232.mco.bellsouth.net] has joined #ruby
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby
rockydogy [rockydogy!6c5a7e3b@gateway/web/freenode/ip.108.90.126.59] has joined #ruby
p0y [p0y!~p0y@125.212.56.116] has joined #ruby
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@adsl-98-85-42-124.mco.bellsouth.net] has joined #ruby
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
Cyrus [Cyrus!~Cyrus@cpe-173-173-106-235.satx.res.rr.com] has joined #ruby
Cyrus [Cyrus!~Cyrus@unaffiliated/cyrus] has joined #ruby
cyberRodent [cyberRodent!~anonymous@207-237-93-144.c3-0.nyw-ubr1.nyr-nyw.ny.cable.rcn.com] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
raddazong [raddazong!~madhatter@208.166.57.134] has joined #ruby
Composure [Composure!~SportsCar@222.33.84.146] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
winux [winux!~tom@173-163-242-213-BusName-albuquerque.hfc.comcastbusiness.net] has joined #ruby
winux [winux!~tom@unaffiliated/winux] has joined #ruby
<winux> Are there alternatives to using return to exit a method?
<winux> return isn't exiting my method I want out of at a specific point
wedtm [wedtm!~wedtm@173-12-163-78-oregon.hfc.comcastbusiness.net] has joined #ruby
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
<shevy> hmm it is not? I think it is
jakky [jakky!jakk@motherfucking.ddosking.org] has joined #ruby
<shevy> if condition_true
<shevy> return
<shevy> end
<shevy> continue_here()
<shevy> you could, if you need more control
<shevy> use catch/throw
<winux> shevy: yeah working on c/t now
<shevy> winux cool nick name btw
<shevy> how did you take that? :D
<winux> shevy: ages ago :)
<winux> shevy: when i was still on the fence
<shevy> yeah we all get older
<shevy> and ...
<shevy> BETTER
<shevy> hopefully
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.44] has joined #ruby
winux [winux!~tom@unaffiliated/winux] has quit [#ruby]
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
<ewag> i cannot create gemsets. I get a gemset created confirmation but they do not exist in ~.rvm/gems/system
<ewag> any ideas?
vmatiyko [vmatiyko!~vmatiyko@178.121.196.169] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.121.196.169] has quit [#ruby]
<shevy> no idea from my side sorry
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.43] has joined #ruby
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
ly- [ly-!~ly-@unaffiliated/ly-] has joined #ruby
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby
zxiest[a] [zxiest[a]!~zxiest@213.204.70.49] has joined #ruby
Profit_ [Profit_!~p@c83-254-248-138.bredband.comhem.se] has joined #ruby
jmeeuwen_ [jmeeuwen_!~kanarip@white.kolabsys.com] has joined #ruby
SDr [SDr!SDr@unaffiliated/sdr] has joined #ruby
rtl [rtl!~rtl@monothorpe.com] has joined #ruby
Azure|dc [Azure|dc!~azt@unaffiliated/azure] has joined #ruby
Azure|netbook|dc [Azure|netbook|dc!~azt@unaffiliated/azure] has joined #ruby
vraa [vraa!~vraa@99-20-202-44.lightspeed.hstntx.sbcglobal.net] has joined #ruby
ciopte7 [ciopte7!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
ferbass [ferbass!~ferbass@177.35.204.136] has joined #ruby
Carmivore [Carmivore!~carmivmor@ec2-174-129-124-31.compute-1.amazonaws.com] has joined #ruby
ciopte7_ [ciopte7_!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
xpot [xpot!~xpot@166-70-100-198.ip.xmission.com] has joined #ruby
ly-_ [ly-_!~ly-@251.200.193.77.rev.sfr.net] has joined #ruby
any-key [any-key!~eric_wood@tacs.cs.tamu.edu] has joined #ruby
tenderloaf [tenderloaf!~tenderloa@ip98-168-217-189.om.om.cox.net] has joined #ruby
jayne [jayne!~jayne@freenode/staff/jayne] has joined #ruby
ciopte7_ [ciopte7_!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
p0y [p0y!~p0y@125.212.56.116] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby
thone [thone!~thone@g225086216.adsl.alicedsl.de] has joined #ruby
nofxx [nofxx!~nofxx@177.106.9.23] has joined #ruby
mikeric [mikeric!~mike@96.49.104.11] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@host86-145-191-238.range86-145.btcentralplus.com] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
p0y_ [p0y_!~p0y@121.96.188.176] has joined #ruby
azbarcea_ [azbarcea_!~quassel@79.114.125.226] has joined #ruby
azbarcea___ [azbarcea___!~quassel@79.114.18.64] has joined #ruby
Sliker [Sliker!~ponies@87.115.38.58] has joined #ruby
symb0l [symb0l!~symb0l@c-50-131-187-183.hsd1.ca.comcast.net] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@c-71-205-218-131.hsd1.mi.comcast.net] has joined #ruby
_huamm [_huamm!~SpeedPC@110.137.248.119] has joined #ruby
DFectuoso [DFectuoso!~DFectuoso@fixed-203-141-49.iusacell.net] has joined #ruby
a_a_g [a_a_g!~ubuntu@ec2-107-20-9-103.compute-1.amazonaws.com] has joined #ruby
michael_mbp [michael_mbp!~Marin@203.189.189.65] has joined #ruby
a_a_g [a_a_g!~ubuntu@ec2-107-20-9-103.compute-1.amazonaws.com] has quit [#ruby]
kevinbond [kevinbond!~kevinbond@adsl-070-147-101-131.sip.mco.bellsouth.net] has joined #ruby
bintut [bintut!~bintut@cm61.sigma15.maxonline.com.sg] has joined #ruby
azbarcea [azbarcea!~quassel@89.122.214.16] has joined #ruby
ciopte7_ [ciopte7_!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
p0y [p0y!~p0y@125.212.56.116] has joined #ruby
Shrink [Shrink!~sgupta@114.143.52.97] has joined #ruby
Shrink [Shrink!~sgupta@redhat/shrink] has joined #ruby
rj_rohit [rj_rohit!73f048e7@gateway/web/freenode/ip.115.240.72.231] has joined #ruby
<rj_rohit> hello I have a program in which I evaluate 2^1000 using bitwise operation.. but after that all arithmetic with the result gives wrong answer.. can you tell me the reason?
<rj_rohit> and what can I do to correct?
shevy [shevy!~shevy@93-82-80-58.adsl.highway.telekom.at] has joined #ruby
kwoodson [kwoodson!kvirc@nat/redhat/x-cnklvhdbuqdbindx] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
pietro [pietro!~pietro@109.114.75.129] has joined #ruby
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby
jensn [jensn!~Jens@ip237-172.wireless.lu.se] has joined #ruby
<aces1up> is there an array queue class where i can unshift elements onto the front of the array, then if the array is greater than x they are removed from the .last position.. also would like some nice callback method to return and pop/overrun of queue elements so i can handle cleanup processing on the elements, is there something already out there that does this sort of thing?
<waxjar> wouldn't `array.pop if array.size > MAX_SIZE` do the trick?
Azure|netbook [Azure|netbook!~azt@unaffiliated/azure] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
<aces1up> waxjar lol yeh... hehe overthought the problem...
<aces1up> that would work nice.
<Gekz> is it possible to open Nokogiri in a mode that ignores whitespace between tags?
<Gekz> it's getting bothersome to find text nodes all over the place :/
Seisatsu [Seisatsu!~seisatsu@adsl-99-35-225-92.dsl.pltn13.sbcglobal.net] has joined #ruby
kakashi__ [kakashi__!~kakashi_@nltk/kakashi] has joined #ruby
stayarrr [stayarrr!~olivererx@dslb-178-009-059-241.pools.arcor-ip.net] has joined #ruby
pencilcheck [pencilcheck!~pen@dhcp1.csie.ntu.edu.tw] has joined #ruby
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
xpot [xpot!~xpot@166-70-100-198.ip.xmission.com] has joined #ruby
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
Zanacross [Zanacross!~Serenity@adsl-83-100-189-243.karoo.KCOM.COM] has joined #ruby
Azure|netbook [Azure|netbook!~azt@unaffiliated/azure] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
Shrink [Shrink!~sgupta@redhat/shrink] has joined #ruby
Locke23rus [Locke23rus!~quassel@128-70-119-37.broadband.corbina.ru] has joined #ruby
rpowell [rpowell!~rpowell@CPE-124-184-229-113.lns11.cht.bigpond.net.au] has joined #ruby
arthurlockhart [arthurlockhart!~cinch@60-242-128-8.static.tpgi.com.au] has joined #ruby
michael_mbp [michael_mbp!~Marin@203.189.189.65] has joined #ruby
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
eldariof [eldariof!~CLD@PPPoE-78-29-117-203.san.ru] has joined #ruby
jbpros [jbpros!~jbpros@29-186-112-217.dyn.adsl.belcenter.be] has joined #ruby
Staal_Burger [Staal_Burger!~johan@196-210-200-161.dynamic.isadsl.co.za] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
cyri__ [cyri__!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
Shrink [Shrink!~sgupta@redhat/shrink] has joined #ruby
michael_mbp [michael_mbp!~Marin@203.189.189.65] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
atamis [atamis!~atamis@dsl-68-170-178-212.dhcp.cruzio.com] has joined #ruby
<atamis> I was wondering if anybody could tell me how to get the first 32 bits of an integer in ruby?
<jensn> atamis: They are 0x00000000 for positive integers, and 0xFFFFFFFF for negative ones.
sterNiX [sterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
<jensn> atamis: But if you could be more precise, we could probably help you?
<atamis> jensn: sorry, I'm pretty sure this is a 64 bit integer. MongoDB uses 64 bit ints to store timestamps, and I'm trying to convert the timestamps into a ruby Date or Time object. MongoDB uses the first 32 bits to store the seconds part of the time, and the second to the "increment". I'm fairly certain it's irrelevant
<jensn> Ah, ok, then you want to right-shift it by 32.
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
<atamis> jensn: Time.at(1312439911000>>32) returns a date in 1969, which I know is outside the range for this date. Perhaps I didn't explain myself correctly, or I simply don't understand the datatype, but I'm don't think that's it.
<jensn> atamis: Hm… the format is different in that case.
Shrink [Shrink!~sgupta@redhat/shrink] has joined #ruby
<workmad3> atamis: have you considered looking at the code for something like mongoid to see how they are creating ruby date objects from mongo's field?
<jensn> atamis: This is a significant lack of digits, no idea why.
<atamis> jensn: I'm afraid of the mongoid code base, and I wouldn't know where to look. I tried looking at the ruby bson library, but it was no help at all
<atamis> though
<atamis> to be honest, the straight mongodb driver would be more useful
<atamis> jensn: thanks for your help
Mahoek [Mahoek!~Mahoek@ip51ceb6d4.adsl-surfen.hetnet.nl] has joined #ruby
eldariof [eldariof!~CLD@PPPoE-78-29-93-214.san.ru] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.121.196.169] has joined #ruby
nari_ [nari_!~nari@p62e32d.totrnt01.ap.so-net.ne.jp] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.121.196.169] has quit [#ruby]
vitoravelino [vitoravelino!~rockhampt@unaffiliated/vtr] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
michael_mbp [michael_mbp!~Marin@203.189.189.65] has joined #ruby
gener1c [gener1c!~gener1c@93-173-28-109.bb.netvision.net.il] has joined #ruby
gener1c [gener1c!~gener1c@unaffiliated/gener1c] has joined #ruby
<gener1c> anybody wants a ruby ngrams method? :P
<gener1c> was up all night , and got bored at 4am...
<banisterfiend> gener1c: what is ngrams
yxhuvud [yxhuvud!mongo@h-209-13.a212.priv.bahnhof.se] has joined #ruby
Helius [Helius!~Adium@93-35-251-190.ip57.fastwebnet.it] has joined #ruby
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
michael_mbp [michael_mbp!~Marin@203.189.189.65] has joined #ruby
Shrink [Shrink!~sgupta@redhat/shrink] has joined #ruby
tk_ [tk_!~tk@p252193.doubleroute.jp] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
senny [senny!~senny@77-56-67-120.dclient.hispeed.ch] has joined #ruby
p1d [p1d!~p1d@dslb-088-064-139-078.pools.arcor-ip.net] has joined #ruby
kwoodson [kwoodson!kvirc@nat/redhat/x-uvhnabsnkskpramp] has joined #ruby
nkbuff [nkbuff!~nkbuff@dslb-094-223-090-130.pools.arcor-ip.net] has joined #ruby
dekroning [dekroning!~dekroning@541B931D.cm-5-4c.dynamic.ziggo.nl] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
Shrink [Shrink!~sgupta@redhat/shrink] has joined #ruby
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
faber [faber!~faber@adsl-ull-163-211.50-151.net24.it] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
sterNiX [sterNiX!~LessIsMor@unaffiliated/nu253r/x-0655220] has joined #ruby
fayimora [fayimora!~fayimora@109.175.187.154] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
canton7 [canton7!~canton7@95.150.107.113] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
axilla [axilla!~axilla@c-71-234-169-157.hsd1.vt.comcast.net] has joined #ruby
jbhewitt [jbhewitt!~jbhewitt@c122-108-214-224.rochd4.qld.optusnet.com.au] has joined #ruby
robotmay [robotmay!~robotmay@5ad8f1da.bb.sky.com] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
stand1357 [stand1357!~worker@l49-155-122.cn.ru] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
leoncamel [leoncamel!~user@KD175129170046.ppp-bb.dion.ne.jp] has joined #ruby
waxjar_ [waxjar_!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
Shrink [Shrink!~sgupta@redhat/shrink] has joined #ruby
Tuxist [Tuxist!~quassel@dyndsl-080-228-197-241.ewe-ip-backbone.de] has joined #ruby
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
bigkm [bigkm!~bigkm@123-243-191-137.static.tpgi.com.au] has joined #ruby
banister_ [banister_!~baniseter@118.82.185.158] has joined #ruby
<Y\N> ah yay ruby19 failed to build
Sliker [Sliker!~ponies@87.115.38.58] has joined #ruby
ezkl` [ezkl`!~ezkl@dynamic-acs-24-144-206-131.zoominternet.net] has joined #ruby
jbpros [jbpros!~jbpros@29-186-112-217.dyn.adsl.belcenter.be] has joined #ruby
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
Clooth [Clooth!~Clooth@GGGKMMMDCCXC.gprs.sl-laajakaista.fi] has joined #ruby
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby
snearch [snearch!~snearch@e178059086.adsl.alicedsl.de] has joined #ruby
<gener1c> hey
<gener1c> i was trying to find a way to optimize a count like xrange in python
<gener1c> the best i got was
<gener1c> 2.upto(11)
<gener1c> and n.times
<gener1c> which one is faster?
<gener1c> or are they both the same?
<gener1c> i know that 2..5.each allocates more memory and is slower
<canton7> they both return enumerators, so I suspect they're pretty much the same
<gener1c> so is there an alternative?
<canton7> (xrange also returns an enumerator iirc, if you're looking for equivalents)
<gener1c> im looking for the most efficiant way
<gener1c> i made a little ngrams method
<Mon_Ouie> They're all about the same, really
<gener1c> and i need the speed
<canton7> i doubt you'll find anything quicker than .upto or .times
<gener1c> ah ok
<canton7> tbh, if you really need speed, write a C extension
<gener1c> yeah i figured ill have to learn that
<canton7> scripting languages favour fast coding, not fast execution
<gener1c> true
<gener1c> but string manipulation in c is annoting
<gener1c> :P
<gener1c> annoying*
<canton7> I'll grant you that :P
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
<gener1c> ok another question
<gener1c> is there a way to choose a faster hash function for the ruby hash?
<Y\N> what's the difference between 18 and 19 in terms of generating RI, as i cant get 18 to complete it?
stand13571 [stand13571!~worker@l49-155-122.cn.ru] has joined #ruby
RomD [RomD!~Roman@nrbg-4d070fe7.pool.mediaWays.net] has joined #ruby
<gener1c> ok
<gener1c> ruby uses murmurhash
<gener1c> that thing can hash 5gb in a second
<gener1c> nevermind
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has joined #ruby
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
QaDeS [QaDeS!~mklaus@frbg-5f7338e7.pool.mediaWays.net] has joined #ruby
pen [pen!~pen@140.112.30.144] has joined #ruby
double_t [double_t!~trey@c-67-160-134-243.hsd1.wa.comcast.net] has joined #ruby
<double_t> I have a question for a particularly patient ruby expert if anyone has a couple minutes to spare.
Jackneill [Jackneill!~Jackneill@91.82.212.229.pool.invitel.hu] has joined #ruby
Jackneill [Jackneill!~Jackneill@unaffiliated/jackneill] has joined #ruby
<enikar> double_t: don't ask to ask...
<double_t> Alright. I made the mistake of compiling ruby 1.9.3-p0 from source and I have noticed that rvm won't recognize its existence. I would like to uninstall it and start from scratch, but this seems tedious at best.
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
<double_t> Anyone know of any potential solutions?
<enikar> use checkinstall to reinstall it, and deinstall it.
<enikar> an then try to install it from rvm.
<double_t> Cool. I will hop to it. Much thanks :)
palcu [palcu!~alex@89.122.187.223] has joined #ruby
Nicke\ [Nicke\!~nickelito@h102n2c1o260.bredband.skanova.com] has joined #ruby
dekroning [dekroning!~dekroning@541B931D.cm-5-4c.dynamic.ziggo.nl] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.121.196.169] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.121.196.169] has quit [#ruby]
kirun [kirun!~kirun@78-86-154-194.zone2.bethere.co.uk] has joined #ruby
lkba [lkba!~AndChat@afsr215.neoplus.adsl.tpnet.pl] has joined #ruby
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
* Y\N finally gets ROR to build
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
jsaak [jsaak!~jsaak@catv-89-134-200-70.catv.broadband.hu] has joined #ruby
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
eldariof [eldariof!~CLD@PPPoE-78-29-101-49.san.ru] has joined #ruby
rrrreimer [rrrreimer!~rrrreimer@krsn-4d0b8f6c.pool.mediaWays.net] has joined #ruby
brainopia [brainopia!~brainopia@223.204.112.100] has joined #ruby
BrianE [BrianE!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
kakashi__ [kakashi__!~kakashi_@80.174.136.81.dyn.user.ono.com] has joined #ruby
kakashi__ [kakashi__!~kakashi_@nltk/kakashi] has joined #ruby
tilde` [tilde`!~tilde@host43-198-dynamic.12-79-r.retail.telecomitalia.it] has joined #ruby
fayimora [fayimora!~fayimora@95.175.159.12] has joined #ruby
nicoulaj [nicoulaj!~nicoulaj@pas38-5-82-244-59-208.fbx.proxad.net] has joined #ruby
newton10471 [newton10471!~newton104@ool-18e46276.dyn.optonline.net] has joined #ruby
newton10471 [newton10471!~newton104@ool-18e46276.dyn.optonline.net] has quit [#ruby]
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
double_t [double_t!~trey@c-67-160-134-243.hsd1.wa.comcast.net] has quit [#ruby]
wenbert [wenbert!~wenbert@120.28.240.106] has joined #ruby
pietro_ [pietro_!~pietro@2-227-162-47.ip187.fastwebnet.it] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
<gener1c> how do they call the new way to install ruby vms?
<gener1c> rbm?
<gener1c> rvm*
<gener1c> yeah
stnly [stnly!daba08e8@gateway/web/freenode/ip.218.186.8.232] has joined #ruby
stnly [stnly!daba08e8@gateway/web/freenode/ip.218.186.8.232] has quit [#ruby]
<workmad3> gener1c: rvm is a manager for helping install ruby and for switching between them... it basically just automates the compile from source method though
<workmad3> gener1c: the same is true for the ruby-build tool (which integrates into rbenv to provide a similar setup to rvm)
nari [nari!~nari@p62e32d.totrnt01.ap.so-net.ne.jp] has joined #ruby
brian [brian!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
thiago_ [thiago_!~thiago@187.10.21.241] has joined #ruby
<thiago_> hello from brazil!!!
dch4pm4n [dch4pm4n!~d@gateway/tor-sasl/dchapman1988] has joined #ruby
tshauck [tshauck!~tshauck@cpe-69-76-176-108.kc.res.rr.com] has joined #ruby
mayfield [mayfield!~mayfaild@173.226.142.142] has joined #ruby
PragCypher [PragCypher!~kapone@208.157.149.45] has joined #ruby
Jake232 [Jake232!~textual@5e0ef036.bb.sky.com] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
diego98100 [diego98100!~diego9810@151.74.210.42] has joined #ruby
vitoravelino [vitoravelino!~rockhampt@187.64.90.129] has joined #ruby
vitoravelino [vitoravelino!~rockhampt@unaffiliated/vtr] has joined #ruby
alindeman [alindeman!~adml@pudge.ithought.org] has joined #ruby
fixl [fixl!~fixl@124-170-21-28.dyn.iinet.net.au] has joined #ruby
SDr [SDr!SDr@unaffiliated/sdr] has joined #ruby
juarlex [juarlex!~juarlex@189.136.14.66] has joined #ruby
eignerchris [eignerchris!~eignerchr@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
bier [bier!~bier@p54A5AC38.dip.t-dialin.net] has joined #ruby
shachaf [shachaf!~shachaf@ip24.67-202-82.static.steadfastdns.net] has joined #ruby
straind` [straind`!~stupidper@n124s123.bbr1.shentel.net] has joined #ruby
zbrown [zbrown!~zbrown@rufius.xen.prgmr.com] has joined #ruby
xoebus [xoebus!~xoebus@193.62.81.27] has joined #ruby
kivi [kivi!~joni@ec2-79-125-13-112.eu-west-1.compute.amazonaws.com] has joined #ruby
chrxn [chrxn!chrxn@69.4.233.32] has joined #ruby
klaas [klaas!klaas@simply.kla.as] has joined #ruby
irk3z [irk3z!~irek@78.47.187.53] has joined #ruby
xsdg [xsdg!~xsdg@SIPB-VM-99.MIT.EDU] has joined #ruby
mikejw [mikejw!~mike@falcor.vm.bytemark.co.uk] has joined #ruby
mahlon [mahlon!mahlon@martini.nu] has joined #ruby
_bat [_bat!~bat@68-71-141-194.servers.zerigo.net] has joined #ruby
swi7ch_ [swi7ch_!~addamh@li204-188.members.linode.com] has joined #ruby
shachaf [shachaf!~shachaf@ip24.67-202-82.static.steadfastdns.net] has joined #ruby
mitchty [mitchty!~mitchty@ec2-50-19-41-37.compute-1.amazonaws.com] has joined #ruby
kaneda [kaneda!~kaneda@5acb1c98.bb.sky.com] has joined #ruby
<shevy> thiago_ como vai
rook_flood [rook_flood!~textual@c-68-50-111-251.hsd1.dc.comcast.net] has joined #ruby
<thiago_> shevy, blz
<thiago_> shevy, e ai?
<shevy> hehe what? :D
<Staal_Burger> Hello from South Africa!
<thiago_> shevy, hehe
<shevy> uh south africa that's far away
<shevy> Staal_Burger ... how does this word go... Rehb
<waxjar> Reebock ?
<thiago_> shevy, where you from?
<shevy> thiago_ central europe, austria, vienna!
<thiago_> shevy, great!
<thiago_> shevy, but you know "como vai" eheh
<shevy> waxjar could be ... I remember we had some guy from south africa here for some months ... and he ordered something in Afrikaans... and my mother recognized some word for some food haha
<shevy> thiago_, yeah... is almost like italian... come va :P
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
<thiago_> shevy, cool :)
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
<thiago_> shevy, and you a ruby developer?
_|christian|_ [_|christian|_!~christian@190.236.233.157] has joined #ruby
<shevy> thiago_ dunno what means "developer". But I write in ruby daily since about 5 years
<thiago_> shevy, how old are you?
niklasb [niklasb!~codeslay0@p5B310140.dip0.t-ipconnect.de] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<shevy> thiago_ too old!
<shevy> and only getting older
<shevy> :(
sdwrage [sdwrage!~sdwrage@cpe-184-57-123-50.columbus.res.rr.com] has joined #ruby
<thiago_> shevy, i dont believe hehe
mifadir [mifadir!~mifadir@41.141.206.13] has joined #ruby
<shevy> hehe
amacgregor_osx [amacgregor_osx!~amacgrego@CPE00222dcb0a53-CM00222dcb0a4f.cpe.net.cable.rogers.com] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
iamjarvo [iamjarvo!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
BrianE [BrianE!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
Manhose [Manhose!~Manhose@bl17-1-218.dsl.telepac.pt] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
jbpros [jbpros!~jbpros@29-186-112-217.dyn.adsl.belcenter.be] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
wenbert [wenbert!~wenbert@120.28.196.60] has joined #ruby
sbanwart_ [sbanwart_!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
strife25 [strife25!~strife25@cpe-098-026-018-050.nc.res.rr.com] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
mxweas [mxweas!~max@mobile-198-228-199-234.mycingular.net] has joined #ruby
sbanwart_ [sbanwart_!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
dida [dida!~dida@5403E808.catv.pool.telekom.hu] has joined #ruby
h4mz1d [h4mz1d!~hamfz@99-0-57-199.lightspeed.tsclal.sbcglobal.net] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
Locke23rus_ [Locke23rus_!~quassel@128-70-111-50.broadband.corbina.ru] has joined #ruby
Knodi [Knodi!~Knodi@cpe-98-150-76-78.dc.res.rr.com] has joined #ruby
adamjleonard [adamjleonard!~adamjleon@pool-108-9-169-222.tampfl.fios.verizon.net] has joined #ruby
txdv [txdv!~unreal@78.60.233.29] has joined #ruby
<txdv> how do I declare a multiline string in ruby?
<txdv> something with << ?
ryez [ryez!b49d0926@gateway/web/freenode/ip.180.157.9.38] has joined #ruby
elliot_ [elliot_!~elliot@IGLD-84-229-168-250.inter.net.il] has joined #ruby
azbarcea [azbarcea!~quassel@79.114.18.64] has joined #ruby
kemet [kemet!~wizfunk@cpe-173-095-149-009.nc.res.rr.com] has joined #ruby
idarkside [idarkside!~YourNick@5e0ebb4e.bb.sky.com] has joined #ruby
Clooth [Clooth!~Clooth@193-64-22-228-nat.elisa-mobile.fi] has joined #ruby
botox [botox!~al@host-2-97-49-87.as13285.net] has joined #ruby
<botox> hi, does anybody know of a regex guide for matching parts of linux or solaris device names?
<botox> i am new to ruby regex
<botox> /dev/rdsk/c1t5001738008000152d14s2
<botox> i would like to extract /dev/rdsk/c\dt(.*)d
<botox> but dont know how to in ruby
PragCypher [PragCypher!~kapone@208.157.149.45] has joined #ruby
nd_____ [nd_____!~nd@mnhm-4d0061a8.pool.mediaWays.net] has joined #ruby
rossimatteo [rossimatteo!~rossimatt@93-33-233-179.ip46.fastwebnet.it] has joined #ruby
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
<tommylommykins> hmm
* tommylommykins just tried to monkeypath Pathname
<tommylommykins> But things don't seem to be behaving correctly
<tommylommykins> Was this a bad thing to do?
<Mon_Ouie> Monkey patching usually is
<Mon_Ouie> What were you trying to do exactly?
<tommylommykins> Add a method to return sebdirs of a directory
quest88 [quest88!~quest88@c-98-207-205-137.hsd1.ca.comcast.net] has joined #ruby
<tommylommykins> but within Pathname, the pathname objehcts returned by the entries method had wrong realdirnames
<tommylommykins> *realdirpaths
ciopte7 [ciopte7!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<tommylommykins> class Pathname; def thing; entries.map {|e| puts e.realdirpath} end end; Pathname.new("Not_Current_Working_Directory").thing
<tommylommykins> was printing the current working directory, not the Pathname opbject's own realdirpath
j416 [j416!~j416@unaffiliated/j416] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
hinogi [hinogi!~Stefan@facade/contributor/hinogi] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<shevy> txdv HEREDOC
vraa [vraa!~vraa@99-20-202-44.lightspeed.hstntx.sbcglobal.net] has joined #ruby
brian [brian!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
j416 [j416!~j416@unaffiliated/j416] has quit [#ruby]
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
dhodgkin [dhodgkin!~dhodgkin@cpe-76-178-249-57.maine.res.rr.com] has joined #ruby
looopy [looopy!~looopy@pool-151-200-236-103.washdc.btas.verizon.net] has joined #ruby
jkyle [jkyle!~krunk-@unaffiliated/krunk-] has joined #ruby
krz [krz!~foobar@182.16.234.9] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
Y\N [Y\N!~e@84.45.201.227] has quit [#ruby]
phplover5000 [phplover5000!7cb7f0ea@gateway/web/freenode/ip.124.183.240.234] has joined #ruby
<phplover5000> hello
<phplover5000> y shud i lrn ruby ova php
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
<phplover5000> hello?!?!?!
<phplover5000> FUCK YOU GUYS
phplover5000 [phplover5000!7cb7f0ea@gateway/web/freenode/ip.124.183.240.234] has quit [#ruby]
foaksdfok [foaksdfok!62dce05a@gateway/web/freenode/ip.98.220.224.90] has joined #ruby
dida [dida!~dida@5403E808.catv.pool.telekom.hu] has quit ["Leaving"]
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
<Mon_Ouie> You should learn English over both of them
<deryl> lol
<deryl> lol = learn our language. good advise
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<shevy> learn french!
<enikar> already done !
<deryl> learn quebec and paris french. you learn paris french and go to quebec be prepared to be laughed at and treated like shit
<rrrreimer> does rubygems have a log file? if so where do I find it?
Azure|dc [Azure|dc!~azt@unaffiliated/azure] has joined #ruby
Azure|netbook [Azure|netbook!~azt@unaffiliated/azure] has joined #ruby
j416 [j416!~j416@unaffiliated/j416] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<rrrreimer> shevy, I agree, French is the most spoken language in the world
<Mon_Ouie> And so is some Chinese dialect, how convenient!
colint [colint!~ColinT@187.146.208.69] has joined #ruby
<deryl> since when did French get spoken more than English?
<rrrreimer> deryl, that was sarcasm ;-)
<shevy> sarcasm in written text!
<deryl> ahh, damn it. I really need to have gthe mechanic look at my 'text-base sarcasm' detector again.
<deryl> :)
<shevy> my rule of thumb is
<shevy> the more ! the more sarcasm
<deryl> heh
<deryl> shevy rocks!!!!!!
<deryl> like that? ;)
<shevy> :(
<Mon_Ouie> deryl: Wikipedia says since 11th century
<deryl> j/k
<rrrreimer> deryl, I just wonder how people think to tell others learning their language where it's really obvious that English is THE language understood by everyone in the world, especially in irc channels
<rrrreimer> like ruby
skinnymuch [skinnymuch!~skinnymuc@static-173-61-113-6.cmdnnj.fios.verizon.net] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
<shevy> I guess there were perhaps ... 100 million people native french speaking?
Carmivore [Carmivore!~carmivmor@ec2-107-22-135-197.compute-1.amazonaws.com] has joined #ruby
skinnymuch [skinnymuch!~skinnymuc@static-173-61-113-6.cmdnnj.fios.verizon.net] has quit [#ruby]
<shevy> yeah
<shevy> english beats chinese too
<rrrreimer> and billion people understanding English
<shevy> wow so many chinese dialects?
<shevy> I used to think there is only mandarin, and the... other thing spoken around hongkong... cantonese
<deryl> same
<shevy> hehe cool that french and german are about the same
<tommylommykins> :D
* tommylommykins hopes he hasn't just embarassed himself with that\
* shevy goes and looks
<shevy> oohhhh
<shevy> Pathname
<shevy> I stopped using it years ago :/
<tommylommykins> hmm
jonathanwallace [jonathanwallace!~jonathanw@99-11-165-168.lightspeed.tukrga.sbcglobal.net] has joined #ruby
<tommylommykins> what do you use for filesystem manipulation?
<tommylommykins> File, Dir, and FileUtils?
<gener1c> טקד
<gener1c> yes
<rrrreimer> can somebody tell me where to find the gems installation log file of rubygems?
<shevy> tommylommykins FileUtils
<shevy> I found Pathname too cumbersome and long to use
<shevy> I myself though would even prefer to make those all available into File and Dir directly, but there may be a reason not to do so (I am not aware of it though, but there must be a reason that there is a separate FileUtils module)
<tommylommykins> mmm
<shevy> why not ... Dir.mkdir ... and File.mv
* tommylommykins doesn't enjoy File and Dir
<shevy> hehe
<tommylommykins> everything's static
<shevy> static? you mean because they are modules?
<Mon_Ouie> They're also classes
<tommylommykins> yeah
<Mon_Ouie> tommylommykins: It just returns a path relative to that of the parent object, not an absolute path
<tommylommykins> Mon_Ouie: What does?
<Mon_Ouie> Pathname#entries
<Mon_Ouie> Well, an array of such paths
<tommylommykins> hmm, but there must be a (semantic) error somewhere?
<tommylommykins> it returns an array of Pathnames
<tommylommykins> and pathname#realdirpath returns the absolute location in the filesystem
<Mon_Ouie> It can't work if you only have a relative path
<tommylommykins> so pathname objects created by Pathname#entries cannot be used the same as other Pathname objects
<Mon_Ouie> Pathname.new("a") does just the same
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
bier_ [bier_!~bier@p54A5BE93.dip.t-dialin.net] has joined #ruby
<tommylommykins> hmm
<tommylommykins> but presumably it makes more sense to keep the absolute pathname if it's easily derivable
<tommylommykins> ?
durre [durre!~kvirc@217-212-242-4.customer.telia.com] has joined #ruby
virunga [virunga!~virunga@151.64.38.182] has joined #ruby
omry_ [omry_!~omry@DSL212-235-83-63.bb.netvision.net.il] has joined #ruby
elliot__ [elliot__!~elliot@IGLD-84-229-168-250.inter.net.il] has joined #ruby
BrianE [BrianE!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
stringoO [stringoO!~JLstring@bas1-toronto42-1279600012.dsl.bell.ca] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
Newbs [Newbs!~textual@host-78-147-55-216.as13285.net] has joined #ruby
ciopte7_ [ciopte7_!~thomascio@cpe-071-071-047-213.triad.res.rr.com] has joined #ruby
desireco_ [desireco_!~textual@108-217-153-195.lightspeed.cicril.sbcglobal.net] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
Clooth [Clooth!~Clooth@193-64-22-228-nat.elisa-mobile.fi] has joined #ruby
dyer [dyer!~dyer@unaffiliated/dyer] has joined #ruby
stringoO [stringoO!~JLstring@bas1-toronto42-1279600012.dsl.bell.ca] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
NexusSeven [NexusSeven!5b8c6965@gateway/web/freenode/ip.91.140.105.101] has joined #ruby
<NexusSeven> hello :) I am noobie to ruby and I want to install ruby in a win7 box. which ruby installer should I download?
<krz> how would i do this: {:foo => ['foo', 'bar'] } foo is an actual variable, which returns 123. what I'm really trying to do is: {:1234 => ['foo', 'bar'] }
nobitanobi [nobitanobi!~novito@103.Red-213-96-26.staticIP.rima-tde.net] has joined #ruby
<nobitanobi> What is this operator "<<" do in http://friendpaste.com/1TnUkGeb5m6JK8LRE1xPlR
<shevy> nobitanobi << usually means "append"
<shevy> foo << "bla"
<shevy> append "bla" to foo object
<shevy> in this example ...
<nobitanobi> oh ok
<shevy> uhm...
<nobitanobi> append, I will look for it then
<shevy> I am not sure in this example
<nobitanobi> no worries, it's out of context
<nobitanobi> :)
<shevy> but in general, you use class << self
<nobitanobi> I will look at append operator
<shevy> to add class methods
<shevy> I show you a quick example
<nobitanobi> ok thanks
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
<shevy> nobitanobi, http://pastie.org/3144268
<shevy> so you can use both
<shevy> foo = Foo.new
<shevy> but also directly, like
<shevy> Foo.bar
<shevy> I don't know what is class << self; self though
<nobitanobi> oh hold up let me digest the code you post :P - I'm pretty new to ruby
rickmasta [rickmasta!~rickmasta@pool-71-183-247-164.nycmny.fios.verizon.net] has joined #ruby
<shevy> dont get confused by the "class << self" syntax really, it is easy
<shevy> you could also do
<shevy> def self.bar
<nobitanobi> ah ok
<nobitanobi> so you are defining bar is a class method
<nobitanobi> right?
<shevy> but if you have to use many self., it is often easier to just do a class << self instead
<shevy> yeah
<nobitanobi> oh, so after class << self
<shevy> yeah
<nobitanobi> all the methods would be class methods?
<shevy> I think so
<nobitanobi> how would you change to instance methods?
<shevy> within that context
<shevy> well
<shevy> you close the class << self again via the "end"
<nobitanobi> oh I see
<nobitanobi> thank you very much
<shevy> see the "end" on line 6, it just closes it again
<nobitanobi> yep, thanks :)
<krz> anyone?
Knodi [Knodi!~Knodi@cpe-75-80-225-183.dc.res.rr.com] has joined #ruby
<rrrreimer> does rubygems write to a log file? I can't find anything on my system
<shevy> good question rrrreimer
wyhaines_ [wyhaines_!~wyhaines@65.39.118.15] has joined #ruby
<shevy> I am going to ask them :D
elliot98 [elliot98!~elliot@IGLD-84-229-168-250.inter.net.il] has joined #ruby
DFectuoso [DFectuoso!~DFectuoso@fixed-203-141-49.iusacell.net] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
Doppp [Doppp!~Doppp@unaffiliated/doppp] has joined #ruby
daniel_hinojosa1 [daniel_hinojosa1!~danno@67-0-103-21.albq.qwest.net] has joined #ruby
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
mxweas [mxweas!~max@c-76-24-18-243.hsd1.ma.comcast.net] has joined #ruby
<nobitanobi> shevy: http://railstips.org/blog/archives/2009/05/11/class-and-instance-methods-in-ruby/ --> It's pretty nice to understand what you explained :)
<shevy> cool
<krz> in ruby. what are things like :foo and :bar called?
<shevy> I agree too nobitanobi
<krz> basically anything with a :
<shevy> I think self.foo is the best
<nobitanobi> symbols
<nobitanobi> krz:
eldariof [eldariof!~CLD@PPPoE-78-29-94-48.san.ru] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
<krz> how would i do this: {:foo => ['foo', 'bar'] } foo is an actual variable, which returns 123. what I'm really trying to do is: {:1234 => ['foo', 'bar'] }
BrianE [BrianE!~brian@188-220-10-235.zone11.bethere.co.uk] has joined #ruby
luffyd [luffyd!TPoll@117.230.239.248] has joined #ruby
looopy [looopy!~looopy@pool-151-200-236-103.washdc.btas.verizon.net] has joined #ruby
mpaclark [mpaclark!~mclark@CPE001ff343991a-CM0012c99f02d2.cpe.net.cable.rogers.com] has joined #ruby
mpaclark [mpaclark!~mclark@CPE001ff343991a-CM0012c99f02d2.cpe.net.cable.rogers.com] has quit [#ruby]
<Mon_Ouie> krz {:"#{foo}" => ["foo", "bar"]}
dimi3 [dimi3!~dimi3@92-247-220-133.spectrumnet.bg] has joined #ruby
<Mon_Ouie> or foo.to_s.to_sym
<krz> thanks Mon_Ouie
jay_zawrotny [jay_zawrotny!~Jay@c-71-205-218-131.hsd1.mi.comcast.net] has joined #ruby
<krz> Mon_Ouie: {:"#{foo}" => ["foo", "bar"]} returns {:"foo"=>["foo", "bar"]}
<krz> the latter seems to work though
<rrrreimer> shevy, are you angry?
achiu [achiu!~Adium@ip68-5-18-17.oc.oc.cox.net] has joined #ruby
v0n [v0n!~v4n@bas1-montreal19-1177820429.dsl.bell.ca] has joined #ruby
<krz> Mon_Ouie: actually, b = {:Song.first.id.to_s.to_sym => ['b']}, i get NoMethodError: undefined method `first' for :Song:Symbol
<Mon_Ouie> Remove the column
<krz> which column?
<Mon_Ouie> :
bam [bam!brad@rs.n8qq.com] has quit [#ruby]
<krz> Song.first.id = 20 btw
<Mon_Ouie> Ok, I probably meant colon :p
<Mon_Ouie> Why are you even using symbols for that?
<krz> b = {Song.first.id.to_s.to_sym => ['b']} returns {:"20"=>["b"]} . shouldn't it equal {:20=>["b"]}
<Mon_Ouie> Generating symbols dynamically is a code smell
<Mon_Ouie> :20 is a syntax error
<Mon_Ouie> That's why it is displayed as :"20"
<krz> i see
<krz> symbols can't start with numbers
dturnbull [dturnbull!~dturnbull@c-67-160-173-114.hsd1.or.comcast.net] has joined #ruby
<krz> first char that is
<j416> why are you even storing a number as a symbol o_O
luffy1729 [luffy1729!TPoll@117.230.52.34] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-123-50.columbus.res.rr.com] has joined #ruby
<dturnbull> are the old style docs still online somewhere? the new docs are missing a lot of low level calls like alias_method
dv_ [dv_!~quassel@chello080108009040.14.11.vie.surfer.at] has joined #ruby
<nobitanobi> Could anybody help me to understand this: http://friendpaste.com/4qjwN0tVxkX68f2leDnvlo -- particularly the part "self.class.test" -- doesn't self refer to the class itself? Why is it accessing "class" in the self object?
<Mon_Ouie> No, self is the instance of ExampleClass in that context
ceej_ [ceej_!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
luffy1729 [luffy1729!TPoll@117.230.52.34] has joined #ruby
<nobitanobi> oh
<nobitanobi> Mon_Ouie: thanks :9
<nobitanobi> :)
draginx [draginx!~Adium@unaffiliated/draginx] has joined #ruby
<nobitanobi> So, when doing this: self.class.test we are able to go the @variable = "foo" which doesn't have the value changed from the constructor
<Mon_Ouie> What do you call "constructor"?
<nobitanobi> def initialize
<Mon_Ouie> That method is called on (basically) every new instance of ExampleClass
<nobitanobi> yes, but when we call that method we change the value of the instance variable which by default its "foo".
<Mon_Ouie> And since it sets @variable to "baz", their @variable instance variable is baz
<Mon_Ouie> No
<Mon_Ouie> There's no default value, you set a value for the ExampleClass object itself
<Mon_Ouie> Which doesn't affect instances of that class at all
<nobitanobi> oh ok...
<nobitanobi> so @variable = "foo" --> it's being set for the ExampleClass object itself
<nobitanobi> What about @@variable = "bar" then?
<nobitanobi> that is assigned to all instances of the ExampleClass class right?
<Mon_Ouie> That's a class variable. Those are shared with instances and classes
<krz> if i have the following array: [[10, 'foo'], [20, 'bar']] how can i check the whole array for the first element to be 10?
<Mon_Ouie> They are a bit odd, because subclasses share them too
<krz> detect?
<Mon_Ouie> krz: See Array#rassoc
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
<nobitanobi> ok, thanks Mon_Ouie
<krz> detect won't work on this?
<krz> possibly with map
<Mon_Ouie> Array#assoc actually
<Mon_Ouie> It would, but that's not needed since assoc does the job already
<krz> Mon_Ouie: nice thanks for that
<nobitanobi> Mon_Ouie: Why I can't access the variable of the class with this: http://friendpaste.com/6zqJVHRCjqrvWictpSmVjD
<Mon_Ouie> Because you didn't define ExampleClassInstance?
lolmans [lolmans!75e65a0b@gateway/web/freenode/ip.117.230.90.11] has joined #ruby
<nobitanobi> oh gosh.
botox [botox!~al@host-2-97-49-87.as13285.net] has joined #ruby
<nobitanobi> sorry
<nobitanobi> this is nice, your explanations helped t understand this
<nobitanobi> thanks a lot
<botox> i am new to ruby, how do i make a multidimensional dynamic hash for hostname->value1->value2
chilversc [chilversc!~chris@about/csharp/regular/KeeperOfTheSoul] has quit [#ruby]
<botox> hostname[value1]->[value1]->value2
<botox> hard to explain it
<botox> hostname[value1]->[value2]->[value3]
<Mon_Ouie> Hashes and arrays can store any kind of Object
<Mon_Ouie> Including other hashes and arrays
<Mon_Ouie> So it's not a particular case
<nobitanobi> {"key1" => "value1", "key2"=> {"subkey1" => "subvalue1"}}
<botox> ok
drdoooom [drdoooom!~drdoooom@CPE00226b919846-CM0016b5337d04.cpe.net.cable.rogers.com] has joined #ruby
<botox> i need it to be dynamic
<botox> i need ahash[hostname]->[value1]->value2
<botox> im going to fill the hash from a csv
<botox> thats all working fine
<botox> aside from i need a 3d hash
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
<botox> any ideas?
<nobitanobi> you can modify the object dinamically
<Mon_Ouie> What you mean is having 3 nested hashes, right?
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<botox> yes, its actually a hostname -> disk device -> capacity
<Mon_Ouie> Just hash[hostname][device][capacity]
<botox> for a list of hosts from a csv file
<botox> ok thanks
<botox> i will try that
<Mon_Ouie> Though maybe you should think of a better data structure, nesting many hashes is a bad thing
dturnbull [dturnbull!~dturnbull@c-67-160-173-114.hsd1.or.comcast.net] has quit [#ruby]
manizzle [manizzle!~manizzle@pcp046687pcs.pcv.reshall.calpoly.edu] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-123-50.columbus.res.rr.com] has joined #ruby
fayimora [fayimora!~fayimora@95.175.159.12] has joined #ruby
<nobitanobi> Mon_Ouie: interesting that a class variable defined in a subclass will "overwrite" a class variable in its base class
<Mon_Ouie> Yep, that's why they are rarely used — they're confusing more often than not
zenergi_ [zenergi_!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
tokumine [tokumine!~kunio@82-69-174-54.dsl.in-addr.zen.co.uk] has joined #ruby
<nobitanobi> this has been a really nice lesson!
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
PragCypher [PragCypher!~kapone@208.157.149.45] has joined #ruby
dimi3 [dimi3!~dimi3@92-247-220-133.spectrumnet.bg] has quit [#ruby]
<botox> hash[hostname][device][capacity]
<botox> this isnt dynamic is it?
<botox> i want to be able to set hash[hostname]=device[capacity]
<botox> how do i do that?
ChampS_ [ChampS_!~ChaosBot@p54B4A48A.dip.t-dialin.net] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
<Mon_Ouie> What's that supposed to mean?
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]
symb0l [symb0l!~symb0l@c-50-131-187-183.hsd1.ca.comcast.net] has joined #ruby
<botox> currently i have hostname[currenthost]=device
<botox> i want to add capacity to the device key
<botox> for the hostname hash
<botox> so i can lookup hostname and then list specific keys for specfic devices
<botox> to get capacity
mxweas [mxweas!~max@12.96.84.3] has joined #ruby
inteq [inteq!~justin.si@adsl-74-190-72-202.asm.bellsouth.net] has joined #ruby
alse [alse!~Alex@108.162.180.72] has joined #ruby
nd__ [nd__!~nd@mnhm-5f74f1d7.pool.mediaWays.net] has joined #ruby
txdv [txdv!~unreal@78.60.233.29] has joined #ruby
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
SegFaultAX [SegFaultAX!~SegFaultA@c-98-248-241-85.hsd1.ca.comcast.net] has joined #ruby
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
<shevy> rrrreimer hmm not really, why?
<rrrreimer> shevy because of my statement about franzmenschen ;-)
<shevy> nah
<shevy> I just mostly not have a lot of PRIVMSGs
<shevy> I have 12 tabs open in IRC right now for instance
<shevy> the less is simply better :P
<rrrreimer> I have more
<shevy> wow
<rrrreimer> and hundreds of firefox tabs
<shevy> omg
<rrrreimer> connected to 4 irc servers
<shevy> I constantly try to seek to lower those numbers
<shevy> how can you even get anything done with so many distractions man :P
<rrrreimer> I constantly try to group the tabs and put them to the background
<botox> im using gnome 3. just click one button and it automatically does everything for me. coding, cooking, cleaning..
<rrrreimer> 22 irc channels, this might be too many, ... closing some now :D
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
<shevy> haha botox
<botox> :)
<shevy> gnome 3 is now really for dumb people
<shevy> and bored devs
<botox> im not sure, is there a giant button to press for an answer?
<shevy> dunno
eldariof [eldariof!~CLD@PPPoE-78-29-117-97.san.ru] has joined #ruby
<shevy> gnome shell to rule them all
<shevy> gnome evolution is mostly fashion based
<rrrreimer> the bourne shell rules ^^
<rrrreimer> no X, just bourne :D
<botox> i am inclined to agree. im getting sick of X
<shevy> rrrreimer bash is ok but I would like to have a pseudo-ruby shell, similar to bash
<botox> anyway, must not complain. if either of you know how to do a dynamic multidimensional hash in ruby please let me know. i am pulling my hairs out
axilla [axilla!~axilla@c-71-234-169-157.hsd1.vt.comcast.net] has joined #ruby
RomD` [RomD`!~Roman@nrbg-4d070fe7.pool.mediaWays.net] has joined #ruby
<nobitanobi> if winners is a hash. When doing "winners[buyer] << [ ticket, score ]" -- is the same than doing "winners[buyer] = [ ticket, score ]"
<shevy> not sure what you mean with dynamic and multidimensionl. just put a hash into a hash? and use accessor methods to handle the logic that you require?
<shevy> nobitanobi, the second one simply sets the key buyer to an array consisting of [ticket,score]
<shevy> not entirely sure about the first one
<shevy> gonna test...
<shevy> hash["i"] << "hi" TypeError: String#to_int should return Integer
<shevy> hmmm
<shevy> is that really valid ruby syntax nobitanobi ?
<nobitanobi> It's from the poinant guide "http://mislav.uniqpath.com/poignant-guide"
<shevy> oh it is
<shevy> hash["a"] = []
<shevy> hash["a"] <<[ "hi"] # => [["hi"]]
<shevy> simply appended to that array
<botox> i have hostscap = Hash.new
<botox> and then hostscap[currenthost] << [ currentlunname, currentcap ]
<shevy> eeks @@class vars
<nobitanobi> but append here would be the same that assigning I suppose
<botox> getting a cant convert array to string
<shevy> botox and what does hostscap[currenthost] return? what class is it
<shevy> I assume it is a String?
<shevy> and you probably try to append an [Array] to a String
<shevy> "foo" << ["abc", "def"]
<shevy> TypeError: can't convert Array into String
<botox> im pulling the data from fastercsv
<botox> currentcap = table[i]["lun_total_capacity"]
<botox> currentlunname = table[i]["lunname"]
<botox> iterating with i
hadees [hadees!~hadees@72-48-91-73.dyn.grandenetworks.net] has joined #ruby
<botox> hostscap[currenthost] << [ currentlunname, currentcap ]
<botox> undefined method `<<' for nil:NilClass (NoMethodError)
andreime [andreime!~andrei@188.24.80.246] has joined #ruby
<shevy> yeah in this case
<shevy> hostscap[currenthost] is probably nil
<andreime> hello if i have to this method :something and that something can change, how can i do something like @bla = :something and then modify it when the time is right ?
<botox> currenthost = table[i]["Hostname"]
<botox> sets currenthost
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.121.196.169] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.121.196.169] has quit [#ruby]
punkrawkR [punkrawkR!~freddiebo@h-9-122.a328.priv.bahnhof.se] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
badabim [badabim!~badabim@c-98-207-235-20.hsd1.ca.comcast.net] has joined #ruby
eldariof [eldariof!~CLD@PPPoE-78-29-122-186.san.ru] has joined #ruby
<botox> hostscap[currenthost] = [ currentlunname, currentcap ]
<botox> this works but
nobitanobi [nobitanobi!~novito@103.Red-213-96-26.staticIP.rima-tde.net] has quit [#ruby]
<botox> i have multiple lines with the same hostname
<botox> so i need another key for uniqueness
<botox> this currently returns the last line of each unique host
<botox> which i would expect it to
badabim [badabim!~badabim@c-98-207-235-20.hsd1.ca.comcast.net] has joined #ruby
eldariof [eldariof!~CLD@79.126.67.80] has joined #ruby
p1d_ [p1d_!~p1d@dslb-088-067-031-203.pools.arcor-ip.net] has joined #ruby
mengu_ [mengu_!~mengu@95.70.194.61] has joined #ruby
punkrawkR [punkrawkR!~freddiebo@h-9-122.a328.priv.bahnhof.se] has joined #ruby
manizzle [manizzle!~manizzle@pcp072028pcs.wireless.calpoly.edu] has joined #ruby
ryh [ryh!~ryh@174.45.125.160] has joined #ruby
i8igmac [i8igmac!~bigmac@c-67-185-190-112.hsd1.wa.comcast.net] has joined #ruby
tomzx [tomzx!~tomzx@70.52.27.16] has joined #ruby
rob4h [rob4h!~rob@ip-88-152-231-140.unitymediagroup.de] has joined #ruby
<rob4h> Hi, I'm using xml rpc calls to create nodes on my drupal website. I can't figure out how to use my tags / taxonomy field of my node. Anybody got this working or has an idea whom to ask? Here is a snippet: http://pastebin.com/PmLayY3G (I crossposted this in the '#drupal' channel but got no responses.)
<rob4h> Here some of the values I tried for ['taxonomy'] and ['field_my_tags'] : http://pastebin.com/hm7UrBRG
robyurkowski [robyurkowski!~robyurkow@184.151.127.172] has joined #ruby
pietro [pietro!~pietro@2-227-162-47.ip187.fastwebnet.it] has joined #ruby
<shevy> ewww xml ;P
<rob4h> Didn't get the SOAP or other REST interfaces to work at all.
i8igmac [i8igmac!~bigmac@c-67-185-190-112.hsd1.wa.comcast.net] has joined #ruby
snearch [snearch!~snearch@e178059086.adsl.alicedsl.de] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]
j416 [j416!~j416@unaffiliated/j416] has quit [#ruby]
i8igmac [i8igmac!~bigmac@c-67-185-190-112.hsd1.wa.comcast.net] has joined #ruby
i8igmac [i8igmac!~bigmac@c-67-185-190-112.hsd1.wa.comcast.net] has joined #ruby
pencilcheck [pencilcheck!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
<shevy> hmmm
<shevy> is it worth to write methods that only have one line and are used only once?
<rob4h> When they fit nicely into some category of methods, why not?
<shevy> hmm well
<rob4h> If it would be the odd one out, maybe not.
<shevy> it's a bit cumbersome to write many many really tiny methods ...
<shevy> trivial stuff like def pwd; puts Dir.pwd
<rob4h> You could write one method for those things and pass a parameter to tell it what to do if it fits well.
<rob4h> A call like this maybe: filesystem_op('pwd')
<rob4h> Then you'd have only one method to write where you can gather all those tiny bits.
toy_battery [toy_battery!~choldbroo@c-67-164-29-115.hsd1.ca.comcast.net] has joined #ruby
<rob4h> You can validate them, and change implementation details if you like.
<shevy> hmm hmm hmm
<shevy> decisions decisions
<shevy> :(
<rob4h> But hard to tell without more detail (and I'm not that got either).
<rob4h> This drupal problem is driving me nuts...
i8igmac [i8igmac!~bigmac@c-67-185-190-112.hsd1.wa.comcast.net] has joined #ruby
<i8igmac> geez... connection problems
graft [graft!~graft@69-12-135-166.dsl.static.sonic.net] has joined #ruby
<graft> hi, what's the sweetest way to find the Nth occurrence of a match in a string?
bastilian [bastilian!~bastilian@chello062178156107.9.14.vie.surfer.at] has joined #ruby
friskd [friskd!~friskd@71-95-209-242.static.mtpk.ca.charter.com] has joined #ruby
<rob4h> graft: index of the Nth character, or string after that character?
<Keva161> can anyone help? when i type file.open in a .rb file or in irb im getting - NameError: undefined local variable or method `file' for main:Object - I don't ge wats wrong
<rob4h> file -> File maybe
<Keva161> ArgumentError: wrong number of arguments (0 for 1..3)
thepix [thepix!~pix@as3-16.starogard.dialup.inetia.pl] has joined #ruby
<Mon_Ouie> File.open needs an argument, the name of the file to open
<graft> rob4h: MatchData for the Nth successful match on a String
<Keva161> ah... I knew that.... :)
<Keva161> thanks!
friskd [friskd!~friskd@71-95-209-242.static.mtpk.ca.charter.com] has joined #ruby
kevinbond [kevinbond!~kevinbond@112.50.204.68.cfl.res.rr.com] has joined #ruby
<rob4h> Got to go, have fun guys!
kevinbond_ [kevinbond_!~kevinbond@112.50.204.68.cfl.res.rr.com] has joined #ruby
v0id [v0id!~v0id@nat/hp/x-krmfssbnwwrldqcx] has joined #ruby
davidcelis [davidcelis!~david@c-76-115-58-79.hsd1.or.comcast.net] has joined #ruby
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
aroop [aroop!~aroop@50.46.157.247] has joined #ruby
toy_battery [toy_battery!~choldbroo@c-67-164-29-115.hsd1.ca.comcast.net] has joined #ruby
<shevy> bit off topic ... anyone tried? https://github.com/vesln/issues wonder if it is useful at all for ruby projects in actual practise
fischer [fischer!~franck@25.177.88.79.rev.sfr.net] has joined #ruby
adamjleonard [adamjleonard!~adamjleon@pool-108-9-169-222.tampfl.fios.verizon.net] has joined #ruby
al3xnull [al3xnull!~al3xnull@cpe-76-188-178-7.neo.res.rr.com] has joined #ruby
fischer [fischer!~franck@25.177.88.79.rev.sfr.net] has joined #ruby
r0bby_ [r0bby_!~wakawaka@guifications/user/r0bby] has joined #ruby
<davidcelis> doesn't seem too useful
<davidcelis> but i want to know what his prompt is
<davidcelis> that is a sexy, sexy prompt
mikeric [mikeric!~mike@96.49.104.11] has joined #ruby
<yfeldblum> i think it's the oh-my-zsh cloud theme
<graft> hah... yeah that's pretty sweet
<davidcelis> that issues cli interface looks like all you can do is look at them
<graft> i never thought of having unicode in your prompt, that is so dynamite
<davidcelis> and just the title, at that
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has joined #ruby
<shevy> hahaha
<shevy> you guys are hilarious :D
<shevy> it is basically "hmm... is not so useful, but look at the other things, they are fancy!"
<shevy> "it has pretty colours"
<shevy> I dig this ;)
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
<graft> hey, this is a great use for all those otherwise useless unicode symbols
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
<graft> like, ☃, the snowman character
<graft> which ISO guy did they get drunk to sneak that one in there?
seb_ [seb_!~seb@83.159.77.185] has joined #ruby
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
twock [twock!~twock@rrcs-24-227-222-61.sw.biz.rr.com] has joined #ruby
iamjarvo [iamjarvo!~Adium@c-71-230-13-201.hsd1.nj.comcast.net] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-123-50.columbus.res.rr.com] has joined #ruby
j416 [j416!~j416@unaffiliated/j416] has joined #ruby
stand1357 [stand1357!~worker@l49-155-122.cn.ru] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<j416> a = [ :foo => 1, :bar => 2, :baz => 3 ] # what is a nice way to manipulate the values in this hash in-place? same operation on each
philcrissman_ [philcrissman_!~philcriss@c-174-53-217-149.hsd1.mn.comcast.net] has joined #ruby
<j416> to make, for example: a = [ :foo => 2, :bar => 3, :baz => 4 ]
cousine [cousine!~cousine@196.221.242.180] has joined #ruby
<j416> oops
<graft> a.each { |k,v| a[k] += 1 }
<j416> {} not []
<j416> but you got that
<j416> graft: ok, so I have to look each up again like that
<j416> thought maybe there was a more optimised way
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
<graft> j416: that's not bad... there's no map for hashes, i don't think
<j416> there's map but I think it returns just an array with the values
<graft> yeah
<j416> I'll use what you suggest then
<j416> thanks. :)
ylluminate [ylluminate!~ylluminat@rrcs-24-123-53-166.central.biz.rr.com] has joined #ruby
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
visof [visof!~visof@41.131.133.99] has joined #ruby
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
<visof> hello
<visof> how can i pass a variable to a fiber?
<visof> also how can i use Fiber inside a function?
nicoulaj [nicoulaj!~nicoulaj@pas38-5-82-244-59-208.fbx.proxad.net] has joined #ruby
geef [geef!~king@108-215-232-154.lightspeed.hstntx.sbcglobal.net] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
<geef> does anyone know why this prints 6 numbers instead of 2 arrays? a=[[1,2,3],[4,5,6]]; a.each_index {|n| puts a[n]}
<graft> geef: because puts a[0] will print each member on a separate line
<graft> geef: try, say, puts a[n].join(",")
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
<visof> hello
<visof> none can help?
<visof> or none can understand me?
<visof> or both?
<geef> that works, ty
eko [eko!~eko@unaffiliated/eko] has joined #ruby
rockydogy [rockydogy!6c5a7e3b@gateway/web/freenode/ip.108.90.126.59] has joined #ruby
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has joined #ruby
kevinbond [kevinbond!~kevinbond@68.204.50.112] has joined #ruby
Sansenim [Sansenim!~ablimo@CPE00173f9e6437-CM0012c99cf828.cpe.net.cable.rogers.com] has joined #ruby
Sansenim [Sansenim!~ablimo@CPE00173f9e6437-CM0012c99cf828.cpe.net.cable.rogers.com] has quit [#ruby]
<visof> hi
<visof> i don't want to repeat myself
<visof> please anyone here can help?
<UdontKnow> then dont :)
ale` [ale`!~user@dynamic-adsl-84-221-139-23.clienti.tiscali.it] has joined #ruby
<visof> ok
<robyurkowski> visof: wait another half-hour, re-post your question, and if you don't get an answer, post to stack overflow
badabim [badabim!~badabim@c-98-207-235-20.hsd1.ca.comcast.net] has joined #ruby
<ale`> hi, I'm about to signup at rubygems.org, what should I put in the "handle" field required at signup?
<graft> visof: i don't know what a fiber is
<robyurkowski> ale`: handle is another name for username
<ale`> -_-'
<ale`> thanks robyurkowski
<robyurkowski> np
atmosx [atmosx!~atmosx@191.116.broadband5.iol.cz] has joined #ruby
kaktus [kaktus!~kaktus@tyr.rstack.cc] has joined #ruby
<visof> graft: do you know threads?
mikeric [mikeric!~mike@96.49.104.11] has joined #ruby
<graft> visof: nope
<atmosx> graft: a "thread" is a process that multiply itself, creating a sort of clone(s), in order to execute a task faster.
<atmosx> Let's say you want to scan 254 hosts. Instead of scanning them one at the time, you create 254 threads and wait for all of them to finnish...
<atmosx> there are OS limits on the number of threads you can use and they are "expensive" in terms of cpu and mem usage
<atmosx> + I've read on stack overflow that ruby's implementation of threads if flawed, but since I'm not an expert I have no idea if it's true or not.
<atmosx> I've use them once, it's fairly easy w/ ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
skinnymuch [skinnymuch!~skinnymuc@c-68-36-123-133.hsd1.nj.comcast.net] has quit [#ruby]
pantsman [pantsman!~pantsman@2.27.111.111] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
<graft> atmosx: i know what threads are, i just haven't got much experience with them in ruby
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
colint [colint!~ColinT@187.146.208.69] has joined #ruby
<shevy> graft thread = Thread.new { scan_local_hdd_for_something }
<shevy> graft thread.join
<shevy> and some more threads that could do the same, perhaps with different input
uatecuk [uatecuk!~uatecuk@host-78-146-202-19.as13285.net] has joined #ruby
<Uatec> hi there
pietro [pietro!~pietro@2-227-162-47.ip187.fastwebnet.it] has joined #ruby
colint [colint!~ColinT@187.146.208.69] has joined #ruby
edward_ [edward_!~ipsifendu@c-67-169-223-202.hsd1.or.comcast.net] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
btanaka [btanaka!~textual@173-228-34-51.dsl.dynamic.sonic.net] has joined #ruby
robyurko_ [robyurko_!~robyurkow@184.151.127.172] has joined #ruby
AzizLight [AzizLight!~azizlight@85-168-77-230.rev.numericable.fr] has joined #ruby
<AzizLight> Hi everybody
<graft> haha... Aziz, light!
<epitron> (1..254).map { |n| Thread.new { ping "192.168.0.#{n}" } }.each {|thread| thread.join }
<AzizLight> graft: ;)
<epitron> or .each(&:join)
<AzizLight> I just installed new gems with bundle install --binstubs but now I get a "no such file to load" error because the app doesn't find the installed gems
<AzizLight> so my question is, what should I do from the app side to locate the installed gems please?
baroquebobcat [baroquebobcat!~nick@161.98.13.100] has joined #ruby
thepix [thepix!~pix@as3-16.starogard.dialup.inetia.pl] has joined #ruby
<AzizLight> should I add bin to the include path?
edward_ [edward_!~ipsifendu@c-67-169-223-202.hsd1.or.comcast.net] has joined #ruby
moted [moted!~ryan@c-98-246-106-150.hsd1.or.comcast.net] has joined #ruby
robyurkowski [robyurkowski!~robyurkow@184.151.115.3] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
M4g1c5t0rM [M4g1c5t0rM!~M4g1c5t0r@201.22.190.116.dynamic.adsl.gvt.net.br] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
zenergi_ [zenergi_!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
Keva161_ [Keva161_!~Keva161@78.32.156.143] has joined #ruby
frogstarr78 [frogstarr78!~frogstarr@lan.viviotech.net] has joined #ruby
j3r0m3 [j3r0m3!~j3r0m3@c-76-21-10-192.hsd1.ca.comcast.net] has joined #ruby
zenergi_ [zenergi_!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
graft [graft!~graft@69-12-135-165.dsl.static.sonic.net] has joined #ruby
kf8a [kf8a!~kf8a@dslfw4.mei.net] has joined #ruby
<Boohbah> 129.times { |n| puts "2**#{n} = #{2**n}" }
ryanf [ryanf!~revfitz@adsl-67-122-210-85.dsl.snfc21.pacbell.net] has joined #ruby
Jake232 [Jake232!~textual@5e0e7144.bb.sky.com] has joined #ruby
kumiriko [kumiriko!~komra@97-125-96-220.eugn.qwest.net] has joined #ruby
dustyp_ [dustyp_!~dusty@adsl-69-109-175-61.dsl.pltn13.pacbell.net] has joined #ruby
Locke23rus [Locke23rus!~quassel@128-70-111-50.broadband.corbina.ru] has joined #ruby
drdoooom [drdoooom!~drdoooom@CPE00226b919846-CM0016b5337d04.cpe.net.cable.rogers.com] has joined #ruby
Fezzler [Fezzler!~anonymous@cpe-075-190-168-034.carolina.res.rr.com] has joined #ruby
ZeBordoada [ZeBordoada!~dancluna@187.74.227.193] has joined #ruby
RomD` [RomD`!~Roman@nrbg-4d076bd7.pool.mediaWays.net] has joined #ruby
IrishGringo [IrishGringo!~chatzilla@c-71-229-99-200.hsd1.fl.comcast.net] has joined #ruby
heftig [heftig!jan@shine.heftig.linuxsecured.net] has joined #ruby
Guest61670 [Guest61670!jan@archlinux/developer/heftig] has joined #ruby
cableray [cableray!~cableray@75-145-121-174-Colorado.hfc.comcastbusiness.net] has joined #ruby
rpowell [rpowell!~rpowell@CPE-124-184-229-113.lns11.cht.bigpond.net.au] has joined #ruby
inteq [inteq!~justin.si@adsl-74-190-72-202.asm.bellsouth.net] has joined #ruby
adamjleonard [adamjleonard!~adamjleon@pool-108-9-169-222.tampfl.fios.verizon.net] has joined #ruby
ReTFEF [ReTFEF!JS@cpe-173-88-110-115.columbus.res.rr.com] has joined #ruby
jbhewitt [jbhewitt!~jbhewitt@c122-108-214-224.rochd4.qld.optusnet.com.au] has joined #ruby
<geef> is there a clean way to do a+=5 when a is not initialized?