(It's just work avoidance day, I guess...)
More on Ruby
I became curious about Ruby's approach to threads after reading about Cilk, a neat-looking extension of the C language that provides a system for doing multithreaded parallel programming. (Cilk's magic is in the scheduler, it seems.)
One of the persistent nags about CPython is that the global interpreter lock prevents execution of threads on multiple processors. If Ruby handled it differently (& "better"), maybe we could swipe the idea for Python. Long story short: after a bit of investigation, I infer that the Ruby interpreter isn't thread safe [1], [2]. (FWIW, after having written several C extension modules for Python, I think the way Python handles it is very clean and simple.)
Hmm, now that I think of it, I'm a bit surprised that Dr. Dobbs' troll article didn't trigger any (blog) discussion of the GIL in Python...
Extending Python, GvR, and the benefits of dictatorship
Damien Katz wrote a great story about his experience with the Lotus Notes Formula Engine, and I just wanted to share this quote:
Now you might think that I produced a bunch of design documents and specifications and presented them to the various senior engineers and architects, but I didn't. I remember being surprised by this myself. Even Wai Ki [his boss] didn't have much to say about my design or how it should be implemented. The philosophy was that if I did those things, everyone would meddle with the design and nothing would get done. It's truly easier to ask forgiveness than to ask permission, not to mention things get done a lot faster if you just do them.
I think the application in the context of the decorator and static types kerfuffles is pretty obvious. Even if I disagree with some of GvR's decisions, it's clear that sometimes (often? always?) the vision of a strong dictator is preferable to design by the masses ;).
Still, I must have missed something: on the Amazon Web Services Blog, GvR is caught saying "It may take another generation of programmers to get over the prejudice for static typing." I can't find the reference now (google only does so much when you can't remember any !#%!#%! keywords) but there's someone syndicated on PlanetPython who said, in effect, "GvR just wants to put this stuff in to Python to demonstrate that static typing doesn't matter". Hmmmmmmmmmmmmmmmmmm...
Backing up Advogato diaries
sye asks how my pull-advogato script differs from using wget to pull down the diary.
Maybe I'm missing something, but here goes:
- One is programmatic, one is not. Since I was using this to try
switching to PyBloxsom, with a
slightly different post format, I wanted to do some content
modification. (I removed the content modification from the version
posted.)
- One pulls down the entire diary, the other pulls down only new entries.
(It can easily be changed to pull down only modified entries, but that
was less useful than I thought because of the way pybloxsom works.)
- One requires the use of an XML parser to grok the output, the other
does not.
He is, of course, 100% accurate about there being no difference for the purpose of making a backup - although I don't think advogato takes its own XML back in, per se, so you couldn't restore directly from the XML.
ORMs are Object-Relational Mappings
I was unnecessarily gnomic the other day when I was thinking aloud about PostgreSQL and cucumber. Still, someone understood me; Jacob Smullyan also uses PostgreSQL's table inheritance to underlay Python class inheritance, but he does it using PyDO ("use the latest code from CVS", he said). Someday soon I hope to meander through PyDO and SQLObject and steal any good ideas for my own code.
"Testing Darwin"
Discover magazine just published a great article on Avida. Good stuff!
--titus
p.s. mirwin -- thanks!
