MEETING: Tuesday, January 5th, 7pm, RHT

2 views
Skip to first unread message

Igal Koshevoy

unread,
Jan 4, 2010, 12:39:38 AM1/4/10
to Portland Ruby Brigade
The next Ruby Brigade meeting is coming soon. If you have a suggestion for a technical talk, discussion topic, questions you want answered, a group activity to do, etc ... please reply and prepare. You're also welcome to post suggestions at any time during the month.

I'd be particularly happy if we could get more 3-10 minute talks that quickly and casually showcase a method, tool, library or coding technique.

See you soon!

-igal

###

View map to venue and add the vent to your calendar: http://calagator.org/events/1250457975

ABOUT: he Portland Ruby Brigade is a user group for Ruby programmers in the Portland Oregon, area. Join other developers for presentations and discussions about Ruby and its uses.

VENUE: This meeting’s space is kindly provided by Robert Half Technology at their 2nd Floor Conference Room. Enter the KOIN Tower from SW Columbia between 2nd and 3rd Avenue, take the back elevators to the 2nd floor, and then follow the pdxruby signs.

Sam Livingston-Gray

unread,
Jan 4, 2010, 12:57:52 AM1/4/10
to pdx...@googlegroups.com
On Jan 3, 2010, at 9:39 PM, Igal Koshevoy wrote:
> I'd be particularly happy if we could get more 3-10 minute talks that quickly and casually showcase a method, tool, library or coding technique.

I may or may not be able to make it. But, if I do, I'd be happy to talk about a moderately clever technique I used to build what Rubyists call an "internal DSL"*, which allows methods to be defined in one block and invoked from child blocks.

-Sam

* (and everyone else just calls "an API")

Igal Koshevoy

unread,
Jan 4, 2010, 1:13:13 AM1/4/10
to pdx...@googlegroups.com
This is a useful technique, hope you can come to the meeting to present it.

> what Rubyists call an "internal DSL"

> [...]


> * (and everyone else just calls "an API")

And for making that declaration, you are also tasked with explaining at
the meeting how a DSL API is different than a non-DSL API and what the
pros/cons of each option are. :D

-igal

Sam Livingston-Gray

unread,
Jan 4, 2010, 12:47:05 PM1/4/10
to pdx...@googlegroups.com
On Jan 3, 2010, at 10:13 PM, Igal Koshevoy wrote:

> Sam Livingston-Gray wrote:
>> what Rubyists call an "internal DSL"
>> [...]
>> * (and everyone else just calls "an API")
> And for making that declaration, you are also tasked with explaining at
> the meeting how a DSL API is different than a non-DSL API and what the
> pros/cons of each option are. :D

Sure. Just as soon as you explain to me what a "DSL API" is. Do you mean you want a compare/contrast on:
- so-called "internal" vs "external" DSLs, or
- Ruby-style block abuse vs. a more Java-like API, or
- abused blocks that take arguments vs. abused blocks that use instance_eval? (the latter, btw, is what I picked; the hack I used takes advantage of instance_eval.)

...though I'll almost certainly go over 10 minutes if I have to do both. ;>

(Really, I'm just reflecting someone else's crankiness here; see: http://www.oreillynet.com/onlamp/blog/2007/05/the_is_it_a_dsl_or_an_api_ten.html )

-Sam

Joseph Cohen

unread,
Jan 4, 2010, 1:19:13 PM1/4/10
to pdx...@googlegroups.com
Should there be a mascot?  See here:  http://www.audubonportland.org/support-us/ways-to-give/adopt-wild-thing/ruby-page


--

You received this message because you are subscribed to the Google Groups "pdxruby" group.
To post to this group, send email to pdx...@googlegroups.com.
To unsubscribe from this group, send email to pdxruby+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pdxruby?hl=en.



Sam Livingston-Gray

unread,
Jan 4, 2010, 1:23:33 PM1/4/10
to pdx...@googlegroups.com
On Jan 4, 2010, at 10:19 AM, Joseph Cohen wrote:
> Should there be a mascot? See here: http://www.audubonportland.org/support-us/ways-to-give/adopt-wild-thing/ruby-page

New slogan! "Ruby: She'll eat your eye out!" (Also known as "garbage collection.")

[Note for the voices outside my head: this references http://www.cafepress.com/rubyshootout ]

-Sam

Markus Roberts

unread,
Jan 5, 2010, 10:49:59 AM1/5/10
to pdx...@googlegroups.com
Happy New Year Everyone!

Looking back over the past decade I noticed a disturbing trend. The
ruby hangman puzzles have been roughly following an exponential growth
pattern, from essentially non-existent in 2000 to the spec-ed out
behemoth we had in December. The New Year seems like as good a time
as any for a reset, a return to a simpler day when I could just have
the sucker memorized when I went to write it on the whiteboard.

So this month, I give you:

a = 1
b = {nil=>a}
c = b.invert
puts _-_

When I run it, it prints "false" (with, as always, the proper choices
for the "_"s).

-- Markus

Sam Livingston-Gray

unread,
Jan 5, 2010, 5:38:32 PM1/5/10
to pdx...@googlegroups.com
On Jan 5, 2010, at 7:49 AM, Markus Roberts wrote:
> a = 1
> b = {nil=>a}
> c = b.invert
> puts _-_
>
> When I run it, it prints "false" (with, as always, the proper choices
> for the "_"s).

Markus-

Can we assume anything about the command line used to invoke this? (=

-Sam

Reid Beels

unread,
Jan 5, 2010, 5:42:56 PM1/5/10
to pdx...@googlegroups.com
You mean you don't run _all_ of your scripts with "ruby -adlpvw"??
Blasphemer.

Reid

Bryan Stearns

unread,
Jan 5, 2010, 5:47:27 PM1/5/10
to pdx...@googlegroups.com
I've only found 11 ways to fill in the blanks to get it to print "false" (the first three lines are optional for 10 of them; the second and third are optional for the other).

Duncan Beevers

unread,
Jan 5, 2010, 5:57:54 PM1/5/10
to pdx...@googlegroups.com
Bryan, I found a 12th way, if you *actually* remove the 2nd and 3rd lines.
As a bonus, you only have to replace one of the underscores!

Bryan Stearns

unread,
Jan 5, 2010, 6:02:00 PM1/5/10
to pdx...@googlegroups.com
Duncan,

Heh - I was trying to do that, but my 12th /one-underscore way only works in irb. I'm eager to see yours.

...Bryan

Igal Koshevoy

unread,
Jan 5, 2010, 8:04:58 PM1/5/10
to Portland Ruby Brigade
Bring your discussion topics, challenges and such with you. I suspect
we'll have a more discussion-oriented meeting this time.

I can talk some about adventures in spam fighting using:
- rakismet: Ruby Akismet client
- rdefensio: Ruby Defensio client
- bishop: Ruby Bayes classifier
- classifier: Ruby Bayes classifier

See you tonight.

-igal

Duncan Beevers

unread,
Jan 5, 2010, 9:01:09 PM1/5/10
to pdx...@googlegroups.com
I wondered if there might be more solutions I hadn't found, so I brute-forced it.

http://gist.github.com/269933

This should significantly decrease the amount of fun we have with Markus' puzzles! (until he includes more than 3 or 4 underscores)

Markus Roberts

unread,
Jan 5, 2010, 8:58:24 PM1/5/10
to pdx...@googlegroups.com
>
> a = 1
> b = {nil=>a}
> c = b.invert
> puts _-_
>
> When I run it, it prints "false" (with, as always, the proper choices
> for the "_"s).

Gosh, I'm really sorry about this. It appears I typoed. The last
line should be:

puts __-

-- Markus

Reply all
Reply to author
Forward
0 new messages