April, 2009

Zoocamp — Barcamp in the Antwerp Zoo

Will I be attending Zoocamp?
[Zoocamp -- 23/05/2009]

Hell yeah!

Thanks to @filipb for organising!

Posted in Life, the Universe, and Everything   No Comments »

Passing Command Line Arguments to a LaTeX Document


( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105
Call Stack
#TimeMemoryFunctionLocation
10.000152980{main}( )../index.php:0
20.000256420require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' )../index.php:17
30.144213869208require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' )../wp-blog-header.php:16
40.145213937380include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/archive.php' )../template-loader.php:52
50.177014029704the_content( )../archive.php:35
60.177414031476apply_filters( )../post-template.php:167
70.180614035916call_user_func_array ( )../plugin.php:166
80.180614036100vim_color( )../plugin.php:0
90.180614036436preg_replace ( )../wp-vimcolor.php:143
100.180614042656preg_replace ( )../wp-vimcolor.php:143
110.180614042860vimcolor_process_color( )../wp-vimcolor.php(143) : regexp code:6
120.190314059160fread ( )../wp-vimcolor.php:105

( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105
Call Stack
#TimeMemoryFunctionLocation
10.000152980{main}( )../index.php:0
20.000256420require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' )../index.php:17
30.144213869208require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' )../wp-blog-header.php:16
40.145213937380include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/archive.php' )../template-loader.php:52
50.177014029704the_content( )../archive.php:35
60.177414031476apply_filters( )../post-template.php:167
70.180614035916call_user_func_array ( )../plugin.php:166
80.180614036100vim_color( )../plugin.php:0
90.180614036436preg_replace ( )../wp-vimcolor.php:143
100.191114057116preg_replace ( )../wp-vimcolor.php:143
110.191114057260vimcolor_process_color( )../wp-vimcolor.php(143) : regexp code:1
120.196014058680fread ( )../wp-vimcolor.php:105

( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105
Call Stack
#TimeMemoryFunctionLocation
10.000152980{main}( )../index.php:0
20.000256420require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' )../index.php:17
30.144213869208require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' )../wp-blog-header.php:16
40.145213937380include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/archive.php' )../template-loader.php:52
50.177014029704the_content( )../archive.php:35
60.177414031476apply_filters( )../post-template.php:167
70.180614035916call_user_func_array ( )../plugin.php:166
80.180614036100vim_color( )../plugin.php:0
90.180614036436preg_replace ( )../wp-vimcolor.php:143
100.196414057124preg_replace ( )../wp-vimcolor.php:143
110.196414057272vimcolor_process_color( )../wp-vimcolor.php(143) : regexp code:1
120.200514058696fread ( )../wp-vimcolor.php:105

( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105
Call Stack
#TimeMemoryFunctionLocation
10.000152980{main}( )../index.php:0
20.000256420require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' )../index.php:17
30.144213869208require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' )../wp-blog-header.php:16
40.145213937380include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/archive.php' )../template-loader.php:52
50.177014029704the_content( )../archive.php:35
60.177414031476apply_filters( )../post-template.php:167
70.180614035916call_user_func_array ( )../plugin.php:166
80.180614036100vim_color( )../plugin.php:0
90.180614036436preg_replace ( )../wp-vimcolor.php:143
100.201014057456preg_replace ( )../wp-vimcolor.php:143
110.201014057672vimcolor_process_color( )../wp-vimcolor.php(143) : regexp code:3
120.205214059496fread ( )../wp-vimcolor.php:105

( ! ) Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/bbbart/www/htdocs/blog/wp-content/plugins/vimcolor/wp-vimcolor.php on line 105
Call Stack
#TimeMemoryFunctionLocation
10.000152980{main}( )../index.php:0
20.000256420require( '/home/bbbart/www/htdocs/blog/wp-blog-header.php' )../index.php:17
30.144213869208require_once( '/home/bbbart/www/htdocs/blog/wp-includes/template-loader.php' )../wp-blog-header.php:16
40.145213937380include( '/home/bbbart/www/htdocs/blog/wp-content/themes/svelt/archive.php' )../template-loader.php:52
50.177014029704the_content( )../archive.php:35
60.177414031476apply_filters( )../post-template.php:167
70.180614035916call_user_func_array ( )../plugin.php:166
80.180614036100vim_color( )../plugin.php:0
90.180614036436preg_replace ( )../wp-vimcolor.php:143
100.205514057404preg_replace ( )../wp-vimcolor.php:143
110.205514057548vimcolor_process_color( )../wp-vimcolor.php(143) : regexp code:1
120.209514058968fread ( )../wp-vimcolor.php:105

Some time ago, someone asked me if I knew a way to pass command line arguments to LaTeX documents. My first response was that this ought to be impossible; being a compiler, LaTeX cannot in any way alter it’s input files. But command line parameters can alter the output without touching the input of course.

This has kept me thinking for a while, and at the end I came up with some kind of a solution.

Let’s take a simple LaTeX file:

and call it .

We will define the output of as a command line parameter at LaTeX invocation, as follows:

Result: containing the text “hello world”. Admitted, it’s not the easiest solution, but it does make LaTeX useful inside simple batch jobs!

For more advanced LaTeX templating, I advise using Perl and Text::Template.

Posted in Open Source Adventures, scripting   No Comments »

Explaining Open Source to computer illiterates

Yesterday I was invited as a guest speaker at Foras (Forum voor Academici uit Schoten). Foras is a monthly meetup of academics somehow related to Schoten. Every month, a speaker is invited to talk about a general topic of interest. Overseeing the list of the past 25 years, I found a lot of interesting topic and speakers. Being part of this list now honestly humbles me. A big thanks to Foras for inviting me.

I have been giving talks about Open Source (and other topics) here and there for quite some time now, but this was the first time my audience had an average age of over 50, was mainly computer illiterate, but highly educated.

Here are the slides I used for the presentation. I usually present without slides, or with only very few. This time I opted for a fully slide-supported presentation:

However unacquainted the audience with the topic, the questions and discussion afterwards were very much in line with what one would expect:

  • What about the quality assurance of Open Source software?
  • If it was all so straightforward, then why isn’t the world convinced yet?
  • Can one use Open Source software together with proprietary software?

In the future I should address these elements in the presentation itself. Frametitle could be “Open Source Myths” or so. :-)

One thing surprised me a lot. In my presentation I never mention Microsoft. Still, people afterwards were constantly asking my opinion about their practices. Interesting how clear it was for them Microsoft does not have a place in the picture I hung up about Open Source.

I can recommend everyone giving a presentation about their favourite topic to an audience with no prejudices or even knowledge about your subject. It’s an eye-opener!

Posted in Open Source Adventures   No Comments »