Practical Metaprogramming: "Modeling Thought" 4.19 http://spkr8.com/t/7831

Description:

... Or, Lessons Learned While Using Ruby's MP System to Model a 2,500 Year-Old, Dead Language

During LSRC III's Reject Conf, I began a project to model the linguistic behavior of verbs in Classical Latin. Owing to the irregularity of human communication, modeling the provision of unambiguous answers (return values) to ambiguously asked things (flexible / incomplete method calls) might have required hundreds, if not thousands, of method definitions or static values entered in a database.

But what if heuristics could be given to a Ruby class such that it "thought" as language learners are taught to think? What if it could be taught to be flexible in respecting the ambiguous calls given and to still give precise, correct answers back - as human language learners are capable of doing? By adopting this design paradigm, code could become leaner and more reflective of human cognitive process.

Thankfully for Rubyists, this is not a dream, this is reality. Our programs can operate more intelligently, more heuristically, and more insightfully. We can save ourselves days of development time by integrating this next tier of metaprogramming patterns I propose to demonstrate. While I will demonstrate these patterns by modeling linguistics based on the LatinVerb library, these techniques have wider application across problem domains.

Comments on this Talk

Marina_city John McCaffrey, 12 Aug 07:18 PM

Great talk! Difficult subject, but I like the way Steven showed how meta programming allowed him to encapsulate a very complex problem. Also, appreciate that there was time for questions and good references listed.

5738722750_7bae0ccdcd_m Evan Light, 12 Aug 07:18 PM

Solid introduction to a typically tricky topic. Good stage presence and pacing.

Steve-sm srogers1, 12 Aug 07:33 PM

Nice down-to-earth presentation

Ben8 Ben Scheirman, 12 Aug 08:39 PM

Great talk!

Stringio Mike Hagedorn, 12 Aug 08:41 PM

Very informative. Thanks!

Mm_profile_med_bw expectationgap, 13 Aug 03:15 PM

Easily one of the best day-one talks. Steven absolutely killed the delivery, and this was a very densely packed talk. Fantastic... exactly what I came for.

Open-uri20110624-30770-1pxr6kb-0 Scott Johnson, 13 Aug 04:18 PM

Interesting topic and good explanation of core concepts. I would have rather seen examples of well-fromed classes with meta-elements over learning the complexity of conjugating Latin verbs.

Stringio weyus, 13 Aug 06:18 PM

Extremely accessible for both the novice and experienced Ruby hacker.

Stringio kevintriplett, 13 Aug 07:13 PM

A great topic, would love to have had more time to delve deeper, but I can understand, it was a lot of material to cover in < 45 minutes.

Avatar-missing-icon-03 Mike Manewitz, 14 Aug 09:12 PM

This was a great window into the power of metaprogramming concepts in Ruby. Not an in-depth how-to, but a practical use case dissected well.

Face2 Tim Tyrrell, 14 Aug 10:37 PM

You are a very good presenter. Very thoughtful talk.

Have an account? Sign in or register.

Leave a Comment

30 Ratings: 4.19

Delivery: 4.26

Content: 4.12

Last Five Ratings