From mghaught at gmail.com Mon Jul 2 19:11:40 2007 From: mghaught at gmail.com (Marty Haught) Date: Mon, 2 Jul 2007 17:11:40 -0600 Subject: [Boulder Ruby Group] BRG - July Meeting - Jul 18th Message-ID: <57f29e620707021611j2adfa2b9s1584b81fa80aa0c5@mail.gmail.com> Hi Everyone, The Boulder Ruby Group will hold its July meeting on Wednesday the 18th at 6:30pm. We'll be meeting in Collective Intellect's new location just over a block to the east. I've updated the directions on our website, http://boulderruby.org, so please refer to it for more information. We haven't scheduled any presentations yet. Several of you have offered to speak on a topic for one of our upcoming meetings. Please let us know if you'll be ready for the July meeting. We also have plenty of openings in the coming meetings so if you have some ideas, let us know. I will be updating the website with details as they're available. Cheers, Marty From ara.t.howard at gmail.com Mon Jul 2 21:12:01 2007 From: ara.t.howard at gmail.com (ara.t.howard) Date: Mon, 2 Jul 2007 19:12:01 -0600 Subject: [Boulder Ruby Group] [ANN] flatulent-0.0.1 - ascii captcha for the masses Message-ID: NAME flatulent : CAPTCHA for FIGLET. SYNOPSIS the flatulent gem provides brain dead simple ascii art captcha for ruby. URI http://codeforpeople.com/lib/ruby http://rubyforge.org/projects/codeforpeople INSTALL gem install flatulent EXAMPLE def index if params.has_key? 'flatulent' Flatulent.validate! params end render :inline => <<-html #{ Flatulent.form } html end DOCS see source in lib/* see example rails project in ./rails ONLINE SAMPLES http://drawohara.tumblr.com/post/4791838 enjoy. -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama From josh at multipart-mixed.com Mon Jul 2 22:28:03 2007 From: josh at multipart-mixed.com (Josh Carter) Date: Mon, 2 Jul 2007 20:28:03 -0600 Subject: [Boulder Ruby Group] [ANN] flatulent-0.0.1 - ascii captcha for the masses In-Reply-To: References: Message-ID: <7A100E19-96BE-44E2-A088-2FE9B715F1E8@multipart-mixed.com> That's hysterical. Oh, and useful too, but mostly hysterical. :) FYI, another interesting captcha system out there is ReCaptcha: http://recaptcha.net/ It uses captcha responses to help correct OCR errors in scanned books. Nice cause. I think there's some Rails plugins for it already, but it's also dirt simple to integrate with from scratch. I made a Movable Type plugin for it rather fast, and that included learning the (mostly undocumented) MT plugin API *and* remembering first-hand all the reasons I hate Perl. -Josh On Jul 2, 2007, at 7:12 PM, ara.t.howard wrote: > > NAME > > flatulent : CAPTCHA for FIGLET. > > SYNOPSIS > > the flatulent gem provides brain dead simple ascii art captcha for > ruby. > > URI > > http://codeforpeople.com/lib/ruby > http://rubyforge.org/projects/codeforpeople > > INSTALL > > gem install flatulent > > EXAMPLE > > def index > if params.has_key? 'flatulent' > Flatulent.validate! params > end > > render :inline => <<-html > > > #{ Flatulent.form } > > > html > end > > DOCS > > see source in lib/* > see example rails project in ./rails > > ONLINE SAMPLES > > http://drawohara.tumblr.com/post/4791838 > > > enjoy. > > -a > -- > we can deny everything, except that we have the possibility of being > better. simply reflect on that. > h.h. the 14th dalai lama > > > > _______________________________________________ > Bdrg-members mailing list > Bdrg-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/bdrg-members From ara.t.howard at gmail.com Wed Jul 4 17:58:50 2007 From: ara.t.howard at gmail.com (ara.t.howard) Date: Wed, 4 Jul 2007 15:58:50 -0600 Subject: [Boulder Ruby Group] [ANN] flatulent-0.0.2 - ajax gets stinky Message-ID: <71247AF4-831C-46C9-8235-5C312E4AAD56@gmail.com> NAME flatulent : CAPTCHA for FIGLET. SYNOPSIS the flatulent gem provides brain dead simple to use, but internally cunning, ascii art captcha for ruby. URI http://codeforpeople.com/lib/ruby http://rubyforge.org/projects/codeforpeople HOW DO I GET FLATULENT? gem install flatulent HISTORY 0.0.2 - ajax gets stinky: Flatulent.ajax! the result of this new addition is that the captcha itself doesn't appear in the source file at all - blowfish encoding for timebomb and captcha fields - auto server key configuration using hostname and mac address - improved noise algorithm - improved character placement (chars shared edges to make ocr'ing harder) 0.0.1 - initial version RAILS EXAMPLES REGULAR METHOD (LESS SECURE): def controller_action if params.has_key? 'flatulent' Flatulent.validate! params end render :inline => <<-html #{ Flatulent.form } html end AJAX METHOD (MORE SECURE): def controller_action if params.has_key? 'flatulent' Flatulent.validate! params end render :inline => <<-html <%= javascript_include_tag 'prototype' %>
<%= Flatulent.ajax %>
html end DOCS see source in ./lib/* see the example rails project in ./rails ONLINE SAMPLES http://drawohara.tumblr.com/post/4944987 ONLINE DEMO OF AJAX METHOD http://fortytwo.merseine.nu:3000/flatulent/ajax -- try to break it! enjoy. -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama From ara.t.howard at gmail.com Fri Jul 6 23:41:40 2007 From: ara.t.howard at gmail.com (ara.t.howard) Date: Fri, 6 Jul 2007 21:41:40 -0600 Subject: [Boulder Ruby Group] [ANN] raptcha-0.0.1 Message-ID: NAME raptcha SYNOPSIS low drain bamage, storage-less, session-less, plugin-less, zero admin, single-source-file secure captcha system for ruby and/or rails DESCRIPTION raptcha manages image generation via a streaming controller. the result is that no disk storage is ever needed for captcha images. it also manages authentication via blowfish encoded hidden fields, obviating the need for session/database interaction for captcha validation. the library is useful outside of rails, even from the command line. INSTALL DEPENDS ### sudo port install ImageMagick rb-rmagick GEM gem install raptcha --no-wrappers SINGLE FILE INTO RAILS APP cp raptcha.rb ./app/lib/ URIS http://codeforpeople.com/ http://rubyforge.org/projects/codeforpeople EXAMPLES GENERATE A SET OF TAGS TO FOR CAPTCHA PLUS FORM INPUT FIELDS Raptcha.input :foreground => 'pink', :background => 'mauve', :distort => 'low' GENERATE AN INLINE (Base64 encoded png) INPUT TAG SET Raptcha.input(( :inline => true, :foreground => 'pink', :distort => 'low', :width => 142, :height => 42, :type => 'jpg' )) USING IN RAILS 1) setup the raptcha controller prompt:~/rails_root/ > raptcha generate controller 2) use in your controllers class WickedEasyController < ApplicationController def form @valid = Raptcha.valid? params render :inline => <<-rhtml valid :<%= valid %>
<%= Raptcha.input %>
rhtml end end COMMAND LINE USAGE ruby raptcha.rb foreground:pink > pink.png && display ping.png ruby raptcha.rb generate lib SAMPLES see http://drawohara.tumblr.com/post/5125054 DOC vim raptcha.rb enjoy. -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama From mghaught at gmail.com Tue Jul 10 01:21:48 2007 From: mghaught at gmail.com (Marty Haught) Date: Mon, 9 Jul 2007 23:21:48 -0600 Subject: [Boulder Ruby Group] July Topics Message-ID: <57f29e620707092221w62fec1c9pafcb41f749bf10c5@mail.gmail.com> Hi Everyone, I haven't received any emails on presentations for our July meeting. Is no one interested in talking? Should we just cancel the July meeting and have a break for July? If you're willing to share with the group, let me know. Another idea that I had is to have a recipes night where we share some of our Rails recipes with the group. I've just finished writing two recipes for the Advanced Rails Recipes book and could talk briefly about them. Anyone else? One other thing to mention, on the new site I have a section for members' blogs. Do any of you want your blog listed here? If so send me an email offlist with the details and url. Cheers, Marty From ara.t.howard at gmail.com Tue Jul 10 01:56:36 2007 From: ara.t.howard at gmail.com (ara.t.howard) Date: Mon, 9 Jul 2007 23:56:36 -0600 Subject: [Boulder Ruby Group] July Topics In-Reply-To: <57f29e620707092221w62fec1c9pafcb41f749bf10c5@mail.gmail.com> References: <57f29e620707092221w62fec1c9pafcb41f749bf10c5@mail.gmail.com> Message-ID: <442411F2-16DC-443D-9356-DF9D5116B750@gmail.com> On Jul 9, 2007, at 11:21 PM, Marty Haught wrote: > I haven't received any emails on presentations for our July meeting. > Is no one interested in talking? Should we just cancel the July > meeting and have a break for July? i can share a few new libraries tagz - simplest markup for ruby raptcha - easiest catpcha system for ruby flatulent - ascii captcha for ruby and this could easily have a coding challenge beer - a bit earlier than normal regards -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama From jeremy at hinegardner.org Tue Jul 10 05:01:32 2007 From: jeremy at hinegardner.org (Jeremy Hinegardner) Date: Tue, 10 Jul 2007 03:01:32 -0600 Subject: [Boulder Ruby Group] July Topics In-Reply-To: <57f29e620707092221w62fec1c9pafcb41f749bf10c5@mail.gmail.com> References: <57f29e620707092221w62fec1c9pafcb41f749bf10c5@mail.gmail.com> Message-ID: <20070710090132.GI1928@hinegardner.org> On Mon, Jul 09, 2007 at 11:21:48PM -0600, Marty Haught wrote: > Hi Everyone, > > I haven't received any emails on presentations for our July meeting. > Is no one interested in talking? Should we just cancel the July > meeting and have a break for July? If you're willing to share with > the group, let me know. Another idea that I had is to have a recipes > night where we share some of our Rails recipes with the group. I've > just finished writing two recipes for the Advanced Rails Recipes book > and could talk briefly about them. Anyone else? I could chat about a few projects I have running too, still alpha/beta stuff but I could chat about them: heel - small static-page-only webserver based on mongrel rabal - ruby architecture for building applications and libraries I know Tim and I have both been working on some C extensions recently, maybe we could do something on writing extensions. enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner jeremy at hinegardner.org From ara.t.howard at gmail.com Tue Jul 10 10:56:50 2007 From: ara.t.howard at gmail.com (ara.t.howard) Date: Tue, 10 Jul 2007 08:56:50 -0600 Subject: [Boulder Ruby Group] July Topics In-Reply-To: <20070710090132.GI1928@hinegardner.org> References: <57f29e620707092221w62fec1c9pafcb41f749bf10c5@mail.gmail.com> <20070710090132.GI1928@hinegardner.org> Message-ID: <1E96F544-942B-4F0B-BF47-25C5458FAFAE@gmail.com> On Jul 10, 2007, at 3:01 AM, Jeremy Hinegardner wrote: > > I could chat about a few projects I have running too, still alpha/beta > stuff but I could chat about them: > > heel - small static-page-only webserver based on mongrel > rabal - ruby architecture for building applications and libraries > > I know Tim and I have both been working on some C extensions recently, > maybe we could do something on writing extensions. > sounds cool - maybe a round of lightning talks then? -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama From ara.t.howard at gmail.com Wed Jul 11 20:32:01 2007 From: ara.t.howard at gmail.com (ara.t.howard) Date: Wed, 11 Jul 2007 18:32:01 -0600 Subject: [Boulder Ruby Group] ar save! problem Message-ID: anybody every seen this behaviour: @model.save! # no error @model.update # no error Model.find @model.id # raises seems impossible... -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama From tony at clickcaster.com Wed Jul 11 20:40:01 2007 From: tony at clickcaster.com (Tony Arcieri) Date: Wed, 11 Jul 2007 18:40:01 -0600 Subject: [Boulder Ruby Group] ar save! problem In-Reply-To: References: Message-ID: There's a #update instance method? I'm looking at the ActiveRecord::Base docs and I don't see it documented there. Just trying it out here it returns the primary key of the record, and the sequence you describe seems to be working fine. -- Tony Arcieri ClickCaster, Inc. tony at clickcaster.com On 7/11/07, ara.t.howard wrote: > > > anybody every seen this behaviour: > > @model.save! # no error > @model.update # no error > Model.find @model.id # raises > > seems impossible... > > > -a > -- > we can deny everything, except that we have the possibility of being > better. simply reflect on that. > h.h. the 14th dalai lama > > > > _______________________________________________ > Bdrg-members mailing list > Bdrg-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/bdrg-members > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/bdrg-members/attachments/20070711/d9dee742/attachment.html From tony at clickcaster.com Wed Jul 11 22:42:07 2007 From: tony at clickcaster.com (Tony Arcieri) Date: Wed, 11 Jul 2007 20:42:07 -0600 Subject: [Boulder Ruby Group] ar save! problem In-Reply-To: References: Message-ID: What's the #update instance method supposed to do? Are you wanting to preserve @model as it exists after calling #save! / #update? Otherwise you might consider #reload -- Tony Arcieri ClickCaster, Inc. tony at clickcaster.com On 7/11/07, ara.t.howard wrote: > > > On Jul 11, 2007, at 6:40 PM, Tony Arcieri wrote: > > There's a #update instance method? I'm looking at the ActiveRecord::Base > docs and I don't see it documented there. Just trying it out here it > returns the primary key of the record, and the sequence you describe seems > to be working fine. > > > yeah - it works __most__ of the time for me. then sometimes not. very > weird. > > -a > -- > we can deny everything, except that we have the possibility of being > better. simply reflect on that. > h.h. the 14th dalai lama > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/bdrg-members/attachments/20070711/4e34a99f/attachment.html From tim.pease at gmail.com Wed Jul 11 23:01:42 2007 From: tim.pease at gmail.com (Tim Pease) Date: Wed, 11 Jul 2007 21:01:42 -0600 Subject: [Boulder Ruby Group] ar save! problem In-Reply-To: References: Message-ID: <69f66b790707112001j31ff7fdfxfbc7713226399737@mail.gmail.com> On 7/11/07, ara.t.howard wrote: > > anybody every seen this behaviour: > > @model.save! # no error > @model.update # no error > Model.find @model.id # raises > > seems impossible... > > Does this happen only with newly created Model objects, or does this happen with Model objects loaded from the database? Does AR guarantee that it keeps the AR object and the database tables in sync at all times? It seems like that would be hard to do for newly created objects. Just another thought. Is your @model.id valid when you call Model.find? TwP From david at collectiveintellect.com Thu Jul 12 00:22:52 2007 From: david at collectiveintellect.com (David Clements) Date: Wed, 11 Jul 2007 22:22:52 -0600 Subject: [Boulder Ruby Group] ar save! problem In-Reply-To: <69f66b790707112001j31ff7fdfxfbc7713226399737@mail.gmail.com> References: <69f66b790707112001j31ff7fdfxfbc7713226399737@mail.gmail.com> Message-ID: <9A8056C0-5DFB-4835-A7FD-D3C102781826@collectiveintellect.com> On Jul 11, 2007, at 9:01 PM, Tim Pease wrote: > On 7/11/07, ara.t.howard wrote: >> >> anybody every seen this behaviour: >> >> @model.save! # no error >> @model.update # no error >> Model.find @model.id # raises >> >> seems impossible... >> >> > > Does this happen only with newly created Model objects, or does this > happen with Model objects loaded from the database? > > Does AR guarantee that it keeps the AR object and the database tables > in sync at all times? It seems like that would be hard to do for newly > created objects. > > Just another thought. Is your @model.id valid when you call > Model.find? > > TwP I am assuming that id is nil ,right? What if you do a something like Model.find_by_some_other_uniqe_key? What does model.valid? return. Does the SQL look right in the log? Anything weird with your model? primary_key is AR standard? Dave > _______________________________________________ > Bdrg-members mailing list > Bdrg-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/bdrg-members From tim.pease at gmail.com Tue Jul 17 11:26:54 2007 From: tim.pease at gmail.com (Tim Pease) Date: Tue, 17 Jul 2007 09:26:54 -0600 Subject: [Boulder Ruby Group] I need serious help! In-Reply-To: <20070716215533.DC51C50377@ws6-5.us4.outblaze.com> References: <20070716215533.DC51C50377@ws6-5.us4.outblaze.com> Message-ID: <69f66b790707170826hbbd650fv4fe78e25715d6f60@mail.gmail.com> On 7/16/07, Peter Booth wrote: > I'd encourage anyone who hasn't read Amy Hoy's perceptive > blog entry to do it ASAP and save themselves some frustration: > > http://slash7.com/articles/2006/12/22/vampires > The above is a little post from the ruby-talk mailing list. It was in response to a long, drawn out thread that diverged significantly from the original topic. But Peter Booth did post a great link to Amy Hoy's blog, and the issue is something I'd like to address in the Ruby community. I'd like to get some thoughts and feedback from our little group before venturing out to the Ruby community at large. Step #1 for fixing the problem: "Creating Resources" What resources do we have in the Ruby community? * http://ruby-lang.org * http://ruby-doc.org * http://rubygarden.org (can't connect to it right now) * http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml (Et al.) * http://www.rubyinside.com * and I'm sure there are many others that I don't know about What resources do we need in the Ruby community? * FAQ -- data mine the ruby-talk mailing list for the frequently asked questions, condense them down into a good, searchable FAQ page with coherent and authoritative answers. * Ruby specific search engine (Rollyo?) Any other resources that would be good to have? How do we go about creating these resources? Here are the two questions I'd like to talk about. 1) What Ruby resources would you point a "help vampire" to? (and don't just say Google) 2) What resource would you create to help someone learn Ruby -- i.e. the ultimate Ruby answer machine? For a start, it would be great to throw together a little page on the BDRG website that provides a "rules of the road" for asking questions and providing answers on the ruby-talk mailing list. Any thoughts on this one? That's it! I'd bring this up at tomorrow's meeting, but I'm heading off for a fishing trip. Thought I'd get everyone's little grey cells working on some creative solutions, in the mean time. Blessings, TwP From hhausman at gmail.com Tue Jul 17 11:48:54 2007 From: hhausman at gmail.com (Harold Hausman) Date: Tue, 17 Jul 2007 09:48:54 -0600 Subject: [Boulder Ruby Group] I need serious help! In-Reply-To: <69f66b790707170826hbbd650fv4fe78e25715d6f60@mail.gmail.com> References: <20070716215533.DC51C50377@ws6-5.us4.outblaze.com> <69f66b790707170826hbbd650fv4fe78e25715d6f60@mail.gmail.com> Message-ID: On 7/17/07, Tim Pease wrote: > * Ruby specific search engine (Rollyo?) > This is a ridiculous resource that is often overlooked: http://rubykitchensink.ca/ > Here are the two questions I'd like to talk about. > > 1) What Ruby resources would you point a "help vampire" to? (and don't > just say Google) Sometimes esr is grating, but I still believe in this page: http://www.catb.org/~esr/faqs/smart-questions.html imho, that whole thread could have been saved by a simple practice of not feeding the trolls. hth, -Harold From dan at eparklabs.com Tue Jul 17 12:17:39 2007 From: dan at eparklabs.com (Dan Fitzpatrick) Date: Tue, 17 Jul 2007 10:17:39 -0600 Subject: [Boulder Ruby Group] I need serious help! In-Reply-To: <69f66b790707170826hbbd650fv4fe78e25715d6f60@mail.gmail.com> References: <20070716215533.DC51C50377@ws6-5.us4.outblaze.com> <69f66b790707170826hbbd650fv4fe78e25715d6f60@mail.gmail.com> Message-ID: <469CEBA3.8070305@eparklabs.com> Tim, As far as a ruby-specific search, I think a Google custom search would work. You give it a list of domains to include and it only searches those. I can set this up if needed. Dan Dan Fitzpatrick ePark Labs - www.eparklabs.com dan at eparklabs.com +1 800 331-3133 x411 Tim Pease wrote: > On 7/16/07, Peter Booth wrote: > >> I'd encourage anyone who hasn't read Amy Hoy's perceptive >> blog entry to do it ASAP and save themselves some frustration: >> >> http://slash7.com/articles/2006/12/22/vampires >> >> > > The above is a little post from the ruby-talk mailing list. It was in > response to a long, drawn out thread that diverged significantly from > the original topic. But Peter Booth did post a great link to Amy Hoy's > blog, and the issue is something I'd like to address in the Ruby > community. > > I'd like to get some thoughts and feedback from our little group > before venturing out to the Ruby community at large. > > > Step #1 for fixing the problem: "Creating Resources" > > What resources do we have in the Ruby community? > * http://ruby-lang.org > * http://ruby-doc.org > * http://rubygarden.org (can't connect to it right now) > * http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml (Et al.) > * http://www.rubyinside.com > * and I'm sure there are many others that I don't know about > > What resources do we need in the Ruby community? > * FAQ -- data mine the ruby-talk mailing list for the frequently > asked questions, condense them down into a good, searchable FAQ page > with coherent and authoritative answers. > * Ruby specific search engine (Rollyo?) > > Any other resources that would be good to have? How do we go about > creating these resources? > > Here are the two questions I'd like to talk about. > > 1) What Ruby resources would you point a "help vampire" to? (and don't > just say Google) > 2) What resource would you create to help someone learn Ruby -- i.e. > the ultimate Ruby answer machine? > > For a start, it would be great to throw together a little page on the > BDRG website that provides a "rules of the road" for asking questions > and providing answers on the ruby-talk mailing list. Any thoughts on > this one? > > That's it! > > I'd bring this up at tomorrow's meeting, but I'm heading off for a > fishing trip. Thought I'd get everyone's little grey cells working on > some creative solutions, in the mean time. > > Blessings, > TwP > _______________________________________________ > Bdrg-members mailing list > Bdrg-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/bdrg-members > From ara.t.howard at gmail.com Tue Jul 17 12:51:20 2007 From: ara.t.howard at gmail.com (ara.t.howard) Date: Tue, 17 Jul 2007 10:51:20 -0600 Subject: [Boulder Ruby Group] I need serious help! In-Reply-To: <469CEBA3.8070305@eparklabs.com> References: <20070716215533.DC51C50377@ws6-5.us4.outblaze.com> <69f66b790707170826hbbd650fv4fe78e25715d6f60@mail.gmail.com> <469CEBA3.8070305@eparklabs.com> Message-ID: <34260240-3D78-4C22-8905-344030B38098@gmail.com> On Jul 17, 2007, at 10:17 AM, Dan Fitzpatrick wrote: > Tim, > > As far as a ruby-specific search, I think a Google custom search would > work. You give it a list of domains to include and it only searches > those. I can set this up if needed. i've organized my posts for easy searching for years. here's a start: http://groups.google.com/group/comp.lang.ruby/search?q=cat+a.rb +howard&start=0&scoring=d a @ http://drawohara.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama From tony at clickcaster.com Tue Jul 17 14:53:59 2007 From: tony at clickcaster.com (Tony Arcieri) Date: Tue, 17 Jul 2007 12:53:59 -0600 Subject: [Boulder Ruby Group] Builder is slow Message-ID: Last night I decided to hack together a more-or-less Builder-compatible frontend to libxml-ruby after dealing with the slowness of Builder. I was curious where the bottlenecks were. Builder obviously makes extensive use of method_missing, but after testing out method_missing I decided it wasn't that slow: 10 million normal method calls: 3.620000 0.000000 3.620000 ( 3.656555) 10 million method_missing calls: 4.190000 0.010000 4.200000 ( 4.193837) Other than that, Builder just does a lot of tag construction and is constantly appending to an output buffer. I didn't really see a better way to do this short of a native extension, so I decided to check out libxml-ruby's XML construction and try to write something Builder-compatible which uses it. I put together a simple proof-of-concept to see whether using libxml-ruby could improve the performance: http://pastie.caboo.se/79575 Not the most elegant thing in the world, but the benchmarks speak for themselves. Here's 3 runs of each, both from a fresh irb: libxml-ruby based proof-of-concept: >> puts Benchmark.measure { xml = XmlBase.new; xml.foo(:a => :b) { 100.times{ xml.bar(:c => :d) { 1000.times { xml.baz("Text goes here") } } } }.to_s } 3.130000 1.290000 4.420000 ( 4.433537) 2.850000 1.280000 4.130000 ( 4.133377) 2.810000 1.250000 4.060000 ( 4.070264) Builder: >> puts Benchmark.measure { xml = Builder::XmlMarkup.new; xml.foo(:a => :b) { 100.times { xml.bar(:c => :d) { 1000.times { xml.baz("Text goes here") } } } } } 9.300000 0.030000 9.330000 ( 9.374801) 9.290000 0.020000 9.310000 ( 9.315121) 9.280000 0.020000 9.300000 ( 9.316049) Using libxml-ruby is over twice as fast while still preserving API compatibility. It looks like Builder's slowdown comes from the actual tag construction/string appending being done in Ruby. -- Tony Arcieri ClickCaster, Inc. tony at clickcaster.com 720-227-0129 ext. 202 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/bdrg-members/attachments/20070717/c33fdbb0/attachment.html From mghaught at gmail.com Tue Jul 17 17:54:41 2007 From: mghaught at gmail.com (Marty Haught) Date: Tue, 17 Jul 2007 15:54:41 -0600 Subject: [Boulder Ruby Group] BRG - July Meeting Reminder - Jul 18th Message-ID: <57f29e620707171454p71f728d8l3b2c3c64508a43c9@mail.gmail.com> Hi Everyone, Here's the reminder email for tomorrow's Boulder Ruby Group meeting. We'll be meeting on July 18th at 6:30pm at Collective Intellect's new location just over a block to the east. Directions below. Our primary presentation for the night is "The Rortal Theophanies" by the folks over at Absolute Performance. Here's their description of the talk: Designing and coding in Ruby a portal for a large enterprise workflow system which is being enhanced for humongous loads and unspeakable performance has led to theophanies in that mystical borderland where quantity becomes quality. Absolute Performance Inc. shows its working "Rortal" monitoring portal and discuss novel extensions currently under development which will be presented at future BRG meetings. See you all there. Cheers, Marty Directions: Collective Intellect 1601 Pearl St, Suite 200 Boulder, CO 80302 The office is above the restaurants Aji & Leaf. The main entrance is on 16th Street, just North to of the Leaf restaurant. Come up the stairs to the second floor. URL to google maps: http://rubyurl.com/112 From ara.t.howard at gmail.com Wed Jul 18 03:41:39 2007 From: ara.t.howard at gmail.com (ara.t.howard) Date: Wed, 18 Jul 2007 01:41:39 -0600 Subject: [Boulder Ruby Group] [ANN] widgetz.rb Message-ID: <26F3D1DE-AB17-483A-835E-F769AF7FE65F@gmail.com> NAME widgetz.rb SYNOPSIS simple widgets for rails INSTALL gem install widgetz URIS http://rubyforge.org/projects/codeforpeople/ http://codeforpeople.com/lib/ruby/widgetz/ http://drawohara.tumblr.com/post/6060120 DESCRIPTION widgetz.rb aims to fix two problems with factoring and abstracting html generation in rails using the normal 'helper' methodolgy: 1) helper methods are purely procedural and provide no state. ruby is an object oriented language and we like to use objects to abstract things where possible. widgetz lets you do just that. some people call this encapsulation. 2) by using the normal rendering chain in rails, widgetz makes sure you get a nice stack stace from the location in the widgetz template where you used ruby's power blow your leg off instead of some esoteric message from an anonymous module you barely knew. widgetz are essentailly bags of data that use a controller to render themselves. all the state of the widget is made available in the view as local variables, while the normal @variables set in a controller remain visible as normal. one special local variable, 'widget', is set in the view's local vars so you have a handle on the widget in order to use it for some evil purpose. SAMPLE # # app/controllers/sample_controller.rb # def c @var = 42 @c = widget 'c' render :layout => 'application', :inline => <<-rhtml var: <%= @var %>
<%= @c %> rhtml end # # lib/widgets/c.rb # Widget 'c' do attribute 'var' => 'forty-two' def answer 42.0 end end # # app/views/widgets/c.rhtml # controller var : <%= @var %>
widget var : <%= var %>
widget method : <%= widget.answer %>
# # output # var: 42 ---------------------- controller var : 42 widget var : forty-two widget method : 42.0 DOCS lib/* sample/rails/* AUTHOR a @ http://drawohara.com/ enjoy. -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama From jobs at zingerding.com Tue Jul 24 01:19:45 2007 From: jobs at zingerding.com (Zingerding, Jobs) Date: Mon, 23 Jul 2007 22:19:45 -0700 (PDT) Subject: [Boulder Ruby Group] Looking for Ruby On Rails (RoR) Techie for Comics Startup Message-ID: <842884.59077.qm@web52810.mail.re2.yahoo.com> Do you ever clip out comic strips? Do you have books by Gary Larson and Bill Watterson, or servers named Snoopy, Garfield and Opus? Do you think today?s funny pages suck and need a swift kick in the ass? (So do we.) If you answered ?yes? to any of these questions, then you might be the geeked-out, web developer we?re looking for to help bring our kick-ass comic strips website to life! Zingerding? (http://www.zingerding.com) is an online platform for anyone to submit or read comic strips and incorporates several social features like sharing, ratings, commenting and more. Skill Set: We?re looking for a skilled, passionate programmer who can be a missionary in the disruption of the comic strip industry. We need a roll-up-your-sleeves techie with the following experience: Ruby on Rails and PHP4+ years as Web Applications engineer.3+ years in database design and data modeling (MySQL focus preferred)Network administration and programming in UNIX/Linux environments with extensive experience in ApacheMulti-level security database design.Dynamite HTML, CSS, Javascipt and Ajax skills We are also open to newbies who want to hone their skills on this exciting project! Compensation: We?re offering a piece of the pie, no salary at this time. This is an equity position for you to be a third partner in this venture. You get paid when we succeed (and sell out to Google for millions). Currently we have weekly meetings in Boulder, CO with weekly deliverables and your commitment to continuous progress is required, even as the pace may quicken toward launch. Local to Colorado or not, if you are a great programmer with an entrepreneurial mindset, we want to hear from you. Please submit a resume via email to be part of the Zingerding team. Please email us your resume at jobs at zingerding.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/bdrg-members/attachments/20070723/ffe0c1c9/attachment.html From aviggio at bivio.biz Tue Jul 31 10:55:45 2007 From: aviggio at bivio.biz (Alex Viggio) Date: Tue, 31 Jul 2007 08:55:45 -0600 Subject: [Boulder Ruby Group] [Fwd: [rmiug-jobs] Ruby Developer- Boulder] Message-ID: <46AF4D71.3080100@bivio.biz> FYI... not clear why the recruiter is advertising this as a Ruby dev job ("passionate in Java /J2EE"), but maybe some enterprising Ruby UG member will find out. - Alex -------- Original Message -------- Subject: [rmiug-jobs] Ruby Developer- Boulder Date: 30 Jul 2007 23:10:04 -0400 From: Cynthia Stutz To: rmiug-jobs at yahoogroups.com I am seeking only the best and most passionate in Java /J2EE Web development for a full time position. The ideal candidate has at least 7-10 years of experience developing rich browser applications and experience building scalable solutions. They must have demonstrated experience with Web application development (J2EE, JBoss, Oracle, Tomcat, Spring, AJAX, JavaScript, Ruby, XML, HTML, Web services). . Experience in collaboratively designing, developing and testing database driven web applications and agile/XP software development practices. Plan on: Leading the engineering team, collaboratively planning releases and committing to iteration deliverables. Get prepared to work for the best, the brightest and the most sought after employer! Please feel free to contact me should you have an interest. Thanks, Cynthia DSG systems is a client centric professional services firm headquartered in Greenwood Village, Colorado. Since 1995, DSG has focused on serving the software development needs of Colorado's front-range business community. We have successfully supported large scale commercial and government IT initiatives by combining cost effective services with specific industry expertise valued by our clients. While we try to respond to everyone personally, due to resume volume we are not always able to do so. Candidates are selected; based upon current requirement criteria and matching skill set. We wish to extend our apologies up front if we are unable to contact you. We thank you in advance for your time and consideration! Best wishes! Cynthia A. Stutz Director of Sales DSG Systems, Inc. 9250 E. Costilla Ave. #535 Englewood, CO 80112 303-790-0453x113 303-790-0866 Fax cstutz at dsgsys.com www.dsgsys.com "Experience Our Integrity" [Non-text portions of this message have been removed]