Notices


Reply
Thread Tools
Posts: 14 | Thanked: 21 times | Joined on Nov 2009 @ Moscow
#1
C is tiresome, C++ is crazy, Python... I have enough Python at my work. Why not use a real programming language to write Maemo apps? So I decided I must have a working Common Lisp compiler on my N900. A good candidate was CLISP as it has an ARM port, good CL standard support plus there was a previous successful effort of porting it to N810.

Making it work on N900 turned out to be very difficult though... After a lot of debugging/hacking/cursing I finally did it, despite bugs like accidental ARM endianness switch due to wrong calling convention. Here is my post to clisp-devel mailing list with attached patches and detailied explanation of what was done.

The port is not of production quality yet, so use it at your own risk. The patch was made against CVS head (clisp-2.48+) and it still has some stability issues. I've tried to build debs, but resulting clisp build was crashing at CFFI callback tests, so I'm not releasing them until I find out what causes the crash.

Stuff I tested with this clisp build:
  • SWANK - it's possible to connect from Emacs, didn't
    try it from Emacs running on the device itself though;
  • cffi - most tests pass, there are two unexpected failures
    related to floating point numbers;
  • cl-gtk2 - demos seem to work.
  • cl-sqlite - all tests seem to pass fine
  • some other important libs, like cl-ppcre, alexandria etc.

I'm including the clbuild archive I've made that contains the most common libraries. I've had to patch asdf-for-clisp (problems with RUN-PROGRAM), trivial-features (was pushing :NIL to *features* due to unfamiliar ARM architecture) and cl-gtk2 (wasn't compatible with gtk2 v2.14). Unfortunately I was unable to run the latest cl-gtk2 yet (it crashes).

Installation:
Code:
cd /home/user/MyDocs
wget http://depni.sinp.msu.ru/~ivan_iv/clisp-binaries-2-48+-2010-01-27.tar.gz http://depni.sinp.msu.ru/~ivan_iv/clbuild-2010-01-27.tar.gz
tar -C / -xzf clisp-binaries-2-48+-2010-01-27.tar.gz
tar -C / -xzf clbuild-2010-01-27.tar.gz
After that, you may start CLISP using the command:
Code:
/opt/clbuild/clbuild lisp
In order to load cl-gtk2 and see some gui demos, tell it
Code:
(asdf:oos 'asdf:load-op 'cl-gtk2-gtk)
(gtk-demo:demo-text-editor)
SWANK can be started using the following command (forward
port 4005 to your pc via ssh):
Code:
(swank:create-server :coding-system "utf-8")
I've set up temporary git mirrors of CLISP and ffcall CVS repositories with Maemo-related patches applied:
Finally, here are some screenshots:

cl-gtk2 demo:


CLISP in xterm:


EDIT: 2010-03-02: after much struggle, I've resolved shared libraries-related issue in ffcall (see changes in github repositories above) and managed to build .debs for clisp and related libraries. No common-lisp-controller or anything like that, though. Use clbuild from the archive above, asdf-install or other tool/library set you like. So, here are the debs (probably will make them apt-get installable, but a bit later):

Last edited by fionbio; 2010-03-02 at 02:10.
 

The Following 16 Users Say Thank You to fionbio For This Useful Post:
Posts: 1 | Thanked: 0 times | Joined on Jan 2010
#2
This is very cool, and a testimony to the openness of Maemo 5. I hope this is an indicator of a diverse future software ecosystem for Nokia tablet devices. It's good to have an alternative to the monoculture platforms!
 
Posts: 48 | Thanked: 9 times | Joined on Jan 2010
#3
Sweet! Thanks a lot!
 
Posts: 1 | Thanked: 0 times | Joined on Feb 2010 @ London
#4
I've been using this for the past few days to hack with SLIME on the device - it works very nicely - thanks! I was experimenting with building stand-alone executables (with EXT:SAVEINITMEM) but it seems that any image containing GTK locks up chewing CPU when you reload it (and I'm not familiar with Clisp and don't have gdb on my phone so I'm not sure how to get more details about what it's doing). Am I doing something stupid or is that the kind of stability problems you're talking about?

It's a great hack anyway, bravo! I look forward to apt-getting it one day.
 
Posts: 14 | Thanked: 21 times | Joined on Nov 2009 @ Moscow
#5
I've managed to build clisp .debs and added corresponding links to the first message in this topic. Now I will try to find out what's wrong with EXT:SAVEINITMEM.
 
Posts: 48 | Thanked: 9 times | Joined on Jan 2010
#6
Originally Posted by fionbio View Post
I've managed to build clisp .debs and added corresponding links to the first message in this topic. Now I will try to find out what's wrong with EXT:SAVEINITMEM.
Thanks, yet again.
 
Posts: 5 | Thanked: 1 time | Joined on Dec 2009
#7
Great! I vote for getting it to the repos
 
Posts: 125 | Thanked: 108 times | Joined on Feb 2010
#8
for me as a lisp man who is not fluent in mangling .deb and all sorts of libs it would be wonderful to have clisp in apt-get repos!

Keep up your great efforts.
 
Posts: 125 | Thanked: 108 times | Joined on Feb 2010
#9
nothing new here? I am waiting hard for a real Maemo CLISP package...
 
Posts: 2 | Thanked: 1 time | Joined on Sep 2010
#10
Thank you very much for this excellent work. Today I installed CLISP on my N900 both under Maemo5 and also “chrooted” under Easy Debian. It works fine and I’m very happy to use it together with Maxima.
 
Reply


 
Forum Jump


All times are GMT. The time now is 15:43.