4/09/2005

SSH authorized_keys problems

Note to self: whenever you have problems with SSH authorized_keys not working, check the permissions on the directories and files. Here are some quick instructions for getting SSH authorized_keys working on a new host:



ssh to the remote host and:



mkdir .ssh
chmod 700 .ssh


Back on the local machine:



cat .ssh/id_dsa.pub | ssh remotehost "cat > .ssh/authorized_keys; chmod 600 .ssh/authorized_keys"



3/22/2005

LiveTest

I'm at PyCon this week. PyCon is my favorite conference, ever. This year it is better than ever, with tons of people at the sprints and lots of activity.



amk told me "if you're sprinting and have gotten something
accomplished, please weblog it.", so I am :-)



Zac Bir and I sprinted on a simple PyObjC app which scratches a simple itch I have occasionally. He describes it more eloquently than I could.




While MacGregor is incredibly cool and fun, the exciting Nevow related thing I completed is LiveTest, a browser-based functional web testing framework. Since it lives in the browser and triggers actual browser events, it is capable of testing highly JavaScript based apps, such as LivePage apps. There is an example of using it to test a LivePage application, LiveAnimal, in Nevow now.



Finally, I released Nevow 0.4! There are lots of improvements and bugfixes in this release, which is available for download from here.



3/15/2005

Using Python to find Type/Creator codes

It has been a while since I needed to know about old-style Mac Type/Creator codes, but today I wanted to search my hard drive for files of a specific type. I thought you used to be able to drag a file into the find file Type box and it would automatically assign the Type to the input box, but this no longer seems to be the case on OS X.



I thought about downloading some utility which would allow me to see the Type code of a file of the same Type as the one I was trying to find, but then I realized I could probably do it with Python, and I was right.




>>> MacOS.GetCreatorAndType('/Volumes/Stormbringer/Audio/New Sessions/Guitar Project/Guitar')
('MOUP', 'PERF')


I also find myself occasionally using the Python REPL to do things like perform some quick math, convert between a char and the ordinal of that char, and look up unicode glyph names and resolve them. Instead of downloading some specific program to do some task, I have access to this vast functionality space which I can use to create my own utilities simply by remembering the steps to perform.



2/05/2005

Languages

I am always interested in new languages. I enjoy learning new ways of thinking about problems. While I was catching up on 6 months of unread NetNewsWire feeds, I read r0ml's post on languages and felt compelled to respond. r0ml doesn't seem to have comments or trackbacks enabled, but perhaps he'll see this in his referrer logs.



I was talking to a friend of mine about CPU megahertz, Moore's law and the laws of Physics, and the increasing need for programmers to be aware about concurrency. We started talking about one good way of scaling applications to multiple processors, vectorization. The first thing that comes to my mind when I think about vectorization (besides Altivec) is APL, thanks mostly to r0ml. So I did a search for "apl mac os x" and one of the first things that comes up is APLX. I don't know if r0ml has looked at this and discarded it as unviable or uninteresting, but it looks promising.



Smalltalk is another language that I like very much. The syntax feels so much easier to read. Smalltalk has historically not integrated well with it's environment. ambrai Smalltalk looks like it is on the way to fixing that problem. Not only does it very tightly integrate with the Mac OS X gui, it even appears to have command-line integration features.



9/26/2004

Nevow 0.3!

Nevow 0.3 is now out! Go get it!



There has been a lot of development over the past five months, and I have been feeling overdue for doing a Nevow release for a while now. So finally today I mustered the strength to write all the ChangeLogs, READMEs, and update the examples and documentation needed for a release. And what a release it is. This release encompasses some pretty major refactorings and additions:





  • freeform-patterns: This branch rewrote almost all of the freeform form rendering code (now called webform). It makes use of the Nevow pattern/slot paradigm to allow customization of the automatically generated forms down to the finest detail.

  • ubiquitous-context: This branch focused on making the Nevow APIs more consistent by passing a context object to the URL traversal APIs. Nevow keeps track of the objects involved in URL traversal and page rendering using a stack of context objects which you can use to make information available to your components.

  • LivePage improvements: LivePage is now cross browser! Mozilla, Firefox, WinIE6, and Safari browsers are all supported. Adding support for browsers such as Opera and Konqueror should be possible as long as they support XmlHttpRequest. Also, some python-side APIs were added which make mutating the in-browser DOM a breeze: set, append, alert, and call. All these python-side objects take stan, so you can pass them XML fragments composed using Python code or extracted from XML/XHTML documents. No JavaScript skills required!

  • New Fragment class: Fragment is a Page base class which implements just those APIs required to expose data_* and render_* methods in a stan tree. It's now easy to break out your frequently used components into self-contained classes, instantiate and return them from a Page.render_* method or even another Fragment.render_* method.

  • url.URL improvements: Some new APIs make it easy to manage view state using query arguments rather than server-side sessions, which expire and aren't friendly with the back button.

  • nevow.canvas: In the tradition of LivePage comes the experimental Canvas module, which gives you a server-side Python API for drawing lines, curves, and text in the browser, with control over line thickness, border color, and opacity. Canvas gives you a socket you can keep open as long as you need to draw animations in the client browser.

  • XML Compliance: xmlfile and xmlstring now properly retain doctypes, comments, and xmlns attributes.

  • IFoo(ctx) syntax: ctx.locate(IFoo) has been deprecated in favor of the more uniform adaption syntax IFoo(ctx).

  • WSGI Implementation: This release contains a simple, incomplete WSGI application implementation. It is now possible to use Nevow to render CGI or WSGI pages without Twisted installed.

  • guard improvements: guard.SessionWrapper now works properly when it is installed in locations other than the root.

  • Chatola: Chatola, the LivePage demonstration application, has bloomed into a fully operational web-based chat server!

  • inevow.IQ: The Interface for Querying is the beginnings of a DOM querying API. Currently, it contains only the patternGenerator, onePattern, and allPatterns APIs.




Visit the web site for more information about Nevow.