Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
iande [iande!~ieccles@dynamic-acs-24-144-204-51.zoominternet.net] has joined #ruby-lang
<josh9> injekt: it looks fine. but how do i require it in my code?
<josh9> require 'vcr' is vcr is not working anymore
<josh9> gem list is not showing it
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
<josh9> got some insight - http://gembundler.com/git.html
saLOUt [saLOUt!~rriemann@91-65-223-29-dynip.superkabel.de] has joined #ruby-lang
<shevy> the first part of a yaml file should be:
<shevy> ---\n
<shevy> ?
flip_digits [flip_digits!~textual@c-71-199-243-97.hsd1.fl.comcast.net] has joined #ruby-lang
<josh9> require 'bundler/setup' before require 'vcr' works. thanks!
<injekt> shevy: probably, but it's not a requirement
<injekt> ---\n separates documents
dejongge [dejongge!~jonke@pD9E0C76C.dip0.t-ipconnect.de] has joined #ruby-lang
<shevy> hmm ok injekt
<injekt> "YAML uses three dashes (“---”) to separate directives from document content. This also serves to signal the start of a document if no directives are present."
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby-lang
jthomas__ [jthomas__!~jthomas@c-98-222-28-137.hsd1.il.comcast.net] has joined #ruby-lang
<manveru> >> YAML.dump(1)
<manveru> => "--- 1\n...\n"
<shevy> hmm
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
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
<davidtspf01> Ok, very basic question here. I am calling a function, format_output(array_variable), a bunch of times. That function calls another function called csv_string. Sometimes array_variable is NIL, and I get this error: in `csv_string': undefined method `[]' for nil:NilClass (NoMethodError). How do I fix this? Relevant code is here: http://pastie.org/3109629 You'll see I tried to fix it with an if then, but it didn't help.
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
<any-key> davidtspf01: I don't see a variable named array_variable in there, but here's a little trick:
<any-key> if you do foo ||= 'bar' it sets foo to 'bar' ONLY if foo is nil (or false iirc)
<davidtspf01> any-key: Yeah the variable is actually company_info or fifth_person
<davidtspf01> any-key: If the array is nil, I don't want it to do anything.
<any-key> if array; # do stuff; end
looopy [looopy!~looopy@pool-141-156-49-128.washdc.btas.verizon.net] has joined #ruby-lang
<injekt> return unless company_info
<injekt> fail early
<injekt> then your method will simply return nil
<davidtspf01> any-key: like this?: http://pastie.org/3109641
<davidtspf01> injekt: i'm a total noob. how would i use your method. werite "return unless company_info" at the top of the method?
<injekt> davidtspf01: yeah, the current pastie wont work
<injekt> title isn't defined if company_info is nil
<manveru> it will work
<manveru> just writing [nil]
<injekt> title will be nil
<injekt> was what i meant
<manveru> :)
* injekt peers at manveru
<manveru> it just won't work as intended
<manveru> oh, wow, so csv even fails on that
<manveru> who'd have thunk
<davidtspf01> thanks
<davidtspf01> went with this: http://pastie.org/3109653
<injekt> to each his own
<manveru> that's quite defensive code
<injekt> *shrug*
<manveru> CSV.generate_line(*[:title, :name, :phone, :fax, :email].map{|key| company_info.fetch(key) })
<injekt> heh
<manveru> having csv_string as a method without ever referring to self is another smell :)
<injekt> :)
jessemc [jessemc!~jessemc@S0106602ad0702c43.ed.shawcable.net] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
toretore [toretore!~toretore@ti0006a380-0261.bb.online.no] has joined #ruby-lang
perryh [perryh!~perryh@unaffiliated/perry753] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby-lang
neoesque [neoesque!~neoesque@210.59.147.232] has joined #ruby-lang
<andrewvos> Why do people #tag #everything in #their #tweets
<shevy> andrewvos not sure about tweets
<shevy> in my yaml files for compiling programs, I group them though... vim entry has tag: editor for instance
<shevy> perhaps they just like to have people click on things :)
<andrewvos> Yea
igotnolegs [igotnolegs!~igotnoleg@75-162-83-166.slkc.qwest.net] has joined #ruby-lang
towski [towski!~towski@24.130.32.219] has joined #ruby-lang
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
jessemc [jessemc!~jessemc@S0106602ad0702c43.ed.shawcable.net] has joined #ruby-lang
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.47] has joined #ruby-lang
Weems [Weems!Weems@68-117-153-32.dhcp.unas.al.charter.com] has joined #ruby-lang
Weems [Weems!Weems@unaffiliated/weems] has joined #ruby-lang
codefriar [codefriar!~codefriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby-lang
fayimora [fayimora!~fayimora@95.175.159.21] has joined #ruby-lang
Weems [Weems!Weems@68-117-153-32.dhcp.unas.al.charter.com] has joined #ruby-lang
Weems [Weems!Weems@unaffiliated/weems] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
QaDeS [QaDeS!~mklaus@frbg-5d84f8c6.pool.mediaWays.net] has joined #ruby-lang
jessemc [jessemc!~jessemc@S0106602ad0702c43.ed.shawcable.net] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-49-128.washdc.btas.verizon.net] has joined #ruby-lang
<chris2> anyone know a thing about continuations in 1.9?
<zenspider> chris2: what's up?
<chris2> they are implemented with fibers?
<zenspider> I believe that is so
<chris2> does that make them more efficient than in 1.8?
<zenspider> I have not confirmed tho
<chris2> or are they still expensive
<chris2> and leak memory :P
<zenspider> I believe they're still expensive. I thought the push towards fibers was just to clean up the impl
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
<chris2> ok
<chris2> but a fiber needs less ram than a thread?
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
<chris2> or are fibers just as expensive as green threads used to be?
<zenspider> I've not paid that much attention to the impl. my head blurs at the mention of fibers
<chris2> i have no experience with 1.9 really
<chris2> threads are native threads now, no?
<zenspider> afaik, they should have a cheaper base cost, but just as much overhead expense wrt the acutal closure
<chris2> the closure is ok
<chris2> but iirc ruby 1.8 threads copied the c stack
<chris2> otoh a pthread-based impl would do that too
looopy [looopy!~looopy@pool-141-156-49-128.washdc.btas.verizon.net] has joined #ruby-lang
<zenspider> yeah
<chris2> but i think it uses a n:m threading scheme now
plusk__ [plusk__!~plusk@201-67-16-96.gnace703.dsl.brasiltelecom.net.br] has joined #ruby-lang
<chris2> gah, gonna benchmark it
nykc [nykc!~nykc@99-40-62-66.lightspeed.clmboh.sbcglobal.net] has joined #ruby-lang
RenatoSilva [RenatoSilva!~nouser@186.205.140.94] has joined #ruby-lang
topaz [topaz!~twp@wikipedia/twp] has joined #ruby-lang
RenatoSilva [RenatoSilva!~nouser@186.205.140.94] has quit [#ruby-lang]
<chris2> fibers are fucking much faster
Rakko [Rakko!~rakko@96-42-31-132.dhcp.mdsn.wi.charter.com] has joined #ruby-lang
perryh_ [perryh_!~perryh@76-230-52-253.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
perryh_ [perryh_!~perryh@unaffiliated/perry753] has joined #ruby-lang
new_ruby_program [new_ruby_program!~new_ruby_@pool-173-58-89-188.lsanca.fios.verizon.net] has joined #ruby-lang
ryanf [ryanf!~revfitz@adsl-67-122-210-207.dsl.snfc21.pacbell.net] 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
mndoci [mndoci!~mndoci@216.9.28.154] has joined #ruby-lang
nykc [nykc!~nykc@99-40-62-66.lightspeed.clmboh.sbcglobal.net] has quit ["Leaving"]
codefriar [codefriar!~codefriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby-lang
<andrewvos> hah
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
jessemc [jessemc!~jessemc@S010678cd8e6f175f.ed.shawcable.net] has joined #ruby-lang
Oloryn_lt1 [Oloryn_lt1!~Oloryn@strider-laptop.broker.freenet6.net] has joined #ruby-lang
codefriar [codefriar!~codefriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
mndoci [mndoci!~mndoci@216.9.28.154] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
|kjs3| [|kjs3|!~kjs3@c-24-99-80-255.hsd1.ga.comcast.net] has joined #ruby-lang
x0F__ [x0F__!~x0F@unaffiliated/x0f] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
tomzx [tomzx!~tomzx@dsl-216-221-39-59.aei.ca] has joined #ruby-lang
dr0id [dr0id!~andy@unaffiliated/dr0id] has joined #ruby-lang
mkscrg [mkscrg!~mkscrg@76-218-100-21.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
davidtspf01 [davidtspf01!~leaping@cpe-76-170-28-102.socal.res.rr.com] has joined #ruby-lang
brianpWins [brianpWins!~brianpWin@hlfxns0169w-142068026252.dhcp-dynamic.FibreOp.ns.bellaliant.net] has joined #ruby-lang
<davidtspf01> Any Nokogiri people around?
<andrewvos> davidtspf01: Yeah
<davidtspf01> andrewvos: I'm a total Ruby noob, but have somehow cobbled together a script to parse 2 html files, relying on regex. I have a 3rd file that regex won't work for, so I'm thinking I should try Nokogiri. But I can't figure out how to do even the most basic things. HTML file I'm trying to parse is here, with the pieces I'd like to parse out marked with headings: http://pastie.org/3110343 Can you help me figure out, for example, how
<davidtspf01> would use Nokogiri to grab each record under the "Grab each of these" headings (there are 2)?
plusk [plusk!~plusk@201-67-52-152.gnace703.dsl.brasiltelecom.net.br] has joined #ruby-lang
<andrewvos> davidtspf01: When you do an xpath match it generally returns a list of items.
<andrewvos> davidtspf01: So use xpath to find those elements
<davidtspf01> andrewvos: How would I form an xpath match to get, for example, "Digital Mgr" and "Tiffany Yang"
<andrewvos> davidtspf01: Then do what you want with them
<andrewvos> davidtspf01: Rather use css matching... It' a bit nicer
<andrewvos> like xml.css("table.tr.td").first.text => "Digital Mgr"
<andrewvos> I'm not sure how the api looks but it's something like that
jessemc_ [jessemc_!~jessemc@S010678cd8e6f175f.ed.shawcable.net] has joined #ruby-lang
<davidtspf01> andrewvos: what if there are two tables structured exactly the same way, and i want to grab info from both of them?
<andrewvos> davidtspf01: Well then you've got a problem.
<andrewvos> davidtspf01: You need a way to differentiate between the two
<andrewvos> davidtspf01: Perhaps there is a clss name on the table?
<andrewvos> davidtspf01: Or an ID?
<davidtspf01> andrewvos: nope
<andrewvos> davidtspf01: Well then use the table index :(
<davidtspf01> the tables are here: http://pastie.org/3110343
<davidtspf01> andrewvos: what is the table index?
gokulnath [gokulnath!~gokulnath@115.111.177.122] has joined #ruby-lang
<andrewvos> davidtspf01: The number of the table
<davidtspf01> andrewvos: the table has a number?
<andrewvos> davidtspf01: Like the first, second or third.
<andrewvos> davidtspf01: No just the natural order.
<davidtspf01> andrewvos: oh -- how do i tell css matching to use the second table?
JosephRuby [JosephRuby!~joseph@46.33.39.197] has joined #ruby-lang
<andrewvos> davidtspf01: Don't. Just find all tables and then get a specific index... xml.css("table")[0] would get the first table
<davidtspf01> andrewvos: Where can I find this info to learn it myself? e.g., where would I look to figure out this table numbering business?
<andrewvos> davidtspf01: Well, the table numbering is just literally the order that the tables appear in the html.
<andrewvos> davidtspf01: This is good though http://nokogiri.org/tutorials/searching_a_xml_html_document.html
<andrewvos> davidtspf01: And if you have questions feel free to ask in here. There's normally someone aroudn.
<davidtspf01> andrewvos: Thanks Andrew. I'm going to start working on this now. I'm sure I'll be back.
looopy [looopy!~looopy@pool-141-156-49-128.washdc.btas.verizon.net] has joined #ruby-lang
<andrewvos> No problem dude
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
jessemc [jessemc!~jessemc@S010678cd8e6f175f.ed.shawcable.net] has joined #ruby-lang
Marco [Marco!~marco@pat32.dartmouth-secure.border1-cfw.Dartmouth.EDU] has joined #ruby-lang
<josh9> i notice it's possible to include a module so the class inside this module will be accesable withouth :: does ruby know not to mix-in the module in this case?
<josh9> or it's mixed-in anyway
<Rakko> including == mixing in
jredville [jredville!~jredville@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
<josh9> Rakko: ok. whenever i included a module in the past, it was to get some methods from the included module. this time i don't care about any methods. i just don't want to type ::
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
<davidtspf01> andrewvos: Just got an error trying to do the css query you suggested: xml.css("table.tr.td").first.text. Error is "undefined method `first' for nil:NilClass (NoMethodError)" Code is here: http://pastie.org/3110421. Any ideas?
<davidtspf01> andrewvos: Actually, I did it like this: title1 = @doc.css("table.tr.td")[0].first.text
<Rakko> josh9: oh, so you're including into the toplevel now?
<Rakko> josh9: the reason you don't have to type :: is that it's importing all the methods and constants (including classes) from the module. If you `include` outside of any class, you're really mixing it into Object.
<andrewvos> davidtspf01: That means it didn't find a "table.tr.td" element
<andrewvos> davidtspf01: Should be "table tr td"
<andrewvos> davidtspf01: My bad :)
<davidtspf01> andrewvos: Hmm, now getting this error: nokogiri.rb:10:in `<main>': undefined method `text' for ["class", "digalign"]:Array (NoMethodError)
<andrewvos> davidtspf01: What's the offending line of code?
<davidtspf01> andrewvos; title1 = @doc.css("table tr td")[0].first.text
<davidtspf01> andrewvos: title1 = @doc.css("table tr td")[0].first.text
<andrewvos> davidtspf01: Hmmm. Perhaps #text is not a method.
<andrewvos> davidtspf01: Maybe .value?
<davidtspf01> andrewvos: nokogiri.rb:10:in `<main>': undefined method `value' for ["class", "digalign"]:Array (NoMethodError)
<andrewvos> davidtspf01: It shouldn't be [0].first
<andrewvos> davidtspf01: Either [0] or .first
<andrewvos> davidtspf01: Both do the same
<josh9> Rakko: i include it into top level. i guess i should move the include into the class, right?
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
<josh9> Rakko: actually in my case there is no class. it's my describe block
<Rakko> josh9: I think that would depend on factors I'm not really sure of
<davidtspf01> andrewvos: Ah, nice. Now I'm getting "Title:" returned. But I actually want "Digital Mgr" returned, from this html file: http://pastie.org/3110448
<davidtspf01> andrewvos: How do I tell it to go to the next tr?
<davidtspf01> andrewvos: Or the next td in the next tr, "Tiffany Yang"?
<andrewvos> doc.css("table").first.css("tr")[1].css("td").first
<andrewvos> davidtspf01: The [1] means the second item because in most programming languages indexes are zero-based. So the first item is 0, the second is 1 etc.
<davidtspf01> nice!
<andrewvos> davidtspf01: I would recommend breaking it out into variables for example: employees = doc.css("table").first
<davidtspf01> andrewvos: This is awesome. Much easier than using regular expressions. Still puzzled about how I can figure this stuff out myself. Been poking around the Nokogiri site, but it's impenetrable.
<andrewvos> davidtspf01: Hah it can be a bit tricky at first. It's probably the best library out there though.
<davidtspf01> andrewvos: And then title = employees.css("tr")[1].css("td)[1]?
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
<andrewvos> davidtspf01: Almos
<andrewvos> t
<andrewvos> title = employees.css("tr")[1].css("td)[0]
robertcarter [robertcarter!~robertcar@adsl-99-135-3-110.dsl.pltn13.sbcglobal.net] has joined #ruby-lang
<davidtspf01> andrewvos: ah, right
Weems [Weems!Weems@68-117-153-32.dhcp.unas.al.charter.com] has joined #ruby-lang
Weems [Weems!Weems@unaffiliated/weems] has joined #ruby-lang
Marco [Marco!~marco@pat32.dartmouth-secure.border1-cfw.Dartmouth.EDU] has joined #ruby-lang
srbaker [srbaker!~srbaker@184.66.82.213] has joined #ruby-lang
robertcarter [robertcarter!~robertcar@adsl-99-135-3-110.dsl.pltn13.sbcglobal.net] has joined #ruby-lang
<davidtspf01> andrewvos: Only thing that's not too cool about this is that it's printing the html tags. So email = @doc.css("table")[11].css("tr")[1].css("td")[3]
<davidtspf01> puts(email) gives me <td><a href="mailto:tiffany.yang@mecglobal.com">tiffany.yang@mecglobal.com</a></td>
<davidtspf01> andrewvos: Anyway to get rid of those tags?
curtism [curtism!~curtis@bas11-montreal02-1128531121.dsl.bell.ca] has joined #ruby-lang
jredville [jredville!~jredville@c-66-235-23-17.sea.wa.customer.broadstripe.net] has joined #ruby-lang
yxhuvud [yxhuvud!mongo@h-17-181.a149.priv.bahnhof.se] has joined #ruby-lang
naz [naz!~n@70.44.2.190.res-cmts.bus.ptd.net] has joined #ruby-lang
guns [guns!~guns@c-98-228-72-208.hsd1.il.comcast.net] has joined #ruby-lang
punknology [punknology!~textual@190.74.83.254] has joined #ruby-lang
<davidtspf01> Any nokogiri users around?
<dFire> can you read text into an array with the <<-END_MARKER method?
looopy [looopy!~looopy@pool-141-156-49-128.washdc.btas.verizon.net] has joined #ruby-lang
<zenspider> dFire: that's not a method. that's syntax for a "heredoc"-delimited string.
<zenspider> so you can do anything with it you can do with a regular string
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
<ramonmaruko> is there a shorter way of calling a method with arguments to all elements in a enumerable
<ramonmaruko> ?
<dFire> I don't meant method as in function call, I mean method as in way of doing something.
<dFire> But all the same
<andrewvos> davidtspf01: Put .value or .text on the end of that line of code.
<davidtspf01> andrewvos: thanks, figured out i could do ".inner_text"
<andrewvos> davidtspf01: You were outputting the object returned, and ruby will wall "to string" on the object to try represent it as text. That was the text representation of that object.
<andrewvos> wall=cal
<andrewvos> wall=call
<davidtspf01> andrewvos: I'm not sure I understand wha tyou mean when you will ruby will call "to string" on the object.
<davidtspf01> andrewvow: Does that mean I shouldn't use ".inner_text"?
<andrewvos> davidtspf01: When you call puts(object) ruby will output the object if it's a string. If it's not a string it will call object.to_s and then output that result.
<andrewvos> davidtspf01: So an object could have it's own representation of itself as a string.
<andrewvos> davidtspf01: Got it?
<davidtspf01> andrewvos: Got it.
<andrewvos> :)
nekid [nekid!~nekid@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby-lang
<davidtspf01> andrewvos: Here's another stumper. I am working with an HTML file with a bunch of tables, as you know. I want to pull info from each of those tables, which are all structured the same way. The catch is that the tables often have a different number of rows. So when the table has fewer rows than I expect in my loop, I get this error: "23:in `block (3 levels) in trip': undefined method `css' for nil:NilClass (NoMethodError)"
<davidtspf01> andrewvos: Here is my code: http://pastie.org/3110777
nibbo [nibbo!nibbo@gateway/shell/blinkenshell.org/x-zhdogjmanrhchphq] has joined #ruby-lang
<davidtspf01> andrewvos: The question is, how do I handle the processing of a table when I don't know how many rows it has?
<andrewvos> davidtspf01: How could you tell which value is which in this case then?
<davidtspf01> andrewvos: I tried to handle this with the "if" statement, but it's not working.
<davidtspf01> andrewvos; What do you mean?
<davidtspf01> andrewvos: What do you mean?
<andrewvos> davidtspf01: Well, if some rows are missing then how do you know which ones are mising?
<davidtspf01> andrewvos: Yes, that's the question.
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
<davidtspf01> andrewvos: I basically want to stop the loop when there are no more rows in the table.
<davidtspf01> andrewvos: And move on to the next table... IF there is another table.
<andrewvos> davidtspf01: You can loop trhough matches. Like: doc.css("table").each do |table|; end;
<andrewvos> davidtspf01: In that case the table variable will be the matched table.
<davidtspf01> Hmm, but there are many tables in the file I don't want to touch.
<davidtspf01> andrewvos: I always want to process table 10, for example, but never table 11.
<andrewvos> davidtspf01: My point is you can do that with rows or tbles or whatevre.
<davidtspf01> andrewvos: How do I process only certain tables using that method?
<andrewvos> davidtspf01: You don't it was just an example.
<davidtspf01> andrewvos: Oh, ok. Any idea how I can address this issue?
<andrewvos> Waht is the issue exactly?
<andrewvos> davidtspf01: Sorry I'm not trying to be an asshole, I'm watching Breaking Bad and finding it hard to concentrate on this too :) So if you have simple questions I can help...
<davidtspf01> andrewvos: Let's say there are 2 tables in my HTML file that I want to extract from. (no worries -- great show) Each table is structured the same way, but table 1 has 3 rows and table 2 has only 1 row. How do I write the loop so I'm not processing a nil row and getting an error?
<andrewvos> davidtspf01: Just loop through the rows and assign the values to the object one by one.
<andrewvos> davidtspf01: If the rows don't exist, don't set the value.
<andrewvos> davidtspf01: Maybe like this:
<davidtspf01> andrewvos: But how do I know how many times to loop?
<andrewvos> davidtspf01: [:title, :name].each do |row_name|
<andrewvos> Or something like that
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
<davidtspf01> andrewvos: Hmm, I'm confused. How does that loop identify the :title and :name in the file? How does it know how many times to loop? Here is the code I have now: http://pastie.org/3110777
<andrewvos> davidtspf01: Try this: https://gist.github.com/1549681
<andrewvos> davidtspf01: I think |index, element| should be |element, index|
<davidtspf01> andrewvos: Awesome, trying it.
<davidtspf01> andrewvos: Argh, same error: "23:in `block (3 levels) in trip': undefined method `css' for nil:NilClass (NoMethodError)"
<davidtspf01> andrewvos: The first loop went fine because there are 3 rows in the first table. But it gets caught on the second time around because there is only 1 row in the second table.
<andrewvos> Shit... Weird
<davidtspf01> andrewvos: And the loop starts, "1.upto(3)"
<andrewvos> davidtspf01: What is inner_count?
<davidtspf01> andrewvos: It just keeps track of what <tr> we're on.
<davidtspf01> andrewvos: For example, the first table has 3 rows. So each loop increase inner_count, and takes us to the next <tr>
thone_ [thone_!~thone@e177081213.adsl.alicedsl.de] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
<ryanf> this is why you don't want to hardcode the numbers
<ryanf> try @doc.css("table")[y+5].css("tr").each do |row|
<ryanf> etc
<ryanf> basically the idea is you want to take a collection of elements and say "do the following to each one of these"
<ryanf> instead of using indexes
krz [krz!~foobar@unaffiliated/krz] has joined #ruby-lang
<davidtspf01> ryanf: what gets put into "row" in your code?
<andrewvos> Each tr
xjiujiu [xjiujiu!~quassel@218.77.14.195] has joined #ruby-lang
<davidtspf01> That's throwing a similar error. Code here: http://pastie.org/3110891
<davidtspf01> Works fine for the first table. Then when it gets to the second table: scrape_otheragency_page.rb:25:in `block (3 levels) in trip': undefined method `css' for nil:NilClass (NoMethodError)
<nekid> how do i generate a list A1, A2, ..
<nekid> (1.10).to_a
<nekid> (1..10).to_a
<andrewvos> nekid: (1..10).map {|i| "A#{i}"}
<nekid> i want to make a vertical list that i can paste into a msoft work table
<davidtspf01> Actually, it's dying before it ever gets to the second table.
<andrewvos> davidtspf01: What line in that pastie?
<davidtspf01> andrewvos: 15
<andrewvos> davidtspf01: Hmmm
<andrewvos> Thinking you need to learn a bit of ruby
<davidtspf01> Uhhh, yeah.
Weems [Weems!Weems@68-117-153-32.dhcp.unas.al.charter.com] has joined #ruby-lang
Weems [Weems!Weems@unaffiliated/weems] has joined #ruby-lang
<davidtspf01> andrewvos: Thanks for your help. Guess I'll call it a night.
<andrewvos> davidtspf01: Pleasure. Me too.
<nekid> "%06d" % 1; how to I apply this to a range, 1..9
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has joined #ruby-lang
solars [solars!~solars@clnet-kmu02-090.ikbnet.co.at] has joined #ruby-lang
petercooper [petercooper!~petercoop@82.144.254.2] has joined #ruby-lang
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has joined #ruby-lang
roadkith [roadkith!~kith@217.5.145.2] has joined #ruby-lang
roadkith [roadkith!~kith@unaffiliated/kith] has joined #ruby-lang
shevy [shevy!~shevy@213-33-13-171.adsl.highway.telekom.at] has joined #ruby-lang
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
yango [yango!~yango@85.48.193.157] has joined #ruby-lang
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
bintut [bintut!~bintut@cm61.sigma15.maxonline.com.sg] has joined #ruby-lang
<yorickpeterse> Morning
<Rakko> hi
amerine [amerine!~mturner@bc171197.bendcable.com] has joined #ruby-lang
lele|w [lele|w!~Lele@2a01:2d8:0:cafe:218:f3ff:fece:a48] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.178.197.11] has joined #ruby-lang
savage- [savage-!~savage-@c-67-180-11-89.hsd1.ca.comcast.net] has joined #ruby-lang
kyrylo [kyrylo!~kyrylo@46.118.237.222] has joined #ruby-lang
jordan` [jordan`!~gromit@2001:660:3302:2826:225:90ff:fe20:d9a8] has joined #ruby-lang
<josh9> where should i put my classes? so far i have User, Product, Store, and DB. should they all be inside lib? lib/models?
<andrewvos> lib
<josh9> ok
frangiz [frangiz!~frangiz@user26.77-105-206.netatonce.net] has joined #ruby-lang
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
<josh9> btw, i use DB as sort of a singleton. the user uses DB to store itself. so inside user#save i have DB.save(self) i don't know if it's a common practice though.
<josh9> andrewvos: so inside my test folder i should have lib? (for testing all those classes)?
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
roadkith_ [roadkith_!~kith@82.113.119.77] has joined #ruby-lang
roadkith_ [roadkith_!~kith@217.5.145.2] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@nat35.mable.ne.jp] has joined #ruby-lang
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
roadkith [roadkith!~kith@unaffiliated/kith] has joined #ruby-lang
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
<josh9> i am debating with myself if i should use the strategy design pattern or extend my objects with modules insted. i have product object that can grab prices from different stores. grabbing the price is a bit different for each store.
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
<josh9> option one (the strategy): product will have @store. this var will be passed and can be wallmart or target, etc. each store will have get_price method.
<josh9> option two: product.extend(Wallmart) Wallmart will be a module with get_price method. i'll have target module as well etc.
<josh9> maybe the decision should be based on 'do i need a state?' if not - use module.
toretore [toretore!~toretore@ti0006a380-0261.bb.online.no] has joined #ruby-lang
<josh9> any opinions?
shtirlic [shtirlic!~shtirlic@188.134.7.124] has joined #ruby-lang
<epitron> i have an opinion
<epitron> chocolate is tasty
publicvoid_ [publicvoid_!~publicvoi@p4FCAFC3C.dip.t-dialin.net] has joined #ruby-lang
<rue> josh9: Sure
<josh9> rue: feel free to express it
<csmrfx> I only do stuff once it is necessary
<rue> I might go with a supplied PriceGrabber
<josh9> rue: do u mean option2 - extend with a module? or just an object that have the know-how for all different stores?
bjensen [bjensen!~brianj@3007ds3-ar.0.fullrate.dk] has quit [#ruby-lang]
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has joined #ruby-lang
<rue> Split out the least amount of work. If it's just the grabbing of prices, then little objects that know how to get specific prices would be good
empity [empity!~user@host147-105-dynamic.16-79-r.retail.telecomitalia.it] has joined #ruby-lang
<josh9> rue: right, or little modules with get_price method
<rue> Or, maybe you really only need to scrape the site differently, so you only externalize some HTML munging
<josh9> rue: true, some sites require nokogiri and some mechanize
<josh9> get_price will be a bit different for each site
<josh9> i'll extend product with the correct module based on the product.store_name
<josh9> if wine.store_name == 'target wine.extend(Target) etc...
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
<josh9> maybe the offical name for this pattern is decorator. not really sure
<josh9> yeah. page 203 of Design Patterns in Ruby
<josh9> w = SimpleWriter.new('out')
<josh9> w.extend(NumberingWriter)
<josh9> w.extend(TimeStampingWriter)
<josh9> w.write_line('hello')
Randroid [Randroid!~gregory@static-72-91-82-26.tampfl.fios.verizon.net] has joined #ruby-lang
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
QaDeS [QaDeS!~mklaus@frbg-5d84f8c6.pool.mediaWays.net] has joined #ruby-lang
kain [kain!~kain@151.64.233.209] has joined #ruby-lang
thrcka [thrcka!thrcka@nat/redhat/x-bwsbygwdysifckai] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@host208-21-dynamic.24-79-r.retail.telecomitalia.it] has joined #ruby-lang
|Vargas| [|Vargas|!~luke@pdpc/supporter/profesional/vargas] has joined #ruby-lang
jasox [jasox!~jasox@178.239.26.139] has joined #ruby-lang
shtirlic [shtirlic!~shtirlic@188.134.7.124] has joined #ruby-lang
The_prospector [The_prospector!baconmaste@unaffiliated/cornman] has joined #ruby-lang
DEac- [DEac-!~deac@81.16.104.86] has joined #ruby-lang
Guedes [Guedes!~guedes@189.31.65.14] has joined #ruby-lang
Guedes [Guedes!~guedes@unaffiliated/guedes] has joined #ruby-lang
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
blowmage [blowmage!~blowmage@humanecode.new.xen.prgmr.com] has joined #ruby-lang
yellow5 [yellow5!~yellow5@levicole.xen.prgmr.com] has joined #ruby-lang
adgar [adgar!~adgar@carbonica.xen.prgmr.com] has joined #ruby-lang
mqt [mqt!m@pheasant.nirv.net] has joined #ruby-lang
freedrull [freedrull!~freedrull@freedrull.xen.prgmr.com] has joined #ruby-lang
spectra [spectra!~spectra@debian/developer/spectra] has joined #ruby-lang
Gekz [Gekz!~gekz@unaffiliated/gekz] has joined #ruby-lang
<Gekz> I have an 136MB XML file that I want to query with a webapp. Would it be saner to just convert it into SQL or is there a nice way I could do this?
lateau_ [lateau_!~Adium@KD125054233174.ppp-bb.dion.ne.jp] has joined #ruby-lang
<injekt> Gekz: you could load all the data from the xml file and store it into a database for speeding querying
<Gekz> I was thinking that, but then why not just use one of those fancy XML databases then?
<injekt> I never said you shouldn't? ;)
<Gekz> you never said I should :P
<injekt> Hey now, do you want me to do EVERYTHING? ;P
<injekt> see what works best for you and your application
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
RomD` [RomD`!~Roman@nrbg-4d076620.pool.mediaWays.net] has joined #ruby-lang
burgestrand [burgestrand!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby-lang
<Gekz> injekt: loading it with Nokogiri doesn't work well for me, seeing as it takes up 3.5GB of RAM just loading the dom tree...
<Gekz> lol
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby-lang
tbuehlmann [tbuehlmann!~Tobias@unaffiliated/tovias] has joined #ruby-lang
<rue> Gekz: XML databases are pretty much crap, but Oracle and pg, at least, should be able to import XMl
<rue> Or you can just import via Nokogiri or something, of course.
gasbakid__ [gasbakid__!~gasbakid@41.96.91.141] has joined #ruby-lang
<Gekz> yeah, worse case scenario, generic SAX parsing with ORM
sinuc_ [sinuc_!~sinuc@irssi.sinuc.boxnet.eu] has joined #ruby-lang
molgrew [molgrew!~bozo20@85.182.139.18] has joined #ruby-lang
jkprg [jkprg!~jarda@ip-62-245-93-150.net.upcbroadband.cz] has joined #ruby-lang
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has joined #ruby-lang
<manveru> Gekz: we use postgres as xml store, they just added xquery support for xml types
<Gekz> oh nice
<manveru> beats converting to json and dumping to couchdb :)
<Gekz> oh god
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
jxie_ [jxie_!~jxie@115.197.84.209] has joined #ruby-lang
rippa [rippa!~rippa@87-253-25-62.pppoe.yaroslavl.ru] has joined #ruby-lang
gasbakid [gasbakid!~gasbakid@41.96.119.107] has joined #ruby-lang
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
roadkith [roadkith!~kith@unaffiliated/kith] has joined #ruby-lang
<shevy> when I have a time object ... is it possible to convert it to a time object in .. "two hours"?
<csmrfx> yes, feel free
<manveru> :)
<manveru> shevy: two hours relative to what?
<shevy> the time right now, or rather, when the time object was done via something like time = Time.now.to_i
<manveru> that's an int
febeling [febeling!~febeling@g231191184.adsl.alicedsl.de] has joined #ruby-lang
<manveru> Time.now + 7200
<manveru> that's in two hours
<shevy> aaaaah
<shevy> cool thanks Manhose
<shevy> erm
<shevy> manveru
<manveru> lol
<manveru> np
<sj26> If you're in rails or using activesupport, Time.now + 2.hours or 2.hours.hence
<shevy> hmmm .hence? never saw that one before
<manveru> yeah, they come up with all kinds of weird
<shevy> hehehe
<rue> There's a #thence also
<shevy> really??
<manveru> never believe a word rue says
<rue> I don't
<shevy> yeah
<shevy> I was thinking he was pulling a reindeer on me
<rue> Reindeers are pretty small
tcurdt [tcurdt!~tcurdt@dslb-188-097-069-059.pools.arcor-ip.net] has joined #ruby-lang
<injekt> the big ones arent
<rue> Too
<rue> They're about ye big
<injekt> ah yes
<injekt> you're right
<injekt> they are ye big
uniqanomaly [uniqanomaly!~ua@dynamic-78-8-85-136.ssp.dialog.net.pl] has joined #ruby-lang
<manveru> reindeers are like unicorns with two horns and less rainbows
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
<injekt> so not really like unicorns
<injekt> imagine how ugly a unicorn would be if its horn was like that of a reindeers
<Gekz> I might considering having sex with such a unicorn.
<shevy> hmmmmmmmm
<shevy> Gekz you are weird
<Gekz> well shit.
<injekt> You fit in just right here, then.
<Gekz> as long as someone else brings the lube, I fit in anywhere.
<injekt> Smooth talker
<Gekz> how about we take this to efnet and see where it goes?
* Gekz suspiciously winks at all of you
<rippa> what does that mean?
<injekt> it means 'cannot load such file -- rubygems.rb'
experimenthouse [experimenthouse!~experimen@120.18.30.127] has joined #ruby-lang
<Gekz> why not pastebin?
<rue> It's sekret
<shevy> someone has something to hide
<rue> What's that, 1.8.7?
<rippa> 1.9.3
<injekt> what are you doing?
<Gekz> I was wondering why the letter s kept appearing in my text entry prompt, then noticed I was leaning on it
<rippa> just launching a script
<injekt> any script?
<Gekz> PEBKAC is by far the hardest error to debug
<injekt> rippa: does ruby -e 'puts "..."' work?
<shevy> orange colour on red background is also pretty hard to debug
<rippa> injekt: yes
<injekt> rippa: right, so not just any script
<Gekz> installing ruby 1.9 on a mac is very easy and this amuses me
<injekt> what exactly are you doing?
<rippa> I think it fails here
<rippa> require 'fileutils'
<Gekz> I'm going to attempt to add a retry keyword to Python later
<injekt> rippa: does it work without that line?
<shevy> Gekz keyword? is that even possible
<Gekz> shevy: yes, the same way other keywords are added
<Gekz> modifying the freaking source
<Gekz> lol
<rippa> hmm, any script gives that error
<rippa> even empty one
<manveru> echo $RUBYOPT
beiter [beiter!~beiter@manz-590f3483.pool.mediaWays.net] has joined #ruby-lang
<rippa> nothing
<manveru> which ruby
<injekt> how did you install 1.9.3?
<manveru> well, probably not rvm
<injekt> aye
<rippa> rubyinstaller
<injekt> windows?
<rippa> yes
<manveru> oh
* injekt walks away
* manveru hides
<rippa> pry works though
<rippa> just not scripts
<injekt> rippa: important info like that helps at the start of a question ;)
hzlocky_ [hzlocky_!~me@dynamic-vpdn-93-125-15-168.telecom.by] has joined #ruby-lang
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
Marco [Marco!~marco@pat32.dartmouth-secure.border1-cfw.Dartmouth.EDU] has joined #ruby-lang
<shevy> hmm
<shevy> windows can be very annoying
takaokouji [takaokouji!~takaokouj@nat35.mable.ne.jp] has joined #ruby-lang
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
Manhose_ [Manhose_!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
jxie [jxie!~jxie@115.197.84.209] has joined #ruby-lang
<csmrfx> shevy are you converting your object now? its almost 2 hours
<shevy> csmrfx already done
meise [meise!~dm@3st.be] has joined #ruby-lang
Yu\2 [Yu\2!~Yu@2001:638:504:f1f6:213:77ff:feb6:afb0] has joined #ruby-lang
meise [meise!~dm@3st.be] has joined #ruby-lang
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
gasbakid__ [gasbakid__!~gasbakid@41.96.55.143] has joined #ruby-lang
arthurlockhart [arthurlockhart!~cinch@60-242-128-8.static.tpgi.com.au] has joined #ruby-lang
Carmidev [Carmidev!~carmidev@BSN-61-79-200.static.dsl.siol.net] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0C76C.dip0.t-ipconnect.de] has joined #ruby-lang
Spooner [Spooner!~Miranda@host-78-144-139-130.as13285.net] has joined #ruby-lang
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has joined #ruby-lang
datanoise [datanoise!~datanoise@24-145-66-018-dhcp.mia.fl.atlanticbb.net] has joined #ruby-lang
Marco [Marco!~marco@pat32.dartmouth-secure.border1-cfw.Dartmouth.EDU] has joined #ruby-lang
enebo [enebo!~enebo@75-168-44-241.mpls.qwest.net] has joined #ruby-lang
Marco_ [Marco_!~marco@pat160.dartmouth-secure.border2-cfw.Dartmouth.EDU] has joined #ruby-lang
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
Marco [Marco!~marco@pat32.dartmouth-secure.border1-cfw.Dartmouth.EDU] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
Pip [Pip!~Pip@176.214.45.75] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
vmatiyko [vmatiyko!~vmatiyko@178.120.67.145] has quit [#ruby-lang]
Marco [Marco!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby-lang
RomyEatsDrupal [RomyEatsDrupal!~stickycak@cpe-74-64-122-182.nyc.res.rr.com] has joined #ruby-lang
Weems [Weems!Weems@68-117-153-32.dhcp.unas.al.charter.com] has joined #ruby-lang
Weems [Weems!Weems@unaffiliated/weems] has joined #ruby-lang
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby-lang
jredville [jredville!~jredville@173-160-211-253-Washington.hfc.comcastbusiness.net] has joined #ruby-lang
Pip [Pip!~Pip@pppoe-188-187-43-137.volgograd.ertelecom.ru] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
slyphon [slyphon!~weechat@unaffiliated/slyphon] has joined #ruby-lang
benanne [benanne!~rijdier@ip-83-134-149-239.dsl.scarlet.be] has joined #ruby-lang
ttilley [ttilley!~ttilley@unaffiliated/lv] has joined #ruby-lang
codefriar [codefriar!~codefriar@cpe-098-026-012-134.nc.res.rr.com] has joined #ruby-lang
looopy [looopy!~looopy@pool-141-156-49-128.washdc.btas.verizon.net] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
jbsan [jbsan!~jbsan@m83-188-244-236.cust.tele2.se] has joined #ruby-lang
codefriar [codefriar!~codefriar@cpe-098-026-012-134.nc.res.rr.com] has quit ["Linkinus - http://linkinus.com"]
Carmivore [Carmivore!~carmivmor@ec2-107-20-0-215.compute-1.amazonaws.com] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
leonL [leonL!~leonl@CPE0024a5b652a3-CM000f21205d86.cpe.net.cable.rogers.com] has joined #ruby-lang
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby-lang
enebo [enebo!~enebo@75-168-44-241.mpls.qwest.net] has joined #ruby-lang
havenn [havenn!~skipper@pool-72-67-31-69.lsanca.fios.verizon.net] has joined #ruby-lang
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby-lang
gnufied [gnufied!~gnufied@122.178.197.11] has joined #ruby-lang
Guest79137 [Guest79137!~davidw@host228-251-static.95-94-b.business.telecomitalia.it] has joined #ruby-lang
davidw [davidw!~davidw@apache/committer/davidw] has joined #ruby-lang
<davidw> hey, any way to add N elements, which are currently strings, to an XML document with nokogiri?
<davidw> said another way: it's easy to add one node
<davidw> but I have N elements, all grouped together as one big string
robgleeson [robgleeson!~rob@subtle/contributor/robgleeson] has joined #ruby-lang
retro|cz [retro|cz!~retro@106.142.broadband6.iol.cz] has joined #ruby-lang
Austin__ [Austin__!~austin@CPE0016cbc30e9c-CM001ceacff6ba.cpe.net.cable.rogers.com] has joined #ruby-lang
<manveru> davidw: you tried?
gasbakid [gasbakid!~gasbakid@41.96.71.56] has joined #ruby-lang
takaokouji [takaokouji!~takaokouj@nat35.mable.ne.jp] has joined #ruby-lang
RomyEatsDrupal [RomyEatsDrupal!~stickycak@cpe-74-64-122-182.nyc.res.rr.com] has joined #ruby-lang
darkf [darkf!~darkf_dix@unaffiliated/darkf] has joined #ruby-lang
jredville [jredville!~jredville@173-160-211-253-Washington.hfc.comcastbusiness.net] has joined #ruby-lang
febeling [febeling!~febeling@g231191184.adsl.alicedsl.de] has joined #ruby-lang
febeling [febeling!~febeling@g231191184.adsl.alicedsl.de] has quit [#ruby-lang]
ddfreyne [ddfreyne!~denisdefr@stoneship.org] has joined #ruby-lang
joast [joast!~rick@76.178.187.164] has joined #ruby-lang
Jay_Levitt [Jay_Levitt!~Jay_Levit@home.jay.fm] has joined #ruby-lang
lateau_ [lateau_!~lateau@KD125054233174.ppp-bb.dion.ne.jp] has joined #ruby-lang
<rue> Can't you just insert it?
<andrewvos> Where is petercooper lately?
Carmivore [Carmivore!~carmivmor@ec2-174-129-144-205.compute-1.amazonaws.com] has joined #ruby-lang
<rue> In secret channels
<andrewvos> Quiet you
Yu\2 [Yu\2!~Yu@ubi-1-50-40.zif.uni-bielefeld.de] has joined #ruby-lang
<andrewvos> Want to go to this but wondering how far out of London it ishttp://surreyrubyists.tumblr.com/post/13606720439/surrey-rubyists-is-rebooting
looopy [looopy!~looopy@static-71-166-232-207.washdc.east.verizon.net] has joined #ruby-lang
<rue> It's in Surrey
<rue> So, you know, that far?
dous [dous!~dous@unaffiliated/dous] has joined #ruby-lang
nofxx [nofxx!~nofxx@unaffiliated/nofxx] has joined #ruby-lang
elux_ [elux_!~peter@96.45.198.150] has joined #ruby-lang
<andrewvos> rue: Thanks!
<shevy> I only know London, the rest of the UK must be thistle marshes
<andrewvos> rue: You're gettign snow?
<andrewvos> shevy: It is
<shevy> there isn't a lot of snow this year anywhere it seems :(
<shevy> in ten years finland will be devoid of snow entirely
<andrewvos> I've just come from snowboarding for a week so I'm not going to be happy if there's more snow in London when I get back :(
malev [malev!~malev@host45.190-137-46.telecom.net.ar] has joined #ruby-lang
davidtspf01_ [davidtspf01_!~leaping@ip-66-80-180-195.lax.megapath.net] has joined #ruby-lang
<shevy> hehe
burgestrand [burgestrand!~burgestra@81-229-85-235-no66.tbcn.telia.com] has joined #ruby-lang
<shevy> probably only a lot of rain
Marco [Marco!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby-lang
savage- [savage-!~savage-@209.118.197.220] has joined #ruby-lang
<manveru> shevy: we get lots of snow :)
<shevy> where where
<shevy> bavaria?
<manveru> tirol
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
jbsan [jbsan!~jbsan@m83-188-244-236.cust.tele2.se] has joined #ruby-lang
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby-lang
dnjaramba [dnjaramba!~dnjaramba@41.72.193.86] has joined #ruby-lang
<davidw> manveru, whereabouts?
dv310p3r [dv310p3r!~dv310p3r@c-98-203-41-91.hsd1.fl.comcast.net] has joined #ruby-lang
<manveru> davidw: i'm living in germany, just north of kufstein
<davidw> that's not Tirol then :-)
<manveru> davidw: i'm like 10m from the border :P
<manveru> my parents live in tirol, so i'm crossing almost every day
meise [meise!~dm@3st.be] has joined #ruby-lang
<robgleeson> manveru: free crossing?
<shevy> nah
<shevy> the germans have machine guns at the border
<robgleeson> lol?
<shevy> but that can't stop a Tiroler
<robgleeson> the border between Northern Ireland & the Republic is almost always free
<robgleeson> random checks
<robgleeson> but not always enforced
<shevy> well there is Schengen here so you won't get controlled... although I once was controlled... in 2001, when I was travelling via train
<shevy> since then I prefer the car :P
<robgleeson> yeah
<manveru> i swim the inn upstream at 0°C
<robgleeson> the random checks are for buses here as well
<robgleeson> but tbh, its for immigrants
<robgleeson> not for irish people or british ppl
<shevy> hmm
<shevy> yeah same here but still it annoys me when I get controlled hehe
<robgleeson> i dont mind it, wave your ID and its fine
<shevy> "HE HAS A GUN!!!"
nekid [nekid!~nekid@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby-lang
<shevy> I suppose northern ireland used to be more dangerous than southern germany
Oloryn_lt1 [Oloryn_lt1!~Oloryn@strider-laptop.broker.freenet6.net] has joined #ruby-lang
<manveru> well, i actually live in a house that used to be for the border control personell... the border control just vanished
<shevy> hehe
<davidtspf01_> Having a weird problem with a conditional and a regular expression. I have a loop that should execute only if a line in an html file matches the regular expression I've entered. But it's not executing. :( Code is here: http://pastie.org/3113555 What am I doing wrong?
<injekt> wow
<davidtspf01_> When I run this I get this value for puts @doc.css("table")[y+5].css("tr")[counter].css("td")[3]: <td><a href="mailto:tiffany.yang@mecglobal.com">tiffany.yang@mecglobal.com</a></td>
<injekt> davidtspf01_: you should really save your objects and reuse data
<injekt> davidtspf01_: you want .html or .to_s
<injekt> puts calls .to_s on the object you give it
<davidtspf01_> That seems to match the regular expression: %r{<td><a href="mailto:.*?</td>}
<injekt> counter += 1 is the same as counter = counter + 1
<injekt> davidtspf01_: right, =~ on the String
<injekt> you're doing it on a Node, probably
<davidtspf01_> injekt: Sorry, not following the .to_s advice.
<injekt> davidtspf01_: @doc.css(... other crap ...).to_s =~ /.../
<davidtspf01_> injekt: Ah, ok.
<injekt> I really recommend spending some time refactoring that code, though
<davidtspf01_> injekt; I'm a total newbie. How do I refactor?
<injekt> you know something is wrong when you have @doc.css('table') 7 times, when you could have table = @doc.css('table') and then move relative from your table, and your rows
savage- [savage-!~savage-@209.118.197.220] has joined #ruby-lang
<injekt> davidtspf01_: you're rewriting a lots of code over and over again, that's all. It also means if nokogiri isn't being helpful under the hood and caching data then those calls are going to be expensive
<davidtspf01_> injekt: I see
<injekt> davidtspf01_: simplified: chunks = string.split(':'); size = string.split(':').size
<injekt> davidtspf01_: do you see a problem there?
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
jthomas_ [jthomas_!~jthomas@c-98-222-28-137.hsd1.il.comcast.net] has joined #ruby-lang
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
<shevy> hmm what was the name of the ruby WM again?
<injekt> subtle?
<gearaholic> anyone know if there a way to limit the transfer rate for s3 uploads with the ruby aws-sdk gem?
<davidtspf01_> injekt: What's the problem?
<injekt> davidtspf01_: the string is being split twice
<shevy> yeah I think that was it, thanks injekt http://subforge.org/projects/subtle/wiki
<davidtspf01_> injekt: Ah, that's wasteful.
<injekt> shevy: sure np, poke dominikh he uses the hell out of subtle
Oloryn_lt1 [Oloryn_lt1!~Oloryn@strider-laptop.broker.freenet6.net] has joined #ruby-lang
<injekt> davidtspf01_: right :)
yfeldblum [yfeldblum!~Jay@c-98-218-48-253.hsd1.md.comcast.net] has joined #ruby-lang
<injekt> shevy: and is a contrib iirc
<shevy> ok
jkprg [jkprg!~jarda@ip-62-245-93-150.net.upcbroadband.cz] has joined #ruby-lang
<manveru> shevy: lianj as well
<injekt> and maybe robgleeson?
<injekt> oh I doubt he uses linux much anymore
<dominikh> robgleeson is a OSX guy, how would he use subtle
<robgleeson> I don't use subtle anymore.
tomzx [tomzx!~tomzx@dsl-216-221-39-59.aei.ca] has joined #ruby-lang
<manveru> lol
<robgleeson> I use to use subtle, 2yr ago or something :)
<shevy> OSX changes people :(
toretore [toretore!~toretore@ti0006a380-0261.bb.online.no] has joined #ruby-lang
<injekt> yeah, it made me efficient
<injekt> who'da thought
<injekt> more efficient*
<dominikh> injekt: could be more related to you getting a job and finally having something to be efficient at :P
<injekt> this helps too
<injekt> but i quit saturday
<injekt> so go figure
unsymbol [unsymbol!u4994@gateway/web/irccloud.com/x-qovtvfpjztcjczec] has joined #ruby-lang
SkramX [SkramX!~SkramX@96.231.224.211] has joined #ruby-lang
brianpWins [brianpWins!~brianpWin@hlfxns0169w-142068026252.dhcp-dynamic.FibreOp.ns.bellaliant.net] has joined #ruby-lang
Weems [Weems!Weems@68-117-153-32.dhcp.unas.al.charter.com] has joined #ruby-lang
Weems [Weems!Weems@unaffiliated/weems] has joined #ruby-lang
solars [solars!~solars@mk089144206038.a1.net] has joined #ruby-lang
<davidtspf01_> Basic question that for some reason isn't answered in my Ruby book... How can I use a regular expression to extract text from a string that matches that expression? For example, I want to extract "Energizer Batteries" from this string: <!-- InstanceBeginEditable name="brand" -->Energizer Batteries</span>. This is the regular expression: %r{-->(.*?)</span>}
Oloryn_lt1 [Oloryn_lt1!~Oloryn@home.benshome.net] has joined #ruby-lang
<burgestrand> davidtspf01_: there’s more than one method for doing that, most often you use String#match, String#scan and even String#[]
<davidtspf01_> burgestrand: Thanks --- how can I figure out how to use those?
<burgestrand> davidtspf01_: by reading their documentation, I usually google for it, there’s the ”ri” command-line tool as well
<burgestrand> davidtspf01_: http://ruby-doc.org/core-1.9.3/String.html contains a list, for example
<burgestrand> davidtspf01_: you can try it in your terminal; ri String#[]
<davidtspf01_> burgestrand: Hmm, that gave me an error: /Users/leaping/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/rdoc/ri/driver.rb:710:in `rescue in display_name': empty char-class: /^String#[]/ (RegexpError)
<burgestrand> davidtspf01_: looks like a bug to me, but then again you’re using the preview version of 1.9.3 instead of the released one
<chris2> anyone know how ioctl changed in 1.9?
<chris2> /home/chris/bin/rmix:15:in `ioctl': integer 2147765504 too big to convert to `int' (RangeError)
<chris2> but it should be an unsigned int i think
<chris2> or is that a bug...
Phrogz [Phrogz!~phrogz@pdpc/supporter/professional/phrogz] has joined #ruby-lang
<chris2> thx
<chris2> i guess i need to find the signed int representation
<dominikh> hence the pack/unpack
RomyEatsDrupal [RomyEatsDrupal!~stickycak@cpe-67-247-12-233.nyc.res.rr.com] has joined #ruby-lang
<chris2> my ioctl request is already too big
<dominikh> not sure I can follow
<chris2> the ioctl number
<chris2> SOUND_MIXER_READ_VOLUME = 0x80044d00
<chris2> wont fit in an int
<shevy> big data, big boobs ... all the same thing
<dominikh> chris2: well, that file I linked to does the same thing (reading/writing the volume). so I suppose you can just copy its code ;)
<chris2> SOUND_MIXER_READ_VOLUME = -2147201792
<chris2> works
brianpWins [brianpWins!~brianpWin@hlfxns0169w-142068026252.dhcp-dynamic.FibreOp.ns.bellaliant.net] has joined #ruby-lang
<chris2> >> [0x80044d00].pack("i").unpack("i").first
<chris2> => -2147201792
<manveru> burgestrand: /[]/ is an empty char class
<rue> andrewvos: Something like 5 cm
<rue> Plus slush and such
<chris2> SOUND_MIXER_READ_VOLUME = 0x80044d00 - 2**32
<chris2> nicer
<burgestrand> manveru: yes, but you don’t think ri should be able to handle looking up String#[]?
<manveru> no, afaik it handles . and ::
<manveru> well, not :: either
<manveru> works with # though
<manveru> weird :P
<manveru> anyway, i don't even have ri docs installed... so all i get are random gem monkeypatches
<burgestrand> manveru: it works for me :d
<burgestrand> manveru: didn’t work for the 1.9.3-preview1 guy
<manveru> it works if you generate docs for ruby
livinded [livinded!~lolwut@pool-108-23-242-132.lsanca.fios.verizon.net] has joined #ruby-lang
<chris2> erm
<chris2> what did //s use to mean?
<manveru> shift-jis maybe?
<chris2> ah yes
<chris2> ged: hi there :)
<chris2> why are the regexps in bluecloth //s?
<manveru> case 's':
<manveru> kcode = 48;
<manveru> from parse.y of 1.8
<manveru> so no idea
<chris2> it means sjis
<chris2> i confused it with perl
<chris2> ok, first true bug
<chris2> nope
<chris2> easy
<shevy> hehe
RomyEatsDrupal [RomyEatsDrupal!~stickycak@cpe-67-247-12-233.nyc.res.rr.com] has joined #ruby-lang
yakkof [yakkof!~yakkof@64.134.238.209] has joined #ruby-lang
Carmivore [Carmivore!~carmivmor@ec2-204-236-247-101.compute-1.amazonaws.com] has joined #ruby-lang
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
dejongge [dejongge!~jonke@pD9E0C76C.dip0.t-ipconnect.de] has joined #ruby-lang
RomyEatsDrupal [RomyEatsDrupal!~stickycak@cpe-67-247-12-233.nyc.res.rr.com] has joined #ruby-lang
mkscrg [mkscrg!~mkscrg@76-218-100-21.lightspeed.sntcca.sbcglobal.net] has joined #ruby-lang
<yorickpeterse> injekt: ping
Carmivore [Carmivore!~carmivmor@ec2-184-72-134-164.compute-1.amazonaws.com] has joined #ruby-lang
gearaholic [gearaholic!~gearaholi@c-71-238-98-243.hsd1.mi.comcast.net] has joined #ruby-lang
virunga [virunga!~virunga@151.64.36.72] has joined #ruby-lang
<chris2> corundum: seen apeiros
<corundum> apeiros was last seen 7 days, 1 hours, 54 minutes and 28 seconds ago, quitting IRC (Read error: Connection reset by peer)
<chris2> oO
<burgestrand> D:
andrewhl [andrewhl!~andrew@CPE000d6048a601-CM00080dff304c.cpe.net.cable.rogers.com] has joined #ruby-lang
<savage-> :-(
<savage-> seen apeiros_
<savage-> corundum: seen apeiros_
<corundum> apeiros_ was last seen 5 days, 21 hours, 23 minutes and 8 seconds ago, quitting IRC (Remote host closed the connection)
<savage-> better!
lsegal [lsegal!jinx@modemcable249.109-177-173.mc.videotron.ca] has joined #ruby-lang
s0ber_ [s0ber_!~s0ber@114-36-236-160.dynamic.hinet.net] has joined #ruby-lang
y3llow_ [y3llow_!~y3llow@114-36-236-160.dynamic.hinet.net] has joined #ruby-lang
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby-lang
y3llow [y3llow!~y3llow@114-36-236-160.dynamic.hinet.net] has joined #ruby-lang
y3llow [y3llow!~y3llow@114-36-236-160.dynamic.hinet.net] has joined #ruby-lang
<manveru> /msg nickserv info apeiros_
indeterminate [indeterminate!~sei@user-3c2h3m6.cable.mindspring.com] has joined #ruby-lang
<muzone> sup
<manveru> muzone: heya
mrkrabs [mrkrabs!~Adium@p5B09EE0C.dip.t-dialin.net] has joined #ruby-lang
<muzone> good evening man =)
<mrkrabs> hello
<muzone> mrkrabs: crabs like in public hair crabs?
<mrkrabs> not quite ;)
<muzone> that shit is nasty man
<muzone> ehehe
<muzone> my friend had it once, he hasn't been the same since
<mrkrabs> gee
<mrkrabs> ^^
<manveru> quite the typo...
<muzone> ah
<muzone> i meant pubic hair crabs
jensn [jensn!~Jens@c-83-233-145-148.cust.bredband2.com] has joined #ruby-lang
jacobwg [jacobwg!~jacobwg@17.sub-75-240-133.myvzw.com] has joined #ruby-lang
<jacobwg> Is it possible to get multiple captures from a string.scan if you're doing something like /(\w+)\s(\w+\s)+/ ? I'm wanting to get a variable number of captures for the 2nd capture
<manveru> jacobwg: no
kain [kain!~kain@151.64.233.209] has joined #ruby-lang
<jacobwg> manveru: how would you do something like that, then? Like say I had a pattern of word followed by an unknown amount of numbers and wanted to capture all the numbers?
<jacobwg> My real pattern is SpecialWord followed by an unknown amount of references (i.e. 5:7, 7:7) mixed in with standard words
<manveru> can you provide an example or specs?
davidw [davidw!~davidw@adsl-ull-23-123.51-151.net24.it] has joined #ruby-lang
<jacobwg> manveru: I'm trying to parse Bible verse references in a paragraph of text - the regex needs to match first a book name (i.e. Genesis), then followed by a variable number of references (in the format of 1:3 or 1:3-4 or 1:3-4:5, or another reference after a semicolon)
<jacobwg> So it would need to match the references in the following string "Genesis 1:4, 5; 6:7-8:9; 10; 12
<jacobwg> And that string would occur in a paragraph of text, so I can't just do something like a split right off of the bat
<burgestrand> How do you know when the references stop?
<burgestrand> jacobwg: ^
<jacobwg> burgestrand: when you encounter a character not in the set [\s\d,;-]
<jacobwg> burgestrand: basically on the next word
<jacobwg> The regex I'm using at the moment is http://rubular.com/r/DCpEHPHL9r
<jacobwg> It works well for basic references, but not a variable number of them (as the last reference "overrides" the previous reference's capture)
<burgestrand> jacobwg: how about matching all of the text you need with the regex, and then parsing out the references out of the match?
<burgestrand> instead of trying to do it in one fell swoop with a regex
<jacobwg> burgestrand: so, match the entire verse string, then so some further regex/split stuff? Sounds like a good idea...
<bougyman> jacobwg: need a better test string on rubular
<bougyman> the regex is wo
WillMarshall [WillMarshall!~willmarsh@ppp121-44-64-47.lns20.syd6.internode.on.net] has joined #ruby-lang
rue [rue!~eeppa@echo622.server4you.de] has joined #ruby-lang
<jacobwg> bougyman: Better test string - http://rubular.com/r/T90jCJTVX7
<jacobwg> the middle one is the one that doesn't capture everything (though it does match)
<burgestrand> jacobwg: I’d do it like this: http://rubular.com/r/NiA3dBHHLc — and then parse out the references separately
<jacobwg> burgestrand: yeah, much cleaner on the regex side, and then I can split by semicolon and comma
<jacobwg> burgestrand bougyman manveru - Thanks for all the help!
<burgestrand> \o,
flip_digits [flip_digits!~textual@c-76-122-14-228.hsd1.fl.comcast.net] has joined #ruby-lang
mrkrabs [mrkrabs!~Adium@p5B09EE0C.dip.t-dialin.net] has quit [#ruby-lang]
mrkrabs [mrkrabs!~Adium@p5B09EE0C.dip.t-dialin.net] has joined #ruby-lang
Marco [Marco!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby-lang
<jacobwg> One more question - is it possible to remove a space between a number and a word character? Like removing the \s char in \d\s\w?
<burgestrand> jacobwg: what do you mean remove?
<burgestrand> jacobwg: you either match it or you don’t
<jacobwg> burgestrand: if I gave it the string "1 testing this 3 another" it would return "1testing this 3another"
<jacobwg> burgestrand: not necessarily related to the other question
<jacobwg> Doesn't seem possible with gsub, but I could be wrong
<bougyman> irb(main):029:0> /(\d+)?\s*(Genesis|Deuteronomy|John)\s+((?:(?:\d+;|\d+:\d+(?:-\d+)?|\d+),?\s*)+)/.match "Genesis 1; 2:3-4, 5"
hagabaka [hagabaka!~hagabaka@unaffiliated/hagabaka] has joined #ruby-lang
<burgestrand> jacobwg: oh, well you could use lookaround to find any spaces surrounded by a number and a word-character
<bougyman> => #<MatchData "Genesis 1; 2:3-4, 5" 1:nil 2:"Genesis" 3:"1; 2:3-4, 5">
voker57 [voker57!~voker57@128-70-15-152.broadband.corbina.ru] has joined #ruby-lang
voker57 [voker57!~voker57@kvirc/developer/Voker57] has joined #ruby-lang
<bougyman> it's one of those tricky ones, where the book number can either be 1: or part of 3:
<bougyman> you have to break 3 down again once you get those slices, anyway.
<bougyman> two passes is best, for this.
<jacobwg> bougyman: Thanks!
<jacobwg> burgestrand: ah, hadn't heard of lookaround before - looks useful
<burgestrand> jacobwg: for example that particular example, /(?<=\d)\s(?=\w)/
<burgestrand> jacobwg: it’ll only match the space character, but only if it’s preceded by a digit and succeeded by a word character
<jacobwg> burgestrand: thanks! Rubular is not liking that (?<=\d) part, though….
<burgestrand> jacobwg: yeah, it won’t work on 1.8
<jacobwg> burgestrand: ah, okay
<burgestrand> jacobwg: rubular is using the 1.8 regex engine, quite different from 1.9
<bougyman> this is a horrible way to attack this problem, btw
<burgestrand> awfully fun though
<jacobwg> burgestrand: yeah, works great in irb
<jacobwg> bougyman: what do you mean?
<bougyman> jacobwg: the cases you'll miss are plentiful
<bougyman> 1: abbreviated book names.
Swimming_Bird [Swimming_Bird!~textual@64.70.114.89] has joined #ruby-lang
<bougyman> you can fix that by adding all iterations of abbreviations in the 'special word' section
<bougyman> that will make it huge
<bougyman> 2: wrapped lines.
<bougyman> lots of places \n could appear in the string, you'd have to account for all of them.
<jacobwg> bougyman: oh, you mean the verse parsing stuff...
<jacobwg> bougyman: yeah, it's not pretty, but at the moment I don't know of a better way
<bougyman> ooh: /(\d+)?\s*(Genesis|Deuteronomy|John)\s+((?:(?:\d+:\d+(?:-\d+)?|\d+)[,;]?\s*)+)/.match "Genesis 1; 2:3-4, 5"
<bougyman> => #<MatchData "Genesis 1; 2:3-4, 5" 1:nil 2:"Genesis" 3:"1; 2:3-4, 5">
<bougyman> better
<bougyman> one less wildcard iteration
<bougyman> you see the difference?
<jacobwg> bougyman: let me paste them side by side in an editor....
davidw [davidw!~davidw@apache/committer/davidw] has joined #ruby-lang
<jacobwg> bougyman: yep
thrcka [thrcka!~thrcka@ip-89-102-34-33.net.upcbroadband.cz] has joined #ruby-lang
<jacobwg> bougyman: I could also, in theory, use burgestrand's regex /^(([1-3]\s)?(\w+))\s([\s\d,;:-]+)$/ and then check if the book names are valid after capturing them
<jacobwg> Anyway, thanks for the help! I've got to run, but I'm a lot farther now than before…. thanks again!
nekid [nekid!~nekid@c-24-6-170-1.hsd1.ca.comcast.net] has joined #ruby-lang
looopy [looopy!~looopy@static-71-166-232-207.washdc.east.verizon.net] has joined #ruby-lang
FiXato [FiXato!~FiXato@fixato.net] has joined #ruby-lang
iRue [iRue!~iRue@a88-112-31-217.elisa-laajakaista.fi] has joined #ruby-lang
mrkrabs [mrkrabs!~Adium@p5B09EE0C.dip.t-dialin.net] has quit [#ruby-lang]
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby-lang
benanne [benanne!~rijdier@ip-83-134-149-239.dsl.scarlet.be] has joined #ruby-lang
<dreinull> can I run single minispecs? in minitests I can run them by name.
floyd2 [floyd2!~floyd2@17.145.34.193.static.giga-dns.com] has joined #ruby-lang
singpolyma [singpolyma!~singpolym@69.171.154.34] has joined #ruby-lang
bryno [bryno!~b@unaffiliated/bryno] has joined #ruby-lang
tla [tla!~tla@toelboell-lund.dk] has joined #ruby-lang
dreinull [dreinull!dreieins@217.18.70.225] has joined #ruby-lang
phaedrix [phaedrix!~phaedrix@c-24-22-86-235.hsd1.or.comcast.net] has joined #ruby-lang
alindeman [alindeman!~adml@pudge.ithought.org] has joined #ruby-lang
iRue [iRue!~iRue@a88-112-31-217.elisa-laajakaista.fi] has joined #ruby-lang
toretore [toretore!~toretore@ti0006a380-0261.bb.online.no] has joined #ruby-lang
adgar [adgar!~adgar@carbonica.xen.prgmr.com] has joined #ruby-lang
dRbiG [dRbiG!drbig@insomniac.pl] has joined #ruby-lang
zvrba [zvrba!96456@diamant.ifi.uio.no] has joined #ruby-lang
comboy [comboy!~quassel@static.7.66.9.176.clients.your-server.de] has joined #ruby-lang
xsdg [xsdg!~xsdg@SIPB-VM-99.MIT.EDU] has joined #ruby-lang
mahlon [mahlon!mahlon@martini.nu] has joined #ruby-lang
tpope [tpope!tpope@maeby.tpope.net] has joined #ruby-lang
srbartlett [srbartlett!~srbartlet@202.146.7.239] has joined #ruby-lang
spectra [spectra!~spectra@debian/developer/spectra] has joined #ruby-lang
JEG2 [JEG2!~JEG2@ip72-198-103-217.ok.ok.cox.net] has joined #ruby-lang
havenn [havenn!~skipper@pool-108-0-191-51.lsanca.fios.verizon.net] has joined #ruby-lang
blowmage [blowmage!~blowmage@humanecode.new.xen.prgmr.com] has joined #ruby-lang
adgar [adgar!~adgar@carbonica.xen.prgmr.com] has joined #ruby-lang
yellow5 [yellow5!~yellow5@levicole.xen.prgmr.com] has joined #ruby-lang
enebo [enebo!~enebo@75-168-44-241.mpls.qwest.net] has joined #ruby-lang
spectra [spectra!~spectra@debian/developer/spectra] has joined #ruby-lang
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby-lang
jarib [jarib!~jarib@unaffiliated/jarib] has joined #ruby-lang
Manhose [Manhose!~Manhose@bl17-17-151.dsl.telepac.pt] has joined #ruby-lang
Carnage\ [Carnage\!~carnage@84-75-163-211.dclient.hispeed.ch] has joined #ruby-lang
jbsan [jbsan!~jbsan@m83-188-244-236.cust.tele2.se] has joined #ruby-lang
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby-lang
mdel [mdel!~mdel@pool-71-175-17-16.phlapa.fios.verizon.net] has joined #ruby-lang
WillMars_ [WillMars_!~willmarsh@203.48.101.90] has joined #ruby-lang
Weems [Weems!Weems@68-117-153-32.dhcp.unas.al.charter.com] has joined #ruby-lang
Weems [Weems!Weems@unaffiliated/weems] has joined #ruby-lang
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.44] has joined #ruby-lang
havenn [havenn!~skipper@pool-108-0-191-51.lsanca.fios.verizon.net] has joined #ruby-lang
<injekt> yorickpeterse: pong
<yorickpeterse> Issue no longer applies :3
<yorickpeterse> But anyway, would it be possible in Slop to get all the options that were added using :autocreate?
<yorickpeterse> Ignoring the manually defined ones
dejongge [dejongge!~jonke@pD9E0C76C.dip0.t-ipconnect.de] has joined #ruby-lang
<zzak> inkjet :D
<shevy> lol
Banistergalaxy [Banistergalaxy!~AndChat@222.153.223.46] has joined #ruby-lang
<injekt> yorickpeterse: not right now no, but I can add an Option#autocreated? or something similar to the todo list
<yorickpeterse> meh, it's not a hurry
<yorickpeterse> I thought I needed it for Pry but that's not the case for now
<injekt> I'll throw it in v3 then :)
<yorickpeterse> cool
<injekt> (which is going to be very different)
confounds [confounds!~confounds@CPE78cd8e667600-CM78cd8e6675fd.cpe.net.cable.rogers.com] has joined #ruby-lang
<shevy> hehe
Marco [Marco!~marco@Marco-2.Kiewit.Dartmouth.EDU] has joined #ruby-lang
postmodern [postmodern!~postmoder@c-71-237-178-98.hsd1.or.comcast.net] has joined #ruby-lang
WillMars_ [WillMars_!~willmarsh@203.48.101.90] has joined #ruby-lang
workmad3 [workmad3!~workmad3@host-84-13-69-129.opaltelecom.net] has joined #ruby-lang
lzell [lzell!~lzell@75-101-96-184.dsl.static.sonic.net] has joined #ruby-lang
lzell [lzell!~lzell@75-101-96-184.dsl.static.sonic.net] has quit [#ruby-lang]