Re: Lists, Arrays and Vectors [was Re: [Gimp-developer] Re: Tiny-Fu: A new plug-in for GIMP]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 01:38 PM 07/09/2004, you wrote:
Now since there is essentially a one-to-one correspondence between Tiny-Fu's
vectors and Script-Fu's "arrays", it might be worth considering adding
compatibility definitions to "init.scm" (similar to gimpcompat.h for
plug-ins), that would, depending on a certain "compatibility"-switch in a
configuration file (or in "init.scm" itself, but I don't know if every user
will get a copy or you will install the file in /usr/gimpsomething...),
"define ...." the current array operations and map them to corresponding
vector functions. You could then (depending on said switch) also re-define
set! to use "define" if a variable is not "defined?".

I don't really want a "compatibility"-switch. Instead, old Script-Fu scripts should be updated so they do things the way they are supposed to be done in Scheme rather than how the old SIOD interpreter let script writers get away with some things (ie. not defining variables). It forces a review of the code. For example, I noticed that one script defined an internal routine to compute a least common multiple rather. I deleted the routine and used the standard Scheme routine 'lcm'.


I am planning on putting together a Perl script that will take a Script-Fu script and update as much of it as possible for use with Tiny-Fu. I know of quite a few mappings from SIOD to TinyScheme that can be applied. Pre-defining variables and changing while loops to do loops will still have to be done by hand.


Cheers!

Kevin.  (http://www.interlog.com/~kcozens/)

Owner of Elecraft K2 #2172        |"What are we going to do today, Borg?"
E-mail:kcozens at interlog dot com|"Same thing we always do, Pinkutus:
Packet:ve3syb@ve3yra.#con.on.ca.na|  Try to assimilate the world!"
#include <disclaimer/favourite>   |              -Pinkutus & the Borg


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux