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 release

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 things (ie.

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 writers

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-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-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

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

2004-07-07 Thread Shlomi Fish
On Wednesday 07 July 2004 05:05, Kevin Cozens wrote: On Tue, 2004-07-06 at 19:45, Sven Neumann wrote: The fact that the PDB uses arrays doesn't necessarily mean that a language binding such as Tiny-Fu needs to represent them as arrays. One of the most annoying bits of Script-Fu is that it

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

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 scripts