Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
ARM Lisp Compiler - Options?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  16 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dimiter malkia Stanev  
View profile  
 More options Jan 12, 2:56 pm
Newsgroups: comp.lang.lisp
From: "Dimiter \"malkia\" Stanev" <mal...@mac.com>
Date: Mon, 12 Jan 2009 11:56:39 -0800
Local: Mon, Jan 12 2009 2:56 pm
Subject: ARM Lisp Compiler - Options?
Has been asked, was needed, but if one is to start an experimental ARM
lisp compiler (iPhone, G1, Windows Mobile, etc.) - what might be an easy
way?

Couple of places one can start:
        - SBCL - Start from some platform closest to ARM, and progress there -
compiler/runtime/assembler
        - CMUCL - kind of like SBCL?
        - OpenCCL
        - Corman Lisp - yes it's for Windows, but it's full with LAP code that
might be easier to port, then again it's commercial product, not sure
whether one can extend it like that.
        - ECL and GCL are interpretters, they do compile to C, but the
resulting code is still not that efficient (boxing, no global
optimization used) - and requiring "C" compiler on the embedded device
seems a little bit too much.
        - CLISP is interpretter.

As always there are the interpretters, but I'm really looking forward to
a compiler - something that's at most x3-x5 slower than C, not more than
that.

        - Off course - Ocaml is there, once the ARM Lisp Compiler is born Jon
can post how awesome it is.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
joswig@corporate-world.li sp.de  
View profile  
(1 user)  More options Jan 12, 3:22 pm
Newsgroups: comp.lang.lisp
From: "jos...@corporate-world.lisp.de" <jos...@corporate-world.lisp.de>
Date: Mon, 12 Jan 2009 12:22:34 -0800 (PST)
Local: Mon, Jan 12 2009 3:22 pm
Subject: Re: ARM Lisp Compiler - Options?
On 12 Jan., 20:56, "Dimiter \"malkia\" Stanev" <mal...@mac.com> wrote:

CLISP, ECL and GCL are not 'interpreters'. They include an interpreter
and a compiler.
ECL and GCL compile to native code via compiling to C. CLISP compiles
to a byte-code,
which is executed by a byte-code interpreter - it is kind of a virtual
machine.
CMUCL also includes such a virtual machine (additionally to an
interpreter and
a native code compiler), where you can mix code freely running native,
byte-coded or interpreted. ECL also has such a byte-code interpreter.

IIRC, CLISP and ECL are already running on ARM. So you could use
either one
and have a relatively fast byte-code engine.

If you are looking for a native code compiler, then I guess you are
out of luck.

Though it might be interesting to have a native code compiler. There
are some
non-phone computers running Linux on ARM. On the phone side, Apple
does not
allow running Lisp (and similar languages) on the iPhone, Google's
Android
uses their own kind of java virtual machine, ...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dimiter malkia Stanev  
View profile  
 More options Jan 12, 3:50 pm
Newsgroups: comp.lang.lisp
From: "Dimiter \"malkia\" Stanev" <mal...@mac.com>
Date: Mon, 12 Jan 2009 12:50:36 -0800
Local: Mon, Jan 12 2009 3:50 pm
Subject: Re: ARM Lisp Compiler - Options?

Thanks, Rainer!

This is exactly what I had in mind, but worded it wrongly - a native ARM
compiler.

> Though it might be interesting to have a native code compiler. There
> are some
> non-phone computers running Linux on ARM. On the phone side, Apple
> does not
> allow running Lisp (and similar languages) on the iPhone, Google's
> Android
> uses their own kind of java virtual machine, ...

Still for internal development, ad-hoc distribution, and non-G1 Android
development - you are free to do that. And there should not be any
problem with Windows Mobile.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Mizrahi  
View profile  
 More options Jan 13, 4:32 am
Newsgroups: comp.lang.lisp
From: "Alex Mizrahi" <udode...@users.sourceforge.net>
Date: Tue, 13 Jan 2009 11:32:34 +0200
Local: Tues, Jan 13 2009 4:32 am
Subject: Re: ARM Lisp Compiler - Options?
 DmS>  - ECL and GCL are interpretters, they do compile to C, but the
 DmS> resulting code is still not that efficient (boxing,

this looks like a case of premature optimization. do you have particular use
case
in mind, or you just want a compiler for a sake of compiler? last time i've
checked, ECL/GCL were doing number crunching code pretty well, there
was no boxing. as for the rest, i doubt it is really critical.

 DmS> no global  optimization used)

again, i doubt global optimizations will ever help you to run program
which you otherwise could not run.

 DmS> - and requiring "C" compiler on the embedded device
 DmS> seems a little bit too much.

can't you just compile it once and deploy on devices in a compiled form?
programs that really need compiler in runtime are very rare.

unless you're going to do all the development on the device itself..

that said, i don't think that having gcc on the device is anyhow
more weird than having SBCL on the device.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kodi...@eurogaran.com  
View profile  
 More options Jan 13, 7:55 am
Newsgroups: comp.lang.lisp
From: kodi...@eurogaran.com
Date: Tue, 13 Jan 2009 04:55:23 -0800 (PST)
Local: Tues, Jan 13 2009 7:55 am
Subject: Re: ARM Lisp Compiler - Options?
>         - ECL and GCL are interpretters, they do compile to C, but the
> resulting code is still not that efficient (boxing, no global
> optimization used) - and requiring "C" compiler on the embedded device
> seems a little bit too much.

Therefore, one could conclude you need either an interpreter or
externally compiled code.
For the former, I would recommend CLISP, for the latter I don't know
how to do it without using Linux in both the ARM and the external
systems.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
daniel.elia...@excite.com  
View profile  
 More options Jan 13, 8:49 am
Newsgroups: comp.lang.lisp
From: daniel.elia...@excite.com
Date: Tue, 13 Jan 2009 05:49:37 -0800 (PST)
Local: Tues, Jan 13 2009 8:49 am
Subject: Re: ARM Lisp Compiler - Options?
On Jan 13, 4:32 am, "Alex Mizrahi" <udode...@users.sourceforge.net>
wrote:

> can't you just compile it once and deploy on devices in a compiled form?
> programs that really need compiler in runtime are very rare.

How would one take ECL or GCL and generate a run-time environment that
does not include the compiler?  (Meaning, not include the LISP-to-C
compiler?)

Do these projects have easy ways of chopping out parts of the run-time
environment?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Mizrahi  
View profile  
 More options Jan 13, 10:29 am
Newsgroups: comp.lang.lisp
From: "Alex Mizrahi" <udode...@users.sourceforge.net>
Date: Tue, 13 Jan 2009 17:29:38 +0200
Local: Tues, Jan 13 2009 10:29 am
Subject: Re: ARM Lisp Compiler - Options?
 de> How would one take ECL or GCL and generate a run-time environment that
 de> does not include the compiler?  (Meaning, not include the LISP-to-C
 de> compiler?)

in ECL there is such option in configure script:

--with-cmp              build in the compiler (default=YES)

 de> Do these projects have easy ways of chopping out parts of the run-time
 de> environment?

there are some more options in ECL. if something's missing, i think it
would be pretty easy to modify make files to exclude something.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dimiter malkia Stanev  
View profile  
 More options Jan 13, 1:47 pm
Newsgroups: comp.lang.lisp
From: "Dimiter \"malkia\" Stanev" <mal...@mac.com>
Date: Tue, 13 Jan 2009 10:47:14 -0800
Local: Tues, Jan 13 2009 1:47 pm
Subject: Re: ARM Lisp Compiler - Options?

Unfortunately the interpretted speed is not enough with these LISP
environments. I want to avoid "C" library linkage, as I would like to
iteratively develop on the device, and that would beat it's purpose.

I'm mainly generating data into single-float simple-arrays, which are
later drawn by OpenGL ES.

My code is currently in C/Objective-C and for experimental purposes
(faster iteration) I would like to move that piece to Lisp (I'll move it
back to "C" when I'm satisfied). For example I'm getting 30-40fps with
it, half of the time spent in the vertices generator, the other time
spent in drawing, so I expect a reasonable 3-4 times slower LISP
implementation for the vertices drawing won't slow me that much.

Currently from the 30 ms, 16ms are spent on generating, 16ms on drawing.
If the first time goes 3-4 times up it's 48-64ms, total 80ms - about
12fps - which is bearable, but slower times that that It won't be really
what I need.

I haven't done tests of CLISP, ECL, GCL, etc. on the ARM device, but
have done such on X86, and the code is at least x20 times slower, and
this with compiler.

Haven't tried ABCL, but looked at what it generates through JAD, and it
does not look that optimized.

So native ARM Lisp Compiler would be good enough.

I do have similiar problem with porting my application to G1 Phone, in
the Davlik VM Java - it's slow too for what I need.

Granted, I don't need speed in other areas that I'll put - such as game
scripting, etc. - but exactly for vertices generation I do need :)

Maybe I'll stick with "C" for now, and just dream of it :)

I'm still in my Common Lisp Diapers, but I might try to start a backend
for SBCL, or any of the others - I just have a feeling that would drive
my project too far away, nevertheless it would be interresting...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
daniel.elia...@excite.com  
View profile  
 More options Jan 13, 2:04 pm
Newsgroups: comp.lang.lisp
From: daniel.elia...@excite.com
Date: Tue, 13 Jan 2009 11:04:09 -0800 (PST)
Local: Tues, Jan 13 2009 2:04 pm
Subject: Re: ARM Lisp Compiler - Options?
On Jan 13, 1:47 pm, "Dimiter \"malkia\" Stanev" <mal...@mac.com>
wrote:

> I haven't done tests of CLISP, ECL, GCL, etc. on the ARM device, but
> have done such on X86, and the code is at least x20 times slower, and
> this with compiler.

Wow...  Once OPTIMIZE and DECLAREs are coordinated for speed, the
compilers I've tried make really fast code (GCL and SBCL I've tried
this on).

reference:   http://www.gigamonkeys.com/book/conclusion-whats-next.html

If OPTIMIZE options aren't set for speed at the expense of others [ie,
(OPTIMIZE (SPEED 3) (SAFETY 0) (DEBUG 0))], I've noticed that these
Lisps will tend to use DECLAREd data types to insert _more_ type
checking code...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew D Swank  
View profile  
 More options Jan 14, 12:51 am
Newsgroups: comp.lang.lisp
From: Matthew D Swank <akopa.gmane.pos...@gmail.com>
Date: Wed, 14 Jan 2009 05:51:25 GMT
Local: Wed, Jan 14 2009 12:51 am
Subject: Re: ARM Lisp Compiler - Options?

On Tue, 13 Jan 2009 10:47:14 -0800, Dimiter \"malkia\" Stanev wrote:
> My code is currently in C/Objective-C and for experimental purposes
> (faster iteration) I would like to move that piece to Lisp (I'll move it
> back to "C" when I'm satisfied).

Well, if you are using Objective-C and you want something more
interactive, you might also see what kind of Smalltalk implementations
are available for ARM.

Matt
--
Truth will out this morning.  (Which may really mess things up.)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Mizrahi  
View profile  
 More options Jan 14, 9:32 am
Newsgroups: comp.lang.lisp
From: "Alex Mizrahi" <udode...@users.sourceforge.net>
Date: Wed, 14 Jan 2009 16:32:47 +0200
Local: Wed, Jan 14 2009 9:32 am
Subject: Re: ARM Lisp Compiler - Options?
 DmS> Unfortunately the interpretted speed is not enough with these LISP
 DmS> environments. I want to avoid "C" library linkage, as I would like to
 DmS> iteratively develop on the device, and that would beat it's purpose.

if that is your device, why not install gcc on it.

 DmS> I haven't done tests of CLISP, ECL, GCL, etc. on the ARM device, but
 DmS> have done such on X86, and the code is at least x20 times slower, and
 DmS> this with compiler.

that's weird, maybe you don't have proper declarations? ECL does not seem
to have any type inference, but if you supply it with enough declarations,
it
is definitely able to create code with native peformance.

for example, simple function that sums elements in the vector:

(defun jspank (a)
  (declare (optimize (speed 3) (safety 0))
           (type (vector single-float) a))
  (let ((x 0.0))
    (declare (single-float x))
    (dotimes (i (length a))
      (declare (fixnum i))
      (setf x (+ x (aref a i))))))

inner loop does not contain any inefficient calls, it is translated directly
to C constructs:

 V2= (float)(V2)+(float)((V1)->array.self.sf[V4]);
 V4= (V4)+1;
L9:;
 if(!((V4)<(V3))){
 goto L13;}
 goto L8;

 DmS> Haven't tried ABCL, but looked at what it generates through JAD,
 DmS>  and it does not look that optimized.

yep


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
C Wilson  
View profile  
 More options Jan 14, 10:32 am
Newsgroups: comp.lang.lisp
From: "C Wilson" <mt1016b-msn...@yahoo.com>
Date: Wed, 14 Jan 2009 09:32:32 -0600
Local: Wed, Jan 14 2009 10:32 am
Subject: Re: ARM Lisp Compiler - Options?
1/12/2009 5:19:45 PM
"Dimiter \"malkia\"Stanev" <mal...@mac.com> wrote in message

<gkg79q$77...@malkia.motzarella.org>

> Has been asked, was needed, but if one is to start an experimental
ARM
> lisp compiler (iPhone, G1, Windows Mobile, etc.) - what might be an
easy
> way?

[snip]
There is a 2001 gcl 2.4.0 implementation for ARM here: http://www.
rainer-keuchel.de/wince/gcl-ce.html

The page says "There are beta builds available for ARM/HPC/WCE300,
SH3/HPC/WCE211 and MIPS/HPC/WCE211."

There are many other binaries on this site (emacs, SWI Prolog, perl, .
..), several of which I have recently run under Windows Mobile 6.0
Classic. I have not touched the gcl.

chw


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dimiter malkia Stanev  
View profile  
 More options Jan 14, 1:52 pm
Newsgroups: comp.lang.lisp
From: "Dimiter \"malkia\" Stanev" <mal...@mac.com>
Date: Wed, 14 Jan 2009 10:52:43 -0800
Local: Wed, Jan 14 2009 1:52 pm
Subject: Re: ARM Lisp Compiler - Options?

Thanks! I've used GCL on my HTC Universal (Windows Mobile 5) - but moved
to G1 Android and iPod Touch since then.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stassats  
View profile  
 More options Jan 16, 9:32 am
Newsgroups: comp.lang.lisp
From: stassats <stass...@gmail.com>
Date: Fri, 16 Jan 2009 06:32:30 -0800 (PST)
Local: Fri, Jan 16 2009 9:32 am
Subject: Re: ARM Lisp Compiler - Options?
On Jan 12, 10:56 pm, "Dimiter \"malkia\" Stanev" <mal...@mac.com>
wrote:

> Has been asked, was needed, but if one is to start an experimental ARM
> lisp compiler (iPhone, G1, Windows Mobile, etc.) - what might be an easy
> way?

> Couple of places one can start:
>         - SBCL - Start from some platform closest to ARM, and progress there -
> compiler/runtime/assembler

http://www.lisphacker.com/projects/sbcl-arm/port-log.txt (not finished)

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dimiter malkia Stanev  
View profile  
 More options Jan 16, 2:59 pm
Newsgroups: comp.lang.lisp
From: "Dimiter \"malkia\" Stanev" <mal...@mac.com>
Date: Fri, 16 Jan 2009 11:59:03 -0800
Local: Fri, Jan 16 2009 2:59 pm
Subject: Re: ARM Lisp Compiler - Options?

stassats wrote:
> On Jan 12, 10:56 pm, "Dimiter \"malkia\" Stanev" <mal...@mac.com>
> wrote:
>> Has been asked, was needed, but if one is to start an experimental ARM
>> lisp compiler (iPhone, G1, Windows Mobile, etc.) - what might be an easy
>> way?

>> Couple of places one can start:
>>         - SBCL - Start from some platform closest to ARM, and progress there -
>> compiler/runtime/assembler

> http://www.lisphacker.com/projects/sbcl-arm/port-log.txt (not finished)

Thanks a lot! A lot of good stuff!

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dimiter malkia Stanev  
View profile  
 More options Jan 17, 2:58 am
Newsgroups: comp.lang.lisp
From: "Dimiter \"malkia\" Stanev" <mal...@gmail.com>
Date: Fri, 16 Jan 2009 23:58:46 -0800 (PST)
Local: Sat, Jan 17 2009 2:58 am
Subject: Re: ARM Lisp Compiler - Options?
On Jan 14, 6:32 am, "Alex Mizrahi" <udode...@users.sourceforge.net>
wrote:

Thanks, Alex, but what you have posted generates definitely slower
(but more general) code for AllegroCL, LispWorks, OpenMCL, CMUCL and
SBCL.

First you need (simple-vector single-float), instead of vector, then
specifying that it's one dimensional helps further (simple-vector
single-float (*))

Little reorganization of the code, and more declares (I've even put
some Lispworks specific) and disassemble helps even further:

(defun jspank (a)
  (declare (optimize
            (speed 3) (safety 0) (debug 0)
            (compilation-speed 0) (space 0)
            #+lispworks (float 0)
            #+lispworks (fixnum-safety 0))
           (type (simple-array single-float (*)) a))
  (let ((val 0.0e0)
        (len (length a))
        (idx 0))
    (declare (single-float val))
    (declare (fixnum idx len))
    (loop
     (if (<= idx len)
         (setf val (+ (aref a idx) val)
               idx (+ idx 1))
       (return)))))

Off course my code is more, and less understanabdle, but if you have
cases where performace shows that they are slowing down, surely you
can do some more optimizations.

Indeed only one piece of my voxel-space renderer is floating-point
heavy (it generates a buffer with X,Y,Z U,V which is later drawn on
the screen).

I surely don't need to optimize other pieces of the code, just that
pieces, and it contains operations such as above.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google