Armadillo 7 and Nikola 7.7.9 now in Fedora 24

A new update is available in Fedora 24 fedora-updates-testing repository. This is a major version change from version 6 to 7 and since this implies an .so (dynamic library) major number bump we had to rebuild all the packages that link with armadillo:

  • mmseq;
  • mlpack;
  • gdal.

I have, not yet, repeated the same procedure on Fedora 23 since armadillo now requires SuperLU >= 5.2 that is not available on Fedora 23.

The main changes since the last stable version () are:

  • added .index_min() and .index_max();
  • expanded ind2sub() to handle vectors of indices;
  • expanded sub2ind() to handle matrix of subscripts;
  • expanded expmat(), logmat() and sqrtmat() to optionally return a bool indicating success;
  • faster handling of compound expressions by vectorise();
  • added erf(), erfc(), lgamma();
  • added .head_slices() and .tail_slices() to subcube views;
  • eigs_sym(), eigs_gen() and svds() now use a built-in reimplementation of ARPACK for real (non-complex) matrices;
  • spsolve() now requires SuperLU 5.2.

In order to write this post I had to update python-nikola to version 7.7.9, again this update is available on fedora-updates-testing.

When this update goes to fedora-updates I will start the process of backporting this package to Fedora 23.

It is nice to note that I had the help of one of the python-nicola main developers so the task was simpler than it would have been otherwise and the final result better as well. Thanks Chris. :-)

Fighting with SAMBA authentication (the placement of the workgroup matters)

The network here in the Economics Faculty is based on Windows. A problem that I had for a long time is when setting the printer setup to work using SAMBA was that that I placed the work group in the machine name.

That did not work and it was frustrating to find the reason.

Sometime ago I found a tip that solve all my problem regarding the connectivity using sample. I need to place the work group in the user field.

That is instead of:

Device URI: smb://Workgroup/

User: username

the correct options is:

Device URI: smb://

User: Workgroup/username

After finding this tips all my problems connecting to windows printer shares or disk partitions using SAMBA are gone. :-)

Musings from a Sunday morning

In the last Sunday of 2013 and I was holding David in my left arm (then a two months old baby) while he was slipping. It was a normal morning with Sara (two years and one week older than her brother) wandering and running all over the place.

Since I had only one hand available and I had to stay still I decided to read some rss feedings. In one of them, that I now forget the source, I was redirected to this gcc bug report titled "__cplusplus defined to 1, should be 199711L".

The amusing part, at least to me, was that it has taken more than 10 years to close the bug. The bug was opened on 2001-01-25 for version 2.97 and finally closed and fixed on 2011-08-18 for gcc 4.7. The whole bug report is an entertaining reading and really appropriated for Saturday morning in the Christmas holidays (just 129 comments).

The interesting part was that the change was withheld  by the solaris port of gcc. While I suspect that although an important reason the bug was not overly urgent or else the social pressure to fix it would had justified a quicker action.

The musing part was twofold, on one hand how free(/libre) software works and one of the reasons why I enjoy it, the cooperation and the ideas exchange. The second reason was for being a Sunday with Susana, that understands and uses free software, and the two kids who (at least for now) could not care less about software as a social experience. Surely this inspires me with a smile and hope in the humanity.

A great year

Another great odd (in the mathematical sense) year.

Sara has a brother, David, and we are/will be recovering your sleep in the months to come.

A Merry Christmas and a Happy New Year for everyone.

Python class for quaternions

Broom Bridge plaque

Last August in Dublin (at DCU) I presented a tutorial about Python in Scientific Computing.

While there I thought it was appropriate to give a native example (in Rome be Roman) and so I choose the Quaternions. This is a good excuse as any other to present the multiple features of python for science. :-)

The picture above is carved in the Broom Bridge, over the Royal Canal, and where supposedly Hamilton had the inspiration to come with such beasts :-) .

I had described before (in Portuguese) my hazard quest to find the place. An yearly event, at 16th of October, gets people together to visit the place and probably for a couple of drinks. :-)

While preparing the course I searched for python implementations of the quaternions and I have only found code related with graphics transforms (where the quaternions can be useful).

In the same spirit of Free/Open Source Software, to scratch a itch, I make available my implementation of a python class that implements the quaternions and that deals transparently with the complex numbers.

The code can be found at my homepage. Here it is a sample:

a = Quaternion(1, -2)
b = Quaternion(1, 2, -3, 4)
c = 1 - 2j
print "a =", a
print "b =", b
print "c =", c
print a + b
print a - c
print a*b
print a*c
print 2*a
print b*b.conjugate()
print abs(b)**2

And the resulting output:

a = +1-2*i+0*j+0*k
b = +1+2*i-3*j+4*k
c = (1-2j)

I hope this helps others who have the same problem I had. :-)

Fedora: an auspicious name

Fedora shop

I have stated several times before that Fedora is strange name in Portuguese. Imagine my surprise when walking in Lisbon at "Rua Aurea" I got the following view. "Bijuterias" the name after Fedora means costume jewelry.

For what is worth this post has been delayed one year since the last time I was there I only had my mobile phone camera (not terribly accurate). Now with a real camera the result is worth to show. Equally interesting is that "Rua Áurea" can be translated as "Golden Street". The street that follows it is "Rua do Ouro", Gold Street.

The streets at that area of Lisbon were rebuilt after the1755 major earthquake, and the resulting tsunami that followed it, that totally destroyed that area. The streets at that area were named after the particular trade practiced there (a common practice in medieval Europe).

A posteriori (as opposed to "a priori") the relevance of this poster can be attributed to the next release of Fedora. Fedora 14 release will happen (we hope) next Tuesday, 2nd of November the day next  to the anniversary of Lisbon earthquake. Let us hope for this to be a (benign) earthquake in OS landscape.

Samsung Galaxy: Adding a proxy

I have a (new) smart phone, the Samsung Galaxy S that has a really nice 4 inches (10.16 cm) AMOLED screen among other niceties. :-)

It come with the 2.1 Éclair Android systems. In the last couple of weeks I have been in DCU (Dublin City University) that has (a weird security setup and) a network that requires an explicit proxy. In order to use the Wifi there I had to set up the said proxy.

The problem as I found out later is that the standard Android versions does not come with a way to configure a proxy. Taking a look to Xana's HTC Wildfire I see that HTC Sense does not have that option either.

That issue is reported in Android bugs list, with lots of ired and angry users letting their opinions being known about the fact (some of the posters are really harsh about the missing feature).

The purpose of this post is to report that it is possible to add a http proxy for Galaxy. It is not obvious at first (or second, third and so on) sight. We need to go to Wifi Network Settings and while there press the context menu (the list button), there are two possible options, Scan and Advanced. The proxy can be set in Advanced, the Advanced mode is also available in the standard Android set but the proxy option is not there.

Unfortunately the proxy does not work with the Android Market application, or with maps, or... so it is not a huge advantage. :-(

Lets hope that this is solved for future versions.