FFI survey for smalltalk 
Author Message
 FFI survey for smalltalk

I'm currently writing an extensive survey about various foreign language
interfaces for all major high-level languages.
Can somebody correct this Smalltalk section?

<survey>
Dynamic FFI's seem to have:
VisualWorks (see below),
Object Connect's Smalltalk MT
  http://www.*-*-*.com/ #Runtime
GNU Smalltalk (see below),
Dolphin http://www.*-*-*.com/
and maybe some more.

Pocket Smalltalk for the PalmPilot seems to have one:
http://www.*-*-*.com/ #systemdict
You may look up classes "dynamically" by name at runtime with the
methods:
          Smalltalk at: #ClassName

No FFI have:
Squeak Smalltalk, Little Smalltalk, ...

Visual Works SmallTalk 5i.1 "DLL and C Connect"

This is the new non-commercial version from the parcplace division
Cincom. It seems to be a full-featured and good one.

(followed by a longer FFI desc)

Links: [www],
  no ffi docs online yet, only in the downloadable PDF doc dllccug.pdf.

GNU Smalltalk

This has dynaloader via the GNU DLD [link] and a true FFI [link],
supports weak and finalizable objects.

</survey>

I'm unsure about the following implementations, whether they have FFI's:

- Cincom's Object Studio Smalltalk (most likely)
- Cincom's Visual Smalltalk Enterprise (VSE)    (most likely)
     The premier commercial version, but there's doubt about its future.

- Exept's Smalltalk/X:
     (This compiles to C, so I doubt if there's a dynamic FFI, a static
one is probably enough.)
- IBM's Visual Age Smalltalk
- QKS Smalltalk Agents

--
Reini Urban
http://www.*-*-*.com/



Wed, 18 Jun 1902 08:00:00 GMT  
 FFI survey for smalltalk

Quote:

>I'm currently writing an extensive survey about various foreign
language
>interfaces for all major high-level languages.
>Can somebody correct this smalltalk section?

> ...

>No FFI have:
>Squeak Smalltalk, Little Smalltalk, ...

Actually, FFI (Foreign Function Interface) capability was added
to Squeak very recently, in version 2.8alpha.  (So it will be in
the 2.8 release.)

For more details, see Andreas Raab's post on the Squeak list:

http://www.egroups.com/group/squeak/10808.html

- Doug Way
  EAI/Transom Technologies, Ann Arbor, MI
  http://www.transom.com

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



Wed, 18 Jun 1902 08:00:00 GMT  
 FFI survey for smalltalk

Quote:

> I'm currently writing an extensive survey about various foreign language
> interfaces for all major high-level languages.
> Can somebody correct this smalltalk section?
[snip]
> No FFI have:
> Squeak Smalltalk, Little Smalltalk, ...

[snip]

Squeak 2.8 just got an FFI. See the Squeak list archives or download a
copy of Squeak 2.8.

Cheers,
Bijan Parsia.



Wed, 18 Jun 1902 08:00:00 GMT  
 FFI survey for smalltalk

Quote:

> - Exept's Smalltalk/X:
>      (This compiles to C, so I doubt if there's a dynamic FFI, a static

This is kind of semantic I guess. I do believe that ST/X does have FFI
ability, in addition to its ability to A) compile to C or B) intermix
inlined C statements

--
Travis Griggs (a.k.a. Lord of the Fries)
Member, Fravenic Skreiggser Software Collective
Key Technology
P-P-P-Penguin  Power!



Wed, 18 Jun 1902 08:00:00 GMT  
 FFI survey for smalltalk

Quote:

> - Exept's Smalltalk/X:
>      (This compiles to C, so I doubt if there's a dynamic FFI, a static
> one is probably enough.)

Its possible with Smalltalk/X .
There is semantic support for it, but no syntactic sugar at this level.

ObjectFileLoader>>loadLibrary:     load the library and returns a handle
to it.
ObjectFileHandle>>getFunction:     returns an ExternalFunction from the
lib.  
ExternalFunction>>call / callWith: calls the function / with arg(s).

for example:

test.c:

int
{
    printf("hello world\n");
    return 815;

Quote:
}

compile it:
   make test.so

load it:
    h := ObjectFileLoader loadLibrary:'test'.
    f := h getFunction:'theHelloFunction'.
    retVal := f call.
    -- result is 815 ---

by the way: all of the above is done transparently by the system,
whenever a method with embedded C-code is accepted in
the browser ...
... the above are the basic building blocks of this functionality.

Pierre Schwarz

http://www.exept.de



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. FFI survey

2. FFI survey

3. Informal survey of Scheme library/FFI use

4. New Cincom Smalltalk Survey, 7/24/03

5. New Cincom Smalltalk Survey, 3/18/03

6. New Cincom Smalltalk Survey 2/10/03

7. Cincom Smalltalk Patch Survey - 9/10/02

8. New Smalltalk Survey Posted

9. - New Smalltalk Survey

10. New Cincom Smalltalk Developer Survey

11. Cincom Smalltalk Survey

 

 
Powered by phpBB® Forum Software