Determining Scheme Implementation

This is a discussion on Determining Scheme Implementation within the Scheme forums in Programming Languages category; I want to try to make a cross-implementation library that I can use for some system-related tasks (starting a program, communicating to it via unix stdin, etc). Most of the implementations I am interested in offer this sort of functionality, but the mechanisms differ. Is there any way that I could easily determine the Scheme implementation that my code is being run under so that I can write my code differently for each one, or will I have to end up doing something hackish such as requiring that a value be set in the code?...

Go Back   Application Development Forum > Programming Languages > Scheme

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-30-2008, 05:45 PM
Will Donnelly
Guest
 
Default Determining Scheme Implementation

I want to try to make a cross-implementation library that I can use
for some system-related tasks (starting a program, communicating to it
via unix stdin, etc). Most of the implementations I am interested in
offer this sort of functionality, but the mechanisms differ. Is there
any way that I could easily determine the Scheme implementation that
my code is being run under so that I can write my code differently for
each one, or will I have to end up doing something hackish such as
requiring that a value be set in the code?
Reply With Quote
  #2  
Old 08-30-2008, 08:32 PM
Alex Shinn
Guest
 
Default Re: Determining Scheme Implementation

On 8月31日, 午前6:45, Will Donnelly <Will.Donne...@gmail.com>wrote:
> I want to try to make a cross-implementation library that I can use
> for some system-related tasks (starting a program, communicating to it
> via unix stdin, etc). Most of the implementations I am interested in
> offer this sort of functionality, but the mechanisms differ. Is there
> any way that I could easily determine the Scheme implementation that
> my code is being run under so that I can write my code differently for
> each one, or will I have to end up doing something hackish such as
> requiring that a value be set in the code?


There's http://synthcode.com/scheme/detect-scheme.scm
I wrote is a few years ago, so the tests may be somewhat
out of date.

--
Alex
Reply With Quote
  #3  
Old 08-30-2008, 11:46 PM
Will Donnelly
Guest
 
Default Re: Determining Scheme Implementation

On Aug 30, 7:32 pm, Alex Shinn <alexsh...@gmail.com> wrote:
> On 8月31日, 午前6:45, Will Donnelly <Will.Donne...@gmail.com> wrote:
>
> > I want to try to make a cross-implementation library that I can use
> > for some system-related tasks (starting a program, communicating to it
> > via unix stdin, etc). Most of the implementations I am interested in
> > offer this sort of functionality, but the mechanisms differ. Is there
> > any way that I could easily determine the Scheme implementation that
> > my code is being run under so that I can write my code differently for
> > each one, or will I have to end up doing something hackish such as
> > requiring that a value be set in the code?

>
> There'shttp://synthcode.com/scheme/detect-scheme.scm
> I wrote is a few years ago, so the tests may be somewhat
> out of date.
>
> --
> Alex


Thanks, this looks like exactly what I was looking for (well, aside
from the existence of some R5RS function that I managed to overlook).
I'll have to try this out and make sure the tests all work.
Reply With Quote
  #4  
Old 08-31-2008, 10:23 AM
Grant Rettke
Guest
 
Default Re: Determining Scheme Implementation

Mentioned in this thread:

http://list.cs.brown.edu/pipermail/p...st/026776.html

along with a few other that I've read, if you use R6RS they've got a
tentative approach to library compatibility that sounds like the
approach you are going to follow.
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:23 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.