Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
why forth over lisp?
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
  Messages 26 - 50 of 61 - Collapse all  -  Translate all to Translated (View all originals) < Older  Newer >
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
 
Standish P  
View profile  
 More options Aug 21 2010, 1:12 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: Standish P <stnd...@gmail.com>
Date: Sat, 21 Aug 2010 10:12:48 -0700 (PDT)
Local: Sat, Aug 21 2010 1:12 pm
Subject: Re: why forth over lisp?
On Aug 21, 8:30 am, John Passaniti <john.passan...@gmail.com> wrote:

[BEGIN QUOTE]
Interviewer: Where did you learn to write compilers? Was this
something everybody at the time had to do?

Chuck: Well, I went to Stanford around ‘60, and there was a group of
grad students writing
an ALGOL compiler — a version for the Burroughs 5500. It was only
three or four of
them, I think, but I was impressed out of my mind that three or four
guys could sit down
and write a compiler.

I sort of said, “Well, if they can do it, I can do it,” and I just
did. It isn’t that hard.

There was a mystique about compilers at the time.

Interviewer: There still is.

Chuck: Yeah, but less so. You get these new languages that pop up from
time to time, and
I don’t know if they’re interpreted or compiled, but well, hacker-type
people are willing to
do it anyway.

The operating system is another concept that is curious. Operating
systems are dauntingly
complex and totally unnecessary. It’s a brilliant thing that Bill
Gates has done in selling
the world on the notion of operating systems. It’s probably the
greatest con game the
world has ever seen.

An operating system does absolutely nothing for you. As long as you
had something — a
subroutine called disk driver, a subroutine called some kind of
communication support, in
the modern world, it doesn’t do anything else. In fact, Windows spends
a lot of time with
overlays and disk management all stuff like that which are irrelevant.
You’ve got gigabyte
disks; you’ve got megabyte RAMs. The world has changed in a way that
renders the operating
system unnecessary.

Interviewer: What about device support?

Chuck: You have a subroutine for each device. That’s a library, not an
operating system.
Call the ones you need or load the ones you need.

[END QUOTE]

> > All virtual machines, lisp, java etc use stack, so forth has no
> > monopoly over that.

> False.  The virtual machines in Lua, Python, Perl 6, and others are
> not stack-based.  Maybe using words like "all" isn't a good idea when
> your knowledge clearly doesn't extend to "all".  It might be said that
> many or even most virtual machine architectures are stack-based, but
> all are certainly not.

I said "use stack" and you talk of "stack-based".

This is vague because corporatists wont bring in crisp explanations.
You gotta run after them and if they give you personally to keep less
circulation, still come and share.

They want you to worship the so called "CHUCK" and keep on buying
their scrap out of ignorance.


 
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.
Elizabeth D Rather  
View profile  
 More options Aug 21 2010, 2:33 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: Elizabeth D Rather <erat...@forth.com>
Date: Sat, 21 Aug 2010 08:33:16 -1000
Local: Sat, Aug 21 2010 2:33 pm
Subject: Re: why forth over lisp?
On 8/21/10 5:45 AM, Paul N wrote:

Yes, Forth's @ ("fetch") and ! ("store") instructions can read and write
memory-mapped I/O ports.  There are variants of @ and ! for the most
common sizes of data or port (8-bit, 16-bit, etc.).  For platforms
without naturally memory-mapped I/O it's common to find P@ and P! (Port
fetch and store) commands, and for portability they are often available
as alternative names to their standard equivalents (most commonly C@ and
C! for 8-bit access).

>> All virtual machines, lisp, java etc use stack, so forth has no
>> monopoly over that.

> I thought that a normal implementation of Forth required two stacks -
> one for the programmer to keep values on and one for the computer to
> keep track of where it had got to. C, by contrast, manages (in most
> implementations) to use a single stack for both.

Yes.  And both are directly visible and usable to the programmer,
provided the rules regarding them (especially the return stack) are
respected.  The actual implementation and use of stacks in Forth and C
differ significantly.

Cheers,
Elizabeth

--
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================


 
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.
toby  
View profile  
 More options Aug 21 2010, 5:28 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: toby <t...@telegraphics.com.au>
Date: Sat, 21 Aug 2010 14:28:19 -0700 (PDT)
Local: Sat, Aug 21 2010 5:28 pm
Subject: Re: why forth over lisp?
On Aug 21, 11:30 am, John Passaniti <john.passan...@gmail.com> wrote:

> On Aug 21, 3:17 am, Standish P <stnd...@gmail.com> wrote:

> > All virtual machines, lisp, java etc use stack, so forth has no
> > monopoly over that.

> False.  The virtual machines in Lua, Python, Perl 6, and others are
> not stack-based.

Actually Lua's VM is heavily stack oriented, if I recall correctly
from experiences embedding it in C/C++.

 
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 McDonald  
View profile  
 More options Aug 21 2010, 5:51 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: Alex McDonald <b...@rivadpm.com>
Date: Sat, 21 Aug 2010 14:51:09 -0700 (PDT)
Local: Sat, Aug 21 2010 5:51 pm
Subject: Re: why forth over lisp?
On 21 Aug, 22:28, toby <t...@telegraphics.com.au> wrote:

> On Aug 21, 11:30 am, John Passaniti <john.passan...@gmail.com> wrote:

> > On Aug 21, 3:17 am, Standish P <stnd...@gmail.com> wrote:

> > > All virtual machines, lisp, java etc use stack, so forth has no
> > > monopoly over that.

> > False.  The virtual machines in Lua, Python, Perl 6, and others are
> > not stack-based.

> Actually Lua's VM is heavily stack oriented, if I recall correctly
> from experiences embedding it in C/C++.

The LUA version 5 VM has 250 "registers" which are indices into the
current stack frame. None of the 38 opcodes has any stack-like
operations; http://luaforge.net/docman/view.php/83/98/ANoFrillsIntroToLua51VMInst...

 
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.
Albert van der Horst  
View profile  
 More options Aug 22 2010, 8:50 am
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: Albert van der Horst <alb...@spenarnc.xs4all.nl>
Date: 22 Aug 2010 12:50:12 GMT
Local: Sun, Aug 22 2010 8:50 am
Subject: Re: why forth over lisp?
In article <97ea7f26-11c5-4c65-8d75-c26f9d010...@y11g2000yqm.googlegroups.com>,
Standish P  <stnd...@gmail.com> wrote:
<SNIP>

>One can write all the programming paradigms in assembly.

Is that can as in:
  if there is a path, I can walk to the moon.
  It's just one step behind the other, isn't it?

Have you actually tried writing a program?
It is tedious enough as it is.

<SNIP>

Groetjes Albert

P.S.  I've written some non-trivial all-assembler stuff.
See my web site below.

--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst


 
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.
Albert van der Horst  
View profile  
 More options Aug 22 2010, 9:01 am
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: Albert van der Horst <alb...@spenarnc.xs4all.nl>
Date: 22 Aug 2010 13:01:37 GMT
Local: Sun, Aug 22 2010 9:01 am
Subject: Re: why forth over lisp?
In article <f9e02b23-c1b7-466d-9f58-0d4303f62...@v8g2000yqe.googlegroups.com>,
Standish P  <stnd...@gmail.com> wrote:
<SNIP>

>They want you to worship the so called "CHUCK" and keep on buying
>their scrap out of ignorance.

Mr. Standish and others, could you please sign your message.
Google is just a miniscule part of Usenet.
[I need to mess with the headers to find the poster, and even
some posters have no sender in the header that I can find.]

Groetjes Albert

--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst


 
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.
Albert van der Horst  
View profile  
 More options Aug 22 2010, 9:23 am
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: Albert van der Horst <alb...@spenarnc.xs4all.nl>
Date: 22 Aug 2010 13:23:31 GMT
Local: Sun, Aug 22 2010 9:23 am
Subject: Re: why forth over lisp?
In article <is2dnUzVYZBqhu3RnZ2dnUVZ_smdn...@supernews.com>,
Elizabeth D Rather  <erat...@forth.com> wrote:

It is interesting what happens if they are not there.
A Forther will type (or start his program with)
"
  CODE P!   POP|X, DX|   POP|X, AX|   OUT|D, X'|   NEXT, END-CODE
"
and get it over with.

More than anything this sets Forth programmers apart :
   they actually have the confidence to do this
   they actually have the expertise to do this
   they actually do this

>Cheers,
>Elizabeth

Groetjes Albert

[Disclaimer: code shown is ciforth's postit-fixup assembler.
Actual code differs among Forth compilers.]

--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst


 
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.
P.M.Lawrence  
View profile  
 More options Aug 22 2010, 10:29 am
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: "P.M.Lawrence" <pml540...@gmail.com>
Date: Sun, 22 Aug 2010 07:29:17 -0700 (PDT)
Local: Sun, Aug 22 2010 10:29 am
Subject: Re: why forth over lisp?
Elizabeth D Rather wrote:
> On 8/21/10 5:45 AM, Paul N wrote:

.
.
.

> > I thought that a normal implementation of Forth required two stacks -
> > one for the programmer to keep values on and one for the computer to
> > keep track of where it had got to. C, by contrast, manages (in most
> > implementations) to use a single stack for both.

> Yes.  And both are directly visible and usable to the programmer,
> provided the rules regarding them (especially the return stack) are
> respected.  The actual implementation and use of stacks in Forth and C
> differ significantly.

The way I would describe it is that the data stack is directly visible/
accessible but the return stack is indirectly visible/accessible,
since to get at the latter you work through keywords that go via the
former. P.M.Lawrence.

 
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.
John Passaniti  
View profile  
 More options Aug 22 2010, 6:01 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: John Passaniti <john.passan...@gmail.com>
Date: Sun, 22 Aug 2010 15:01:19 -0700 (PDT)
Local: Sun, Aug 22 2010 6:01 pm
Subject: Re: why forth over lisp?
On Aug 21, 1:12 pm, Standish P <stnd...@gmail.com> wrote:

> [BEGIN QUOTE]
> I sort of said, “Well, if they can do it, I can do it,” and I just
> did. It isn’t that hard.

The quote is about Forth, not Algol.  He's saying it wasn't hard to
create a Forth compiler.  Your claim was that he wrote an Algol
compiler.  You're wrong.

> > > All virtual machines, lisp, java etc use stack, so forth has no
> > > monopoly over that.

> > False.  The virtual machines in Lua, Python, Perl 6, and others are
> > not stack-based.  Maybe using words like "all" isn't a good idea when
> > your knowledge clearly doesn't extend to "all".  It might be said that
> > many or even most virtual machine architectures are stack-based, but
> > all are certainly not.

> I said "use stack" and you talk of "stack-based".

And for some reason the semantic distance between "use stack" and
"stack-based" in some way validates your claim?  Your statement was
that "all virtual machines [...] use stack."  One presumes you're
talking about the fundamental execution model, and not something
completely trivial like "somewhere in the code, they use a stack."
So, you're either wrong or you're making a distinction that is so
trivial as to be useless.

> > This is vague.  What specific "major concepts" are they "isomorphic
> > in"?  Based on your previous messages, my guess is that in your zeal
> > to abstract away the important differences, you see "isomorphic"
> > commonality.

> This is vague because corporatists wont bring in crisp explanations.
> You gotta run after them and if they give you personally to keep less
> circulation, still come and share.

> They want you to worship the so called "CHUCK" and keep on buying
> their scrap out of ignorance.

I have no idea what you're talking about.  And based on this thread, I
doubt you do.

 
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.
John Passaniti  
View profile  
 More options Aug 22 2010, 6:04 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: John Passaniti <john.passan...@gmail.com>
Date: Sun, 22 Aug 2010 15:04:19 -0700 (PDT)
Local: Sun, Aug 22 2010 6:04 pm
Subject: Re: why forth over lisp?
On Aug 21, 5:28 pm, toby <t...@telegraphics.com.au> wrote:

> > False.  The virtual machines in Lua, Python, Perl 6, and others are
> > not stack-based.

> Actually Lua's VM is heavily stack oriented, if I recall correctly
> from experiences embedding it in C/C++.

Older versions of Lua (4.x and prior) did indeed use a stack-based
virtual machine.  Version 5.0 was the first that switched to a
register-based virtual machine.

 
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.
George Neuner  
View profile  
 More options Aug 23 2010, 12:18 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: George Neuner <gneun...@comcast.net>
Date: Mon, 23 Aug 2010 12:18:02 -0400
Local: Mon, Aug 23 2010 12:18 pm
Subject: Re: why forth over lisp?
On Sat, 21 Aug 2010 14:51:09 -0700 (PDT), Alex McDonald

<b...@rivadpm.com> wrote:
>On 21 Aug, 22:28, toby <t...@telegraphics.com.au> wrote:
>> On Aug 21, 11:30 am, John Passaniti <john.passan...@gmail.com> wrote:

>> Actually Lua's VM is heavily stack oriented, if I recall correctly
>> from experiences embedding it in C/C++.

>The LUA version 5 VM has 250 "registers" which are indices into the
>current stack frame. None of the 38 opcodes has any stack-like
>operations; http://luaforge.net/docman/view.php/83/98/ANoFrillsIntroToLua51VMInst...

Lua 5 still is basically a stack machine - it's a variant of what's
generally called a "deep access" stack, in which the machine can
access "deep" stack elements directly.  Lua's variation does away with
push/pop/etc. top-of-stack instructions.

George


 
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.
John Passaniti  
View profile  
 More options Aug 23 2010, 12:46 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: John Passaniti <john.passan...@gmail.com>
Date: Mon, 23 Aug 2010 09:46:32 -0700 (PDT)
Local: Mon, Aug 23 2010 12:46 pm
Subject: Re: why forth over lisp?
On Aug 23, 12:18 pm, George Neuner <gneun...@comcast.net> wrote:

> Lua 5 still is basically a stack machine - it's a variant of what's
> generally called a "deep access" stack, in which the machine can
> access "deep" stack elements directly.  Lua's variation does away with
> push/pop/etc. top-of-stack instructions.

That's not how the authors characterize it:  http://www.lua.org/doc/jucs05.pdf

I think there may be some confusion here between the C interface to
Lua (which does use a stack) and the execution model for the Lua VM
(which is a register-based VM).


 
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.
Andrew Haley  
View profile  
 More options Aug 23 2010, 2:05 pm
Newsgroups: comp.lang.forth, comp.lang.lisp
From: Andrew Haley <andre...@littlepinkcloud.invalid>
Date: Mon, 23 Aug 2010 13:05:14 -0500
Local: Mon, Aug 23 2010 2:05 pm
Subject: Re: why forth over lisp?
[ Ridiculous x-post list trimmed ]

In comp.lang.forth John Passaniti <john.passan...@gmail.com> wrote:

> On Aug 23, 12:18?pm, George Neuner <gneun...@comcast.net> wrote:
>> Lua 5 still is basically a stack machine - it's a variant of what's
>> generally called a "deep access" stack, in which the machine can
>> access "deep" stack elements directly. ?Lua's variation does away with
>> push/pop/etc. top-of-stack instructions.

> That's not how the authors characterize it:
> http://www.lua.org/doc/jucs05.pdf

George is right, though:

"Since 2003, with the release of Lua 5.0, Lua uses a register-based
virtual machine. This register-based machine also uses a stack, for
allocating activation records, wherein the registers live.  When Lua
enters a function, it preallocates from the stack an activation record
large enough to hold all the function registers."

So, these "registers" are in fact stack-allocated locals.

Andrew.


 
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.
George Neuner  
View profile  
 More options Aug 23 2010, 2:21 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: George Neuner <gneun...@comcast.net>
Date: Mon, 23 Aug 2010 14:21:40 -0400
Local: Mon, Aug 23 2010 2:21 pm
Subject: Re: why forth over lisp?
On Mon, 23 Aug 2010 09:46:32 -0700 (PDT), John Passaniti

<john.passan...@gmail.com> wrote:
>On Aug 23, 12:18 pm, George Neuner <gneun...@comcast.net> wrote:
>> Lua 5 still is basically a stack machine - it's a variant of what's
>> generally called a "deep access" stack, in which the machine can
>> access "deep" stack elements directly.  Lua's variation does away with
>> push/pop/etc. top-of-stack instructions.

>That's not how the authors characterize it:  http://www.lua.org/doc/jucs05.pdf

Actually, that's exactly how they characterize it.  See page 11:

"... This register-based machine also uses a stack, for allocating
activation records, wherein the registers live.  When Lua enters a
function, it preallocates from the stack an activation record
large enough to hold all the function registers. All local variables
are allocated in registers. ..."

Lua 5 "registers" are slots in the function's stack frame and the VM
instructions index them directly.  Deep-access stack.

George


 
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 McDonald  
View profile  
 More options Aug 23 2010, 3:05 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: Alex McDonald <b...@rivadpm.com>
Date: Mon, 23 Aug 2010 12:05:10 -0700 (PDT)
Local: Mon, Aug 23 2010 3:05 pm
Subject: Re: why forth over lisp?
On 23 Aug, 19:21, George Neuner <gneun...@comcast.net> wrote:

Reminds me of the activation records in IBM S/360/370. I can't
remember ever calling them deep-access stacks...

 
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.
Nick  
View profile  
 More options Aug 23 2010, 4:19 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: Nick <3-nos...@temporary-address.org.uk>
Date: Mon, 23 Aug 2010 21:19:18 +0100
Local: Mon, Aug 23 2010 4:19 pm
Subject: Re: why forth over lisp?

George Neuner <gneun...@comcast.net> writes:
> Lua 5 still is basically a stack machine - it's a variant of what's
> generally called a "deep access" stack, in which the machine can
> access "deep" stack elements directly.  Lua's variation does away with
> push/pop/etc. top-of-stack instructions.

I find it hard to attach the term "stack" to something that doesn't have
"push/pop/etc". That is, to me, what makes it a stack rather than some
other sort of data structure.
--
Online waterways route planner            | http://canalplan.eu
Plan trips, see photos, check facilities  | http://canalplan.org.uk

 
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.
John Passaniti  
View profile  
 More options Aug 23 2010, 6:39 pm
Newsgroups: comp.lang.forth, comp.lang.lisp
From: John Passaniti <john.passan...@gmail.com>
Date: Mon, 23 Aug 2010 15:39:35 -0700 (PDT)
Local: Mon, Aug 23 2010 6:39 pm
Subject: Re: why forth over lisp?
On Aug 23, 2:05 pm, Andrew Haley <andre...@littlepinkcloud.invalid>
wrote:

> So, these "registers" are in fact stack-allocated locals.

I have a hard time characterizing the Lua virtual machine as anything
but register-based given the instruction set.  The fact that the
virtual machine *uses* a stack is kind of like saying the Z-80 is a
stack-based microprocessor because it has an uses a stack pointer.

The Lua authors characterize the virtual machine as register-based.
During the beta period prior to the release of 5.0, there was much
talk in the mailing list about this change.  Nobody saw it as anything
but a fundamental change from the stack-based architecture in prior
releases.  And unless I fundamentally misunderstand some of the
upcoming changes, that stack is also going away in the next release,
to better support the ability to call Lua from C and vice versa,
especially in contexts which are not stack-like (like yielding in
coroutines).


 
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.
Anton Ertl  
View profile  
 More options Aug 24 2010, 3:52 am
Newsgroups: comp.lang.forth, comp.lang.lisp
From: an...@mips.complang.tuwien.ac.at (Anton Ertl)
Date: Tue, 24 Aug 2010 07:52:58 GMT
Local: Tues, Aug 24 2010 3:52 am
Subject: Re: why forth over lisp?

John Passaniti <john.passan...@gmail.com> writes:
>On Aug 23, 2:05=A0pm, Andrew Haley <andre...@littlepinkcloud.invalid>
>wrote:
>> So, these "registers" are in fact stack-allocated locals.

>I have a hard time characterizing the Lua virtual machine as anything
>but register-based given the instruction set.  The fact that the
>virtual machine *uses* a stack is kind of like saying the Z-80 is a
>stack-based microprocessor because it has an uses a stack pointer.

No.  On the Z80 the registers don't live on the stack.  There are few
real-machine equivalents to this common VM architecture style.  Maybe
the TMS9900 or a subset of the VAX where you only use SP-relative
addressing for everything.

This VM architecture style is usually called "register machine",
apparently because in most VM instructions it behaves like a register
machine, as you note.  But when you look at what happens when a frame
is allocated, you see that it is not like common hardware register
machines.

>The Lua authors characterize the virtual machine as register-based.
>During the beta period prior to the release of 5.0, there was much
>talk in the mailing list about this change.  Nobody saw it as anything
>but a fundamental change from the stack-based architecture in prior
>releases.

Certainly going from a zero-address instruction for, e.g., addition to
a three-address instruction is a big change, especially in the
opportunities for the VM-code generator.

- anton
--
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2010: http://www.euroforth.org/ef10/


 
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.
Paul Rubin  
View profile  
 More options Aug 24 2010, 4:43 am
Newsgroups: comp.lang.forth, comp.lang.lisp
From: Paul Rubin <no.em...@nospam.invalid>
Date: Tue, 24 Aug 2010 01:43:27 -0700
Local: Tues, Aug 24 2010 4:43 am
Subject: Re: why forth over lisp?

an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
> No.  On the Z80 the registers don't live on the stack.  There are few
> real-machine equivalents to this common VM architecture style.  Maybe
> the TMS9900 or a subset of the VAX where you only use SP-relative
> addressing for everything.

Sparc?

 
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.
Andrew Haley  
View profile  
 More options Aug 24 2010, 6:35 am
Newsgroups: comp.lang.forth, comp.lang.lisp
From: Andrew Haley <andre...@littlepinkcloud.invalid>
Date: Tue, 24 Aug 2010 05:35:06 -0500
Local: Tues, Aug 24 2010 6:35 am
Subject: Re: why forth over lisp?
In comp.lang.forth John Passaniti <john.passan...@gmail.com> wrote:

> On Aug 23, 2:05?pm, Andrew Haley <andre...@littlepinkcloud.invalid>
> wrote:
>> So, these "registers" are in fact stack-allocated locals.

> I have a hard time characterizing the Lua virtual machine as anything
> but register-based given the instruction set.  

I don't think it's possible to make any clear test to distingish
between a stack-allocated virtual register and a temporary that
resides in a stack slot.  You say tomaydoh, I say tomato.

> The fact that the virtual machine *uses* a stack is kind of like
> saying the Z-80 is a stack-based microprocessor because it has an
> uses a stack pointer.

> The Lua authors characterize the virtual machine as register-based.
> During the beta period prior to the release of 5.0, there was much
> talk in the mailing list about this change.  Nobody saw it as
> anything but a fundamental change from the stack-based architecture
> in prior releases.  And unless I fundamentally misunderstand some of
> the upcoming changes, that stack is also going away in the next
> release, to better support the ability to call Lua from C and vice
> versa, especially in contexts which are not stack-like (like
> yielding in coroutines).

Sure, but we're now just arguing about the meaning of the word
"register".  Fair enough, call them registers if you like, but they're
still stack-allocated locals.

Andrew.


 
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.
Rob Warnock  
View profile  
 More options Aug 24 2010, 6:42 am
Newsgroups: comp.lang.forth, comp.lang.lisp
From: r...@rpw3.org (Rob Warnock)
Date: Tue, 24 Aug 2010 05:42:29 -0500
Local: Tues, Aug 24 2010 6:42 am
Subject: Re: why forth over lisp?
Paul Rubin  <no.em...@nospam.invalid> wrote:
+---------------
| an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
| > No.  On the Z80 the registers don't live on the stack.  There are few
| > real-machine equivalents to this common VM architecture style.  Maybe
| > the TMS9900 or a subset of the VAX where you only use SP-relative
| > addressing for everything.
|
| Sparc?
+---------------

Or the AMD Am29000 series [*variable*-sized register windows]...

-Rob

-----
Rob Warnock                     <r...@rpw3.org>
627 26th Avenue                 <URL:http://rpw3.org/>
San Mateo, CA 94403             (650)572-2607


 
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.
Andrew Haley  
View profile  
 More options Aug 24 2010, 6:43 am
Newsgroups: comp.lang.forth, comp.lang.lisp
From: Andrew Haley <andre...@littlepinkcloud.invalid>
Date: Tue, 24 Aug 2010 05:43:36 -0500
Local: Tues, Aug 24 2010 6:43 am
Subject: Re: why forth over lisp?
In comp.lang.forth Anton Ertl <an...@mips.complang.tuwien.ac.at> wrote:

> John Passaniti <john.passan...@gmail.com> writes:
>>On Aug 23, 2:05=A0pm, Andrew Haley <andre...@littlepinkcloud.invalid>
>>wrote:
>>> So, these "registers" are in fact stack-allocated locals.

>>I have a hard time characterizing the Lua virtual machine as anything
>>but register-based given the instruction set.  The fact that the
>>virtual machine *uses* a stack is kind of like saying the Z-80 is a
>>stack-based microprocessor because it has an uses a stack pointer.

> No.  On the Z80 the registers don't live on the stack.  There are few
> real-machine equivalents to this common VM architecture style.  Maybe
> the TMS9900 or a subset of the VAX where you only use SP-relative
> addressing for everything.

The CRISP (C-language Reduced Instruction Set Processor) [1] from AT&T
did that: its registers really were just offsets in the stack.  This
had the rather nice effect that you could pass the address of a
register, and so you never had to spill register contents to the
stack.  One interesting conclusion for me was that, compared with how
well it worked on this machine, C is pretty badly suited to many
computer architectures.

Andrew.

[1] http://en.wikipedia.org/wiki/AT%26T_Hobbit


 
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.
Anton Ertl  
View profile  
 More options Aug 24 2010, 8:02 am
Newsgroups: comp.lang.forth, comp.lang.lisp
From: an...@mips.complang.tuwien.ac.at (Anton Ertl)
Date: Tue, 24 Aug 2010 12:02:44 GMT
Local: Tues, Aug 24 2010 8:02 am
Subject: Re: why forth over lisp?

r...@rpw3.org (Rob Warnock) writes:
>Paul Rubin  <no.em...@nospam.invalid> wrote:
>+---------------
>| an...@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>| > No.  On the Z80 the registers don't live on the stack.  There are few
>| > real-machine equivalents to this common VM architecture style.  Maybe
>| > the TMS9900 or a subset of the VAX where you only use SP-relative
>| > addressing for everything.
>|
>| Sparc?
>+---------------

>Or the AMD Am29000 series [*variable*-sized register windows]...

And its successor, the IA64 register stack engine.

The implementation is different in these cases, though, because these
real-machine architectures have the registers in real registers, and
only push them out to memory when they are not directly accessible.
You cannot access a register through a memory address.  In contrast,
this is possible in principle with these VM implementations (although
it's not necessarily possible in the VM architecture; e.g., in the JVM
you cannot get the address of a or a reference to a local, even though
it would have been easily possible in the early interpreted
implementations).

The CRISP architecture mentioned by Andrew Haley is a better fit.

- anton
--
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2010: http://www.euroforth.org/ef10/


 
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.
Duane Rettig  
View profile  
 More options Aug 24 2010, 12:10 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: Duane Rettig <du...@franz.com>
Date: Tue, 24 Aug 2010 09:10:35 -0700 (PDT)
Local: Tues, Aug 24 2010 12:10 pm
Subject: Re: why forth over lisp?
On Aug 23, 1:19 pm, Nick <3-nos...@temporary-address.org.uk> wrote:

> George Neuner <gneun...@comcast.net> writes:
> > Lua 5 still is basically a stack machine - it's a variant of what's
> > generally called a "deep access" stack, in which the machine can
> > access "deep" stack elements directly.  Lua's variation does away with
> > push/pop/etc. top-of-stack instructions.

> I find it hard to attach the term "stack" to something that doesn't have
> "push/pop/etc". That is, to me, what makes it a stack rather than some
> other sort of data structure.

Think of a stack as a LIFO (Last In, First Out) queue.  The question
is: what is going in and out?  In this day and age of cache
management, a push/pop of a single natural word (4 or 8 bytes) is
ludicrous for performance, especially when the movement of the stack
pointer is sometimes accompanied by extra checks and/or guard page
faults.  So think of a higher level program which uses activation
frames as a cached stack, which beef up performance in the area of
stack access.  The frames are still layed into memory in LIFO fashion
(with exceptions, of course, like non-local exits and, in some
languages, Continuation Passing Style, but this does not remove the
importance of the stack at the lower level.

Duane


 
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.
George Neuner  
View profile  
 More options Aug 24 2010, 1:04 pm
Newsgroups: comp.lang.forth, comp.lang.lisp, comp.lang.c, comp.lang.scheme, comp.lang.postscript
From: George Neuner <gneun...@comcast.net>
Date: Tue, 24 Aug 2010 13:04:42 -0400
Local: Tues, Aug 24 2010 1:04 pm
Subject: Re: why forth over lisp?
On Mon, 23 Aug 2010 12:05:10 -0700 (PDT), Alex McDonald

It is an example of a stack activation record.  

>I can't remember ever calling them deep-access stacks...

The term "deep access" comes from stack machine literature.  In their
pure form stack machines only address the "top" of the stack with
push/pull/peek instructions.  "deep access" variant stack ISAs allow
more generalized stack relative addressing.  

Most everybody here knows this following, but for the sake of
exposition:

Virtually all CPUs allow stack relative addressing ... but as the
stack grows and shrinks the offset to any particular stack resident
datum keeps changing.  This is why the function call sequence for most
CPUs reserves a "framing" register so that stack elements can be
addressed using fixed offsets even as the stack top changes.

By using fixed size activation records and disallowing code to use the
stack for temporary dynamic storage (alloca et al), stack relative
addressing is just as easy as frame relative.  This somewhat
simplifies ISA by removing a required register and makes it easier to
map a virtual machine onto real hardware.

Most decent C compilers have the option to not use explicit framing.
It places some minor limitations on the code but for that you gain a
general index register which can be helpful on register starved
architectures like x86.  (And even on 68K ... sometimes you really
need that 7th address register 8-).

George


 
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.
Messages 26 - 50 of 61 < Older  Newer >
« Back to Discussions « Newer topic     Older topic »