man, 17 05 2010 kl. 16:24 +0200, skrev Alois Schlögl:
> Søren Hauberg wrote:
> > Personally, I am not against the patch, but I wouldn't say that I am for
> > the patch either. I am not a fan of rewriting perfectly functional code
> > in order to help an automated Matlab converter.
> 
> 
> It's for the sake of "free toolboxes for matlab". The majority of
> OpenOffice users are using it on top of windows. So why not using free
> octave toolboxes on top of M ? And it does neither hurt linux nor octave
> if they do so.

I have never complained that 'oct2mat' is hurtful (to be honest, I
haven't really made up my mind on this subject). All, I'm saying is that
it is not productive if the Octave-Forge developers has to adopt certain
coding styles simply because an automated tool doesn't understand them.

> >> --- main/optim/inst/de_min.m       (revision 7295)
> >> +++ main/optim/inst/de_min.m       (working copy)
> >> @@ -147,7 +147,8 @@
> >>    if nargin > 2,
> >>      ctl = struct (varargin{:});
> >>    else
> >> -    ctl = nth (varargin, va_arg_cnt++);
> >> +    ctl = nth (varargin, va_arg_cnt);
> >> +    va_arg_cnt += 1;
> > 
> > Two comments:
> > 
> >   1. 'oct2mat' really should be improved to deal with this coding style.
> >   2. This has to be rewritten anyway ('nth' is no longer part of
> >      Octave), so I find it somewhat silly to make this change.
> 
> 
> Are You saying that the function de_min() is broken and nobody cares
> about fixing it?  I checked and found that nth() is used 44 times in 22
>   functions (in main/optim, main/vrml and extra/tk_octave) using the
> function nth().

Several functions in the 'optim' package will no longer work with Octave
3.4. There was a thread on fixing this, but it haven't seen much
activity lately. Personally, I'm quite tied up at the moment, so I can't
be of much help. The basic issue is that to fix this problem there will
have to be API changes in the 'optim' package. The question is then how
these changes should look.

> Shall I check in the fixes for using nth()?

What fixes?

> >> --- main/nnet/inst/__calcjacobian.m        (revision 7295)
> >> +++ main/nnet/inst/__calcjacobian.m        (working copy)
> >> @@ -124,7 +124,7 @@
> >>    ## tildeSx = -dFx(n_x^x)
> >>    ## use mIdentity to calculate the number of targets correctly
> >>    ## for all other layers, use instead:
> >> -  ## tildeSx(-1) = dF1(n_x^(x-1)))(W^x)' * tildeSx;
> >> +  ## tildeSx(-1) = dF1(n_x^(x-1))(W^x)' * tildeSx;
> > 
> > Huh? You need to make changes to the comments?
> 
> 
> The different numbers of left and right parenthesis was noted by
> oct2mat, and I could not resist pointing this out.

Oh, okay. Well, you should feel free to check that one in then :-)

Søren


------------------------------------------------------------------------------

_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to