Fixes Before Gretl 1.9.11 (was: installing gretl's XDG files)
by Henrique Andrade
Em 9 de novembro de 2012, Allin Cottrell escreveu:
On Fri, 9 Nov 2012, Johannes Lips wrote:
>
> > I am happy with the enable switch but I would like to ask
> > which patch from cvs I need to apply against 1.9.10 or are
> > you planning on releasing a new version to fix those small
> > issues?
>
> I'm thinking it would be a good idea to release 1.9.11
> shortly, with the build/install issues fixed, so that
> packagers don't have to mess with patches. (We're fortunate
> that by now gretl is well supported by the major Linux
> distributions.)
>
> The one complication is that current CVS contains some
> substantial internal changes in the handling of user-defined
> variables (other than regular series) relative to 1.9.10, and
> while these are quite well tested I'd prefer that they are
> more fully tested before doing another release.
>
> I think that a time-scale of putting out 1.9.11 next week will
> probably work. In the meantime it would be very helpful if
> people who are using 1.9.10cvs could beat on the program and
> look for any problems. In particular, one area where I'm not
> 100% confident is the behavior of the GUI icon view and/or
> scalars editor when an executing script makes relevant changes
> (adding, deleting or redefining scalars, matrices or bundles).
> The question is: is the icon view staying properly in sync?
> (If it's not, this can lead to weirdness and the danger of a
> crash.)
>
Dear Allin, I have a small error/misbehavior list that I think
would be good to address before Gretl 1.9.11:
<hansl>
open australia.gdt
series morethan15characters = PAU
series really_muchmorethan15characters = PUS
"Teste VAR" <- var 4 E morethan15characters \
really_muchmorethan15characters
fcast
</hansl>
Open in Icon view crashes Gretl and output formatting is weird (the var
names are truncated on model presentations and aren't on F-Tests re-
sults. Additionally, the var names on the forecast results are too large.
<hansl>
open australia.gdt
series morethan15characters = PAU
series really_muchmorethan15characters = PUS
"Teste VEC" <- coint2 1 E morethan15characters \
really_muchmorethan15characters
</hansl>
Output formating is weird.
When using "advanced" Gnuplot command I'm getting an error and
a syntax highlighting "flaw". Please take a look at the attached .inp
file (also reproduced below):
<hansl>
open australia.gdt
# Ok!
gnuplot E IAU IUS {set style line 1 lc rgb "#ff0000"; set style line 2 lc
rgb "#2CC81D"; set style line 3 lc rgb "#0000ff";} --time-series
--with-lines --single-yaxis --output=display
# Ok!
gnuplot E IAU IUS\
{set style line 1 lc rgb "#ff0000"; set style line 2 lc rgb "#2CC81D";
set style line 3 lc rgb "#0000ff";} --time-series --with-lines
--single-yaxis --output=display
# Ok!
gnuplot E IAU IUS {set style line 1 \
lc rgb "#ff0000"; set style line 2 lc rgb "#2CC81D"; set style line 3 lc
rgb "#0000ff";} --time-series --with-lines --single-yaxis --output=display
# Error!
gnuplot E IAU IUS {set style line 1 lc rgb "#ff0000"; set style line 2 \
lc rgb "#2CC81D"; set style line 3 lc rgb "#0000ff";} --time-series
--with-lines --single-yaxis --output=display
</hansl>
The syntax highlighting problem occurs with the first "set"
statement inside the curly brackets (the syntax is gone).
Best regards
--
Henrique Andrade*
*
12 years, 2 months
Re: [Gretl-devel] installing gretl's XDG files
by Allin Cottrell
On Fri, 9 Nov 2012, Johannes Lips wrote:
> I am happy with the enable switch but I would like to ask
> which patch from cvs I need to apply against 1.9.10 or are
> you planning on releasing a new version to fix those small
> issues?
I'm thinking it would be a good idea to release 1.9.11
shortly, with the build/install issues fixed, so that
packagers don't have to mess with patches. (We're fortunate
that by now gretl is well supported by the major Linux
distributions.)
The one complication is that current CVS contains some
substantial internal changes in the handling of user-defined
variables (other than regular series) relative to 1.9.10, and
while these are quite well tested I'd prefer that they are
more fully tested before doing another release.
I think that a time-scale of putting out 1.9.11 next week will
probably work. In the meantime it would be very helpful if
people who are using 1.9.10cvs could beat on the program and
look for any problems. In particular, one area where I'm not
100% confident is the behavior of the GUI icon view and/or
scalars editor when an executing script makes relevant changes
(adding, deleting or redefining scalars, matrices or bundles).
The question is: is the icon view staying properly in sync?
(If it's not, this can lead to weirdness and the danger of a
crash.)
Allin
> On Thu, Nov 8, 2012 at 10:27 PM, Allin Cottrell <cottrell(a)wfu.edu> wrote:
>
>> On Thu, 8 Nov 2012, Allin Cottrell wrote:
>>
>> One possibility would be an "enable" switch:
>>>
>>> --enable-xdg-utils Use xdg-utils for installing XDG files
>>>
>>> which could either default to "no" or perhaps to "auto", based on whether
>>> or not xdg-desktop-menu is found. In the latter case a packager whose
>>> machine has xdg-utils installed would have to do --disable-xdg-utils.
>>>
>>
>> I'm willing to entertain other ideas, but for the moment I've put the
>> above into CVS, with a default of auto. So:
>>
>> * If you're happy to have the xdg-utils install the gretl desktop files,
>> you don't have to do anything.
>>
>> * If you don't have the xdg-utils, gretl will default to straight
>> installation via the shell, based on the chosen installation prefix; this
>> will respect DESTDIR.
>>
>> * If you have xdg-utils but you don't want them used, e.g. because you're
>> packaging into a DESTDIR, use the flag --disable-xdg-utils with configure;
>> then a standard shell-type install will be used.
>>
>> * Finally, if you don't want the XDG files installed at all,
>> you can use the flag --disable-xdg.
12 years, 2 months
installing gretl's XDG files
by Allin Cottrell
Johannes Lips (who packages gretl for Fedora) has pointed out
to me that with the gretl 1.9.10 package the XDG files
(desktop file, icons, mime types) don't get installed when you
do a top-level "make install". This bug affects those who are
building gretl from source for their use, and also packagers.
In a sense this is easy to fix (just add gretl's xdg
subdirectory to the list of SUBDIRS that get activated by
"make install") but actually it raises some further issues and
I'd like to hear people's views.
Between the 1.9.9 and 1.9.10 releases I added up-to-date XDG
support, but the way I implemented "make install" in the xdg
subdir relies on the XDG tools (xdg-desktop-menu, xdg-mime,
xdg-icon-resource). These are nice in that they handle both
the case where they're invoked by root (in which case the
icons and so on are installed to system locations) and the
case where they're invoked by an unprivileged user (in which
case the files go under ~/.local). Moreover, the installed
locations of these files are guaranteed to be right -- so
they're found by the desktop software -- unless the system
itself is messed up.
But... using these tools is not what a packager wants, since
they won't respect DESTDIR. For packaging purposes we need to
figure the correct locations in advance based on the
installation prefix. For example, instead of doing
# nice for regular people
xdg-desktop-menu install gretl.desktop --novendor
we need to do something like
# packager-friendly
$(INSTALL_DATA) gretl.desktop \
$(DESTDIR)$(prefix)/share/applications
So, should we set up a choice between these methods in the
configure script? If so, any suggestions on which should be
the default (if there's a default) and how the option might be
phrased?
One possibility would be an "enable" switch:
--enable-xdg-utils Use xdg-utils for installing XDG files
which could either default to "no" or perhaps to "auto", based
on whether or not xdg-desktop-menu is found. In the latter
case a packager whose machine has xdg-utils installed would
have to do --disable-xdg-utils.
Allin Cottrell
12 years, 2 months
Different matrix numeric output (integer or float) and more
by Hélio Guilherme
Hi,
Testing the examples added by Henrique to help of colnames and
rownames functions, I get different outputs for the M matrix:
? matrix M = {1,2;2,1;4,1}
matrix M = {1,2;2,1;4,1}
Matriz M gerada
? rownames(M, "Row1 Row2 Row3")
rownames(M, "Row1 Row2 Row3")
? print M
print M
M (3 x 2)
Row1 1 2
Row2 2 1
Row3 4 1
? colnames(M, "Col1 Col2")
colnames(M, "Col1 Col2")
? print M
print M
M (3 x 2)
Col1 Col2
Row1 1,0000 2,0000
Row2 2,0000 1,0000
Row3 4,0000 1,0000
?
---
This is not a big problem but maybe we should have some control on the
matrix elements numeric types (or at least consistency ;)). See ahead
that is the colnames setting the numbers to float.
In the following experimentation with printf, there are missing
separators within the matrix elements (output is using decimal commas
since is the PT version):
? matrix M = {1,2;2,1;4,1}
matrix M = {1,2;2,1;4,1}
Matriz M gerada
? printf "%d", M
12
21
41
? printf "%0.3g", M
12
21
41
? printf "%0.3f", M
1,0002,000
2,0001,000
4,0001,000
?
----
Here I add first the column names:
? colnames(M, "Col1 Col2")
colnames(M, "Col1 Col2")
? print M
print M
M (3 x 2)
Col1 Col2
1,0000 2,0000
2,0000 1,0000
4,0000 1,0000
? rownames(M, "Row1 Row2 Row3")
rownames(M, "Row1 Row2 Row3")
? print M
print M
M (3 x 2)
Col1 Col2
Row1 1,0000 2,0000
Row2 2,0000 1,0000
Row3 4,0000 1,0000
----
? matrix N = M*1.001
matrix N = M*1.001
Matriz N gerada
? print N
print N
N (3 x 2)
1,001 2,002
2,002 1,001
4,004 1,001
?
Needs a fix:
? printf "%1.4g", N
1,0012,002
2,0021,001
4,0041,001
?
Note that did not consider the requested 4 decimals.
----
? rownames(N, "Row1 Row2 Row3")
rownames(N, "Row1 Row2 Row3")
? print N
print N
N (3 x 2)
Row1 1,001 2,002
Row2 2,002 1,001
Row3 4,004 1,001
? colnames(N, "Col1 Col2")
colnames(N, "Col1 Col2")
? print N
print N
N (3 x 2)
Col1 Col2
Row1 1,0010 2,0020
Row2 2,0020 1,0010
Row3 4,0040 1,0010
?
It seems that colnames is setting 4 decimals by default :).
---
It seems that "%f" is OK:
? printf "%0.04g", N
Row1 1,0012,002
Row2 2,0021,001
Row3 4,0041,001
? printf "%0.04f", N
Row1 1,00102,0020
Row2 2,00201,0010
Row3 4,00401,0010
? printf "%0.05f", N
Row1 1,001002,00200
Row2 2,002001,00100
Row3 4,004001,00100
----
How about the printf when columm names are set?
? printf "%g", N
Col1 Col2
Row1 1,0012,002
Row2 2,0021,001
Row3 4,0041,001
? printf "%d", N
Col1Col2
Row1 12
Row2 21
Row3 41
?
---
Summary of fixes :
colnames function should leave numeric type untouched (like rownames does)
printf should use the same column separation as used by print
revise the format "%g" modifier in printf when argument is matrix
---
Bye,
Hélio
12 years, 2 months
gretl 1.9.10 and "make check"
by Allin Cottrell
It has been pointed out to me that "make check" fails for
the gretl 1.9.10 release. This is not a substantive failure,
it's a bug in the build process for the checker program. And
this is now fixed in CVS. I'll post a small patch that fixes
the issue for the released code before long.
My apologies for any inconvenience caused.
--
Allin Cottrell
Department of Economics
Wake Forest University, NC
12 years, 2 months
Contributing to the documentation
by Henrique Andrade
Dear Allin and Jack,
I frequently get myself writing examples for my colleagues here at work
explaining Gretl's commands and functions. So I realized that this work
could be useful to un-experienced Hansl's users.
My question is: Could I send these examples to our Devel List in order to
insert them (when you'll believe they are appropriate) into the Gretl's
Help?
Best regards,
Henrique Andrade*
*
12 years, 2 months