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

RFC: Including operation source code as op class metadata

This discussion is connected to the gegl-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.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

RFC: Including operation source code as op class metadata Jon Nordby 11 Jan 16:55
  RFC: Including operation source code as op class metadata Jon Nordby 21 Jan 02:42
Jon Nordby
2015-01-11 16:55:25 UTC (over 9 years ago)

RFC: Including operation source code as op class metadata

In some development environments using GEGL, like imgflo+Flowhub it is useful to be able to see the source code of an operation in used. Both to understand how existing operations work and as a basis when writing new ops*.

The following branch allows operations to include their source code as operation class metadata (using the "source" key) by using GEGL_OP_C_SOURCE instead of GEGL_OP_C_FILE in their op. The app can then query and display this like any other metadata.
https://git.gnome.org/browse/gegl/log/?h=operation-source

If there are no objections I'd like to merge this some time next week. - Jon

* As mentioned to pippin at 31c3 I've found a way to basically implement live-code operations. Compile new/changed operation code as a .so file, using a unique suffix on the operation name, and then trigger gegl_load_module_directory()
This will leak/keep the old operation class data, but this is small amounts of data for even long-ish development sessions compared to the images being processed.

https://github.com/jonnor/imgflo-server/blob/master/components/example.c https://github.com/jonnor/imgflo/blob/master/lib/library.c#L357

Jon Nordby - www.jonnor.com
Jon Nordby
2015-01-21 02:42:24 UTC (over 9 years ago)

RFC: Including operation source code as op class metadata

Merged, since there were no objections. Can now get the source code of majority of components provided by GEGL (primary exception is the generated ones) using:

const gchar *source = gegl_operation_get_key(opname, "source");

On 11 January 2015 at 17:55, Jon Nordby wrote:

In some development environments using GEGL, like imgflo+Flowhub it is useful to be able to see the source code of an operation in used. Both to understand how existing operations work and as a basis when writing new ops*.

The following branch allows operations to include their source code as operation class metadata (using the "source" key) by using GEGL_OP_C_SOURCE instead of GEGL_OP_C_FILE in their op. The app can then query and display this like any other metadata.
https://git.gnome.org/browse/gegl/log/?h=operation-source

If there are no objections I'd like to merge this some time next week. - Jon

* As mentioned to pippin at 31c3 I've found a way to basically implement live-code operations. Compile new/changed operation code as a .so file, using a unique suffix on the operation name, and then trigger gegl_load_module_directory()
This will leak/keep the old operation class data, but this is small amounts of data for even long-ish development sessions compared to the images being processed.

https://github.com/jonnor/imgflo-server/blob/master/components/example.c https://github.com/jonnor/imgflo/blob/master/lib/library.c#L357

-- Jon Nordby - www.jonnor.com

Jon Nordby - www.jonnor.com