![]() |
CLISP 2.48+ with FFI on Maemo Fremantle
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:
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 Code:
/opt/clbuild/clbuild lisp Code:
(asdf:oos 'asdf:load-op 'cl-gtk2-gtk) port 4005 to your pc via ssh): Code:
(swank:create-server :coding-system "utf-8") Finally, here are some screenshots: cl-gtk2 demo: http://i.imgur.com/FcwdC.png CLISP in xterm: http://i.imgur.com/yP73Y.png 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): |
Re: CLISP 2.48+ with FFI on Maemo Fremantle
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!
|
Re: CLISP 2.48+ with FFI on Maemo Fremantle
Sweet! Thanks a lot!
|
Re: CLISP 2.48+ with FFI on Maemo Fremantle
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. |
Re: CLISP 2.48+ with FFI on Maemo Fremantle
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.
|
Re: CLISP 2.48+ with FFI on Maemo Fremantle
Quote:
|
Re: CLISP 2.48+ with FFI on Maemo Fremantle
Great! I vote for getting it to the repos :)
|
Re: CLISP 2.48+ with FFI on Maemo Fremantle
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. |
Re: CLISP 2.48+ with FFI on Maemo Fremantle
nothing new here? I am waiting hard for a real Maemo CLISP package...
|
Re: CLISP 2.48+ with FFI on Maemo Fremantle
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.
|
All times are GMT. The time now is 00:10. |
vBulletin® Version 3.8.8