greek translation update - OK what i do next?
by Ioannis A. Venetis
Hi all,
What have I done:
I downloaded a gretl-git-....zip file from the gretl git repository
https://sourceforge.net/p/gretl/git
Then I extracted the el.po file.
I used Poedit to fully update (translate) the el.po file. It is also
saved as el.mo and I renamed it as gretl.mo.
It seems to work fine in my computer., wheb inserted in C:\Program
Files\gretl\locale\el\LC_MESSAGES
Question1: Can I send the el.po file or mo file? to one of you
(developers) so it can be released with the new version (when released?)
Question 2: is there any other easier way to translate and update for
ignorant windows users (like me)?
Thanks
Yiannis
[1]
Links:
------
[1] https://sites.google.com/site/ioannisavenetis/
3 years, 2 months
MSVAR package menu attachment not automatic
by Sven Schreiber
Hi,
a user wrote me about the recently introduced MSVAR package, and a
non-existent menu attachment.
Testing the installation of the package (via the GUI), I'm _not_ being
asked by gretl if I want to attach the package to the corresponding
menu. (It goes in the Edit menu of the VAR model window.) Isn't that
automatic question supposed to happen at package installation time?
(Honest question. not sure right now.)
Manually triggering the attachment does work.
Thanks
sven
3 years, 2 months
the choose() function
by Riccardo (Jack) Lucchetti
Folks,
while revising some old code I stumbled into a function that I'd written a
while back, and I realised this could go into the extra package. Note:
for large input vectors (n > 5) the recursion approach really is much
slower than direct calculation, so there is quite a lot of room for
optimisation.
Opinions?
<hansl>
function matrix choose(const matrix from, scalar h)
# If "from" is a vector with n elements, this function
# returns a matrix whose rows are all the possible subsets
# with h elements; a recursive algorithm is used.
#
# For example: choose({1,2,3}, 2) returns
#
# 1 2
# 1 3
# 2 3
#
# warning: the returned matrix will have n! / (h! * (n-h)!),
# rows, so handle with care.
if (rows(from) > 1 && cols(from) > 1)
s = argname(from)
printf "%s is not a vector\n", strlen(s) ? s : "argument 1"
return {NA}
endif
if h <= 0
ret = {}
elif h == 1
matrix ret = vec(from)
else
ret = {}
n = nelem(from)
loop i = 1 .. (n - h + 1) --quiet
x = from[i]
matrix c = from[i+1: ]
if rows(c) > 0
matrix ret |= x ~ choose(c, h-1)
endif
endloop
endif
return ret
end function
</hansl>
-------------------------------------------------------
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
-------------------------------------------------------
3 years, 2 months
Changing Gretl stock icons
by Henrique Andrade
Dear Allin,
I'm playing around with Gretl code trying to replace the original icons
with the system icons. My aim goal is to try to familiarize myself with
the gretl GUI code to eventually contribute more in that field.
I'm using elementaryOS (Ubuntu-based distro) that uses ".svg" icons and
has, IMHO, a great user interface inside the desktop Linux world.
The piece of code I think I need to change is the file "gui/toolbar.c".
Am I right?
What I'm doing right now is copying the system ".svg" icons, converting
to ".xpm" and saving/replacing the originals with the new ones inside
the "pixmaps" folder.
Is that the right thing to do? More, could I use the ".svg" icons
directly without conversions to ".xpm"?
Many thanks in advance,
Henrique Andrade
3 years, 2 months
How to print values of a bundle
by Artur T.
Hi all,
I've stumbled about this puzzling and seemingly simple task: Iterate
over a a bundle and print the key-value pairs.
Here a simple example:
<hansl>
bundle B = _(a = 1, b = 2)
loop foreach i B
printf "key: %s, value: %d\n", "$i", $i
# OR: printf "key: $i, value: %d\n", , $i
endloop
</hansl>
That works as all elements in B are numeric.
However, I always found this confusing: For the first printf, the key is
accessed by means of "$i" as an argument while in the second line one
accesses it via $i inside the 'format' part.
ALSO NOTE: The parser is "robust" against the two comma at the end of
the second printf command. Bug or feature? ;-)
But lets augment the bundle and add a third string object. HOW TO,
iterate in this case across the bundle _without_ having to check the
data type? Is there such a way? The following fails.
<hansl>
string B.c = "foo"
B
loop foreach i B
# FAILS AS value linked to "c" is of type string: printf "key: %s,
value: %d\n", "$i", $i
# ALSO FAILS: printf "key: $i, value: %d\n", $i
endloop
</hansl>
In Julia, similar to Python, a loop over a dictionary constructs two
separate variables: one for the key and another one for the value so
it's simple to remember on how to access the key or bundle.
<Julia>
for (k,v) in d
println("key: $k, value: $v")
end
</Julia>
I am wondering whether this is a side-product of these languages such
that k or v can take every data type on-the-fly.
Of course, I know that we don't have that. But I just wanted to mention
that it feels like a solid approach for printing key-value pairs.
Oh, here is another issue which I do not understand:
<hansl>
bundle B = _(a = 1, b = 2)
loop foreach i B
eval B["$i"] # print value works
printf "key: %i, value: %d\n", B["$i"] # FAILS: "Syntax error"
endloop
</hansl>
Thanks,
Artur
3 years, 3 months
Gretl conference 2021 (apologies for cross-posting)
by Riccardo (Jack) Lucchetti
Hi everyone,
I'm writing you on behalf of the Gretl development team.
Since June 2009, we've had a Gretl conference every other year, starting
in Bilbao; the 2019 conference was in Naples. This year, it should have
been London but the pandemic forced us to change our plans. Therefore,
here's what's happening:
* the actual conference is probably going to take place during the winter,
if the COVID situation makes it possible.
* we're having an online event on the 3rd and 4th of June. Since the
majority of the gretl community lives on one side of the Atlantic or the
other, we decided that the event will take place between 1200 and 1800 UTC
(approximately) so that the inconvenience of the time zones is hopefully
minimised.
The only two fixed events at this stage are
1) a presentation by the project leader (Allin) on the 3rd
2) an invited speech by Mark Steel (Warwick University), Bayesian
extraordinaire, on the 4th.
For the rest of the time, we plan to have
- an open Q&A session in which the community can meet the development team
to ask question, make proposals or simply tell us how much you love us;
- presentations by package authors to show the community some lesser-known
features;
- a few presentations of scientific work done using gretl, or perhaps done
by using some other package but explaining why it would have been
impossible to do in gretl, and what needs to be done to make it
possible;
- a virtual meeting of the newly-born gretl association (become a
member!);
- (possibly) the usual analysis by me on the trends of the download data
and future perspectives.
Marcin was kind enough to set up a website for the conference
(https://www.gretlconference.org/), so you can visit that page to get the
info as it becomes available.
If you'd like to present something, or have any other comments or
suggestions, feel free to contact me or any other member of the
development team.
-------------------------------------------------------
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
-------------------------------------------------------
3 years, 3 months
operators on arrays of strings
by Allin Cottrell
For a project I was working on today it seemed it would be useful to
have a couple of operators defined for strings arrays, so I went
ahead and implemented them.
First, for an array of strings S and a single string s:
S .= s
returns a vector of the length of S, with 1s in positions where s is
matched, 0s otherwise. This is similar to the instrings() function
but gives the information in a different form that may be more
convenient in some cases. Plus,
S .!= s
gives the complementary vector.
Second,
S2 = S - s
returns an array of strings obtained by removing all elements of S
that match s. If you want to modify S rather than construct a new
array, then
S -= s
does the job -- with greater efficiency, since the removal is done
in-place, requiring no extra memory allocation.
These will be documented in due course.
Allin
3 years, 3 months