For Programmers: Free Programming Magazines  


Home > Archive > Lisp > June 2005 > scheme in lisp









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author scheme in lisp
HB

2005-05-05, 3:59 pm

Hi,

does someone know of a scheme implementation in common lisp (r4rs or
r5rs would be best)? I wanted to ask if someone already did the work
before i started to do it myself.

Greetings HB

Jens Axel Søgaard

2005-05-05, 3:59 pm

HB wrote:
> does someone know of a scheme implementation in common lisp (r4rs or
> r5rs would be best)? I wanted to ask if someone already did the work
> before i started to do it myself.


PseudoScheme.

<http://mumble.net/~jar/pseudoscheme/>

For the historically interested PseudoScheme was used
to bootstrap Scheme48.

--=20
Jens Axel S=F8gaard


R. Mattes

2005-05-05, 3:59 pm

On Thu, 05 May 2005 19:48:16 +0200, Jens Axel Søgaard wrote:

> HB wrote:
>
> PseudoScheme.
>
> <http://mumble.net/~jar/pseudoscheme/>
>
> For the historically interested PseudoScheme was used
> to bootstrap Scheme48.


But would that come close to a modern scheme (i.e. R4RS or R5RS)?
How does it handle call/cc?

Thanks Ralf Mattes
Pascal Costanza

2005-05-05, 3:59 pm

Jens Axel Søgaard wrote:
> HB wrote:
>
>
>
> PseudoScheme.
>
> <http://mumble.net/~jar/pseudoscheme/>


Depending on the Common Lisp implementation, this needs some
fine-tuning. Follow the link to the older versions and find a README
there that explains some of the details. Apart from that, this seems to
work well.


Pascal

--
2nd European Lisp and Scheme Workshop
July 26 - Glasgow, Scotland - co-located with ECOOP 2005
http://lisp-ecoop05.bknr.net/
Kent M Pitman

2005-05-05, 3:59 pm

"HB" <hbspam@gmx.de> writes:

> does someone know of a scheme implementation in common lisp (r4rs or
> r5rs would be best)? I wanted to ask if someone already did the work
> before i started to do it myself.


I think you might want to Google around for pseudoscheme and/or scheme48.

They may or may not be complete, bu they're a good place to start.
Pascal Costanza

2005-05-05, 3:59 pm

R. Mattes wrote:
> On Thu, 05 May 2005 19:48:16 +0200, Jens Axel Søgaard wrote:
>
>
> But would that come close to a modern scheme (i.e. R4RS or R5RS)?
> How does it handle call/cc?


The README says that it uses BLOCK for call/cc, so no full
continuations. You also only get "proper" tail recursion if the
underlying Common Lisp implementation supports it. (For some construct,
"proper" tail recursion is guaranteed.)

Apart from that it claims to be R4RS with some R5RS stuff added.

It also seems to be maintained. The last version is from November 2004.


Pascal

--
2nd European Lisp and Scheme Workshop
July 26 - Glasgow, Scotland - co-located with ECOOP 2005
http://lisp-ecoop05.bknr.net/
Jens Axel Søgaard

2005-05-05, 8:58 pm

Pascal Costanza wrote:
> R. Mattes wrote:


>=20
> The README says that it uses BLOCK for call/cc, so no full=20
> continuations. You also only get "proper" tail recursion if the=20
> underlying Common Lisp implementation supports it. (For some construct,=

=20
> "proper" tail recursion is guaranteed.)
>=20
> Apart from that it claims to be R4RS with some R5RS stuff added.


From pseudo.lisp:

(format ...
~%All of Revised^4.5 Scheme is available, including define-synt=
ax,~
~%values, dynamic-wind, and eval, but not things that are too~
~%difficult to do in Common Lisp, e.g. upward continuations and~
~%proper tail-recursion in all possible circumstances. See the~
~%user guide for more information.~%")

--=20
Jens Axel S=F8gaard
Pascal Costanza

2005-05-05, 8:58 pm

Pascal Costanza wrote:

[...]
>
> The README says that it uses BLOCK for call/cc, so no full
> continuations. You also only get "proper" tail recursion if the
> underlying Common Lisp implementation supports it. (For some construct,
> "proper" tail recursion is guaranteed.)


For some constructs... [typo].



Pascal

--
2nd European Lisp and Scheme Workshop
July 26 - Glasgow, Scotland - co-located with ECOOP 2005
http://lisp-ecoop05.bknr.net/
Pascal Costanza

2005-05-09, 8:58 am

R. Mattes wrote:
> On Thu, 05 May 2005 19:48:16 +0200, Jens Axel Søgaard wrote:
>
>
> But would that come close to a modern scheme (i.e. R4RS or R5RS)?
> How does it handle call/cc?


The README says that it uses BLOCK for call/cc, so no full
continuations. You also only get "proper" tail recursion if the
underlying Common Lisp implementation supports it. (For some construct,
"proper" tail recursion is guaranteed.)

Apart from that it claims to be R4RS with some R5RS stuff added.

It also seems to be maintained. The last version is from November 2004.


Pascal

--
2nd European Lisp and Scheme Workshop
July 26 - Glasgow, Scotland - co-located with ECOOP 2005
http://lisp-ecoop05.bknr.net/
Pascal Costanza

2005-05-09, 8:58 am

Pascal Costanza wrote:

[...]
>
> The README says that it uses BLOCK for call/cc, so no full
> continuations. You also only get "proper" tail recursion if the
> underlying Common Lisp implementation supports it. (For some construct,
> "proper" tail recursion is guaranteed.)


For some constructs... [typo].



Pascal

--
2nd European Lisp and Scheme Workshop
July 26 - Glasgow, Scotland - co-located with ECOOP 2005
http://lisp-ecoop05.bknr.net/
Jens Axel Søgaard

2005-05-10, 8:58 pm

Pascal Costanza wrote:
> R. Mattes wrote:


>=20
> The README says that it uses BLOCK for call/cc, so no full=20
> continuations. You also only get "proper" tail recursion if the=20
> underlying Common Lisp implementation supports it. (For some construct,=

=20
> "proper" tail recursion is guaranteed.)
>=20
> Apart from that it claims to be R4RS with some R5RS stuff added.


From pseudo.lisp:

(format ...
~%All of Revised^4.5 Scheme is available, including define-synt=
ax,~
~%values, dynamic-wind, and eval, but not things that are too~
~%difficult to do in Common Lisp, e.g. upward continuations and~
~%proper tail-recursion in all possible circumstances. See the~
~%user guide for more information.~%")

--=20
Jens Axel S=F8gaard
R. Mattes

2005-05-11, 4:00 pm

On Thu, 05 May 2005 19:48:16 +0200, Jens Axel Søgaard wrote:

> HB wrote:
>
> PseudoScheme.
>
> <http://mumble.net/~jar/pseudoscheme/>
>
> For the historically interested PseudoScheme was used
> to bootstrap Scheme48.


But would that come close to a modern scheme (i.e. R4RS or R5RS)?
How does it handle call/cc?

Thanks Ralf Mattes
Joerg Hoehle

2005-05-17, 8:59 am

"HB" <hbspam@gmx.de> writes:

> does someone know of a scheme implementation in common lisp (r4rs or
> r5rs would be best)? I wanted to ask if someone already did the work
> before i started to do it myself.


Why did nobody suggest the Schemes that are bart of Peter Norvig's
PAIP or Paul Graham's On Lisp books? Both feature compilers.

I used Peter's, added APPLY and some other functions, had had fun
playing with it in CLISP several times.

IIRC, Code of both books is online, so you needn't even type it in.

Both these will be R4RS. But then, Schemers typically turn to Jaffer's
stdlib for library code, which has plenty of code and also the R5RS
macros. I expect little problems getting that code to work with these
Schemes.

Regards,
Jorg Hohle
Telekom/T-Systems Technology Center
ivant

2005-05-18, 8:58 am

Joerg Hoehle wrote:
> "HB" <hbspam@gmx.de> writes:
>
or[color=darkred]
work[color=darkred]
>
> Why did nobody suggest the Schemes that are bart of Peter Norvig's
> PAIP or Paul Graham's On Lisp books? Both feature compilers.
>
> I used Peter's, added APPLY and some other functions, had had fun
> playing with it in CLISP several times.
>
> IIRC, Code of both books is online, so you needn't even type it in.
>
> Both these will be R4RS. But then, Schemers typically turn to

Jaffer's
> stdlib for library code, which has plenty of code and also the R5RS
> macros. I expect little problems getting that code to work with these
> Schemes.
>
> Regards,
> Jorg Hohle
> Telekom/T-Systems Technology Center


IIRC, there is no scheme implementation in "On Lisp". Paul Graham
*uses* scheme to demonstrate continuations, and then implements
continuation-passing macros in Common Lisp.

As for Peter Norvig's PAIP, it's a great tutorial on how you can
implement Scheme in Common Lisp, but his implementation is far from
ready for prime time. E.g. it uses the Lisp reader, doesn't provide
any Scheme-level macros, has a very limited amount of library
functions, etc. All these issues are fixable, but it doesn't sound
like what the OP is looking for.

Ivan

--
Java has too few parentheses.

Joerg Hoehle

2005-05-20, 3:59 pm

"HB" <hbspam@gmx.de> writes:

> does someone know of a scheme implementation in common lisp (r4rs or
> r5rs would be best)? I wanted to ask if someone already did the work
> before i started to do it myself.


Why did nobody suggest the Schemes that are bart of Peter Norvig's
PAIP or Paul Graham's On Lisp books? Both feature compilers.

I used Peter's, added APPLY and some other functions, had had fun
playing with it in CLISP several times.

IIRC, Code of both books is online, so you needn't even type it in.

Both these will be R4RS. But then, Schemers typically turn to Jaffer's
stdlib for library code, which has plenty of code and also the R5RS
macros. I expect little problems getting that code to work with these
Schemes.

Regards,
Jorg Hohle
Telekom/T-Systems Technology Center
HB

2005-06-04, 3:57 pm

Thanks for the answers (didn't get around to repost earlier, sorry
about that). Should've been exact in my question, but slightly modified
pseudoscheme 2.13 did the trick because I didn't need call/cc.

Greetings HB

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com