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/
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
<sdferfx>
Can someone translate this for me? t = bg 'ruby -e"sleep 4; puts ARGF.read"', 0=>stdin, 1=>stdout, 2=>stderr ? It doesn't seem to work in Ruby 1.9.3 and I would like to have the functionality it shows is possible (getting the handles for stdx from a background thread)
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby
skaczor [skaczor!~quassel@mail.prognosoft.biz] has joined #ruby
randym [randym!~randym@EM114-48-236-29.pool.e-mobile.ne.jp] has joined #ruby
idarkside [idarkside!~YourNick@5e0e912d.bb.sky.com] has joined #ruby
c0rn [c0rn!~c0rn@adsl-69-110-13-69.dsl.pltn13.pacbell.net] has joined #ruby
[[thufir]] [[[thufir]]!~thufir@184.65.42.92] has joined #ruby
danibx [danibx!~danibx@187.104.236.95] has joined #ruby
DFectuoso [DFectuoso!~DFectuoso@fixed-203-141-49.iusacell.net] has joined #ruby
cableray [cableray!~cableray@c-98-245-93-250.hsd1.co.comcast.net] has joined #ruby
Seisatsu_ [Seisatsu_!~seisatsu@adsl-99-173-26-110.dsl.pltn13.sbcglobal.net] has joined #ruby
cmasseraf [cmasseraf!~cmasseraf@187.106.201.26] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
x77686d_ [x77686d_!~whm@uawifi-nat-210-68.arizona.edu] has joined #ruby
phayte [phayte!~phayte@pool-173-74-170-25.dllstx.fios.verizon.net] has joined #ruby
abetterlie [abetterlie!~abetterli@108.94.184.185] has joined #ruby
zetsubo [zetsubo!~zets@bingcsmajors/rainbows-cupcakes-unicorns] has joined #ruby
<abetterlie>
quick question. I'm trying to do some string interpolation inside 2 nested quotes, but I'm getting a syntax error, unexpected tIDENTIFIER, expecting $end
<abetterlie>
the string looks like this
strife25 [strife25!~strife25@cpe-098-026-018-050.nc.res.rr.com] has joined #ruby
Seisatsu [Seisatsu!~seisatsu@adsl-99-173-26-110.dsl.pltn13.sbcglobal.net] has joined #ruby
<abetterlie>
any ideas?
zulax [zulax!~radarwork@99-120-232-161.lightspeed.iplsin.sbcglobal.net] has joined #ruby
<heftig>
sdferfx: need to call the lambda using time_over[20] or time_over.call(20)
<sdferfx>
thanks heftig, got it :)
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby
byronb [byronb!~byronb@c-24-18-227-118.hsd1.wa.comcast.net] has joined #ruby
cbuxton [cbuxton!~Adium@nat/partnerpedia/x-hvauuyzaxdcpujco] has joined #ruby
hadees [hadees!~hadees@72-48-91-73.dyn.grandenetworks.net] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
justicefries [justicefries!~justicefr@c-24-9-167-71.hsd1.co.comcast.net] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
<abetterlie>
anyone... please?
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
<abetterlie>
nm
<abetterlie>
cheers
abetterlie [abetterlie!~abetterli@108.94.184.185] has quit [#ruby]
juarlex_alt [juarlex_alt!~juarlex@201.124.160.19] has joined #ruby
<sdferfx>
I am using open4::background to spawn a process. I want to print its stdout as it is being written. I don't know how to do this -- it seems I can only print one line at a time or have to entirely wait on the process. Any advice?
award85 [award85!~itsame@c-69-181-38-133.hsd1.ca.comcast.net] has joined #ruby
award85 [award85!~itsame@unaffiliated/award85] has joined #ruby
DFectuoso [DFectuoso!~DFectuoso@fixed-203-141-49.iusacell.net] has joined #ruby
fserb [fserb!~fserb@178-83-225-18.dynamic.hispeed.ch] has joined #ruby
josh [josh!~josh@74-95-43-126-Oregon.hfc.comcastbusiness.net] has joined #ruby
Bardosity [Bardosity!~john@202-89-189-137.static.dsl.amnet.net.au] has joined #ruby
jtrudeau [jtrudeau!~jeff@12.206.220.2] has joined #ruby
<sdferfx>
looks like I just need to use a type that automatically aggregates all data instead of string. Is there one of these in stdlib?
h4mz1d [h4mz1d!~hamfz@130.160.248.101] has joined #ruby
techhelp [techhelp!~Dan@ip70-162-10-229.ph.ph.cox.net] has joined #ruby
isak_ [isak_!~isak@c-67-180-86-161.hsd1.ca.comcast.net] has joined #ruby
cbuxton [cbuxton!~Adium@nat/partnerpedia/x-nsnbxgdzbkcfdtux] has joined #ruby
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
idarkside [idarkside!~YourNick@5e0e912d.bb.sky.com] has joined #ruby
hadees [hadees!~hadees@72-48-91-73.dyn.grandenetworks.net] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
gogo_it [gogo_it!~joshuaman@166.90.79.18] has joined #ruby
nwonknu_ [nwonknu_!~nwonknu@unaffiliated/nwonknu] has joined #ruby
abentspoon [abentspoon!~micah@173.247.201.130] has joined #ruby
cableray [cableray!~cableray@wl-dhcp159-109.Mines.EDU] has joined #ruby
<zetsubo>
you need the method before it's used
<zetsubo>
like, it's not defined, when it's encountered
<gogo_it>
thank you!
<zetsubo>
np
p0y [p0y!~p0y@125.212.56.114] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
evanesco [evanesco!~adam@204.62.14.229] has joined #ruby
<evanesco>
I read somewhere that I should install something called "rvm" to manage ruby installations -- does this sound right?
<canton7>
if you want multiple versions of ruby installed at once, sure
<evanesco>
ah, don't want that :) so I can just install the current version and not worry about it?
<canton7>
yup, no problem there
deploy [deploy!~deploy@66.209.100.74] has joined #ruby
<evanesco>
great. and as for sinatra, do I just ruby -rubygems whatever.rb and let it do its thing, or is there a more "official" way to set up ruby+sinatra to work as a nice background/server process?
<evanesco>
(totally new to this and sorry for the noobish questions)
c0rn [c0rn!~c0rn@50-0-142-2.dsl.dynamic.sonic.net] has joined #ruby
<canton7>
if you've got ruby 1.9, you don't need -rubygems
<evanesco>
ah
<deploy>
what does this mean?
<evanesco>
but what's the best way to keep this running as a system service? I'm used to Apache + PHP where it's all just kind of set up to automatically run at boot and such
<canton7>
then "ruby whatever.rb", "rackup", "thin start", etc, are fine for development. For running a proper server, thin can handle config files for multiple processes, or you can use foreman
<deploy>
Object <= User #=> false
<canton7>
or passenger + apache, if that floats your boat
<evanesco>
ah, foreman. I'll look into that, thanks
<evanesco>
nah, forget Apache :) I'm going all Ruby :)
<deploy>
the Object class doesn't inherit from the User class?
wroathe [wroathe!~wroathe@173-17-249-11.client.mchsi.com] has joined #ruby
<banisterfiend>
deploy: yes
<deploy>
ic cool thanks
akem [akem!~akem@unaffiliated/akem] has joined #ruby
<deploy>
anyone know where that's documented?
wroathe [wroathe!~wroathe@173-17-249-11.client.mchsi.com] has joined #ruby
<deploy>
i see BasicObject#==
<deploy>
but can't find <=
Akylios [Akylios!~amy@CPE-123-211-144-41.lnse3.woo.bigpond.net.au] has joined #ruby
<frosty1313>
looks interesting, I'm still wondering why the problem popped up initially
<banisterfiend>
frosty1313: anyway in pry you just have to use: puts "hi";
<frosty1313>
it wasn't happeneing before
<banisterfiend>
frosty1313: the ending semi-colon prevents the return value showing
<jlogsdon>
banisterfiend: i <3 pry. thank you so much for making it
<banisterfiend>
jlogsdon: np
<frosty1313>
ok wierd, I could've sworn that my scripts weren't doing that 2 months ago when I last touched ruby
<frosty1313>
thanks though
h4mz1d [h4mz1d!~hamfz@DHCP-214-001.wireless-resnet.ua.edu] has joined #ruby
<banisterfiend>
jlogsdon: released a new version yesterday
<gogo_it>
jlogsdon: I read is, but is all seems like you can not edit a single line. It's either writing to a file, or reading from it and if you write to a file, it deletes the file, does not edit
<banisterfiend>
jlogsdon: update it, then go gem install pry-coolline :)
<banisterfiend>
for live syntax highlighting
<jlogsdon>
banisterfiend: :O
<jlogsdon>
thats insanely cool
<CannedCorn>
are you guys sure including a module doesn't make class methods run
<banisterfiend>
CannedCorn: it depends on the module, some people can make it do that
<banisterfiend>
if the module has hooks defined, etc
<nwonknu>
banisterfiend: You don't do much C any more, I suppose.
samsonjs_ [samsonjs_!~samsonjs@S01060026f31b8198.gv.shawcable.net] has joined #ruby
cmasseraf [cmasseraf!~cmasseraf@187.106.196.41] has joined #ruby
<nwonknu>
banisterfiend: Probably years prior to pry.
<banisterfiend>
nwonknu: ah ok, what was your nickname there?
<nwonknu>
banisterfiend: parser.
<banisterfiend>
oh ok
<nwonknu>
Used to come here + #ruby-pro. Haven't for a long time.
<banisterfiend>
nwonknu: most of my C is confined to messing with ruby internals though :)
<nwonknu>
banisterfiend: Ah.
<nwonknu>
Less Zhivago in your life then.
gogo_it [gogo_it!~joshuaman@166.90.79.18] has quit [#ruby]
<banisterfiend>
hehe i didnt mind him too much
<banisterfiend>
i was banned by pragma_ anyway
zetsubo [zetsubo!~zets@cpe-74-79-66-80.twcny.res.rr.com] has joined #ruby
<nwonknu>
I wouldn't worry about it, his "claim2fame" was a bot anyway.
wroathe [wroathe!~wroathe@173-17-249-11.client.mchsi.com] has joined #ruby
<banisterfiend>
hehe
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
lewix_ [lewix_!~lewix@bas1-toronto04-2925396554.dsl.bell.ca] has joined #ruby
byronb [byronb!~byronb@71-217-25-131.tukw.qwest.net] has joined #ruby
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby
stringoO [stringoO!~JLstring@bas1-toronto42-1279598654.dsl.bell.ca] has joined #ruby
scx [scx!~Administr@abui165.neoplus.adsl.tpnet.pl] has joined #ruby
Shamgar [Shamgar!~mbainter@adsl-76-233-110-11.dsl.rcsntx.sbcglobal.net] has joined #ruby
kevinbond_ [kevinbond_!~kevinbond@68.204.50.112] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
thomasdebenning [thomasdebenning!~thomasdeb@c-69-181-139-137.hsd1.ca.comcast.net] has joined #ruby
siekoku [siekoku!~ty@76.8.215.194] has joined #ruby
mayfield [mayfield!~mayfield@173.226.142.136] has joined #ruby
justicefries [justicefries!~justicefr@c-24-9-170-34.hsd1.co.comcast.net] has joined #ruby
ckrailo [ckrailo!~ckrailo@pool-71-97-77-8.dfw.dsl-w.verizon.net] has joined #ruby
closedbracket [closedbracket!~closedbra@cpe-098-024-123-107.carolina.res.rr.com] has joined #ruby
sdwrage [sdwrage!~sdwrage@cpe-184-57-83-165.columbus.res.rr.com] has joined #ruby
zakwilson [zakwilson!~quassel@12.70.26.10] has joined #ruby
trend [trend!~trend@76.91.169.147] has joined #ruby
samsonjs [samsonjs!~samsonjs@184.66.154.246] has joined #ruby
albemuth [albemuth!~albemuth@190.241.1.170] has joined #ruby
stringoO [stringoO!~JLstring@bas1-toronto42-1279599122.dsl.bell.ca] has joined #ruby
jlogsdon_ [jlogsdon_!~jlogsdon@50.0.84.226] has joined #ruby
Hanmac1 [Hanmac1!~hanmac@p508450A8.dip0.t-ipconnect.de] has joined #ruby
adeponte [adeponte!~adeponte@wsip-98-189-16-109.oc.oc.cox.net] has joined #ruby
fismo [fismo!~fismo@cpe-24-193-156-28.nyc.res.rr.com] has joined #ruby
zii [zii!~zi@freebsd/developer/zi] has joined #ruby
zii [zii!~zi@freebsd/developer/zi] has quit [#ruby]
jcromartie [jcromartie!~jcromarti@c-69-140-238-182.hsd1.md.comcast.net] has joined #ruby
philcrissman [philcrissman!~philcriss@c-174-53-217-149.hsd1.mn.comcast.net] has joined #ruby
notjohn [notjohn!~john@cpe-174-103-133-37.cinci.res.rr.com] has joined #ruby
tizr_ [tizr_!~t@pool-96-240-15-243.nwrknj.fios.verizon.net] has joined #ruby
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has joined #ruby
pdtpatrick_ [pdtpatrick_!~pdtpatric@ip72-211-207-15.oc.oc.cox.net] has joined #ruby
davidcelis [davidcelis!~david@c-76-115-58-79.hsd1.or.comcast.net] has joined #ruby
adeponte [adeponte!~adeponte@wsip-98-189-16-109.oc.oc.cox.net] has joined #ruby
nyuszika7h [nyuszika7h!nyuszika7h@unaffiliated/nyuszika7h] has joined #ruby
skaczor_ [skaczor_!~quassel@mail.prognosoft.biz] has joined #ruby
gigamonkey [gigamonkey!~user@adsl-99-179-46-105.dsl.pltn13.sbcglobal.net] has joined #ruby
adeponte_ [adeponte_!~adeponte@wsip-98-189-16-109.oc.oc.cox.net] has joined #ruby
indeterminate [indeterminate!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby
userx- [userx-!~0x-@unaffiliated/userx-] has joined #ruby
centipedefarmer [centipedefarmer!~centipede@75-162-54-195.desm.qwest.net] has joined #ruby
stepitime [stepitime!~stepitime@host-190.colo-wireless-ap.fiber.net] has joined #ruby
plato [plato!~plato@unaffiliated/therealplato] has joined #ruby
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby
<plato>
hey guys! I'm new to ruby
t0mmyvyo [t0mmyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
medik [medik!~medik@host-95-199-2-43.mobileonline.telia.com] has joined #ruby
<plato>
I would like to do something if an array does not include a particular object
<plato>
how can I negate this? if nyms.include?(thislink.source)
<plato>
i.e. i want it to return true if nyms doesn't include thislink.source so I can add it to nyms
<plato>
if its already there, i want to do something different
ap3mantus [ap3mantus!~ap3mantus@c-98-217-179-108.hsd1.ma.comcast.net] has joined #ruby
jlogsdon [jlogsdon!~jlogsdon@c-67-169-79-114.hsd1.ca.comcast.net] has joined #ruby
radic_ [radic_!~radic@dslb-178-002-223-169.pools.arcor-ip.net] has joined #ruby
<plato>
oh poop its actually more complicated than that...
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
adeponte [adeponte!~adeponte@wsip-98-189-16-109.oc.oc.cox.net] has joined #ruby
c0rn [c0rn!~c0rn@adsl-69-110-13-69.dsl.pltn13.pacbell.net] has joined #ruby
<plato>
hm. i was building an array of hashes but i think it's extraneous and i might be able to get away with just the hash
tectonic [tectonic!~tectonic@c-67-164-98-164.hsd1.ca.comcast.net] has joined #ruby
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby
<plato>
is there a way to add to hashes, other than hash.merge
<banisterfiend>
plato: how do u want to add them
celestius [celestius!~celestius@173-228-44-97.dsl.static.sonic.net] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@c-71-205-218-131.hsd1.mi.comcast.net] has joined #ruby
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<plato>
banisterfiend: i have a list of Nyms, during my method I will be incrementing or decrementing a score for each nym
<celestius>
hey all - lets say i have a script that is reading stuff from ARGF, but i want to periodically ask the user if we should continue. i can't do STDIN.gets, cause that will just read from whatever file has been piped/redirected to ARGF. what do?
philcrissman [philcrissman!~philcriss@c-174-53-217-149.hsd1.mn.comcast.net] has joined #ruby
<plato>
for now, I just want to return a hash of {Nym => int}
<banisterfiend>
plato: "Nym" ?
<plato>
banisterfiend: a class I defined
<plato>
short for pseudonym
<tectonic>
celestius: I guess you could print to STDERR "Continue? Hit control-c" and then add an interrupt handler.
<tectonic>
celestius: ugly, though
<celestius>
hm
kpshek [kpshek!~kpshek@159.140.254.97] has joined #ruby
Targen [Targen!~iguana@190.39.181.108] has joined #ruby
zenergi_ [zenergi_!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
robyurkowski [robyurkowski!~robyurkow@216.252.93.17] has joined #ruby
p0y [p0y!~p0y@122.52.126.66] has joined #ruby
<sdwrage>
with FileUtils, is there a method to copy one file over to another folder even if that folder doesn't exist?
btanaka [btanaka!~textual@173-228-34-51.dsl.dynamic.sonic.net] has joined #ruby
nerdy [nerdy!~textual@66-44-118-195.c3-0.grg-ubr1.lnh-grg.md.cable.rcn.com] has joined #ruby
medik1 [medik1!~medik@host-95-199-26-222.mobileonline.telia.com] has joined #ruby
Know1edge [Know1edge!~Know1edge@c-69-247-141-247.hsd1.tn.comcast.net] has joined #ruby
Know1edge [Know1edge!~Know1edge@unaffiliated/know1edge] has joined #ruby
<sdwrage>
example: photos/user_id/5/33551/photo_34234234234.jpg to avatars/5/photo_355556666.jpg
<sdwrage>
and it would create avatars and 5 if it doesn't exist
<sdwrage>
and copies the file
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
nwonknu_ [nwonknu_!~nwonknu@unaffiliated/nwonknu] has joined #ruby
<plato>
ok guys all I really need to know is, is there a way to negate an expression
<plato>
like thislink.is_a(Link).!
<plato>
or something
<banisterfiend>
plato: boolean negate?
<plato>
or an "if not" statement or something
<plato>
yes, all i need is a boolean negate for now
<banisterfiend>
plato: then it's the same as in any other language :P
<banisterfiend>
plato: !
<banisterfiend>
plato: !expr
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
<plato>
banisterfiend: ok, thanks
nwonknu [nwonknu!~nwonknu@unaffiliated/nwonknu] has joined #ruby
adeponte_ [adeponte_!~adeponte@wsip-98-189-16-109.oc.oc.cox.net] has joined #ruby
<sdwrage>
Hey guys. I tried using this: FileUtils.mkdir_p(File.dirname(@user.avatar.path))
<sdwrage>
and it says that "avatar" already exists
<sdwrage>
is there a way for it to skip that folder if it does exist and create the sub folders?
pdtpatrick_ [pdtpatrick_!~pdtpatric@ip72-211-207-15.oc.oc.cox.net] has quit [#ruby]
<sdwrage>
The output of the file.dirname output is "/Users/sdwrage/Work/rails/projecttwo/public/avatars/13/131210"
<sdwrage>
it is getting hung up on the first folder and halting.
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
scx_ [scx_!~Administr@abub241.neoplus.adsl.tpnet.pl] has joined #ruby
Ownatik [Ownatik!~yoyoyoy@8-118.tr.cgocable.ca] has joined #ruby
<sdwrage>
nvm I found out why… someone decided it was a smart idea to put a symlink there
<sdwrage>
:P
<plato>
ha
<sdwrage>
I didn't see it in textmate
<plato>
problem = solved
<sdwrage>
yep
<sdwrage>
:)
<plato>
isnt it awesome when its a simple solution
smtp__ [smtp__!~smtp@pool-74-107-67-155.bltmmd.fios.verizon.net] has joined #ruby
<smtp__>
hey
<smtp__>
When I'm inputting text, how can I save any newlines that are in the input? Right now I lose them and they just show up as a space. I'm doing this: %p = f.text_area :description, :class => 'text-input large-input', :rows => 12
alanp [alanp!~quassel@206.248.152.52] has joined #ruby
mando [mando!~mando@99-39-117-82.lightspeed.austtx.sbcglobal.net] has joined #ruby
<Phrogz>
smtp__: This is #rubyonrails you are asking about?
<smtp__>
yep
rsenk330 [rsenk330!~Adium@adsl-75-44-54-132.dsl.milwwi.sbcglobal.net] has joined #ruby
rsenk330 [rsenk330!~Adium@adsl-75-44-54-132.dsl.milwwi.sbcglobal.net] has quit [#ruby]
<Phrogz>
smtp__: Perhaps try that channel :)
<robyurkowski>
smtp__: you need to use, at a minimum, the simple_format helper to turn \ns into <br>s
<robyurkowski>
but do ask in #rubyonrails
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
<Phrogz>
smtp__: HTML <textarea> are delimited by \r\n when submitted, IIRC?
<shevy>
are they??
<shevy>
though
<shevy>
I think you may be right
<smtp__>
I believe so
<shevy>
I remember in good old ruby cgi I appended "\r\n"
shadoi [shadoi!~Adium@c-71-202-122-8.hsd1.ca.comcast.net] has joined #ruby
<shevy>
one day I should learn ruby on rails, get a ruby on rails related job and get real filthy rich
<robyurkowski>
haha
<robyurkowski>
rails doesn't get you filthy rich
<robyurkowski>
being a great programmer does
<smtp__>
reading that, thank you!
<Phrogz>
Yes, but in comparison to so many Ruby on Rails programmers, even shevy appears great.
<robyurkowski>
but there's no time like the present
* Phrogz
ducks
<robyurkowski>
lol
<robyurkowski>
it's true, in the sense that any hot skill will have its share of posers
<robyurkowski>
i think we can all thank our lucky stars it's not PHP though
<Boohbah>
*poseurs
<robyurkowski>
or else we'd have even more mediocrity at hand
<shevy>
Phrogz I just wanna make a lot of money!
<shevy>
and spend it on beautiful beaches
<shevy>
with chocolate rum, bacardi and a lot of sun
<Boohbah>
s/ea/it/
<robyurkowski>
nah
<smtp__>
do you know the syntax for incorporating the simple_format helper into my line of code...?
kenperkins [kenperkins!~textual@50-47-18-37.evrt.wa.frontiernet.net] has joined #ruby
<Phrogz>
shevy: The beautiful beaches don't want you to spend your money on them.
<Phrogz>
smtp__: Definitely a #rubyonrails question.
<smtp__>
ok thanks
<robyurkowski>
smtp__: when you're echoing the stuff, do something like '= simple_format h(@YOUR_TEXT_FIELD_HERE)'
<shevy>
Phrogz man! what else is there to do with lots of money...
<robyurkowski>
but seriously, ask in #rubyonrails
rippa [rippa!~splitta@85.158.54.234] has joined #ruby
randym [randym!~randym@EM114-48-236-29.pool.e-mobile.ne.jp] has joined #ruby
<sdwrage>
Does anyone know of a solution with paperclip for copying one file attachment in a model to another model taking into account settings for each attachments save paths?
<__null>
I'm running the latest rails with passenger. In my routes.rb I have root :to => 'home#index' (which points to the correct controller + etc.. but when i go to http://stateofblackasheville.org/ i don't see the routing happening
Azure|netbook [Azure|netbook!~azt@unaffiliated/azure] has joined #ruby
Azure [Azure!~azt@unaffiliated/azure] has joined #ruby
<__null>
i've done touch tmp/restart.txt and still nothing
<__null>
am i missing something?
<__null>
my .htaccess should have the correct settings, too
adeponte [adeponte!~adeponte@wsip-98-189-16-109.oc.oc.cox.net] has joined #ruby
<__null>
cross that, it doesn't!
Azure [Azure!~azt@unaffiliated/azure] has joined #ruby
Azure|netbook [Azure|netbook!~azt@unaffiliated/azure] has joined #ruby
PhilK [PhilK!~PhilK@108-94-166-51.lightspeed.sntcca.sbcglobal.net] has joined #ruby
<shadoi>
__null: try #rubyonrails
<shadoi>
I haven't used rails in ages, but it sounds like a route for home#index would point to http://domain/home
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
skaczor_ [skaczor_!~quassel@mail.prognosoft.biz] has joined #ruby
<__null>
thanks shadoi, i'll try that channel. but it's taking the root folder and handling it to the home#index page
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby
<smtp__>
it works. thanks again!!!!!!!
inteq [inteq!~justin.si@adsl-98-88-29-211.asm.bellsouth.net] has joined #ruby
stringoO [stringoO!~JLstring@bas1-toronto42-1279599122.dsl.bell.ca] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
nyuszika7h [nyuszika7h!nyuszika7h@unaffiliated/nyuszika7h] has joined #ruby
newton10471 [newton10471!~newton104@ool-18e46276.dyn.optonline.net] has joined #ruby
Paoc_ [Paoc_!~paoc@pc-29-167-104-200.cm.vtr.net] has quit [#ruby]
<plato>
is super() called automatically from my child's initialize method or am I responsible for that
<plato>
and, if I define an initialize method in my child, will I still have access to the (differently named) instance variables I defined in the parent's initialize method?
nivoc [nivoc!~matthias@ipc-hosting.de] has joined #ruby
<Hanmac1>
plato you need to call super
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
<shadoi>
and you need to come out of your cave.
<[[thufir]]>
lol. a good greek classics reference is always funny.
Ownatik [Ownatik!~yoyoyoy@8-118.tr.cgocable.ca] has joined #ruby
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby
<plato>
i am trying to do x={:a=>1,:b=>2} ; x[a]++ to increment a's value from 1 to 2
<banisterfiend>
plato: stop doing that and pls read a book on ruby :)
<plato>
it gives me an unhelpful syntax error when i try and run my tests and fails silently in irb
<shadoi>
x[a] += 1
<banisterfiend>
plato: buy a book and read it before you start guessing syntax ;) pls.
<plato>
banisterfiend: i spent the last two days reading books on ruby...
<plato>
banisterfiend: this is the first day i am coding, you cant expect me to remember it all
<plato>
but ty for the help guys
youdonotexist [youdonotexist!~youdonote@c-67-166-121-94.hsd1.ut.comcast.net] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
mayfield [mayfield!~mayfield@173.226.142.130] has joined #ruby
marvin_ [marvin_!~shikhai@pD9F4D38E.dip0.t-ipconnect.de] has joined #ruby
<brownies>
two days, whoa
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
<plato>
yep i read matz's tutorial and why's poignant guide to ruby
<robyurkowski>
keep going :)
<robyurkowski>
practice will help a ton
<plato>
its too much fun to just code it
<robyurkowski>
keep reading good code
<banisterfiend>
plato: dont believe robyurkowski
ceej [ceej!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
<banisterfiend>
plato: the best way to learn ruby is to take a psychedelic drug (like peyote) and meditate with an open ruby book, when you go to sleep and wake up the next day you'll know everything
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby
gigamonk` [gigamonk`!~user@adsl-99-179-44-193.dsl.pltn13.sbcglobal.net] has joined #ruby
youdonotexist [youdonotexist!~youdonote@c-67-166-121-94.hsd1.ut.comcast.net] has joined #ruby
mayfield [mayfield!~mayfield@cpe-173-172-188-87.satx.res.rr.com] has joined #ruby
<Hanmac>
i would say that learning ruby IS the psycgedelic drug
<banisterfiend>
Hanmac: yeah i've been mainlining it for a while now ;)
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
kolet [kolet!~collettiq@173-16-246-235.client.mchsi.com] has joined #ruby
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby
<shevy>
my drug is called youtube
<banisterfiend>
shevy: i thoguth your drug of choice was heroin
lewix [lewix!~lewix@bas1-toronto04-2925396554.dsl.bell.ca] has joined #ruby
lewix [lewix!~lewix@unaffiliated/lewix] has joined #ruby
js__ [js__!~js@58.171.199.180] has joined #ruby
_srp [_srp!~quassel@119.82.126.162] has joined #ruby
<shevy>
nah
<shevy>
youtube is cheapest
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby
_srp [_srp!~quassel@119.82.126.162] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
<js__>
Any recommendations for the best ruby book for a newbie?
<banisterfiend>
js__: new to programming or just ruby?
c0rn [c0rn!~c0rn@50-0-142-2.dsl.dynamic.sonic.net] has joined #ruby
shachaf [shachaf!~shachaf@ip24.67-202-82.static.steadfastdns.net] has quit [#ruby]
<js__>
New to ruby, sorry been doing c, java, abap for 10+ yrs
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
<November>
js__: Programming Ruby 1.9 (The PickAxe) worked for me.
<js__>
Yep looking at the Pickaxe one but thinking the Matz one would be good too: (the ruby programming language)
<a_a_g>
the best way to work with args would be [*args].each ...
<plato>
ahhh that might be it. i did args.each
CodeZombie [CodeZombie!~CodeZombi@65.19.245.153] has joined #ruby
tonini [tonini!~zastav@edge.garaio.com] has joined #ruby
nivoc [nivoc!~matthias@ipc-hosting.de] has joined #ruby
pdtpatrick_ [pdtpatrick_!~pdtpatric@ip72-211-207-15.oc.oc.cox.net] has joined #ruby
michaelgamble [michaelgamble!~michaelga@97.107.57.17] has joined #ruby
<michaelgamble>
hello
<michaelgamble>
anyone know how i might get stomp server running?
aknewhope [aknewhope!~aknewhope@cpe-75-82-205-249.socal.res.rr.com] has joined #ruby
<plato>
a_a_g: nope. the problem is that I am trying to pass an array as a single parameter, and the splat operator is putting it inside another array
<plato>
i think
<shevy>
array.flatten.each do
<shevy>
args.flatten.each do
azureye [azureye!~azureye@wrls-249-20-107.wrls-client.fas.harvard.edu] has joined #ruby
<shevy>
but please upload your code somewhere, it's not easy to debug without the code at hand
<plato>
wow! cool
<plato>
yeah i can pastebin
ershad [ershad!~ershad@117.204.99.152] has joined #ruby
<plato>
http://codepad.org/jPg0G3FS the problem was occuring after I built test data in a Dashboard.new(), then passed it to Web.new in the last line of Dashboard
<michaelgamble>
no advice on stomp?
<michaelgamble>
i just get a failure when i try to run it command line
<shevy>
hmm that's a lot of code plato
<plato>
shevy: this is my first ruby program
<shevy>
quite advanced
<plato>
refactoring tips appreciated
<plato>
ty
<shevy>
dunno, my brain tries to keep things very simple
<shevy>
you should align case when on the same indent level though
<shevy>
case var
<shevy>
when "foo"
<shevy>
oh I see
<shevy>
def initialize(*mylinks)
<shevy>
@links=[]
<shevy>
self.addLinks(*mylinks)
<shevy>
end
<shevy>
the second *mylinks is wrong I guess
<shevy>
(mylinks)
<shevy>
or, in addLinks
<shevy>
a .flatten on your array should work
<plato>
yeah i am trying to test that and my urxvt/screen decided to hang
<shevy>
you can use %w[] too if you like instead. I just like the () with %w
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby
<plato>
yes that fixed it
<plato>
fuck yeah
<plato>
thanks
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
alxgsv [alxgsv!~longman@46.250.131.229] has joined #ruby
ceej [ceej!~anonymous@cpe-72-190-40-203.tx.res.rr.com] has joined #ruby
banisterfiend [banisterfiend!~baniseter@222.153.223.42] has joined #ruby
Evixion [Evixion!Evixion@tn-67-236-5-224.dhcp.embarqhsd.net] has joined #ruby
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby
ABK [ABK!~abhishekk@14.140.107.130] has joined #ruby
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
yxhuvud [yxhuvud!mongo@h-5-47.a212.priv.bahnhof.se] has joined #ruby
djdb [djdb!~digitalbo@linux.minsk.tutby.com] has joined #ruby
stayarrr [stayarrr!~olivererx@dslb-188-100-254-093.pools.arcor-ip.net] has joined #ruby
<shevy>
cool
randym_ [randym_!~randym@EM114-48-122-6.pool.e-mobile.ne.jp] has joined #ruby
isak_ [isak_!~isak@c-67-180-86-161.hsd1.ca.comcast.net] has joined #ruby
stepitime [stepitime!~stepitime@209-33-232-133.dsl.infowest.net] has joined #ruby
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby
adeponte [adeponte!~adeponte@pool-173-51-131-197.lsanca.fios.verizon.net] has joined #ruby
zetsubo [zetsubo!~zets@cpe-74-79-66-80.twcny.res.rr.com] has joined #ruby
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby
<mxweas>
is there a gem that will make puts auto indent it's output depending on how many levels deep my code is?
hasham2 [hasham2!~hasham@58-27-152-63.wateen.net] has joined #ruby
<mxweas>
ie if it's being run in an instance method it has 2 spaces. 4 spaces if it's in a function being run inside an instance method
ershad_ [ershad_!~ershad@117.204.100.243] has joined #ruby
acts_as_david [acts_as_david!~acts_as_d@c-71-202-155-161.hsd1.ca.comcast.net] has joined #ruby
<burgestrand>
mxweas: not as far as I’m aware; I can‘t see it working with non-saved files or C extensions but it’s probably doable otherwise
<mxweas>
too lazy to write it at the moment lol
<mxweas>
maybe in the future
<burgestrand>
you could parse out the file and line from caller and then determine the indent from there; also it won’t work very well if you change the source files during runtime :)
<shevy>
mxweas pry has something that does that, ask banisterfiend
scx [scx!~Administr@abub241.neoplus.adsl.tpnet.pl] has joined #ruby
<mxweas>
too bad I can't look at anything that resembles a stack frame
<mxweas>
although recursive functions would barf indentation then
<mxweas>
burgestrand: ideally it would be based on how many functions deep you are vs line #
<mxweas>
so that way you can call a function from anywhere and the indentation is correct
Seisatsu [Seisatsu!~seisatsu@adsl-99-35-225-92.dsl.pltn13.sbcglobal.net] has joined #ruby
<burgestrand>
mxweas: ah, so calling a method within a method would increase the indent as well?
<mxweas>
yes
<mxweas>
keeps the output nice and purdy
<banisterfiend>
mxweas: rails stack traces are sometimes 300 frames deep ;) gooduck with 600 space indent
<mxweas>
not using rails :P
<mxweas>
not working on a rails project at all tbh :P
<shevy>
install pry and play with it mxweas ... gem install pry
<banisterfiend>
shevy: pry doenst have a feature like that
<shevy>
what!
<banisterfiend>
but it does let you explore the stack with the pry-stack_explorer gem
<shevy>
but it indents!
<banisterfiend>
shevy: he's not just tlaking about auto-indenting code
<shevy>
hmm
<shevy>
yeah ok I dunno, he wants some superman indent
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
banisterfiend [banisterfiend!~baniseter@118.82.185.158] has joined #ruby
irctest [irctest!~rll@118.113.137.221] has joined #ruby
irctest [irctest!~rll@118.113.137.221] has quit [#ruby]
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
justicefries [justicefries!~justicefr@c-24-9-170-34.hsd1.co.comcast.net] has joined #ruby
JohnBat26 [JohnBat26!~Eugene@89.175.77.79] has joined #ruby
<davidcelis>
who wants to help me name a helper methoddddd
FND [FND!~FND@p57B3A1A5.dip.t-dialin.net] has joined #ruby
<davidcelis>
ok, that was cool, but not quite what i was looking for
<davidcelis>
but still... cool
ryanf [ryanf!~rfitz@ec2-50-18-158-149.us-west-1.compute.amazonaws.com] has joined #ruby
<Boohbah>
def helper_method;end
<davidcelis>
the method is already written, i just need input on whether i can get a better name for it
<davidcelis>
essentially i have a gem to make a recommendation engine going. the objects that can be recommended to a User object declare `acts_as_recommendable` in them. all I can come up with to put in the User class is `acts_as_rater`, or shit that's too long (acts_as_recommendation_receiver, acts_as_recommended_to, etc)
<davidcelis>
just hoping to get some potentially better ideas
bigkm [bigkm!~bigkm@203-206-185-71.perm.iinet.net.au] has joined #ruby
<davidcelis>
maybe acts_as_recommended_to is fine
Locke23rus [Locke23rus!~quassel@188.162.163.41] has joined #ruby
mahlon [mahlon!mahlon@martini.nu] has joined #ruby
DFectuoso [DFectuoso!~DFectuoso@fixed-203-141-49.iusacell.net] has joined #ruby
senny [senny!~senny@edge.garaio.com] has joined #ruby
thone [thone!~thone@g226051181.adsl.alicedsl.de] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
trivol [trivol!~aurelien@81.57.175.21] has joined #ruby
mafolz [mafolz!~mafolz@dhcp50-203.start.uni-saarland.de] has joined #ruby
cemycc [cemycc!~cemycc@89.41.213.8] has joined #ruby
_srp [_srp!~quassel@119.82.126.162] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
openros [openros!~rosarioar@196.41.61.242] has joined #ruby
jhunter [jhunter!jfigga@c-67-169-75-5.hsd1.ca.comcast.net] has joined #ruby
Tweeq [Tweeq!~Tweeq@ksdfw05.rightcompetence.com] has joined #ruby
xiaotian [xiaotian!~guoxiaoti@50.46.242.212] has joined #ruby
Shamgar [Shamgar!~mbainter@adsl-76-233-101-118.dsl.rcsntx.sbcglobal.net] has joined #ruby
<waxjar>
does someone have a handy page bookmarked with licensing stuff?
nivoc [nivoc!~matthias@ipc-hosting.de] has joined #ruby
krz [krz!~foobar@unaffiliated/krz] has joined #ruby
provideal [provideal!~hornp@p4FFF8371.dip.t-dialin.net] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
alx- [alx-!~Alex@108.162.180.72] has joined #ruby
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby
LMolr [LMolr!~quassel@87.19.33.245] has joined #ruby
js__ [js__!~js@120.152.241.16] has joined #ruby
eighty4 [eighty4!~eighty4@unaffiliated/eighty4] has joined #ruby
zommi [zommi!quassel@nat/ibm/x-aopdefewmtsqrvda] has joined #ruby
jbpros [jbpros!~jbpros@137-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
hasham2 [hasham2!~hasham@58-27-152-63.wateen.net] has quit [#ruby]
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
Locke23rus [Locke23rus!~quassel@188.162.163.41] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
<[[thufir]]>
how is if (File.directory? RootCA && http.use_ssl?) different from if (File.directory?(RootCA) && http.use_ssl?)
<[[thufir]]>
what does putting RooCA inside parens do?
ctria [ctria!~ctria@thewall.grid.auth.gr] has joined #ruby
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
<shevy>
hmm I wanna create a method called '?'
<shevy>
[[thufir]], the second variant is explicit
<shevy>
I would use the second version
<shevy>
the first one could assume that both is part of the argument
<waxjar>
my guess is that && is evaluated first (so you'll get File.directory true)
bier [bier!~bier@pD9F8F5AD.dip.t-dialin.net] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
a_a_g [a_a_g!~aag@203.123.164.34] has joined #ruby
<[[thufir]]>
first version gives error of `directory?': can't convert true into String (TypeError)
<plato>
mxweas: if you did class Object; def puts; could you count the number of times self.superclass takes to hit nil?
_root_ [_root_!~Scalable@li252-14.members.linode.com] has joined #ruby
<mxweas>
I'd like it to work based on function depth though
<mxweas>
ie how many functions deep execution is at the time puts is being called
<plato>
oh my
taii [taii!~tai@85-127-72-17.dynamic.xdsl-line.inode.at] has joined #ruby
<plato>
including if class A calls class B calls class A agian?
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
<plato>
perhaps if you overrode whatever method is used to call functions
fr0gprince_mac [fr0gprince_mac!~fr0gprinc@178-85-90-223.dynamic.upc.nl] has joined #ruby
<shevy>
[[thufir]] did you read what waxjar wrote
Bounga [Bounga!~Bounga@onv62-1-88-170-228-42.fbx.proxad.net] has joined #ruby
<[[thufir]]>
yes, read it... The first version, if (File.directory? RootCA && http.use_ssl?) , is ambigious? which "true" can't be converted into a string? RootCA && http.use_ssl is, let's assume, true. that true value can't be converted to string?
Z2FyZA [Z2FyZA!~gard@cm-84.215.22.0.getinternet.no] has joined #ruby
ershad_ [ershad_!~ershad@117.204.98.73] has joined #ruby
<shevy>
true can be converted to string
<shevy>
but you must make it explicit
<shevy>
true.to_s
<shevy>
or "some #{boolean_value_here}"
<shevy>
in the second variant it gets converted into true
<shevy>
but you should use proper () man
<shevy>
in the second variant it gets *automatically converted into "true"
<shevy>
(String)
TheNumb [TheNumb!~TheNumb@unaffiliated/thenumb] has joined #ruby
<[[thufir]]>
ok, why would want a String rather than Boolean? or is that flawed question, maybe.
<waxjar>
RootCA && http.use_ssl is considered the argument there
<waxjar>
and RootCA && http.use_ssl translates to true (Boolean)
<[[thufir]]>
good, that makes sense.
<waxjar>
File.directory? expects a path String
<[[thufir]]>
ahhhhhhh.
<shevy>
yeah the file path
<shevy>
puts 'Yup, /tmp is a directory.' if File.directory? '/tmp'
<[[thufir]]>
ok, lack of API knowledge. thanks, shevy and waxjar
<waxjar>
:)
<shevy>
well, don't worry, after a while you will instantly recognize errors like TypeError. It usually happens when a coercion is tried
trave [trave!4c173f5f@gateway/web/freenode/ip.76.23.63.95] has joined #ruby
<[[thufir]]>
when I read that error I thought "well, I don't want a string anyhow. nonsensical error."
<[[thufir]]>
however, I *did* want a String, because, File.directory? expects a String. which is intuitive, but slipped by me. oh well. thanks again.
<trave>
im new to ruby, just got rbenv set up with todo deploying a simple blog through heroku... but im snagged on a markdown itch thats bugging me. is this the right channel to ask, or is there a more appropriate place?
sandstrom [sandstrom!~sandstrom@c213-89-142-16.bredband.comhem.se] has joined #ruby
sandstrom [sandstrom!~sandstrom@unaffiliated/sandstrom] has joined #ruby
<[[thufir]]>
there's #heroku, but your question intrigues this newbie :)
<trave>
its just adding this mysterious "<" char at the bottom of one of the pages for no apparent reason
<trave>
the markdown is just paragraphs of text, nothing fancy
award85 [award85!~itsame@c-69-181-38-133.hsd1.ca.comcast.net] has joined #ruby
award85 [award85!~itsame@unaffiliated/award85] has joined #ruby
<trave>
other pages it doesnt happen on
<trave>
er, i shouldnt say pages, i meant one page in particular
<[[thufir]]>
pastie relevant code
wereHamster [wereHamster!~tomc@whisky.caurea.org] has joined #ruby
<trave>
the page is long, I'll just try chopping of paragraphs and see if i can track down the culprit
<trave>
the url is: pinpoint.needle.com, the article is the only one so far :]
<[[thufir]]>
err, no ruby code there. huh?
wilmoore [wilmoore!~wilmoore@c-67-190-17-108.hsd1.co.comcast.net] has joined #ruby
pi3r [pi3r!~pi3r@LSt-Amand-152-32-39-189.w80-11.abo.wanadoo.fr] has joined #ruby
Johnnus_ [Johnnus_!~Johnnus_@62.109.36.140] has joined #ruby
klaustsen [klaustsen!~klaustsen@62.109.36.140] has joined #ruby
krzkrzkrz [krzkrzkrz!~foobar@58.69.201.60] has joined #ruby
krzkrzkrz [krzkrzkrz!~foobar@unaffiliated/krz] has joined #ruby
MekkisFreenode_ [MekkisFreenode_!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
csherin [csherin!~csherin@202.164.151.110] has joined #ruby
_srp [_srp!~quassel@119.82.126.162] has joined #ruby
InBar [InBar!~v@77.242.201.52] has joined #ruby
Houdini1 [Houdini1!~Adium@h81-88-114-126.rev.domonet.ru] has joined #ruby
bastilian [bastilian!~bastilian@chello213047077012.23.11.vie.surfer.at] has joined #ruby
Nss [Nss!~nss@193.205.142.161] has joined #ruby
<[[thufir]]>
that wasn't even remotely ruby related. oh well.
mengu [mengu!~mengu@78.188.203.234] has joined #ruby
adac [adac!~adac@85-127-41-251.dynamic.xdsl-line.inode.at] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
nd______ [nd______!~nd@mnhm-5f74dd91.pool.mediaWays.net] has joined #ruby
Jippi [Jippi!~jippignu@109.202.139.50] has joined #ruby
ChampS666 [ChampS666!~ChampS@p54B4DD04.dip.t-dialin.net] has joined #ruby
p0y [p0y!~p0y@122.52.126.66] has joined #ruby
trivol [trivol!~aurelien@gra94-1-81-57-175-179.fbx.proxad.net] has joined #ruby
waydotnet [waydotnet!~user@host133-202-static.9-188-b.business.telecomitalia.it] has joined #ruby
t0mba [t0mba!~tomba@86-63-95-1.sta.asta-net.com.pl] has joined #ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
remu_ [remu_!~remu@stan.inter-intelli.com] has joined #ruby
LMolr_ [LMolr_!~quassel@87.19.33.245] has joined #ruby
akem [akem!~akem@253.195.84.79.rev.sfr.net] has joined #ruby
akem [akem!~akem@unaffiliated/akem] has joined #ruby
tweequla [tweequla!~Tweeq@ksdfw05.rightcompetence.com] has joined #ruby
<Johnnus_>
i'm having some problems that i suspect are related to ruby more than sinatra (which is what i'm using), maybe i'm not understanding namespacing correctly? could anyone have a look? http://pastie.org/private/mk47bz7kksid6vzromin2a
Ammar01 [Ammar01!~hassaa10@gatek.thls.bbc.co.uk] has joined #ruby
t0mba [t0mba!~tomba@86-63-95-1.sta.asta-net.com.pl] has quit ["Konversation terminated!"]
eka [eka!~eka@181.28.169.86] has joined #ruby
aquarian_198 [aquarian_198!62eaba22@gateway/web/freenode/ip.98.234.186.34] has joined #ruby
<aquarian_198>
this is my first time on irc
<wallerdev>
welcome
<aquarian_198>
thanks
<aquarian_198>
i'm trying to make a file encryptor for carrierwave
<aquarian_198>
so that i store encrypted files on S3
<aquarian_198>
i think i just make a processor
<aquarian_198>
but how do I make it so the file streams through my rails app to the client as a decrypted file?
<wallerdev>
might want to ask in #rubyonrails
<wallerdev>
I've never used carrierwave sorry
<wallerdev>
i imagine you could create your own controller that handles that
<wallerdev>
like DecryptedFilesController
<wallerdev>
and when you send a request there it downloads it from S3 and decrypts it and serves it
<aquarian_198>
ok
<aquarian_198>
thanks for the help
shevy [shevy!~shevy@178-190-47-222.adsl.highway.telekom.at] has joined #ruby
_md [_md!~mduarte@141.0.34.138] has joined #ruby
robotmay [robotmay!~robotmay@94.30.13.228] has joined #ruby
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has joined #ruby
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has quit [#ruby]
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has joined #ruby
cousine [cousine!~cousine@196.221.245.118] has joined #ruby
<senthil>
Anyone here free to help me test out: https://github.com/senthilnambi/OpenAuth2. The last time I used OAuth2 it was a headache, mostly because of lack of examples, so I figured I'll ease some of that pain.
ikaros [ikaros!~ikaros@dslb-094-219-214-087.pools.arcor-ip.net] has joined #ruby
faber [faber!~faber@ppp-131-41.26-151.libero.it] has joined #ruby
workmad3 [workmad3!~workmad3@vpn111.its.manchester.ac.uk] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@213.152.255.138] has joined #ruby
trave [trave!4c173f5f@gateway/web/freenode/ip.76.23.63.95] has quit [#ruby]
mengu [mengu!~mengu@78.188.203.234] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
cyri_ [cyri_!~cyri_@232.93.119.80.rev.sfr.net] has joined #ruby
S1kx [S1kx!~S1kx@ip-95-223-80-198.unitymediagroup.de] has joined #ruby
S1kx [S1kx!~S1kx@pdpc/supporter/monthlybyte/s1kx] has joined #ruby
robyurkowski [robyurkowski!~robyurkow@216.252.93.17] has joined #ruby
mengu [mengu!~mengu@78.188.203.234] has joined #ruby
abstrusenick [abstrusenick!~abstrusen@180.241.150.253] has joined #ruby
latrommi [latrommi!~latrommi@188.134.48.7] has joined #ruby
<[[thufir]]>
Johnnus_: you still there?
<Johnnus_>
[[thufir]]: yeah, oh, and i figured out what was wrong :)
<[[thufir]]>
what was prob?
taii [taii!~tai@85-127-72-17.dynamic.xdsl-line.inode.at] has joined #ruby
<Johnnus_>
Sloppy coding :) I named the module User and the model class was also named User, so it tried calling methods in the module instead
ksinkar [ksinkar!~ksinkar@117.195.96.6] has joined #ruby
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby
Pathou [Pathou!~androirc@80.214.4.58] has joined #ruby
josephwilk [josephwilk!~josephwil@109.231.237.58] has joined #ruby
eignerchris [eignerchris!~eignerchr@wsip-24-120-218-98.lv.lv.cox.net] has joined #ruby
taii [taii!~tai@85-127-72-17.dynamic.xdsl-line.inode.at] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
vladyn [vladyn!~Adium@78.83.241.70] has joined #ruby
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
wereHamster [wereHamster!~tomc@unaffiliated/werehamster] has joined #ruby
bluehavana [bluehavana!u2820@gateway/web/irccloud.com/x-gjehmgjdkzdcdvgj] has joined #ruby
frerich [frerich!~frerich@kde/raabe] has joined #ruby
<Tasser>
what's the correct job description for 'coder' ?
<banisterfiend>
Tasser: computer programmer
<banisterfiend>
or "code monkey"
<Hanmac>
programmer are also IO-Objects ... coffee goes in, source code goes out
<waxjar>
or more general: nerds
<banisterfiend>
Hanmac: you dont drink coffee, you subsist entirely on sweets
<banisterfiend>
Hanmac: you drink liquid honey from crystal goblet with long black tongue
lukesaunders [lukesaunders!~luke@80.87.18.35] has joined #ruby
<Hanmac>
no i feed from monitor radiation
<banisterfiend>
Hanmac: hey do u have a gitub account?
<banisterfiend>
github
<Hanmac>
yeah and a bitbucket
<banisterfiend>
Hanmac: link
<banisterfiend>
Hanmac: why bother with both bitbucket and github btw?
<Hanmac>
because i need an Hg acc for cegui development
<banisterfiend>
Hanmac: name is hanmac on both?
<Hanmac>
yeah
<banisterfiend>
Hanmac: kewl
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
64MAAK9J9 [64MAAK9J9!~quassel@79.114.116.60] has joined #ruby
Qben [Qben!~Qben@c-878be455.41-0146-74657210.cust.bredbandsbolaget.se] has joined #ruby
TheTFEF [TheTFEF!~JS@cpe-173-88-110-115.columbus.res.rr.com] has joined #ruby
TheTFEF [TheTFEF!~JS@unaffiliated/thetfef] has joined #ruby
closedbracket [closedbracket!~closedbra@cpe-098-024-125-117.carolina.res.rr.com] has joined #ruby
senthil [senthil!~senthil@99-51-1-6.lightspeed.snjsca.sbcglobal.net] has joined #ruby
<senthil>
Is there a Module#method like there's an Object#method, so I can grab the method as an object and call it?
<banisterfiend>
senthil: yes
<banisterfiend>
senthil: Module#instance_method
<banisterfiend>
but you have to bind it first
<senthil>
banisterfiend: like m = name.instance_method(:method); m.call ?
<banisterfiend>
no
<banisterfiend>
senthil: i dont know what 'name' is there
malditogeek [malditogeek!~Adium@81.19.48.130] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
cmasseraf [cmasseraf!~cmasseraf@187.106.201.26] has joined #ruby
jbpros [jbpros!~jbpros@137-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
kreantos [kreantos!~kreantos@178.115.226.4.wireless.dyn.drei.com] has joined #ruby
odinswand [odinswand!~odinswand@27-32-234-171.static.tpgi.com.au] has joined #ruby
Rubyfan [Rubyfan!55f86c12@gateway/web/freenode/ip.85.248.108.18] has joined #ruby
<Rubyfan>
Guys it is possible to create easy to install windows application in ruby?
<Rubyfan>
sorry for my ignorance about this topic
jcromartie_ [jcromartie_!~jcromarti@c-69-140-238-182.hsd1.md.comcast.net] has joined #ruby
tk_ [tk_!~tk@p083005.doubleroute.jp] has joined #ruby
lorandi [lorandi!~lorandi@201-1-140-2.dsl.telesp.net.br] has joined #ruby
norex [norex!~quassel@41-133-239-114.dsl.mweb.co.za] has joined #ruby
<Tasser>
Rubyfan, you want to create an installer for your ruby application?
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
seme [seme!~jrizzo@02d8ce98.bb.sky.com] has joined #ruby
<senthil>
banisterfiend: thanks for you help, i'm off
Jeffurson [Jeffurson!58d9ebfa@gateway/web/freenode/ip.88.217.235.250] has joined #ruby
<Jeffurson>
hi
<Jeffurson>
I need info on deploying a ruby on rails program to apache webserver. The OS is windows
<Jeffurson>
I have to mention that I'm totally new to ruby, so please apologise any misconceptions ... ^^
<Jeffurson>
The application used to run with a ruby development server which ran as a service
<Hanmac>
for rails questions exist an #rubyonrails channel
<Jeffurson>
ok ...
<Rubyfan>
Tasser: I want to create program un Ruby but for desktop and I am courious if that affect user att all for example by making him install something on his PC
<Rubyfan>
I know that for example for java you can automaticly install JRE ,,behind the curtains" so user don't see it.
<Hanmac>
IMO build the exe with Ocra, and then use an external program to make an installer ... (or use 7z-selfextractor)
palcu [palcu!~alex@89.122.187.223] has joined #ruby
cemycc [cemycc!~cemycc@89.41.213.8] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
seme [seme!~jrizzo@02d8ce98.bb.sky.com] has quit [#ruby]
kaspernj [kaspernj!~kaspernj@dslb-092-078-118-102.pools.arcor-ip.net] has joined #ruby
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby
<Rubyfan>
Hanmac: will check that are there drawbacks or problem with using ruby for desktop app? I am java programmer and I want to create desktop app but no with java (boring language) ruby seems like fun though :) and I can't program IN C++(c#)etc
niklasb [niklasb!~codeslay0@p5B310A62.dip0.t-ipconnect.de] has joined #ruby
a_a_g1 [a_a_g1!~aag@203.123.164.34] has joined #ruby
<relix>
hey guys, I updated my rubygems (Mac OS X) and now *all* the gems are generating "invalid date format" in gemspec error
<relix>
I found on stackoverflow that you're "just supposed to edit the gemspec manually" but there are too many gems to do that manually
<Hanmac>
Rubyfan: with windowframeworks like QT and gtk there is no problem. there exist ruby bindings for them
<Rubyfan>
ok so nothing too complicated...
<relix>
anything I can do to fix this? would be great :)
Proshot [Proshot!~CoreD@546A56AA.cm-12-3b.dynamic.ziggo.nl] has joined #ruby
<Hanmac>
relix does it also happens when you install new gems?
<relix>
Hanmac: I think it only happens for gems installed before rubygems update
<relix>
they run fine, it's just throwing warnings about them all the time I run anything using gem
<Hanmac>
hm maybe remove the gems and reinstall them again?
philcrissman [philcrissman!~philcriss@c-174-53-217-149.hsd1.mn.comcast.net] has joined #ruby
<relix>
Hanmac: I think that'll be the only solution
<relix>
a shame though, there are a lot of them ;)
<Hanmac>
sorry if i can not find a better solution ... i never "touch"ed an OSX systen
strife25 [strife25!~strife25@cpe-098-026-018-050.nc.res.rr.com] has joined #ruby
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby
<relix>
np, thanks anyway :)
danibx [danibx!~danibx@200.175.180.88.static.gvt.net.br] has joined #ruby
z2fyza_ [z2fyza_!~gard@cm-84.215.22.0.getinternet.no] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
canton7 [canton7!~canton7@87-194-161-58.bethere.co.uk] has joined #ruby
DFectuoso [DFectuoso!~DFectuoso@201.137.112.55] has joined #ruby
_2easy [_2easy!~nofuture@89-79-244-137.dynamic.chello.pl] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
addisaden [addisaden!~addisaden@j18942.servers.jiffybox.net] has joined #ruby
taii [taii!~tai@85-127-72-17.dynamic.xdsl-line.inode.at] has joined #ruby
LMolr [LMolr!~quassel@87.19.33.245] has joined #ruby
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
<addisaden>
hi @all
<addisaden>
is anybody coding music / soundsynthesis with ruby?
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
djjoel|2 [djjoel|2!~kvirc@bas1-orleans06-1168000174.dsl.bell.ca] has joined #ruby
<addisaden>
or has any experience in this?
nari [nari!~nari@p62e58e.totrnt01.ap.so-net.ne.jp] has joined #ruby
x77686d [x77686d!~whm@c-68-63-181-242.hsd1.az.comcast.net] has joined #ruby
<PaulIIIIIIII>
what do yo think when in the forest meets mans grownup triplets width man who have one testicle
Freelancify [Freelancify!~jamesfend@c-71-228-225-167.hsd1.tn.comcast.net] has joined #ruby
<Freelancify>
good morning folks
closedbracket [closedbracket!~closedbra@cpe-098-024-125-117.carolina.res.rr.com] has joined #ruby
<addisaden>
good morning ;)
<Freelancify>
good morning
nanderoo [nanderoo!~nanders@38.124.137.226] has joined #ruby
<Freelancify>
addisaden: do you happen to be on Hacker News? I just posted a story telling how I learned Rails in 12 weeks
sbanwart_ [sbanwart_!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
tuxaddicted [tuxaddicted!~tuxaddict@121.54.58.146] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
kaspernj_ [kaspernj_!~kaspernj@dslb-092-078-118-102.pools.arcor-ip.net] has joined #ruby
skaczor [skaczor!~quassel@mail.prognosoft.biz] has joined #ruby
pen [pen!~pen@223-142-152-58.dynamic.hinet.net] has joined #ruby
openros [openros!~rosarioar@196.41.61.242] has joined #ruby
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
<Hanmac>
XD the vlc build on lunchpad use many deprecated functions ... sometimes defined in its own header (declared at ../../../include/vlc_objects.h:51) [-Wdeprecated-declarations]
<Hanmac>
ups wrong channel *fool me*
kaspernj_ [kaspernj_!~kaspernj@p5B234CBC.dip0.t-ipconnect.de] has joined #ruby
trevortwining [trevortwining!~anonymous@d221-64-66.commercial.cgocable.net] has joined #ruby
msch [msch!~msch@static.74.108.46.78.clients.your-server.de] has joined #ruby
BiHi [BiHi!~bihi@did75-17-88-165-129-29.fbx.proxad.net] has joined #ruby
imsplitbit [imsplitbit!~imsplitbi@64.39.5.119] has joined #ruby
Spockz [Spockz!~Spockz@131.211.235.229] has joined #ruby
seivan_ [seivan_!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
Freelancify [Freelancify!~jamesfend@c-71-228-225-167.hsd1.tn.comcast.net] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
`brendan [`brendan!~b@66-208-246-34-ubr02b-waldlk01-mi.hfc.comcastbusiness.net] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
<`brendan>
good morning guys & gals
<Hanmac>
it depends on your localtime and daycycle :P
Freelancify_ [Freelancify_!~jamesfend@c-71-228-225-167.hsd1.tn.comcast.net] has joined #ruby
lewix [lewix!~lewix@bas1-toronto04-2925396554.dsl.bell.ca] has joined #ruby
lewix [lewix!~lewix@unaffiliated/lewix] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
trivol [trivol!~aurelien@gra94-1-81-57-175-179.fbx.proxad.net] has joined #ruby
grungekid [grungekid!~grungekid@02daafbd.bb.sky.com] has joined #ruby
lewix [lewix!~lewix@bas1-toronto04-2925396554.dsl.bell.ca] has joined #ruby
lewix [lewix!~lewix@unaffiliated/lewix] has joined #ruby
p0y_ [p0y_!~p0y@122.52.126.66] has joined #ruby
Zolrath [Zolrath!~Zolrath@cpe-98-148-138-177.socal.res.rr.com] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
philcrissman [philcrissman!~philcriss@206.57.45.116] has joined #ruby
kreantos [kreantos!~kreantos@178.113.7.59.wireless.dyn.drei.com] has joined #ruby
tvo [tvo!~tvo@wlan-145-94-190-048.wlan.tudelft.nl] has joined #ruby
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
jensn [jensn!~Jens@ip234-137.wireless.lu.se] has joined #ruby
milkpost_ [milkpost_!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
samu [samu!~s@unaffiliated/samaelszafran] has joined #ruby
indstry [indstry!~apple@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby
p1d [p1d!~p1d@ns1.vonaffenfels.de] has joined #ruby
yalue [yalue!yalue@nat/ibm/x-psouswpyprybzkmt] has joined #ruby
tvw [tvw!~tv@212.79.9.150] has joined #ruby
jensn [jensn!~Jens@ip234-137.wireless.lu.se] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
<relix>
so I removed all of my gems, reinstalled them, and now my stuff isn't working so well anymore and I still get invalid gemspec errors
<relix>
*sigh*
arturaz [arturaz!~arturas@x244.soften.ktu.lt] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
Guest46234 [Guest46234!~sudhir@120.59.22.154] has joined #ruby
<canton7>
relix, rubygems up to date? gem update --system
<Hanmac>
canton7 his problems ARE because he do this (was i rembering correct?)
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
centipedefarmer [centipedefarmer!~centipede@75-162-54-195.desm.qwest.net] has joined #ruby
<canton7>
ah, I don't have any of the backlog
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@adsl-98-85-61-141.mco.bellsouth.net] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
<relix>
Hanmac: don't worry about it, I was going to do so anyway ;)
<relix>
canton7: yeah it's up to date
<relix>
so, my dev system is now completely fucked
<relix>
argh which bastard pushed that commit to gems anyway
<relix>
can I uninstall rubygems, remove all the files, and install it again? sounds risky
<Hanmac>
maybe it was the Author of Bumblebee?
notjohn [notjohn!~john@WS1-DSL-208-102-253-169.fuse.net] has joined #ruby
rippa [rippa!~rippa@109-161-124-124.pppoe.yaroslavl.ru] has joined #ruby
vraa [vraa!~vraa@h147.20.185.173.dynamic.ip.windstream.net] has joined #ruby
Nss [Nss!~nss@193.205.142.161] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
p0y [p0y!~p0y@122.52.126.66] has joined #ruby
msch [msch!~msch@static.74.108.46.78.clients.your-server.de] has quit [#ruby]
sudhir_ [sudhir_!~sudhir@120.59.22.154] has joined #ruby
JonSchuff [JonSchuff!~textual@38.123.129.10] has joined #ruby
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
ksinkar [ksinkar!~ksinkar@117.195.96.6] has joined #ruby
<relix>
well I think I fucked things up completely now
<relix>
bundle install installs all the necessary gems
<relix>
then when I try to start rails it doesn't find it and suggests to run bundle install
<relix>
rrrage
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
Manhose [Manhose!~Manhose@188.251.85.233] has joined #ruby
<Freelancify>
relix: I ran into that prob once.. not sure it's the same situation, but I found out what was happening was the bundle install put up the current/latest version for a gem instead of what I was using before and it messed things up
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
<relix>
Freelancify: thanks but I don't think that's the problem here, since I removed them all :)
<Freelancify>
ah,,...
conor_ireland [conor_ireland!~conor_ire@89.100.121.49] has joined #ruby
jensn [jensn!~Jens@ip234-137.wireless.lu.se] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
tomb- [tomb-!~tomb@hubot.tomb.io] has joined #ruby
emocakes [emocakes!~om@p57974D53.dip.t-dialin.net] has joined #ruby
catphish [catphish!~catphish@2001:9d8:2005:11:222:15ff:fe88:aae2] has joined #ruby
enherit [enherit!~enherit@216.3.99.206] has joined #ruby
<cirbri>
Hm what do you suppose would be the quickest way of checking whether something is a valid IPv4 address? I notice Resolv has a regexp for doing just that -- but I dunno how I'd go about using it in, say an if statement
tuxaddicted [tuxaddicted!~tuxaddict@202.60.13.34] has joined #ruby
<catphish>
when using net/http set_form_data in 1.8.7 is there anything i can do to make it encode UTF8 correctly?
<emocakes>
should i feed my dog chocolate?
<catphish>
specifically i'm seeing
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
<cirbri>
No, don't do that, emocakes.
fayimora [fayimora!~fayimora@2a01:388:201:3721:2555:396e:cb6:ace9] has joined #ruby
<cirbri>
You can buy chocolate specifically for dogs, that stuff is fine.
bwlang [bwlang!~anonymous@70-91-134-14-ma-ne.hfc.comcastbusiness.net] has joined #ruby
bbttxu [bbttxu!~adam@129.120.52.229] has joined #ruby
<catphish>
emocakes: if you're being serious, no you shouldn't
<catphish>
it be poisonous for them
<cirbri>
catphish: Yea, I could define a regexp explicitly, sure.
<cirbri>
Don't feed them milk, either.
<catphish>
cirbri: there are other options like an ip address class you can use
<catphish>
which will process it and do other things with it
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
<emocakes>
ok, thanks guys
<emocakes>
always can get help in #ruby
cantbecool [cantbecool!~cantbecoo@38.98.246.130] has joined #ruby
<cirbri>
catphish: That's perfect, the .ipv4? method oughta work good.
michaeltomer [michaeltomer!~michaelto@c-76-118-164-70.hsd1.ma.comcast.net] has joined #ruby
<catphish>
:)
<emocakes>
did you make that regex just then catphish?
<catphish>
no, i googled it like a sane person might
<emocakes>
:p
<michaeltomer>
Anyone know how to write a UTF-8 encoded file in 1.9.2-p290 without a byte order mark? Been trying since yesterday without luck, and Google isn't helping.
<catphish>
now i need to figure out how to rfc2279 encode my UTF8 post data :(
sbanwart_ [sbanwart_!~sbanwart@66.6.175.18] has joined #ruby
<catphish>
michaeltomer: what's the problem exactly? file.write(string) should just write the daya
<catphish>
*data
<michaeltomer>
It's getting a byte order mark at the beginning, which is tripping up the Postgres data import utility.
<michaeltomer>
It doesn't seem to happen in older versions of 1.9.2, but it does in p290.
<rippa>
change encoding to binary
<michaeltomer>
You may have to use a text editor to be able to see the BOM at the beginning of the file.
ePirat [ePirat!~ePirat@unaffiliated/epirat] has joined #ruby
jcromartie [jcromartie!~jcromarti@216.59.120.146] has joined #ruby
<catphish>
i'm going to test it now because i don't believe you :)
dasfugufish [dasfugufish!~Adium@64-184-237-212.mammothnetworks.com] has joined #ruby
<michaeltomer>
Sorry, hex editor, not text editor.
grekko [grekko!~grekko@HSI-KBW-078-043-185-121.hsi4.kabel-badenwuerttemberg.de] has joined #ruby
geekbri [geekbri!~geekbri@208.252.10.190] has joined #ruby
naftilos76 [naftilos76!~quassel@212.50.117.236] has joined #ruby
<michaeltomer>
Writing just as binary still causes a BOM.
azbarcea__ [azbarcea__!~quassel@79.114.12.80] has joined #ruby
<catphish>
doesn't happen to me :|
<michaeltomer>
You need to use binread.
<catphish>
huh?
<michaeltomer>
You're reading it as text, not binary.
<catphish>
i wrote a 2-byte character to a file
<catphish>
the resulting file was 2 bytes long
<catphish>
therefore no BOM
<michaeltomer>
Fair enough.
<catphish>
see my 'ls'
<catphish>
more likely the BOM is already in your string
spuz [spuz!~alexs@80.169.35.118] has joined #ruby
<michaeltomer>
It's being created by FasterCSV from standard lib.
<catphish>
ok, well that's almost certainly what's doing it then
<michaeltomer>
I find it to be unlikely that CSV is responsible for it, but I suppose it's not impossible.
<catphish>
CSV probably requires a BOM in some standards
<catphish>
either way, it's not ruby's file writing as i just demonstrated
Cypher [Cypher!~kapone@208.157.149.45] has joined #ruby
<catphish>
why not inspect the string that comes from your CSV generation
<catphish>
and check
<michaeltomer>
Okay, that's useful information. It doesn't solve my problem, but it might lead me in the right direction. Thanks.
<catphish>
no problem
macmartine [macmartine!~macmartin@069-064-227-254.pdx.net] has joined #ruby
Mohan [Mohan!~nixh0st@cpc1-slou1-2-0-cust65.haye.cable.virginmedia.com] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
wroathe [wroathe!~wroathe@75-146-189-233-Minnesota.hfc.comcastbusiness.net] has joined #ruby
nowthatsamatt [nowthatsamatt!~nowthatsa@adsl-98-85-61-141.mco.bellsouth.net] has quit [#ruby]
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
carlyle [carlyle!~carlyle@216.133.69.18] has joined #ruby
markprovan [markprovan!~Adium@5ad69e7a.bb.sky.com] has joined #ruby
skaczor [skaczor!~quassel@mail.prognosoft.biz] has joined #ruby
markprovan [markprovan!~Adium@5ad69e7a.bb.sky.com] has quit [#ruby]
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
mkscrg [mkscrg!~mkscrg@pool-108-41-134-165.nycmny.fios.verizon.net] has joined #ruby
sudhir__ [sudhir__!~sudhir@120.59.22.154] has joined #ruby
CannedCorn [CannedCorn!~textual@74.113.160.178] has joined #ruby
<Johnnus_>
do i need to include something special in ruby 1.9 to use minitest? when trying to do a get '/' in a spec i get ArgumentError: tried to create Proc object without a block, i guess it's trying to use the sinatra method?
<CannedCorn>
guys when you are runing rake tests with test::unit how do you run something at the end of a set of tests
<CannedCorn>
when a class is finshed
<CannedCorn>
err rake test::task
<CannedCorn>
at the end of each file i want something to happen
Shamgar [Shamgar!~mbainter@adsl-76-233-99-79.dsl.rcsntx.sbcglobal.net] has joined #ruby
fr0gprince_mac [fr0gprince_mac!~fr0gprinc@178-85-90-223.dynamic.upc.nl] has joined #ruby
mberning [mberning!~M@rrcs-98-102-134-241.central.biz.rr.com] has joined #ruby
_md [_md!~mduarte@141.0.34.138] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
mksm [mksm!~ramorim@pdpc/supporter/professional/mksm] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
hubub [hubub!~hubub@85.13.231.11] has joined #ruby
BSaboia [BSaboia!~brunosabo@187.58.91.127] has joined #ruby
dkissell [dkissell!~anonymous@adsl-74-234-148-14.bgk.bellsouth.net] has joined #ruby
<CannedCorn>
guys?
<thomasfedb>
omnomnom corn
emocakes [emocakes!~om@p57974D53.dip.t-dialin.net] has joined #ruby
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
mando [mando!~mando@75.92.8.51] has joined #ruby
<CannedCorn>
hahaha
<CannedCorn>
so setup and teardown let you specify what happens at the start of each unit test
<thomasfedb>
i don't use test::unit
rowanu [rowanu!~rowanu@modemcable171.160-83-70.mc.videotron.ca] has joined #ruby
<thomasfedb>
sorry
<CannedCorn>
ugh, im stuck, we have three years of tests in here
<CannedCorn>
until i can fix it i'm going to have to have to work with it for a bit
<CannedCorn>
i just want to know how i could get something to run at the start of each file
<CannedCorn>
or TestCase class rather
<CannedCorn>
overriding the initialize method didn't work for me
naftilos76 [naftilos76!~quassel@212.50.117.236] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
strife25 [strife25!strife25@nat/ibm/x-akbaywwfccajyvpb] has joined #ruby
<Freelancify>
I actually shouted you guys out in my blog post today about how I learned Rails in 12 weeks to launch my MVP
<Freelancify>
it's on Hacker News right now.. I think #7 ish
<Freelancify>
spent many hours on this channel!
<thomasfedb>
Freelancify, link me
naftilos76 [naftilos76!~quassel@212.50.117.236] has joined #ruby
jay_zawrotny [jay_zawrotny!~Jay@c-71-205-218-131.hsd1.mi.comcast.net] has joined #ruby
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
evantravers [evantravers!~textual@fw.luckie.net] has joined #ruby
gianlucadv [gianlucadv!~gianlucad@host78-84-dynamic.44-79-r.retail.telecomitalia.it] has joined #ruby
jgarvey [jgarvey!~jgarvey@cpe-174-097-248-211.nc.res.rr.com] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@216.199.155.226.nw.nuvox.net] has joined #ruby
x77686d [x77686d!~whm@vecta.cs.arizona.edu] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
jackerran [jackerran!~jackerran@fw.luckie.net] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
sandstrom_ [sandstrom_!~sandstrom@c213-89-142-16.bredband.comhem.se] has joined #ruby
sandstrom_ [sandstrom_!~sandstrom@unaffiliated/sandstrom] has joined #ruby
zulax [zulax!~radarwork@199.8.13.249] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
<JonSchuff>
Awesome Freelancify, I love seeing finished projects like that, it's a great source of motivation : D
sudhir [sudhir!~sudhir@59.177.43.135] has joined #ruby
<Freelancify>
thanks!
stepitime [stepitime!~stepitime@66.7.121.170] has joined #ruby
gruni [gruni!~om@p57974D53.dip.t-dialin.net] has joined #ruby
iocor_ [iocor_!~textual@carp-intohand-1.bath.ac.uk] has joined #ruby
csavola [csavola!~csavola@76-10-149-67.dsl.teksavvy.com] has joined #ruby
kpshek [kpshek!~kpshek@159.140.254.97] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
PaciFisT [PaciFisT!~PeaCE@76-10-149-67.dsl.teksavvy.com] has joined #ruby
seme [seme!~jrizzo@02d8ce98.bb.sky.com] has joined #ruby
enroxorz-away [enroxorz-away!~enroxorz@unaffiliated/enroxorz] has joined #ruby
kenperkins [kenperkins!~textual@50-47-18-37.evrt.wa.frontiernet.net] has joined #ruby
alx- [alx-!~Alex@108.162.180.72] has joined #ruby
emocakes [emocakes!~om@p57974D53.dip.t-dialin.net] has joined #ruby
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby
pi3r [pi3r!~pi3r@LSt-Amand-152-32-39-189.w80-11.abo.wanadoo.fr] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
crodas [crodas!~crodas@git.crodas.org] has joined #ruby
<thomasfedb>
Freelancify, why are you not in #rubyonrails ?
pdtpatrick_ [pdtpatrick_!~pdtpatric@ip72-211-207-15.oc.oc.cox.net] has joined #ruby
gruni [gruni!~om@p57974D53.dip.t-dialin.net] has joined #ruby
Companion [Companion!~companion@188.165.69.193] has joined #ruby
<Companion>
moarning all
emocakes [emocakes!~om@p57974D53.dip.t-dialin.net] has joined #ruby
wroathe [wroathe!~wroathe@75-146-189-233-Minnesota.hfc.comcastbusiness.net] has joined #ruby
<catphish>
does anyone know why 1.8.7's set_form_data doesn't encode 8-byte characters properly? or how to make it use multibyte form encoding?
tomzx [tomzx!~tomzx@dsl-136-201.aei.ca] has joined #ruby
pootpoot [pootpoot!~pootpoot@38.108.250.130] has joined #ruby
fayimora [fayimora!~fayimora@lt38-201.eecs.qmul.ac.uk] has joined #ruby
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby
sausyn [sausyn!~Adium@213.156.44.83] has joined #ruby
pootpoot [pootpoot!~pootpoot@38.108.250.130] has quit [#ruby]
enroxorz-away [enroxorz-away!~enroxorz@unaffiliated/enroxorz] has quit [#ruby]
<Companion>
1.8.7?
<Companion>
1.9.3 is out already o.0
spanner [spanner!~quassel@128.249.96.10] has joined #ruby
pootpoot [pootpoot!~pootpoot@38.108.250.130] has joined #ruby
gruni [gruni!~om@p57974D53.dip.t-dialin.net] has joined #ruby
pootpoot [pootpoot!~pootpoot@38.108.250.130] has quit [#ruby]
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
diago [diago!~heath@wsip-98-174-211-206.hr.hr.cox.net] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
pootpoot [pootpoot!~pootpoot@38.108.250.130] has joined #ruby
<Phrogz>
catphish: What do you meay by "properly"? And what is this set_form_data? Is this a rails helper?
<diago>
I have a hash of str => value pairs that I pass into a Foo.new; how do I make that hash attrs of the foo instance?
<Phrogz>
catphish: If so, you may have better luck asking in #rubyonrails
<diago>
method_missing will not work in this case
<diago>
*my case
<catphish>
Phrogz: it's a method on net::http::request
<Phrogz>
diago: def initialize( opts={} ); opts.each{ |k,v| instance_variable_set :"@#{k}", v }; end
<catphish>
specifically i'm seeing
<Phrogz>
catphish: You're thinking Unicode? 1.8.x is not Unicode-friendly.
<catphish>
i know
<catphish>
but i'm still hoping the problem can be worked around
<Phrogz>
catphish: So why do you expect multi-byte strings?
<diago>
nice, thanks Phrogz
<Phrogz>
diago: You're welcome.
<catphish>
this is an old app that makes heavy use of Iconv to handle character encodings properly
<Phrogz>
Ah; I know nothing of 1.8x and special encodings; sorry.
<catphish>
sadly net::http's form encoding doesn't handle it well
<catphish>
to be honest i'm not totally sure if
<catphish>
it's 0xed
<catphish>
which would fit in one byte or 2 i suppose
<Phrogz>
catphish: The character í (latin lower case i with acute accent) can be represented by any variety of binary representations, depending on the character encoding.
<catphish>
in utf-8 it should be c3 ad right?
<Phrogz>
It's not in ASCII, it would be different in ISO-8559-1 versus MacRoman
<catphish>
though i think it may only be the net::http form encoding that's making the error
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
<catphish>
yeah, i think i'm getting latin1 here for some reason :(
sausyn [sausyn!~Adium@213.156.44.83] has quit [#ruby]
<catphish>
i miss 1.9.3 :(
<Phrogz>
(Amusingly, 0xed in MacRoman is Ì, the opposite accent and case :)
ElitestFX [ElitestFX!~ElitestFX@unaffiliated/elitestfx] has joined #ruby
jrist [jrist!~jrist@184-96-202-249.hlrn.qwest.net] has joined #ruby
<catphish>
"
<catphish>
sadly it will take considerably longer to rewrite this app properly using 1.9 than it will to fix this reasonable minor bug
<catphish>
*reasonably
Azure [Azure!~Azure@reenigne.net] has joined #ruby
Azure [Azure!~Azure@unaffiliated/azure] has joined #ruby
sean_ [sean_!~seanmccan@S01060024017513da.ed.shawcable.net] has joined #ruby
schwap [schwap!~socks@schwap.xen.prgmr.com] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby
PaciFisT [PaciFisT!~PeaCE@76-10-149-67.dsl.teksavvy.com] has joined #ruby
RORgasm [RORgasm!~rorgasm@nyv-exweb.iac.com] has joined #ruby
kreantos_ [kreantos_!~kreantos@178.113.185.142.wireless.dyn.drei.com] has joined #ruby
koala_man [koala_man!vidar@unaffiliated/koala-man/x-2491903] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
ckrailo [ckrailo!~ckrailo@208.86.167.247] has joined #ruby
coccia73 [coccia73!coccia73@dynamic-adsl-62-10-113-116.clienti.tiscali.it] has joined #ruby
brngardner [brngardner!~brngardne@c-98-192-3-166.hsd1.ga.comcast.net] has joined #ruby
zenergi_ [zenergi_!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
voodoofish [voodoofish!~voodoowin@99.93.149.204] has joined #ruby
openros [openros!~rosarioar@196.41.61.242] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
<coccia73>
mission impossibol
<koala_man>
I have an indented xml file. how can I add a formatted node to it without reformatting the entire document with rexml?
devdazed [devdazed!~devdazed@static-96-239-59-191.nycmny.fios.verizon.net] has joined #ruby
zenergi [zenergi!~zenergi@pdpc/supporter/student/zenergi] has joined #ruby
ershad [ershad!~ershad@117.204.111.190] has joined #ruby
thomasdebenning [thomasdebenning!~thomasdeb@c-69-181-139-137.hsd1.ca.comcast.net] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
MekkisFreenode [MekkisFreenode!~MekkisFre@2a00:dd0:0:6:80a6:4fff:fec7:d456] has joined #ruby
sudhir [sudhir!~sudhir@59.177.42.223] has joined #ruby
youdonotexist [youdonotexist!~youdonote@192.206.158.10] has joined #ruby
sandstrom [sandstrom!~sandstrom@m90-144-248-190.cust.tele2.se] has joined #ruby
sandstrom [sandstrom!~sandstrom@unaffiliated/sandstrom] has joined #ruby
<catphish>
looks like using ruby 1.8 and the mysql gem, UTF8 doesn't seem to work correctly
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
Johnnus_ [Johnnus_!~Johnnus_@62.109.36.140] has joined #ruby
klaustsen [klaustsen!~klaustsen@62.109.36.140] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@50-0-135-178.dedicated.static.sonic.net] has joined #ruby
Squarepy [Squarepy!~Squarepy@wcw-staff-214-101.wireless.uva.nl] has joined #ruby
dasfugufish [dasfugufish!~Adium@174-27-233-214.slkc.qwest.net] has joined #ruby
internet_user [internet_user!~internet_@abe.cul.columbia.edu] has joined #ruby
asteve [asteve!~asteve@unaffiliated/kxsteve] has joined #ruby
lorandi [lorandi!lorandi@nat/ibm/x-vppxhndmftabjnvf] has joined #ruby
<asteve>
what's wrong with this statement: `return unless File.open(file, 'r').each_line { |l| l != "string" }`
cousine [cousine!~cousine@196.221.245.118] has joined #ruby
dasfugufish [dasfugufish!~Adium@174-27-233-214.slkc.qwest.net] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
v0n [v0n!~v4n@2607:fad8:4:0:21e:8cff:fe4d:2f7d] has joined #ruby
strife25 [strife25!strife25@nat/ibm/x-tluqlyseyprtbdpb] has joined #ruby
sonkei [sonkei!~sonkei@d14-69-26-171.try.wideopenwest.com] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
jcromartie [jcromartie!~jcromarti@216.59.120.146] has joined #ruby
<catphish>
asteve: File.open(file, 'r').each_line { |l| l != "string" } returns a file
<catphish>
and is therefore always true
<catphish>
you probably need to set a variable in that loop, then use that to determine whether to return
<catphish>
it's not even clear to me what you're trying to achieve
<catphish>
combining unless with != in a loop is bound to confuse humans
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby
<asteve>
ya, i just want to ensure that a string isn't inside of a file
<catphish>
you want to return if you find the string?
<asteve>
correct
<catphish>
in that case it's easy: File.open(file, 'r').each_line { |l| return if l == "string" }
Targen [Targen!~iguana@190.39.181.108] has joined #ruby
ershad [ershad!~ershad@117.204.111.190] has joined #ruby
alex__c2022 [alex__c2022!~alex@207.239.64.154] has joined #ruby
punkrawkR [punkrawkR!~freddiebo@h-9-122.a328.priv.bahnhof.se] has joined #ruby
<koala_man>
I'm adding a text node to a rexml node with four spaces, but when written out, it just has one space. how do I make it not mangle my text nodes?
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
hadees [hadees!~hadees@64.132.24.248] has joined #ruby
idarkside [idarkside!~YourNick@5e04aec4.bb.sky.com] has joined #ruby
x77686d_ [x77686d_!~whm@uawifi-nat-210-72.arizona.edu] has joined #ruby
senj [senj!~senj@S01060026f323bcdf.ed.shawcable.net] has joined #ruby
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby
artOfWar [artOfWar!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby
sepp2k [sepp2k!~sexy@g231125093.adsl.alicedsl.de] has joined #ruby
x77686d_ [x77686d_!~whm@uawifi-nat-210-72.arizona.edu] has joined #ruby
kerframil [kerframil!~kerframil@gentoo/user/kerframil] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
arturaz [arturaz!~arturas@x244.soften.ktu.lt] has quit ["Leaving"]
<koala_man>
you have to use Text.new(" ", true)
kenperkins [kenperkins!~textual@174-24-134-155.tukw.qwest.net] has joined #ruby
Paoc_ [Paoc_!~paoc@pc-28-58-161-190.cm.vtr.net] has joined #ruby
internet_user [internet_user!~internet_@abe.cul.columbia.edu] has joined #ruby
hasrb [hasrb!~hasrb@rrcs-71-42-140-236.sw.biz.rr.com] has joined #ruby
albemuth [albemuth!~albemuth@201.198.78.18] has joined #ruby
artOfWar [artOfWar!~artofwar@nat/yahoo/x-kskmkbyktpmalqha] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
adeponte [adeponte!~adeponte@67.110.253.162.ptr.us.xo.net] has joined #ruby
burgestrand [burgestrand!~burgestra@host.62.65.124.23.bitcom.se] has joined #ruby
kidoz [kidoz!~kidoz@85.159.44.109] has joined #ruby
<CannedCorn>
where is the documentation for Unit::TEST
<CannedCorn>
would like to override the initialize method
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
drknus [drknus!~user@blk-222-141-162.eastlink.ca] has joined #ruby
sean__ [sean__!~seanmccan@S010600179a35aaf7.ed.shawcable.net] has joined #ruby
<catphish>
are regex matches $1 etc threadsafe?
<asteve>
are returns in functions not frowned on?
savage- [savage-!~savage-@istep.static.monkeybrains.net] has joined #ruby
<catphish>
asteve: no
<catphish>
asteve: return is put there for you to use :)
<catphish>
returning from inside a block isn't the neatest thing in the world, but in most cases its fine
<catphish>
what is frowned upon is that that is difficult for someone else to understand
<catphish>
if you find it complicated, comment it :)
Ammar01 [Ammar01!~hassaa10@gatej.thls.bbc.co.uk] has joined #ruby
Ammar_Frameworks [Ammar_Frameworks!~hassaa10@gatej.thls.bbc.co.uk] has joined #ruby
waxjar [waxjar!~waxjar@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
TrevorBramble [TrevorBramble!~tbramble@trevorbramble.com] has joined #ruby
Cypher [Cypher!~kapone@208.157.149.45] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
maletor [maletor!~maletor@74.115.25.139] has joined #ruby
eywu [eywu!~Adium@205-170-107-4.dia.static.qwest.net] has joined #ruby
hundchenkatze [hundchenkatze!~hundchenk@12.70.190.2] has joined #ruby
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
luckman212 [luckman212!~irc@pool-108-41-8-176.nycmny.fios.verizon.net] has joined #ruby
techhelp [techhelp!~Dan@firebox.rsmart.com] has joined #ruby
Araxia_ [Araxia_!~Araxia@173-164-68-213-Oregon.hfc.comcastbusiness.net] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
daniel_hinojosa [daniel_hinojosa!~danno@67-0-117-93.albq.qwest.net] has joined #ruby
MasterIdler_ [MasterIdler_!~MasterIdl@static-66-225-153-161.ptr.terago.net] has joined #ruby
MasterIdler_ [MasterIdler_!~MasterIdl@static-66-225-153-161.ptr.terago.net] has joined #ruby
internet_user [internet_user!~internet_@abe.cul.columbia.edu] has quit [#ruby]
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
lukesaunders [lukesaunders!~luke@5e087961.bb.sky.com] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
x77686d [x77686d!~whm@vecta.cs.arizona.edu] has joined #ruby
Squarepy [Squarepy!~Squarepy@wcw-staff-214-101.wireless.uva.nl] has joined #ruby
x77686d_ [x77686d_!~whm@uawifi-nat-210-72.arizona.edu] has joined #ruby
spinagon [spinagon!~rippa@109-161-65-194.pppoe.yaroslavl.ru] has joined #ruby
apok_ [apok_!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
Boohbah [Boohbah!boohbah@gateway/shell/anapnea.net/x-gwnkpxpbfwtvzgbh] has joined #ruby
Boohbah [Boohbah!boohbah@unaffiliated/boohbah] has joined #ruby
Boohbah [Boohbah!boohbah@gateway/shell/anapnea.net/x-gwnkpxpbfwtvzgbh] has joined #ruby
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
tectonic [tectonic!~tectonic@c-67-164-98-164.hsd1.ca.comcast.net] has joined #ruby
rippa [rippa!~rippa@109-161-65-194.pppoe.yaroslavl.ru] has joined #ruby
mengu [mengu!~mengu@78.188.203.234] has joined #ruby
hobodave [hobodave!~hobodave@pdpc/supporter/professional/hobodave] has joined #ruby
Targen [Targen!~iguana@190.39.181.108] has joined #ruby
strife25 [strife25!strife25@nat/ibm/x-zoyvickttlnreuur] has joined #ruby
apok [apok!~apok@c-107-3-149-167.hsd1.ca.comcast.net] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
jtrudeau [jtrudeau!~jeff@12.206.220.2] has joined #ruby
zulax [zulax!~radarwork@199.8.13.249] has joined #ruby
josefig [josefig!~joseph@unaffiliated/josefig] has joined #ruby
Z2FyZA [Z2FyZA!~gard@cm-84.215.22.0.getinternet.no] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
rippa [rippa!~rippa@109-161-65-194.pppoe.yaroslavl.ru] has joined #ruby
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby
sandstrom [sandstrom!~sandstrom@c213-89-142-16.bredband.comhem.se] has joined #ruby
sandstrom [sandstrom!~sandstrom@unaffiliated/sandstrom] has joined #ruby
adamkittelson [adamkittelson!~adamkitte@50.0.132.2] has joined #ruby
siksia [siksia!~siksia@209.119.255.4] has joined #ruby
mengu_ [mengu_!~mengu@unaffiliated/mengu] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
sandstrom_ [sandstrom_!~sandstrom@c213-89-142-16.bredband.comhem.se] has joined #ruby
sandstrom_ [sandstrom_!~sandstrom@unaffiliated/sandstrom] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
jeffsmykil [jeffsmykil!~jeffsmyki@WPIS-74-220-228-170.worldpath.net] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
<jeffsmykil>
I am getting an undefined method .push for this: namesBoolean[pick].push(true)
<jeffsmykil>
any idea why>
<Squarepy>
what kind of data struct?
<jeffsmykil>
namesBoolean is an array
<LiquidInsect>
an array of booleans?
<jeffsmykil>
yes
<LiquidInsect>
so namesBoolean[pick] is a boolean
<jeffsmykil>
yup
<Squarepy>
ok you're pushing on one element from the array
hasrb [hasrb!~hasrb@rrcs-97-79-133-155.sw.biz.rr.com] has joined #ruby
<jeffsmykil>
i gues i want to replace
voodoofish430 [voodoofish430!~mtorres@208.76.2.200] has joined #ruby
<Squarepy>
why not assign it then
<jeffsmykil>
how would I go about doing that?
<LiquidInsect>
=
ksinkar [ksinkar!~ksinkar@115.240.61.64] has joined #ruby
cemycc [cemycc!~cemycc@79.112.121.66] has joined #ruby
<jeffsmykil>
oh duh
frerich2 [frerich2!~frerich@mail.froglogic.com] has joined #ruby
<jeffsmykil>
lol
<Squarepy>
good
<jeffsmykil>
thanks guys, sorry for being dense
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby
jeffsmykil [jeffsmykil!~jeffsmyki@WPIS-74-220-228-170.worldpath.net] has quit [#ruby]
n3m [n3m!~bla@178-190-137-239.adsl.highway.telekom.at] has joined #ruby
idarkside [idarkside!~YourNick@5e04aec4.bb.sky.com] has joined #ruby
jbpros [jbpros!~jbpros@137-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
eldariof [eldariof!~CLD@81.200.24.186] has joined #ruby
aakashvd [aakashvd!~aakashvd@triband-mum-59.184.29.91.mtnl.net.in] has joined #ruby
<Squarepy>
jeffsmykil, doing the variable.methods, helps with such a throwback
userx- [userx-!~0x-@unaffiliated/userx-] has joined #ruby
nfxgosu [nfxgosu!~nekid@117.202.80.157] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
mengu [mengu!~mengu@78.188.203.234] has joined #ruby
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
evan_luck [evan_luck!~evan_luck@74.7.230.93] has joined #ruby
davidcelis [davidcelis!~david@70-89-180-6-smc-or.hfc.comcastbusiness.net] has joined #ruby
froy [froy!~troy@manuel.dublan.net] has joined #ruby
daed [daed!~daed@daed.org] has joined #ruby
yellow5_ [yellow5_!~yellow5@levicole.xen.prgmr.com] has joined #ruby
ozzloy [ozzloy!~ozzloy@ozzloy.lifeafterking.org] has joined #ruby
plato [plato!~plato@98.143.152.29] has joined #ruby
tdmackey [tdmackey!~tdmackey@booleanhaiku.com] has joined #ruby
nicksmith [nicksmith!~nick@173.214.173.94] has joined #ruby
patjoh [patjoh!~patjoh@94-247-168-163-static.serverhotell.net] has joined #ruby
shaman42 [shaman42!shaman42@kapsi.fi] has joined #ruby
plato [plato!~plato@unaffiliated/therealplato] has joined #ruby
ozzloy [ozzloy!~ozzloy@unaffiliated/ozzloy] has joined #ruby
mlue [mlue!~mlue@li361-127.members.linode.com] has joined #ruby
Telmo [Telmo!~telmo@c-68-44-135-81.hsd1.pa.comcast.net] has joined #ruby
Mrono [Mrono!~mrono@mrono.net] has joined #ruby
matti [matti!matti@acrux.romke.net] has joined #ruby
mlue [mlue!~mlue@unaffiliated/mlue] has joined #ruby
zumbi [zumbi!~zumbi@77.224.206.23] has joined #ruby
enherit [enherit!~enherit@216.3.99.206] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@50-0-135-178.dedicated.static.sonic.net] has joined #ruby
kivi [kivi!~joni@ec2-79-125-13-112.eu-west-1.compute.amazonaws.com] has joined #ruby
Mrono [Mrono!~mrono@unaffiliated/mrono] has joined #ruby
matti [matti!matti@madwifi/support/matti] has joined #ruby
Jb_ [Jb_!~jb@ks364797.kimsufi.com] has joined #ruby
kaspernj_ [kaspernj_!~kaspernj@dslb-088-075-127-236.pools.arcor-ip.net] has joined #ruby
BSaboia [BSaboia!~brunosabo@187.58.91.127] has joined #ruby
kinderman [kinderman!~kinderman@data.kinderman.net] has joined #ruby
_bat [_bat!~bat@68-71-141-194.servers.zerigo.net] has joined #ruby
madhatter [madhatter!~madhatter@unaffiliated/madhatter] has joined #ruby
vitoravelino [vitoravelino!~vitor@dev.vitoravelino.net] has joined #ruby
idarkside [idarkside!~YourNick@5e04aec4.bb.sky.com] has joined #ruby
vitoravelino [vitoravelino!~vitor@unaffiliated/vtr] has joined #ruby
tvw [tvw!~tv@212.79.9.150] has joined #ruby
DeeJayTwo [DeeJayTwo!~deejay2@office.abi.ca] has joined #ruby
siksia [siksia!~siksia@209.119.255.4] has joined #ruby
Nanuq [Nanuq!~nanuq@cave45.ecks.ca] has joined #ruby
Proshot [Proshot!~CoreD@546A56AA.cm-12-3b.dynamic.ziggo.nl] has joined #ruby
nricciar [nricciar!~nricciar@64.207.62.66] has joined #ruby
eko [eko!~eko@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has joined #ruby
vraa [vraa!~vraa@c-76-30-135-64.hsd1.tx.comcast.net] has joined #ruby
eko [eko!~eko@unaffiliated/eko] has joined #ruby
malditogeek [malditogeek!~Adium@81.19.48.130] has joined #ruby
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
philcrissman [philcrissman!~philcriss@206.57.45.116] has joined #ruby
bengl [bengl!~bengl@174-143-175-143.static.cloud-ips.com] has joined #ruby
phantomfake [phantomfake!~i@pool-71-190-229-236.nycmny.fios.verizon.net] has joined #ruby
stayarrr [stayarrr!~olivererx@dslb-188-100-254-093.pools.arcor-ip.net] has joined #ruby
yfeldblum [yfeldblum!~Jay@pool-71-246-76-76.bltmmd.east.verizon.net] has joined #ruby
mdmdm [mdmdm!~maestro@50-0-12-246.dsl.dynamic.sonic.net] has joined #ruby
pen [pen!~pen@223-142-152-58.dynamic.hinet.net] has joined #ruby
aakashvd [aakashvd!~aakashvd@triband-mum-59.184.29.91.mtnl.net.in] has joined #ruby
Schmidt [Schmidt!lsc@nobelium.se] has joined #ruby
soulcutter [soulcutter!~soulcutte@varenka.cime.net] has joined #ruby
benwoody [benwoody!~ben@ln.benwoodall.com] has joined #ruby
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby
Gm4n [Gm4n!~Gm4n@unaffiliated/gm4n] has joined #ruby
jmeeuwen [jmeeuwen!~kanarip@white.kolabsys.com] has joined #ruby
kstephens [kstephens!~kstephens@173-15-46-105-Illinois.hfc.comcastbusiness.net] has joined #ruby
linduxed [linduxed!~linduxed@194-14-0-85.serioustubes.org] has joined #ruby
Nisstyre [Nisstyre!~yours@c-208-90-102-250.netflash.net] has joined #ruby
sepp2k [sepp2k!~sexy@g231125093.adsl.alicedsl.de] has joined #ruby
Azure|netbook [Azure|netbook!~azt@unaffiliated/azure] has joined #ruby
pusewicz_ [pusewicz_!u2036@gateway/web/irccloud.com/x-qxwjfufzqlabtkib] has joined #ruby
FlyingFoX [FlyingFoX!~quassel@sanktwendel.weh.RWTH-Aachen.DE] has joined #ruby
dv_ [dv_!~quassel@chello080108009040.14.11.vie.surfer.at] has joined #ruby
skaczor [skaczor!~shogun@mail.prognosoft.biz] has joined #ruby
luckman212 [luckman212!~irc@pool-108-41-8-176.nycmny.fios.verizon.net] has joined #ruby
mitchty [mitchty!~mitchty@ec2-50-19-41-37.compute-1.amazonaws.com] has joined #ruby
TrevorBramble [TrevorBramble!~tbramble@trevorbramble.com] has joined #ruby
jaimef [jaimef!jaimef@dns.mauthesis.com] has joined #ruby
JohnBat26 [JohnBat26!~Eugene@80.251.120.55] has joined #ruby
cratchit [cratchit!~cratchit_@li89-229.members.linode.com] has joined #ruby
seivan [seivan!~seivan@cm242.eta204.maxonline.com.sg] has joined #ruby
matti [matti!matti@acrux.romke.net] has joined #ruby
matti [matti!matti@madwifi/support/matti] has joined #ruby
to_carotte [to_carotte!~to_carott@89-156-79-163.rev.numericable.fr] has joined #ruby
klaas [klaas!klaas@simply.kla.as] has joined #ruby
jackhammer2022 [jackhammer2022!~textual@c-24-34-124-94.hsd1.ma.comcast.net] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
enroxorz [enroxorz!~enroxorz@unaffiliated/enroxorz] has quit [#ruby]
shadoi [shadoi!~Adium@c-71-202-122-8.hsd1.ca.comcast.net] has joined #ruby
eignerchris [eignerchris!~eignerchr@wsip-24-120-218-98.lv.lv.cox.net] has joined #ruby
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby
c0rn [c0rn!~c0rn@50-0-142-2.dsl.dynamic.sonic.net] has joined #ruby
artOfWa__ [artOfWa__!~artofwar@108-205-201-30.lightspeed.sntcca.sbcglobal.net] has joined #ruby
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
invsblduck [invsblduck!~brett@173.227.0.2] has joined #ruby
dnyy [dnyy!~dnyy@c-98-237-138-38.hsd1.wa.comcast.net] has joined #ruby
idletom [idletom!b@173-30-162-172.client.mchsi.com] has joined #ruby
kyb [kyb!~kybalion@99-14-26-190.lightspeed.tukrga.sbcglobal.net] has joined #ruby
<kyb>
hi
bluehavana [bluehavana!u2820@gateway/web/irccloud.com/x-xxerdghhcxfttubi] has joined #ruby
rebagliatte [rebagliatte!~rebagliat@r186-53-103-67.dialup.adsl.anteldata.net.uy] has joined #ruby
alex__c2022 [alex__c2022!~alex@207.239.64.154] has joined #ruby
matti [matti!matti@madwifi/support/matti] has quit ["8-X"]
<Phrogz>
Hello, kyb.
<kyb>
hi
<kyb>
can u tell me if my slideshow works?
hooper [hooper!~hooper@204.28.122.20] has joined #ruby
<Phrogz>
kyb: Only if your slideshow is on a publicly accessible webpage and you give me the URL.
sdwrage [sdwrage!~sdwrage@cpe-184-57-83-165.columbus.res.rr.com] has joined #ruby
<patrick99e99>
does someone here need to boot kyb?
<kyb>
omg
<kyb>
i just need a striaght answer
<patrick99e99>
I am not going to a url with that name
<kyb>
ok fine
<kyb>
i just help someone else then
shaatar [shaatar!u648@gateway/web/irccloud.com/x-qaobozudunhbfepp] has joined #ruby
<Phrogz>
kyb: No, no images.
<Phrogz>
patrick99e99: You might have more luck asking that question in #rubyonrails; I'm not personally familiar with ActionMailer. Further, you might want to elaborate on what you mean by "doesn't work"
brngardner [brngardner!~brngardne@c-98-192-3-166.hsd1.ga.comcast.net] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
Synthead [Synthead!~max@50-76-231-54-static.hfc.comcastbusiness.net] has joined #ruby
<patrick99e99>
Phrogz: well ActionMailer really isn't the relevant to my question.. I am just trying to pass a block into a hash.. def self.foo; lambda { "lol" }; end; .. and then on the class level blah(:to => &foo)
<patrick99e99>
but it's complaining that & cant be there...
<Phrogz>
patrick99e99: Let me look at your code again.
<kyb>
ok is it workin now?
<Phrogz>
patrick99e99: You can either pass a lambda as a param to a method (or make it the value of a hash), or you can pass it as a block. Which do you want?
<Phrogz>
patrick99e99: It should be either default &default_to_address or default to:default_to_address
<patrick99e99>
hmm neither of those seem to work....
<kyb>
ok
<kyb>
works on my phone now
<patrick99e99>
the &default_to_address gives an error unepected &
<patrick99e99>
the default to:default_address gives no error, but the behavior is wrong
n3m [n3m!~bla@178-190-136-236.adsl.highway.telekom.at] has joined #ruby
<patrick99e99>
Phrogz: I am trying to use this lambda to access instance variables that are defined later by instance methods
<patrick99e99>
it works fine if I do default :to => lambda { @my_var }
<Phrogz>
patrick99e99: So it would work if you did: default{ @user.email if @user; @deputy.email if @deputy } ?
sdferfx [sdferfx!~jeff@gateway/tor-sasl/sdferfx] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
<patrick99e99>
Phrogz: yeah that works, but I have lots of conditions and it starts to look real ugly inline like that
<Phrogz>
OK, so you don't want to pass a black to the 'default' method, you do want to pass a hash.
<patrick99e99>
so I wanted to put it in a separate method
<sdferfx>
Hi. I want to want a String class that makes every write to the string append instead of overwrite my previous string. Can anyone here help me do that?
<patrick99e99>
Phrogz: but I have to pass a hash, because there are many options that can be defaults.. :to, :subject, :from, etc are all valid keys that can be values or procs
<Phrogz>
sdferfx: You mean you want to make a class that makes all mutating methods not mutate, but return a new string? So that gsub! doesn't mutate, for example?
<Phrogz>
patrick99e99: OK, then your answer to my previous question was a lie.
adac [adac!~adac@85-127-20-90.dynamic.xdsl-line.inode.at] has joined #ruby
<patrick99e99>
I'm sorry I don't mean to be a liar
<Phrogz>
:)
<Phrogz>
patrick99e99: Let me test something for a second.
<adac>
what is the easiest way to remove duplicates from an array?
<patrick99e99>
adac: .uniq
<adac>
patrick99e99, oh thanks! :)
VictorMartins [VictorMartins!~VictorMar@87-196-149-191.net.novis.pt] has joined #ruby
<sdferfx>
Phrogz, no, I mean that I want a class that adds the new value for the string to the old value and display them both, a class that turns all replacements into concats
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby
<Phrogz>
sdferfx: What's your problem/question, then?
burgestrand [burgestrand!~burgestra@h-45-63.a155.priv.bahnhof.se] has joined #ruby
Jedi_SCT1 [Jedi_SCT1!~j@67.215.87.186] has joined #ruby
<Phrogz>
sdferfx: I still don't understand, either from here or that description. Please modify your s/o question to put in some sample code that you'd like to run and the results that you'd like to see.
trivol [trivol!~aurelien@ip-178.net-89-2-84.rev.numericable.fr] has joined #ruby
<patrick99e99>
Phrogz: hmmmmm.... ok ill try again on my end in a min
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<adac>
hmm I have this array: http://pastebin.com/wENZX03K. Now you can see different items, digitalcamera is two times within the array the other only one single time. Now to every different string in that array I would need to add an additional "version". In this example I would need to add: digitalcamera_I000003, pdm-camcorder_I000002, pdm-blurayplayer_I000003. any ideas how to do that?
sts [sts!~sts@hmm.ono.at] has joined #ruby
<sts>
Hello folks. Can anybody help me a bit? I'd like to generate a crypt() compatible SHA256 salted hash string. how would i do that with Digest::SHA256?
jbw [jbw!~jbw@dsl-044-084.cust.imagine.ie] has joined #ruby
joast [joast!~rick@76.178.187.164] has joined #ruby
<adac>
sorry: pdm-blurayplayer_I000002 of course
r0bby [r0bby!~wakawaka@guifications/user/r0bby] has joined #ruby
kyb [kyb!~kybalion@99-14-26-190.lightspeed.tukrga.sbcglobal.net] has quit [#ruby]
<sdferfx>
Phrogz, edited on SO
<sdferfx>
I don't know if that assignment of a certain class is correct Ruby syntax or not, but I hope it gets the idea across
nivoc [nivoc!~matthias@adsl-71-135-45-64.dsl.pltn13.pacbell.net] has joined #ruby
tubgoat [tubgoat!~tubgoat@gateway/tor-sasl/tugboat] has joined #ruby
<Phrogz>
sdferfx: Reading.
<Phrogz>
sdferfx: That's not possible using variable assignment. It's only possible if you're calling a method, like app_str = AppStr.new; app_str<<"jeff"; app_str<<"walls"; Is that OK?
zastaph [zastaph!zastaph@unaffiliated/zastaph] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby
matti [matti!matti@madwifi/support/matti] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
Illiux [Illiux!~nol@mc2-wireless-pittnet-38-21.wireless.pitt.edu] has joined #ruby
shadoi [shadoi!~Adium@2001:5a8:4:68e0:811a:b3c4:1c30:3b7c] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<sdferfx>
Phrogz, I don't know really, I don't think so. The thing is, open4::background allows me to use anything that impelments one of those listed functions as the handle to stdout. I want to collect the entire stdout for my process. How can I do that with open4::background without writing it to a file?
crodas [crodas!~crodas@git.crodas.org] has joined #ruby
<Phrogz>
Make a new StringIO, hand that over as your stdout, and it will pretend to be a file and accumulate all your output as a string.
<sdferfx>
Phrogz, OK. Have you used that with open4::background before?
<Phrogz>
sdferfx: No, but that's exactly the use case that StringIO is meant for.
<sdferfx>
Phrogz, I see, that is exactly what I want. However, I am not sure if open4::background is doing it that way or if it is doing assignment on write.
<Phrogz>
sdferfx: There's no way it is using assignment; that wouldn't work with stdout, either.
stkowski [stkowski!~stkowski@12.207.16.130] has joined #ruby
Targen [Targen!~iguana@159.90.11.250] has joined #ruby
trend [trend!~trend@rrcs-76-79-188-47.west.biz.rr.com] has joined #ruby
n8ji [n8ji!~n8ji@c-24-20-239-11.hsd1.or.comcast.net] has joined #ruby
Telmo [Telmo!~telmo@c-68-44-135-81.hsd1.pa.comcast.net] has joined #ruby
<sdferfx>
Phrogz, OK, thanks. I appreciate it.
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
fayimora [fayimora!~fayimora@95.175.159.8] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
ephemerian [ephemerian!~ian@82-71-51-229.dsl.in-addr.zen.co.uk] has joined #ruby
<sdferfx>
OK, one more question. Is it possible to dump the output of StringIO as it's written? Is there a way I can "listen" for the write event and puts at that point?
hennie [hennie!~hennie@ks356093.kimsufi.com] has joined #ruby
SegFaultAX|work [SegFaultAX|work!~mkbernard@173.228.45.162] has joined #ruby
chalky [chalky!~4eek@41-133-175-232.dsl.mweb.co.za] has joined #ruby
<Phrogz>
sdferfx: Good question; if there's not, we can monkeypatch it in easily enough
<Phrogz>
For example: class LoudStringIO < StringIO; def <<(*a); super.tap{ puts self }; end; end
<Phrogz>
(Untested.)
<sdferfx>
Phrogz, OK. Can you help step me through that? As I said, I am new. OK, thanks for the example. What does the *a mean in Ruby syntax?
<sdferfx>
Don't see a tap option on StringIO; where is that inherited from?
<Phrogz>
*a says "I don't care how many arguments you call this method with, collect them into an array"
<Phrogz>
super (without parentheses after it) invokes the superclass method passing along whatever was passed to the method.
<Phrogz>
sdferfx: Ruby doesn't "compile", but I know what you mean. b) Where/when does it not output anything?
<adac>
Phrogz, ah perfect! thanks a lot!
<Phrogz>
Ruby is often like that; there's often a method that does exactly what you need, elegantly.
remkar [remkar!~remkar@mail1.attinteractive.com] has joined #ruby
<any-key>
make sure to read through the enumerable documentation
<any-key>
that's where the cool ones live
<rippa>
and then people get like
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<rippa>
"why does this method not work exactly as I want"
<sdferfx>
Phrogz, it doesn't output as the stdout receives input. It does add the input to stdout.string. I can output it all at the end after open4::bg thread has finished, but I want to watch stdout as it goes
iDs [iDs!~YourNick@5e04aec4.bb.sky.com] has joined #ruby
Jakee` [Jakee`!~Jakee`@5ad317fe.bb.sky.com] has joined #ruby
<Phrogz>
sdferfx: OK, testing and fixing.
conor_ireland [conor_ireland!~conor_ire@89.100.121.49] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
asteve [asteve!~asteve@unaffiliated/kxsteve] has quit [#ruby]
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby
<adac>
hmm is it possible to have integer values with leading zeros ie: 000001, 000002, ..., 000010 ..., 000100
Spockz` [Spockz`!~Spockz@21pc198.sshunet.nl] has joined #ruby
rook_flood [rook_flood!~textual@3.d3bed1.client.atlantech.net] has joined #ruby
vraa [vraa!~vraa@70-2-79-193.pools.spcsdns.net] has joined #ruby
<adac>
ok i understand now
<adac>
rippa, its all a stupid thing. Someone made a convention to store version numbers like that
<adac>
and now i'm he one who has to deal wit it
<adac>
the
<adac>
but lucky me you are here :)
<eerdogan>
How can I search all emails (including, but not limited to Inbox) using gmail gem? How come the results are limited to the ones in Inbox, not the archived ones?
ZenBalance [ZenBalance!~ZenBalanc@128.12.247.239] has joined #ruby
skrewler [skrewler!~skrewler@209.213.206.58] has joined #ruby
kreantos [kreantos!~kreantos@77.118.0.15.wireless.dyn.drei.com] has joined #ruby
strife25 [strife25!strife25@nat/ibm/x-mvemsimfzsgptiqr] has joined #ruby
fantazo [fantazo!~fantazo@85-127-93-0.dynamic.xdsl-line.inode.at] has joined #ruby
headius [headius!~headius@173-165-226-141-minnesota.hfc.comcastbusiness.net] has joined #ruby
geekbri [geekbri!~geekbri@208.252.10.190] has joined #ruby
h4mz1d [h4mz1d!~hamfz@DHCP-214-001.wireless-resnet.ua.edu] has joined #ruby
Morkel [Morkel!~Morkel@xdsl-87-78-206-32.netcologne.de] has joined #ruby
fbea [fbea!~fbea@pool-108-21-11-51.nycmny.east.verizon.net] has joined #ruby
tsd_usa [tsd_usa!~daniel_d@NYUFGA-WLESSAUTHCLIENTS-01.NATPOOL.NYU.EDU] has joined #ruby
<tsd_usa>
Hi guys, What do you use to debug your ruby script??
stephans_ [stephans_!~stephans@209.66.114.6] has joined #ruby
geekbri [geekbri!~geekbri@208.252.10.190] has joined #ruby
tomsthumb_ [tomsthumb_!~byron@rrcs-71-41-17-216.sw.biz.rr.com] has joined #ruby
<tomsthumb_>
how would you sort an array of strings in 1.8.7?
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
<burgestrand>
tsd_usa: pry
<burgestrand>
tomsthumb_: same way you sort an array of anything else, using Array#sort or Array#sort_band it also won’t work very reliably if you change the source files during code run
<burgestrand>
… sort_band?
<sdferfx>
Phrogz, I want to output only the new information on the taps, i.e., I want to watch live, I don't want stdout to repeat itself every time it gets written to. I have tried ot modify with this: http://dpaste.com/694059/ but it fails. :( Can you help me?
<burgestrand>
… really? I mean Array#sort_by
<sdferfx>
Phrogz, I was using @count recently, tried self.count in an attempt to get rid of the runtime that occurs
mpabst [mpabst!~mpabst@173-228-44-97.dsl.static.sonic.net] has joined #ruby
<sdferfx>
Phrogz, Ah, I see, yeah, I should have thought of that
<sdferfx>
Nonetheless, is there a reasonable way to do slices in Ruby? In Python I can say print string[last_length:] and it will just start printing from there. I don't see that Ruby automatically finds length like that, I see that it has the .. syntax but appears must have args on both ends
<tsd_usa>
Hi I tried to debug a ruby script, but met following problem:
<tsd_usa>
ruby -d test.rb
<tsd_usa>
Exception `LoadError' at /Users/tsdeng/.rbenv/versions/1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb:1241 - cannot load such file -- rubygems/defaults/operating_system
<tsd_usa>
Exception `LoadError' at /Users/tsdeng/.rbenv/versions/1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb:1250 - cannot load such file -- rubygems/defaults/ruby
<tsd_usa>
what doest it mean?
<tomsthumb_>
burgestrand: so why does .sort! blow up and .sort work fine?
Telmo [Telmo!~telmo@c-68-44-135-81.hsd1.pa.comcast.net] has joined #ruby
axl_ [axl_!~axl@75-149-152-225-Minnesota.hfc.comcastbusiness.net] has joined #ruby
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby
<burgestrand>
tsd_usa: it means you turned on the debug flag in ruby, which shows all raised errors even if they’re caught
<burgestrand>
it’s sometimes useful, but not all that often
<tsd_usa>
burgestrand: Is it a problem?
<burgestrand>
tsd_usa: I don’t know, does it cause problems for you?
<burgestrand>
tomsthumb_: blow up with what?
fbea [fbea!~fbea@pool-108-21-11-51.nycmny.east.verizon.net] has joined #ruby
<tsd_usa>
I am just trying to debug a ruby script, but I can't get it through with this burgestrand
<Companion>
I am learning ruby, and had an example (the comments are done by me since it is asked in the book) and I cannot figure out some thing, its about this source http://pastebin.com/DbRZycZ1 what it asked was 'Why is there a float value used instead of an interger' for my logics it should be an interger
<burgestrand>
tsd_usa: ok?
Illiux [Illiux!~nol@mc2-wireless-pittnet-38-21.wireless.pitt.edu] has joined #ruby
Cypher [Cypher!~kapone@208.157.149.45] has joined #ruby
marvin_ [marvin_!~shikhai@pD9F4D38E.dip0.t-ipconnect.de] has joined #ruby
<burgestrand>
Companion: you mean average_passengers_per_car or carpool_capacity?
<Companion>
capacity
<Companion>
no
<Companion>
space_in_car
<Companion>
srry burgestrand meant space_in_car
<burgestrand>
Companion: do you know irb?
<Companion>
burgestrand, I know the basics
<Companion>
burgestrand, the reason I don't understand... Space in car can only be 4 persons in a cab (4 seats) so the driver value extracts 1 so 3 customers can get in a cab
dl3r [dl3r!~dl3r@gateway/tor-sasl/dl3r] has joined #ruby
<Companion>
burgestrand, so it should be 4 exact persons cause I never met a 50% human yet
<tomsthumb_>
burgestrand: ah, i didn't see that the array was getting .join(', ')'ed. that explains a lot
<dl3r>
how i recognize the datatype in ruby?
<tomsthumb_>
burgestrand: ty for the help
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<burgestrand>
tomsthumb_: rubber ducking I guess, yw :)
rvmeier [rvmeier!~rodrigo@200.28.88.127] has joined #ruby
<burgestrand>
Companion: *shrug* beats me, space_in_a_car is never used anywhere the float makes a difference
skrewler_ [skrewler_!~skrewler@209.213.206.58] has joined #ruby
<Hanmac>
dl3r: variable.class
<dl3r>
thx
<Companion>
burgestrand, you don't understand either? :<
<rippa>
it could make sense to use float for drivers or passengers
<rippa>
because if they are both integer result will be integer too
<burgestrand>
Companion: perhaps useful in another context?
<burgestrand>
rippa: not in this particular code sample, and integer division is useful (or, well, the humane thing to do) when dealing with people
mk03 [mk03!~mk03@61.245.119.34.er.eaccess.ne.jp] has joined #ruby
<rippa>
burgestrand: but when you deal with averages
<rippa>
it's not so useful to have integer number
dl3r [dl3r!~dl3r@gateway/tor-sasl/dl3r] has quit ["WeeChat 0.3.6"]
<rippa>
1 average passenger is a whole other deal than 1.4 passengers
sdwrage [sdwrage!~sdwrage@cpe-184-57-83-165.columbus.res.rr.com] has joined #ruby
<burgestrand>
rippa: even then, there’s always fdiv
<rippa>
yes
<burgestrand>
rippa: and in this particular code sample the float does not make a difference
<burgestrand>
rippa: and it could be pretty much one or the other D:
<Companion>
rippa, you're talking about fat people?
<rippa>
I was just thinking why something woud be float there at all
<Companion>
rippa, what I know from the past: 2 Interger can be made into a float cause ruby supports lazy programmers
<Companion>
lazy programming*
<Companion>
I think I had a beer too much *hic*
<burgestrand>
ruby supports both ;)
<Companion>
][_, ([]) ][_,
dasfugufish [dasfugufish!~Adium@174-27-233-214.slkc.qwest.net] has quit [#ruby]
<Companion>
atleast on day #1 on learning ruby I made a FaceBook auto poke script :')
<Companion>
People poke me and ruby pokes back :')
devdazed [devdazed!~devdazed@static-96-239-59-191.nycmny.fios.verizon.net] has joined #ruby
Nies [Nies!~Nies@43.Red-79-159-149.staticIP.rima-tde.net] has joined #ruby
tnk1 [tnk1!~tnk@ip72-195-134-180.ri.ri.cox.net] has joined #ruby
tnk1 [tnk1!~tnk@ip72-195-134-180.ri.ri.cox.net] has joined #ruby
yekta [yekta!~yekta@c-24-1-182-219.hsd1.il.comcast.net] has joined #ruby
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby
mztriz [mztriz!~mztriz@nkugateway.nku.edu] has joined #ruby
<davidcelis>
What's the proper way to include another library's module inside of a class you have nested inside your own module? I'm getting this error when I try to do it: https://gist.github.com/7cbc5c4e0c2c51643978
<davidcelis>
It seems like a namespacing issue, but I'm not sure.
<burgestrand>
davidcelis: you can use ::Resque to refer to the top-level constant
<davidcelis>
Aha, thank you.
<davidcelis>
I'll give that a shot
<sdferfx>
Can I get the pid of the currently running script from Ruby? I want to know the pid of the script as it executes
<burgestrand>
davidcelis: ruby should probably find it if it’s defined though
<burgestrand>
sdferfx: Process.pid
<davidcelis>
burgestrand: Yep, looks like it's undefined for some reason.
<sdferfx>
burgestrand, thanks
<davidcelis>
sdferfx: also $$
<davidcelis>
though Process.pid is cleaner
<sdferfx>
davidcelis, why is it cleaner?
kpshek [kpshek!~kpshek@159.140.254.97] has joined #ruby
<burgestrand>
not necessarily cleaner, just more cleanable
<davidcelis>
because looking at $$ is lame
<Hanmac>
and more readable
<burgestrand>
it’s more apparent what it does
<davidcelis>
and not immediately apaprent as to what it is
<davidcelis>
not everybody knows that $$ is a global variable that stores Ruby's PID, but Process.pid is pretty understandable
Locke23rus [Locke23rus!~quassel@128-70-13-209.broadband.corbina.ru] has joined #ruby
skrewler [skrewler!~skrewler@209.213.206.58] has joined #ruby
huntca [huntca!~huntca@173-164-163-89-SFBA.hfc.comcastbusiness.net] has joined #ruby
cbuxton1 [cbuxton1!~Adium@nat/partnerpedia/x-jjnpkfioydonlqfe] has joined #ruby
workmad3 [workmad3!~workmad3@84.45.226.85] has joined #ruby
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
nanderoo [nanderoo!~nanders@38.124.137.226] has quit [#ruby]
sean_ [sean_!~seanmccan@S010600179a35aaf7.ed.shawcable.net] has joined #ruby
tatsuya_o [tatsuya_o!~tatsuya_o@46-64-51-175.zone15.bethere.co.uk] has joined #ruby
headius [headius!~headius@71-37-230-236.mpls.qwest.net] has joined #ruby
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@38.123.129.115] has joined #ruby
carlyle [carlyle!~carlyle@rrcs-24-199-146-218.midsouth.biz.rr.com] has joined #ruby
jamw [jamw!~j@cpc11-orpi3-2-0-cust53.2-3.cable.virginmedia.com] has joined #ruby
mando [mando!~mando@99-39-117-82.lightspeed.austtx.sbcglobal.net] has joined #ruby
jose1 [jose1!~jose@bl20-130-56.dsl.telepac.pt] has joined #ruby
flak [flak!~rippa@87-253-29-179.pppoe.yaroslavl.ru] has joined #ruby
Seisatsu [Seisatsu!~seisatsu@adsl-99-25-119-58.dsl.pltn13.sbcglobal.net] has joined #ruby
mengu_ [mengu_!~mengu@78.191.116.66] has joined #ruby
mengu_ [mengu_!~mengu@unaffiliated/mengu] has joined #ruby
jankly [jankly!~jankly@c-71-57-99-219.hsd1.in.comcast.net] has joined #ruby
jankly [jankly!~jankly@c-71-57-99-219.hsd1.in.comcast.net] has joined #ruby
strife25 [strife25!strife25@nat/ibm/x-dcqcontkbqrvkvwq] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
bhaug [bhaug!~user@c-24-16-144-221.hsd1.wa.comcast.net] has joined #ruby
idarkside [idarkside!~YourNick@5e04aec4.bb.sky.com] has joined #ruby
mengu_ [mengu_!~mengu@78.191.116.66] has joined #ruby
mengu_ [mengu_!~mengu@unaffiliated/mengu] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
mrsolo [mrsolo!~mrsolo@64.125.181.73] has joined #ruby
adeponte [adeponte!~adeponte@67.110.253.162.ptr.us.xo.net] has joined #ruby
apeiros_ [apeiros_!~apeiros@77-58-113-31.dclient.hispeed.ch] has joined #ruby
jbpros [jbpros!~jbpros@137-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
scx [scx!~Administr@abub241.neoplus.adsl.tpnet.pl] has joined #ruby
paissad [paissad!~paissad@89-92-16-151.hfc.dyn.abo.bbox.fr] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@71.216.18.102] has joined #ruby
levity_island [levity_island!~lawrence@216.156.82.154.ptr.us.xo.net] has joined #ruby
idoru [idoru!idoru@freenode/utility-bot/ex-server/idoru] has joined #ruby
<levity_island>
can anyone recommend a book with examples of good encapsulation and separation of concerns, in Ruby?
remkar [remkar!~remkar@ip98-164-209-184.oc.oc.cox.net] has joined #ruby
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
<Companion>
burgestrand, found out why the float is there :)
<shevy>
does not seem to like { test 3 hjkgtehjkge jkhwejkhegw }
<burgestrand>
shevy: because 3 is not a method
<shevy>
ohhhhhh
<csherin>
burgestrand: nice!
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
fbea [fbea!~fbea@pool-108-21-11-51.nycmny.east.verizon.net] has joined #ruby
lewix [lewix!~lewix@bas1-toronto04-2925396554.dsl.bell.ca] has joined #ruby
lewix [lewix!~lewix@unaffiliated/lewix] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby
sean___ [sean___!~seanmccan@S010600179a35aaf7.ed.shawcable.net] has joined #ruby
Illiux [Illiux!~nol@mc2-wireless-pittnet-38-21.wireless.pitt.edu] has joined #ruby
Azure [Azure!~azt@unaffiliated/azure] has joined #ruby
ilyam_ [ilyam_!~ilyam@eng.nat.mtv.ooyala.com] has joined #ruby
blueadept [blueadept!~blueadept@pool-96-251-83-184.lsanca.dsl-w.verizon.net] has joined #ruby
blueadept [blueadept!~blueadept@unaffiliated/blueadept] has joined #ruby
wyhaines_ [wyhaines_!~wyhaines@65.39.118.15] has joined #ruby
savage-_ [savage-_!~savage-@istep.static.monkeybrains.net] has joined #ruby
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
Zanacross [Zanacross!~Serenity@adsl-77-86-124-70.karoo.KCOM.COM] has joined #ruby
lewix [lewix!~lewix@bas1-toronto04-2925396554.dsl.bell.ca] has joined #ruby
lewix [lewix!~lewix@unaffiliated/lewix] has joined #ruby
tommyvyo [tommyvyo!~tommyvyo@c-68-83-3-164.hsd1.nj.comcast.net] has joined #ruby
eywu [eywu!~Adium@97-93-99-217.static.mtpk.ca.charter.com] has joined #ruby
mikeric [mikeric!~mike@96.49.104.175] has joined #ruby
savage- [savage-!~savage-@istep.static.monkeybrains.net] has joined #ruby
wallerdev [wallerdev!~wallerdev@72.44.102.30] has joined #ruby
BSaboia [BSaboia!~brunosabo@187.58.91.127] has joined #ruby
wroathe [wroathe!~wroathe@75-146-189-233-Minnesota.hfc.comcastbusiness.net] has joined #ruby
statix [statix!~statix@rrcs-208-125-52-150.nys.biz.rr.com] has joined #ruby
cousine [cousine!~cousine@196.221.245.118] has joined #ruby
adeponte [adeponte!~adeponte@67.110.253.162.ptr.us.xo.net] has joined #ruby
max_ [max_!~max@c-71-204-121-215.hsd1.ga.comcast.net] has joined #ruby
Synthead [Synthead!~max@c-71-204-121-215.hsd1.ga.comcast.net] has joined #ruby
amerine [amerine!~mturner@67.204.184.82] has joined #ruby
jbpros [jbpros!~jbpros@137-178-112-217.dyn.adsl.belcenter.be] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
ph^ [ph^!~ph^@cm-84.212.225.74.getinternet.no] has joined #ruby
fayimora [fayimora!~fayimora@95.175.159.8] has joined #ruby
hasrb [hasrb!~hasrb@108-85-134-26.lightspeed.austtx.sbcglobal.net] has joined #ruby
<Seppman>
i have a method with one possible argument, like method(*p) if p is given the method, i want to convert it to a string and put it, else i want to do puts "no string given". How would i do that?
<Seppman>
i have problems with the check if p was provided or not
zulax [zulax!~radarwork@99-120-232-161.lightspeed.iplsin.sbcglobal.net] has joined #ruby
<Seppman>
it tried somethink like if p.to_s.empty? but that doesnt work as i was hoping for
fbea [fbea!~fbea@pool-108-21-11-51.nycmny.east.verizon.net] has joined #ruby
mpabst [mpabst!~mpabst@c-67-188-8-151.hsd1.ca.comcast.net] has joined #ruby
mikeric [mikeric!~mike@96.49.104.175] has joined #ruby
<apeiros_>
Seppman: with the definition def foo(*args), args is always an array, always consisting of the arguments given
<apeiros_>
so if no argument was given, the array will be empty.
<apeiros_>
therefore args.empty? means no argument was given.
<Seppman>
args is for command line arguments, isn't it?
<apeiros_>
Seppman: hu? no
<apeiros_>
args is a local variable
<Seppman>
ok, thanks :-)
<apeiros_>
you mean ARGV, which is a constant
<apeiros_>
lvars and constants are two quite different beasts.
nivoc [nivoc!~matthias@adsl-71-135-62-116.dsl.pltn13.pacbell.net] has joined #ruby
__main__ [__main__!~main@adsl-99-173-15-158.dsl.pltn13.sbcglobal.net] has joined #ruby
redwinter [redwinter!~mike@host-168-214-107-208.midco.net] has joined #ruby
JuniorSilva [JuniorSilva!~JuniorSil@app3.chatmosphere.org] has joined #ruby
<JuniorSilva>
Helllooooooo
cantbecool [cantbecool!~cantbecoo@c-68-37-164-255.hsd1.nj.comcast.net] has joined #ruby
cantbecool [cantbecool!~cantbecoo@c-68-37-164-255.hsd1.nj.comcast.net] has joined #ruby
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby
virunga [virunga!~virunga@151.64.58.123] has joined #ruby
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby
brngardner [brngardner!~brngardne@c-98-192-3-166.hsd1.ga.comcast.net] has joined #ruby
dwon [dwon!~dwon@75-119-251-37.dsl.teksavvy.com] has joined #ruby
tubgoat_ [tubgoat_!~tubgoat@gateway/tor-sasl/tugboat] has joined #ruby
drknus [drknus!~user@142.68.215.147] has joined #ruby
lewix [lewix!~lewix@bas1-toronto04-2925396554.dsl.bell.ca] has joined #ruby
lewix [lewix!~lewix@unaffiliated/lewix] has joined #ruby
thomasdebenning [thomasdebenning!~thomasdeb@c-69-181-139-137.hsd1.ca.comcast.net] has joined #ruby
<shadoi>
banisterfiend: edit-method Foo#foo works, but not for a class method? Is there a way to jump direct to class methods?
<banisterfiend>
shadoi: it shoudl work for class methods
<banisterfiend>
shadoi: edit-metohd Foo.foo
<banisterfiend>
edit-method*
<shadoi>
ah!
<shadoi>
I tried ::foo but not .
<banisterfiend>
hehe
<shadoi>
thank you!
<shadoi>
I fucking love this
<banisterfiend>
shadoi: only just discoverd it?
<banisterfiend>
i'vebeen spamming this channel for months :)
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
<shadoi>
nah I've been using Pry but the edit-method thing I didn't realize what it did.. I thought you had to be in scope, etc.
<banisterfiend>
oh ok
<banisterfiend>
it works in scope too
<banisterfiend>
so
<banisterfiend>
cd Foo
<banisterfiend>
edit-method foo
<banisterfiend>
works too
Keva161 [Keva161!~Keva161@78.32.156.143] has joined #ruby
<shadoi>
I assume you do some caller magic to get the file # line? I'll have to look at the code…
tectonic [tectonic!~tectonic@c-67-164-98-164.hsd1.ca.comcast.net] has joined #ruby
techhelp [techhelp!~Dan@ip70-162-10-229.ph.ph.cox.net] has joined #ruby
tsd_usa [tsd_usa!~daniel_d@NYUFGA-WLESSAUTHCLIENTS-01.NATPOOL.NYU.EDU] has quit [#ruby]
<banisterfiend>
shadoi: just Method#source_location
<shadoi>
oh wow, didn't know about that one, cool
<banisterfiend>
shadoi: btw you can always type: show-command edit-method
<banisterfiend>
to see the source code
<banisterfiend>
i hope you upgraded to 0.9.8 though
<banisterfiend>
code is much nicer there :)
<shadoi>
:)
sandstrom [sandstrom!~sandstrom@s213-103-207-56.cust.tele2.se] has joined #ruby
sandstrom [sandstrom!~sandstrom@unaffiliated/sandstrom] has joined #ruby
LiquidInsect [LiquidInsect!~billabney@50-0-135-178.dedicated.static.sonic.net] has joined #ruby
brngardner [brngardner!~brngardne@c-98-192-3-166.hsd1.ga.comcast.net] has joined #ruby
sbanwart [sbanwart!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@67.139.75.158] has joined #ruby
moshee [moshee!~moshee@c-50-135-229-127.hsd1.wa.comcast.net] has joined #ruby
moshee [moshee!~moshee@unaffiliated/moshee] has joined #ruby
<kreantos>
hi
<kreantos>
how would you store html documents you've crawled
<kreantos>
as files or in a db?
<tectonic>
i use text_attribute
<tectonic>
which i wrote for that purpose
<tectonic>
but if you're crawling a lot (more than a single HD's worth), use something else