Signal handling in R

Recently I have been programming quite a lot in R, and today stumbled over the problem to implement a kind of monitoring loop in R. Typically that would be a infinite loop with sleep calls, but I wanted to allow for waking up from the sleep via sending UNIX style signals, in particular SIGINT. After some searching I found Beyond Exception Handling: Conditions and Restarts from the Advanced R book. But it didn’t really help me a lot to program an interrupt handler.

My requirements were:

  • an interruption of the work-part should be immediately restarted
  • an interruption of the sleep-part should go immediately into the work-part

Unfortunately it seems not to be possible to ignore interrupts at all from with the R code. The best one can do is install interrupt handlers and try to repeat the code which was executed while the interrupt happened. Continue reading

Email this to someonePrint this pageShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInFlattr the author

Fixing packages for broken Gtk3

As mentioned on sunweaver’s blog Debian’s GTK-3+ v3.21 breaks Debian MATE 1.14, Gtk3 is breaking apps all around. But not only Mate, probably many other apps are broken, too, in particular Nemo (the file manager of Cinnamon desktop) has redraw issues (bug 836908), and regular crashes (bug 835043).

gtk-breakage

I have prepared packages for mate-terminal and nemo built from the most recent git sources. The new mate-terminal now does not crash anymore on profile changes (bug 835188), and the nemo redraw issues are gone. Unfortunately, the other crashes of nemo are still there. The apt-gettable repository with sources and amd64 binaries are here:

deb http://www.preining.info/debian/ gtk3fixes main
deb-src http://www.preining.info/debian/ gtk3fixes main

and are signed with my usual GPG key.

Last but not least, I quote from sunweaver’s blog:

Questions

  1. Isn’t GTK-3+ a shared library? This one was rhetorical… Yes, it is.
  2. One that breaks other application with every point release? Well, unfortunately, as experience over the past years has shown: Yes, this has happened several times, so far — and it happened again.
  3. Why is it that GTK-3+ uploads appear in Debian without going through a proper transition? This question is not rhetorical. If someone has an answer, please enlighten me.

(end of quote)

<rant>
My personal answer to this is: Gtk is strongly related to Gnome, Gnome is strongly related to SystemD, all this is pushed onto Debian users in the usual way of “we don’t care for breaking non-XXX apps” (for XXX in Gnome, SystemD). It is very sad to see this recklessness taking more and more space all over Debian.
</rant>

I finish with another quote from sunweaver’s blog:

already scared of the 3.22 GTK+ release, luckily the last development release of the GTK+ 3-series

Email this to someonePrint this pageShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInFlattr the author

就職活動

昨日僕の大学の契約が切れてしまった。これまで6年半北陸先端科学技術大学院大学で准教授として務めていたが、新年度から延長されないことになった。従って、新しい勤め先を探しているー僕の年齢を見るとあまりよろしくない。5年の件を潜脱した先端大学へ感謝!

shuushoku

大学の関係の興味は研究と教育である。研究の分野は数学論理学、基礎情報学、形式論理など。最近カリー・ハワード同型対応をゲーデル論理とハイパーシーケント計算へ拡張の研究している。研究と教育について、詳細は「論理」から閲覧できる。

次の興味点はソフトウェア開発である。長年、オープンソース・プロジェクトの開発に積極的に携わってきた。多くのユーザーを抱える複数のソフトウェア開発に関与しており、その幅は学術的なものから産業に利用されている実用的なものに至るまで様々である。詳細は「software projects」から閲覧できる。

そのうえ、最近父親になったから、大学ならば、北陸地方で、ソフトウェア開発者として、リモートで働ける勤め先は一番いい。

誰かがいい提案があれば、是非教えてください。とりあえずハローワークと赤ちゃんとの生活を楽しんでいる。

Email this to someonePrint this pageShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInFlattr the author

Searching for a job

Yesterday my contract with my university JAIST ended. I was working there as Associate Professor for 6.5 years, but the university decided not to extend my contract (financial problems, foreigner in Japan). That means, I am now out on the job market again – not the greatest fun for an academic at my age. Thanks to JAIST for circumventing the ominous 5-year clause of permanent employment.
shuushoku

My prime interests are academic work, that is research and teaching, where research is in a variety of fields, mostly mathematical logic, theoretical computer science, and formal methods. Recently I am working on an extension of the Curry-Howard correspondence to cover different calculi, in particular Hyper Sequent Calculi, and relate them to some kind of process algebra. For more details see the logic dedicated page.

My other focal point is programming and software development, where I have contributed to many open source projects, and act as main developer of the TeX Live infrastructure and distribution system (tlmgr). Main languages are Perl, PHP, C, but also Python, Vala, Lisp, CafeOBJ, and whatever comes around. For more details see the software page.

I recently became father, so I would prefer either an academic position in Hokuriku, Japan, or a software developer position where I can work (most of the time) remotely.

In case one of the readers here has some hints, please drop me a line. In the meantime I enjoy my unemployed life with my baby!

Email this to someonePrint this pageShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInFlattr the author

How to rename a local OfflineIMAP managed folder

Since quite some time I am using OfflineIMAP to keep my mailbox status from various servers locally available on my machine. I did more or less follow the excellent guide A unix style mail setup, but didn’t use folder name translation right from the beginning. So I got stuck with four folders named INBOX: acc1/INBOX, acc2/INBOX, etc. This wouldn’t be a big problem, but when using Mutt with the folder sidebar patch (as available in the mutt-patched package in Debian), there is the problem that only the INBOX part is shown.

offlineimap

So I decided to rename all the local folders to the scheme described in the above guide. Continue reading

Email this to someonePrint this pageShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInFlattr the author

git bisect – bug hunting made easy

While developing the script to integrate CJK fonts into GhostScript, we found a strange discrepancy between different versions of GhostScript. With the Yu fonts as distributed with OSX, newer versions of GhostScript crash, while my relatively old version on Debian worked without a problem.

The obvious solution: git bisect!

git

Fortunately GhostScript is developed in a git repository, so I dived into a git bisect session. For those who don’t know it, git is a distributed, no – it is the distributed revision control system, and adopted more or less by any mayor development team.

Continue reading

Email this to someonePrint this pageShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInFlattr the author

Multi-lingual blog – taxonomy – Tarski theme display II

An update to my recent post about tagging post languages with the language used. Another thing I wanted is the display of flags instead of the short code of the language. In this post I explain how I achieved that with one additional plugin and an extension of code (Tarski extension plugin) shown in the previously mentioned post.

language-tagging-2

Continue reading

Email this to someonePrint this pageShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInFlattr the author

Multi-lingual blog – taxonomy – Tarski theme display

As you might have seen, I am writing this blog in a few languages, mostly English of course, but also German (my mother tongue), Italian (where I lived for 2.5 years), and recently I try also to write a bit in Japanese (where I live now). I was searching for a simple solution to tag my posts with a language, and also display the respective language in the excerpt and post header (at least in the theme Tarski I am using). Since most of the solutions out there are much more involved, including translations support (which I will not do), I just came up with a simple solution (see the red marks in the screenshot):

language tagging
Continue reading

Email this to someonePrint this pageShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInFlattr the author

Writing a nautilus-sendto extension for calling user defined scripts

Using nautilus-sendto extensions, the nautilus-sendto program allows sending selected objects to various targets, like mail programs, removable devices, bluetooth tools etc. Unfortunately it is not possible to easily add targets to this menu. There are other extensions of Nautilus, namely nautilus-scripts and nautilus-actions that extended Nautilus to user-defined scripts. Now, my favorite photo manager Shotwell, uses the nautilus-sendto program, and due to design decisions to keep the interface simple (understandable!) there is no way to change or add scripts within Shotwell. As a consequence, I decided to write a nautilus-sendto extensions that allows sending the selected objects to user defined scripts. By that, automatically also Shotwell profits from it.

nautilus-sendto extension allowing to send to scripts

Continue reading

Email this to someonePrint this pageShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInFlattr the author