Economics & Eye Candy
Alex Tweedly
alex at tweedly.net
Tue Jun 7 19:47:38 EDT 2005
Dan Shafer wrote:
> The problem, IMNSHO, isn't with Rev, it's with the fact that as far
> as I know there is no single method of creating and implementing
> externals that runs on all platforms. I may be wrong about that; DLLs
> may in fact be more cross-platform than they were last time I looked,
> particularly with the emergence of OS X.
But Rev have already done the hard part - there is already a mechanism
to call externals on each platform.
> So if there is a way to facilitate the incorporation of cross-
> platform external routines relatively transparently and to give me a
> Transcript-level way of dealing with them, I'm happy to see it
> implemented even though I have yet to need such capability in the
> dozens of things I've written.
I'd like to have it so I could use, for example, libraries for accessing
EXIF info in JPG files. It can be done in Transcript (see my initial
version in libEXIF on revOnline), but it's SLOW, horribly slow. There
are a number of readily available, free C libraries that would do this
for me, and they are platform independent, simple, straightforward C. I
could write C wrappers for them, and use the existing SDK / samples to
call them as externals - I even started doing it, but stopped because I
hate writing C, and I'm not at all good at it.
> But if supporting externals must be done for a specific platform --
> or, almost as badly, differently for each platform -- then I'm in
> favor of Rev passing on that and fixing more of the bugs we still
> have to work around.
I'd agree with that. But given that the base mechanism already exists,
and that if you can write C you can write externals to use from
Transcript, then "all" that's missing is a way to access existing
libraries without having to write the complex (and tedious) wrapper code
(esp for those who can't , or won't, write C, and so are unable to do
such wrappers).
SWIG should be able to do this; it provides wrapper C code to go around
C or C++ libraries, and already can generate the wrappers needed by 12
or 13 different scripting languages; it seems unlikely that Transcript
couldn't be added.
It could probably even be done without RunRev .... though someone
experienced in writing externals for transcript, and good at C would be
needed.
www.swig.org
or better, http://www.swig.org/exec.html
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.2 - Release Date: 04/06/2005
More information about the use-livecode
mailing list