Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
rpowell [rpowell!~rpowell@CPE-121-217-139-191.lnse2.cht.bigpond.net.au] has joined #ruby-lang
voker57 [voker57!~voker57@128-70-25-242.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
longtheta [longtheta!u4275@gateway/web/irccloud.com/x-cgncxiytxhmyhdel] has joined #ruby-lang
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
charper [charper!u1691@gateway/web/irccloud.com/x-rpkcdkxqnocrgoko] has joined #ruby-lang
simon_weber [simon_weber!u4119@gateway/web/irccloud.com/x-wxhdoymgtplucgrq] has joined #ruby-lang
necromancer [necromancer!u4538@gateway/web/irccloud.com/x-ovwshmlnrbvlllcu] has joined #ruby-lang
agib [agib!u781@gateway/web/irccloud.com/x-ufagxpyaqrjxvfqm] has joined #ruby-lang
cesario [cesario!u2444@gateway/web/irccloud.com/x-scqqciftjrhtvjli] has joined #ruby-lang
mccraig [mccraig!u574@gateway/web/irccloud.com/x-odtrnsgusweqwmfp] has joined #ruby-lang
arooni-mobile [arooni-mobile!~arooni-mo@190.197.20.98] has joined #ruby-lang
pvh [pvh!u717@gateway/web/irccloud.com/x-udcsxgyzexxhlgua] has joined #ruby-lang
andrewhl [andrewhl!~andrew@67.69.104.66] has joined #ruby-lang
mrchrisadams [mrchrisadams!u1367@gateway/web/irccloud.com/x-nokcvtqcfzkpajar] has joined #ruby-lang
Austin__ [Austin__!~austin@CPE0016cbc30e9c-CM001ceacff6ba.cpe.net.cable.rogers.com] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-47-167.washdc.btas.verizon.net] has joined #ruby-lang
replore_ [replore_!~replore@203.152.213.161.static.zoot.jp] has joined #ruby-lang
denysonique_ [denysonique_!u484@gateway/web/irccloud.com/x-gopjegpwjdnqogfp] has joined #ruby-lang
mark_azevedo [mark_azevedo!~mark_azev@c-67-180-48-38.hsd1.ca.comcast.net] has joined #ruby-lang
cldwalker [cldwalker!u2984@gateway/web/irccloud.com/x-iowkgdybixxdjssf] has joined #ruby-lang
cyri__ [cyri__!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
necromancer [necromancer!u4538@gateway/web/irccloud.com/x-wxrpighqayeqnalw] has joined #ruby-lang
mrchrisadams [mrchrisadams!u1367@gateway/web/irccloud.com/x-sbegrjobjodwlnff] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
abuiles [abuiles!u1641@gateway/web/irccloud.com/x-qcicionearywjkcq] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
cjs226 [cjs226!~cjs226@99-61-65-242.lightspeed.austtx.sbcglobal.net] has joined #ruby-lang
dejongge1 [dejongge1!~jonke@pD9E0E0C3.dip0.t-ipconnect.de] has joined #ruby-lang
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
dkannan [dkannan!u480@gateway/web/irccloud.com/x-gmwnbfxsncpxpryp] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
kylemcgill [kylemcgill!~kylemcgil@static-ip-202-90-56-14.watchdog.net.nz] has joined #ruby-lang
My_Hearing [My_Hearing!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
<slyphon> drbrain: who is this seacreature guy?
<zenspider> gregory brown
<slyphon> ah
<zenspider> minitest 2.10.0 released
<drbrain> Greg Brown, leader of the Mendicant Army
<injekt> zenspider: nice!
<slyphon> injekt: hi!
<drbrain> or whatever zenspider is calling them these days
<slyphon> hahaha
<injekt> slyphon: hi!
<injekt> lol
<slyphon> injekt: so, i had a feature suggestion (that i'd be willing to take a swing at)
<slyphon> hah!
<injekt> slyphon: I have more than one library, help me out here bro
<zenspider> greg's got a posse
<slyphon> injekt: sorry, slop
<slyphon> injekt: i like having '-' in my cmdline options instead of '_'
<injekt> slyphon: ahh, good timing, v3 work is almost finished
<injekt> ok
<slyphon> wuuu
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-sqrolvjldhapdbfs] has joined #ruby-lang
<slyphon> injekt: i was thinking of :dasherize => true or something
<injekt> wait, as prefixes?
<slyphon> oh sorry
<slyphon> --this-is-the-switch
<slyphon> opts[:this_is_the_switch]
<injekt> ahh, you dont like opts['this-is-the-switch'] ? :P
<slyphon> well
<slyphon> opts.this_is_the_switch
akahn [akahn!u2243@gateway/web/irccloud.com/x-slhhytiuiiwscvgy] has joined #ruby-lang
<injekt> heh yeah the options? helper methods are kind screwed with that
<slyphon> on :t, :this_is_the_switch
<injekt> sure, throw it in an issue and point it to v3, you're welcome to try and build it yourself, or I'll stab at it some time
<injekt> v3 has nice test coverage and it's pretty easy to comprehend, if you did feel like running with it yourself
<slyphon> ok, i mean, i was going to try, i don't want to add work
<slyphon> :)
<injekt> haha, what's the worst that could happen? :)
<slyphon> :D
<slyphon> if it ain't broke BREAK IT
<injekt> I break it all the time
<injekt> isn't that how this programming lark works?
<injekt> or im doing it wrong
<slyphon> hahahha
My_Hearing [My_Hearing!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
<slyphon> injekt: really, you didn't take the opportunity to call them "sloptions"?
* slyphon is disappoint
<injekt> slyphon: like I did in v2? :D
<slyphon> OH
* slyphon musta missed that
<slyphon> injekt: i'm sorry for impugning your reputation
* slyphon slaps himself with a white glove
<slyphon> hahahahah
<slyphon> nice
<injekt> what reputation? haha
<injekt> and yeah, wow v3 is so much cleaner
<injekt> more features, more cleaner, and over 100 lines smaller :S
jmcphers [jmcphers!jmcphers@nat/nokia/x-gfkaqdiiwnbkrxxg] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
<injekt> sleep time
tomzx [tomzx!~tomzx@dsl-156-68.aei.ca] has joined #ruby-lang
pankajdoharey [pankajdoharey!~pankajdoh@49.213.34.55] has joined #ruby-lang
drdr [drdr!d059b08f@gateway/web/freenode/ip.208.89.176.143] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
<pankajdoharey> '/logout
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
darkf_ [darkf_!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
dbernar1 [dbernar1!~dbernar1@S0106c03f0ed8678b.wp.shawcable.net] has joined #ruby-lang
<pankajdoharey> does this work
<drdr> ?
<drdr> i guess
<drdr> well how is your ruby setup
<dbernar1> Mine?
<drdr> yes
<dbernar1> I use rvm
<drdr> the ENV and such
<dbernar1> and gemsets
<drdr> ah
<drdr> ok root isnt seeing ruby then
<dbernar1> The app works...
<drdr> hmm
<dbernar1> Just not able to test it with aruba
<dbernar1> It ignores the sudo. As if it wasn't done through stdin
<drdr> ah
<dbernar1> It is able to interact with my app if the app uses stdin. It is able to type things to stdin, but not to the sudo prompt for password
<drdr> try useing su -c instead of sudo
<pankajdoharey> ////
leonL [leonL!~leonl@74-115-197-43.eng.wind.ca] has joined #ruby-lang
<dbernar1> Doesn't like it
<dbernar1> Broken pipe (Errno::EPIPE)
leonL [leonL!~leonl@74-115-197-43.eng.wind.ca] has joined #ruby-lang
<dbernar1> Which is more or less understand why that would happen
<dbernar1> Which I more or less understand why that would happen
<dbernar1> I'm gonna make a feature of my app that I can provide a command-line param to skip tasks that require sudo
<dbernar1> So I can test the rest of the app
<dbernar1> Unless there are better ideas
<drdr> you could write your own askpass
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
<dbernar1> Good point
<dbernar1> Thank you
mkscrg [mkscrg!~mkscrg@ool-18e4f9d6.dyn.optonline.net] has joined #ruby-lang
neoesque [neoesque!~neoesque@210.59.147.232] has joined #ruby-lang
darkf_ [darkf_!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
<slyphon> god i fucking hate nagios
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby-lang
wimplash [wimplash!~Adium@wireless.sit-co.net] has joined #ruby-lang
wimplash [wimplash!~Adium@wireless.sit-co.net] has quit [#ruby-lang]
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
jmontross [jmontross!~Adium@static-96-236-65-137.snfcca.dsl-w.verizon.net] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
<jmontross> how would one write tests for a gem that has the intended purpose of modifying a rails app… what I really want to test is that it makes the rails app do what I want it to, but that is a bit tricky since the rails app needs to be running
<jmontross> ?
<slyphon> if you wanna live-fire test it, probably set up a dummy rails app, at the start of your tests spawn a rails process, at the end, kill it
<slyphon> it's nasty but doable
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.44] has joined #ruby-lang
<jmontross> that's what I was thinking… that is much better than being like "Make sure you have rails app running before running these tests…."
<jmontross> thanks.
<slyphon> yeah, just make sure you don't leak processes
<jmontross> leak processes?
<jmontross> I first need to modify the rails app, then need to start up the rails app, then make sure it does what i want it to do.
<slyphon> right, the "starting up the rails app" is what i'm talking about
<slyphon> just make sure you *kill it dead* when your tests exit
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-71-224-192-35.hsd1.pa.comcast.net] has joined #ruby-lang
jredville [jredville!~james.dev@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
mark_azevedo [mark_azevedo!~mark_azev@c-98-210-10-109.hsd1.ca.comcast.net] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-217-139-191.lnse2.cht.bigpond.net.au] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-121-217-139-191.lnse2.cht.bigpond.net.au] has joined #ruby-lang
fritzek__ [fritzek__!~fritzek@p5DDB7EB0.dip.t-dialin.net] has joined #ruby-lang
leonL [leonL!~leonl@199-7-156-43.eng.wind.ca] has joined #ruby-lang
nofxx_ [nofxx_!~nofxx@177.106.71.234] has joined #ruby-lang
nofxx_ [nofxx_!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
<jmontross> ahh. of course. thank you. I'll be running these in hudson I hope :)
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby-lang
ricardovaleriano [ricardovaleriano!~ricardova@186.220.217.229] has joined #ruby-lang
darkf_ [darkf_!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has quit [#ruby-lang]
mattonrails [mattonrails!~mattonrai@c-24-129-22-117.hsd1.fl.comcast.net] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
twittard [twittard!~twittard@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-58-168-81-86.lns5.ken.bigpond.net.au] has joined #ruby-lang
amh345 [amh345!~amh345@unaffiliated/amh345] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby-lang
<amh345> evening everyone. i asked this question in #ruby, but didn't receive a response. im running into a problem where im trying to upload a file that has not yet been written. it's off my a few MS im guessing. im trying to decide on the best approach to check if the file uploads. I've been reading around and found something like this that might achieve what im after. begin/rescue retry/end. the thing is i dont want it
<amh345> to keep checking forever, incase there's a problem and it never is written. so having the condition time out after X amount of tries would be good. can anyone make a recommendation on this? thanks.
eggsby [eggsby!~egghead@50-56-59-89.static.cloud-ips.com] has joined #ruby-lang
eggsby [eggsby!~egghead@50-56-59-89.static.cloud-ips.com] has quit ["WeeChat 0.3.6"]
Swimming_Bird [Swimming_Bird!~textual@cpe-68-173-86-46.nyc.res.rr.com] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@raichu.netlab.jp] has joined #ruby-lang
wdperson [wdperson!~wdperson@cpe-173-89-163-182.neo.res.rr.com] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
mkscrg [mkscrg!~mkscrg@ool-18e4f9d6.dyn.optonline.net] has joined #ruby-lang
<guns> amh345: I think you didn't get an answer because the question is pretty vague. So here is a vague answer: use an event-driven style and have the thread that is writing the file trigger the upload.
<amh345> awesome. thanks!
<amh345> here's what i originally said in #ruby.
<amh345> im trying to upload a file (Net::FTP) that was just encrypted via Open3.popen3. however when i call the upload model after the encryption i get an error "no such file.. /x/y/z.txt (Errno::ENOENT). im assuming this is happening because the file hasnt yet been written to disk. is there a way to ensure a file is completed being written before i call the upload?
AndChat| [AndChat|!~AndChat@222.153.223.46] has joined #ruby-lang
<guns> If you are controlling the encryption via popen3, aren't you the one closing the file?
<amh345> yes. stdin.close
<amh345> but directly after Open3 i run Model.upload
<guns> I don't think I'm clear on how you're encrypting, but you can spin off a thread that loops with a timeout, checking for the file, and on success trigger upload
<guns> that's a bit hackish though
<guns> do you have code somewhere?
<amh345> let me setup a gist.
<amh345> err pastie here i guess
blowmage [blowmage!~blowmage@humanecode.new.xen.prgmr.com] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
context [context!context@november.xen.prgmr.com] has joined #ruby-lang
jxie_ [jxie_!~jxie@115.197.87.147] has joined #ruby-lang
<amh345> +s
iSoul [iSoul!~isoul@49.49.139.142] has joined #ruby-lang
<guns> amh345: I don't think you're actually waiting for gpg to finish
<amh345> pardon the file var. it's a typo. should be read_file = File.open
<guns> let me look up open3
<amh345> ok. thnk you
<guns> docs say: wait_thr.value waits the termination of the process. The block form also waits the process when it returns.
<guns> In general, when you fork, you must reap the child; Ruby has a blocking call called Process.wait that does this
<guns> I don't use Open3 frequently, so I'm not familiar with the API, but it seems they are exposing a way to block until the process returns
<amh345> ok, ill see how to implement that.
<amh345> thaks
<amh345> err thanks*
<guns> Or, don't use Open3 at all. grab the stdout of gpg directly and write it to file yourself
<amh345> wont that cause me to run into the same problem i am now?
<guns> No.
<guns> If you can get gpg to write the data to stdout, or another fd that you are listening on, you have your data, and you can do what you wish
blowmage [blowmage!~blowmage@humanecode.new.xen.prgmr.com] has joined #ruby-lang
mqt [mqt!m@pheasant.nirv.net] has joined #ruby-lang
<bnagy> File.open(file) is almost certainly not what you want
<bnagy> that will give you a file handle, not the contents
<amh345> File.exist?
adgar [adgar!~adgar@carbonica.xen.prgmr.com] has joined #ruby-lang
<amh345> i hacked it up quickly.
<guns> I didn't even see that
<bnagy> data=File.open('fname', 'rb') {|io| io.read} o something
<guns> Open3 docs say explicity that closing the std streams does not wait for the subprocess
yellow5 [yellow5!~yellow5@levicole.xen.prgmr.com] has joined #ruby-lang
<amh345> oh crap. it looks like wait_thr might not be available in 1.8.7. i also forgot to mention im not using 1.9 on this project
context [context!context@november.xen.prgmr.com] has joined #ruby-lang
<guns> yeah, they did alot of work on Kernel#system and friends for 1.9
<amh345> ok, so back to square one. what is the best approach to keep checking if a file exists?
<guns> Anyway, you have to find a way to wait for the process. It's easy to achieve with fork + wait
<amh345> i dont know what fork + wait means unfortunately.
freedrull [freedrull!~freedrull@freedrull.xen.prgmr.com] has joined #ruby-lang
iSoul [iSoul!~isoul@49.49.139.142] has quit [#ruby-lang]
<amh345> hmm.. google shows something like fork do // end.
rippa [rippa!~splitta@85.158.54.234] has joined #ruby-lang
<guns> Fork + exec the gpg process, then spawn a thread that calls Process.wait, then upload-file.
<guns> gotta take the dog out
<guns> It's worth learning how to do
<guns> old unix stuff
<bnagy> why can't you just use system ?
<bnagy> you just want the stdout right?
<guns> bnagy: I assumed he wanted to not block the main thread
<bnagy> ok so system in a Thread and wait the thread
<guns> ... if gpg can do stdout for what he wants
<guns> but he wants to write a file through gpg
<guns> then upload
<guns> so, yeah either way
<bnagy> s=`cat binstruct.rb | gpg -e -r foo@example.com --trust-model always`
<bnagy> works for me
<guns> I see. don't use gpg much
<amh345> bnagy: what is your suggestion?
<bnagy> well I'm not 1 thousand percent sure what you actually want to do
<amh345> bnagy: im trying to write an array directly to gpg. array contains somewhat sensitive data so i wanted it to stay off the drive until encrypted. once encrypted i want to upload it to an ftp.
<bnagy> ok so you never need to hit disk
<amh345> it all works. until i run the two together. then the file isnt written in time.
<amh345> i could just be cheap and run a cron job a couple of mins apart. heh
<bnagy> cipher=`echo -n #{plain} | gpg -e -r foo@example.com --trust-model always`
<bnagy> try that, no files written at all
<amh345> ok. im going to try it.
<amh345> one sec
<bnagy> I haven't tested the decrypt side though, like I know it produces output :)
<amh345> heh.
jjmgbt [jjmgbt!~chatzilla@c-71-61-59-172.hsd1.pa.comcast.net] has joined #ruby-lang
<amh345> ugh. i hate to ask this. but define the file name for the encrypt is it cipher="echo -n #{some_txt} | gpg -e -r foo@example.com --trust-model always` > '/folder/name.txt'"
<bnagy> there is no filename
<bnagy> cause there is no file
<amh345> oh. i see. i write cipher to file
jredville [jredville!~james.dev@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
<bnagy> cipher contains the encrypted string, you can just upload it directly
<bnagy> unless you want a local copy
<amh345> i dont want a local copy. but i need to see how to get it to the ftp in file format. so it saves it as xyz.txt on the ftp
<amh345> im still getting my feet wet with a lot of this file stuff. or at least the more in depth file stuff.
<bnagy> well I have no idea what FTP thin you're proposing to use, but I bet it will work fine with a string, no need to write a file
tallship [tallship!~tallship@pool-71-189-131-153.lsanca.fios.verizon.net] has joined #ruby-lang
<jjmgbt> New guy here, so I'm not sure how to ask this: How can you set variables in an array of objects? For example, array[0] = Class.new, and then if you wanted to set variable "name" to something, array[0][:name] = "bob" doesn't seem to work
<ramonmaruko> array[0].name = "bob"
<bnagy> paste some stuff
<jjmgbt> makes sense - thanks so much ramon!
<bnagy> tha code you quoted will work if the object supports [] setters
<bnagy> if it were a Hash for example
<jjmgbt> I'm not sure, yet, what [] setters are. Felt a bit over my head even asking what I did
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
<bnagy> ok, so go to codepad.org and paste what's not working, then we can fix it :)
<jjmgbt> Thanks! Actually though, ramon's code fixed me up. Now I can go make new mistakes :)
<bnagy> yay cargo cult debugging
<jjmgbt> http://codepad.org/Yv3vqNdH <-- for what it's worth, that's what I was trying
<jjmgbt> Oh cool
tomzx [tomzx!~tomzx@dsl-199-102-158-146.aei.ca] has joined #ruby-lang
<jjmgbt> thanks!
jeremy_ross [jeremy_ross!~jerem_ros@cpe-76-186-157-98.tx.res.rr.com] has joined #ruby-lang
<bnagy> see if you can work out what I did (I'm assuming you didn't write this 'Agent' class ;)
gianlucadv [gianlucadv!~gianlucad@host32-80-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-124-184-90-185.lns13.cht.bigpond.net.au] has joined #ruby-lang
<jjmgbt> I didn't know you could put a conditional in there like that. That's wild
<bnagy> @instance_vars are special because they are nil until they get something assigned to them, and nil is 'falseish' for tests like ||
<jjmgbt> Slick. I never saw any reference that I could even pull of a conditional test inside of #{ } though. You just gave me another toy to play with
<bnagy> fwiw it's not great practice to have your @active var store a string like "Y"
<jjmgbt> I did write the Agent class, but it's pretty much "just mimic what I see on the book"
<bnagy> idiomatically you'd use :active or just true
<jjmgbt> point taken. thanks
rpowell [rpowell!~rpowell@CPE-124-184-90-185.lns13.cht.bigpond.net.au] has joined #ruby-lang
<bnagy> but it's probably a bit early for all that
<jjmgbt> maybe not. good time to learn good form
<bnagy> it's partially 'style' but it also saves memory. If you store "Y" that's a whole string object, if you store true there is only one true for the whole process, same with symbols like :active
<bnagy> but the memory saving for a one byte string is probably not significant in this case :P
<jjmgbt> Not yet, but I like where you're going with it. Changing my class now
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
<jeremy_ross> Why does rvm need " --with-zlib-dir=$rvm_path/usr" on my macbook pro, but not the imac? Both are Lion.
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
sdegutis [sdegutis!~sdegutis@unaffiliated/steven] has joined #ruby-lang
<sdegutis> hello good people.
<sdegutis> i have a sincere question, and i hope someone can answer it!
<sdegutis> how does the ruby binary know where to look for the default standard libraries?
<sdegutis> is it built-in as a compile-time constant or something?
yakko [yakko!~quassel@189.27.51.53.dynamic.adsl.gvt.net.br] has joined #ruby-lang
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby-lang
jredville [jredville!~james.dev@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
yakko [yakko!~quassel@189.27.51.53.dynamic.adsl.gvt.net.br] has joined #ruby-lang
<bnagy> yes, library paths are compiled in. If your system doesn't have them exactly where expected it won't work :|
<bnagy> dammit I forget the standard punctuation to use for sarcasm
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.43] has joined #ruby-lang
<bnagy> sdegutis: there is $LOAD_PATH which you can get at, is that what you're asking?
kitallis [kitallis!~kitallis@122.172.248.47] has joined #ruby-lang
<sdegutis> bnagy: well im writing my own language and i want it to always know where to look for the stdlib files regardless of where pwd is whenever you run my program's main utility
<sdegutis> ie, running `ruby` from within any dir, ruby still knows where to find its core libs, they're built into the binary somehow (grep tells me anyway)
<sdegutis> the path is somehow put into the lib, i just dont know how
<sdegutis> oh, i didnt see your previous remarks
<sdegutis> i only saw the highlighted part :(
<bnagy> ohboy
<bnagy> when you run ruby from any dir you're still (probably) running the same binary, as determined by your PATH (depending on OS etc)
<bnagy> you should also read up on environment variables
csherin [csherin!~csherin@115.111.177.122] has joined #ruby-lang
<sdegutis> yes, i know how both work
<bnagy> it's hard to reconcile that statement with your others and your original question :)
<sdegutis> im trying to get something like "grep $(dirname $(whereis ruby)) $(whereis ruby)" working to show you what i mean
<sdegutis> the ruby binary by itself knows what the default $: should contain to find the bare-basic stdlibs
<sdegutis> $ grep ~/.rbenv/versions/1.9.3-p0/lib/ ~/.rbenv/versions/1.9.3-p0/bin/ruby
<sdegutis> Binary file /Users/sdegutis/.rbenv/versions/1.9.3-p0/bin/ruby matches
<sdegutis> bnagy: does that make sense?
<sdegutis> im thinking it must be some kind of autoconf magic
jmontross [jmontross!~Adium@static-96-236-65-137.snfcca.dsl-w.verizon.net] has quit [#ruby-lang]
<bnagy> uh
<bnagy> I get nothing for which ruby | xargs strings, I don't think your grep is doing what you think it is doing
<bnagy> but you could quite happily look for File.dirname(__FILE__) + '/../lib/xxx.rb' without having to know any absolute paths
<guns> sdegutis: Are you looking for the information in RbConfig::CONFIG?
<sdegutis> hmm then in that case how does $: know to look in my .rbenv for its stdlibs?
<sdegutis> maybe, let me check
<guns> That's where compile-time values are stored
<sdegutis> probably. i see prefix in there.
<sdegutis> how does that get put there?
<sdegutis> some kind of autoconf magic?
<guns> Depends on which keys
<sdegutis> vendordir for one
<sdegutis> or maybe rubylibprefix
jeremy_ross [jeremy_ross!~jerem_ros@cpe-76-186-157-98.tx.res.rr.com] has joined #ruby-lang
<guns> It's in configure.in
<guns> so, yes autoconf. but not magic, ruby convention
<sdegutis> im starting to build some kind of library-loading functionality into my language and im curious how it should know where to look for the stdlibs
<sdegutis> ok. i guess i need to go learn autoconf now.. i hope its as easy as learning makefiles was
<guns> no, don't bother with autoconf from the start
<jeremy_ross> Upgraded to 1.9.3, and test output is missing the word "FAIL" and the assert message. Any ideas? https://img.skitch.com/20120118-xg4f4b4n7tdh1kg2g3a2gj5yx8.png
<sdegutis> phew! that thing scares the crap out of me
<guns> try the cmake route if anything, but autoconf is you want extremem portability (i guess)
<sdegutis> hmm
<guns> Do you know the FHS?
<guns> follow that, and use PREFIX/lib/your-lang/you-hier
<sdegutis> fuel-hilarity sinus?
<guns> jk?
<sdegutis> oh, file hierarchy
<guns> Ruby's hierarchy is deep to allow multiple library versions
<sdegutis> i know the basics of it (ie, i know that /usr has lib,bin,include and so does /usr/local)
<sdegutis> but i never understood ruby's weird usage of it
<guns> Nothing weird about it
<sdegutis> i thought that was the case, but ruby makes weird distinctions between things like vendors and site gems etc
<guns> flexible is the word
<guns> Some of that is Rubygems, which evolved separately
<guns> and has now been integrated
<sdegutis> right.. im going to be including some lessons learned from rubygems + bundler in my lang
<guns> If you don't need that, then don't use it
<guns> but it is worth having one extra level of hierarchy for major library versions
<sdegutis> why?
uberjar [uberjar!~hideyoshi@li179-144.members.linode.com] has joined #ruby-lang
<sdegutis> why not force every lib version to be version-spaced and just leave it at that?
<sdegutis> btw my lang is at https://github.com/sdegutis/anti-lisp/ :)
ryanf [ryanf!~ryanf@86.sub-174-253-250.myvzw.com] has joined #ruby-lang
<guns> that's certainly a good way to do it. You're going to ship the standard library that way as well?
RomyEatsDrupal [RomyEatsDrupal!~stickycak@cpe-69-203-115-155.nyc.res.rr.com] has joined #ruby-lang
<guns> (inc lisp)
<sdegutis> yes, every lib will always be version-spaced
<guns> then bam, you've solved that problem
<sdegutis> bundler's behavior should have been in rubygems from the beginning, of requiring the right version
<sdegutis> (whether a gemfile should always be required is another story)
<sdegutis> i could totally see doing (require 'mylib' 0.1)
<sdegutis> or something
<guns> btw, please consider making your lisp #!able ; I love clojure, but it's not going to be a CLI language anytime soon
<sdegutis> absolutely. thats one of my main reasons for antilisp, is i want a ruby-replacement
<sdegutis> (but lisp)
<sdegutis> (because lisp is so much awesomer)
<guns> shhh....
<sdegutis> (and i really hate instance variables)
irk3z [irk3z!~irek@78.47.187.53] has joined #ruby-lang
<sdegutis> hahaha
<sdegutis> seems as though i forgot which room i was in for a second ;)
<guns> I won't be turning my back on ruby anytime soon though. The unix integration is really top notch
<sdegutis> yeah i really dig that.
<guns> But mutable OO is the new spaghetti code for sure
<sdegutis> speaking of which, do you know how ruby deals with non-small ints?
<guns> Bigints? Never read the source for that
<sdegutis> i wonder if it just stores the string in an object and then converts it to whatever's required at the time
<sdegutis> because small ints work in antilisp via tagged pointers (assuming your pointers are 8b like mine)
<guns> let's peruse bignum.c
* sdegutis searches his ssd for ruby src
twittard [twittard!~twittard@cpe-76-169-74-39.socal.res.rr.com] has joined #ruby-lang
<sdegutis> whoa! i think it just stores the digits in an array
<guns> struct RBignum
<sdegutis> wheres that?
tychobrailleur [tychobrailleur!~sebastien@176.61.72.130] has joined #ruby-lang
<guns> ruby.h. vim ctag-jumped me there
<sdegutis> ah
* sdegutis has been considering trying emacs lately
<guns> A lisp designer who doesn't use emacs?
<sdegutis> been vim ftw for a few years
<sdegutis> :P
<sdegutis> but im getting fed up with it lately
<guns> Stop watchin those SLIME videos
<guns> you'll never knwo what you're missing
<sdegutis> haha, its not slime/emacs its just vim, its annoying me
<guns> I'm happy enough with my setup.
<guns> the ab text object is really useful for creating macros
<sdegutis> oooh i should put my retain_count and type in a struct
<sdegutis> instead of repeating it in all my types
<guns> So you're writing this from ground up in C?
<guns> GC and everything?
<sdegutis> yeah
<sdegutis> not really a GC per se
<sdegutis> im cheating and using retain counting like i did back in ObjC days
<sdegutis> probably super inefficient compared to ruby or something
<guns> ah I see. That's GC by convention right
<guns> ?
<sdegutis> i guess :)
<guns> I thought that's what the new ARC thing waas about
<guns> (Not an ObjC dev)
<sdegutis> ARC is some weird trick they can use because of llvm now or something
<sdegutis> it like adds it in at compile time or something
<guns> Sounds fast if it works
<sdegutis> the retain counting rule in antilisp's engine is just that any function that returns a value should return it with a retain count of 1
<sdegutis> other than that, everything created or retained within a function should be released exactly the same number of times
<erikh> so it's reference counting
<guns> and you destroy it when it's 0
<sdegutis> and since retaining and releasing is pretty much free (just int math) its fast
<sdegutis> yep
<sdegutis> super simple
<sdegutis> simple = good
<erikh> that's how perl does it!
<sdegutis> oh?
<erikh> (not a bad thing)
<sdegutis> sweet
<sdegutis> i got something right then :)
<erikh> what's great, and what you might want to expose is a way to weaken or lower the reference count of objects
<erikh> to avoid cycles in programs.
<sdegutis> i think technically i have almost no way to have retain cycles
<sdegutis> by the fact that there is almost no assignment, so everything is very short-lived and immutable
yxhuvud [yxhuvud!mongo@h-85-82.a212.priv.bahnhof.se] has joined #ruby-lang
<sdegutis> which means the only times a retain cycle could happen is if there is a lambda capturing itself or something
<sdegutis> but i dont even think that creates one, since a lambda really only captures a symbol which it later resolves
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby-lang
<sdegutis> ok, trying to figure out how i can store the stdlib path at compile time
<sdegutis> so i can have my very own $:
<sdegutis> :)
<guns> gl sdegutis; I'll keep my eye out for anti-lisp
<sdegutis> oh btw, i know my language is slow and inefficient. all my tests pass at 0.09 seconds right now but when i move a lot of basic tests out of C and into the language itself, the test total time jumps to 0.27 seconds
Locke23rus [Locke23rus!~quassel@128-70-13-32.broadband.corbina.ru] has joined #ruby-lang
<sdegutis> thanks guns im sure ill cya around. you on twitter?
<guns> no; just github
<sdegutis> ok
<guns> I'm one of your watchers now
<sdegutis> woot!
RomyRomy [RomyRomy!~stickycak@cpe-69-203-115-155.nyc.res.rr.com] has joined #ruby-lang
ksinkar__ [ksinkar__!~ksinkar@117.195.102.211] has joined #ruby-lang
csherin_ [csherin_!~csherin@115.111.177.122] has joined #ruby-lang
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby-lang
yakko [yakko!~quassel@189.27.51.53.dynamic.adsl.gvt.net.br] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
flebel [flebel!~flebel@unaffiliated/flebel] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@host17-129-dynamic.54-79-r.retail.telecomitalia.it] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@pdpc/supporter/profesional/vargas] has joined #ruby-lang
csherin [csherin!~csherin@115.111.177.122] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.40] has joined #ruby-lang
yumike [yumike!~yumike@188.65.130.106] has joined #ruby-lang
datanois_ [datanois_!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
Roujo_ [Roujo_!~Roujo@modemcable186.146-70-69.static.videotron.ca] has joined #ruby-lang
Wardrop [Wardrop!~tomwardro@86.46.96.58.static.exetel.com.au] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@109.54.213.100] has joined #ruby-lang
qwrrty [qwrrty!~twp@unchi.org] has joined #ruby-lang
irk3z [irk3z!~irek@78.47.187.53] has joined #ruby-lang
cldwalker [cldwalker!u2984@gateway/web/irccloud.com/x-iowkgdybixxdjssf] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
hackeron [hackeron!~hackeron@gentoo/user/hackeron] has joined #ruby-lang
tris [tris!tristan@2001:1868:a00a::4] has joined #ruby-lang
tobiasvl [tobiasvl!~tvl@arrakis.uio.no] has joined #ruby-lang
mortice [mortice!~Tom@li300-55.members.linode.com] has joined #ruby-lang
logbot46379 [logbot46379!~cinch@boxand.lnk.telstra.net] has joined #ruby-lang
ezkl [ezkl!ezkl@ezkl.net] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310B8B.dip0.t-ipconnect.de] has joined #ruby-lang
mitchty [mitchty!~mitchty@ec2-50-19-41-37.compute-1.amazonaws.com] has joined #ruby-lang
heftig [heftig!~Jan@archlinux/developer/heftig] has joined #ruby-lang
_inc [_inc!~inc@unaffiliated/-inc/x-0498339] has joined #ruby-lang
thone [thone!~thone@g225086011.adsl.alicedsl.de] has joined #ruby-lang
pabs [pabs!~pabs@ip68-98-175-235.dc.dc.cox.net] has joined #ruby-lang
crankharder [crankharder!~crankhard@ip68-100-194-214.dc.dc.cox.net] has joined #ruby-lang
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
headius [headius!~headius@71-210-154-45.mpls.qwest.net] has joined #ruby-lang
Wardrop [Wardrop!~tomwardro@86.46.96.58.static.exetel.com.au] has quit [#ruby-lang]
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
solars [solars!~solars@clnet-kmu02-090.ikbnet.co.at] has joined #ruby-lang
ryanf [ryanf!~ryanf@86.sub-174-253-250.myvzw.com] has joined #ruby-lang
<shevy> hmm stalkers
rpowell [rpowell!~rpowell@CPE-124-184-90-185.lns13.cht.bigpond.net.au] has joined #ruby-lang
cyri_ [cyri_!~cyri_@236.200.72.86.rev.sfr.net] has joined #ruby-lang
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby-lang
zmack [zmack!~zmack@78.97.143.6] has joined #ruby-lang
sora_h [sora_h!~sora_h@mayfield.privs.net] has joined #ruby-lang
ltd- [ltd-!~z@zx.io] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@st-dellaved.statistica.unimib.it] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-124-184-90-185.lns13.cht.bigpond.net.au] has joined #ruby-lang
sepp2k [sepp2k!~sexy@g224098143.adsl.alicedsl.de] has joined #ruby-lang
runeb [runeb!~runeb@77.40.155.28] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@124-168-217-142.dyn.iinet.net.au] has joined #ruby-lang
yumike [yumike!~yumike@188.65.130.106] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.42] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.248.47] has joined #ruby-lang
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.172.224.153] has joined #ruby-lang
shevy [shevy!~shevy@88-117-35-42.adsl.highway.telekom.at] has joined #ruby-lang
frangiz [frangiz!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
takaokou_ [takaokou_!~takaokouj@2001:268:306:3:226:8ff:fedd:31a3] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@124-168-217-142.dyn.iinet.net.au] has joined #ruby-lang
Asher [Asher!~asher@98.158.127.150] has joined #ruby-lang
My_Hearing [My_Hearing!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
runeb [runeb!~runeb@77.40.155.28] has joined #ruby-lang
Oloryn_lt1 [Oloryn_lt1!~Oloryn@strider-laptop.broker.freenet6.net] has joined #ruby-lang
DEac- [DEac-!~deac@81.16.104.86] has joined #ruby-lang
<shevy> dumdedum
<dr0id> dumdumadum
<shevy> dumbaddududdum!
<shevy> that is easier than writing code
<shevy> I should do that all day long instead ...
<shevy> dumdadum
<dr0id> go ahead
imperator2 [imperator2!~djberg96@184-96-109-96.hlrn.qwest.net] has joined #ruby-lang
<shevy> dumdedum!
amh345 [amh345!~amh345@unaffiliated/amh345] has quit [#ruby-lang]
irk3z [irk3z!~irek@78.47.187.53] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@st-dellaved.statistica.unimib.it] has joined #ruby-lang
toretore [toretore!~toretore@crr06-3-82-231-12-81.fbx.proxad.net] has joined #ruby-lang
jordan` [jordan`!~gromit@posteauge.rsr.lip6.fr] has joined #ruby-lang
<rue> Syntax error
<ddfreyne> if you're happy and you know it, syntax error
<shevy> syntax error
<dr0id> clap your hands, syntax error
<shevy> syntax error
jayeola [jayeola!~jmaclean@ldn-office.youdevise.com] has joined #ruby-lang
davidw [davidw!~davidw@host228-251-static.95-94-b.business.telecomitalia.it] has joined #ruby-lang
heftig [heftig!~Jan@archlinux/developer/heftig] has joined #ruby-lang
judofyr [judofyr!~judofyr@195.159.219.65] has joined #ruby-lang
yumike [yumike!~yumike@188.65.130.106] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@124-168-217-142.dyn.iinet.net.au] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@2001:268:306:3:226:8ff:fedd:31a3] has joined #ruby-lang
rpowell [rpowell!~rpowell@CPE-124-184-90-185.lns13.cht.bigpond.net.au] has joined #ruby-lang
stamina [stamina!~stamina@ip5452a9bc.speed.planet.nl] has joined #ruby-lang
AlHafoudh [AlHafoudh!~textual@85.248.11.120] has joined #ruby-lang
phaedrix_ [phaedrix_!~phaedrix@c-24-22-86-235.hsd1.or.comcast.net] has joined #ruby-lang
kitallisii [kitallisii!~kitallis@122.172.247.109] has joined #ruby-lang
cola_zero [cola_zero!~cola_zero@www5054u.sakura.ne.jp] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
yumatov [yumatov!~yumike@213.234.238.123] has joined #ruby-lang
ksinkar__ [ksinkar__!~ksinkar@117.195.102.211] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
jbsan_ [jbsan_!~jbsan@host86-147-222-73.range86-147.btcentralplus.com] has joined #ruby-lang
voker57 [voker57!~voker57@128-70-32-32.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
gix [gix!~gix@e180027094.adsl.alicedsl.de] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
cola_zero [cola_zero!~cola_zero@www5054u.sakura.ne.jp] has joined #ruby-lang
iuliu [iuliu!~iuliu@89.28.7.27] has joined #ruby-lang
ezkl` [ezkl`!~ezkl@dynamic-acs-24-144-206-131.zoominternet.net] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
AlHafoudh [AlHafoudh!~textual@85.248.11.120] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
nofxx [nofxx!~nofxx@177.106.71.234] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
irk3z [irk3z!~irek@78.47.187.53] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
csherin [csherin!~csherin@61.11.125.80] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
piglop [piglop!~piglop@del63-1-82-243-95-115.fbx.proxad.net] has joined #ruby-lang
<andrewvos> This channel has finally lost it
davidw [davidw!~davidw@apache/committer/davidw] has joined #ruby-lang
mantono [mantono!~mantono@c83-251-126-234.bredband.comhem.se] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
cynosure [cynosure!~cynosure@centrumnet.hu] has joined #ruby-lang
jensn [jensn!~Jens@ip228-26.wireless.lu.se] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
<andrewvos> Hmmm. I'm using a procfile in heroku and getting "Heroku push rejected, no Rails or Rack app detected"
<andrewvos> Anyone know what I'm doing wrong?
<andrewvos> Procfile I mean
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
jMCg [jMCg!~hiro@apache/committer/igalic] has joined #ruby-lang
ricardovaleriano [ricardovaleriano!~ricardova@186.220.217.229] has joined #ruby-lang
imperator [imperator!~Daniel@184-96-109-96.hlrn.qwest.net] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@115.111.177.122] has joined #ruby-lang
jordan` [jordan`!~gromit@posteauge.rsr.lip6.fr] has joined #ruby-lang
indeterminate [indeterminate!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-78-144-139-130.as13285.net] has joined #ruby-lang
Pikachu [Pikachu!c1342d11@gateway/web/freenode/ip.193.52.45.17] has joined #ruby-lang
kitallis [kitallis!~kitallis@122.172.247.109] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
ABK [ABK!~abhishekk@14.140.107.130] has joined #ruby-lang
jensn [jensn!~Jens@ip228-26.wireless.lu.se] has joined #ruby-lang
* imperator have expected freenode to be down today
<imperator> s/have/half
ramonmaruko [ramonmaruko!~marco@122.52.126.66] has joined #ruby-lang
mark_locklear [mark_locklear!~jlocklear@ab-tech-lan-to-ab-tech-gw.ncren.net] has joined #ruby-lang
arooni-mobile [arooni-mobile!~arooni-mo@190.197.20.98] has joined #ruby-lang
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby-lang
mkscrg [mkscrg!~mkscrg@ool-18e4f9d6.dyn.optonline.net] has joined #ruby-lang
jensn [jensn!~Jens@ip228-26.wireless.lu.se] has joined #ruby-lang
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0E0C3.dip0.t-ipconnect.de] has joined #ruby-lang
<cout> imperator: but SOPA only covers the internet, and the internet is the double-yew double-yew double-yew :)
<judofyr> RUBY RUBY RUBY
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
Defusal [Defusal!DeFi@dsl-241-8-53.telkomadsl.co.za] has joined #ruby-lang
Defusal [Defusal!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
<rippa> double-jew
<imperator> mussorgsky?
<imperator> cout, howdy
<cout> hihi
ReiCat [ReiCat!~nikon6@87-119-178-217.tll.elisa.ee] has joined #ruby-lang
<imperator> reddit and bgg down, i might actually get some work done today
<cout> what's bgg?
<cout> and IMO reddit doesn't really have any content worth reading anyway
<judofyr> cout: you don't want to know
<cout> judofyr: salamander porn, then?
<rue> cout: Reddit has no content worth reading that you won't be notified of by other means
<imperator> bgg => boardgamegeek.com
ReiCat [ReiCat!~nikon6@87-119-178-217.tll.elisa.ee] has quit [#ruby-lang]
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby-lang
Defusal_ [Defusal_!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
savage-_ [savage-_!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby-lang
mattonrails [mattonrails!~mattonrai@70-89-14-189-jax-fl.hfc.comcastbusiness.net] has joined #ruby-lang
jensn [jensn!~Jens@io.fysik.lu.se] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby-lang
<dr0id> dumdedum
<dr0id> I wish google.com was down too
Pikachu [Pikachu!c1342d11@gateway/web/freenode/ip.193.52.45.17] has joined #ruby-lang
Mchl [Mchl!~Mchl@h1881165560.rev.rootvps.pl] has joined #ruby-lang
bglusman [bglusman!~bglusman@c-68-80-200-61.hsd1.pa.comcast.net] has joined #ruby-lang
robbrit [robbrit!~rob@38.108.76.250] has joined #ruby-lang
<imperator> man, that seems like a waste of a wish, now you only have 2 left
<cout> I wish wishes were real sometimes
<cout> but only when it's to my advantage
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
<ddfreyne> I wish I had unlimited wishes
tomzx [tomzx!~tomzx@dsl-156-157.aei.ca] has joined #ruby-lang
<cout> that's not to my advantage
Mchl [Mchl!~Mchl@188.116.55.60] has joined #ruby-lang
<imperator> dammit git, if i checkout to a different branch, don't leave me in a stale directory!
<judofyr> what does wishes have to do with your advantage?
<cout> 09:15 < cout> I wish wishes were real sometimes
<cout> 09:15 < cout> but only when it's to my advantage
<judofyr> ah
rob___ [rob___!~rob@dust.cx] has joined #ruby-lang
<rob___> hi
<judofyr> hi rob___
<rob___> can someone tell me how to install a gem from github? im using rvm..
Sailias [Sailias!~jonathan@s72-38-77-178.static.comm.cgocable.net] has joined #ruby-lang
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
<rob___> i followed the instructions but require 'clouddns' fails
<judofyr> what does "gem list" say?
<rob___> oh, it does actually list it
<judofyr> well that's good
<judofyr> have you tried to require 'rubygems' first?
<rob___> judofyr: i'm using 1.9 so i thought i didnt have to? anyway, that seems to have no effect..
<judofyr> yeah, you're right
<rob___> /home/rw/.rvm/gems/ruby-1.9.3-p0/gems/rackspace-clouddns-234d328 exists
<rob___> in that, lib/clouddns.rb exists
<judofyr> that was a funny version-name
<rob___> it because i downloaded the zip from github
<judofyr> are you sure you run "rake install"?
<rob___> aye
<judofyr> what version does "gem list" say you have?
<judofyr> of clouddns
<rob___> rackspace-clouddns (0.1.1)
<rue> ddfreyne: Granted. You'll be infinitely returned to the moment of wishing, 5 minutes subsequent to making each wish.
boodle [boodle!~boodle@174.46.129.34] has joined #ruby-lang
<judofyr> rob___: try `gem "rackspace-clouddns"` before the require
<rob___> http://pastebin.com/xRBqk6HW is what i get when i try to install it using the method on their site
<judofyr> not git@github.com:sosedoff/rackspace-clouddns.git
Evil_Ed [Evil_Ed!~edward@host217-34-40-52.in-addr.btopenworld.com] has joined #ruby-lang
<rob___> ahh excellent, thanks
<rob___> ahh thanks very much judofyr, you've been brilliant help
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby-lang
<judofyr> :)
<rob___> cheers!
rob___ [rob___!~rob@dust.cx] has quit [#ruby-lang]
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
mattonrails [mattonrails!~mattonrai@70-89-14-189-jax-fl.hfc.comcastbusiness.net] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@184.175.19.180] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
<darix> bundler is such a useless tool.
<andrewvos> darix: Hardly useless
<ddfreyne> darix: I disagree. If you're providin ga repository for a project that isn't bundled as a gem and want to install all dependencies, it's quite useful
<judofyr> darix: have you ever tried to installl all gems needed on an old Rails project?
<judofyr> I spent 15 minutes just to find the correct RSpec version…
<judofyr> then I wrote a Gemfile instead
<judofyr> and poof! everything worked
<darix> ruby -r rubygems -e "gem 'rails', '3.1.3' ; puts require 'rails'" ; bundle list
<darix> true
<darix> Could not find gem 'rails (= 3.1.3) ruby' in any of the gem sources listed in your Gemfile.
<darix> if there are conflicting requires which breaks the resolving process
<darix> it should tell that to me
<darix> but it doesnt
yalue [yalue!yalue@nat/ibm/x-jhcrdfiqizlxormi] has joined #ruby-lang
leonL [leonL!~leonl@CPE0024a5b652a3-CM000f21205d86.cpe.net.cable.rogers.com] has joined #ruby-lang
<darix> also it always tries to pull in the development group for some weird reason
<judofyr> have you defined rubygems.org as a source?
<judofyr> darix: yes, it installs all groups by default
<darix> judofyr: yes
<darix> judofyr: rails is installed system wide
<darix> actually all gems for production are installed systemwide
<judofyr> darix: just run "bundle" then?
<darix> judofyr: i dont have a compiler on a server on purpose?
<darix> that's why the gems are installed via binary packages
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<darix> fun even the 2 lines with source and gem 'rails', '3.1.3' fail
stephenp [stephenp!~stephenp@gatepost.hos.net] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310B8B.dip0.t-ipconnect.de] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
<darix> said rails project had a .bundle/config file that blocked shared gems
<rue> Bundler is almost, but not entirely, unlike a good solution.
JEG2 [JEG2!~JEG2@ip72-198-103-217.ok.ok.cox.net] has joined #ruby-lang
ricardovaleriano [ricardovaleriano!~ricardova@189-69-29-244.dsl.telesp.net.br] has joined #ruby-lang
jbwiv [jbwiv!~wellsj@world.timcogso.com] has joined #ruby-lang
outoftime [outoftime!~mat@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby-lang
rippa [rippa!~rippa@109-161-65-52.pppoe.yaroslavl.ru] has joined #ruby-lang
bl00dshooter [bl00dshooter!~bl00dshoo@201.19.169.233] has joined #ruby-lang
RomD [RomD!~Roman@nrbg-4d0760c5.pool.mediaWays.net] has joined #ruby-lang
dv310p3r [dv310p3r!~dv310p3r@host-208-68-238-122.biznesshosting.net] has joined #ruby-lang
MistyM [MistyM!~mistym@50.museumforhumanrights.com] has joined #ruby-lang
MistyM [MistyM!~mistym@50.museumforhumanrights.com] has joined #ruby-lang
Austin__ [Austin__!~austin@96.45.197.22] has joined #ruby-lang
mattonrails [mattonrails!~mattonrai@70-89-14-189-jax-fl.hfc.comcastbusiness.net] has joined #ruby-lang
<slyphon> injekt: hey, around?
ap3mantus [ap3mantus!~ap3mantus@c-98-217-187-172.hsd1.ma.comcast.net] has joined #ruby-lang
imajes [imajes!~imajes@is.imaj.es] has joined #ruby-lang
TvL2386 [TvL2386!~tom@ip5452a95e.adsl-surfen.hetnet.nl] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-51-98.washdc.btas.verizon.net] has joined #ruby-lang
tla [tla!~tla@toelboell-lund.dk] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
Swimming_Bird [Swimming_Bird!~textual@64.70.114.89] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-14-26.cable.teksavvy.com] has joined #ruby-lang
chris2 [chris2!~chris@vuxu.org] has joined #ruby-lang
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby-lang
lake [lake!~lake@li71-228.members.linode.com] has joined #ruby-lang
spleeze [spleeze!~Spleeze@173-15-131-114-BusName-Philadelphia.hfc.comcastbusiness.net] has joined #ruby-lang
AlHafoudh [AlHafoudh!~textual@dsl-static-173.212-5-200.telecom.sk] has joined #ruby-lang
darix [darix!darix@aura.nordisch.org] has joined #ruby-lang
darix [darix!darix@irssi/staff/darix] has joined #ruby-lang
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby-lang
sdegutis [sdegutis!~sdegutis@unaffiliated/steven] has joined #ruby-lang
ksinkar__ [ksinkar__!~ksinkar@115.242.109.136] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
Oloryn_lt1 [Oloryn_lt1!~Oloryn@home.benshome.net] has joined #ruby-lang
ksinkar__ [ksinkar__!~ksinkar@115.241.240.184] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
<injekt> slyphon: sup
<slyphon> injekt: oh hai dere
<slyphon> so
<slyphon> i was getting an error before that i'm no longer getting
<slyphon> basically if an option is not given, and you try opts.host (for example) it will barf with method missing "no ID given", but if you do opts[:host] then it works fine
<injekt> slyphon: opts.host is never a method
<injekt> opts.host? and opts[:host]
<slyphon> orly?
<slyphon> damn
<injekt> yeah, I'm not *that* open with method_missing
<slyphon> ok, i misread the docs
<slyphon> and "didn't think" when "reading the code" because that "should have been obvious" when i fucking "read method_missing"
<injekt> Slop#[] returns the arg value, Slop#option? is the same as #present?(:option)
jredville [jredville!~james.dev@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
rushed [rushed!~rushed@99-73-225-9.lightspeed.austtx.sbcglobal.net] has joined #ruby-lang
savage- [savage-!~savage-@209.118.197.220] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
voker57 [voker57!~voker57@128-70-27-208.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
indstry [indstry!~apple@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
jaisoares [jaisoares!~jsoares@bl13-197-21.dsl.telepac.pt] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby-lang
jakr [jakr!~nofreewil@unaffiliated/jakr] has joined #ruby-lang
elux [elux!~peter@96.45.198.150] has joined #ruby-lang
JoelMcCracken [JoelMcCracken!~user@pool-72-95-162-219.pitbpa.east.verizon.net] has joined #ruby-lang
dragonkh [dragonkh!~kings@dr4g0nn.gotadsl.co.uk] has joined #ruby-lang
gianlucadv [gianlucadv!~user@109.53.170.204] has joined #ruby-lang
voker57 [voker57!~voker57@128-70-84-86.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
mark_azevedo [mark_azevedo!~mark_azev@12.249.184.226] has joined #ruby-lang
dustacio [dustacio!~dustacio@cpe-24-28-2-12.austin.res.rr.com] has joined #ruby-lang
queequeg1 [queequeg1!~chatzilla@c-71-202-152-67.hsd1.ca.comcast.net] has joined #ruby-lang
headius [headius!~headius@71-210-154-45.mpls.qwest.net] has joined #ruby-lang
NinoScript [NinoScript!c81ba7f4@gateway/web/freenode/ip.200.27.167.244] has joined #ruby-lang
sdegutis [sdegutis!~sdegutis@unaffiliated/steven] has quit [#ruby-lang]
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby-lang
Filuren [Filuren!~Filuren@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby-lang
<zzak> inkjet :D
zzak [zzak!~zzak@ec2-107-20-68-16.compute-1.amazonaws.com] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
lolkid [lolkid!~lolkid@p5B1361EB.dip.t-dialin.net] has joined #ruby-lang
publicvoid [publicvoid!~publicvoi@p5DC1515A.dip.t-dialin.net] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
<lolkid> good evening, could anyone help me with a general question about how to use the docs and ri?
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
<wallerdev> what do you want to know?
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
<lolkid> e.g. I wanted to know how to use color in console and read about curses, I then opened ruby19.chm (rubyinstaller 1.9.3) and read about "color_pair(attrs) - Sets the color pair attributes to attrs." which doesn't tell me anything.. the other thing is I opened ri.bat and tried to enter sth but either I'm using it wrong or it seems to be empty
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
<lolkid> I mean what type of thing is "attrs"?.. and sadly there are not much examples, also I somehow find those docs kinda overwhelming/a little unorganized :/
indstry [indstry!~apple@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
<drbrain> lolkid: `ri -f ansi` will output ri data in color
<drbrain> lolkid: you can learn about the ansi escape sequences to make colors here: http://www.linuxhowtos.org/Tips%20and%20Tricks/ansi_escape_sequences.htm
<drbrain> or on wikipedia when it comes back from the SOPA blackout
hzlocky [hzlocky!~me@dynamic-vpdn-46-53-165-145.telecom.by] has joined #ruby-lang
<drbrain> lolkid: I don't recommend trying to learn from the ri data since it's outputting text from a document tree, so you'll need to learn a lot about how rdoc works to understand how colors work
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby-lang
<lolkid> drbrain: I'm not using linux, though, so these escape sequences wouldn't work, would they?
headius [headius!~headius@71-210-154-45.mpls.qwest.net] has joined #ruby-lang
<drbrain> lolkid: probably not
<drbrain> looks like you'll need to wrap the console API to do it: http://msdn.microsoft.com/en-us/library/ms682087.aspx
<drbrain> you can probably call it via WIN32/DL
<drbrain> oh look, there seems to be a gem: https://rubygems.org/gems/win32console
savage- [savage-!~savage-@209.118.197.220] has joined #ruby-lang
jakr [jakr!~nofreewil@unaffiliated/jakr] has quit ["Leaving"]
<lolkid> I actually have a working example for curses, but I just couldn't figure how to get from the docs to a working script.. I mean I once used Ruby but not that thoroughly and it's also quite some time ago and now I wan't to relearn it, but I just can't to get a correct view of the docs and gems, for example when I use gems and find some gem which sounds fitting, one can simply install it, but how do I actually learn how to use it? where do I find
<lolkid> concrete information about its api? I feel kinda lost and overwhelmed when trying to learn a scripting language
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
uniqanomaly [uniqanomaly!~ua@dynamic-78-8-214-208.ssp.dialog.net.pl] has joined #ruby-lang
headius [headius!~headius@71-210-154-45.mpls.qwest.net] has joined #ruby-lang
<drbrain> you can run `gem server` and go to http://localhost:8808/ to see installed documentation for all your gems
<drbrain> you can also browse through the source on github or locally
<jredville> for stuff on github, you can use rubydoc.info to take a look before you install
jbsan [jbsan!~jbsan@host86-147-222-73.range86-147.btcentralplus.com] has joined #ruby-lang
<jorgenpt> What would you guys recommend for parsing a HTML document, accessing it with something like XPath or CSS selectors (or even the DOM)?
<jorgenpt> Is nokogiri the bomb?
<drbrain> nokogiri
benanne [benanne!~rijdier@ip-83-134-149-227.dsl.scarlet.be] has joined #ruby-lang
<jredville> i like nokogiri's general api
<jredville> it's not pure ruby, which has bitten me :( (i can't get it to install on my imac, but it works great on my macbook)
<jorgenpt> Is Time#strftime the best way to get the week number?
tquid [tquid!~ejbbell@m1.naos.org] has joined #ruby-lang
kain_ [kain_!~kain@151.64.210.200] has joined #ruby-lang
<tquid> Hi folks.
<jredville> i thought there was a method on time to get the week number...
<jorgenpt> Might be, I can't seem to find it
<tquid> Is there by any chance an RCS module for ruby? My google-fu is weak on this, since rcs gets referenced so many other ways.
<tquid> Something that would let me do say file.checkin(), file.checkout(), file.lock(), that kind of thing.
<apeiros_> jorgenpt: yes, strftime is probably your best bet. and no, there's no direct method.
<apeiros_> jorgenpt: also make sure you know by what definition you want your week number
amerine [amerine!~mturner@67.204.184.82] has joined #ruby-lang
<jorgenpt> apeiros_: I don't really care, since this is to get information about a business that's closed during weekends ;-)
<apeiros_> afair, strftime only has iso-8601 and another one (probably one that's common in the US)
<apeiros_> jorgenpt: what's the week-definition got to do with being closed during weekends?
<jorgenpt> Well, aren't the different definitions just whether the week starts on sunday or monday?
<jredville> how does the week number affect that though?
<jorgenpt> (God I hate working with dates)
<apeiros_> jorgenpt: you don't seem to grasp what the effects are. and no, I think that's not the only difference.
<apeiros_> the difference you get is different week numbers for the same date.
<jorgenpt> I do grasp the difference, it's just moot for this specific use-case.
<apeiros_> oh how I love ignorance
<apeiros_> well, your problem
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
<jorgenpt> I'm retrieving the daily menu, and that menu is only provided on weekdays (Monday to Friday), so I'll always get a "no menu" for a sunday. :-)
<jorgenpt> (In addition, there's no way for me to know which definition they're using for weeks, but I can assume it's the US one)
<jorgenpt> Do you see why I say it's moot?
<rippa> Date.new(2001,2,3).cweek #=> 5
<rippa> not Time though
<jorgenpt> 1.9.2 is giving me NoMethodError: undefined method `cweek' for #<Date:0x00000101063cc0>
<jredville> rippa: I'm not crazy! I knew we ran into an issue with a week related method in Rubyspec a few years back
<rippa> require 'date'
<jorgenpt> Aha
<rippa> documentation is your friend
nofxx [nofxx!~nofxx@177.106.71.234] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
NARKOZ [NARKOZ!~NARKOZ@46.228.177.254] has joined #ruby-lang
spleeze [spleeze!~Spleeze@173-15-131-114-BusName-Philadelphia.hfc.comcastbusiness.net] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
hahuang65 [hahuang65!~hahuang65@204.11.231.186.static.etheric.net] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
twittard [twittard!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
tquid [tquid!~ejbbell@m1.naos.org] has joined #ruby-lang
nofxx_ [nofxx_!~nofxx@177.106.71.234] has joined #ruby-lang
nofxx_ [nofxx_!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby-lang
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby-lang
qpingu [qpingu!~Adium@67.218.117.238] has joined #ruby-lang
cyri_ [cyri_!~cyri_@jem75-1-87-88-118-80.dsl.sta.abo.bbox.fr] has joined #ruby-lang
dbussink [dbussink!~dbussink@ec2-46-137-118-125.eu-west-1.compute.amazonaws.com] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
spleeze [spleeze!~Spleeze@173-15-131-114-BusName-Philadelphia.hfc.comcastbusiness.net] has joined #ruby-lang
kurko_ [kurko_!~kurko_@201.41.25.43] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
alexkane [alexkane!~alexkane@38.117.157.141] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
dbussink [dbussink!~dbussink@ec2-46-137-118-125.eu-west-1.compute.amazonaws.com] has joined #ruby-lang
nuclearsandwich [nuclearsandwich!~nuclearsa@74-93-3-244-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
wdperson [wdperson!~wdperson@cpe-173-89-163-182.neo.res.rr.com] has joined #ruby-lang
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby-lang
kurko__ [kurko__!~kurko_@201.41.25.43] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
virunga [virunga!~virunga@151.64.56.147] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
malev [malev!~malev@190.210.138.237] has joined #ruby-lang
Heimidal_ [Heimidal_!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
virunga [virunga!~virunga@151.64.56.147] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-71-199-243-97.hsd1.fl.comcast.net] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
LnL [LnL!~LnL@d54C4DBC4.access.telenet.be] has joined #ruby-lang
esufan [esufan!~nekid@117.193.241.65] has joined #ruby-lang
kurko_ [kurko_!~kurko_@201.41.25.43] has joined #ruby-lang
LnL [LnL!~LnL@d54C4DBC4.access.telenet.be] has quit [#ruby-lang]
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
pxjorge [pxjorge!~pxjorge@a79-168-9-12.cpe.netcabo.pt] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
SteveG [SteveG!~steve@pdpc/supporter/21for7/steveg] has joined #ruby-lang
tquid [tquid!~ejbbell@m1.naos.org] has quit [#ruby-lang]
kurko__ [kurko__!~kurko_@201.41.25.43] has joined #ruby-lang
Locke23rus [Locke23rus!~quassel@128-70-13-32.broadband.corbina.ru] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@subtle/user/kyrylo] has joined #ruby-lang
kurko__ [kurko__!~kurko_@201.41.25.43] has joined #ruby-lang
zmack [zmack!~zmack@78.97.143.6] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
RomD [RomD!~Roman@nrbg-4d0760c5.pool.mediaWays.net] has joined #ruby-lang
rdeshpande [rdeshpande!~rdeshpand@unaffiliated/rdeshpande] has joined #ruby-lang
mark_azevedo [mark_azevedo!~mark_azev@12.249.184.226] has joined #ruby-lang
<freedrull> how does the `file` command figure out the encoding of a file?
<heftig> magic
<freedrull> oh
<freedrull> you are correct
<freedrull> ~/src/file-5.10$ ls magic/
<drbrain> statistical magic
spleeze [spleeze!~Spleeze@173-15-131-114-BusName-Philadelphia.hfc.comcastbusiness.net] has joined #ruby-lang
lake [lake!~lake@li71-228.members.linode.com] has joined #ruby-lang
lake [lake!~lake@li71-228.members.linode.com] has joined #ruby-lang
qpingu [qpingu!~Adium@67.218.117.238] has quit [#ruby-lang]
jordan` [jordan`!~gromit@posteauge.rsr.lip6.fr] has joined #ruby-lang
livinded [livinded!~lolwut@s042n230.csun.edu] has joined #ruby-lang
leonL [leonL!~leonl@CPE0024a5b652a3-CM000f21205d86.cpe.net.cable.rogers.com] has joined #ruby-lang
ilyam [ilyam!~ilyam@2620:65:0:281:f4d9:5e1f:6a43:9fd5] has joined #ruby-lang
KillerFox [KillerFox!~rn@home.protection-fault.ch] has joined #ruby-lang
KillerFox [KillerFox!~rn@home.protection-fault.ch] has joined #ruby-lang
petercooper [petercooper!~petercoop@82.144.254.2] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby-lang
<rue> Stagic
twittard_ [twittard_!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
Defusal [Defusal!DeFi@dsl-240-226-216.telkomadsl.co.za] has joined #ruby-lang
Defusal [Defusal!DeFi@unaffiliated/ecnerifed] has joined #ruby-lang
<freedrull> whats statistical about it
havenn [havenn!~skipper@pool-71-189-127-140.lsanca.fios.verizon.net] has joined #ruby-lang
<rue> Sufficiently advanced filetype detection is statistically indistinguishable from magic
<rue> Statistical filetype detection is sufficiently distinguishable from magic
<zzak> drbrain: around?
<drbrain> zzak: hi
<zzak> and what branch is that for?
<drbrain> zzak: it's for trunk
<zzak> 2.0 is trunk right?
dfr|mac [dfr|mac!dfr|work@nat/google/x-qcttcrmajtfkwnvu] has joined #ruby-lang
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby-lang
<drbrain> it's accurate to the Last-Modified date: Last-Modified: Wed, 18 Jan 2012 20:33:53 GMT
<drbrain> yes
<drbrain> 2.0.0dev to be pedantic
Heimidal_ [Heimidal_!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
<zzak> okay, thanks
robbrit [robbrit!~rob@38.108.76.250] has quit [#ruby-lang]
<zzak> one last bit
<drbrain> someday I should fix up that embarrassing whitespace
<zzak> is http://ruby-doc.org/core-2.0/index.html built from trunk as well?
<drbrain> james_britt would know, but let me look...
<drbrain> if it's built from trunk, it hasn't been updated in the last week
<drbrain> since http://ruby-doc.org/core-2.0/IO.html#method-c-read doesn't have my recent commit
<drbrain> maybe it updates monthly?
antinitro_ [antinitro_!~adam@cpc1-stap4-0-0-cust418.12-2.cable.virginmedia.com] has joined #ruby-lang
havenn [havenn!~skipper@pool-71-189-127-140.lsanca.fios.verizon.net] has joined #ruby-lang
RomyRomy [RomyRomy!~stickycak@cpe-74-64-122-182.nyc.res.rr.com] has joined #ruby-lang
dfr|mac [dfr|mac!dfr|work@nat/google/x-wzenusdwwjfovjxu] has joined #ruby-lang
<zzak> just curious, thanks eric
jjmgbt [jjmgbt!~chatzilla@c-71-61-59-172.hsd1.pa.comcast.net] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
<drbrain> np!
cconstantine_ [cconstantine_!~cconstant@173.247.200.5] has joined #ruby-lang
<cconstantine_> hey all, I'm on debian 6, and I did a 'gem install bundler', but 'bundle' isn't getting symlinked to /usr/bin so I can't use it… any ideas? (oh, ruby 1.9)
<freedrull> rue: ah yeah, i remember that bit :3
<rue> cconstantine_: gem list shows it?
<rue> This is system-built Ruby, not rvm, presumably
<cconstantine_> rue: system built, managed with update-alternatives. gem list shows bundler as installed
<cconstantine_> and it's in /var/lib/gem/1.9.1/bin
<rue> The bundle executable? Are the rest of your executables there too?
<cconstantine_> the rest?
<cconstantine_> I've only just installed bundler
<havenn> cconstantine_: which ruby; which bundler
<rue> Ah
<havenn> nvm
<cconstantine_> bundler 1.0.21
<rue> gem env will probably show that path as exe dir?
<cconstantine_> ruby 1.9.2p0
<cconstantine_> gem 1.3.7
<havenn> Current gem -v is 1.8.15
<rue> I'm not sure if it's supposed to be linking it to /usr/bin, presumably the distro's configured that
<cconstantine_> havenn: that might be a problem
<havenn> Maybe gem install update --system
<havenn> err
<rue> Obviously you can always add to $PATH
<havenn> gem update --system
<cconstantine_> havenn: I think that's it.
<cconstantine_> trying
<havenn> Or sudo ln -s /var/lib/ … but I'd try updating gem fosho
<cconstantine_> gaza! that was it
<cconstantine_> s/gaza/haza
<cconstantine_> I really can't wait until this whole 'what manages packages of things' thing is resolved… apt, rvm, rpm, brew, gem… too many systems doing the same thing
<cconstantine_> and I'm not saying it's ruby's fault
<chris2> cconstantine_: as if ever
<cconstantine_> chris2: I know :-/
pabloh [pabloh!~pablo@186.22.82.39] has joined #ruby-lang
<manveru> apt screws with ruby, so we had to screw with apt
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby-lang
<manveru> but rvm is worth using just for gemsets alone... and bundler still should die
<cconstantine_> oh? I thought bundler was thew new hotness
<manveru> no, it's a virus slowly spreading from the railssphere
<havenn> >.>
<cconstantine_> ah, how I got 'contaminated'
<cconstantine_> how is it bad?
<havenn> manveru: trolling? or rvm gemsets? =P
<cconstantine_> gaaahhhhh!!! I was gonna link to an xkcd but sopa
<manveru> :)
<manveru> havenn: no, it's just a sentence i try to sneak in here every day
<manveru> i'm kinda tired of 70% of people that come here having trouble with bundler
<cconstantine_> in all fairness my problem was with gem
<havenn> cconstantine_: I'd say it was with apt installing silly gem version =P
<drbrain> "It may fail utterly at what it's supposed to do, but at least it's slow as hell while doing so." LOL
<cconstantine_> and a key feature I see of bundler is the ability to strictly control what version of a gem is used
srbartlett [srbartlett!~srbartlet@202.146.7.239] has joined #ruby-lang
<cconstantine_> bundler *is* amazingly slow
<drbrain> cconstantine_: sure, and I'm wondering why that key feature wasn't contributed back to rubygems
<cconstantine_> right
<cconstantine_> I rather like how npm works (in the node world)
<drbrain> … despite the original author of bundler saying he wanted to and the rubygems maintainers giving consent …
<cconstantine_> and it's very similar to bundler
<manveru> even rbx and jruby now take a -G option for gemfiles :(
mbriggs [mbriggs!~mattb@64.215.160.39] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
<manveru> anyway, at least i never have to deal with it
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
davidw [davidw!~davidw@adsl-ull-122-110.51-151.net24.it] has joined #ruby-lang
jredville [jredville!~james.dev@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
redruby [redruby!~Adium@116-90-136-55.static.dsl.unleash.net.nz] has joined #ruby-lang
<cconstantine_> *sigh* more gem fun. I have thor installed with gem (gem install thor), and it's in my Gemfile and lists when doing a 'bundle install', but a bundle exec rake assets:precompile can't find it
<cconstantine_> but in 'bundle exec irb' I can do a require 'thor'
<crankharder> IPAddress.new() access args like "12314.234234.345345.435643" -- which is definitely not an valid address
<crankharder> can I use IPAddr in some way to verify a valid IPv4 address?
<crankharder> s/access/accepts/
<crankharder> man i suck: s/IPAddress/IPAddr/
<drbrain> crankharder: uh… ruby -ripaddr -e 'IPAddr.new "12314.234234.345345.435643"' # => ArgumentError
<drbrain> crankharder: for 1.8.7, 1.9.2, 1.9.3, 2.0.0dev
tekin [tekin!~tekin@cpc8-with5-2-0-cust208.1-4.cable.virginmedia.com] has joined #ruby-lang
longtheta [longtheta!u4275@gateway/web/irccloud.com/x-aepeektwiafcbcqm] has joined #ruby-lang
<crankharder> drbrain: http://pastebin.com/B3yXHAYj
simon_weber [simon_weber!u4119@gateway/web/irccloud.com/x-tpihybjcuzzjscck] has joined #ruby-lang
<drbrain> crankharder: o_O
<drbrain> crankharder: what does IPAddr.instance_method(:initialize).source_location say?
benanne [benanne!~rijdier@ip-213-49-83-219.dsl.scarlet.be] has joined #ruby-lang
<drbrain> 456456 % 256 # => 8 which explains that last digit
<drbrain> crankharder: and, does the result change between irb and ruby -e ?
<drbrain> for IPAddr.new
<crankharder> 3require 'ipaddr' ; IPAddr.instance_method(:initialize).source_location => ["/Users/jsharpe/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/ipaddr.rb", 453]
<drbrain> well that's good
<crankharder> drbrain: http://pastebin.com/n87QvDEZ
<drbrain> crankharder: I mean for ruby -ripaddr -ve 'IPAddr.new "12314.234234.345345.435643"'
<crankharder> I have found a solution for my original problem tho
<crankharder> $ ruby -ripaddr -ve 'IPAddr.new "12314.234234.345345.435643"'
<crankharder> ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.1]
<drbrain> wow
<drbrain> crankharder: how about: ruby -rsocket -e 'IPSocket.getaddress "12314.234234.345345.435643"'
<crankharder> returns nothing
<drbrain> crankharder: there's ipv4?
<crankharder> eh?
<drbrain> IPAddr#ipv4?
<drbrain> but I think that just checks the address family
<crankharder> yep
<crankharder> returns true for the ipaddr instance
twittard [twittard!~twittard@wc.lax.truecarcorp.com] has joined #ruby-lang
<drbrain> I'm also on OS X 10.7 and IPSocket.getaddress behaves differently for me
<crankharder> odd
<crankharder> built from source
<drbrain> maybe it's something in your DNS resolver since getaddress calls getaddrinfo(3)
denysonique_ [denysonique_!u484@gateway/web/irccloud.com/x-rhdycmxlzeodvtll] has joined #ruby-lang
<drbrain> your upstream DNS resolver
simon_weber [simon_weber!u4119@gateway/web/irccloud.com/x-ymbicrntshnmewgh] has joined #ruby-lang
longtheta [longtheta!u4275@gateway/web/irccloud.com/x-taqiwpfaenqqsktn] has joined #ruby-lang
agib [agib!u781@gateway/web/irccloud.com/x-xsusclnernewqfrk] has joined #ruby-lang
frangiz [frangiz!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
benanne [benanne!~rijdier@ip-213-49-83-219.dsl.scarlet.be] has joined #ruby-lang
elux_ [elux_!~peter@96.45.198.150] has joined #ruby-lang
abuiles [abuiles!u1641@gateway/web/irccloud.com/x-urgbpxfkhfsxdayw] has joined #ruby-lang
Ca1us [Ca1us!~Caius@about/apple/macbookpro/Caius] has joined #ruby-lang
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
dbussink [dbussink!~dbussink@ec2-46-137-118-125.eu-west-1.compute.amazonaws.com] has joined #ruby-lang
pxjorge [pxjorge!~pxjorge@a79-168-9-12.cpe.netcabo.pt] has joined #ruby-lang
akahn [akahn!u2243@gateway/web/irccloud.com/x-ugcwhoxeinpngxia] has joined #ruby-lang
epitron [epitron!~epitron@unaffiliated/epitron] has joined #ruby-lang
bousquet [bousquet!~bousquet@67.138.234.46] has joined #ruby-lang
bousquet [bousquet!~bousquet@67.138.234.46] has joined #ruby-lang
epitron_ [epitron_!~epi@bito.ponzo.net] has joined #ruby-lang
lightcap [lightcap!~lightcap@174-25-186-227.ptld.qwest.net] has joined #ruby-lang
lightcap [lightcap!~textual@174-25-186-227.ptld.qwest.net] has joined #ruby-lang
mbriggs [mbriggs!~mattb@64.215.160.39] has joined #ruby-lang
bl00dshooter [bl00dshooter!~bl00dshoo@201.19.169.233] has joined #ruby-lang
lightcap_ [lightcap_!~lightcap@174-25-186-227.ptld.qwest.net] has joined #ruby-lang
jmontross [jmontross!~Adium@static-96-236-65-137.snfcca.dsl-w.verizon.net] has joined #ruby-lang
lightcap [lightcap!~lightcap@174-25-186-227.ptld.qwest.net] has joined #ruby-lang
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-fnlieidqhepgzhlz] has joined #ruby-lang
solars [solars!~solars@194.208.132.118] has joined #ruby-lang
mccraig [mccraig!u574@gateway/web/irccloud.com/x-dshudsdgkuxsbspd] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@factory-smtp.factorylabs.com] has joined #ruby-lang
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
g0bl1n [g0bl1n!~g0blin@unaffiliated/g0bl1n] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
cesario [cesario!u2444@gateway/web/irccloud.com/x-lhysdceatwdhjajj] has joined #ruby-lang
mrchrisadams [mrchrisadams!u1367@gateway/web/irccloud.com/x-xjafasxrbirdvljj] has joined #ruby-lang
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby-lang
Jake232 [Jake232!~textual@5e06eff5.bb.sky.com] has joined #ruby-lang
macmartine [macmartine!~macmartin@c-24-21-112-60.hsd1.or.comcast.net] has joined #ruby-lang
<mztriz> so I just found the pastie.vim pluing...
<mztriz> my life has been changed.
<mztriz> *plugin
<erikh> you should try gist.vim
<erikh> because I prefer that alternative and my opinion is more important than yours
dfr|mac [dfr|mac!dfr|work@nat/google/x-jabzpnmohnvsrziy] has joined #ruby-lang
<mztriz> lol thanks erikh
<erikh> you're welcome!
<erikh> :P
<workmad3> gist > pastie
<drbrain> I just use http://paste.segment7.net/
Filuren [Filuren!~Filuren@x1-6-e0-46-9a-1f-97-a2.k617.webspeed.dk] has joined #ruby-lang
<erikh> so after like 5 years, I found a use for this library
<erikh> but the API sucks
<erikh> wondering if people have feedback for how I could make it better.
<drbrain> erikh: Holy Four Spaces Batman‼
<erikh> drbrain: that's how I used to indent
<erikh> it's a really simple lib, but we can make use of something like it @ work
<erikh> so I'm looking to clean it up and make it less fail
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
niklasb [niklasb!~codeslay0@p5B310B8B.dip0.t-ipconnect.de] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
<jredville> erikh: other than that awful indent ;), it doesn't really look that bad to me
<erikh> I don't like how you have to use it to create strings
<erikh> I'm thinking a monkeypatch into string + a visitor might be a good idea
<erikh> e.g., construct an object with formatting rules and then pass it to "foo %f".format(obj)
<erikh> the obj could just be an array of format objects too
<erikh> hmmmmmmm
<jredville> would you then have to mod it? i.e. "foo %f".format(obj) % 10
<erikh> no, it would return the proper formatted string
<erikh> oh, derp
<erikh> yeah, that's kind of an important part
<jredville> i like the array of format objects though, seems like it could be useful to have multiple format specifications combine on a string
<erikh> maybe just splat after the obj, e.g., "foo %f".format(obj, arg1, arg2...)
<erikh> ok, cool
<erikh> if I chained it to % I could send an intermediate object which allowed me to fake inheriting the standard sprintf stuff too
<erikh> well, easier I think
<jredville> yeah
<jredville> i think having "foo %f".format([arr,of,formatters]) return a formatting obj
<jredville> like f.clone("string %s %s")
<jredville> in the current system
<erikh> yeah, and then have a % operator that lives on the current object
<erikh> right
<jredville> yeah
<jredville> and if you pass additional args after the array, return a string
<erikh> ooh, good idea. it could also mean you don't want standard formatting
rpowell [rpowell!~rpowell@CPE-124-184-231-199.lns11.cht.bigpond.net.au] has joined #ruby-lang
<erikh> (if there are additional arguments)
<jredville> ah, yeah
<erikh> or maybe just a second call could do that
<jredville> yeah, i'm debating on if one format method would do it, or if you would want 2 methods
<jredville> i can see either way
<erikh> I'll write up some tests and we'll see
<jredville> makes sense
<erikh> anyhow, I'll check back in when it's changed up... this was very fortunate. thanks for the assistance.
<jredville> glad to help
SuperTaz_work [SuperTaz_work!~supertaz_@38.99.52.59] has joined #ruby-lang
_SpiderPig_ [_SpiderPig_!deryl@perfecting.rubyists.com] has joined #ruby-lang
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby-lang
deryl [deryl!deryl@perfecting.rubyists.com] has joined #ruby-lang
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby-lang
outoftime [outoftime!~mat@ip-160-79-101-2.autorev.intellispace.net] has joined #ruby-lang
imperator [imperator!~Daniel@184-96-109-96.hlrn.qwest.net] has joined #ruby-lang
rushed [rushed!~rushed@cpe-70-116-11-35.austin.res.rr.com] has joined #ruby-lang
ahs3- [ahs3-!~ahs3-@adsl-065-005-193-158.sip.rdu.bellsouth.net] has joined #ruby-lang
<imperator> 'sup
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
looopy [looopy!~looopy@static-71-166-232-216.washdc.east.verizon.net] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0C1F9.dip0.t-ipconnect.de] has joined #ruby-lang