From: Gareth McCaughan
Subject: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <87breyb9u1.fsf@g.mccaughan.ntlworld.com>
So, my box is rather short on memory and old enough that
modern memory doesn't work in it, and rather than wasting
money on buying obsolete memory I'm contemplating replacing
its brain with an Athlon 64, with all that that entails.

I'm running FreeBSD, and would prefer not to change that.

But I don't want to find myself without a decent zippy
Lisp implementation. Several different people seem to have
done work on making SBCL run on AMD64 in the last N months
(generally for Linux rather than FreeBSD); what's the
current state of the world?

-- 
Gareth McCaughan
.sig under construc

From: Svein Ove Aas
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <cl4v5t$fo7$1@services.kq.no>
Gareth McCaughan wrote:

> So, my box is rather short on memory and old enough that
> modern memory doesn't work in it, and rather than wasting
> money on buying obsolete memory I'm contemplating replacing
> its brain with an Athlon 64, with all that that entails.
> 
> I'm running FreeBSD, and would prefer not to change that.
> 
> But I don't want to find myself without a decent zippy
> Lisp implementation. Several different people seem to have
> done work on making SBCL run on AMD64 in the last N months
> (generally for Linux rather than FreeBSD); what's the
> current state of the world?
> 

At least one person is working on SBCL under AMD64, but you'd have to ask
him for details.

However, both SBCL and CMUCL work just fine under 32-bit emulation mode;
probably the only thing you lose is speed, and no more than you'd lose by
running on a 32-bit machine in the first place.
From: Espen Vestre
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <kwbrexssj5.fsf@merced.netfonds.no>
Svein Ove Aas <·········@aas.no> writes:

> However, both SBCL and CMUCL work just fine under 32-bit emulation mode;
> probably the only thing you lose is speed, and no more than you'd lose by
> running on a 32-bit machine in the first place.

LispWorks (the plain 32 bit version) is amazingly fast on linux 2.6 on
Opteron/Athlon64. I haven't done any real benchmarking, but for a
specific piece of parsing code that is cpu-critical to several of our 
server applications we measured a 2.2Ghz Athlom64 to be /more than
twice as fast/ as a 3Ghz Xeon!
-- 
  (espen)
From: Camm Maguire
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <54is958ozj.fsf@intech19.enhanced.com>
Greetings!

GCL compiles to native 64bit code on amd64 for some time now, and
carries maxiam, acl2, and axiom there for Debian.  There are a few
holdovers from 32bit, like most-positive-fixnum.  We intend to remove
these soon.

Take care,

Espen Vestre <·····@*do-not-spam-me*.vestre.net> writes:

> Svein Ove Aas <·········@aas.no> writes:
> 
> > However, both SBCL and CMUCL work just fine under 32-bit emulation mode;
> > probably the only thing you lose is speed, and no more than you'd lose by
> > running on a 32-bit machine in the first place.
> 
> LispWorks (the plain 32 bit version) is amazingly fast on linux 2.6 on
> Opteron/Athlon64. I haven't done any real benchmarking, but for a
> specific piece of parsing code that is cpu-critical to several of our 
> server applications we measured a 2.2Ghz Athlom64 to be /more than
> twice as fast/ as a 3Ghz Xeon!
> -- 
>   (espen)

-- 
Camm Maguire			     			····@enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah
From: Gareth McCaughan
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <87zn2g98l6.fsf@g.mccaughan.ntlworld.com>
Camm Maguire wrote:

> GCL compiles to native 64bit code on amd64 for some time now, and
> carries maxiam, acl2, and axiom there for Debian.  There are a few
> holdovers from 32bit, like most-positive-fixnum.  We intend to remove
> these soon.

Nice. Thanks.

-- 
Gareth McCaughan
.sig under construc
From: Gareth McCaughan
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <874qkoan70.fsf@g.mccaughan.ntlworld.com>
Svein Ove Aas wrote:

> However, both SBCL and CMUCL work just fine under 32-bit emulation mode;
> probably the only thing you lose is speed, and no more than you'd lose by
> running on a 32-bit machine in the first place.

Hmm. I'm showing my shocking ignorance here: do you mean
that it's possible to run the system as a whole in 64-bit
mode, but also to run individual applications (CMU CL, say)
in 32-bit mode? That seems like it would be OS-dependent;
which OSes let you do that?

-- 
Gareth McCaughan
.sig under construc
From: Duane Rettig
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <4r7nsn8ki.fsf@franz.com>
Gareth McCaughan <················@pobox.com> writes:

> Svein Ove Aas wrote:
> 
> > However, both SBCL and CMUCL work just fine under 32-bit emulation mode;
> > probably the only thing you lose is speed, and no more than you'd lose by
> > running on a 32-bit machine in the first place.
> 
> Hmm. I'm showing my shocking ignorance here: do you mean
> that it's possible to run the system as a whole in 64-bit
> mode, but also to run individual applications (CMU CL, say)
> in 32-bit mode? That seems like it would be OS-dependent;
> which OSes let you do that?

Most 64-bit OSes do.

-- 
Duane Rettig    ·····@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182   
From: Gareth McCaughan
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <871xfr8ufp.fsf@g.mccaughan.ntlworld.com>
Duane Rettig <·····@franz.com> writes:

> Gareth McCaughan <················@pobox.com> writes:
> 
> > Svein Ove Aas wrote:
> > 
> > > However, both SBCL and CMUCL work just fine under 32-bit emulation mode;
> > > probably the only thing you lose is speed, and no more than you'd lose by
> > > running on a 32-bit machine in the first place.
> > 
> > Hmm. I'm showing my shocking ignorance here: do you mean
> > that it's possible to run the system as a whole in 64-bit
> > mode, but also to run individual applications (CMU CL, say)
> > in 32-bit mode? That seems like it would be OS-dependent;
> > which OSes let you do that?
> 
> Most 64-bit OSes do.

Aha, very civilized. And indeed it appears that FreeBSD
is one of them, though a bit of googling suggests that
at one point the 32-bit subsystem was rather flaky.
Thanks.

-- 
Gareth McCaughan
.sig under construc
From: Christopher Browne
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <2tov86F22hetlU1@uni-berlin.de>
Clinging to sanity, Gareth McCaughan <················@pobox.com> mumbled into her beard:
> Svein Ove Aas wrote:
>
>> However, both SBCL and CMUCL work just fine under 32-bit emulation
>> mode; probably the only thing you lose is speed, and no more than
>> you'd lose by running on a 32-bit machine in the first place.
>
> Hmm. I'm showing my shocking ignorance here: do you mean that it's
> possible to run the system as a whole in 64-bit mode, but also to
> run individual applications (CMU CL, say) in 32-bit mode? That seems
> like it would be OS-dependent; which OSes let you do that?

It is possible remarkably often because systems often start off with a
"32 bit mode."

The AMD64 port of Debian/Linux includes a subsystem for this purpose,
including support for installing 32 bit libraries in a special area
for that purpose.  It's good enough to get OpenOffice.org working,
which is no mean feat.

It's probably enough to let SBCL/CMUCL work.  Managing them via the
package system might be a bit painful, because the "32 bit emulation"
part is a bit manual, but it's probably possible...
-- 
(reverse (concatenate 'string "gro.gultn" ·@" "enworbbc"))
http://linuxfinances.info/info/rdbms.html
"With sufficient  thrust,  pigs fly  just fine.  However, this is  not
necessarily a good idea. It is hard to be sure where they are going to
land,   and it  could be   dangerous sitting  under  them as  they fly
overhead." -- RFC 1925
From: Daniel Barlow
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <87ekjs4zcv.fsf@noetbook.telent.net>
Gareth McCaughan <················@pobox.com> writes:

> But I don't want to find myself without a decent zippy
> Lisp implementation. Several different people seem to have
> done work on making SBCL run on AMD64 in the last N months
> (generally for Linux rather than FreeBSD); what's the
> current state of the world?

Since acquiring an amd64 machine of my own last weekend I've dusted
off the SBCL work I was doing earlier in the year (many thanks to
Kevin Rosenberg for ssh access to his machines, but it's a lot more
comfortable developing locally than over the internet, not to mention
that the appeal is so much greater now I own a machine that it'll run
on ...)

You asked about "current state" rather than "progress", which I like,
becuase otherwise I'd have only have been able to say "it'll be done
when it's done".  So:

If you're familiar with the SBCL build process I can tell you that
when I left off last it was generating plausible-looking
cross-compiled core files that got maybe two thirds of the way through
the cold-init process (at the end of which is a repl).  After that all
that remains is building PCL, which is allegedly portable, and the
contrib modules, which are mostly /actually/ portable if we limit
ourselves to considering sbcl-on-different-architectures.

After picking it up again on Sunday, I broke it utterly by deciding to
rewrite the floating point support to use sse2/sse3/xmm (faster, more
predictable, less weird) instead of the legacy x87 instructions.  That
work is mostly complete at least in that it's now back to the point of
generating plausible cross-compiled cores, but (whether due to new FP
or to having simultaneously forward-ported the branch by several
months) it dies at about the second function call.  This could be
considered a regression.

Feature checklist: 

 - 64-bit lisp word (yes, big cores) 
 - 61 bits of fixnum.  
 - uses all 16 registers 
 - sse for floating point (16 xmm registers)

Big known issue between here and the goal: bignum support, which is
still based on 32-bit words.  Other than that it's mostly a question
of seeing what crops up.

I don't know much about the FreeBSD amd64 port, but unless they've don
something really weird I can't imagine it being much work to get SBCL
up on once we have a working compiler and runtime.

As others have mentioned, the x86 port of SBCL (at least on Linux)
runs fine[*] under a 64 bit kernel if furnished with appropriate shared
libraries.  On my machine it takes around 9-10 minutes to build itself
including all contribs: I don't know objectively how zippy this is,
but it's about a sevenfold improvement on the box it replaced, so I at
least am content for the moment.

[*] Actually, fine except for threads.  But if you're on freebsd you
    don't get them anyway, so I mention that mostly for completeness'
    sake


-dan

-- 
"please make sure that the person is your friend before you confirm"
From: Bradley J Lucier
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <cl8tja$5cv@arthur.cs.purdue.edu>
This is off-topic, but the beta10 of the Gambit-C 4.0 scheme system
should work on 64-bit machines, but it needs more testing (while the previous
64-bit versions were tested on many architectures, this one has been tested
only on 64-bit sparc as far as I know).  See

http://www.iro.umontreal.ca/~gambit/

Brad
From: Gareth McCaughan
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <87wtxj7fmz.fsf@g.mccaughan.ntlworld.com>
Daniel Barlow <···@telent.net> writes:

[I'd asked:]
> > But I don't want to find myself without a decent zippy
> > Lisp implementation. Several different people seem to have
> > done work on making SBCL run on AMD64 in the last N months
> > (generally for Linux rather than FreeBSD); what's the
> > current state of the world?
...
> You asked about "current state" rather than "progress", which I like,

Glad to be of service :-).

[SNIP: lots and lots of interesting and helpful information]

Thanks! Sounds pretty impressive. And it sounds like
SBCL and CMU CL will work OK using the ia32 emulation layer,
so I wouldn't be fast-Lisp-less until the 64-bit version
is done. Cool.

-- 
Gareth McCaughan
.sig under construc
From: mikel
Subject: Re: CMU CL or SBCL on (FreeBSD/)AMD64 any time soon?
Date: 
Message-ID: <pAfed.17367$nj.5675@newssvr13.news.prodigy.com>
Gareth McCaughan wrote:
> Daniel Barlow <···@telent.net> writes:
> 
> [I'd asked:]
> 
>>>But I don't want to find myself without a decent zippy
>>>Lisp implementation. Several different people seem to have
>>>done work on making SBCL run on AMD64 in the last N months
>>>(generally for Linux rather than FreeBSD); what's the
>>>current state of the world?
> 
> ...
> 
>>You asked about "current state" rather than "progress", which I like,
> 
> 
> Glad to be of service :-).
> 
> [SNIP: lots and lots of interesting and helpful information]
> 
> Thanks! Sounds pretty impressive. And it sounds like
> SBCL and CMU CL will work OK using the ia32 emulation layer,
> so I wouldn't be fast-Lisp-less until the 64-bit version
> is done. Cool.
> 

I bought an AMD64 machine a couple months ago to support work on the 
Bard VM. I have been using CMUCL (in 32-bit mode) and Allegro (in native 
64-bit mode) to do the work.

One consideration about use of Linux on AMD64 is that the maturity of 
the 'multilib' implementations varies from one distro to another. I've 
been generally happy with Fedora Core 2; Suse 9.1 seems a little more 
mature, but feels subjectively slower on the same box.

Another consideration is video friver support; you may want to look into 
driver support for video cards before buying your machine. For example, 
ATI does not yet provide 64-bit drivers for its video cards on Linux.