Home > Archive > Scheme > January 2008 > Scheme to C with native threads?
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 to C with native threads?
|
|
| Nyang A. Phra 2008-01-14, 7:22 pm |
| Is there an open source implementation of Scheme - standards-
conformance doesn't matter that much, although at least proper tail
recursion would be nice - that would
1. compile to C
2. support native threads
3. possibly have a FFI of its own?
-Nyang
| |
| Joel J. Adamson 2008-01-14, 7:22 pm |
| "Nyang A. Phra" <naphra@gmail.com> writes:
> Is there an open source implementation of Scheme - standards-
> conformance doesn't matter that much, although at least proper tail
> recursion would be nice - that would
>
> 1. compile to C
> 2. support native threads
> 3. possibly have a FFI of its own?
There are a few, Chicken (www.call-with-current-continuation.org) and
Gambit (www.iro.umontreal.ca/~gambit) being the ones I've used. I'm not
sure about qualification #2 in either implementation.
Joel
--
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA 02114
(617) 643-1432
(303) 880-3109
| |
| Joel J. Adamson 2008-01-14, 7:22 pm |
| "Nyang A. Phra" <naphra@gmail.com> writes:
> Is there an open source implementation of Scheme - standards-
> conformance doesn't matter that much, although at least proper tail
> recursion would be nice - that would
>
> 1. compile to C
> 2. support native threads
> 3. possibly have a FFI of its own?
There are a few, Chicken (www.call-with-current-continuation.org) and
Gambit (www.iro.umontreal.ca/~gambit) being the ones I've used. I'm not
sure about qualification #2 in either implementation.
Joel
--
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA 02114
(617) 643-1432
(303) 880-3109
| |
| Nyang A. Phra 2008-01-14, 7:22 pm |
| > There are a few, Chicken (www.call-with-current-continuation.org) and
> Gambit (www.iro.umontreal.ca/~gambit) being the ones I've used. =A0I'm not=
> sure about qualification #2 in either implementation.
I think neither of them unfortunately has native threads (few Scheme
implementations seem to), but somebody please correct me if I'm wrong.
-Nyang
| |
| Abdulaziz Ghuloum 2008-01-14, 7:22 pm |
| Nyang A. Phra wrote:
> 3. possibly have a FFI of its own?
Sorry, but, as opposed to what exactly? Having another implementation's
FFI?
| |
| Nyang A. Phra 2008-01-14, 7:22 pm |
| On Jan 14, 10:05=A0pm, Abdulaziz Ghuloum <aghul...@cee.ess.indiana.edu>
wrote:
> Nyang A. Phra wrote:
>
> Sorry, but, as opposed to what exactly? =A0Having another implementation's=
> FFI?
No, just meant that the possibility to extend the intermediate C code
with foreign functions isn't what I'm looking for, but a proper FFI
facility.
-Nyang
| |
| Abdulaziz Ghuloum 2008-01-15, 4:29 am |
| Nyang A. Phra wrote:
> No, just meant that the possibility to extend the intermediate C code
> with foreign functions isn't what I'm looking for, but a proper FFI
> facility.
I thought just about every implementation had such facility (except for
Ikarus perhaps, but it doesn't meet your other two criteria anyways).
| |
| Nyang A. Phra 2008-01-15, 4:29 am |
| On Jan 15, 11:44=A0am, Abdulaziz Ghuloum <aghul...@cee.ess.indiana.edu>
wrote:
> Nyang A. Phra wrote:
>
> I thought just about every implementation had such facility (except for
> Ikarus perhaps, but it doesn't meet your other two criteria anyways).
Yeah sounds quite plausible, I just don't know different Scheme
implementations very well.
-Nyang
| |
| Abdulaziz Ghuloum 2008-01-15, 4:29 am |
| Nyang A. Phra wrote:
> Yeah sounds quite plausible, I just don't know different Scheme
> implementations very well.
May I ask about what you're trying to do? Are Scheme->C and FFI
real requirements to your project? Or do you just think they are
necessary?
It seems like you're just starting with Scheme and if that's the
case, using an FFI facility may be challenging. It's usually a
pretty large extension to Scheme and requires learning how each
implementation does it (they're all different). Just make sure
you put your time and effort in learning things that are worth
learning and not get with some tricky FFI issues.
So, do you have a task that's not doable in plain Scheme?
| |
| George Neuner 2008-01-15, 7:23 pm |
| On Mon, 14 Jan 2008 15:11:44 -0800 (PST), "Nyang A. Phra"
<naphra@gmail.com> wrote:
>On Jan 14, 10:05_pm, Abdulaziz Ghuloum <aghul...@cee.ess.indiana.edu>
>wrote:
>
>No, just meant that the possibility to extend the intermediate C code
>with foreign functions isn't what I'm looking for, but a proper FFI
>facility.
>
>-Nyang
If I understand what you mean by "proper", I can't think of any
language that will suit you. Most languages historically have
supported only C and/or Fortran.
Now you can find languages that also interface to C++, .NET and Java,
but since those aren't the world I don't see how they could be
considered "proper".
George
--
for email reply remove "/" from address
| |
| Andrew Reilly 2008-01-15, 7:23 pm |
| On Tue, 15 Jan 2008 13:13:21 -0500, George Neuner wrote:
> If I understand what you mean by "proper", I can't think of any language
> that will suit you. Most languages historically have supported only C
> and/or Fortran.
[I don't know what the OP was really getting at, myself, but this is just
a small interjection on the subject of language interoperability.]
This is at least partly a platform issue, and the current situation has a
lot to do with the Unix model of what a linker/loader is supposed to do.
Many, many years ago I did some work on a Vax running VMS, and that was a
bit of an eye-opener: *all* of the languages supported by the system
shared the same ABI, and so could be trivially linked together. Now that
experience pre-dates C++, and I have no idea how the VMS back/end linker
would handle that. Nor do I know how lisp or scheme, or the plethora of
scripting and object-oriented languages that exist today would fit. At
the time, on that machine, there was just C, Pascal, Fortran and probably
a couple of others in a similar vein, and they clearly have some fairly
close semantic ties.
Clearly Microsoft is trying to promote the idea that .NET provides
something similar, but it's also clear that their object model is a
little too simple for some languages to fit well.
Cheers,
--
Andrew
|
|
|
|
|