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

2004-07-12 Thread Sven Neumann
Hi, Kevin Cozens <[EMAIL PROTECTED]> writes: > Script-Fu scripts written for GIMP 1.2 won't work under GIMP 2.x > without some changes due mainly to differences in the API. In what > version of GIMP would it be possible to have the compatibility > features of Tiny-Fu removed? The next time we re

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

2004-07-10 Thread Kevin Cozens
On Sat, 2004-07-10 at 19:19, Markus Triska wrote: > I have explained this above - re-define "set!" to use the TinyScheme > "defined?" command to see if a variable is already defined, and if this is > not the case, define it. Now I understand what you were getting at earlier. That would work only

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

2004-07-10 Thread Markus Triska
> The solution is to add a line to the let block with the > name of the variable in parenthesis (no initial value is required). A few > of the standard Script-Fu scripts had a define that used set! but no let > statement so a let had to be added first. I don't see how this can be > handled automati

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

2004-07-10 Thread Kevin Cozens
At 06:00 AM 07/10/2004, Sven wrote: Kevin Cozens <[EMAIL PROTECTED]> writes: > 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 wr

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

2004-07-10 Thread Sven Neumann
Hi, Kevin Cozens <[EMAIL PROTECTED]> writes: > 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 thing

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

2004-07-09 Thread Kevin Cozens
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 "

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

2004-07-09 Thread Markus Triska
> By using vectors I was able to very quickly update the portion of those > scripts which used SIOD array functions. I have not changed the Tiny-Fu > marshalling code yet but I will do that soon and release a new tarball. Now since there is essentially a one-to-one correspondence between Tiny-Fu's

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

2004-07-08 Thread Kevin Cozens
At 08:09 PM 07/07/2004, Markus Triska wrote: I also opt for vector because apart from being the natural Scheme equivalent to PDB's one-dimensional arrays, it makes writing plug-ins easier for people that have no to little practice in converting common "for/while" loops using tail-recursion, and cur

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

2004-07-07 Thread Markus Triska
> >Are you sure using lists instead of vectors is the right thing to do? > > Lists are linked lists and as such accessing the i'th element is O(i). In > > vectors it is O(1). This can cause an order of complexity increase in > > handling them. This is true, but not much of a problem, since most s

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

2004-07-07 Thread Kevin Cozens
At 05:17 AM 07/07/2004, Shlomi Fish wrote: Are you sure using lists instead of vectors is the right thing to do? Lists are linked lists and as such accessing the i'th element is O(i). In vectors it is O(1). This can cause an order of complexity increase in handling them. No, I'm not sure. For the f