Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
Natch| [Natch|!~natch@178.73.218.202] has joined #ruby-lang
lianj [lianj!~lianj@17.145.34.193.static.giga-dns.com] has joined #ruby-lang
lianj [lianj!~lianj@subtle/user/lianj] has joined #ruby-lang
ryanf [ryanf!~revfitz@50.0.160.40] has joined #ruby-lang
<zenspider> Harzilein: patches welcome
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<shevy> Harzilein, yeah the old problem of code vs. documentation... like the chicken egg problem. what comes first? usually the code, then the docu
perryh [perryh!~perryh@unaffiliated/perry753] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@cblmdm24-53-178-92.buckeyecom.net] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
<Harzilein> meh
<Harzilein> ronn does not allow block level elements inside the definition list's definitions
<Harzilein> they are allowed according to the html spec
<Harzilein> <dl><dt>foo</dt><dd><ul><li>foo</li></ul></dd></dl> leads to
<Harzilein> warn: unrecognized inline tag: "ul"
<injekt> Harzilein: open an issue?
<Harzilein> i guess
<injekt> ronn is ryans right?
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
<Harzilein> yes
<Harzilein> hmm
<injekt> Harzilein: ping him on twitter he's usually responsive
<josh9> i have a simple acceptance test (capybara+minitest) that should fail but it's passing... http://pastebin.com/NUEfYmq4 any clues?
WillMarshall [WillMarshall!~willmarsh@ppp121-44-64-47.lns20.syd6.internode.on.net] has joined #ruby-lang
<petercooper> there's a good reason for that..
<petercooper> an awesome tool in these situations is the save_page method
<petercooper> which will save a copy of what capybara actually sees
<burgestrand> save_and_open_page is also sweet :)
<petercooper> in short, though, the dev mode error page sinatra is spitting out includes your method's source in the backtrace
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<petercooper> it is, although the content isn't actually displayed on the page in this case
<Harzilein> hmm... it looks that at least when i fix the other problems with my markup i can make my case work by tightening the selector from "li" to ">li". the warning still appears but i get correct markup
<Harzilein> hmm
<Harzilein> or not
<Harzilein> html is fine, roff isn't
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.42] has joined #ruby-lang
<zenspider> josh9: you should probably test that you got a 200 first
<josh9> zenspider: good idea
<josh9> i get 500
<burgestrand> josh9: did you read petercoopers’ reply?
<josh9> no
<petercooper> I gave you the answer, lol
<burgestrand> josh9: do that, just a few lines up :)
<josh9> petercooper: sorry. i don't get notifications if my name is not there (:
<josh9> thanks. reading it now
<josh9> petercooper: burgestrand it is indeed awesome, but i am not going to manualy view the html page.. is the solution is having 2 assertions? assert_equal 200, page.status_code and assert has_content?("hello world")
<petercooper> Just to clarify, my entire point was that 'hello world' /is/ on the page so that's why it passed :-)
<josh9> petercooper: oh...
<petercooper> sinatra error pages in dev mode pump out a looooot of stuff :)
<petercooper> but in short, yes
<burgestrand> josh9: ^
<burgestrand> You make sure its’ successful, then you check the contents
<josh9> petercooper: maybe i can change the verbosity of those errors
<burgestrand> However, often all the assertions combined pretty much do that for me
<josh9> i guess i should have a single test just for 200, and the rest of the tests for more content
<josh9> there is an interesting method in capybara - has_text? that will only check for VISIBLE content. but from some reason i get: undefined method `has_text?
<burgestrand> I’m not sure how the assertions work with minitest, but often I do my assertions on *page*
<burgestrand> So, page.has_content?('h2', :text => 'Bluergh')
<burgestrand> josh9: ^
<burgestrand> Ah, neat, Capybara::DSL should actually contain all those.
<burgestrand> And that includes has_text?
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
<josh9> burgestrand: i'll try it. has_text? is part of capybara - https://github.com/jnicklas/capybara/blob/master/lib/capybara/node/matchers.rb#L210-#L219
<burgestrand> josh9: I know, and it should be a method in Capybara::DSL so it should not make a difference
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
<josh9> burgestrand: what version of capy are u using? has_content? accepts only 1 argument
burgestrand1 [burgestrand1!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby-lang
phaedrix [phaedrix!~phaedrix@c-24-22-86-235.hsd1.or.comcast.net] has joined #ruby-lang
sora_h [sora_h!~sora_h@mayfield.privs.net] has joined #ruby-lang
spuk [spuk!~spuk@189.101.217.200] has joined #ruby-lang
<andrewvos> hey anyone here use a vpn in the uk to watch netflix etc?
eggman2001 [eggman2001!~shig@user-387hpcb.cable.mindspring.com] has joined #ruby-lang
<eggman2001> if I have a catch block, is there a way I can do a throw without an exception being raised?
<andrewvos> eggman2001: Why?
<andrewvos> eggman2001: There would be no point in that.
<eggman2001> basically, if a certain condition is met, I want abandon the current iteration
<heftig> continue
<andrewvos> Yeah what he said
<jarib> uhm, next
<jarib> not continue
<postmodern> just to make sure im not doing some dumb here, i wrote a regexp to match IP octets, but it's not performing maximal munch, and only matching the '2'
<heftig> ah, right. next
<jarib> and throw/catch is unrelated to exceptions.
<eggman2001> i'm confused
<eggman2001> I thought you use throw/catch to rescue an exception
<heftig> no. catch catches throws. nothing else
<jarib> eggman2001: in ruby it's named raise and rescue - throw and catch is something else
<postmodern> and rescue captures raise()s
kryl99 [kryl99!fvalton@creep.bur.st] has joined #ruby-lang
<postmodern> throw/catch are like long-jumps in other languages
<heftig> eggman2001: reorder the expression
<eggman2001> right, I understand that rescue captures raises, but you might want to do a catch/throw if you rescue a raise right?
<heftig> a|b|c gets matched left-to-right
kryl99 [kryl99!fvalton@creep.bur.st] has joined #ruby-lang
<heftig> so a is tried first, then b is tried if it a doesn't match
<heftig> and you try [0-9] first
<Banistergalaxy> Heftig guten tag
<postmodern> heftig, ah ha!
<andrewvos> eggman2001: It's begin rescue end you're looking for
<postmodern> heftig, bingo thanks
<heftig> Banistergalaxy: hi
<Banistergalaxy> Heftig und.
<Kuukunen> postmodern: OCTET = /^([0-9]|[1-9][0-9]|1[0-9]{2}|25[0-5]|2[0-4][0-9])$/
<Kuukunen> or do you want to find the octet from inside the string?
<postmodern> Kuukunen, heftig pointed out my matches were reversed
<eggman2001> catch :invalid do; puts 'invalid'; end; throw :invalid
<postmodern> Kuukunen, so it was matching on the first one, [0-9], instead of trying the longest match first
<eggman2001> is that incorrect? I seem to be getting an error
<andrewvos> eggman2001: Umm I've never seen catch in ruby before. Where are you getting this shit from?
<Kuukunen> postmodern: because your expression will match stuff like the 2, 20 or 200 in "2000" no matter how you change the order :P
<heftig> eggman2001: you need to throw from inside the catch
* andrewvos googles
<eggman2001> i'm getting it from rails
<postmodern> Kuukunen, yeah thats another problem :), this is for extracting data not for matching whole strings
<andrewvos> TIL: The catch method in ruby
<heftig> catch(:invalid) { rand < 0.5 ? throw(:invalid, 2) : 1 }
<Kuukunen> postmodern: why don't you just extract all numbers and then check if they're between 0 and 255 :P
<Kuukunen> owell
<heftig> this will randomly return either 1 or 2
<postmodern> Kuukunen, this is used in an IPv4 regexp, basically to ignore stuff like 299.299.299.299
<eggman2001> heftig: ah okay, that was my mistake. thanks
<eggman2001> wasn't throwing from inside the catch
<andrewvos> TIL: I think catch in ruby is bullshit.
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby-lang
<heftig> postmodern: have you looked at ipaddr.rb in stdlib?
<postmodern> heftig, yep
<heftig> andrewvos: yeah. don't see much use for it either. lends itself to spaghetti code
<heftig> deep return etc
<ryanf> catch(:valid) { eval("BEGIN{throw :valid}\n#{str}") }
<ryanf> :)
<heftig> ryanf: is that humorous?
<ryanf> it's extremely useful
<ryanf> and I think it's funny that it relies on two of ruby's weirdest features
<ryanf> if it's not clear, that throws a syntax error if str isn't a valid ruby expression, or doesn't if it is
<ryanf> *raises
<heftig> ah, nice
<heftig> syntax only though
<ryanf> yeah
<ryanf> otherwise you'd have to actually evaluate it
<ryanf> this just does the parsing without executing the code
<jarib> still no use for catch/throw, you could just do: eval "BEGIN {return true}\n#{code}", nil, "", 0
<ryanf> hmm, fairly sure that wouldn't work. that's an interesting idea though
<ryanf> yeah no way
<jarib> try it
<ryanf> I don't think return from the top level of an evaled string is defined
<ryanf> I'll try though
<heftig> localjumperror, unexpected return
<ryanf> yeah
<jarib> well, wrap it in a method
<ryanf> then you're still trapped in the eval
<jarib> def valid_syntax?(code); eval "BEGIN {return true}\n#{code}", nil, "", 0; rescue SyntaxError; false; end
<ryanf> that will have the same problem
<ryanf> you can't return unless you're inside a method
<ryanf> which you aren't, within the eval string
<jarib> WFM
<ryanf> really? what version are you running?
<jarib> def foo; eval "return 1"; 2; end also works
<jarib> 1.9.2
<petercooper> just for fun.. alternatively: require 'ripper'; Ripper.sexp(your_code) # nil if unparsable
<heftig> def check code; eval "BEGIN {return true}\n#{code}"; rescue SyntaxError; false; end
<jarib> works fine on 1.8.7 as well
<heftig> this does work
<ryanf> yeah petercooper that has some problems
<ryanf> well
<petercooper> it's a bit flaky on incomplete ambiguous code, I find
<ryanf> it works as far as it goes
<ryanf> yeah, that's the issue
<ryanf> it doesn't really tell you what the error is
<ryanf> we switched to eval in pry because before you would get trapped any time you made an actual error
<ryanf> jarib: I see, that's cool.
singpolyma [singpolyma!~singpolym@69.171.154.34] has joined #ruby-lang
wimplash [wimplash!~Adium@wireless.sit-co.net] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
ryanf_ [ryanf_!~ryanf@198.sub-174-254-208.myvzw.com] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@FLA1Aam052.hrs.mesh.ad.jp] has joined #ruby-lang
voker57 [voker57!~voker57@128-70-103-103.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby-lang
cartercheng [cartercheng!~carterche@173-11-117-109-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
<cartercheng> what is the correct entry point for the benchmark scripts?
ryanf [ryanf!~ryanf@198.sub-174-254-208.myvzw.com] has joined #ruby-lang
jmontross [jmontross!~Adium@c-98-248-127-196.hsd1.ca.comcast.net] has joined #ruby-lang
Oloryn_lt1 [Oloryn_lt1!~Oloryn@strider-laptop.broker.freenet6.net] has joined #ruby-lang
x0F_ [x0F_!~x0F@unaffiliated/x0f] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.47] has joined #ruby-lang
jmontross [jmontross!~Adium@c-98-248-127-196.hsd1.ca.comcast.net] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby-lang
<andrewvos> cartercheng: Need context
<josh9> how to pass argument to a rake task in this format rake db:seed RACK_ENV=test ? i only managed to do this fromat rake db:seed['test'].
spuk [spuk!~spuk@189.101.217.200] has joined #ruby-lang
<andrewvos> josh9: You can put the RACK_ENV part before `rake`
<andrewvos> So, `RACK_ENV=test rake blah` for example
<andrewvos> josh9: But that's not an argument that's an environment variable
<andrewvos> josh9: Rake can rake params like this: `rake do_something[123]`
<andrewvos> josh9: But it sucks
<andrewvos> josh9: Search for rake parameters in your search engine.
<josh9> andrewvos: yeah, so how does rails let you pass the argement with space?
<josh9> andrewvos: oh, u can also change the environment vars if it's after the rake.
<josh9> rake db:seed RACK_ENV='test'
perryh [perryh!~perryh@unaffiliated/perry753] has joined #ruby-lang
srbaker [srbaker!~srbaker@70.28.245.120] has joined #ruby-lang
<cartercheng> well I am referring to the scripts in ruby/benchmark
ryanf [ryanf!~ryanf@198.sub-174-254-208.myvzw.com] has joined #ruby-lang
spuk [spuk!~spuk@189.101.217.200] has joined #ruby-lang
<andrewvos> josh9: maybe you could just `rake bla --something something` and and ARGV.unshift?
<josh9> andrewvos: i think i am happy with rake db:seed RACK_ENV='test'
<josh9> also, how to have multiple rake files? my Rakefile is getting too big
<josh9> is think i can simply have .rake files in some folders, and rake will automaticaly find them.
<josh9> i am not sure what folders they are.
<andrewvos> josh9: yeah
<andrewvos> josh9: I put my tasks seperated by their namespaces in tasks/namespace.rb
<andrewvos> So I might have a namespace :db and then tasks/db.rb
<josh9> perfect, but don't i need to tell rake where to find them?
<andrewvos> josh9: No, just require them yourself
<josh9> andrewvos: i thougt they sohuld be *.rake
<andrewvos> Dir.glob("tasks/*.rb").each {|t|require t}
<andrewvos> josh9: Meh. .rb is better cause code editors know the extension.
JosephRuby [JosephRuby!~joseph@46.33.39.221] has joined #ruby-lang
<josh9> andrewvos: nice
<yfeldblum> redcar knows the .rake extension
<andrewvos> yfeldblum: There is only vim.
plusk [plusk!~plusk@177.1.94.86] has joined #ruby-lang
<cartercheng> do the benchmark scripts function?
<cartercheng> i was wondering about driver.rb and run.rb
<cartercheng> not sure if anyone knows.
<josh9> andrewvos: i got 1 line in my Rakefile - Dir[File.dirname(__FILE__) + '/tasks/*.rb'].each {|file| require file }
<andrewvos> josh9: Sounds good.
dfr|mac [dfr|mac!~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #ruby-lang
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby-lang
<andrewvos> Ummm. Webmachine is cool as fuck http://rubyconf-webmachine.heroku.com/
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
<josh9> andrewvos: intersting. is there audio/video
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby-lang
<andrewvos> josh9: Not sure what you mean?
<josh9> andrewvos: it's a presentation, right
<josh9> ?
<andrewvos> josh9: Not sure.
<andrewvos> Ok I take it back. Webmachine is pretty cool, but some things about it kind of worry me.
<andrewvos> I mean it's a step forward.
<andrewvos> I think.
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby-lang
<yfeldblum> why?
<andrewvos> yfeldblum: Why what?
<andrewvos> Which part?
<yfeldblum> "it's [Webmachine is] a step forward" - why?
infid [infid!~infid@rrcs-24-43-240-138.west.biz.rr.com] has joined #ruby-lang
<andrewvos> Well because there's so little you have to code for firstly.
<andrewvos> It just seems to bring us back to the way http is meant to work.
<andrewvos> And I tend to like things that lock you in to working a specific way.
<andrewvos> If that way is better of course.
<andrewvos> I mean I've been working with an aPI recently that would return a 200 whenever you saved something to it. Regardless of whether there was an error or not.
<andrewvos> And you could just say the generic "bad programmers did that", but that doesn't fix my immediate problem.
phaedrix [phaedrix!~phaedrix@c-24-22-86-235.hsd1.or.comcast.net] has joined #ruby-lang
<andrewvos> yfeldblum: Good enough answer?
<yfeldblum> haha not even close ... how would webmachine help with the case of an API always responding with 200? and is that its only use case?
<andrewvos> yfeldblum: Well because I feel that if the developer was using webmachine they wouldn't forget to return a 500 on an errror, for example.
<andrewvos> No, of course that isn't it's only use case but I feel it is a great one.
cartercheng [cartercheng!~carterche@173-11-117-109-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
<yfeldblum> is that not true with other frameworks?
<andrewvos> Well, for the 500/200 case yes. Most frameworks at least.
<andrewvos> One that comes up a lot is when I request /posts/123 instead of a 404 I get a 500.
<yfeldblum> based on that presentation, if i were to describe webmachine and its use-cases, i would say: "it's an http-first framework that provides obvious hooks and guidance for building a correct http endpoint; there are a lot of other concerns (templates, assets, persistence, etc) that it doesn't cover at all"
<andrewvos> yfeldblum: Sure. I would of courseargue that maybe persistence shouldn't need to be part of your web framework.
<yfeldblum> not part of a web framework, sure, but certainly part of a full-stack application framework which exposes itself in multiple ways, including as an http endpoint
<yfeldblum> and by full-stack, i mean it includes unicorn in its gemfile and has a unicorn config in addition to a config.ru
<yfeldblum> andrewvos, the 404/500 deal is easily handled with rescue_with in rails, although i guess it's "advanced"
valeri_ufo [valeri_ufo!~valeri_uf@deadlink.in] has joined #ruby-lang
<andrewvos> yfeldblum: Honestly, I haven't done much rails so I couldn't comment.
<yfeldblum> although webmachine seems to make that distinction more obvious
<andrewvos> yfeldblum: Yeah, and that's what I love about it.
<andrewvos> yfeldblum: A developer that doesn't even know how http is meant to work would find herself returning the correct error codes.
<yfeldblum> on the whole, i would prefer it if the developer that doesn't know http were to learn http ...
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
<yfeldblum> having a framework that makes doing the right http thing easier is a bonus, but not a substitute
neoesque [neoesque!~neoesque@210.59.147.232] has joined #ruby-lang
<andrewvos> yfeldblum: Yeah I appreciate your stance.
<yfeldblum> the other frameworks do need to put more effort into guiding users toward understanding http and building correct http endpoints
<andrewvos> Normally there's the "hire better developers" and the "force developers to do the right thing camps". I think a bit of both is good.
<yfeldblum> i prefer having frameworks making doing the right thing (writing correct http endpoints) easier; but there's no way to force someone to do the right thing; someone who just doesn't get it will always find a hundred ways to screw it up
<andrewvos> Indeed.
<andrewvos> And that's what I see webmachine doing.
eggman2001 [eggman2001!~shig@user-387hpcb.cable.mindspring.com] has quit [#ruby-lang]
<andrewvos> I may take this back, but: humans shouldn't have to remember what http status codes are for.
ryanf [ryanf!~revfitz@adsl-71-141-89-169.dsl.snfc21.sbcglobal.net] has joined #ruby-lang
infid [infid!~infid@99-95-168-48.lightspeed.sndgca.sbcglobal.net] has joined #ruby-lang
xuser [xuser!~xuser@unaffiliated/xuser] has joined #ruby-lang
xuser [xuser!~xuser@unaffiliated/xuser] has quit [#ruby-lang]
mkscrg [mkscrg!~mkscrg@76-218-100-21.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
aBound [aBound!~levy@cpe-76-169-9-64.socal.res.rr.com] has joined #ruby-lang
jredville [jredville!~james@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
Indian_ [Indian_!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
naz [naz!~n@70.44.2.190.res-cmts.bus.ptd.net] has joined #ruby-lang
sush24 [sush24!~suhas@59.92.207.211] has joined #ruby-lang
<sush24> hi .... im very new to ruby.. I'm trying to understand a bit of code... what does "<<" do?
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
<rue> It's a method, so what it does depends on the object you're sending it to
<rue> It's usually an append operation (or, for numbers, a bit shift)
<savage-> it's also used to open up an object's singleton class
<sush24> hmm... append makes sense... its used in a loop...
<dr0id> ...
<rue> savage-: That's not entirely correct
<rue> class << obj is
<rue> Or class << is the ‘keyword’, one could say
<savage-> IO.foreach('/usr/share/dict/words').max_by(&:size).chomp # => formaldehydesulphoxylate
<savage-> :-0
<savage-> :-)
<sush24> thanks rue ... this is the first time I'm reading ruby and i still "get it"
<sush24> can you recommend a resource to a brief syntax description of ruby?
<rue> Dunno how brief is brief
<rue> corundum: quickref?
kyrylo [kyrylo!~kyrylo@46.118.222.153] has joined #ruby-lang
<savage-> sush24: I recommend reading: The Well Grounded Rubyist by David A. Black, then Eloquent Ruby by Russ Olsen, then Metaprogramming Ruby by Paolo Perrotta, and then use the Pickaxe book as a reference.
<sush24> rue: thanks... i could read it with a bit of googling i guess...
<sush24> savage-: thanks... I'll check them out.
me345 [me345!~me345@adsl-71-131-128-130.dsl.sntc01.pacbell.net] has joined #ruby-lang
thone [thone!~thone@g230186102.adsl.alicedsl.de] has joined #ruby-lang
ryanf_ [ryanf_!~revfitz@adsl-64-160-39-203.dsl.snfc21.pacbell.net] has joined #ruby-lang
<erikh> rue: what does underwear have to do with ruby
jredville [jredville!~james@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
shevy [shevy!~shevy@178-190-194-56.adsl.highway.telekom.at] has joined #ruby-lang
slaytanic [slaytanic!~slaytanic@host226.190-31-167.telecom.net.ar] has joined #ruby-lang
Heimidal [Heimidal!~heimidal@c-67-165-197-126.hsd1.co.comcast.net] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
shtirlic [shtirlic!~shtirlic@188.134.7.124] has joined #ruby-lang
rippa [rippa!~rippa@93-181-234-105.adsl.yaroslavl.ru] has joined #ruby-lang
cartercheng [cartercheng!~carterche@173-11-117-109-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
yxhuvud [yxhuvud!mongo@h-17-181.a149.priv.bahnhof.se] has joined #ruby-lang
Weems [Weems!~frodo@unaffiliated/weems] has joined #ruby-lang
demeth [demeth!~leto@c83-249-208-141.bredband.comhem.se] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.237.138] has joined #ruby-lang
Pip [Pip!~Pip@host-89-156-66-217.spbmts.ru] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
dRbiG [dRbiG!drbig@insomniac.pl] has joined #ruby-lang
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
<josh9> too bad comments are disabled. i don't understad why he didn't mention Sinatra
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
<jredville> josh9: nice link. thanks for the share
<josh9> jredville: you'r welcome. give sinatra a try for your next project and join #sinatra
<jredville> actually, i have a couple small projects, and you reminded me that i should strongly consider it. I've loved it in the past when i used it
cartercheng [cartercheng!~carterche@173-11-117-109-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
<josh9> jredville: it's great for any project size
<josh9> if u need help in organizing your code, ask there. it's really easy
<jredville> josh9: good point. thanks for the tip
<jredville> i tend to think of it in terms of single file projects :)
<josh9> jredville: i'll make it easy for you - clone this repo on your next project - https://github.com/oren/sinatra-template
<injekt> eh
<josh9> it uses the latest sinatra (came today) with test coverege for models, routes and acceptance (minitest+capybara)
<jredville> josh9: challenge accepted
Soleone [Soleone!~soleone@206-248-177-9.dsl.teksavvy.com] has joined #ruby-lang
<manveru> josh9: he didn't mention ramaze or innate either :)
<manveru> but his points are valid for all frameworks apart from wee maybe
<manveru> well, and webmachine
<manveru> gotta try that
<x0F> though the pseudo-quote seems totally unrelated to the post's content.
Jade [Jade!~jade@unaffiliated/jade] has joined #ruby-lang
<manveru> josh9: i know that already, or you think i didn't read the article?
<josh9> manveru: sorry, someone linked this earlier. i didn't know you read it
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
<manveru> related discussion
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
<josh9> thanks, i couldn't find it
<josh9> any idea how to fold ruby comments? i believe i should have :set foldmethod=marker and not what should be this: :set foldmarker=
<josh9> (in vim)
<manveru> :helpgrep ruby_fold
<manveru> you can use it like this
<manveru> au FileType ruby let ruby_fold=1
<manveru> in vimrc
<josh9> manveru: nice. is there a way to enable it after i opened a ruby file?
<injekt> that was it
<manveru> let ruby_fold=1
<manveru> and fold everything using zM
* injekt hates folding
<manveru> likewise
<josh9> manveru: i type this :let ruby_fold=1 zM but it's not doing anything
<manveru> :set foldmethod=syntax
<josh9> ok
<manveru> sorry, seems like the docs are wrong
<manveru> it says setting ruby_fold also sets the foldmethod
<josh9> as soon as i do the foldmethod command it collapses all my code. i want only the comments to be collapsed
<injekt> maybe you'll have to set fold markers?
<josh9> i would also want to only see +-- when i fold something. is there a way to get rid of the ------------------------------------
<injekt> that's pretty specific
<manveru> :h fold
<manveru> you can do all that, but that takes a bit of work :)
benanne [benanne!~rijdier@ip-213-49-105-132.dsl.scarlet.be] has joined #ruby-lang
<manveru> this one has an option to fold comments in any language
<manveru> but has dependencies :(
<josh9> interesting
tbuehlmann [tbuehlmann!Tobias@unaffiliated/tovias] has joined #ruby-lang
jimmyy111 [jimmyy111!jimmy@218.59.107.108] has joined #ruby-lang
jimmyy111 [jimmyy111!jimmy@112.238.26.196] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.121.154.149] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.121.154.149] has quit [#ruby-lang]
corecode [corecode!~2@0x2c.org] has quit [":wq"]
beiter [beiter!~beiter@manz-590f26bc.pool.mediaWays.net] has joined #ruby-lang
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby-lang
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
quatauta [quatauta!~quatauta@91-67-94-156-dynip.superkabel.de] has joined #ruby-lang
danishman [danishman!~kvirc@0x5da0ec2a.cpe.ge-0-1-0-1104.ronnqu1.customer.tele.dk] has joined #ruby-lang
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
quatauta [quatauta!~quatauta@91-67-94-156-dynip.superkabel.de] has joined #ruby-lang
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
gokulnath [gokulnath!~gokulnath@117.216.82.32] has joined #ruby-lang
tla [tla!~tla@toelboell-lund.dk] has joined #ruby-lang
gasbakid [gasbakid!~gasbakid@41.96.52.49] has joined #ruby-lang
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
singpolyma [singpolyma!~singpolym@69.171.154.34] has joined #ruby-lang
densebits [densebits!~densebits@fedora/densebits] has joined #ruby-lang
petercooper [petercooper!~petercoop@82.144.254.2] has joined #ruby-lang
mimay [mimay!~Adium@109.128.9.63] has joined #ruby-lang
<mimay> hello!
<mimay> anybody could help here? http://pastie.org/3101737
<mimay> can't figure out why the error when doing the class_eval :-(
cartercheng [cartercheng!~carterche@173-11-117-109-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
solars [solars!~solars@mk089144206030.a1.net] has joined #ruby-lang
<shevy> you are a brave man :)
<mimay> to me?
gianlucadv [gianlucadv!~gianlucad@host87-78-dynamic.50-79-r.retail.telecomitalia.it] has joined #ruby-lang
<shevy> yeah
<mimay> why? :-)
<shevy> class_eval is a sign of braveness
<mimay> hehe
<mimay> but need to get stylize method out of the String class. Don't like it if it stays there.
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
benanne [benanne!~rijdier@41.104-241-81.adsl-dyn.isp.belgacom.be] has joined #ruby-lang
<shevy> I think eval makes code often way too difficult to understand
<mimay> yes, sometimes you get totally loss. In this case the first example works fine. The second (with the stylize method outside the String class and a plain class_eval to find it), it works, but something weird with the returned value
jimmyy111 [jimmyy111!jimmy@112.238.26.196] has joined #ruby-lang
<mimay> nice!
<mimay> another approach to the same problem
<mimay> though I still depend on the extra module and method
<lianj> ? what do you want anw?
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
<mimay> I want to define the methods, and get rid of the stylize method. See 2nd example: http://pastie.org/3101737
<mimay> not that the String class depends on it
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
<shevy> very brave man
<shevy> hehe offering multiple solutions?
toretore [toretore!~toretore@ti0006a380-0261.bb.online.no] has joined #ruby-lang
<lianj> well, only the last ones 'gets rid' of his stylize method
<mimay> I like that one! neat!
<mimay> thanks for the help
<mimay> shevy: metaprogramming opens a world of *different* possibilities
<rue> No, it's the same possibilities.
<lianj> mimay: btw, try to figure out why class_eval "foo #{some_method_call} bar" wont work as you expect
<shevy> Metaprogramming gives me the heebie jeebies
<mimay> lianj: I'm really curious why that error
<rue> What would one expect that to do?
<yfeldblum> metaprogramming is fun
<mimay> lianj: it's the class String inthere. But cannot figure out why that, in case of the content of the string returned by the method
<mimay> oh, the self!
<mimay> lianj: I think it can't be done, because it has not value yet
cesario [cesario!u2444@gateway/web/irccloud.com/x-hwiokzuuomlkegzb] has joined #ruby-lang
<mimay> lianj: it will always depend on the function do it dynamically
<rue> OMG guys twitter is completely down
<rue> Wait, why am I rejoining? This should be a proxy…
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby-lang
<shevy> let's take down all the internet
Jake232 [Jake232!~textual@5e02187b.bb.sky.com] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-92-23-158-179.as13285.net] has joined #ruby-lang
jimmyy111 [jimmyy111!jimmy@112.238.26.196] has joined #ruby-lang
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
<rue> Japan hits 0:00 -> Twitter goes down! Scala doesn't scale.
<jarib> lol
<densebits> ironic
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
rolfb [rolfb!~rolfb@ti0168a340-0442.bb.online.no] has joined #ruby-lang
robgleeson [robgleeson!~rob@87-198-38-47.ptr.magnet.ie] has joined #ruby-lang
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
<zzak> happy new year!
<dr0id> happy
<shevy> new
qawsedrf [qawsedrf!~qawsedrf@95.211.62.203] has joined #ruby-lang
<qawsedrf> year
<robgleeson> !!
endymiion [endymiion!~endymiion@130.Red-88-10-239.dynamicIP.rima-tde.net] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@115.242.10.27] has joined #ruby-lang
<zzak> !
gasbakid [gasbakid!~gasbakid@41.96.2.240] has joined #ruby-lang
<jasox> rue, :D
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-132-26.aei.ca] has joined #ruby-lang
<shevy> do japanese celebrate new year at all?
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
<tbuehlmann> yes, oomisoka
<lianj> search api still works
<rue> Sure
<rue> Ha, status.twitter.com fails too
<shevy> oh already 1 hour ago they had new year's eve
<petercooper> engineer swap with tumblr
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
gasbakid__ [gasbakid__!~gasbakid@41.96.22.127] has joined #ruby-lang
fayimora [fayimora!~fayimora@95.175.159.4] has joined #ruby-lang
<shevy> THE WORLD IS COMING TO AN END!
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
Oloryn_lt1 [Oloryn_lt1!~Oloryn@strider-laptop.broker.freenet6.net] has joined #ruby-lang
<robgleeson> shevy: I think that's November :~)
RomyEatsDrupal [RomyEatsDrupal!~stickycak@cpe-74-64-122-182.nyc.res.rr.com] has joined #ruby-lang
gianlucadv [gianlucadv!~gianlucad@host175-49-dynamic.1-79-r.retail.telecomitalia.it] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0DBAE.dip0.t-ipconnect.de] has joined #ruby-lang
DEac- [DEac-!~deac@81.16.104.86] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby-lang
flip_digits [flip_digits!~textual@c-71-199-243-97.hsd1.fl.comcast.net] has joined #ruby-lang
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has quit [#ruby-lang]
cartercheng [cartercheng!~carterche@173-11-117-109-SFBA.hfc.comcastbusiness.net] has joined #ruby-lang
danishman2 [danishman2!~test@188.183.159.158] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
scampbell [scampbell!~scampbell@mail.scampbell.net] has joined #ruby-lang
steveklabnik [steveklabnik!~steveklab@184-221-241-197.pools.spcsdns.net] has joined #ruby-lang
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
danishman2 [danishman2!~test@188.183.159.158] has joined #ruby-lang
scampbell [scampbell!~scampbell@mail.scampbell.net] has joined #ruby-lang
jmontross [jmontross!~Adium@c-98-248-127-196.hsd1.ca.comcast.net] has joined #ruby-lang
gasbakid__ [gasbakid__!~gasbakid@41.96.122.121] has joined #ruby-lang
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
rolfb [rolfb!~rolfb@ti0168a340-0442.bb.online.no] has joined #ruby-lang
tenderlove [tenderlove!~tenderlov@pdpc/supporter/active/tenderlove] has joined #ruby-lang
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
jmontross [jmontross!~Adium@c-98-248-127-196.hsd1.ca.comcast.net] has joined #ruby-lang
mkscrg [mkscrg!~mkscrg@76-218-100-21.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
infid [infid!~infid@rrcs-24-43-240-138.west.biz.rr.com] has joined #ruby-lang
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
scampbell [scampbell!~scampbell@mail.scampbell.net] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
me345 [me345!~me345@adsl-71-131-128-130.dsl.sntc01.pacbell.net] has joined #ruby-lang
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
ahs3- [ahs3-!~ahs3-@adsl-065-005-193-158.sip.rdu.bellsouth.net] has joined #ruby-lang
Jake232 [Jake232!~textual@5e02187b.bb.sky.com] has joined #ruby-lang
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
malev [malev!~malev@host178.200-82-94.telecom.net.ar] has joined #ruby-lang
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
<andrewvos> What's going on here then?
<Phrogz> Same as ever?
<andrewvos> Yarp
yakkof [yakkof!~yakkof@ip68-6-125-21.sb.sd.cox.net] has joined #ruby-lang
mjejwa [mjejwa!~me345@adsl-71-131-128-130.dsl.sntc01.pacbell.net] has joined #ruby-lang
matled- [matled-!~matled@85.131.246.184] has joined #ruby-lang
jarib_ [jarib_!~jarib@109.74.192.179] has joined #ruby-lang
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
stderr-_ [stderr-_!~stderr@truedat.org] has joined #ruby-lang
Weems [Weems!~the@68-117-153-32.dhcp.unas.al.charter.com] has joined #ruby-lang
Weems [Weems!~the@unaffiliated/weems] has joined #ruby-lang
Foxmaster [Foxmaster!~root@c-83-219-199-232.cust.bredband2.com] has joined #ruby-lang
thone [thone!~thone@g230186102.adsl.alicedsl.de] has joined #ruby-lang
topaz [topaz!~twp@unchi.org] has joined #ruby-lang
erenrich [erenrich!erenrich@thalia.ugcs.caltech.edu] has joined #ruby-lang
babinho [babinho!~babinho@babinho.net] has joined #ruby-lang
Eising [Eising!~allan@0x52b41d06.static.bcbnet.dk] has joined #ruby-lang
dave_miles [dave_miles!~davemiles@gatej.thls.bbc.co.uk] has joined #ruby-lang
FiXato [FiXato!~FiXato@fixato.net] has joined #ruby-lang
kalleth [kalleth!~trussell@intranet.cishub.co.uk] has joined #ruby-lang
andrewvos [andrewvos!~andrewvos@ec2-50-17-160-197.compute-1.amazonaws.com] has joined #ruby-lang
ohsix [ohsix!ohsix@208.100.175.111] has joined #ruby-lang
tdmackey [tdmackey!~tdmackey@booleanhaiku.com] has joined #ruby-lang
znz_jp [znz_jp!~znz@ns5.n-z.jp] has joined #ruby-lang
havenn [havenn!~skipper@pool-71-189-193-36.lsanca.fios.verizon.net] has joined #ruby-lang
dnyy [dnyy!u2106@gateway/web/irccloud.com/x-yguknwsrjtejysso] has joined #ruby-lang
voker57_ [voker57_!~voker57@128-70-15-152.broadband.corbina.ru] has joined #ruby-lang
rindolf [rindolf!~shlomi@bzq-79-182-2-35.red.bezeqint.net] has joined #ruby-lang
slyphon [slyphon!~weechat@pool-96-224-232-158.nycmny.fios.verizon.net] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
ksinkar [ksinkar!~ksinkar@115.242.12.27] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
robgough [robgough!~robgough@li184-32.members.linode.com] has joined #ruby-lang
jredville [jredville!~james@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby-lang
<nekid> life is great
mndoci [mndoci!~mndoci@216.9.28.154] has joined #ruby-lang
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby-lang
<rue> Compared to what?
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
andrewhl [andrewhl!~andrew@69-165-152-207.dsl.teksavvy.com] has joined #ruby-lang
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
<nekid> milkdrop visualizer= hi tech spirituality
<nekid> im doing this now
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
ryanf [ryanf!~revfitz@adsl-67-122-210-207.dsl.pltn13.pacbell.net] has joined #ruby-lang
diegoviola [diegoviola!~Desarroll@host-1-211.b15.cvc.com.py] has joined #ruby-lang
Jake232 [Jake232!~textual@5e0e23d9.bb.sky.com] has joined #ruby-lang
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
gasbakid [gasbakid!~gasbakid@41.96.66.91] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
uniqanomaly__ [uniqanomaly__!~ua@dynamic-78-8-94-145.ssp.dialog.net.pl] has joined #ruby-lang
heftig [heftig!jan@archlinux/developer/heftig] has joined #ruby-lang
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby-lang
diegoviola [diegoviola!~viola@host-1-211.b15.cvc.com.py] has joined #ruby-lang
WillMarshall [WillMarshall!~willmarsh@ppp121-44-64-47.lns20.syd6.internode.on.net] has joined #ruby-lang
Dreamer3 [Dreamer3!~Dreamer3@74-134-34-116.dhcp.insightbb.com] has joined #ruby-lang
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby-lang
diegovio1a [diegovio1a!~viola@host-1-211.b15.cvc.com.py] has joined #ruby-lang
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
gentz [gentz!ilab@ancient.webfoundation.net] has joined #ruby-lang
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
diegoviola [diegoviola!~viola@host-1-211.b15.cvc.com.py] has joined #ruby-lang
mkscrg [mkscrg!~mkscrg@76-218-100-21.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
Soleone [Soleone!~soleone@206-248-177-9.dsl.teksavvy.com] has joined #ruby-lang
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
aaaa [aaaa!~aaaa@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby-lang
<Guest34077> hi
andrewhl [andrewhl!~andrew@69-165-152-207.dsl.teksavvy.com] has joined #ruby-lang
replore_ [replore_!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby-lang
<shevy> where is everyone
gasbakid [gasbakid!~gasbakid@41.96.66.91] has joined #ruby-lang
alois [alois!~alois@188.80.broadband5.iol.cz] has joined #ruby-lang
<queeway> Are there any methods to add comma delimiters to numbers? I know there are rails helpers for this, but are there any for Ruby?
gasbakid [gasbakid!~gasbakid@41.96.66.91] has joined #ruby-lang
<queeway> Thanks :-)
gasbakid [gasbakid!~gasbakid@41.96.66.91] has joined #ruby-lang
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
AsaA [AsaA!~AsaA@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby-lang
<AsaA> omg i am so frustrated right now. I can't seem to understand the difference between string and string literal!
<AsaA> can someone please help me
<AsaA> i need an example of a srting, and an example of a string literal
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
<AsaA> can someone tell me the difference between string and string literal? are they the same thing?
<AsaA> are the terms used interchangeably?
<shevy> AsaA what the fuck is a string literal
<shevy> AsaA just think in terms of string objects
<shevy> and forget string literals
<AsaA> This is what it says in the book im reading :"A string is a collection of textual characters. When a string is embedded directly into code, using quotation marks as earlier, the construction is called a string literal." but i dont get it
<shevy> I dont get that sentence either
<AsaA> strings include quotation marks right?
<shevy> what even does it mean embedded into code
<shevy> sure
<shevy> 'abc def ? I am still a string'
<AsaA> yea "whatever" is a string right?
<shevy> yeah
<AsaA> in the book it says whatever without the quoation marks is a string
<AsaA> thats why im confused
<shevy> perhaps it was a variable
<shevy> whatever = "whatever"
wpgreenway [wpgreenway!~wpgreenwa@c-98-193-194-48.hsd1.tn.comcast.net] has joined #ruby-lang
<AsaA> okay this is the book definition: String: A collection of characters such as Hello, world! or Ruby is cool.
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
<AsaA> how come there is no quotation marks
<shevy> I do not know
<shevy> but the world won't come to an end just because the book omitted them
robbyoconnor [robbyoconnor!~wakawaka@guifications/user/r0bby] has joined #ruby-lang
<AsaA> but there should be quotation marks right?
<shevy> yeah
<AsaA> but im still at a lost with string literals T_T
<AsaA> seems like people use the two terms interchangeably
<shevy> I dont know who is people
<shevy> first time I heard it in the ruby world
<AsaA> you serious???
<shevy> yes
<shevy> you can use ruby without knowing what is a string literal
<AsaA> yea i know. i just want to understand it completely
<shevy> Most modern programming languages use bracket delimiters (also balanced delimiters, or quoting) to specify string literals.
<shevy> "Hi There!"
<shevy> well
<shevy> I am going to lean out of the window now
<AsaA> ok
<shevy> String Literals are String Objects in Ruby
<shevy> the only difference I can see is that within "" ruby will do expansion
<shevy> x = 'hi'; y = "#{x}there" # => "hithere"
WillMarshall [WillMarshall!~willmarsh@ppp121-44-64-47.lns20.syd6.internode.on.net] has joined #ruby-lang
<AsaA> what are string objects? the text in between the quotation marks?
mkscrg [mkscrg!~mkscrg@76-218-100-21.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
<manveru> that's string syntax
<shevy> string objects are what ruby operates on for string. for instance this is a valid call on a string object "abc".+("hi") # => "abchi"
<shevy> but noone sane in mind types that
<manveru> you just did
* manveru hides
<shevy> I was copy pasting :(
<manveru> you wrote it before?
<shevy> ok ok
<shevy> I typed it
<manveru> hehe
<shevy> AsaA do you like "abc".+("hi")
<shevy> oh
<shevy> you can omit the ()
<manveru> and the .
<AsaA> I AM SO CONFUSED T_T
<shevy> "abc".+"hi"
<shevy> yeah
<AsaA> why not just "abc" + "hi"?
<shevy> yeah you can do that too
<manveru> because shevy tries to confuse everybody :)
<shevy> I am trying to convince AsaA that "abc" is an object
<shevy> I think he doubts me :(
<manveru> well, everything is an object in ruby
<AsaA> "abc" is a string though!
<AsaA> it's also an object?
<manveru> yeah, strings are objects too
<manveru> >> "abc".class.ancestors
<manveru> => [String, Comparable, Object, PP::ObjectMixin, Kernel, BasicObject]
<shevy> AsaA, in ruby things are objects really
<shevy> whoa
<shevy> firework time starting here...
<shevy> my cat rushed into cover
<manveru> :)
<AsaA> shevy you said string literals are string objects. if "abc" is a string, and also a string object, then "abc" is a string literal? Thus, string and string literal are used interchangeably? LOL I AM FRUSTRATED RIGHT NOW
<manveru> AsaA: well, it's a bit hard to explain without showing you how a ruby interpreter works
<shevy> AsaA, you are obsessed with string literals
<manveru> ruby basically sees "abc" and creates code that makes a string object with that content
<shevy> I think String literal may be a formal notation to define what is between those delimiters
<shevy> http://en.wikipedia.org/wiki/String_literal "Bracketed delimiters"
<Jake232> Why isn't this working
<Jake232> Won't find the god damn gem, being annoying me for ages
<shevy> not a lot of info that has Jake232
<manveru> Jake232: try em/synchrony
<manveru> for require
<shevy> hmm pulls in eventmachine for me when I install it
<shevy> [error]: ArgumentError: Invalid content for StatementList: nil:NilClass
<manveru> that's what em stands for
<shevy> and then it fails in an explosion of errors :)
<manveru> so it should be em-synchrony after all
<manveru> rage quit :(
<manveru> oh well, off to fireworks
<Jake232> Yea, em-syncrhony is the correct thing
uniqanomaly [uniqanomaly!~ua@dynamic-78-8-94-145.ssp.dialog.net.pl] has joined #ruby-lang
AsaA [AsaA!~AsaA@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby-lang
<AsaA> okay i concluded it doesnt even matter
<yorickpeterse> Happy 2012 fellow geeks!
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
RomyEatsDrupal [RomyEatsDrupal!~stickycak@64.202.138.67] has joined #ruby-lang
codelurker [codelurker!~codelurke@c-65-96-208-17.hsd1.ma.comcast.net] has joined #ruby-lang
replore [replore!~replore@ntkngw298122.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby-lang
<shevy> hmm
<shevy> say you have raw text
<shevy> and you want to display that on a webpage... naturally via <pre> works quite ok ... but that text is also a bit boring when using merely <pre> alone
<shevy> is there anything to "spice" up text automagically?
<Jake232> eventmachine must have some significant startup time. It takes me 35 seconds to startup and scrape 50 pages, and 24 to startup and scrape 8
ltd [ltd!~z@zx.io] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
jredville [jredville!~james@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby-lang