Error in loop/if evaluation
by Marcin Błażejowski
Hi,
current git, the code below. In general: we look if given argument
exists in a bundle and if so we check its typeof().
The first end the second examples work fine, but at the third evaluation
of 'model_prior' looks like ommited we get error: "internal genr error:
aux node mismatch".
Marcin
<hansl>
set verbose off
function void FOO (bundle UserOpts)
bundle Overloadable
string arg_name, type_of
strings OverloadableKeys
Overloadable["bic_type"] = _(bic=1, hbic=2, ibic=3)
Overloadable["model_prior"] = _(binomial=1, betabinomial=2)
Overloadable["with_const"] = _(never=0, always=1, canbedropped=2)
OverloadableKeys = getkeys(Overloadable)
eval OverloadableKeys
loop i=1..nelem(OverloadableKeys) --quiet
arg_name = OverloadableKeys[i]
if inbundle(UserOpts, arg_name)
if typeof(UserOpts[arg_name]) == 4
type_of = "string"
else
type_of = "non-string"
endif
printf "Typeof %s is %s\n", arg_name, type_of
endif
endloop
end function
printf "The first examle:\n"
FOO(_(bic_type="bic", with_const=0))
printf "\nThe second examle:\n"
FOO(_(bic_type="bic", model_prior="binomial", with_const="always"))
printf "\nThe third examle:\n"
FOO(_(bic_type="bic", model_prior="binomial", with_const=0))
</hansl>
--
Marcin Błażejowski
2 years, 1 month
Re: FW: Gretl Mac Issue Screenshots
by Cottrell, Allin
On Tue, Aug 23, 2022 at 4:13 PM Summers, Peter <psummers(a)highpoint.edu>
wrote:
> Dear Allin et al,
>
>
>
> I have several Mac-using students who reported the issue below when trying
> to download the Stock & Watson data files. Maybe this is similar to the
> issue I had on Windows last week?
>
Thanks for the report, Peter, but I don't think it's the same thing as you
mentioned before. The "cURL timeout" would just seem to indicate a
(presumably intermittent) problem with the sourceforge server. All the
same, I'll look into it myself the next time I boot into macOS.
Allin
2 years, 1 month
FW: Gretl Mac Issue Screenshots
by Summers, Peter
Dear Allin et al,
I have several Mac-using students who reported the issue below when trying to download the Stock & Watson data files. Maybe this is similar to the issue I had on Windows last week?
Cheers,
Peter
Sent: Tuesday, August 23, 2022 1:09 PM
To: Summers, Peter <psummers(a)highpoint.edu>
Subject: Gretl Mac Issue Screenshots
Hi!
The stock_watson file is not loading on my Mac. It loads to 506 Kbytes and then times out.
I have attached screenshots to this email.
Thank you!
Rachel Day
[cid:2AD0211A-5632-4FBC-81E7-6076E4623F12]
[cid:62AB8263-F26F-40CD-B31D-4DD28BCE4982]
2 years, 1 month
gretl git and snapshots
by Allin Cottrell
My apologies if you get this message more than once, but there's a
somewhat unusual situation in gretl development right now.
We've introduced a number of quite ambitious changes since the 2022b
release, and despite our best efforts at testing these seem to carry
some risk (including the risk of gretl crashing in some cases).
Temporarily, therefore, I've introduced a distinction between what
we might call "mainline" updates (pure bug fixes and other innocuous
things) and "bleeding edge" updates (promising speed-up of some
functionality but, for now, risky).
Until further notice the gretl "master" git branch will be the
mainline, and snapshots for Windows and Mac will be produced from
it. If you're building gretl yourself and wish to experiment with
the bleeding edge, please use the "more_compilation" git branch.
We don't expect this bifurcation to last for very long: as they say,
"Normal service will be resumed as soon as possible".
Allin
2 years, 1 month
SIGABRT - double free
by Marcin Błażejowski
Hi,
current git, simple script:
<hansl>
set verbose off
include oprobit_predict.gfn
open wtp.gdt
set seed 123456
list X = 1 2 9 10 11
RES <- logit depvar 0 X
RES.show
</hansl>
Marcin
--
Marcin Błażejowski
2 years, 1 month
xtab issue(s)
by Marcin Błażejowski
Hi,
simple script:
<hansl>
open wtp.gdt
list X = 1 2 9 10 11
logit depvar 0 X --multinomial --quiet
series yhat = $yhat
xtab --zeros depvar yhat --quiet
eval $result
</hansl>
It looks like '--zeros' flag has zero effect on xtab command. What is
more, line 'xtab depvar $yhat' generates an error: "Data types not
conformable for operation" which - I believe - is unexpected.
Marcin
--
Marcin Błażejowski
2 years, 1 month
Missing citation
by Marcin Błażejowski
Hi,
it seems to be a missing citation in 'gretl-lpsolve.tex': "Package
natbib Warning: Citation `kantorovich60' on page 5 undefined on input l
ine 297" (current git).
Marcin
--
Marcin Błażejowski
2 years, 1 month
obsnum() weirdness
by Riccardo (Jack) Lucchetti
Hi all. Consider this script:
<hansl>
nulldata 12
setobs 5 2020-02-01
loop i = 6 .. 12
date = sprintf("2020-02-%02d", i)
printf "%s -> %d\n", date, obsnum(date)
endloop
</hansl>
the output I get is:
<output>
2020-02-06 -> 4
2020-02-07 -> 5
2020-02-08 -> 6
2020-02-09 -> 7
2020-02-10 -> 6
2020-02-11 -> 7
2020-02-12 -> 8
</output>
which is of course correct from Monday to Friday, but obviously wrong for
weekends. What do you guys think we should do in these cases? I reckon we
ought to return NAs, but I'm open to other ideas.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
2 years, 2 months
automatic line continuation between parentheses official?
by Sven Schreiber
Hi, here's a general question:
For a while now you could, for example, continue your function
definition on the next line without using the explicit continuation
character (backslash). Like this:
function void withmanyargs(int arg1,
int arg2)
...
OK, this also seems to work with other unmatched parentheses (round
brackets) pairs. I've just tested this with an errorif() function
stretched out over two lines, for example.
I don't think this is documented, or is it? Is this official and
reliably a part of the hansl syntax?
I know we're not talking about square brackets or curly braces, just the
round ones.
thanks
sven
2 years, 2 months