The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Mild Civil Mix of NormalManure

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Mild Civil Mix of NormalManure Posted: Mar 17, 2008 5:18 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Mild Civil Mix of NormalManure
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement

Saturday, I conceded to take part in that podcast that James and David and Michael do. This is not an advertisement. At all. It's a bunch of rambling and talking over each other, where my contribution is to take nothing seriously and mock much of what is said. I'm not sure they'll invite me back anytime soon.

At one point, we had a discussion about why there is no second and third methods. Pros and cons both ways of course. And we looked at some code in the system where at: 2 is used, and surmised what this told us.

Anyway, in flippancy, I suggested that one way of encoding a large range of at: someIndex methods tersely was to simply use roman numeral selectors. The nice thing about roman numerals is that they start at one, so they match Smalltalk code well. I was then challenged to make it do tail based access as well. I had said I would use case for this distinction, but in the end decided to use a trailing underscore to indicate that the selector should go from the back of the collection, rather than the front. Mixed case is supported.

What a pile of manure, huh? But such is the normal kind of fun hack for me. And it turns out that NormalManure is a nice anagram for "Roman Numeral", so I published it in the Open Repository under the name of NormalManure. The other part of the blog title composed of roman numeral characters (my second candidate for a goofy package name).

So, load that. Now instead of having to use verbose method names like first, you can just i. And if you want last, you just use i_. You can evaluate the expression of Object comment D which will return the 500th element of Object's comment. Enjoy.

Read: Mild Civil Mix of NormalManure

Topic: How do you get your ideas? Previous Topic   Next Topic Topic: Domain-Specific Modeling book now available

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use