Release of G'MIC 2.8

help worked in 2.8.4 for commands in files other than update***.gmic, or am I misreading your problem?

Hmm, at least not with my 2.8.4 from custom commands only in $_path_user!

I’ll try to fix that ASAP.

It should be working now, with latest source in git repo.

Am I right, that now the help command works for update290.gmic and $_path_user?

Wth command <file> loaded functions I still get no help! Seemingly there is no way back to the source? Hmm an uncommand <file> to remove all functions in that <file> wouldn’t be bad either, than there might be a pointer to the source with comments too?

By the way:

gmic uncommand * ${_path_rc}update${_version}.gmic $_path_user

deletes 4181 commands and reloads only 4180!

[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Discard definitions of all custom commands (4181 commands).
[gmic]-0./ Input custom command file ‘/Users/karo/.config/gmic//update290.gmic’ (4040 new, 27 replaced, total: 4040).
[gmic]-0./ Input custom command file ‘/Users/karo/.gmic’ (140 new, 3 replaced, total: 4180).
[gmic]-0./ End G’MIC interpreter.

@David_Tschumperle A ton of my filters just broke after the recent update. I believe these worked fine before today.

  1. Binary Alternating Quaddro Texture [Multichannel] is broken.
  2. Brick no longer shows the preview of bricks
  3. Color Modulo Texture shows a error
  4. Construction Material Texture shows nothing useful
  5. Fibonacci Texture broke.
  6. Premade Palette broke
  7. Transfer Color[Reduced Colors] broke
  8. Brick lost it preview

You are talking about 2.9.0_pre ?

1 Like

Yep, that is what I’m talking about.

I’ll check that.

After a quick check.
That’s probably because you are using the # character in some of your filter parameters, and the filter parser interpret that as the beginning of a comment, and thus discard the parameter.
Will check if this can be fixed easily.

Fixed.

1 Like

I wonder if there is a way to force older versions to have the latest command set for testing purposes. Just thinking through the problem as someone who wants to commit regularly but is delayed or discouraged by the tedium described below.

I find it annoying to have to update the CLI binary to use my latest committed commands. It can be time consuming and confusing: I don’t know when I should delete my local *.gmic copies because I don’t know if I will have parity when I do update. I would have to delete it, save, update and then check command using e[] $$ method, and repeat. Sometimes, there is parity but then I purposefully or accidentally change something in my local file. This makes it harder to keep track of bugs or discrepancies because I have multiple copies of the same command.

I don’t use git locally on my end or have a software manager because I use win10 but I don’t think that would matter.

I always want to know what is going on from the perspective of someone who isn’t using the bleeding edge pre but is up to date a couple of releases ago. Moreover, I would like my commands to be available to a wider range of point releases.

I updated to Version 2.9.0 (pre-release #200225). I can confirm @KaRo’s issue. help doesn’t work anymore.


Continuing from my previous post, I would like the gmic output to indicate the current stable and pre. That would help save time. Perhaps installed version, stable version and pre version.

  gmic: GREYC's Magic for Image Computing: command-line interface
        (https://gmic.eu)
        Version 2.9.0 (pre-release #200225)

And I would like the interpreter to indicate the version being used.

[gmic]-0./ Start G'MIC interpreter.

Hi @afre, I think I understand your point. Still I think also that David does not break backward compatibility without good reason.

I don’t have such a quick changing development, still I store my custom commands in $_path_user. And in the moment they appear in updatexxx.gmic I delete them locally. For older releases without update I use “command file” in $_path_user to have them defined. In your case even “command gmic-community/afre.gmic at master · dtschump/gmic-community · GitHub” works well.

Ok, the problem with help is not solved with “command”. Actually to get help everything has to be copied into $_path_rc !

:thinking: Good idea. I will place a commented out command at the end of user.gmic.

I’d suggest $ gmic \$_path_rc/update290.gmic , whatever the version of G’MIC you are using.
This will work for the CLI interface. For the plug-in, having a link in folder $_path_rc, e.g. update285.gmic linked to update290.gmic.

This should not happen. help is working here. The only requirement is that you have the update290.gmic file present in your $_path_rc.

I don’t get it, have you a simple example that is not working as expected?

About the update compatibility break : I’m really sorry when it happens, I try to keep that to a minimum. Most commands of the stdlib will actually continue working with previous versions. I hope 2.9.0 will be ready as soon as possible so that people can easily get the updates.
A few things to fix before release, anyway.

It’s there. This wasn’t an issue in previous versions… FYI,

Generated on : 2020/02/29, 21:04

David,

here is a custom command (from you)

gmic help linear_reg,0

[gmic] Command ‘linear_reg’ has no description (did you mean ‘linear_x3’ ?). Try ‘gmic -h’ for global help.

#@cli linear_reg :
#@cli : The idea is to build the system [X,1].[a;b] = [Y], where X and Y are the column vectors
#@cli : composed of the values of images X and Y you want to match, and [a;b] the vector of the
#@cli : coefficients you are looking for.
#@cli : This small piece of code compute a and b for two input images [0] = X and [1] = Y such
#@cli : that ||Y - (a.X + b)||^2 is minimum:
linear_reg :
–l
-y 1,100%,1,1,1
-a[0,-1] x
-r 100%,{min(h,10000)}
-solve. [-2]
-k. a={[0]} b={[1]} -rm
-endl # Get vector [a,b]
–*[0] $a -+. $b # Compute [2] = aX+b (should match [1]).

I have put it into a file, say exa.gmic

And …

gmic m exa.gmic osteo follic r. … linear_reg
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Import commands from file ‘exa.gmic’ (1 new, total: 4203).
[gmic]-0./ Load osteoblast nucleus example image
[gmic]-1./follic/ Load thyroid follicle nuclei example image from local storage
[gmic]-2./ Resize image [1] to 128x128x1x1, with nearest-neighbor interpolation, dirichlet boundary conditions and alignment (0,0,0,0).
[gmic]-3./ Display images [0,1,2] = ‘follic, follic, follic_c1’.
[0] = ‘follic’:
size = (128,128,1,1) [64 Kio of floats].
data = (213,219,217,214,213,213,213,210,214,211,217,212,(…),208,212,217,211,213,211,216,212,208,213,217,216).
min = 70, max = 249, mean = 197.159, std = 28.0122, coords_min = (64,85,0,0), coords_max = (112,97,0,0).
[1] = ‘follic’:
size = (128,128,1,1) [64 Kio of floats].
data = (193,176,167,176,182,192,201,209,203,193,175,161,(…),159,165,162,128,117,112,107,105,109,109,118,119).
min = 27, max = 224, mean = 106.09, std = 49.8296, coords_min = (81,28,0,0), coords_max = (4,14,0,0).
[2] = ‘follic_c1’:
size = (128,128,1,1) [64 Kio of floats].
data = (1,1,1,1,1,1,1,1,1,1,1,1,(…),1,1,1,1,1,1,1,1,1,1,1,1).
min = 1, max = 1, mean = 1, std = 0, coords_min = (0,0,0,0), coords_max = (0,0,0,0).
[gmic]-3./ End G’MIC interpreter.

gmic m exa.gmic h linear_reg,0
[gmic]-0./ Start G’MIC interpreter.
[gmic]-0./ Import commands from file ‘exa.gmic’ (1 new, total: 4203).
[gmic] Command ‘linear_reg’ has no description (did you mean ‘linear_x3’ ?). Try ‘gmic -h’ for global help.

You see, no help. If I put it into $_path_user help text appears!

gmic h linear_reg

gmic: GREYC’s Magic for Image Computing: command-line interface
(https://gmic.eu)
Version 2.9.0 (pre-release #200225)

    Copyright (c) 2008-2020, David Tschumperle / GREYC / CNRS. 
    (https://www.greyc.fr)

linear_reg:

  The idea is to build the system [X,1].[a;b] = [Y], where X and Y are the column vectors
  composed of the values of images X and Y you want to match, and [a;b] the vector of the
  coefficients you are looking for.
  This small piece of code compute a and b for two input images [0] = X and [1] = Y such
  that ||Y - (a.X + b)||^2 is minimum:

OK, that was a bug, it should work now, after $ gmic update.

1 Like

Works now. :slight_smile:

1 Like