My name is Paul Bissex, and e-scribe.com is my consulting business. I build web applications using as much open source software as possible. From September to June I teach web design and other important non-photographic professional skills to photographers. In the '90s I wrote technology commentary and reviews for magazines, newspapers, and web publications, including Wired, Salon.com, FamilyPC, the late lamented Web Review, and the Chicago Tribune. Feel free to email me.
I'm co-authoring a book, "Python Web Development with Django", with Jeff Forcier and Wesley Chun. It will be published by Prentice Hall in July 2008, but is available for pre-ordering on Amazon now.
This site is built on a fresh trunk checkout of Django, running on Python 2.5.1, served by Apache and mod_python. The database is SQLite. The operating system is FreeBSD, on a VPS hosted at Johncompanies.com. Comment-spam protection by Akismet. Vintage topo imagery from the Maptech archive.
Akismet, del.icio.us, Django, dpaste.com, Emacs, FreeBSD, Freenode, jQuery, LaunchBar, MacPorts, Markdown, Mercurial, OS X, Postfix, Python, SQLite, Subversion, TextMate, Trac, Ubuntu Linux, wmii
Copyright 2008
by Paul Bissex
and E-Scribe New Media
Ben Fry talked about Processing (I missed this part, but fellow attendees who hadn't heard of the language before we very excited and impressed.)
Bill Hilf from Microsoft notes that they're moving to some OSI-approved licenses.
Rickard Falkvinge from Sweden's Pirate Party spoke about their attempt to reform intellectual property law. In their first election, they got only 0.63% of the vote, buy this placed them in the top 10 parties in their first election -- a record for a first-year political party. I don't think that intellectual property regulation is a broad enough base for a political party, but the fact that they're getting so much interest is very telling. After Falkvinge noted that political contributions are not regulated in his country, one audience member ran up and handed him cash!
Steve Yegge had some serious problems with his slides (in fact, I started feeling physically queasy after 10 minutes of mad flashing from the big screens as the tech guys ran around trying to get it to work). His essential message, delivered in the usual funny, acerbic, and rambling Yegge style, was: "open source" has a branding problem.
When Twitter started getting popular, they were have serious scaling problems. Luckily they were running Solaris 10, which includes dtrace.
(It's also in OS X 10.5 and probably going into FreeBSD as well.)
dtrace provides "concise answers to arbitrary questions."
It's designed for production systems: safe operation, and no overhead when not in use. But also obviously very good for development.
dtrace -l shows you all the "points of instrumentation", i.e. hooks. About 50,000 of them in the quickie example they just ran.
dtrace has its own scripting language, the extension is .d.
dtrace -n 'syscall:::entry { @[execname] = count(); }
This runs and gathers data, then when you hit ctrl-c you get a summary table.
A dtrace script can run something else; their example was a rubyfollow.d script that was passed a Ruby script (a simple "hello, world") as an argument.
There seems to have been some work on a dtrace-enabled Python, but as far as I can tell it's Solaris-only.
The word "activity" more or less means "Application". "Sugar" is the user environment for the OLPC project. All Sugar apps/activities are written in Python and GTK+, except for eToys (which is written in Squeak).
Justin got involved with the project by finishing the port of Abiword, now he manages the media player.
The HIG (human interface guidelines, remember those?) for the Sugar project are very different from those that most people are familiar with.
They're using git for version control.
Installing is hard and slow, he's making no bones about that. The build is called "sugar-jhbuild" if you're Googling.
Looks like the easiest way is to install qemu and download an image (100MB to 300MB). It will run a bit slower than a native build but likely faster than the XO (the OLPC machine). Honestly, this looks like the only reasonable way to do it unless you're interested in working on the build/install process itself.
The OLPC has a Tetris Clone called "Block Party" that was written by the same guy who wrote the original Tetris!
Alt-= gets you into the developer console.
Any time you print from a Python program, and any time you have an exception, it shows up in the log -- one log per application.
Activities (applications) in the background are throttled to about 5% CPU.
All icons are SVG.
Focus on building full-screen activities. No pop-up windows.
Localization is key -- use icons rather than words. This helps everybody -- including the translators!
Make your stuff work both in color and black-and-white -- the screen is dual mode.
Don't store state or preferences inside of the activity bundle -- use the SUGAR_PROFILE environment variable to store preferences.
Use relative paths
There are special GTK widgets for Sugar.
Online resources:
#olpc IRC channel
#sugar IRC channel
JavaFX Script: I really have a hard time getting past the awful, awful name. It used to be called "F3" -- which, though opaque, is really a better name.
Apparently it uses a declarative syntax in places.
Adobe Flex: a beta word processor called "buzzword" is using Flex 2.
(I had to leave this session right after the Q&A segment began, in order to make it to Guido van Rossum's Python 3000 talk. The first questioners dove right into the license restrictions on the Flash player though!)
(If you've seen or heard Guido talk about Py3K in the past year this is going to be very familiar. I wonder if he would consider creating a "just the diffs" version of the talk.)
Current timeline:
He makes a good point that without full unit test coverage you're not going to exercise your code enough to get the Py3K warnings, which you need to see in order to know what to fix.
2to3 utility to convert to 3.0 (no hand-editing of output allowed!)
xrange(), not range() (though remember that range() will act like xrange() in 3.0)
// for int division
Unicode: Default source encoding is UTF-8; unicode letters are allowed in identifiers; some issues remain (e.g. normalization); stdlib remains ASCII.
An abstract base class in Py3K is defined as a class with at least one abstract method. There's an @abstractmethod decorator. There will be "voluntary" base classes for standard APIs: Iterable, Iterator, MutableMapping, Real, RawIOBase, Hashable, Sized, Container, etc.
Continuing the move toward iterators and lazy evaluation: zip(), map(), and filter() will all return iterators. As will dict.keys(), .items(), and .values() -- these three will return something new called a "dict view", which are iterables (but not iterators).
New super() call: When called without args, it figures out the current class and self. This is the way I've always wanted it to work!
Set literals: {1, 2, 3} -- this is very nice. (An empty {} will still produce an empty dict. Fair enough.)
Set comprehensions and dict comprehensions. Also very nice.
lambda lives -- reduce dies.
That's good to hear, John, thanks for taking the time to comment.
Bring on OS X 10.5!
Comments use Markdown syntax. Your comment will not appear until approved, which may take a few hours or more. Spammers will be torpedoed.
The iPhone keyboard doesn't suck
Python one-liner of the day
7 comments
How not to advocate via Google Code
2 comments
99 problems
3 comments
bitmonk
Obscure "svn mv" problem solved
33 days ago
Charlie
Book news: Rough Cuts and Amazon
34 days ago
Simon Griffee
Django Mercurial mirror tweaks
51 days ago
Jason Calleiro
From PHP to Python
52 days ago
Yuli
dpaste.com
55 days ago
bruce
Neat Python hack: infix operators
59 days ago
David Reynolds
The original Lego Star Wars
67 days ago
At least 29896 pieces of comment spam killed since January 12th. Thanks are mostly due to Akismet.
There's nothing Solaris-specific in the DTrace Python support. In theory, any OS with DTrace ported will be able to use the new support I added.