Re: [Gimp-developer] script-fu documentation

2005-01-23 Thread Kevin Cozens
Campbell Barton wrote:
Script X dosent work with Tiny fu but and VsVercer for other scripts 
,.. you know, it just gets messy.
Its best top keep to one, newbies will ask which to use and get 
confusticated answeres by opinionated experts.
Forgetting about Tiny-Fu for a moment there are still problems with the 
Scheme based scripts. You may not be aware that scripts written for one 
version of GIMP may not run in a newer version of GIMP due to changes in 
the PDB interface, or due to enforcement of certain rules or behaviour 
in GIMP itself. For example, the current version of GIMP requires you to 
add a layer to an image before you can manipulate its contents. Earlier 
versions of GIMP had no such restriction. Any script which doesn't add a 
layer before doing certain operations on it will fail.

Opinionated experts will often give differing and confusing answers to 
questions regardless of topic. In this case, the answers aren't that 
complicated or confusing.

The short answer is if a person isn't planning on writing their own 
scripts, they should use the plug-in which runs the script they want to 
use. For someone who does plan on writing or modifying scripts, they can 
use the more well known, but problematic, plug-in known as Script-Fu or 
they can use the newer, and less tested, plug-in known as Tiny-Fu.

It is much easier to debug scripts when using Tiny-Fu than it is when 
using Script-Fu. Also, if a person knows Scheme they will find it easier 
to write scripts for Tiny-Fu since it more closely follows the existing 
Scheme standards than Script-Fu ever.

(Hmm...the above two paragraphs sound like something I should add to my 
Tiny-Fu FAQ)

Sounds like tinyfu is better and smalled, grerater development?
Why not switch?
Tiny-Fu is better in a number of ways and I'm currently working on one 
additional change which is of importance to GIMP users whose written 
language can not be properly displayed using the ASCII character set.

I feel that a switch will be made. It is just a matter of when rather 
than if. It could happen as early as GIMP 2.4 or it might not happen 
until much later. There is no deadline or milestone currently set as to 
when a switch will occur.

PS, Im implying that scripting in the 2 script-fu ansd tiny  fu isnt 
the same, if it is - then maby my arg dosent hold, tho in my 
expereince implimentations are useually diff.
Tiny-Fu has a set of compatability routines for Script-Fu so writing 
scripts for Tiny-Fu isn't that different from writing them for 
Script-Fu. Most Script-Fu scripts can be made to run under Tiny-Fu with 
few changes. The main difference is that Tiny-Fu requires you to define 
all your variables (as noted in the Scheme standard documentation) 
before you use them the first time. There are a few scripts I have run 
across which require larger changes since they relied on bad behaviour 
of the Scheme interpreter used in Script-Fu. In one particular instance, 
the bad behaviour was being able to globally access a variable that was 
defined locally in a define block.

If new scripts avoid features available in SIOD which are not defined in 
the Scheme standard document and all variables are defined before first 
use it will be easier, if not trivial, to make them run using Tiny-Fu.

___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] script-fu documentation

2005-01-22 Thread Sven Neumann
Hi,

on a related note, there's an interesting feature that we should
consider to add to Tiny-Fu and, if it stays around, to Script-Fu:

Yesterday, I moved GimpEnumStore and GimpEnumComboBox to
libgimpwidgets. GimpEnumComboBox gives you a very easy way to create a
combo-box with all possible enum values for a given registered enum.
Since all enums used in the PDB are registered with the GType system
(since GIMP 2.2), it should be easy to add a new SF-ENUM parameter
that scripts can use to allow users to choose an enum value. This
could be useful for example in perspective-shadow.scm:

   SF-OPTION _"Interpolation"  '(_"None" _"Linear" _"Cubic")

would become

   SF-ENUM   _"Interpolation"  "GimpInterpolationType"

The advantage is that it doesn't duplicate the translatable strings
and that new interpolation types (such as the Lanczos interpolation
routines which have just been added), would automatically show up.

Kevin, would you like to hack on this or should I have a look at it?

For this to work correctly, we will need to move some more enums from
libgimp to libgimpbase but that is going to happen over the next days
anyway.


Sven
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] script-fu documentation

2005-01-21 Thread Kevin Cozens
[EMAIL PROTECTED] wrote:
I would hope that if ScriptFu is pulled out,
TinyFu will also provide an interpreter 
directly in GIMP's GUI that one can use 
interactively. (I haven't used TinyFu)...
 

Tiny-Fu was built using the framework of Script-Fu. It has all the main 
features of Script-Fu (except for the Browse button in Console mode) but 
users a Scheme interpreter which follows the standards more closely than 
the interpreter used in Script-Fu.

I would suggest you look at the web page and go over the FAQ in the 
meantime. It should help you better understand the Tiny-Fu project and 
how it compares to Script-Fu. You could even try using it. :-)

For those of you who don't already know, the Tiny-Fu web page can be 
found at:
http://www.interlog.com/~kcozens/software/gimp/tiny-fu.html

(And to some others on gimp-devel: Yes, I know I said I would write an 
e-mail a while back to talk about Tiny-Fu and to "sell" it. I swear its 
on my ToDo list. Other projects have kept it from getting to the top of 
the list. I will write something up about this long before GIMP 2.4 is 
released. Really!)

co-exist as part of the normal build for 
one release, at least, while scripts get 
converted?  Just a thought...
 

I started development of Tiny-Fu in a copy of the GIMP source tree. Now 
I work on it outside the source tree as it is now a separate module. I 
don't see it getting added to the main tree any time soon and I don't 
think it should be. Anyone who can build GIMP can download the source 
for Tiny-Fu, build it, and install it along side Script-Fu. For the 
Windows users a pre-built binary exists.

I don't have the space available to host pre-built binaries for all the 
different OS and distro's which can run GIMP but I would be happy to 
provide pointers on the Tiny-Fu web page to any binaries which someone 
else builds and makes available for download.

--
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:[EMAIL PROTECTED]|  Try to assimilate the world!"
#include|  -Pinkutus & the Borg
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] script-fu documentation

2005-01-21 Thread Campbell Barton
In my experience, being implimentation agnostic is not good-
it can fragment the scripting community,
Script X dosent work with Tiny fu but and VsVercer for other scripts 
,.. you know, it just gets messy.
Its best top keep to one, newbies will ask which to use and get 
confusticated answeres by opinionated experts.

Sounds like tinyfu is better and smalled, grerater development?
Why not switch?
- Cam
PS, Im implying that scripting in the 2 script-fu ansd tiny  fu isnt the 
same, if it is - then maby my arg dosent hold, tho in my expereince 
implimentations are useually diff.

[EMAIL PROTECTED] wrote:
I would hope that if ScriptFu is pulled out,
TinyFu will also provide an interpreter 
directly in GIMP's GUI that one can use 
interactively. (I haven't used TinyFu)...
Perhaps the two interpreters could also 
co-exist as part of the normal build for 
one release, at least, while scripts get 
converted?  Just a thought...

_-T
___
Speed up your surfing with Juno SpeedBand.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.juno.com/surf to sign up today!
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
 


--
Campbell J Barton
Sierra Suites Hotel
32 Fourth Av Waltham, Room 103
phone: 781 622 1900
mobile: 617 935 6773
133 Hope Street
Geelong West, Victoria 3218 Australia
URL:http://www.metavr.com
e-mail: [EMAIL PROTECTED]
phone: AU (03) 5229 0241


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Gimp-developer] script-fu documentation

2005-01-21 Thread [EMAIL PROTECTED]

I would hope that if ScriptFu is pulled out,
TinyFu will also provide an interpreter 
directly in GIMP's GUI that one can use 
interactively. (I haven't used TinyFu)...
Perhaps the two interpreters could also 
co-exist as part of the normal build for 
one release, at least, while scripts get 
converted?  Just a thought...

_-T

___
Speed up your surfing with Juno SpeedBand.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.juno.com/surf to sign up today!

___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] script-fu documentation

2005-01-20 Thread Kevin Cozens
Campbell Barton wrote:
Will thge gimp move to tiny-fu compleately?
I am not aware of any plans to replace Script-Fu with Tiny-Fu in the 
GIMP source tree. Although that might change now that I am about to 
start testing the Tiny-Fu changes which added UTF-8 support.  If 
Script-Fu was pulled out as a separate module it would make it easier to 
let users/packagers choose which of the two Scheme-based plug-ins they 
wish to use. For now, the two will happily co-exist. It may be time to 
start a message thread about this with the recent branching of GIMP.

___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


Re: [Gimp-developer] script-fu documentation

2005-01-19 Thread Campbell Barton
Will thge gimp move to tiny-fu compleately?
Kevin Cozens wrote:
Tomasz Grobelny wrote:
Where can I find a decent script-fu documentation? I mean a document 
where I can find most supported functions especially string 
manipulation functions (like split, chop, substring, find etc.). TIA
 

The Script-Fu plug-in of GIMP uses SIOD as its Scheme interpreter. The 
main site for information on SIOD is 
http://people.delphiforums.com/gjc/siod.html. Be aware that not all 
features of SIOD as listed at that site are available in GIMP. This is 
because G IMP uses an older version of the SIOD interpreter and 
doesn't use all of the C source files which are part of SIOD. IIRC, 
the features found in slibu.c are not available to be used in Script-Fu.

___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


--
Campbell J Barton
Sierra Suites Hotel
32 Fourth Av Waltham, Room 103
phone: 781 622 1900
mobile: 617 935 6773
133 Hope Street
Geelong West, Victoria 3218 Australia
URL:http://www.metavr.com
e-mail: [EMAIL PROTECTED]
phone: AU (03) 5229 0241


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Gimp-developer] script-fu documentation

2005-01-19 Thread Kevin Cozens
Tomasz Grobelny wrote:
Where can I find a decent script-fu documentation? I mean a document where I 
can find most supported functions especially string manipulation functions 
(like split, chop, substring, find etc.). TIA
 

The Script-Fu plug-in of GIMP uses SIOD as its Scheme interpreter. The 
main site for information on SIOD is 
http://people.delphiforums.com/gjc/siod.html. Be aware that not all 
features of SIOD as listed at that site are available in GIMP. This is 
because G IMP uses an older version of the SIOD interpreter and doesn't 
use all of the C source files which are part of SIOD. IIRC, the features 
found in slibu.c are not available to be used in Script-Fu.

___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer