| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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? |
|
#2
| |||
| |||
| 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 |
|
#3
| |||
| |||
| 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. |
|
#4
| |||
| |||
| 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. |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.