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/
_whitelogger [_whitelogger!~whitelogg@kaunan.whitequark.org] has joined #ruby
zodiak [zodiak!~stef@cpe-75-84-218-68.socal.res.rr.com] has joined #ruby
x0F__ [x0F__!~x0F@unaffiliated/x0f] has joined #ruby
trend [trend!~craigslis@76.91.169.147] has joined #ruby
IrishGringo [IrishGringo!~chatzilla@c-71-229-99-200.hsd1.fl.comcast.net] has joined #ruby
Behi [Behi!~Behi@203-206-227-95.perm.iinet.net.au] has joined #ruby
nari [nari!~nari@2001:268:306:1:f2de:f1ff:fe55:2de0] has joined #ruby
<robert_>
banisterfiend: I'm trying to turn a list of key/value pairs into a one-deep list of trees. :/
robyurkowski [robyurkowski!~robyurkow@bas2-longueuil15-3096771256.dsl.bell.ca] has joined #ruby
stringoO [stringoO!~JLstring@CPE001346cbe31b-CM00111ae502a8.cpe.net.cable.rogers.com] has joined #ruby
airbrush [airbrush!IceChat7@cpe-174-111-065-180.triad.res.rr.com] has quit [#ruby]
kenperkins [kenperkins!~textual@50-47-18-37.evrt.wa.frontiernet.net] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
Seisatsu [Seisatsu!~seisatsu@2001:5c0:1000:a::8d9] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
<robert_>
what would openstruct do for me?
<Spaceghostc2c>
robert_… Stop you from having to do nasty things with ruby.
<robert_>
yeah only I need to index things
<robert_>
and see if they exist
<Spaceghostc2c>
Whenever I start redefining things for the whole class, I reach for struct or open struct.
<robert_>
ah
<robert_>
how do I find dynamic keysm though?
<robert_>
keys,*
stoffus1 [stoffus1!~stoffus@c-440fe353.016-150-7570701.cust.bredbandsbolaget.se] has joined #ruby
pi3r [pi3r!~pi3r@LSt-Amand-152-32-39-189.w80-11.abo.wanadoo.fr] has joined #ruby
banisterfiend [banisterfiend!~piglittle@118.82.185.158] has joined #ruby
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
malkomalko [malkomalko!~malkomalk@66-234-41-82.nyc.cable.nyct.net] has joined #ruby
Darren_ [Darren_!~textual@41-135-213-173.dsl.mweb.co.za] has joined #ruby
* robert_
pokes Spaceghostc2c
<robert_>
:p
<rippa>
gotta poke 'em all
AxonetBE [AxonetBE!~Adium@d51530F99.static.telenet.be] has joined #ruby
<robert_>
haha
Asher1 [Asher1!~asher@98.158.127.150] has joined #ruby
tvw [tvw!~tv@e176001247.adsl.alicedsl.de] has joined #ruby
Darren_ [Darren_!~textual@41-135-213-173.dsl.mweb.co.za] has quit ["Textual IRC Client: http://www.textualapp.com/"]
<Spaceghostc2c>
robert_… Same way you would with any hash or a class with dynamically defined methods based on a hash?
<rippa>
ksinkar: Enumerable#min_by
<rippa>
and Date#-
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
trivol [trivol!~aurelien@gra94-1-81-57-175-179.fbx.proxad.net] has joined #ruby
sahli [sahli!~sahli@41.224.36.130] has joined #ruby
pen [pen!~pen@2001:288:1001:28:805:68c8:9ca9:2868] has joined #ruby
ghosTM55 [ghosTM55!~user@li279-245.members.linode.com] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-236.lsanca.fios.verizon.net] has joined #ruby
cyph1e [cyph1e!~fredrik@80.86.75.198] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
thecreators [thecreators!~rskagy@cpe-65-27-201-203.cinci.res.rr.com] has joined #ruby
dr_bob [dr_bob!c100f615@gateway/web/freenode/ip.193.0.246.21] has joined #ruby
adeponte_ [adeponte_!~adeponte@pool-173-51-131-236.lsanca.fios.verizon.net] has joined #ruby
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-236.lsanca.fios.verizon.net] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
thecreators [thecreators!~rskagy@cpe-65-27-201-203.cinci.res.rr.com] has joined #ruby
fortysixandtwo [fortysixandtwo!~fortysixa@77.40.186.166] has joined #ruby
nari [nari!~nari@2001:268:306:3:6680:99ff:fe23:576c] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
Proshot [Proshot!~CoreD@546A56AA.cm-12-3b.dynamic.ziggo.nl] has joined #ruby
Darren_ [Darren_!~textual@41-135-213-173.dsl.mweb.co.za] has joined #ruby
xec [xec!~xec@2a00:10b0:1:1002:5ab0:35ff:fef8:6a01] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
bastilian [bastilian!~bastilian@chello213047077012.23.11.vie.surfer.at] has joined #ruby
ikaros [ikaros!~ikaros@studpool-wlan-74-177.fs.fbi.h-da.de] has joined #ruby
giulio [giulio!~giulio@ppp-64-59.26-151.libero.it] has joined #ruby
negative [negative!~Clooth@GYYKMMMDXXIV.gprs.sl-laajakaista.fi] has joined #ruby
vtr [vtr!~rockhampt@unaffiliated/vtr] has joined #ruby
<Gekz>
good module for building xml documents?
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
Shrink [Shrink!sgupta@redhat/shrink] has joined #ruby
Darren_ [Darren_!~textual@41-135-213-173.dsl.mweb.co.za] has joined #ruby
kyrylo [kyrylo!~kyrylo@46.118.230.121] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<dr_bob>
builder ?
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
fridim_ [fridim_!~fridim@2a01:e35:2ece:f2d0:223:4eff:fe6c:c754] has joined #ruby
thecreators_ [thecreators_!~rskagy@cpe-65-27-201-203.cinci.res.rr.com] has joined #ruby
nari [nari!~nari@2001:268:306:3:6680:99ff:fe23:576c] has joined #ruby
chrismcg [chrismcg!~chrismcg@pdpc/supporter/active/chrismcg] has joined #ruby
crankyco_ [crankyco_!~crankycod@24-246-44-226.cable.teksavvy.com] has joined #ruby
zastaph [zastaph!zastaph@unaffiliated/zastaph] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
t-mart [t-mart!~t-mart@c-76-108-173-224.hsd1.fl.comcast.net] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
arman_ [arman_!~arman@99-100-33-0.lightspeed.sntcca.sbcglobal.net] has joined #ruby
hurikhan|Work [hurikhan|Work!~kakra@82-198-195-142.briteline.de] has joined #ruby
jbhewitt [jbhewitt!~jbhewitt@1.152.136.145] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
MittRomney2012 [MittRomney2012!MittRomney@jakarta.infinity-online.co.id] has joined #ruby
BrightSpark [BrightSpark!182b22f7@gateway/web/freenode/ip.24.43.34.247] has joined #ruby
sgronblo [sgronblo!~sgronblom@218.223.19.176] has joined #ruby
<sgronblo>
What is this $" variable?
kloeri [kloeri!~kloeri@freenode/staff/exherbo.kloeri] has joined #ruby
asQuirreL [asQuirreL!~amenon@93-96-10-147.zone4.bethere.co.uk] has joined #ruby
esme [esme!~esme@unaffiliated/esme] has joined #ruby
pen [pen!~pen@140.112.30.132] has joined #ruby
mindgame [mindgame!~nfxgosu@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby
heeton [heeton!~heeton@5acc7cef.bb.sky.com] has joined #ruby
giulio [giulio!~giulio@adsl-ull-86-206.50-151.net24.it] has joined #ruby
tk_ [tk_!~tk@p083061.doubleroute.jp] has joined #ruby
nari [nari!~nari@raichu.3in.ne.jp] has joined #ruby
jensn [jensn!~Jens@90-229-211-15-no150.tbcn.telia.com] has joined #ruby
jonathan___ [jonathan___!~jonathan@121.32.102.231] has joined #ruby
AxonetBE [AxonetBE!~Adium@d51530F99.static.telenet.be] has joined #ruby
AxonetBE1 [AxonetBE1!~Adium@d51530F99.static.telenet.be] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@27.142.96.128] has joined #ruby
ghosTM55 [ghosTM55!~user@li279-245.members.linode.com] has joined #ruby
cyri_ [cyri_!~cyri_@236.200.72.86.rev.sfr.net] has joined #ruby
xjiujiu [xjiujiu!~quassel@218.77.14.195] has joined #ruby
LairK [LairK!~sleclercq@darkstar2.fullsix.com] has joined #ruby
Shrink [Shrink!sgupta@redhat/shrink] has joined #ruby
xjiujiu [xjiujiu!~quassel@218.77.14.195] has joined #ruby
xissburg [xissburg!~xissburg@189.102.48.152] has joined #ruby
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has joined #ruby
niko [niko!~niko@freenode/staff/ubuntu.member.niko] has joined #ruby
xissburg [xissburg!~xissburg@189.102.48.152] has joined #ruby
demian`_ [demian`_!~demian_@80.149.254.69] has joined #ruby
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby
nari [nari!~nari@2001:268:306:1:f2de:f1ff:fe55:2de0] has joined #ruby
jonathan____ [jonathan____!~jonathan@121.32.102.231] has joined #ruby
bosphorus [bosphorus!~bosphorus@81.214.127.71] has joined #ruby
thecreators [thecreators!~rskagy@cpe-65-27-201-203.cinci.res.rr.com] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
Kanolesic [Kanolesic!~Kanolesic@c-24-218-140-224.hsd1.ma.comcast.net] has joined #ruby
kirun [kirun!~kirun@78-86-154-194.zone2.bethere.co.uk] has joined #ruby
randym [randym!~randym@EM1-112-27-91.pool.e-mobile.ne.jp] has joined #ruby
clockwize [clockwize!~clockwize@81.19.48.130] has joined #ruby
plug918 [plug918!~Adium@W80247JPAGU-VHB09.LAW.NYU.EDU] has joined #ruby
kawa_xxx [kawa_xxx!~kawa_xxx@d307ba3b.t-net.ne.jp] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
d2dchat [d2dchat!~d2dchat@c-98-209-18-197.hsd1.mi.comcast.net] has joined #ruby
ikaros [ikaros!~ikaros@studpool-wlan-74-177.fs.fbi.h-da.de] has joined #ruby
IrishGringo [IrishGringo!~chatzilla@c-71-229-99-200.hsd1.fl.comcast.net] has joined #ruby
technikhil [technikhil!~technikhi@117.199.0.49] has joined #ruby
markuss [markuss!~chatzilla@193.120.165.15] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
Sliker [Sliker!~ponies@31.185.187.190] has joined #ruby
<markuss>
I have this error ! /usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
<markuss>
anyone help ?
ksinkar [ksinkar!~ksinkar@117.195.99.7] has joined #ruby
dbgster [dbgster!~dbgster@CPE0013f7b7170c-CM0013f7b71708.cpe.net.cable.rogers.com] has joined #ruby
rbanffy [rbanffy!~rbanffy@187.31.77.7] has joined #ruby
Tachyon [Tachyon!tach@tachnb.kolej.mff.cuni.cz] has joined #ruby
cousine [cousine!~cousine@196.218.42.9] has joined #ruby
ilteris__ [ilteris__!~ilteris_@cpe-67-244-14-59.nyc.res.rr.com] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
<banisterfiend>
anyone here use bacon?
asQuirreL [asQuirreL!~amenon@93-96-10-147.zone4.bethere.co.uk] has joined #ruby
<mindgame>
what to you type to go back a directory in cmd
andywww [andywww!~cakephp@109.239.101.148] has joined #ruby
<andywww>
forgive the laziness but is there a function in ruby that i can pass a hash to and it will build me a set of encoded url variables?
<andywww>
i've been having a good look round the CGI lib and can't find it
canton7 [canton7!~canton7@95.150.107.113] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
<rippa>
never ate bacon
<rippa>
mindgame: to go up a level?
Adman65 [Adman65!~Adman65@cs181188119.pp.htv.fi] has joined #ruby
nanderoo [nanderoo!~nanders@38.124.137.226] has joined #ruby
p0y [p0y!~p0y@180.190.181.18] has joined #ruby
jbhewitt [jbhewitt!~jbhewitt@1.152.136.145] has joined #ruby
tessi [tessi!~tessi@pdpc/supporter/student/tessi] has joined #ruby
linusoleander [linusoleander!~linus@h254n3c1o1042.bredband.skanova.com] has joined #ruby
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<linusoleander>
Does anyone know if the host param to UDPSocket#send must be a domain, or does it work with domain + path?
otters [otters!~incluye@LO1-ESR-74-215-187-208.fuse.net] has joined #ruby
maasha [maasha!82e1d37e@gateway/web/freenode/ip.130.225.211.126] has joined #ruby
andywww [andywww!~cakephp@109.239.101.148] has quit [#ruby]
<maasha>
I have a hash of arrays. I want the total sum of elements in all the arrays. How?
<maasha>
something Hash.values.collect {}
<maasha>
?
renanoronfle [renanoronfle!~renanoron@189.102.48.152] has joined #ruby
<banister_>
maasha: hash.values.flatten.inject(:+
Jrz [Jrz!~jrz@87.239.184.141] has joined #ruby
<banister_>
)
<maasha>
flatten
<banister_>
maasha: you need more than just flatten
Raboo [Raboo!~rabi@nikson.dataphone.se] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-236.lsanca.fios.verizon.net] has joined #ruby
<Raboo>
have anyone succeeded in compiling ruby as a static binary?
adeponte_ [adeponte_!~adeponte@pool-173-51-131-236.lsanca.fios.verizon.net] has joined #ruby
amacgregor [amacgregor!~amacgrego@CPE00222dcb0a53-CM00222dcb0a4f.cpe.net.cable.rogers.com] has joined #ruby
NStojan [NStojan!~NStojan@ppp-94-65-56-196.home.otenet.gr] has joined #ruby
<Tasser>
Raboo, why would you?
<Raboo>
cross-compability against different distributions with one rpm package
<`brendan>
best self-hosted git repo?
<`brendan>
gitosis?
<Tasser>
`brendan, #git
<`brendan>
looking to set one up on a centos box
<`brendan>
blah!
<Tasser>
Raboo, you kind of kill the puropose of package managers, do you?
Richlv [Richlv!~rich@87.110.183.173] has joined #ruby
renanoronfle [renanoronfle!~renanoron@189.102.48.152] has joined #ruby
<Raboo>
Tasser acutally no, i want to kill the purpose in having a two diffrent repository for one application, that should be running on two distributions
senny [senny!~senny@edge.garaio.com] has joined #ruby
<Richlv>
i did "gem install json" as a non-root user. "gem uninstall json" now complains that it can't find that gem. can i just nuke ~/.gem ?
<Tasser>
Raboo, well, if you ship something static, you do.
<Raboo>
Tasser the problem is that SUSE names it's /lib64/libcrypto.so.1.0.0 and RH names it /usr/lib64/libcrypto.so.10
<Raboo>
well this ruby package are not going to be in /usr
<Raboo>
it's going to be in /opt and deployed with another application
<Tasser>
Raboo, iirc you don't link static paths, do you?
ni-ka [ni-ka!~Nils@i577BE30A.versanet.de] has joined #ruby
catphish [catphish!~catphish@2001:9d8:2005:11:222:15ff:fe88:aae2] has joined #ruby
<Raboo>
hmm, i don't understand that.. "link static paths"
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
<Tasser>
hmm, stupid. Your problem is with linking, right?
<Raboo>
as in symbolic links? i can't do that, tried it
renanoronfle [renanoronfle!~renanoron@189.102.48.152] has joined #ruby
<Raboo>
when using RPM it needs to be in a "database" of installed files
<Tasser>
nah, as in ldd
<Tasser>
ah well, I've got no clue of dynamic linking
<Raboo>
ah then yes
<catphish>
is Kernel#system similar to fork;exec;wait or does it work in a different way?
<Raboo>
ldd shows something like /path/library
<Tasser>
catphish, I'm not sure wherever exec does use a shell
<Tasser>
Raboo, the question is more like wherever you can trick the dynamic linking to accept more than one possible path
<catphish>
Tasser: i meant in broader terms, does it still fork and exec?
<catphish>
or does it use something else to create a genuinely new process?
ni-ka [ni-ka!~Nils@i577BE30A.versanet.de] has joined #ruby
<Raboo>
Tasser i have no idea if thats possible.. cause when the RPM is packaged it adds those ldd paths as requires
<Tasser>
Raboo, oh, interessting. I usually did that by hand.
<Tasser>
looks like rpm is too intelligent ;-)
<shevy>
rpm is like an invasion from aliens
ikaros [ikaros!~ikaros@studpool-wlan-74-177.fs.fbi.h-da.de] has joined #ruby
radic [radic!~radic@dslb-094-216-226-128.pools.arcor-ip.net] has joined #ruby
<Raboo>
Tasser what i don't understand that not more ppl are frustrated by this. Some people have tried, failed and given up.
tomobrien [tomobrien!~tomobrien@host-92-19-100-183.as13285.net] has joined #ruby
<Tasser>
Raboo, that's not an issue that should be solved by static compiling imo
bbrandon [bbrandon!~brandon@cpe-174-097-242-015.nc.res.rr.com] has joined #ruby
<shevy>
Raboo distributions are the root of all evil in linux, in essence
<shevy>
everyone's using their own package manager and their own format and they all love to purposely stay incompatible to one another
<Raboo>
the thing is in many enterprise "solutions" you see whatever is needed to be bundled with the "solution". For instance an application requireing java, comes bundled with java and placed under it's own directory under /opt
ni-ka1 [ni-ka1!~Nils@i577BE30A.versanet.de] has joined #ruby
<Raboo>
but i haven't seen it that much with ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
<Raboo>
but that's to old and it ain't working now
<shevy>
yeah but its been some years, I am not sure if he is still using ruby at all
<Tasser>
Raboo, debian/ubuntu should do the trick? :-)
nari [nari!~nari@p929512.totrnt01.ap.so-net.ne.jp] has joined #ruby
<Raboo>
Tasser i'm using a mixed envrionment of redhat/centos/suse/ubuntu with ubuntu as a only small fraction of the servers
<Tasser>
argh
ni-ka [ni-ka!~Nils@i577BE30A.versanet.de] has joined #ruby
<Tasser>
why the different oses?
<Raboo>
diffrent customers
<Raboo>
when they outsource their environments we usually don't start with breaking their solutions
<Tasser>
oh
<Raboo>
sure, if we setup a new environment we use rhel or centos
<Raboo>
or perhaps solaris, depending on the purpose
kyrylo [kyrylo!~kyrylo@46.118.230.121] has quit ["WeeChat 0.3.6"]
<Raboo>
i forgot to mention that we have some aix and hp-ux aswell.. and 1 freebsd.
tomzx [tomzx!~tomzx@dsl-132-26.aei.ca] has joined #ruby
<shevy>
all very homogenous!
<Raboo>
try building a solution where you can deploy puppet across all that...
<sapht>
anybody care to give me a quick few hints regarding mac os ruby packaging? i want to use a recent package available on github. i currently use ruby1.9 via macports, and i installed a gem again via macports. it seems macports automatically set up all the include paths when running its ruby binary
Richlv [Richlv!~rich@87.110.183.173] has quit [#ruby]
<sapht>
so i'm thinking, maybe i should compile ruby to /usr/local or /usr/bin instead, and install gems there? because i can't install gems to the macports root path
kf8a [kf8a!~kf8a@user-33c730.user.msu.edu] has joined #ruby
<shevy>
what I tend to do on github usually is to click on download, extract and then install it... via setup.rb usually
<shevy>
what is "gem env" showing for GEM PATH?
<shevy>
for me it is /usr/lib/ruby/gems/1.8
<Tasser>
Raboo, ah well, puppet... I still wonder why the heck they had to build their own language for configuring
<shevy>
not sure about 1.9.x
<sapht>
/opt/local/lib/ruby1.9/gems/1.9.1
<sapht>
since i installed using macports
<sapht>
oh, gempaths are
<sapht>
~/.gem/ruby/1.9.1 and /opt/local/lib/ruby1.9/gems/1.9.1
<sapht>
so i guess i can just install it locally for my user :) it appears this package does not have a setup.rb, though... it's https://github.com/rkumar/rbcurse
earcar [earcar!~earcar@145.116.231.100] has joined #ruby
<Raboo>
Tasser well i'm going to curse a bit. There are no good "management+deployment" tools for *nix.. Only windows has complete packaged solutions...
pen [pen!~pen@dhcp1.csie.ntu.edu.tw] has joined #ruby
Kambus [Kambus!~kambus@81-0-126-22.pool.invitel.hu] has joined #ruby
<Tasser>
Raboo, I suppose that's due to package managers
<sapht>
is rvm the standard for ruby management on mac os x?
<shevy>
many people use rvm
<shevy>
in the hope that it simplifies their life
<shevy>
Raboo, yeah and there will always be package-specific solutions :(
<shevy>
*package manager-specific
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
pyr0milkz [pyr0milkz!~samy@41.141.18.133] has joined #ruby
Kanolesic [Kanolesic!~Kanolesic@c-24-218-140-224.hsd1.ma.comcast.net] has joined #ruby
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
<sapht>
so which way of installing ruby is least likely to give me a headache? macports, self-configured, rvm, something else?
<sapht>
because macporpts is giving me plenty 'o headache.
<shevy>
sapht dunno
<shevy>
I compile from source into /Programs/Ruby/#{Version} and thus have no need for RVM
stringoO [stringoO!~JLstring@CPE001346cbe31b-CM00111ae502a8.cpe.net.cable.rogers.com] has joined #ruby
<sapht>
how'd you set up gempath and similar? just modifying your profile?
<Raboo>
Tasser that part is almost covered.. for instance puppet can handle packetmanagers across diffrent OS and linux distributions. I can only speak for the community edition.. There are no bundled puppet+ruby+dependencies solution. Also puppet does not do patch management even though it has all the parts needed for it to work..
<shevy>
hmm
<shevy>
sapht good question. cant remember having needed to fiddle with gem path actually ...
<Raboo>
so you have puppet to manage lots of servers. and for patch management you have spacewalk/satelite for redhat and solaris. something else for suse. something else for hp-ux etc etc.
<sapht>
well, in that case, it sounds things are going to be simple no matter how i do them
<Raboo>
Tasser you mentioned that you manually change dynamic linking.. how do you do that?
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
philcrissman [philcrissman!~philcriss@12.32.95.3] has joined #ruby
<sapht>
when i run "require 'foo'", where does ruby look for "foo"? gempath only?
<workmad3>
sapht: it looks through the load path
tintin [tintin!~manhunter@unaffiliated/manhunter] has joined #ruby
<tintin>
is ruby written in C?
<clockwize>
tintin: yes
<workmad3>
tintin: no
<sapht>
workmad3: how can i find out the value of load path?
<workmad3>
(depends on the interpreter)
<workmad3>
sapht: $:
<sapht>
ty
<tintin>
is ruby implemented in C?
<clockwize>
ok, MRI is written in C
<workmad3>
tintin: which interpreter?
<sapht>
ruby has multiple implementations
<clockwize>
default=MRI
esparkman [esparkman!~esparkman@unaffiliated/esparkman] has joined #ruby
<tintin>
i mean which language has been used to make ruby
<Tasser>
Raboo, wouldn't know how to, should be possible
<sapht>
japanese mostly
<workmad3>
tintin: and that's what we're saying... it isn't 'one' language
<Tasser>
tintin, there, mri (in c), rubinius (in c++), java (jruby)
<workmad3>
tintin: there are multiple implementations of ruby
codefriar [codefriar!~codefriar@ip-200.it.rdu.bandwidth.com] has joined #ruby
<clockwize>
tintin: ruby is a language, which is executed by many different interpreters
<clockwize>
the default interpreter is MRI, which is written in C
<tintin>
what is MRI?
<workmad3>
clockwize: I wouldn't say 'default' myself ;)
<tintin>
i'm not talking about jruby
<workmad3>
clockwize: it's the most common one
<workmad3>
not some sort of 'defalt'
<clockwize>
workmad3: depends what version of ruby we are talking about :p
<Tasser>
clockwize, let's see how long it takes until rubinius is the default one ;-)
<clockwize>
as a starting point. it explains and links to other implementations
<workmad3>
tintin: basically though, you're asking a question that has multiple 'correct' answers so you need to be more specific as to which ruby implementation you mean
<workmad3>
Tasser: do you reckon that'll be before or after rubinius is entirely ruby code? :)
<headius>
jruby rocks
<shevy>
workmad3 it's been years with rubinius and still no 1.9.x!
<Tasser>
workmad3, before, afterwards it's too slow ;-)
<clockwize>
<3 my boss... excerpt from his xmas email: It’s Christmas so we’ll be closing the office (except the bar!) at 3pm tomorrow. If you still have stuff to do, sorry, of course you can continue but please try not to...
<workmad3>
Tasser: well, it's mostly ruby with some C++ now, and I've not heard that it's too slow :)
<workmad3>
but the 1.9 support is still needed
<workmad3>
clockwize: heh :)
<Tasser>
workmad3, yeah, but the VM in ruby... I'm not exactly sure
Manhose [Manhose!~Manhose@bl15-137-8.dsl.telepac.pt] has joined #ruby
<workmad3>
Tasser: it's whether you class the VM as 'ruby' or not I guess
kuadrosx [kuadrosx!~quassel@186.30.193.127] has joined #ruby
<Tasser>
workmad3, ah, if you don't, I'll take the guess it's after they implement encoding
heeton [heeton!~alexheato@92.40.254.101.threembb.co.uk] has joined #ruby
<shevy>
hehehe
<heeton>
What's the name of that ruby tool that makes it easier to do command-line stuff?
<workmad3>
heeton: last I did anything on that front, I still used highline... pretty sure there's nice stuff now though :)
<heeton>
high line! that's it :P
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby
<heeton>
I'm making a text-adventure game, on the command line
<heeton>
wanted a gem to simplify things
<heeton>
I wonder if there are any better alternatives now?
<heeton>
Anyone know of alternatives then?
<workmad3>
heeton: you might want to look at something that wraps around NCurses then
dcarper [dcarper!~dcarper@50-73-187-102-pennsylvania.hfc.comcastbusiness.net] has joined #ruby
<shevy>
ewww
<shevy>
ncurses
<workmad3>
shevy: not to use directly... something nice and ruby-esque around it :P
<shevy>
hmm
<shevy>
would be sweet if that would exist
<tintin>
ruby is a hibrid language
<shevy>
something that maps the actions to logical parts. table ... form fields... anything
<workmad3>
tintin: not at all
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby
<shevy>
and not ... .initscr
<shevy>
or whatever was those crazy names
<workmad3>
tintin: however, because it's interpreted, there are multiple choices for the language implementing the interpreter
evantravers [evantravers!~textual@fw.luckie.net] has joined #ruby
<tintin>
isn't there a compiler for rub?
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
<shevy>
please
<shevy>
try to be serious
<shevy>
"rub"
<shevy>
"hibrid"
<shevy>
what the heck!
<workmad3>
tintin: I've not come across a compiler... although with 1.9 using YARV (which is a bytecode compiler and VM for ruby) the potential exists
dyer_ [dyer_!~dyer@nmd.sbx08202.alphaga.wayport.net] has joined #ruby
dyer_ [dyer_!~dyer@unaffiliated/dyer] has joined #ruby
Behi [Behi!~Behi@CPE-120-144-47-154.lnse5.win.bigpond.net.au] has joined #ruby
colint [colint!~ColinT@64.9.156.5] has joined #ruby
<shevy>
you know something is odd
<Tasser>
workmad3, wasn't there a compiled dynamic language?
<shevy>
when I use google, I can often find subpages of some projects faster than when I use the site navigation
<shevy>
best example right now - cygwin
tbird72 [tbird72!~anonymous@user-e5274a.user.msu.edu] has joined #ruby
<shevy>
I was navigating through it for a while and could not find it... then I googled for "installing cygwin offline" and got to the page I neede
<shevy>
makes you think a lot about site-design when google beats that... :/
tintin [tintin!~manhunter@unaffiliated/manhunter] has quit [#ruby]
csavola [csavola!~csavola@76-10-149-67.dsl.teksavvy.com] has joined #ruby
awesome [awesome!~awesome@212.62.202.84.customer.cdi.no] has joined #ruby
<sapht>
so, i've got this package, rbcurse, that has no setup.rb, no INSTALL.txt, and the makefile just makes a tarball. it's available as a gem, but i want the most recent version
<Tasser>
sapht, file a bug you want a .gemspec
<sapht>
i can't be bothered to do that, i just want to use the lib
<Tasser>
or read the makefile
<sapht>
which obv. is possible since it's available as a gem
<sapht>
the makefile just makes a tar of all the files, that's it
tbird72 [tbird72!~anonymous@user-e5274a.user.msu.edu] has quit [#ruby]
<Tasser>
write a .gemspec
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
<sapht>
alright, i'll get to it then. on another note, is there any other way to use the package? i mean, it must be possible to require code relatively, not just from gempath?
<Raboo>
ok, how about this. is it possible to only staticly link openssl?
<Raboo>
into ruby binary
<Tasser>
sapht, require_relative ?
<Tasser>
Raboo, study gcc options
<sapht>
Tasser: alright, is it somewhat similar to python's import?
<sapht>
i.e. standard for multi-file projects
<Tasser>
sapht, if it's a gem, you trust the package manager to setup paths for you
<sapht>
but if it ain't, say this small project of mine grows beyond one file and i start putting classes in new files
<sapht>
am i intended to use require_relative?
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
<Tasser>
it's possible to use, but people often put those in lib/ and tell the binary to either require_relative or add the lib/ to the $LOAD_PATH
bbrandon [bbrandon!~brandon@cpe-174-097-242-015.nc.res.rr.com] has joined #ruby
<sapht>
ah, that makes sense. is it prefered to modify load_path via env or inside ruby?
djdb [djdb!~digitalbo@linux.minsk.tutby.com] has joined #ruby
<Tasser>
inside your binaries
<sapht>
fantastic, i think i get it now. thanks
kuadrosx [kuadrosx!~quassel@190.25.154.183] has joined #ruby
rippa [rippa!~rippa@93-181-234-159.adsl.yaroslavl.ru] has joined #ruby
linoj [linoj!~linoj@sn1-pat-1.m2s.com] has joined #ruby
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
<sapht>
when installing the gem, can i specify the directory? i'd rather install it in ~
asobrasil [asobrasil!~asantioli@palpatine.privatedns.com] has joined #ruby
Jake232 [Jake232!~textual@5e093b45.bb.sky.com] has joined #ruby
robyurkowski [robyurkowski!~robyurkow@64.254.250.82] has joined #ruby
tomasantonj [tomasantonj!~Adium@host-95-199-8-179.mobileonline.telia.com] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby
minijupe [minijupe!~benlieb@adsl-74-243-170-54.ard.bellsouth.net] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
zalesz [zalesz!~zalesz@119-057-129.adsl.szeptel.net.pl] has joined #ruby
tvw [tvw!~tv@212.79.9.150] has joined #ruby
conor_ireland [conor_ireland!~conor_ire@89.100.121.49] has joined #ruby
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
LairK [LairK!~sleclercq@darkstar2.fullsix.com] has quit ["Ex-Chat"]
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
tomobrien [tomobrien!~tomobrien@host-92-19-100-183.as13285.net] has joined #ruby
bluOxigen [bluOxigen!~noreply@unaffiliated/bluOxigen] has joined #ruby
xissburg [xissburg!~xissburg@189.102.48.152] has joined #ruby
macabre [macabre!~macabre@63.133.215.18] has joined #ruby
xissburg [xissburg!~xissburg@189.102.48.152] has joined #ruby
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has joined #ruby
kennethr_ [kennethr_!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has quit [#ruby]
theRoUS [theRoUS!KenCoar@apache/committer/coar] has joined #ruby
p0y [p0y!~p0y@112.210.56.233] has joined #ruby
RomD [RomD!~Roman@nrbg-4d0704ba.pool.mediaWays.net] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
akem_ [akem_!~akem@164.15.85.79.rev.sfr.net] has joined #ruby
akem_ [akem_!~akem@unaffiliated/akem] has joined #ruby
p0y_ [p0y_!~p0y@182.18.249.85] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
dazoakley [dazoakley!~dazoakley@hocuspokus.vm.bytemark.co.uk] has joined #ruby
JStoker [JStoker!jstoker@unaffiliated/jstoker] has joined #ruby
milkpost [milkpost!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
bbttxu [bbttxu!~adam@pool-71-96-208-205.dfw.dsl-w.verizon.net] has joined #ruby
mk03 [mk03!~mk03@123.230.48.3.er.eaccess.ne.jp] has joined #ruby
jamiei [jamiei!~Sav@jamiei.net] has joined #ruby
jamiei [jamiei!~Sav@jamiei.net] has quit [#ruby]
Brozilla [Brozilla!~Brozilla@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
techhelp [techhelp!~Dan@firebox.rsmart.com] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby
vmatiyko [vmatiyko!~vmatiyko@178.121.247.110] has joined #ruby
Tachyon [Tachyon!~tach@81.200.61.23] has joined #ruby
tobym [tobym!~tobym@pool-173-56-80-136.nycmny.fios.verizon.net] has joined #ruby
pen [pen!~pen@140.112.30.132] has joined #ruby
alex__c2022 [alex__c2022!~alex@207.239.64.154] has joined #ruby
kennethr_ [kennethr_!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
technikhil [technikhil!~technikhi@117.199.0.49] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby
pootpoot [pootpoot!~pootpoot@38.108.250.130] has joined #ruby
atmosx [atmosx!~atmosx@79.103.249.127.dsl.dyn.forthnet.gr] has joined #ruby
<atmosx>
Hello fellas
<atmosx>
is there any apparent reason y this begin/rescue does not work properly? Apparently the code does not 'retry' anymore… http://pastebin.com/bFcyxMUs
<samuelkadolph>
pastebin sucks
steph021 [steph021!~steph021@unaffiliated/steph021] has joined #ruby
Trevoke [Trevoke!~e3@out.skarven.net] has joined #ruby
<Trevoke>
Hi all, is there a way to check for a stale NFS mount using Ruby? I know you can write a C program and check for ESTALE, and I know there is Errno::ESTALE in Ruby core, but I don't know how to leverage it.
petercoulton [petercoulton!~petercoul@cpc1-midd16-2-0-cust160.11-1.cable.virginmedia.com] has joined #ruby
ckrailo [ckrailo!~ckrailo@208.86.167.247] has joined #ruby
<samuelkadolph>
Trevoke: If calling a method on a fd in that mount raises Errno::ESTALE, you can just rescue it
<Trevoke>
samuelkadolph, hmm. Thanks. Sounds like it may not be very easy to just have a script that checks for stale NFS mounts, unless I know that each mount has a particular FD I can check...
v0n [v0n!~v4n@2607:fad8:4:0:21e:8cff:fe4d:2f7d] has joined #ruby
<samuelkadolph>
I don't know how you'd check in C but you could always write a c extension to do it
p0y [p0y!~p0y@121.96.188.176] has joined #ruby
<Trevoke>
Fair enough. Thanks. I need to play with this.
<Trevoke>
Would you by sheer luck know a way to create a stale mount on purpose?
jgdar [jgdar!~geronimo@201.248.104.92] has joined #ruby
<samuelkadolph>
I don't know what makes an NFS mount go stale but I would guess stopping the server or disabling your network interface might do it.
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.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
<Trevoke>
Thanks. I'll see if I can find something a little less destructive.. Or I'll use a VM. Hey! Thanks for the idea! :)
codefriar [codefriar!~codefriar@ip-200.it.rdu.bandwidth.com] has joined #ruby
nari [nari!~nari@p929512.totrnt01.ap.so-net.ne.jp] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]
LiquidInsect [LiquidInsect!~billabney@173-228-63-32.dsl.static.sonic.net] has joined #ruby
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
pen [pen!~pen@g1pc2n249.g1.ntu.edu.tw] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@rrcs-71-43-23-18.se.biz.rr.com] 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
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
luxurymode [luxurymode!~luxurymod@rrcs-184-75-21-21.nyc.biz.rr.com] has joined #ruby
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
jwmann [jwmann!~Adium@modemcable242.110-201-24.mc.videotron.ca] has joined #ruby
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
austinbv [austinbv!~austinbv@rrcs-24-73-203-202.se.biz.rr.com] has joined #ruby
saschaheylik [saschaheylik!~sascha@80-121-61-84.adsl.highway.telekom.at] has joined #ruby
voodoofish430 [voodoofish430!~mtorres@208.76.2.200] has joined #ruby
mikeg [mikeg!~mglenney@nat-uh-admins.apollogrp.edu] has joined #ruby
<saschaheylik>
hm when i require 'something' it wont find it unless i require './something'
nowthatsamatt_ [nowthatsamatt_!~nowthatsa@rrcs-71-43-23-18.se.biz.rr.com] has joined #ruby
<saschaheylik>
something is in the current directory
<heftig>
the current directory is not in the search path since 1.9
<heftig>
require_relative will require relative to the source file, not the CWD
mmokrysz [mmokrysz!~mmokrysz@host81-151-158-124.range81-151.btcentralplus.com] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
vandemar [vandemar!syndicate@2001:470:1f10:56b::4] has joined #ruby
<Brozilla>
or run ruby with the -I flag
eldariof [eldariof!~CLD@81.200.24.174] has joined #ruby
Kanolesic [Kanolesic!~Kanolesic@c-24-218-140-224.hsd1.ma.comcast.net] has joined #ruby
zakwilson [zakwilson!~quassel@c-69-180-70-100.hsd1.fl.comcast.net] has joined #ruby
luckman212 [luckman212!~irc@pool-108-41-8-176.nycmny.fios.verizon.net] has joined #ruby
fennec [fennec!~ff@wikipedia/Fennec] has joined #ruby
p0y_ [p0y_!~p0y@182.18.249.85] has joined #ruby
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby
Jake232 [Jake232!~textual@5e0eda37.bb.sky.com] has joined #ruby
skaczor [skaczor!~quassel@mail.prognosoft.biz] has joined #ruby
lofic [lofic!~lofic@85-170-253-195.rev.numericable.fr] has joined #ruby
<lofic>
does a ruby module name always start with [A-Z] ?
dyer_ [dyer_!~dyer@unaffiliated/dyer] has joined #ruby
nilmethod [nilmethod!~nilmethod@24.248.215.40] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
letuboy [letuboy!~paul@208-104-128-86.rhhe1.2wcm.comporium.net] has joined #ruby
savage- [savage-!~savage-@209.118.197.220] has joined #ruby
<rippa>
lofic: generally yes
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
bier|tp [bier|tp!~bier@p54A59B5E.dip.t-dialin.net] has joined #ruby
<lofic>
I need to be sure :)
bier [bier!~bier@p54A59B5E.dip.t-dialin.net] has joined #ruby
dasfugufish [dasfugufish!~Adium@174-27-233-214.slkc.qwest.net] has joined #ruby
Tuxist [Tuxist!~quassel@dyndsl-031-150-009-117.ewe-ip-backbone.de] has joined #ruby
<lofic>
what can it be also in edge cases ?
<Clooth>
Im building a gem. It's working with no problems, but I just started to wonder if there was a way of not needing ALL the requires in my main gem_name.rb, but instead require them in the main lib/foo/feature.rb. Say lib/foo/feature/ding.rb is a file that feature.rb uses, and I want to require that in feature.rb instead of gem_name.rb
<rippa>
you can create a module with Module.new
<rippa>
and assign it to any variable
<Clooth>
eh that sounds overly complex as an explanation
<rippa>
a = Module.new
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
<lofic>
mmm
<Clooth>
I think an easier way to ask my question is
<lofic>
but in a definition in a themodule.rb file ?
rickmasta [rickmasta!~rickmasta@pool-108-21-213-102.nycmny.fios.verizon.net] has joined #ruby
<Clooth>
do I HAVE to require all the files the gem uses in this file? is there another way?
Jay_Levitt [Jay_Levitt!~Jay_Levit@c-24-63-250-125.hsd1.ma.comcast.net] has joined #ruby
<Clooth>
if I try to require them from within the partyhat/foo.rb files, it won't find them
<Clooth>
do I have to define a load path or in some way recursively require all files in the gem?
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has quit [#ruby]
thone_ [thone_!~thone@g226033252.adsl.alicedsl.de] has joined #ruby
markuss [markuss!~chatzilla@193.120.165.15] has joined #ruby
<markuss>
hey guys
<markuss>
IM getting this ERROR /usr/local/rvm/gems/ruby-1.9.3-p0/gems/RedCloth-4.2.5/lib/redcloth.rb:10: Use RbConfig instead of obsolete and deprecated Config.
<markuss>
any ideas how to to resolve this redcloth doesnt seem to want to play nice with 1.9.3
<markuss>
the program it using needs RedCloth 4.2.5
mafolz [mafolz!~mafolz@dhcp50-210.start.uni-saarland.de] has joined #ruby
<markuss>
any genius's in tha house ?
malkomalko [malkomalko!~malkomalk@adfb4f22.cst.lightpath.net] has joined #ruby
Gushings [Gushings!~Adium@70.42.157.21] has joined #ruby
<samuelkadolph>
markuss: That's a warning, you can ignore it.
Cervajz [Cervajz!~Cervajz@opensuse/member/Cervajz] has joined #ruby
kenperkins [kenperkins!~textual@174-24-164-49.tukw.qwest.net] has joined #ruby
davidcelis [davidcelis!~david@12.69.234.130] has joined #ruby
<markuss>
thanks !!
tehdekan [tehdekan!~tehdekan@66.7.121.170] has joined #ruby
<markuss>
is there any way to stop the warning from showing ?
<theRoUS>
does anyone know how to 'fake' method documentation in rdoc? i need to document some methods which aren't actually defined until run-time..
jbpros [jbpros!~jbpros@d515285E6.access.telenet.be] has joined #ruby
mxweas_ [mxweas_!~max@c-71-226-112-145.hsd1.az.comcast.net] has joined #ruby
<mxweas_>
what would be the best approach to escape a url that might already be escaped?
Jrz [Jrz!~jrz@d152222.upc-d.chello.nl] has joined #ruby
<mxweas_>
I'm getting URLs some url encoded, some not. If I encode everything. URLs that were already encoded have the issue of %20 becoming %2520 which breaks those urls
centipedefarmer [centipedefarmer!~centipede@74-84-107-90.client.mchsi.com] has joined #ruby
<mxweas_>
markuss: How does that help?
alfism [alfism!~alfism@2620:149:4:1201:19a3:509d:6068:713e] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
<mxweas_>
markuss: ie, how can I use that to fix my urls?
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
Jake232_ [Jake232_!~textual@5e0277fc.bb.sky.com] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
Araxia_ [Araxia_!~Araxia@67.137.34.202] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has quit [#ruby]
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
luckyruby [luckyruby!~luckyruby@125-187.96-97.tampabay.res.rr.com] has joined #ruby
nari [nari!~nari@p929512.totrnt01.ap.so-net.ne.jp] has joined #ruby
stephans [stephans!~stephans@209.66.114.6] has joined #ruby
<lofic>
I have a module
<lofic>
can't use the methods without adding module_function :the_module
<lofic>
why ?
arman [arman!~arman@99-100-33-0.lightspeed.sntcca.sbcglobal.net] has joined #ruby
<lofic>
otherwise I have a NameError
<lofic>
undefined method `y' for module `X'
baroquebobcat [baroquebobcat!~nick@c-67-176-80-121.hsd1.co.comcast.net] has joined #ruby
IrishGringo [IrishGringo!~chatzilla@c-71-229-99-200.hsd1.fl.comcast.net] has joined #ruby
infid [infid!~infid@99-95-168-48.lightspeed.sndgca.sbcglobal.net] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
infid [infid!~infid@99-95-168-48.lightspeed.sndgca.sbcglobal.net] has quit [#ruby]
DarkFoxDK_ [DarkFoxDK_!~darkfox@62.116.219.97] has joined #ruby
phantasm66 [phantasm66!~phantasm6@63-252-205-228.ip.mcleodusa.net] has joined #ruby
<davidcelis>
gist it
Emmanuel_Chanel [Emmanuel_Chanel!star2@ZD132012.ppp.dion.ne.jp] has joined #ruby
sh1nji [sh1nji!~sh1nji@c-69-181-222-6.hsd1.ca.comcast.net] has joined #ruby
<sh1nji>
hi, im a fairly new web developer working with a ruby based app using postgresql, when I try to have it access the db, do a query to pull a specific attribute for a table, and then display it in a haml page...unfortunately when i do all that, it doesn't display the number value, instead its a "#"
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
crankycoder [crankycoder!~crankycod@24-246-44-226.cable.teksavvy.com] has joined #ruby
Proshot [Proshot!~CoreD@546A56AA.cm-12-3b.dynamic.ziggo.nl] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
Tuxi [Tuxi!~quassel@dyndsl-091-096-120-144.ewe-ip-backbone.de] has joined #ruby
canton7 [canton7!~canton7@95.150.107.113] has joined #ruby
crankycoder [crankycoder!~crankycod@24-246-44-226.cable.teksavvy.com] has joined #ruby
crankycoder [crankycoder!~crankycod@24-246-44-226.cable.teksavvy.com] has joined #ruby
AxonetBE [AxonetBE!~Adium@d51A4E944.access.telenet.be] has joined #ruby
SegFaultAX|work [SegFaultAX|work!~mkbernard@173.228.45.162] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
Hundchenkatze [Hundchenkatze!~nolan@12.70.190.2] has joined #ruby
Hundchenkatze [Hundchenkatze!~nolan@12.70.190.2] has quit [#ruby]
<robert_>
Spaceghostc2c: I wouldn't be asking if I could do that trivially.
dasfugufish [dasfugufish!~Adium@174-27-233-214.slkc.qwest.net] has joined #ruby
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
kennethreitz [kennethreitz!~kennethre@c-24-127-96-129.hsd1.va.comcast.net] has joined #ruby
adeponte [adeponte!~adeponte@67.110.253.162.ptr.us.xo.net] has joined #ruby
<robert_>
Spaceghostc2c: NoMethodError: undefined method `[]' for #<OpenStruct test=[], test1=[]>
asQuirreL [asQuirreL!~amenon@93-96-10-147.zone4.bethere.co.uk] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@c-68-43-28-43.hsd1.mi.comcast.net] has joined #ruby
cjk101010 [cjk101010!~ckruse@painkiller.defunced.de] has joined #ruby
ptulskie [ptulskie!~ptulskie@50.12.24.204] has joined #ruby
patant [patant!~patant@h-141-11.a176.priv.bahnhof.se] has joined #ruby
Kanolesic [Kanolesic!~Kanolesic@c-24-218-140-224.hsd1.ma.comcast.net] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
nari_ [nari_!~nari@p929512.totrnt01.ap.so-net.ne.jp] has joined #ruby
dodops [dodops!~douglas@gw05.infotec.psi.br] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@173-228-63-32.dsl.static.sonic.net] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
<dodops>
hi everybody!
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
atmosx [atmosx!~textual@188.4.217.210.dsl.dyn.forthnet.gr] has joined #ruby
mickn [mickn!~mickn@unaffiliated/mickn] has joined #ruby
Kanolesic [Kanolesic!~Kanolesic@c-24-218-140-224.hsd1.ma.comcast.net] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
Hundchenkatze [Hundchenkatze!~nolan@12.70.190.2] has joined #ruby
Hundchenkatze [Hundchenkatze!~nolan@12.70.190.2] has quit [#ruby]
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
GreaseMonkey [GreaseMonkey!~gm@unaffiliated/greasemonkey] has joined #ruby
lwhalen [lwhalen!~law@63.116.56.194] has joined #ruby
xhx [xhx!~nope@78.30.241.38] has joined #ruby
<lwhalen>
can a do-statement include an 'until' clause?
<lwhalen>
or does 'until' have its own special syntax for looping?
<lwhalen>
basically, I'm trying to iterate through a file, skipping lines until I see an open-brace. Once I see the open-brace, I want to do ANOTHER loop until I see a closing brace. Inside that 'inner loop', I'm checking lines for such things as 'hostname = ' or 'contact =', and assigning variables as appropriate
cooper [cooper!~mitchell@c-50-129-95-89.hsd1.il.comcast.net] has joined #ruby
cooper [cooper!~mitchell@unaffiliated/furryfishy] has joined #ruby
<rippa>
lwhalen: begin <...> end until <condition>
<rippa>
or just use iterator and break
<lwhalen>
errrr
<lwhalen>
unfortunately, my ruby-fu isn't quite strong enough to completely grok what you just said :-)
axl_ [axl_!~axl@75-149-152-225-Minnesota.hfc.comcastbusiness.net] has joined #ruby
arman_ [arman_!~arman@99-100-33-0.lightspeed.sntcca.sbcglobal.net] has joined #ruby
<rippa>
lwhalen: (1..10).each {|i| p i; break if i==8}
<lwhalen>
ahh I see
<lwhalen>
but i don't want to necessarily break the whole loop
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
<lwhalen>
there's going to be multiple sections in one file enclosed by {}
<rippa>
it only breakes out of inner loop
<rippa>
outer will keep going
<rippa>
or what do you mean?
lkba [lkba!~AndChat@aaqo118.neoplus.adsl.tpnet.pl] has joined #ruby
DarkFoxDK_ [DarkFoxDK_!~darkfox@62.116.219.97] has joined #ruby
bwlang [bwlang!~anonymous@70-91-134-14-ma-ne.hfc.comcastbusiness.net] has joined #ruby
<lwhalen>
here's a sample of the data I'm trying to parse:
<lwhalen>
I'm going through about 40 of these files in a directory, each file has multiple instances of 'hosts' that I want to capture
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
<lwhalen>
basically, my pseudo-code logic looks like:
<lwhalen>
Open a file; Skip lines until you see "define host"; Go line by line, asking does this line start with 'host_name', 'address' or 'contact_groups'? if so, store those values and keep searching; When we hit }, compare host_name to search string. If matched, stop, print out template, etc. If no match, throw out and keep searching through the file
audy [audy!~audy@heyaudy.com] has joined #ruby
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby
adeponte [adeponte!~adeponte@67.110.253.162.ptr.us.xo.net] has joined #ruby
<lwhalen>
does that make sense?
Liothen_ [Liothen_!~liothen@24-119-65-28.cpe.cableone.net] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
Brozilla [Brozilla!~Brozilla@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
baroquebobcat [baroquebobcat!~nick@c-67-176-80-121.hsd1.co.comcast.net] has joined #ruby
friskd [friskd!~friskd@71-95-209-242.static.mtpk.ca.charter.com] has joined #ruby
andrewhl [andrewhl!~andrew@CPE687f7402a2d8-CM00195ed25a2a.cpe.net.cable.rogers.com] has joined #ruby
<dodops>
nope
Brozilla [Brozilla!~Brozilla@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
<dodops>
what is that?
<lwhalen>
what is what?
<dodops>
nothing
<dodops>
wrong channel
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
ascarter [ascarter!~ascarter@209.119.253.66] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
stepnem [stepnem!~stepnem@176.119.broadband10.iol.cz] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
pr0pagandhi [pr0pagandhi!~Vivek@ip72-218-46-109.hr.hr.cox.net] has joined #ruby
<pr0pagandhi>
why do you guys like ruby over python?
<Spaceghostc2c>
robert_… What's up?
<lwhalen>
we prefer gems over snakes
cek [cek!~cek@crius.pantheon.fused.net] has joined #ruby
<Spaceghostc2c>
pr0pagandhi… We have a thing for stuff that won't strangle us in our sleep.
<cek>
what's the meaning of "_"?
<Spaceghostc2c>
cek… In what context?
<rippa>
looks like a string
<cek>
in context of variable manipulation
<pr0pagandhi>
lmaoooo
<rippa>
cek: show an example
<Spaceghostc2c>
cek… Not sure what you mean. Can you give us a bit more?
<cek>
irb
<cek>
_
<cek>
it's a method i guess
<rippa>
it's irb-specific
<rippa>
holds result of last operation
<Spaceghostc2c>
^
<Spaceghostc2c>
Something like !! in bash
<cek>
okay, so that's a regular identifier that can be used for everything
<Spaceghostc2c>
In irb.
<rippa>
anywhere
ryanf [ryanf!~revfitz@50.0.160.40] has joined #ruby
<rippa>
__ is valid name too
<cek>
didnt know you can use it by itself
<cek>
yeah, weird
pr0pagandhi [pr0pagandhi!~Vivek@ip72-218-46-109.hr.hr.cox.net] has quit [#ruby]
<Spaceghostc2c>
rippa… I didn't know I could toss it into my normal ruby. That's interesting.
tomas_w [tomas_w!~tomas@116.227.0.146] has joined #ruby
Kanolesic [Kanolesic!~Kanolesic@c-24-218-140-224.hsd1.ma.comcast.net] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
d-snp [d-snp!~d-snp@smurfer.student.utwente.nl] has joined #ruby
geekbri [geekbri!~geekbri@64.119.145.106] has joined #ruby
DrShoggoth [DrShoggoth!~prakwtf@12.116.104.118] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
linusoleander [linusoleander!~linus@h254n3c1o1042.bredband.skanova.com] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
banister_ [banister_!~baniseter@118.82.185.158] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
ReTFEF [ReTFEF!~JS@cpe-173-88-110-115.columbus.res.rr.com] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
ReTFEF [ReTFEF!JS@cpe-173-88-110-115.columbus.res.rr.com] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
DarkFoxDK_ [DarkFoxDK_!~darkfox@62.116.219.97] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
DarkFoxDK_ [DarkFoxDK_!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK__ [DarkFoxDK__!~darkfox@62.116.219.97] has joined #ruby
lwhalen [lwhalen!~law@63.116.56.194] has joined #ruby
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
pickels_ [pickels_!~fs@d54C5B2D7.access.telenet.be] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
Jake232 [Jake232!~textual@5e0277fc.bb.sky.com] has joined #ruby
Hanmac [Hanmac!~hanmac@p50845133.dip0.t-ipconnect.de] has joined #ruby
codespectator [codespectator!~codespect@host-84-13-17-130.opaltelecom.net] has joined #ruby
<Hanmac>
i have a question about ffi ... does it work with c++ libs or only with c-libs?
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK_ [DarkFoxDK_!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK_ [DarkFoxDK_!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
nilmethod [nilmethod!~nilmethod@ip70-178-48-198.ks.ks.cox.net] has joined #ruby
Sliker [Sliker!~ponies@31.185.187.190] has joined #ruby
MHD0 [MHD0!~MHD@80-71-135-7.u.parknet.dk] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
linusoleander [linusoleander!~linus@h254n3c1o1042.bredband.skanova.com] has joined #ruby
lwhalen [lwhalen!~law@63.116.56.194] has joined #ruby
ChampS_ [ChampS_!~ChampS@p54B4BF95.dip.t-dialin.net] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
jensn [jensn!~Jens@90-229-211-15-no150.tbcn.telia.com] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
<shevy>
dumdedum
Squee-D [Squee-D!~Squee-D@static.visfleet.com] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
badabim [badabim!~badabim@17.212.166.202] has joined #ruby
colint [colint!~ColinT@206.222.178.96] has joined #ruby
Sigma00 [Sigma00!~freenode@thankyouforhelpingushelpyouhelpusall.net] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
wyhaines_ [wyhaines_!~wyhaines@65.39.118.15] has joined #ruby
AxonetBE [AxonetBE!~Adium@d51A4E944.access.telenet.be] has joined #ruby
Sigma00 [Sigma00!~freenode@thankyouforhelpingushelpyouhelpusall.net] has joined #ruby
akem [akem!~akem@164.15.85.79.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
npatel [npatel!~nirmit@wsip-70-167-158-178.oc.oc.cox.net] has joined #ruby
<npatel>
hi, i was wondering if someone could show/tell me how to include class level method calls from a module?
drd2 [drd2!53a0482e@gateway/web/freenode/ip.83.160.72.46] has joined #ruby
tvw [tvw!~tv@e176001247.adsl.alicedsl.de] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
sepp2k [sepp2k!~sexy@pD9523E68.dip.t-dialin.net] has joined #ruby
mmercer [mmercer!~mmercer@ct-unlimited.com] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
v0n [v0n!~v4n@2607:fad8:4:0:21e:8cff:fe4d:2f7d] has joined #ruby
<ryanf>
can you elaborate a bit on what you're trying to do?
Gosh [Gosh!~textual@CPE001a70fc3c7b-CM00223a307f46.cpe.net.cable.rogers.com] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
kf8a [kf8a!~kf8a@user-33c730.user.msu.edu] has joined #ruby
patant [patant!~patant@h-141-11.a176.priv.bahnhof.se] has joined #ruby
Mahoek [Mahoek!~Mahoek@ip51ceb6d4.adsl-surfen.hetnet.nl] has joined #ruby
pantsman [pantsman!~pantsman@2.25.208.143] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
QKO_ [QKO_!~reaVer@banzai.speedxs.nl] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
ikaros_ [ikaros_!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-108-21-213-102.nycmny.fios.verizon.net] has joined #ruby
sh1nji [sh1nji!~sh1nji@c-69-181-222-6.hsd1.ca.comcast.net] has joined #ruby
ikaros [ikaros!~ikaros@dslb-188-107-221-154.pools.arcor-ip.net] has joined #ruby
conor_ireland_ [conor_ireland_!~conor_ire@89.100.121.49] has joined #ruby
pickels_ [pickels_!~fs@d54C5B2D7.access.telenet.be] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
fennec [fennec!~ff@wikipedia/Fennec] has quit ["Leaving"]
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
codefriar [codefriar!~codefriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby
Kanolesic [Kanolesic!~Kanolesic@74-93-18-65-NewEngland.hfc.comcastbusiness.net] has joined #ruby
el_tejon [el_tejon!~hauke@176.2.173.10] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
dekroning [dekroning!~dekroning@541B931D.cm-5-4c.dynamic.ziggo.nl] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
RubyPanther [RubyPanther!~paris@c-24-22-48-80.hsd1.or.comcast.net] has joined #ruby
badabim_ [badabim_!~badabim@17.245.89.71] has joined #ruby
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
nonotza [nonotza!~nonotza@adsl-65-8-161-194.mia.bellsouth.net] has joined #ruby
<nonotza>
I'm a ruby newb - can someone tell me what's wrong with this line?
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
<RubyPanther>
v0n: seems a little verbose :P
savage- [savage-!~savage-@209.118.197.220] has joined #ruby
ChampS_ [ChampS_!~ChampS@p54B4BF95.dip.t-dialin.net] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
colint [colint!~ColinT@69-11-97-130.regn.static.sasknet.sk.ca] has joined #ruby
Marco___ [Marco___!~marco@c-98-254-52-240.hsd1.fl.comcast.net] has joined #ruby
chrismcg [chrismcg!~chrismcg@pdpc/supporter/active/chrismcg] has joined #ruby
<v0n>
RubyPanther, I don't mind, it works great
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
dekroning [dekroning!~dekroning@541B931D.cm-5-4c.dynamic.ziggo.nl] has quit [#ruby]
malkomalko [malkomalko!~malkomalk@38.121.226.130] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
kaneda [kaneda!~kaneda@5acb1c98.bb.sky.com] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
jbpros [jbpros!~jbpros@236-177-112-217.dyn.adsl.belcenter.be] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
xhx [xhx!~nope@78.30.241.38] has joined #ruby
freenodiz [freenodiz!~IceChat77@unaffiliated/freenodiz] has joined #ruby
cylence [cylence!~cylence@173-14-16-174-Colorado.hfc.comcastbusiness.net] has joined #ruby
edwardsharp [edwardsharp!~chatzilla@173-8-205-65-Oregon.hfc.comcastbusiness.net] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
xhx [xhx!~nope@78.30.241.38] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
saschaheylik [saschaheylik!~sascha@80-121-61-84.adsl.highway.telekom.at] has joined #ruby
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
savage- [savage-!~savage-@209.118.197.220] has joined #ruby
<npatel>
hi, i was wondering if someone could show/tell me how to include class level method calls from a module?
<npatel>
sorry about asking earlier and not responding!
<npatel>
i had to step away from my desk
<LiquidInsect>
npatel: sounds like you want to extend the module instead of including it
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
<npatel>
yes, but i am not trying to define new methods in the module...i am really trying to organize the code so the goal is to include/extend the module in such a way that the calls that would be in the class are really in the module
<npatel>
ill follow with a gist shortly
looopy [looopy!~looopy@pool-141-156-48-150.washdc.btas.verizon.net] has joined #ruby
MHD0 [MHD0!~MHD@80-71-135-7.u.parknet.dk] has joined #ruby
tomzx [tomzx!~tomzx@dsl-132-26.aei.ca] has joined #ruby
rads [rads!~rads@67-4-223-106.mpls.qwest.net] has joined #ruby
crankycoder [crankycoder!~crankycod@24-246-44-226.cable.teksavvy.com] has joined #ruby
rads [rads!~rads@67-4-223-106.mpls.qwest.net] has quit [#ruby]
apucacao [apucacao!~apucacao@thelevel.com] has joined #ruby
<catphish>
each_slice returns an array, is there anything better than join() to get that as a string?
patant [patant!~patant@h-141-11.a176.priv.bahnhof.se] has joined #ruby
<samuelkadolph>
catphish: Why would you join an array of numbers?
<catphish>
sorry, i want it as a binary string
jbpros [jbpros!~jbpros@236-177-112-217.dyn.adsl.belcenter.be] has joined #ruby
<catphish>
obviously .map{|byte|byte.chr}.join() won't be too fast
<catphish>
am i better running string.force_encoding('BINARY').scan(/.{1024}/)
<Hanmac>
ehm whats your ruby version catphish?
centipedefarmer [centipedefarmer!~centipede@74-84-107-90.client.mchsi.com] has quit ["Leaving"]
<catphish>
1.9.2
<catphish>
*1.9.3 now
bbttxu [bbttxu!~adam@pool-71-96-208-205.dfw.dsl-w.verizon.net] has joined #ruby
<catphish>
i just want to split a binary string into 1024 byte blocks for safe network transmission
MHD0 [MHD0!~MHD@80-71-135-7.u.parknet.dk] has joined #ruby
<samuelkadolph>
Why would you turn a string into another string?
<samuelkadolph>
Just to send it to a socket?
<Spaceghostc2c>
I love strings!
<catphish>
as i said, i want to split it into 1024 byte blocks for transmissio
<samuelkadolph>
Why?
<Hanmac>
i think this is the best way:> string.each_byte.each_slice(1024)
<catphish>
Hanmac: that produces an array of integers
<samuelkadolph>
That's the same thing I said
<samuelkadolph>
catphish: What do you think a byte is?
<samuelkadolph>
catphish: I don't see why you won't trust the TCP layer and just send the string.
NinoScript [NinoScript!~Adium@pc-55-124-83-200.cm.vtr.net] has joined #ruby
<catphish>
samuelkadolph: the main reason is that my protocol uses a 2-byte header for content-length
<samuelkadolph>
Your string is longer than 65535 ?
<catphish>
it might be
punkrawkR [punkrawkR!~freddiebo@80.68.120.179.karlsborgsenergi.se] has joined #ruby
<catphish>
i hope not
DarkFoxDK [DarkFoxDK!~darkfox@62.116.219.97] has joined #ruby
<catphish>
but i like my code to be robust
<samuelkadolph>
That still doesn't make sense
<catphish>
why not?
<samuelkadolph>
You were going to hard code a 1024 size?
<Hanmac>
catphish, ya but i use the enumerators better thern the stuff above so the best way is: string.each_byte.each_slice(1024).map {|e| e.map(&:chr).join}
<catphish>
Hanmac: that sounds horrifically slow :(
<samuelkadolph>
What happens when the string is longer than 65535?
<catphish>
1024 was just an example, i will actually be splitting it at 6535
<Hanmac>
no its faster then you think ... and its better an building an array with bytes
<catphish>
and samuelkadolph what happens is it gets split
<catphish>
hence my question!
austinbv [austinbv!~austinbv@235-187.96-97.tampabay.res.rr.com] has joined #ruby
<austinbv>
can you sort an array by a specified order?
<samuelkadolph>
Hanmac: No, it would be quite slow compared to using a substring
<austinbv>
instead of some sort of natural ordering
<catphish>
Hanmac: does that not create an array of bytes then create a second array of strings then join them?
<samuelkadolph>
austinbv: sort_by
btanaka [btanaka!~textual@173-228-34-51.dsl.dynamic.sonic.net] has joined #ruby
<catphish>
maybe i'll just force the encoding to binary and use [65535*n, 65535]
<samuelkadolph>
catphish: Does it support non ASCII strings?
<catphish>
it's binary
<samuelkadolph>
So I take that as a you don't know
<catphish>
i know it will contain non-ascii bytes if that's what you're asking
<Hanmac>
not realy ... the each methods does not return an array
<catphish>
Hanmac: you're right, it will iterate over the enum
<catphish>
but won't it generate an array for the join to use?
<samuelkadolph>
It builds an array of small strings and then joins them into a big string
<catphish>
would i be better using []
<Hanmac>
yeah ... only the last map returns an array
<samuelkadolph>
catphish: You need to know if you only have to support ASCII
<samuelkadolph>
Sending UTF-8 over a socket is more complex
<catphish>
samuelkadolph: i answered that twice, it's binary
<samuelkadolph>
That's not a string encoding
<catphish>
yes it is
<catphish>
well, its called ascii8 or something, but its alised to BINARY
<samuelkadolph>
No it's not. Ruby uses a string to store binary data, but it's not a string
<catphish>
there's a pseudo-encoding for binary
philcrissman [philcrissman!~philcriss@12.32.95.3] has joined #ruby
<catphish>
ASCII-8BIT?
<samuelkadolph>
Yes
<samuelkadolph>
So you're not actually sending a string
<catphish>
in which all characters are one byte and are valid
<catphish>
yes, i'm sending a string!
<catphish>
but it contains binary data
<samuelkadolph>
Then it's not really a string. So you don't have to worry about the encoding
<catphish>
thats why my original question was to split it into 1024 byte chunks, not 1024 char chunks :)
<samuelkadolph>
That's not relevant
<samuelkadolph>
Every string has bytes
<catphish>
yes
<catphish>
and those are what i care about
* Hanmac
is afk -- must add methods to my binding (next score is 500)
<Spaceghostc2c>
Hanmac… third person fail!
<samuelkadolph>
catphish: I would go for an if str.size >= 65535 then << [str.size].pack("n") << str else loop_with_str[65535 * n, 65535] end
<Hanmac>
yeah but you know what i mean
<catphish>
samuelkadolph: i think that's what i'm going to do :)
<samuelkadolph>
Just make sure it's an ASCII-8BIT string
<samuelkadolph>
Since it will break with non binary strings
<catphish>
yeah, it will be
<catphish>
what about string.scan(/.{1,65535}/)
<catphish>
or will that be significantly slower?
<samuelkadolph>
...
tilde` [tilde`!~tilde@host238-192-dynamic.12-79-r.retail.telecomitalia.it] has joined #ruby