Programming OM

Clinton Ebadi clinton at unknownlamer.org
Wed May 7 05:20:02 CEST 2008


Thomas Jensen <tj at fabel.dk> writes:

> Clinton Ebadi wrote:
>> The nice part about the Openmoko platform is that you can now apply
>> the Emacs mentality to a phone: if it is a simple feature you can hack
>> it together in an afternoon yourself.
>
> I am new here. Do I understand this correct - it will be possible to
> write programs on the phone for the phone? Or will I need to write and
> compile the programs on a pc? 
>
> One thing I liked about my Palm PDA was OnBoardC - I had my first
> program running, written on the PDA, a week after I got it. But Palm
> also had some very fine documentation, and OnBoardC had a programming
> Cookbook, so it was easy to get started. 

You should be able to load up the Python repl and hack together
applications using that. I imagine it could run Emacs fairly well too
if you have an external keyboard at least. GCC and everything can be
built for the device, but it's all quite slow.

I'm working on porting GNU clisp[0] to EABI ARM. It cross compiles,
but without generational GC or an FFI yet which limits its usability a
bit (OTOH it ought to be able to run McCLIM with the CLX backend). I'm
a bit distracted by adding some CLIM 2.2 features to McCLIM right now
(gadget based accepting-values and whatnot to make writing a
touch-application-mixin easier to write later) so I'm unsure when that
will be ready (not that anyone but me would care for Common Lisp on a
phone). The FFI problems require a bit of assembly hacking which is
new to me (ah munging with the stack! The black abyss of horror).


>> It would probably take about two hours if you were jumping into the
>> framework from scratch. So just do it.
>
> Do you have a link to a good starting point?  :-)

The GUI toolkit is good old Gtk for things like the contact/dialer
application. Just fetch the source for openmoko-dialer2 and you should
be able to orient yourself. It's written in C though (yech, extra
effort for nothing).

See
/src/target/OM-2007.2/applications/openmoko-dialer2/src/common/moko-contacts.*
in the openmoko svn repo. It looks like it stores things using
libebook[1] so it ought to be trivial to do birthdays since the
backend has a predefined field for it. It looks like there are python
bindings for libebook[2] which makes it easier (I don't much like
Python, but given that the alternative is C...).

Then just hack up a quick GUI and some cron job to check for birthdays
on the current day at some reasonable time.

[0] http://clisp.cons.org
[1] http://www.gnome.org/projects/evolution/developer-doc/libebook/index.html
[2] http://www.conduit-project.org/wiki/evolution-python

-- 
thehurdguy: LOL you'll end up being like that urban myth
thehurdguy: the guy that thinks he's orange juice
thehurdguy: I'll be like "dude, I know a lisp programmer who did
            so much acid, he thinks he's an empty list..."




More information about the community mailing list