Bobbing for Kernels

See Bob. See Bob bob. Bob, Bob, bob!

Posts Tagged ‘parsing’

Scheming, part 7. The Reader.

Posted by kernelbob on May 21, 2009

I haven’t ‘blogged about my Scheme interpreter in ages.  Development stopped from January through March, but I’ve been working on it again.  Here are links to the earlier articles.

The biggest new development  is the reader.  Most developers call them parsers, but Lisp people call them readers.  I have written six readers for Scheme now, and I’ve effectively completed a class in advanced parsing theory.  The current reader works very well, and I do not want to write another.

Read the rest of this entry »

Posted in computers, languages | Tagged: , , , , , , | 3 Comments »

Bimorphic methods in Python

Posted by kernelbob on June 15, 2008

Methods in Python are either instance methods (the default), static, or class methods.  You can create the latter two using the @staticmethod and @classmethod decorators.

But maybe it would be better to have a single function that can be called either as a class method or an instance method.  I coined the term bimorphic method for this, and I wrote a decorator that can make a method bimorphic.

Read the rest of this entry »

Posted in computers | Tagged: , , | 2 Comments »