Older blog entries for RickMuller (starting at number 38)

PyOpenGL: I recently came across the following error while building PyOGL on RH9.0 under both Python 2.2 and 2.3.2 warning: error while loading Togl.so: can't find package Tk 8.1 'setup.py build' worked fine, I only saw this error upon running 'setup.py install'. I'm running Tk8.3, so I don't know why it's looking for 8.1. I've built PyOGL on Mac OS X/fink and RH8.0 and have never before seen this problem. I googled the error and found a couple of other occurances of this error (e.g. here), but no suggested work arounds.

Got a response to this from Mike Fletcher, who referred me to this web page, where Craig Kaplan posts the following:

 One of your brave fellow students provided her laptop in what 
 proved to be a successful PyOpenGL linux building experience. 
 Here are some simple instructions.  They should work for, say, 
 RedHat 8/9 and Python 2.2 or 2.3.  I'll assume you're using 
 Python2.2 for these instructions -- the substitutions for 2.3 
 should be obvious. 
   1. tar xzvf PyOpenGL- 
      cd PyOpenGL- 
      python setup.py install 
 At this point we'll get to that mysterious "can't find Tcl 8.1" 
 error that some of you have experienced.  But a lot of the 
 files we need have already been installed. 
   4. Edit the file "setup/togl_setup.py".  Look for the lines 
       # make package index for tcl/tk 
       if not dry_run: 
      Change "if not dry_run:" to "if 0:" to disable the block of 
      code that follows. 
   5. Edit the file 
      (the name may be slightly different for you).  Add the following lines 
      to the end of it: 
 ------------ CUT HERE -------------- 
 if {![package vsatisfies [package provide Tcl] 8]} {return} 
 package ifneeded Togl 1.6.0 \ 
      [list load [file join $dir Togl.so] Togl] 
 ------------ CUT HERE -------------- 
   6. Go back to the PyOpenGL- directory and re-run 
      "python setup.py install".  This time the installation should 
      run until the end. 
   7. Don't try to test that it works from within the PyOpenGL 
      source directory -- it fails for some reason.  Switch to 
      a different directory and try "from OpenGL.Tk import *" 
      from within a Python session.  You shouldn't get any errors, 
      and a small window should appear on the screen. 

Python editors:

Found a thread on Python editors in this article. Made me think a bit about my own environment, which is Emacs with the Emacs Python Mode, which I'm happy with. But I'd be interested in an editor that supported folding, such as SciTe, Leo, or the PythonCard Editor. This Page has an extensive list and links to all editors. There's a thread here about implementing a folding mode in emacs, which is probably the way I'll have to go, since I'm too much of a mossback to change drastically.

After reading stories all year about the ascendancy of desktop linux all year, this story about IBM's plans to port MS Office to linux is one of the first that I think justifies the desktop linux hype. It is clear that to co-operate with other users, MS Office is essential. Alternatives like OpenOffice, though improving and interesting, simply are not viable yet for most non-nerd users. This is why the IBM move is a significant one. IBM has the business acumen and the corporate infrastructure to pull something like this off. I think with a real MS Office port, desktop linux is a real possibility for most computer users.

That being said, Macintosh OS X already has a compatible MS Office, and it isn't exactly taking over the desktop market, despite a look-and-feel vastly superior to either Windows or any of the Linuxes. I've been using OS X for years, and find it satisfies my Unix hacker side and my make-my-manager-happy side with ease and finese. I think functions like NetMeeting (still missing on OS X) might need to be included for a real business user to contemplate switching, tho'.

But it's an important step, maybe the most interesting news on alternatives to Windows since Apple bought NeXT and brought Steve Jobs back into the fold.

Obviously I'm not posting enough. Here are some interesting links:

C&E News reports Angstrom resolution of nanofiber growth. The work was done by (among others) Jens Norskov, a brilliant experimental/theoretical physicist in Denmark. It's a great example of how theory and experiment can work together well.

As someone who has been in too many pointless meeings, I found this article brilliant.

Good article by Mark Lutz about programming mistakes in Python.

s it just me, or does it seem like half of the *NIX packages expect prefix to be /usr, and the other half expect it to be /usr/local?

Biggles is a great plotting package for Python. I've been using the Gnuplot/python module for years, but biggles is a much cleaner, much easier to use program. Now if I could only figure out how to do double-y plots...

The PyGtk GLArea bugzilla page has again been updated. It appears that this was a problem on Linux, except that the problem manifested itself as never crashing, as opposed to OS X, which it always crashed. In any case, I think that the pygtk code can now be safely patched and committed.

12 Jan 2004 (updated 12 Jan 2004 at 21:01 UTC) »
Gnu Multiprecision library bindings in Python The gmpy module contains bindings for the gnu multiprecision library. The release notes say that it only works for Python 2.3, but I successfully got it to work on Python 2.2. Way, way cool.

For example, the following is an implementation of the Lucas-Lehmer test for Mersenne primes:

def lucas(p):
    "Test whether 2^p-1 is a Mersenne prime"
    s = 4
    val = pow(2,p)-1
    for i in range(3,p+1): s = (s*s-2)%val
    return not s
Using normal python long integers, this routine is an interesting toy, but not much else. However, with the gmpy libraries, you can grind away until your Powerbook G4 burns your lap:
def lucas_gmp(p):
    "Test whether 2^p-1 is a Mersenne prime"
    from gmpy import mpz
    s = mpz('4')
    val = pow(2,p)-1
    for i in range(3,p+1): s = (s*s-2)%val
    return not s
Way to go, Alex and Gustavo!

Nova episode on Mars Spirit Just watched the recent Nova episode on the recentMars Spirit landing. Almost didn't watch it, since I thought I knew everything about the mission, but was incredibly moved by the episode. If you haven't seen it, track it down.

Pie-thon You just have to love the Pie-Thon which pits the Python interpreter against Parrot, which started as an April Fools Joke. Guido doesn't seem to be particularly worried, but he may be suprised. What's good for Python is good for me, and this is very good for python.

Hydrogen economy criticized? The current issue of the The Utne Reader has a reprint of an article by David Morris from Alternet critical of the hydrogen economy (paid subscription required, but the author voices similar views here.

One of the central points of Morris' criticism is that the hydrogen economy is not in general a renewable technology, and that lots of hydrocarbons will need to be reformed to produce hydrogen gas. But one thing that Morris fails to take into account is that methane is currently a waste product of petroleum drilling: lots of methane is produced by drilling for oil, but since methane is a gas, and thus expensive to transport, it is usually flared at the oil field rather than being used for fuel. Despite a great deal of effort in the chemical community via Fischer-Tropsch catalysis or low-temperature methane-to-methanol catalysts, there is still no efficient way of using methane produced in this manner other than reforming to produce hydrogen and carbon monoxide ("town gas" or "syn gas").

Reforming may not be the ultimate answer, but if you're going to release the carbon from methane into the atmosphere, why not get some energy out of it first?

AlanHorkin: I couldn't agree more. And there are different levels of computer illiteracy as well. Just to take an example of something that I know something about, it used to be that most people who had a Ph.D. in quantum chemistry, computational materials science, or computational physics could actually write software, but this ability is harder and harder to find, as more Ph.D. theses are done using canned software. The reason that I bring up this (extremely narrow) example is that I think if the technically elite aren't fully literate, what does this say about problems with every day computer users?

Thank the god of your choice for things like LEGO Mindstorms that, by making programming fun, and by giving tangible benefits of that programming to everyday people, introduce many more people to programming than ever would otherwise see the insides of a piece of software.

Robocode over at IBM dev works has the same idea in a pure software approach. When my son is ten I'll probably look for something like this to teach him programming with.

I also really like what the people over at VPython are doing.

I highly recommend the article from David Pogue available here.

Ironically, today's Dilbert strip touches on a similar issue.

Both of these touch on what Pogue calls passive agressive robbery, the fact that if there are problems with a rebate, or a billing to a health care provider, that most people will only pursue the issue so far.

I've been burned by this time and again. I stopped shopping at Circuit City because twice now I've bought items counting on a rebate that never came through. I think that this will be an increasingly common problem.

24 Oct 2003 (updated 24 Oct 2003 at 15:19 UTC) »

Read Terry Pratchett's Night Watch the other weekend. Perhaps the best Pratchett book thus far, which is saying a lot. You would need to read a few of the City Watch books before reading that one (The Fifth Elephant is where I started), but, if you have, I highly recomment it.

We seem to have a glut of Python documentation tools: pydoc, which comes bundled with Python, HappyDoc, and PythonDoc (an implementation of JavaDoc for Python. Anyone care to compare and contrast for me?

braden: Thanks for setting me straight on Cortona! My mistake.

Saddened by news of Elliott Smith's suicide. Smith was everything that is right about music today, and I find it heart-wrenching that a person with so much talent couldn't find anything worth living for.

A follow-up on my earlier post today regarding VRML, since I was interrupted by a meeting and had to end the post early...

"Cortona" is the name of the former cosmoviewer, and can be downloaded from the ParallelGraphics web page.

I received one email pointing out X3D. A good article on X3D is available here. IMHO, there are impressive improvements (XML, nurbs) in X3D, it *deserves* to succeed, and I would love to see it happen, but I also remember the lack of response to VRML, and have a feeling we won't be seeing a web3d revolution anytime soon.

But I hope I'm wrong...

What happened to VRML? When it first came out I thought it was the answer to my prayers: a portable, easy to write, easy to read, non-propriatary format for 3d graphics. I guess that the size of the resulting files was one of the limitations. It is prohibitively expensive to ship non-trivial VRML files across the web. The lack of good viewers was another limitation: after SGI began to flounder, they spun off their Cosmo viewer, but I can't even recall the name of the resulting viewer -- I think it starts with a "C", but there's only so many times I'm willing to load a program that crashes my browser.

I really hate browser plug-ins, and am glad to see them dying. Why are separate applications such a bad thing? Why do we want one application (the web browser) to do everything?

My favorite VRML viewers are stand-alone. I like the VRMLView application from Systems in Motion, as well as the increasingly good and open source FreeWRL.

29 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!