<?xml version="1.0" encoding="iso-8859-1"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
 xmlns:atom="http://www.w3.org/2005/Atom"
>

<channel>
<title>idlebox.net - Timo&#x27;s Weblog</title>
<link>http://idlebox.net</link>
<description>idlebox.net - RSS 2.0 Feed</description>
<language>de</language>
<copyright>Copyright 2007, idlebox.net</copyright>
<pubDate>Tue, 20 Mar 2012 22:29:00 +0100</pubDate>
<lastBuildDate>Tue, 20 Mar 2012 22:29:00 +0100</lastBuildDate>
<webMaster>tbrss@idlebox.net (Timo Bingmann)</webMaster>
<atom:link href="http://idlebox.net/xmlfeed/weblog-rss20.xml" rel="self" title="idlebox.net Weblog Feed RSS 2.0" type="application/rss+xml"/>

<item>
<title>Finding Roots of Polynomials by Clipping - Report and Implementation from my Lab Course in Numerical Mathematics</title>
<link>http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/</link>
<description>&#x3C;span style=&#x22;float: right; clear: right; margin: 0em 0em 1.5em 1.5em; font-size: 10pt; text-align: center&#x22;&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/&#x22;&#x3E;&#x3C;img src=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/thumb.jpg&#x22; width=&#x22;300&#x22; height=&#x22;226&#x22; alt=&#x22;The QuadClip Algorithm&#x22; /&#x3E;&#x3C;/a&#x3E;&#x3C;/span&#x3E;&#x3C;p&#x3E;This semester I had the pleasure to take part in a lab exercise course supervised by Prof. Thomas Lin&#xDF; at the &#x3C;a class=&#x22;exp&#x22; href=&#x22;http://www.fernuni-hagen.de/english/&#x22;&#x3E;FernUniversity of Hagen&#x3C;/a&#x3E;. The objective was to comprehend, implement and evaluate a particular recent advancement in the field of numerical mathematics. My topic was finding the roots of a polynomial by clipping in B&#xE9;zier representation using two new methods, one devised by Michael Barto&#x26;#328; and Bert J&#xFC;ttler [1], the other extended from the first by Ligang Liu, Lei Zhang, Binbin Lin and Guojin Wang [2].&#x3C;/p&#x3E;

&#x3C;p&#x3E;My implementation of this topic was done for the lab course in C++ and contains many in themselves interesting sub-algorithms, which are combined into the clipping algorithms for finding roots. These sub-algorithms may prove useful for other purposes, which is the main reason for publishing this website. Among these are:&#x3C;/p&#x3E;

&#x3C;ul&#x3E;
  &#x3C;li&#x3E;Polynomial classes for monomial and B&#xE9;zier representations: &#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/doxygen-html/classPolynomialStandard.html&#x22;&#x3E;PolynomialStandard&#x3C;/a&#x3E; and &#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/doxygen-html/classPolynomialBezier.html&#x22;&#x3E;PolynomialBezier&#x3C;/a&#x3E;.&#x3C;/li&#x3E;
  &#x3C;li&#x3E;Algorithms to convert from monomial to B&#xE9;zier representation and vice versa: PolynomialStandard::toBezier() and PolynomialBezier::toStandard().&#x3C;/li&#x3E;
  &#x3C;li&#x3E;Evaluation algorithms for both representations: Horner&#x27;s Schema and the Algorithm of de Casteljau.&#x3C;/li&#x3E;
  &#x3C;li&#x3E;Another version of de Casteljau&#x27;s Algorithm to split a polynomial in B&#xE9;zier representation into two parts.&#x3C;/li&#x3E;
  &#x3C;li&#x3E;Jarvis&#x27; March aka gift wrapping (run time O(hn)) to calculate the convex hull of the B&#xE9;zier polygon: PolynomialBezier::getConvexHull().&#x3C;/li&#x3E;
  &#x3C;li&#x3E;Cardano&#x27;s formulas to find all real roots of any cubic polynomial: PolynomialStandard::findRoots().&#x3C;/li&#x3E;
&#x3C;/ul&#x3E;

&#x3C;p&#x3E;For the lab course I wrote two documents, both in German: one is an abstract &#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/Kurzfassung.pdf&#x22;&#x3E;Kurzfassung.pdf&#x3C;/a&#x3E; (1 page), which is translated into English below, and the other a short report &#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/Ausarbeitung.pdf&#x22;&#x3E;Ausarbeitung.pdf&#x3C;/a&#x3E; (6 pages). The report contains a short description of the algorithms together with execution and convergence speed measurements, which verify the original authors experiments. For presenting the lab work I created these &#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/Slides.pdf&#x22;&#x3E;Slides.pdf&#x3C;/a&#x3E;, which however are not self-explanatory due to my minimum-text presentation style.&#x3C;/p&#x3E;

&#x3C;p&#x3E;The implementation is a single file C++ program, which can optionally output LaTeX code for debugging purposes. The code can easily be compiled on any Linux machine, and probably also using other tool chains. It requires the &#x3C;a class=&#x22;exp&#x22; href=&#x22;http://www.mpfr.org&#x22;&#x3E;GNU mpfr library&#x3C;/a&#x3E; for arbitrary precision floating-point numbers to enable high precision calculations (this library is also available for Visual C++). You can download the &#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/clipper.zip&#x22;&#x3E;clipper.zip&#x3C;/a&#x3E; (23 KB) and view the corresponding doxygen &#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/doxygen-html/&#x22;&#x3E;HTML documentation&#x3C;/a&#x3E;.&#x3C;/p&#x3E;

&#x3C;p&#x3E;The program can output LaTeX code documenting each individual steps of the computation while it is running, this method yields extremely detailed execution protocols for each input. For demonstration purposes the code contains nine different sets of examples, called demo1 through demo9. Among these demos six, seven and eight are speed test demos, which can be run without debugging overhead to measure the algorithms&#x27; run time. Results of these speed tests are documented in the short report above. The detailed execution protocols of the eight demos can downloaded below:&#x3C;/p&#x3E;

&#x3C;ul&#x3E;
  &#x3C;li&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/demos/demo1.pdf&#x22;&#x3E;demo1.pdf&#x3C;/a&#x3E; (345 KB) - Simple demonstration using a polynomial of 5th degree&#x3C;/li&#x3E;
  &#x3C;li&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/demos/demo2.pdf&#x22;&#x3E;demo2.pdf&#x3C;/a&#x3E; (561 KB) - Polynomial of 8th degree with many roots in [0,1]&#x3C;/li&#x3E;
  &#x3C;li&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/demos/demo3.pdf&#x22;&#x3E;demo3.pdf&#x3C;/a&#x3E; (2.7 MB) - Wilkinson polynomial with &#x3C;i&#x3E;n = 20&#x3C;/i&#x3E;&#x3C;/li&#x3E;
  &#x3C;li&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/demos/demo4.pdf&#x22;&#x3E;demo4.pdf&#x3C;/a&#x3E; (269 KB) - Unspecified demo to test other polynomials&#x3C;/li&#x3E;
  &#x3C;li&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/demos/demo5.pdf&#x22;&#x3E;demo5.pdf&#x3C;/a&#x3E; (288 KB) - All degree reduction and raising matrices for degree five&#x3C;/li&#x3E;
  &#x3C;li&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/demos/demo6.pdf&#x22;&#x3E;demo6.pdf&#x3C;/a&#x3E; (6.4 MB) - Speed test of polynomials with one single root&#x3C;/li&#x3E;
  &#x3C;li&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/demos/demo7.pdf&#x22;&#x3E;demo7.pdf&#x3C;/a&#x3E; (70.9 MB) - Speed test of polynomials with a triple root (Warning: very large PDF)&#x3C;/li&#x3E;
  &#x3C;li&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/demos/demo8.pdf&#x22;&#x3E;demo8.pdf&#x3C;/a&#x3E; (5.3 MB) - Speed test of polynomials with two near single roots&#x3C;/li&#x3E;
&#x3C;/ul&#x3E;

&#x3C;div class=&#x22;cite&#x22;&#x3E;
&#x3C;h2&#x3E;Abstract (Translation of Kurzfassung)&#x3C;/h2&#x3E;
&#x3C;p&#x3E;Fast computation of the roots of a polynomial is the basis for many more complex applications. Classical algorithms for this problem are for example bisection and the Newton-Raphson method, where the latter is quadratically convergent on single roots, but only linear convergent on double roots. In 2007, Barto&#x26;#328; und J&#xFC;ttler [1] presented a new method, which is based on degree reduction and can find all roots of a polynomial within a given search interval. Like other numerical algorithms it is based on nested intervals enclosing the root and the new method exhibits a convergent rate of 3 for single roots and 3/2 for double roots. The method&#x27;s scheme was continued in 2009 by Liu et al. [2] and their enhanced algorithm features convergent rate 4 for single roots, 2 for double roots and 4/3 for triple roots.&#x3C;/p&#x3E;

&#x3C;p&#x3E;Both methods are based on approximating a polynomial of degree &#x3C;em&#x3E;n&#x3C;/em&#x3E; given in Bernstein-B&#xE9;zier representation by two polynomials of second or third degree, which bound the original polynomial from above and below. The roots of the polynomials of smaller degree can be found directly using the quadratic or Cardano&#x27;s formulas and these roots yield smaller intervals which are recursively searched. The algorithms are iterated until a desired precision is reached and by branching into disjoint search interals, all roots of the polynomial can be found.&#x3C;/p&#x3E;

&#x3C;p&#x3E;The convergent rates of the sequence of nested intervals is guaranteed by selecting the best-possible approximating polynomials of second or third degree. These can be calculated efficiently using a method developed by J&#xFC;ttler, which is based on an explicit formula for the dual basis of the Bernstein polynomials. This method allows direct calculation of quadratic or cubic polynomials with smallest error distance to the target polynomial regarding the &#x3C;img src=&#x22;http://idlebox.net/img/latex/hc1EJI1QxhuUkdtITcuI4BzprjDujPPVAlyCVAzhaXI.png&#x22; alt=&#x22;L_2&#x22; width=&#x22;17&#x22; height=&#x22;14&#x22; class=&#x22;ltximg&#x22; /&#x3E; norm. In the end, the degree reduction operation is a simple matrix multiplication.&#x3C;/p&#x3E;
&#x3C;/div&#x3E;

&#x3C;p&#x3E;[1] Barto&#x26;#328;, M. and J&#xFC;ttler, B. &#x22;Computing roots of polynomials by quadratic clipping&#x22;, &#x3C;i&#x3E;Computer Aided Geometric Design&#x3C;/i&#x3E; 24.3, (2007) p. 125-141. DOI: &#x3C;a href=&#x22;http://dx.doi.org/10.1016/j.cagd.2007.01.003&#x22;&#x3E;10.1016/j.cagd.2007.01.003&#x3C;/a&#x3E;&#x3C;/p&#x3E;

&#x3C;p&#x3E;[2] Liu, L., Zhang, L., Lin, B., Wang, G. &#x22;Fast approach for computing roots of polynomials using cubic clipping&#x22;, &#x3C;i&#x3E;Computer Aided Geometric Design&#x3C;/i&#x3E; 26.5, (2009), p. 524-599. DOI: &#x3C;a href=&#x22;http://dx.doi.org/10.1016/j.cagd.2009.02.003&#x22;&#x3E;10.1016/j.cagd.2009.02.003&#x3C;/a&#x3E;&#x3C;/p&#x3E;</description>
<guid isPermaLink="true">http://idlebox.net/2012/0320-Finding-Roots-of-Polynomials-by-Clipping/</guid>
<pubDate>Tue, 20 Mar 2012 22:29:00 +0100</pubDate>
</item>
<item>
<title>Vervollst&#xE4;ndigung meiner Seminararbeit in Diskreter Mathematik</title>
<link>http://idlebox.net/2011/0831-Seminararbeit-Singer-Differenzenmengen/</link>
<description>&#x3C;span style=&#x22;float: right; clear: right; margin: 0em 0em 1.5em 1.5em; font-size: 10pt; text-align: center&#x22;&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2011/0831-Seminararbeit-Singer-Differenzenmengen/&#x22;&#x3E;&#x3C;img src=&#x22;http://idlebox.net/2011/0831-Seminararbeit-Singer-Differenzenmengen/thumb.jpg&#x22; width=&#x22;300&#x22; height=&#x22;274&#x22; alt=&#x22;Drawing of PG(2,3)&#x22; /&#x3E;&#x3C;/a&#x3E;&#x3C;/span&#x3E;&#x3C;p&#x3E;Heute habe ich meine Seminararbeit in Diskreter Mathematik an der FernUni Hagen vervollst&#xE4;ndigt. Ich m&#xF6;chte mich bei Prof. Hochst&#xE4;ttler bedanken f&#xFC;r die erfahrene Leitung und planvolle Einf&#xFC;hrung in die interessanten Gebiete der Design Theorie und endlicher Geometrien. Die Arbeit ist auf deutsch und unter folgendem Link downloadbar.&#x3C;/p&#x3E;

&#x3C;p&#x3E;Download PDF: &#x3C;a href=&#x22;http://idlebox.net/2011/0831-Seminararbeit-Singer-Differenzenmengen/Seminararbeit-Singer-Differenzenmengen.pdf&#x22;&#x3E;Seminararbeit-Singer-Differenzenmengen.pdf&#x3C;/a&#x3E; (2,8 MB)&#x3C;/p&#x3E;

&#x3C;div class=&#x22;cite&#x22;&#x3E;
&#x3C;h2&#x3E;Zusammenfassung&#x3C;/h2&#x3E;
&#x3C;p&#x3E;Die Entwicklung von Differenzenmengen in der Design Theorie begann 1938 mit einer algebraischen Untersuchung endlicher projektiver Geometrien von James Singer. Nach Einf&#xFC;hrung der wichtigsten Grundbegriffe der Design Theorie und projektiver Geometrien werden in dieser Ausarbeitung die beiden Resultate von Singer entwickelt. Die Existenz einer Kollineation mit Periode &#x3C;img src=&#x22;http://idlebox.net/img/latex/lbA2Tr4MRa-YaZ+uzl5V5vHJGAcM3fa3N8oIUNKyKVA.png&#x22; alt=&#x22;frac{n^{d+1}-1}{n-1}&#x22; width=&#x22;47&#x22; height=&#x22;24&#x22; class=&#x22;ltximg&#x22; /&#x3E; f&#xFC;hrt zur Definition von Differenzenmengen und beide Ergebnisse liefern elegante Konstruktionsverfahren f&#xFC;r &#x3C;img src=&#x22;http://idlebox.net/img/latex/yC+CDZt0Xk0ZnL6g+bD7ZFz5v3nH42n-Xo-Bv9-cMnc.png&#x22; alt=&#x22;PG(d,p^k)&#x22; width=&#x22;69&#x22; height=&#x22;20&#x22; class=&#x22;ltximg&#x22; /&#x3E;.&#x3C;/p&#x3E;
&#x3C;/div&#x3E;</description>
<guid isPermaLink="true">http://idlebox.net/2011/0831-Seminararbeit-Singer-Differenzenmengen/</guid>
<pubDate>Wed, 31 Aug 2011 20:12:00 +0200</pubDate>
</item>
<item>
<title>Update Release of STX B+ Tree 0.8.6</title>
<link>http://idlebox.net/2011/0518-STX-B+Tree-0.8.6-Update.blog</link>
<description>&#x3C;span style=&#x22;float: right; clear: right; margin: 0em 0em 1.5em 1.5em; font-size: 10pt; text-align: center&#x22;&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2007/stx-btree/&#x22;&#x3E;&#x3C;img src=&#x22;http://idlebox.net/2007/stx-btree/btree-thumb-border.png&#x22; width=&#x22;252&#x22; height=&#x22;193&#x22; alt=&#x22;Small drawing of a B+ tree&#x22; /&#x3E;&#x3C;/a&#x3E;&#x3C;/span&#x3E;&#x3C;p&#x3E;After four years I have decided to release an updated version 0.8.6 of the &#x3C;a href=&#x22;http://idlebox.net/2007/stx-btree/&#x22;&#x3E;STX B+ Tree C++ Template Classes&#x3C;/a&#x3E; package. The updated release contains all patches that have accumulated in my inbox over the years. So yes, please send me patches for this project, it is not in vain! Below the highlights on the changes in this release:&#x3C;/p&#x3E;

&#x3C;ul&#x3E;
  &#x3C;li&#x3E;Implemented a missing function: &#x3C;code&#x3E;erase(iterator iter)&#x3C;/code&#x3E; by recursively searching for the referenced leaf node inside the subtree containing equal keys.&#x3C;/li&#x3E;
  &#x3C;li&#x3E;Applied a patch which adds support for STL allocators as template parameters.&#x3C;/li&#x3E;
  &#x3C;li&#x3E;Corrected limits of a &#x3C;code&#x3E;for&#x3C;/code&#x3E; loop when shifting pairs from left to right leaf nodes during deletion.&#x3C;/li&#x3E;
&#x3C;/ul&#x3E;

&#x3C;p&#x3E;I also reran the speed test done back in 2007 on my new hardware and compared the results with the old data. Due to the larger L2 cache sizes in my new Intel Core i7, the B-tree speed-up first starts to show at about 100,000 integer items, rather than 16,000 items with my older Pentium 4. This might also have something to do with the new CPU using 64-bit pointers and thus requiring larger nodes for child references. &#x3C;a href=&#x22;http://idlebox.net/2007/stx-btree/stx-btree-0.8.6/doxygen-html/a00001.html&#x22;&#x3E;Read the complete speed test here.&#x3C;/a&#x3E;&#x3C;/p&#x3E;

&#x3C;p style=&#x22;text-align: center&#x22;&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2007/stx-btree/stx-btree-0.8.6/doxygen-html/a00001.html&#x22;&#x3E;&#x3C;img src=&#x22;http://idlebox.net/2007/stx-btree/stx-btree-0.8.6/doxygen-html/speedtest-2011-03.png&#x22; alt=&#x22;result plot from new speedtest&#x22; width=&#x22;750&#x22; height=&#x22;525&#x22; /&#x3E;&#x3C;/a&#x3E;&#x3C;/p&#x3E;

&#x3C;p&#x3E;The updated source code package is available &#x3C;a href=&#x22;http://idlebox.net/2007/stx-btree/&#x22;&#x3E;for download from this webpage&#x3C;/a&#x3E;.&#x3C;/p&#x3E;</description>
<guid isPermaLink="true">http://idlebox.net/2011/0518-STX-B+Tree-0.8.6-Update.blog</guid>
<pubDate>Wed, 18 May 2011 12:44:00 +0200</pubDate>
</item>
<item>
<title>Yet Another Release of digup 0.6.40 - A Digest Updating Tool</title>
<link>http://idlebox.net/2011/0130-digup-0.6.40.blog</link>
<description>&#x3C;p&#x3E;This is yet another release entry of &#x3C;a href=&#x22;http://idlebox.net/2009/digup/&#x22;&#x3E;digup&#x3C;/a&#x3E;. This time, however, it is a major release with lots of new improvements and some old fixes:&#x3C;/p&#x3E;

&#x3C;ul&#x3E;
  &#x3C;li&#x3E;Added new flags &#x3C;code&#x3E;--modify-window=&#x3C;i&#x3E;number&#x3C;/i&#x3E;&#x3C;/code&#x3E; to allow larger deltas in the modification time of files. This is a fixup for checking backups copied onto FAT filesystems, because these store the time stamp with a precision of only 2 seconds. Since this is a common operation, the shortcut &#x3C;code&#x3E;-w&#x3C;/code&#x3E;/&#x3C;code&#x3E;--windows&#x3C;/code&#x3E; will set the allowed modification window to 1.&#x3C;/li&#x3E;
  &#x3C;li&#x3E;Also added a new flag &#x3C;code&#x3E;--exclude-marker=&#x3C;i&#x3E;file&#x3C;/i&#x3E;&#x3C;/code&#x3E;, which makes the recursive file system walk skip all directories (and their sub-directories) containing a special marker file usually called &#x3C;code&#x3E;.nobackup&#x3C;/code&#x3E; in other programs. This option is &#x3C;i&#x3E;persistent&#x3C;/i&#x3E; and stored in the created digest file, so it must only be specified once and then in all subsequent runs the same directory marker is used to selectively skip over special directories.&#x3C;/li&#x3E;
  &#x3C;li&#x3E;Added a &#x3C;code&#x3E;--restrict=&#x3C;i&#x3E;pattern&#x3C;/i&#x3E;&#x3C;/code&#x3E; temporary exclusion flag. If specified, all paths containing the pattern as a substring are temporarily skipped. This allows one to quickly check a specific folder or file structure for modifications. Especially useful in combination with &#x3C;code&#x3E;-c&#x3C;/code&#x3E; to perform a full digest check on only a subset of the files.&#x3C;/li&#x3E;
  &#x3C;li&#x3E;One more smaller fixup: using 64-bit file offsets on Window, which allows files larger than 2GB to work correctly.
&#x3C;/ul&#x3E;

&#x3C;p&#x3E;For more information and the new version see the &#x3C;a href=&#x22;http://idlebox.net/2009/digup/&#x22;&#x3E;digup web page&#x3C;/a&#x3E;.&#x3C;/p&#x3E;</description>
<guid isPermaLink="true">http://idlebox.net/2011/0130-digup-0.6.40.blog</guid>
<pubDate>Mon, 31 Jan 2011 20:25:00 +0100</pubDate>
</item>
<item>
<title>Bugfix Release: digup 0.6.30 - A Digest Updating Tool</title>
<link>http://idlebox.net/2010/1003-digup-0.6.30.blog</link>
<description>&#x3C;p&#x3E;Fixed another severe bug in the &#x3C;a href=&#x22;http://idlebox.net/2009/digup/&#x22;&#x3E;digup&#x3C;/a&#x3E; tool: on the amd64 architecture the tool crashed when writing the digest file, thanks goes to Daniel D. for reporting and fixing this bug.&#x3C;/p&#x3E;

&#x3C;p&#x3E;The bug was caused by the variable arguments lists &#x3C;code&#x3E;va_list&#x3C;/code&#x3E; used twice in the &#x3C;code&#x3E;fprintfcrc()&#x3C;/code&#x3E; function. Apparently, on the amd64 platform &#x3C;code&#x3E;va_start()&#x3C;/code&#x3E; and &#x3C;code&#x3E;va_end()&#x3C;/code&#x3E; must be called twice even when passed the list to &#x3C;code&#x3E;vsprintf()&#x3C;/code&#x3E;.&#x3C;/p&#x3E;

&#x3C;p&#x3E;For more information and the new version see the &#x3C;a href=&#x22;http://idlebox.net/2009/digup/&#x22;&#x3E;digup web page&#x3C;/a&#x3E;.&#x3C;/p&#x3E;</description>
<guid isPermaLink="true">http://idlebox.net/2010/1003-digup-0.6.30.blog</guid>
<pubDate>Sun, 03 Oct 2010 16:12:00 +0200</pubDate>
</item>
<item>
<title>Bugfix Release: digup 0.6.27 - A Digest Updating Tool</title>
<link>http://idlebox.net/2010/0820-digup-0.6.27.blog</link>
<description>&#x3C;p&#x3E;Fixed a two bugs in the &#x3C;a href=&#x22;http://idlebox.net/2009/digup/&#x22;&#x3E;digup&#x3C;/a&#x3E; tool: added large file support when compiling the program and fixed a string allocation bug.&#x3C;/p&#x3E;

&#x3C;p&#x3E;This new version enables large file support by using &#x3C;code&#x3E;long long&#x3C;/code&#x3E; variables for size. Furthermore, a string allocation bug was fixed which occured when using &#x3C;code&#x3E;-t&#x3C;/code&#x3E; and &#x3C;code&#x3E;-f&#x3C;/code&#x3E; command line parameters.&#x3C;/p&#x3E;

&#x3C;p&#x3E;For more information and the new version see the &#x3C;a href=&#x22;http://idlebox.net/2009/digup/&#x22;&#x3E;digup web page&#x3C;/a&#x3E;.&#x3C;/p&#x3E;</description>
<guid isPermaLink="true">http://idlebox.net/2010/0820-digup-0.6.27.blog</guid>
<pubDate>Fri, 20 Aug 2010 23:05:00 +0200</pubDate>
</item>
<item>
<title>Bugfix Release: stx-execpipe 0.7.1 - STX Execution Pipe C++ Library</title>
<link>http://idlebox.net/2010/0730-stx-execpipe-0.7.1.blog</link>
<description>&#x3C;p&#x3E;Fixed a small bug in the &#x3C;a href=&#x22;http://idlebox.net/2010/stx-execpipe/&#x22;&#x3E;stx-execpipe&#x3C;/a&#x3E; library: add large file support when compiling the library.&#x3C;/p&#x3E;

&#x3C;p&#x3E;This bug switches on the large file support functions. Without this fix a pipeline reading or writing files &#x26;gt;2GB will not function properly. The fix is to &#x3C;code&#x3E;#define _FILE_OFFSET_BITS 64&#x3C;/code&#x3E; when compiling the library&#x27;s code.&#x3C;/p&#x3E;

&#x3C;p&#x3E;For more information and the source code see the &#x3C;a href=&#x22;http://idlebox.net/2010/stx-execpipe/&#x22;&#x3E;stx-execpipe web page&#x3C;/a&#x3E;.&#x3C;/p&#x3E;</description>
<guid isPermaLink="true">http://idlebox.net/2010/0730-stx-execpipe-0.7.1.blog</guid>
<pubDate>Fri, 30 Jul 2010 17:13:00 +0200</pubDate>
</item>
<item>
<title>Published stx-execpipe 0.7.0 - STX Execution Pipe C++ Library</title>
<link>http://idlebox.net/2010/0718-stx-execpipe-0.7.0.blog</link>
<description>&#x3C;span style=&#x22;float: right; clear: right; margin: 0em 0em 1.5em 1.5em; font-size: 10pt; text-align: center&#x22;&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2010/stx-execpipe/&#x22;&#x3E;&#x3C;img src=&#x22;http://idlebox.net/2010/stx-execpipe/thumb.jpg&#x22; width=&#x22;300&#x22; height=&#x22;186&#x22; alt=&#x22;Execution pipe with exec() bubbles&#x22; /&#x3E;&#x3C;/a&#x3E;&#x3C;/span&#x3E;&#x3C;p&#x3E;The STX C++ library series has been extended today with a new installation: the STX Execution Pipe library, in short STX ExecPipe. It is the solution to an issue that I encountered in writing a small backup application. This backup tool collects some file to backup and then calls &#x3C;code&#x3E;tar&#x3C;/code&#x3E; and &#x3C;code&#x3E;xz&#x3C;/code&#x3E; followed by &#x3C;code&#x3E;ncftpput&#x3C;/code&#x3E;.&#x3C;/p&#x3E;

&#x3C;p&#x3E;However, I could not find any useful C++ library that allows convenient chaining of external programs like used in everyday shell piping. This pipe line functionality is based on the system calls &#x3C;code&#x3E;fork()&#x3C;/code&#x3E;, &#x3C;code&#x3E;exec()&#x3C;/code&#x3E; and &#x3C;code&#x3E;pipe()&#x3C;/code&#x3E;, which are not easy to use correctly. After writing some ad-hoc functions to call one or two external programs, I decided to tackle this basic problem once and for all. The result is the &#x3C;a href=&#x22;http://idlebox.net/2010/stx-execpipe/&#x22;&#x3E;stx-execpipe&#x3C;/a&#x3E; library.&#x3C;/p&#x3E;

&#x3C;p&#x3E;Using the library a C++ program can build a sequence of external programs with command line parameters. These programs are connected by the library just like a shell pipe: stdout of the preceding stage goes into stdin of the next one. The input and output of the whole pipeline can be redirected to a plain fd, a file or saved in a std::string.&#x3C;/p&#x3E;

&#x3C;p&#x3E;One very interesting feature of the library is to insert intermediate processing functions into a pipe line. The data can be intercepted and passed back to the parent process for manipulation or just inspection. This was necessary to calculate the SHA1 digest of a backup tarball simultaneously to uploading it.&#x3C;/p&#x3E;

&#x3C;p&#x3E;For more information and the source code see the &#x3C;a href=&#x22;http://idlebox.net/2010/stx-execpipe/&#x22;&#x3E;stx-execpipe web page&#x3C;/a&#x3E;.&#x3C;/p&#x3E;

&#x3C;p&#x3E;The following small code snippet exemplifies the flexibility of the stx-execpipe solution:&#x3C;/p&#x3E;
&#x3C;div class=&#x22;codesnippet&#x22; style=&#x22;font-size: 10pt; font-family: monospace&#x22;&#x3E;&#x3C;tt&#x3E;stx::ExecPipe ep;&#x3C;br /&#x3E;&#x3C;br /&#x3E;&#x3C;span class=&#x22;com&#x22;&#x3E;// first stage calls tar&#x3C;/span&#x3E;&#x3C;span class=&#x22;com&#x22;&#x3E;&#x3C;br /&#x3E;&#x3C;/span&#x3E;std::vector&#x26;lt;std::string&#x26;gt; tarargs;&#x3C;br /&#x3E;tarargs.push_back(&#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;tar&#x22;&#x3C;/span&#x3E;);&#x3C;br /&#x3E;tarargs.push_back(&#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;--create&#x22;&#x3C;/span&#x3E;);&#x3C;br /&#x3E;tarargs.push_back(&#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;--verbose&#x22;&#x3C;/span&#x3E;);&#x3C;br /&#x3E;tarargs.push_back(&#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;--no-recursion&#x22;&#x3C;/span&#x3E;);&#x3C;br /&#x3E;tarargs.push_back(&#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;/path/to/some/files&#x22;&#x3C;/span&#x3E;);&#x3C;br /&#x3E;tarargs.push_back(&#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;/path/to/more/files&#x22;&#x3C;/span&#x3E;);&#x3C;br /&#x3E;ep.add_execp(&#x26;amp;tarargs);&#x3C;br /&#x3E;&#x3C;br /&#x3E;&#x3C;span class=&#x22;com&#x22;&#x3E;// second stage compresses the tarball&#x3C;/span&#x3E;&#x3C;span class=&#x22;com&#x22;&#x3E;&#x3C;br /&#x3E;&#x3C;/span&#x3E;ep.add_execp(&#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;xz&#x22;&#x3C;/span&#x3E;, &#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;-9&#x22;&#x3C;/span&#x3E;);&#x3C;br /&#x3E;&#x3C;br /&#x3E;&#x3C;span class=&#x22;com&#x22;&#x3E;// third stage intercepts data for a SHA1 digest&#x3C;/span&#x3E;&#x3C;span class=&#x22;com&#x22;&#x3E;&#x3C;br /&#x3E;&#x3C;/span&#x3E;Sha1Function sha1tar;&#x3C;br /&#x3E;ep.add_function(&#x26;amp;sha1tar);&#x3C;br /&#x3E;&#x3C;br /&#x3E;&#x3C;span class=&#x22;com&#x22;&#x3E;// fourth stage sends the tarball via FTP&#x3C;/span&#x3E;&#x3C;span class=&#x22;com&#x22;&#x3E;&#x3C;br /&#x3E;&#x3C;/span&#x3E;std::vector&#x26;lt;std::string&#x26;gt; ftpargs;&#x3C;br /&#x3E;ftpargs.push_back(&#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;ncftpput&#x22;&#x3C;/span&#x3E;);&#x3C;br /&#x3E;ftpargs.push_back(&#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;-c&#x22;&#x3C;/span&#x3E;);&#x3C;br /&#x3E;ftpargs.push_back(&#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;ftp.upload-to-host.net&#x22;&#x3C;/span&#x3E;);&#x3C;br /&#x3E;ftpargs.push_back(&#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;/path/to/ftpfile.tar.gz&#x22;&#x3C;/span&#x3E;);&#x3C;br /&#x3E;ep.add_execp(&#x26;amp;ftpargs);&#x3C;br /&#x3E;&#x3C;br /&#x3E;&#x3C;span class=&#x22;kwa&#x22;&#x3E;if&#x3C;/span&#x3E; (ep.run().all_return_codes_zero()) {&#x3C;br /&#x3E;&#x26;nbsp; &#x26;nbsp; std::cout &#x26;lt;&#x26;lt; &#x3C;span class=&#x22;str&#x22;&#x3E;&#x22;Backup upload complete.&#x22;&#x3C;/span&#x3E; &#x26;lt;&#x26;lt; std::endl&#x3C;br /&#x3E;}&#x3C;br /&#x3E;&#x3C;span class=&#x22;kwa&#x22;&#x3E;else&#x3C;/span&#x3E; {&#x3C;br /&#x3E;&#x26;nbsp; &#x26;nbsp; &#x3C;span class=&#x22;com&#x22;&#x3E;// error processing...&#x3C;/span&#x3E;&#x3C;span class=&#x22;com&#x22;&#x3E;&#x3C;br /&#x3E;&#x3C;/span&#x3E;}&#x3C;br /&#x3E;&#x3C;/tt&#x3E;&#x3C;/div&#x3E;</description>
<guid isPermaLink="true">http://idlebox.net/2010/0718-stx-execpipe-0.7.0.blog</guid>
<pubDate>Sun, 18 Jul 2010 23:31:00 +0200</pubDate>
</item>
<item>
<title>Published stx-cbtreedb 0.7.0 - STX Constant B-Tree Database Template Classes</title>
<link>http://idlebox.net/2010/0414-stx-cbtreedb-0.7.0.blog</link>
<description>&#x3C;span style=&#x22;float: right; clear: right; margin: 0em 0em 1.5em 1.5em; font-size: 10pt; text-align: center&#x22;&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2010/stx-cbtreedb/&#x22;&#x3E;&#x3C;img src=&#x22;http://idlebox.net/2010/stx-cbtreedb/thumb.jpg&#x22; width=&#x22;300&#x22; height=&#x22;185&#x22; alt=&#x22;Drawing of cbtreedb tree index structure&#x22; /&#x3E;&#x3C;/a&#x3E;&#x3C;/span&#x3E;&#x3C;p&#x3E;Published yet another C++ template library using a B-tree. This time the solution is a disk-based read-only key-value mapping using a &#x22;packed, sequential&#x22; B-tree as index structure.&#x3C;/p&#x3E;

&#x3C;p&#x3E;All applications mapping a large number of constant, integral keys to string or data blobs can benefit from this library. The database structure is highly compact and contains self-verification checksums over both key and value areas.&#x3C;/p&#x3E;

&#x3C;p&#x3E;stx-cbtreedb is a direct contender with &#x3C;a class=&#x22;exp&#x22; href=&#x22;http://cr.yp.to/cdb.html&#x22;&#x3E;cdb&#x3C;/a&#x3E; and &#x3C;a class=&#x22;exp&#x22; href=&#x22;http://www.corpit.ru/mjt/tinycdb.html&#x22;&#x3E;tinycdb&#x3C;/a&#x3E;, which however are based on hash tables and do not retain key proximity. Compared to other full-fledged B-tree implementations like &#x3C;a class=&#x22;exp&#x22; href=&#x22;http://www.oracle.com/technology/products/berkeley-db/&#x22;&#x3E;BerkeleyDB&#x3C;/a&#x3E; or &#x3C;a class=&#x22;exp&#x22; href=&#x22;http://1978th.net/tokyocabinet/&#x22;&#x3E;TokyoCabinet&#x3C;/a&#x3E;, the stx-cbtreedb is very small, faster and the database files have much less overhead due to read-only optimizations.&#x3C;/p&#x3E;

&#x3C;p&#x3E;For more information and the source code see the &#x3C;a href=&#x22;http://idlebox.net/2010/stx-cbtreedb/&#x22;&#x3E;stx-cbtreedb web page&#x3C;/a&#x3E;.&#x3C;/p&#x3E;</description>
<guid isPermaLink="true">http://idlebox.net/2010/0414-stx-cbtreedb-0.7.0.blog</guid>
<pubDate>Wed, 14 Apr 2010 13:34:00 +0200</pubDate>
</item>
<item>
<title>New LibriVox Recording: &#x22;Double Take&#x22; by Richard Wilson</title>
<link>http://idlebox.net/2010/0201-librivox-Wilson-Double-Take/</link>
<description>&#x3C;span style=&#x22;float: right; clear: right; margin: 0em 0em 1.5em 1.5em; font-size: 10pt; text-align: center&#x22;&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2010/0201-librivox-Wilson-Double-Take/&#x22;&#x3E;&#x3C;img src=&#x22;http://idlebox.net/2010/0201-librivox-Wilson-Double-Take/thumb.jpg&#x22; width=&#x22;242&#x22; height=&#x22;375&#x22; alt=&#x22;Drawing from Double Take short story&#x22; /&#x3E;&#x3C;/a&#x3E;&#x3C;/span&#x3E;&#x3C;p&#x3E;My second &#x3C;a class=&#x22;exp&#x22; href=&#x22;http://www.librivox.org&#x22;&#x3E;LibriVox&#x3C;/a&#x3E; recording is finished! The basic idea behind &#x3C;a class=&#x22;exp&#x22; href=&#x22;http://www.librivox.org&#x22;&#x3E;LibriVox&#x3C;/a&#x3E; is to read public domain texts and to put the recordings back into the public domain. More about that on &#x3C;a href=&#x22;http://www.librivox.org&#x22;&#x3E;librivox.org&#x3C;/a&#x3E;.&#x3C;/p&#x3E;

&#x3C;p&#x3E;As with the last recording, my personal motivation is to practice my rusty English pronunciation. By reading and rereading the texts I believe my English will become more fluent and in the end also achieve better articulation.&#x3C;/p&#x3E;

&#x3C;p&#x3E;The second recording is &#x22;Double Take&#x22; by Richard Wilson, a science fiction short story &#x3C;a href=&#x22;http://www.gutenberg.org/etext/30063&#x22;&#x3E;available from Project Gutenberg&#x3C;/a&#x3E;. I have also made a quick LaTeX typesetted version of the Gutenberg etext for more comfortable reading and with slight corrections: &#x3C;a href=&#x22;http://idlebox.net/2010/0201-librivox-Wilson-Double-Take/doubletake_wilson_text.pdf&#x22;&#x3E;doubletake_wilson_text.pdf (369 KB)&#x3C;/a&#x3E;.&#x3C;/p&#x3E;

&#x3C;h2&#x3E;Story Summary / Teaser&#x3C;/h2&#x3E;

&#x3C;p&#x3E;Pacing through a high-speed spy adventure, young Paul Asher finds himself going around in circles -- very peculiar circles indeed!&#x3C;/p&#x3E;

&#x3C;h2&#x3E;Audio Recording - Runtime: 26:29&#x3C;/h2&#x3E;

&#x3C;p&#x3E;MP3 encoded with standard &#x3C;a class=&#x22;exp&#x22; href=&#x22;http://lame.sourceforge.net&#x22;&#x3E;lame&#x3C;/a&#x3E; VBR preset (obviously better/smaller than CBR 128 kbps)&#x3C;/p&#x3E;

&#x3C;p style=&#x22;text-align: center&#x22;&#x3E;&#x3C;a href=&#x22;http://idlebox.net/2010/0201-librivox-Wilson-Double-Take/doubletake_wilson_tb_vbr.mp3&#x22;&#x3E;doubletake_wilson_tb_vbr.mp3 (19.1 MB)&#x3C;/a&#x3E;&#x3C;/p&#x3E;

&#x3C;p style=&#x22;text-align: center&#x22;&#x3E;
  &#x3C;object type=&#x22;application/x-shockwave-flash&#x22; data=&#x22;/img/mp3player/maxi.swf&#x22; width=&#x22;400&#x22; height=&#x22;22&#x22;&#x3E;
    &#x3C;param name=&#x22;movie&#x22; value=&#x22;/img/mp3player/maxi.swf&#x22; /&#x3E;
    &#x3C;param name=&#x22;bgcolor&#x22; value=&#x22;#ffffff&#x22; /&#x3E;
    &#x3C;param name=&#x22;FlashVars&#x22; value=&#x22;mp3=/2010/0201-librivox-Wilson-Double-Take/doubletake_wilson_tb_vbr.mp3&#x26;amp;width=400&#x26;amp;height=22&#x22; /&#x3E;
  &#x3C;/object&#x3E;
&#x3C;/p&#x3E;

&#x3C;p&#x3E;The recording is now also available on &#x3C;a href=&#x22;http://www.archive.org/details/shortscificollection_33_0210_librivox&#x22;&#x3E;archive.org&#x3C;/a&#x3E; in the &#x3C;a href=&#x22;http://librivox.org/short-science-fiction-collection-033/&#x22;&#x3E;LibriVox Short Science Fiction Collection 033&#x3C;/a&#x3E;.&#x3C;/p&#x3E;</description>
<guid isPermaLink="true">http://idlebox.net/2010/0201-librivox-Wilson-Double-Take/</guid>
<pubDate>Mon, 01 Feb 2010 17:53:00 +0100</pubDate>
</item>
</channel>
</rss>
