Preprint of dissertation thesis
Ten days ago I submitted my dissertation thesis to the TU Darmstadt university. While the official publication is pending, I'll make preprint available here.
Ten days ago I submitted my dissertation thesis to the TU Darmstadt university. While the official publication is pending, I'll make preprint available here.
As our first contribution in the open source software of the world we would like to present R2X: A seamlass XML to R converter. Install with
Then you can create XML from R with
I have completed over the holidays the first version of a new AD tool, this time for the R language: R/ADR. Have a look at the homepage www.r-adr.de. The corresponding R package, called adr, is available from the download page.
R/ADR is very similar in structure to ADiMat. The server at r-adr.de
host a transformation service which provides the transpiler part of
the tool. The adr package provides a set of necessary runtime
functions and utilities for ease of use. The main driver function to
use is called adrDiffFor
, so it should immediately feel familiar to
experienced ADiMat users.
The main distinction, and probably a huge convenience, of doing AD on
R vs. AD on MATLAB is that there is no difference between functions
and function handles. To reflect this, R/ADR provides the d
operator which differentiates R functions.
R/ADR currently supports the forward mode only, but the reverse mode and forward-over-reverse mode for second order derivatives (Hessians) will hopefully follow soon. Drop me a line if you are interested in using it, this would help me in adjusting the priority level of the further development.
A new version 0.6.4 of my P2X parser software has been completed and is available from GitHub. The big improvement is the support for line comments and block comments. These define chunks of text that are inserted as "Ignored" items into the tree, i.e. without affecting its structure. This feature is almost indispensable for any attempt to parse real-life programming languages with P2X.
Another crucial enhancement are the two special options to ignore
certain items conditionally based on the context. With the new
ignoreAfter
rule P2X can handle line-broken code in MATLAB, by
ignoring the next NEWLINE after the triple dot ...
line continuation
token. With the ignoreIfStray
option P2X can handle line-broken
statements in R, by ignoring NEWLINE when it occurs immediately after
a binary operator.
Last week I had the pleasure to hold a talk on "Introduction to Automatic Differentiation for MATLAB (ADiMat)" at the seminar Advances in Computational Economics and Finance of the Chair of Quantitative Business Administration at the University of Zurich.
For the record, here are the slides. I think they make for quite a good and concise introduction to ADiMat, in particular when you are interested in constraint optimization and the evaluation of Hessians.
I have a report covering the evaluation of derivatives of an ODE with ADiMat. It is published at Arxiv, here: http://arxiv.org/abs/1802.02247. The two main topics are a) the derivatives of an ODE system and b) how to override the automatic derivates generated by ADiMat for an arbitrary function in the user code. As an exmple I took the well-known Lotka-Volterra equations.
I am relaunching my personal website again, again from org-mode files, but this time using my own tool which I built on top of org-to-xml.
The new version 0.6.2 of ADiMat has been released. Some new functions are now supported, for example "legendre", but primarily this is a maintenance release. Several of the outstanding bugs have been fixed.
The server has been updated to use TLS but a problem with the SHA1 signature of the certificate remains. To access the transformation server website https://adimat.sc.informatik.tu-darmstadt.de/ with Firefox, for example, click "Advanced" and then "Add Exception...".
Have fun differentiating.
I have taken up a new position at fionec GmbH, a company which produces high-precision fiber optic distances sensors. These allow for contactless scanning of almost any kind of surface with a precision of a couple of nm.
I have just released a new version 0.4.0 of the P2X light-weight parser with XML output. The main improvement is that there now is complete support for the UTF-8 encoding. In particular, identifiers can now have arbitrary charachters. For example, if you execute
you now get in the output two identifiers, as expected:
The other major change is the license, P2X is now distributed under the GPLv3 license.
I have recreated my website using, as you can see very tinily at the bottom of the page, o-blog. Now I can edit the content of this entire site in a single file, including both the fixed pages and my blog articles. A single Emacs function converts it all to a bunch of static files which I can push on the server. I did not change much of the design because I don't have the time to spare right now.
I recently found xmlsh and decided to give it a try in spite of it not
being available as a Debian package. I like the approach to make the
whole thing look like a Unix shell. Here is an example what you can do
with it: I run a system command, here echo -n "a+b" | p2x -bPLUS
,
and get the result in an XML variable, and then extract some subtree
from it with XPath.
However, I miss many of my zsh hotkeys, so I will not make xmlsh my default command shell. But I will certainly use it for scripting XML pipelines.
I created two extremely tiny software projects on githup: org-to-xml and org-letter. One of which is a rip-off, and that is the first: the code of org-to-xml, specifically the code in the org-to-xml.el file, was initially posted on stackexchange, in an answer by user harpo to the question "emacs-org mode and html publishing: how to change structure of generated HTML" by user David Belohrad. I grabbed it from there and changed one or two things so that it works with my Emacs 24.
The second is what I actually wanted to do: generate letters from an org-mode file, using HTML as style or template. To this end i export the content of the org-mode buffer to XML and then process it and the HTML template with XSLT to produce the HTML result. This lets me design my template as is, by editing the plain HTML, with some demo texts and style it with CSS. I give certain elements special meanings, basically the will be replaced by some content from the org-mode file. Obvious candidates are keywords
and drawers
In my setup, and in the example i use a drawer for the address and otherwise keywords. By expending even two stylesheets, i can specify the name of the template to use in the org buffer with a keyword. The first stylesheet simply spits out the value of the keyword and the second then run the actual stylesheet against the HTML template thus selected and the org-to-xml result. Thus i can easily switch between official and personal templates, which are the two i mainly need.
The "main" XSLT stylesheet then treats the "main" content of the buffer and converts it to HTML, using simple rules, though basically only paragraphs, sections and lists are handled currently. Many other features are still lacking. That will be a work in progress.
I'm using Emacs for a long time now, but I noticed one problem: I tend to stick with the things I know and only rarely discover any new functionality.
Now I found this site with lots of articles about Emacs' special features:
While the recent rename of XBMC to Kodi did really not raise any of my eyebrowse, the question was resolved for me another way: Before the rename reached the package name of my preferred OS, Debian testing, it stopped working altogether. Reason: My cupboard laptop does not have a graphics card that is supported. Which is a pity, as it did work just before the update. My usage scenario is as follows: start XBMC and close the Laptop, then listen music via the home stereo and remote control XBMC with Yatse. So I'm not interested in graphics at all. But, searching the web quickly made the ugly truth appearent, it will not work without a nice graphics adapter. The minimum requirements are shown here. Which shows us once more that monolithic systems are bad, if not outright evil. Why should the machine that must just decode the files and sent the audio to the jack have a graphics card?
Then started the look for a replacement. Google for XBMC
alternatives. Found this list of music players, home media centers,
etc. with the usual nice little icons indicating support for Linux,
Windows, and Mac. But the main question for me is: Does it exist as a
package in Debian testing? The usual suspects. Some new faces. For
example Enna
. Looks nice but not quite what I want.
Then I found it: mpd
. How? Well, I typed into Google the search term
linux music player remote control and the top result was this page:
http://www.instructables.com/id/Linux-music-server-controlled-by-an-Android-device/
Another example how good Google can work sometimes. In the last few
years I started using DuckDuckGo as often as possible. This means,
whenever I feel there is a good chance that the Duck will find what I
am looking for. Which is the case for example when I look for
something on stackoverflow. However, whenever I have a really
complicated search task, or maybe semantically challenging, I tend
to go to Google directly. Of course you sometimes need good intuition
to ask the right question, which in this case I luckily did.
On my work laptop mpd was set up very easily:
install mpd
and mpc
mpd
is the daemon and mpc
is a console client program
Edit file:/etc/mpd.conf and change the setting for the music directory
Restart mpd
To update the library, you can use mpc
For remote access, you must also change the TCP listen address in file:/etc/mpd.conf, for example:
This allows anyone to connect to the MPD, so this is for a home network only
On my cupboard laptop I needed to figure out the correct setting for
the device
setting in the audio_output
section for ALSA before I
could hear anything. It now looks like this:
I had to more or less guess and piece together this setting from other
examples I saw on the net and by looking at the output of the command
aplay -l
on my computer. Is there any command that prints the
available ALSA devices in the form as in the MPD config?
Using mpd
with mpc
is as easy as
which adds the tracks of David Garrett's Garrett Vs. Paganini album, but not the Devil's Violinist soundtrack to the playlist, followed by
which starts playback.
There is a whole series of GUI programs for managing an MPD server, music playlists, etc. I did not have the time to try them all. Have a look at http://mpd.wikia.com/wiki/Clients.
On another computer, just set MPD_HOST
to the server name where
mpd
is running:
and then mpc
can be used exactly as on the server.
In file:/etc/mpd.conf (on the server) just uncomment and edit the
audio_output
section for the builtin streaming server, for example
like this
Then you can open the URL http://family_server:8987 with an audio player such as Audacious.
MPDroid is an app which allows remote control of and streaming from an mpd server, though there seem to be several others. It works just great as a remote control and with the streaming feature I can also hear the music on the phone.
There are many other MPD-related apps in the stores, however. Have a look at http://mpd.wikia.com/wiki/Clients.
Copyright © 2014-2018 Johannes Willkomm.
This my weblog file.