Richard Jones' Log

Mon, 02 Jun 2008
Bruce: ReStructuredText Presentations, now in beta

Bruce the Presentation Tool

Bruce the Presentation Tool is for people who are tired of fighting with presentation tools. Presentations are composed (edited) in plain text files. In its basic form it allows text, code, image, interative Python sessions and video. It uses pyglet to render in OpenGL.

Get it from PyPI

Bruce 3.0 Features (this being the first 3.0 release)

  • displays ReStructuredText content with one page per section or transition
  • handling of most of ReStructuredText, including:
    • inline markup for emphasis, strong and literal
    • literal and line blocks
    • block quotes
    • definition, bullet and enumerated lists (including nesting)
    • images - inline and stand-alone, including scaling
    • page titles (section headings)
  • page decorations
  • scrolling of content larger than a screenful
  • sensible resource location (images, video, sound from the same directory as the presentation file)
  • and some extensions of ReST:
    • embedded Python interative interpreter sessions
    • videos (embedded just like images) with optional looping
    • stylesheet and decoration changes on the fly (eg. multiple fonts per page)
  • timer and page count display for practicing
  • may specify which screen to open on in multihead
  • runs fullscreen at native resolution
  • may switch to/from fullscreen quickly

Installation

Bruce REQUIRES Python 2.5 and pyglet Subversion r2093, or 1.1 later than beta1 when it's released.

Get it from PyPI

How to write presentations using Bruce the Presentation Tool

Bruce presentations are written as plain-text files in the ReStructuredText format with some extensions. See the examples folder *.rst files for some samples, the simplest being "simple.rst" which displays plain text sentences centered on a white background (using the "big-centered" style):

.. load-style:: big-centered

Text displayed centered on the default white background.

----

A new page, separated from the previous using the four
dashes.

Ut enim ad minim veniam.

A Page Title
------------

Pages may optionally have titles which are displayed
centered at the top by default.

and so on. For more information see the HOWTO at the Bruce website.

Tue, 27 May 2008
The state of rational debate about art

Oh for fucks sake:

Victorian Premier John Brumby says he probably leans towards saying that Bill Henson's controversial photographs of naked youths "crossed the line" [from art to pornography].

Speaking on radio 3AW today, Mr Brumby said he had not seen the photographs.

Anyone who has seen the one (NSFW) image from the Roslyn Oxley9 Gallery exhibition available to the public (or any of his prior exhibitions, apparently) can attest that there's absolutely nothing you could describe as "sexualisation".

Sat, 17 May 2008
Bruce ReST progress

Bruce, the Presentation Tool is getting incrementally better. It's a nice little hobby project because there's always just a little more that could be done, and never a huge task at any given step. Thus I can do a little each time when I'm on the train (30 minutes of hacking on my EEE PC).

ReStructuredText is now the only input format - the old "Socrates"-based implementation is gone. Everything that it could do in terms of formatting may now be done in ReST - and more.

Some of the stuff I mentioned in my last post has been resolved - though it's not final I'm definitely leaning towards staying with directives as they give me more, and Bruce will be able to be more intelligent at producing HTML than the generic html4css2 writer (when dealing with Bruce presentations). Title-less pages are there, so are video pages. Titles are incorporated into the page decoration, allowing some nice tricks. Enumerated list generation handles more styles.

Next up I'll be looking at reintroducing the python interpreter and python code page types - but in the New Bruce they're actually just page elements that may form part of any page.

ps. for the people who asked to see it in action - grab the SVN and run something like "python -m bruce examples/example.rst" or any of the .rst in the examples directory. Bruce is being developed against the pyglet SVN HEAD though (it might work against 1.1, I'm not sure)

Tue, 13 May 2008
Bruce: how to proceed?

As previously hinted Bruce, the Presentation Tool may now display presentations authored in ReStructuredText. I've had a chance to do some more work on it lately, and need to take a step back and think about what I'm trying to do :)

The ReST capabilities currently available are:

  1. Sections denote pages (just like all the other ReST presentation tools),
  2. Lists are handled (some features missing). A lot of inline markup is handled. Images are handled, both inline and stand-alone.
  3. The stylesheet and other configuration may be changed on the fly with ".. config::" directives.
  4. The background decoration* may be specified with a ".. decoration::" directive.

*: the decoration stuff is new as of very recently too. Currently it controls the background colour, but also allows rendering of quads (with colour gradient if you like) and images in the background. There's still much to do like scaling the decoration layer to the screen size, and adding more toys to decorate with like lines and possibly splines. Not sure how far to take it.

Missing from the ReST side though is:

  1. Pages without titles (this would require some sort of "page" directive to indicate a new page has begun).
  2. Other page types like the Python interpreter, Python code and Video.
  3. Handling notes and running-sheet HTML generation sensibly.
  4. Allowing custom page types, perhaps through ".. custom:: <module name>"

Those things aren't insurmountable. I'm becoming increasibly convinced that ReST is a better way to go than the custom markup format, but I'm having trouble with the final decision to give up on the old format.

Of course maintaining two parsers is ... silly.

I'm pretty sure I've made my decision, but thought I'd throw this post out anyway in case anyone had any thoughts or encouragement...

Wed, 23 Apr 2008
PyWeek number 6

PyWeek 6 is all done. The entries are in and rated. It's been another great PyWeek with continued growth in participation and games produced at the end. So many games that I'm considering extending the two weeks for judging!

Greg Ewing has proposed that there be an additional Pyggy Awards challenge which encourages developers to take games produced during the latest PyWeek and improve on them over three months. At the end we run a new round of awards.

python -m bruce presentation.rst
python -m bruce presentation.rst
Fri, 28 Mar 2008
The 6th Python game programming challenge is upon us

The 6th Python Game Programming Challenge starts this weekend. Theme voting is underway and there's still plenty of time to sign up. Come along and join in the fun!

Sun, 23 Mar 2008
PyCon unwind
Photo-0153.jpg

I'm unwinding from PyCon in my cousin's apartment in Pittsburgh. Mostly this involves catching up with Nat, trying to get some sleep (unsuccessfully - I seem to have some sort of delayed-jetlag insomnia), catch up on email (partially successfully) and dump a bunch of photos from the camera. Photos have been updated and I now have a new title image on my blog page (thanks Toby for the old one :). I've compiled all the panoramas that were worth it and I think there's some nice ones in there. I got some nice photos of Evelyn and the PyAr guys from our downtown touristing (somehow Gui managed to dodge the camera... will have to wait to see Lucio's photos).

It's snowing outside.

Can't wait to be home.

The conference itself met and exceeded expectations. I saw some enlightening talks had some great conversations with some bright people. As already mentioned pyglet was a hit. Bruce was too, which was fun. I think I may have a contributor in Brian Dorsey, who was really nice and had some ideas and made the "python code" (in a presentation page write/edit a python program and hit F4 to execute it) Bruce page work.

Mon, 17 Mar 2008
PyCon update: talk done!
pyglet-talk-pano

Well, the pyglet talk's done. The pic above is a little panorama I took about 10 minutes before the presentation (a nice man turned off the incredibly bright spotlight down the other end of the room). The room filled up a lot more as we got closer to the start time with people sitting in the aisles.

The talk went really well, with only one Bruce problem -- I couldn't see the projection screen from the podium. I intend to code up a facility to show the contents of the projection screen on the second screen (ie. laptop) alongside the notes but I just didn't have time. This combined with a very cheap mouse that didn't always click when it was supposed to meant sometimes I was talking to the wrong slide content. Oh well. It was well-received.

Oh, and I couldn't show off the t-shirt I had specially printed and organised delivery to Phil Hassey so I'd have it for the presentation. I was wearing a pullover because it was so damned cold in the presentation room :(

And then there was the BoF afterwards during which I just answered more questions for about an hour.

pyglet's got a considerable buzz here :)

(I have another panorama on flickr that I took during Guido's plenary)

Update: I've uploaded the HTML presentation notes.

Sun, 16 Mar 2008
At PyCon

I'm at PyCon. It's been a pretty busy time so far - have seen a bunch of great talks, have talked to a bunch of great people and have been almost totally let down by technology. My EEE now refuses to charge up, so I'm really glad I brought the work laptop too. Though it's having problems - I can't get onto the wireless network using it, so I've been running in Vista. Fortunately pyglet (and hence Bruce) runs just fine in Vista, so my presentation is going ahead as planned. My work phone isn't working for some reason.

It's good to be here though :)

ps. if you're at PyCon and care, there's going to be a pyglet BOF at 2:45 today, right after the presentation. See the board downstairs.

Wed, 12 Mar 2008
A new home for Bruce

Bruce project hosting has moved to Google Code.

Thanks for the free lunch, WebFaction :)

Tue, 11 Mar 2008
Bruce 2.0 updated

I've just put up beta 2 of Bruce the Presentation Tool. I'm not really sticking with the "alpha"/"beta" thing very well as I've added some more features and changed a couple of small things ;) There's some useful stuff in there though like scaling of fonts for the actual fullscreen viewport, fixing up the config/flags confusion, getting plugins working and a bunch of other stuff. See the PyPI page for more info.

I got my EEE PC back from Asus today. The problem with the trackpad / buttons went away which is both a good thing (I can pack it for PyCon) and a bad thing (no-one actually did anything to make it go away).

Bruce runs just fine on the EEE :) The scaling I mention above is really handy to accommodate the EEE's 800x480 screen (Bruce's default res is 1024x768).

PyWeek RSS working again

The RSS auto generation was dropped during some mad editing trying to make diary entry creation work. It's fixed again, and may make up a little for the terrible job I've done promoting PyWeek 6.

Mon, 03 Mar 2008
Bruce the Presentation Tool 2.0 (beta)

I've released Bruce 2.0 beta 1, yay.

On the project site you can see some screenshots and sample presentation source that was used to generate the screenshots. One of the goals of Bruce is to make it really easy to knock up a quick presentation in a plain-text format. The most basic presentation consists of:

--- text
=This is a title
This is a new line

--- text
=Another page, another title
.You can have bullet points
.If you must
..Even nested ones
...And nestedier ones
.I call this BrucePoint

--- video foot_stomp.mpg

--- py
    sound=spanish_inquisition.ogg
# generates an interactive Python session (with intro sound)

--- image kitten.jpg
# displays a kitten (and this is a comment)

Note that the above BrucePoint style stuff relies on some post-beta1 changes only in SVN.

Because it's using pyglet it's got some really nice features I've already implemented like the video and audio stuff. Also the screen control is nice too -- have it display the presentation on one screen (projector) and in the other screen (laptop) have the presentation source being displayed (along with your notes embedded in the source). It can display pages of HTML (though it's a little slow), and will be able to display pages of ReStructuredText soon. Hell, if you're on a Mac it can also display PDFs :)

It also generates some nice HTML running notes (which include the "#" comments for reference) which print up quite nicely.

I'm still working on it, and there's some bugs but nothing show-stopping. Still to do transitions, but they're not high on the priority list.

Sun, 02 Mar 2008
I'll be presenting at PyCon

Bruce is being updated for another reason - it's been confirmed that I'll be giving the pyglet presentation at PyCon in Alex's place.

Bruce, the Presentation Tool gets an update

I've spent the last week or so re-writing Bruce, the Presentation Tool using the new features in pyglet 1.1 and it's been quite a fun and easy experience compared to the old Bruce. It also proved to be a good test case for some of the new features. The new Bruce (which will be released any moment now - I just have some tweaks to make in the Python interpreter) has more features, and is easier to use than the old Bruce. I believe it's also more extensible too.

pyglet 1.1 alpha 1 released

pyglet 1.1 alpha 1 adds more features than any previous release, including fast graphics routines, formatted text layout, animated GIF support, resource loading, and even some bug fixes. If you're not working in a production environment and can afford some instability, go straight to the download server to grab a source or egg release, and start reading up on all the new features.

This is a pretty exciting release for Alex and myself as it represents the beginning of the added value we wanted to see in pyglet beyond the basic OpenGL + other stuff that appeared in pyglet 1.0 (even though pyglet 1.0 "basic other stuff" like video playback was pretty darned cool.)

Thu, 28 Feb 2008
Language metrics from ohloh

ohloh tracks open-source projects and amongst other things has a neat set of tools that allow you to compare languages, projects, etc.

You can look at the relative number of commits to projects for Python, Perl, Ruby and PHP with C/C++ and Java or just just Python, Perl, Ruby and PHP. Python's doing pretty well with a popularity about the same as PHP. Also quite interesting are the plots of contributors and active projects (Java and C/C++ in decline). Then there's the huge dive in C/C++ commits in the last 6 months as seen in the plot of the number of commits per language.

Interestingly C# (about the same popularity as Perl or Ruby) hasn't made nearly the same splash in open-source as Java did.

Via the Python language statistics page you can also find out that Fred Drake is apparently the most experienced contributor of Python code. I'm not sure how they calculate that one since I'm listed as the 7th most experienced Python contributor but there's got to be others with more - Guido for example ;). The Recently Active Contributors list is also interesting to find out about active Python-based projects.

Fri, 22 Feb 2008
EEE PC woes

I've really enjoyed having my EEE PC during my commute. I've even gotten quite used to having it just balanced on one leg while hacking away on some random pyglet project or other (I think I have about 4 in play ;).

Unfortunately, the trackpad has just died. Actually, it's the trackpad and buttons. Something in the innards is telling the system that whatever button I press (whether the rocker button or a single tap on the trackpad) is held down. Once when I power-cycled the machine the trackpad didn't respond at all. I've tried resetting the software to no avail.

I'll be taking it in to the shop for a warranty claim tomorrow. I'm really hoping they'll just give me a replacement - otherwise I'll be lugging a full-size laptop around PyCon (amongst the 755-and-growing other registrants OMFG). Boo.

Wed, 30 Jan 2008
PyWeek 6 on the way...

PyWeek number 6 is coming...