I’m getting ahead of myself. I’m not actually developing anything for the Nokia Internet Tablets. I don’t know C or C++ or Python*. (Or Ruby either for that matter.**)
Still, I’m intrigued by a reference to PluThon, which lets you develop Python apps for maemo without requiring Scratchbox.
PluThon is an Eclipse plug-in that allows you to interact with your N800 or N810 and run/debug your Python app directly on the tablet. You work in Eclipse, get your usual language support, and SSH the app to the device from within Eclipse (er, PluThon). And skip the emulation stage entirely.
Right now, PluThon is Linux-only, but it seems like it could be made to work with a Windows setup too.†
Not that I can use it‡. But I can dream, can’t I?
__________
* Hey, lucky Java isn’t available on the Internet Tablets or I’d go 0 for 4 on the big ones, eh?
** I have at least made Ruby’s acquaintance. Just barely enough to nod in recognition when we pass in the hallway though.
† And if you want that, why don’t you send a note to eclipse-integration@maemo.org and ask for it. I have.
‡ Hey, what’s to stop an Eclipse-fond Rubyist from doing the same for that language?
Remember the iNdT team’s sketches and mock-ups of the next version of Canola? iNdT’s Marcelo Oliveira (aka handful) has just posted an update (video) on the progress of Canola.
Marcelo shows Canola’s new gorgeous Picture Viewer and Music Player interface with kinetic scrolling all around, and their version of cover flow. They intend to benefit from the Internet Tablet’s 3D engineversion of EFL (enlightenment foundation libraries) 16 bit version to provide fluid transitions.
Marcelo also mentioned that YouTube and Blip.tv plug-ins will be included by default but they plan to have other developers extend Canola by creating plug-ins to stream other types of content and connect to other web services. The new version of Canola will have all the settings integrated in the app.
Expect to see the first public beta to be released sometime the first week of December. Marcelo also hinted to watch out for another release in 2008 as they add new features to Canola, having something to do with the Webkit.
Usually, I steer clear of PDF files, especially on the Nokia N800 and 770 Internet Tablets. Documents are almost always designed for letter-size pages, and I don’t read text where I have to scroll sideways as well as up-and-down. This week, however, the N800’s PDF Reader was my salvation. The app is better — faster, more stable — than I expected but ignores hyperlinking.
When I read text on a Nokia Internet Tablet, I prefer FBReader to the alternatives. Usually I’ll be able to convert my text to the FB2 markup (this is simply XML, not a proprietary or binary format), and FBReader lets me pick fonts and sizes by XML element, so I can arrange this to my finicky satisfaction. And I prefer to page through text using the + and - keys on top of the NIT.
I had chapters of the book in html files, but no time for an html-to-fb2 transformation. So I grabbed a pdb I’d made a while back, since that’s the prime alternative among the many formats that FBReader will display.
The book is entitled “How to Think Like a Computer Scientist: Learning with Python,” written by Allen Downey, Jeffrey Elkner and Chris Meyers. I was skimming through the text when I was stopped by a code example. Here’s a screen capture from the N800:
Well, the code example isn’t stylable by FBReader in pdb format, but if you can’t see the indents in Python examples, then you’re missing something.
I found the book online at ibiblio.org and then used Adobe Acrobat’s feature for making a PDF from web pages with one key setting — making a custom page size 6 inches wide by 3.6 inches tall.
Opening this PDF, I set the page zoom to “fit page width” and got this sort of thing instead:
As you can see, not only are the lines indented, the code is in a different font and keywords in a different color. All that’s been lost in the quick-and-dirty pdb.
I experimented with a few different ways to make the PDF. I found my most successful result by downloading each html chapter, modifying the css stylesheet to choose Trebuchet MS as the font and 16 pt as the font size, then making a PDF of the chapter. (When I did the whole book from the website, the font size wasn’t consistent throughout the chapters, why, I don’t know.)
That experimentation led me to discover one flaw in the PDF reader — the Open dialog doesn’t display enough characters in a file name. Here are two screen shots showing my chapter file tests in the recent files list and in the Open dialog:
To be honest, I figured a 1135-page PDF would be too unwieldy for the reader to manage, so I started out making individual chapter files from my local html copies. Since the links weren’t relative, I used the complete online version to make a single PDF of everything, with the Table of Contents and Index linking to different chapters.
To my surprise, the progress through the pages of this huge document was no slower than through the small single-chapter documents.
The links worked fine on my laptop, but not at all in the NIT’s PDF Reader. Navigation in such a huge document is really awkward without being able to use the links or bookmarks. Anyone know more about the linking issue with PDFs?
— Roger Sperberg
For those who are interested, the PDF can be downloaded from here
Added later: Translations of this text into Portuguese and German are also available, as is a paper version from Green Tea Press. The first version by Allen Downey was written with Java examples and then a version rewritten by him for C++. The same clear-headed text was then modified to introduce Python and Logo. I like this book and as its title indicates, in order to learn to think like a computer scientist, you will need to learn to think like a computer and also, hopefully, simply how to think.
For me, the 38-minute train ride from Montclair into New York City is my prime personal time for computing and writing. And fast or slow, the WiFi-ization of America won’t reach that zone for a long while I’m sure.* That means the commute is offline for now and hereafter.
So I diligently worked out a plan to pluck information off the web every morning, put it automatically into my preferred reading format and transfer the info to my internet tablet to read in FBReader.
Since FBReader gobbles up the Plucker pdb format rather handily and Plucker desktop efficiently automates the webpage plucking, I thought this would work nicely.
I was wrong.
Too much me
The process involves me too much and requires two computers. It’s a system that was designed to use a person’s desktop computer for the plucking and processing, synch to a Palm PDA, and utilize the Palm for reading.
But why should I have to synch? My internet tablet has WiFi. It will run a python program. It’s got a great e-reader already.
Ah, the Linux version of Plucker desktop uses wxWindows. I can’t run it on my internet tablet. Plus it has all the synch-to-Palm conduit stuff.
What’s needed is an interface written for the internet tablet that sits on top of the already-written Python plucking code.
Then every morning (and afternoon), the stuff I want to look at would be grabbed, streamlined and made ready for me to read on the train.
Python-meister available?
Would that I could develop this on my own.
But, besides not being a developer, I found Python unintelligible in my two attempts to learn it (and then found Ruby the complete opposite — clear, elegant, intuitive). I realize I need someone who knows what they’re doing to guide me when I get stuck, which is often, even at my noice level (or: because of my novice level).
Still, the Python tools available for the Maemo are so powerful and give me a real reason (and platform) to develop that I look longingly at this project and wonder, What can I do to make it a reality?
If there’s a Python-meister who sees in this a project not too complex and which could be incredibly fruitful for the internet tablet community . . . well, I’ll sign on as chief cook-and-bottle-washer. Tester, UI guide and documenter. Evangelist.
I’ll do everything I can to make the project succeed, apart from the, um, Python part. We await only the emergence of a true code master.
________
* I could connect to a phone’s data plan and surf — I’ve done that, it’s great! — if I chose to squander my discretionary income on that instead of extravagances like children.
We just got a note from iNdT that Python 2.5 for Maemo 2.1 (Scirocco) and Maemo 3.0 (Bora) has been released. The major changes are:
* Updated to Python 2.5 version of the core language
* Updated bindings
* Added bindings to new Hildon widgets (Maemo GTK+ extension widgets)
* Improved bindings to OSSO library (access to Maemo-specific services)
NewsForge has a review of the Nokia 770 by Rob Reilly. Short, clued-in to the real nature of the 770 and to the steady stream of software, but somehow overlooking the world-class e-reading app, FBReader. (OK, my bias towards using the 770 for e-books.) He cites 103 “mature” software packages over and above those from Nokia, and another 73 in development, as listed at the maemo wiki.
Given his look at software, I’m surprised he didn’t mention the Python tools available. Here’s how he introduces the 770:
Most organizations aren’t ready to migrate to a wireless, network-centric, thin hardware, server/client model, which makes the Nokia 770 Internet Tablet a bit ahead of its time. This handheld device has a basic browser, email client, and multimedia player, but the real beauty of this Linux-based system is its ability to expand its functionality by installing a limited but growing list of applications.
Nokia has financed a platform known as Maemo that users can modify and configure easily to suit their needs. With the 770 hardware and the Maemo development environment, we have a promising setup that fits right in with the open source way of life.
Wanted A C and python programmer to do the heavy lifting on a port of the FBReader source to MS Windows and the creation of a converter from OEB and OpenReader formats to FB2. Interest in SVG a distinct plus.
• • •
OK, I’m not a programmer, though I’ve managed to say “Hello, World” in a half-dozen languages. C is not one of those; however, I did struggle through 41 pages of Kernighan and Ritchie back in 1981. (I gave up when I couldn’t figure out what they meant when they said to pop a stack, and no one I asked knew what I was talking about.)
But I like FBReader so much I want to get it onto the Windows computer I use daily. And, more importantly, onto the Windows computers of most everyone I know. There is no e-reader that spans Windows and Linux, and I hope FBReader can manage that.
Nicolay Pultsin and Mikhail Sobolev are responsible for creating FBReader and getting it on the Nokia 770 and the Linux desktop, and they have their hands full finishing the program. FBReader still needs bookmark and annotation capabilities, not to mention integrating a dictionary, adding table support, and reading additional formats.
Rather than get in their way — they’ve been doing pretty well without me — I’m thinking the best way to boost FBReader is to do what they can’t or don’t plan to do. Of course, this has the side effect of boosting the Nokia 770 as FBReader’s prime platform. The combination of the 770’s display (the pixel density provides for font size control in one-third-of-a-point increments) and portability with the most capable and customizable e-reader will be a tipping point in the 770’s favor when compared to other devices.
One part of making FBReader more accessible is to enable more e-books to be read on it. Since FBReader does its best work with e-books in FictionBook 2.0 form, I want to get more e-books into FB2. And that’s whay I’d like to get a converter written in a cross-platform language like python (yes, so you can even use it on your 770). Maybe later on, modules can be written to accept open formats like OEB and OpenReader directly.
And SVG? Just looking down the road. E-readers should be able to handle anything browsers can.
Before implementing a patch in the Nokia 770’s implementation of Python, he asks: “But as this patch has a solution based on my vision I would like to know the opinion of readers beforehand: Which of the 2 behaviors must remain? And which should be changed?” (Translation via Babelfish.)
I don’t trust my understanding of the issues (via the shaky translation and my thin programming background), but Python programmers on the 770 probably ought to visit his site and weigh in on the issue.