RSS/Atom feed Twitter
Site is read-only, email is disabled

Changes needed to DB Browser content?

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Changes needed to DB Browser content? Kevin Cozens 02 Feb 18:49
  Changes needed to DB Browser content? Marc) (A.) (Lehmann 02 Feb 18:58
   Changes needed to DB Browser content? Kevin Cozens 02 Feb 20:14
  Changes needed to DB Browser content? Sven Neumann 03 Feb 10:59
Kevin Cozens
2004-02-02 18:49:21 UTC (about 20 years ago)

Changes needed to DB Browser content?

At 08:24 PM 01/30/2004, Marc Lehmann wrote:

Constant names are a much smaller difference than calling conventions between languages. It is, in general, impossible to use an API for one language in another without adapting it to the target language.

[snip]

I'd also find it cool if you looked into the DB Browser and made it "fully scheme" or "fully C", i.e. consistent at least to one language. However, the idea of having the same API, character-for-character, in all languages is futile. Don't bother with it.

DB Browser should be consistent for one language even if its just the "abstract PDB language". I don't think it should have different 'modes' to have it show things depending on a user selectable plug-in language. That would probably complicate things too much on the developer/documenter side. I would think that making it consistent to Script-Fu (scheme) would be the way to go. Everyone who has GIMP can create or modify Script-Fu scripts with only a text editor. Not everyone who has GIMP has a C compiler or even Perl. In particular, the Windows users and machines running IRIX 5.3/6.2 to name two examples of systems that could run GIMP but don't come standard with a C Compiler. And yes, I know such things are available but one has to have a need/desire to get a C compiler or Perl interpreter for those environments.

Changing script-fu to comply with this sounds ok, changing the Browser to comply with script-fu is better, but more difficult (right now it's a mix of both, or maybe the "abstract PDB language"?).

[snip]

Perl specifically has a tool named gimpdoc, which shows calling conventions in perl, e.g.:

layer = gimp_layer_new (image,width,height,type,name,opacity,mode) layer = $image->layer_new (width,height,type,name,opacity,mode)

I'm not sure what the difference is between Script-Fu and the "abstract PDB language". DB Browser, IMHO, should allow you to see the names of functions/plug-ins, a list of the arguments that are required, what each argument is for, and the range of constants (by name and value) that can be used for each argument. It could (should?) also include any useful notes such as gotchas, limitations, conditions of use (for the function or argument), or generally useful tidbits of information akin to the type of stuff in "tip of the day" that you see on startup. ie. the function that creates a new image could have a note saying to use the function to create a new layer as the next logical/typical thing to do.

This descriptive included after the argument list should be kept short and not be a simple re-iteration of what you can learn from the argument information above (as is the currently the case for a number of function descriptions).

The DB Browser should not include examples of the invocation of a given function. I think that would get too much in to the specific syntax for a given plug-in language. That should be considered beyond the scope of the contents of DB Browser. Language specific information should be part of the help system of the GIMP or more likely in external documentation.

One could also argue that the DB Browser does things the "abstract PDB" way, and is fine this way, although a bit unspecified, as long as rules exist to convert them to specific implementations.

The rules should be specified (if they aren't already) somewhere in documentation should be easy for a user or new developer to find.

I won't make any changes related to DB Browser information until it is confirmed that changes are needed, what they need to be (at least in a general sense. ie. move things towards language X), and which files need to be updated (ie. ones ending in .c or is it .pdb with the .c files generated from that?).

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 | -Pinkutus & the Borg

Marc) (A.) (Lehmann
2004-02-02 18:58:35 UTC (about 20 years ago)

Changes needed to DB Browser content?

On Mon, Feb 02, 2004 at 12:49:21PM -0500, Kevin Cozens wrote:

DB Browser should be consistent for one language even if its just the "abstract PDB language". I don't think it should have different 'modes' to have it show things depending on a user selectable plug-in language. That would probably complicate things too much on the developer/documenter side. I would think that making it consistent to Script-Fu (scheme) would be the way to go.

(no objections form me)

layer = gimp_layer_new (image,width,height,type,name,opacity,mode) layer = $image->layer_new (width,height,type,name,opacity,mode)

I'm not sure what the difference is between Script-Fu and the "abstract PDB language".

Constant names for one thing, I thought?

The DB Browser should not include examples of the invocation of a given function.

Well, I am sure it will not contain examples for a long time in the future, but surely including examples in _any_ language, even if it's not the one you are developing in, are extremely useful.

During normal development, examples are a hundred times better than lots of prose, even if the synatx is from a (slightly) different language.

given plug-in language. That should be considered beyond the scope of the contents of DB Browser. Language specific information should be part of the help system of the GIMP or more likely in external documentation.

It's called "user friendlyness". I don't ask anybody to add examples to all the functions, but from a theoretic standpoint, having examples in the function reference makes for a very usable interface, because you aren't forced to look into different places for the same info.

[lots of other stuff removed that I agree with]

I won't make any changes related to DB Browser information until it is confirmed that changes are needed,

Personally, I don't think they are *necessary*, but I don't object them, either. Not that my objection or agreement should weigh very much(!).

general sense. ie. move things towards language X), and which files need to be updated (ie. ones ending in .c or is it .pdb with the .c files generated from that?).

AFAICR, most if not all of the pdb interface is created from the .pdb files. At least the constant names, docs etc. are in there.

Kevin Cozens
2004-02-02 20:14:26 UTC (about 20 years ago)

Changes needed to DB Browser content?

At 12:58 PM 02/02/2004, Marc Lehmann wrote:

Constant names for one thing, I thought?

Do you have any specific examples in mind I can look at to see what it shows. An idea of what you think it should show would also be useful.

During normal development, examples are a hundred times better than lots of prose, even if the synatx is from a (slightly) different language.

True. However, other plug-ins/scripts can be the best examples of the syntax and use of the "functions" listed in DB Browser. Also, leaving out language specific examples keeps the information more generic, avoids unneeded bloating of the files which comprise the GIMP, and mean a little less work for the people that need to translate all the information in to other spoken/written languages.

I won't make any changes related to DB Browser information until it is confirmed that changes are needed,

Personally, I don't think they are *necessary*, but I don't object them, either. Not that my objection or agreement should weigh very much(!).

Perhaps not so it may not need to be done for 2.0 but some changes could be made such as ensuring the names of constants are shown where only numeric values are currently given for certain arguments.

AFAICR, most if not all of the pdb interface is created from the .pdb files. At least the constant names, docs etc. are in there.

I got that impression when the ChangeLog indicated that a .pdb file was changed to removed the redundant code I recently reported in a .c file.

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 | -Pinkutus & the Borg

Sven Neumann
2004-02-03 10:59:55 UTC (about 20 years ago)

Changes needed to DB Browser content?

Hi,

Kevin Cozens writes:

I'm not sure what the difference is between Script-Fu and the "abstract PDB language". DB Browser, IMHO, should allow you to see the names of functions/plug-ins, a list of the arguments that are required, what each argument is for, and the range of constants (by name and value) that can be used for each argument. It could (should?) also include any useful notes such as gotchas, limitations, conditions of use (for the function or argument), or generally useful tidbits of information akin to the type of stuff in "tip of the day" that you see on startup. ie. the function that creates a new image could have a note saying to use the function to create a new layer as the next logical/typical thing to do.

This descriptive included after the argument list should be kept short and not be a simple re-iteration of what you can learn from the argument information above (as is the currently the case for a number of function descriptions).

The DB Browser should not include examples of the invocation of a given function. I think that would get too much in to the specific syntax for a given plug-in language. That should be considered beyond the scope of the contents of DB Browser. Language specific information should be part of the help system of the GIMP or more likely in external documentation.

Actually I don't think DB Browser is actually very well suited for this job. The API reference is a lot more useable already although perhaps it lacks the search capabilities of the DB Browser. However you will have noticed that the API reference manuals contain basically the same info as displayed by the DB Browser. This is because it's all generated from the same source. So the best thing to do if you want to improve both the API docs and the DB Browser is to send patches to improve the PDB documentation.

In the long run we plan to revamp the PDB. When redesigning the PDB, documentation should play an important role. I don't think it makes sense to stick to procedures that are defined and documented in C code. A procedure definition could be an XML file or some simple s-exp syntax. Such a file could contain elaborate descriptions that wouldn't have to be compiled into the GIMP application but could be parsed on demand by the DB Browser and the tools that generate the API reference manuals.

I won't make any changes related to DB Browser information until it is confirmed that changes are needed, what they need to be (at least in a general sense. ie. move things towards language X), and which files need to be updated (ie. ones ending in .c or is it .pdb with the .c files generated from that?).

Perhaps you want to read HACKING. It will answer at least some of your questions.

Personally I don't think the information displayed by the DB Browser should be changed towards any language. The GIMP language bindings will always have a different syntax and I don't see why the DB Browser should favorite a particular language. Changing the DB Browser will most probably lead to more confusion than it would be helpful.

Sven