built-in scripting languages.
Jim Thompson
jim at netgate.com
Wed Apr 18 15:47:53 CEST 2007
On Apr 18, 2007, at 2:41 AM, Michael 'Mickey' Lauer wrote:
> PyGTK looks like the most likely contender to me -- not just because I
> wrote a book about it and I'm the author of almost everything
> Python-related in OE, but also because PyGTK is pretty mature and
> easy to extend (you probably have seen Zecke's work in wrapping the
> Moko
> classes did you?).
>
> The thing that worries me is the performance. The Neo1973 has a really
> slow CPU. I didn't test on a device yet, but I'm afraid running
> 'import gtk' alone will take roughly 30 seconds, if not more.
>
> We will probably have to jump through hoops to make _any_ scripting
> language to perform reasonably on the Neo1973 (first incarnation).
Well, python is known to be slow.
There is plenty of CPU on the OpenMoko for something like Lua.. or
lisp, or scheme
might look into Chicken Scheme: <http://www.call-with-current-
continuation.org/index.html>
It runs on the Nokia 770: <http://chicken.wiki.br/chicken%20on%
20handhelds>, and the Zaurus, both of which have less CPU
than the Neo1973.
Chicken Scheme compiles to 'C'. Its fast, way faster than Python.
<http://curiousprogrammer.wordpress.com/2006/09/25/switching-scheme-
implementations/>
One of the more recent additions to Chicken is the 'Easy Foreign
Function Interface'. This enables you to embed C or C++ code inside
your Scheme code and it gets converted to Scheme automatically. The
example given in the manual <http://chicken.wiki.br/easyffi> or
<http://www.call-with-current-continuation.org/chicken.pdf> uses
Chicken Scheme to write a Qt application. The Qt classes get
automatic wrappers generated using the object system (TinyClos). So
the actual Scheme code looks like:
(define a (apply make <QApplication> (receive (argc+argv))))
(define hello (make <QPushButton> "hello world!" #f))
(resize hello 100 30)
(setMainWidget a hello)
(show hello)
(exec a)
(destroy hello)
(destroy a)
There is a GTK SWIG for Chicken: <http://wiki.freaks-unidos.net/
chicken-gtk>
Someone should also look into putting Einstein <http://
www.kallisys.com/newton/einstein/> the NewtonOS port on the Neo1973.
It already runs on the
Nokia 770 and the Zaurus.
Jim
More information about the community
mailing list