Posted by thepythonista on 2 June 2008
As I hinted at in my previous post, Andrew Dalke has written a very interesting piece of software: python4ply. Basically, he’s used ply to implement a parser and lexer for Python 2.5, in Python. The tutorial gives some neat examples of how you can modify this parser to enhance the grammar of Python. (My favorite is where he implemented syntax-level support for decimal.Decimal numbers.)
I’d definitely like to play with this a bit. He calls it a “half-formed macro system for Python,” and I see the similarity to Lisp macros. “Half-formed,” perhaps, because ply4python “macros” are basically second-class citizens: there’s no support for them in the language itself.
In spite of its limitations, this is definitely an interesting piece of software. Thanks, Andrew.
Posted in code, python | Leave a Comment »
Posted by thepythonista on 2 June 2008
In comp.lang.python, Perl is sometimes referred to as “that other P-language.” Sometimes it seems as if people are afraid to speak its name.
In spite of the title, this post isn’t specifically going to be about Perl. Rather, I’d like to talk a bit about programming languages in general, and, specifically, the characteristics of programming languages that I like.
Read the rest of this entry »
Posted in uncategorized | 2 Comments »
Posted by thepythonista on 26 May 2008
I want one of these. They’re readily available, so it’s just a matter of having the money. There’s just something about these old computers that’s inherently cool.
For the NeXT, part of the attraction is that Tim Berners-Lee hosted the first web site on it. Part of it is the sheer, black, uber-coolness of the design. The best part is, since they have ethernet, it’s easy to hook a NeXT up to the internet.
Yeah, I gotta get me one.
Posted in technolust | Leave a Comment »
Posted by thepythonista on 26 May 2008
I found a fascinating post over at The Py Side of Life that tells how to get Python syntax highlighting with the Unix command less:
The de-facto standard UNIX pager less supports an environment variable called LESSOPEN that can be set to the name of an input preprocessor. It is normally used to transparently view compressed files etc., but of course it can also colorize your source files using Pygments!
Read the entire post here.
Posted in code, python | Leave a Comment »
Posted by thepythonista on 26 May 2008
Since this is my first post, I suppose I should introduce myself:
Hi, I’m thepythonista!
Okay, now that that’s out of the way, I’d like to cheat a bit and ask you, my faithful readers, what sort of cool things you’re doing or have done with Python, and what you might like to see me write about in the future. For my part, I have used Python to:
- Write test scripts for an in-house application at work.
- Analyze error log files for an online game I help maintain.
- Help format my resume.
- Write an online game.
- And lots of other stuff.
How about you? Post a comment telling me what you’ve done with Python, and maybe I’ll write a more in-depth post about it in the future!
Posted in uncategorized | 2 Comments »