Thursday, December 30, 2010

Moshe Zimmermann - Wikipedia, the free encyclopedia

Moshe Zimmermann - Wikipedia, the free encyclopedia

Being interview on the radio (Deutschlandfunk) Zimmermann (an Israeli historian and publicist) just made a statement on his former student Moshe Katsav, Israel's former, 8th president, who was convicted of rape today.

Tuesday, December 28, 2010

diff XML documents

What's the Diff? Diff XML Documents

I just tried that IBM Java utility on the command line of a Linux system. Not bad.
I only tried it on a rather simple example, where I removed a single element.
Looks like you better run the command twice, with permuted arguments.

Facebook Chat – connect your client

Facebook Chat

Facebook chat, Jabber, XMPP

Integrating with Facebook Chat - Facebook developers

Monday, December 27, 2010

writing procmail rules querying Return-Path

I prefer writing procmail rules querying Return-Path instead of From.

The Return-Path header field gets faked rather rarely as opposed to the From header field, it's far more often machine generated, that's why I regard it more reliable.

Today I found myself in a situation, where the Return-Path header field looked differently after my usual fetchmail+procmail execution chain. I didn't recognize that from the beginning. I tried hard for a couple of hours matching the "original" Return-Path, but I did not succeed. Only after I recognized the difference and turned my interest towards the "new" Return-Path, I immediately succeeded creating another nice procmail rule for that message resp. for messages from that sender.

I still cannot explain myself, why and how Return-Path gets changed, but now I know and respect it does.

Tuesday, December 14, 2010

"aligning text in programs is ASCII art"

I love indenting and aligning, I love structuring, be it in tables or in data structures.
The human mind enjoys and rewards structure.
Some people don't understand that and punish others' credo with arrogant disrespect.

I currently associate this kind of intolerant mentality with the Python community. I hope some Python disciples will prove me wrong sooner or later.

Saturday, December 11, 2010

book: Programming Groovy

The Pragmatic Bookshelf | Programming Groovy

From the wikipedia article on Groovy:
Most Java code is also syntactically valid Groovy. […]

In July 2009, Strachan wrote on his blog that "I can honestly say if someone had shown me the Programming in Scala book by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I'd probably have never created Groovy."[1] Strachan left the project silently long before the Groovy 1.0 release in 2007.
Maybe I better focus on Scala than on Groovy.

Update 2011-07-01:
Purchased it as a used book through Amazon.de.

The Pragmatic Bookshelf | Programming Scala

The Pragmatic Bookshelf | Programming Scala

book: Programming Clojure

The Pragmatic Bookshelf | Programming Clojure

Lisp on the JVM – maybe a nice idea.

Update 2011-08-07
Found a Clojure User Group Berlin.
Order the book through Amazon as used book, but with Amazon Prime service.

Friday, December 10, 2010

CAM::PDF - PDF manipulation library by "Clotho Advanced Media"

CAM::PDF - search.cpan.org

I am currently into PDF "reading", and this software looks rather promising.

There are also a couple of nice command line utilities in the TAR ball's bin/ subdirectory.
  • appendpdf.pl
  • asciify
  • changepagestring.pl
  • changepdfstring.pl
  • changerefkeys.pl
  • crunchjpg_tmpl.pdf
  • crunchjpgs.pl
  • deillustrate.pl
  • deletepdfpage.pl
  • extractallimages.pl
  • extractjpgs.pl
  • fillpdffields.pl
  • getpdffontobject.pl
  • getpdfpage.pl
  • getpdfpageobject.pl
  • getpdftext.pl
  • listfonts.pl
  • listimages.pl
  • listpdffields.pl – sic!!! – I adapted that a little, now it shows page num. (with a little extra help from Chris Dolan) and the position for each field
  • pdfinfo.pl
  • readpdf.pl – shows you the PDF data structure as perl data dump
  • renderpdf.pl
  • replacepdfobj.pl
  • revertpdf.pl
  • rewritepdf.pl
  • setpdfbackground.pl
  • setpdfpage.pl
  • stamppdf.pl
  • uninlinepdfimages.pl
Of course, they all use /usr/bin/perl and not /usr/local/perlbrew/bin/perl, and I am currently still into perlbrew., so how would I replace all these occurrences?
That reminded me of that fixin utility from the very old days, which updates the #! ("shebang") line appropriately.

form fields in PDF – how to retrieve their details?

This command line shows you a few details:

$ pdftk … dump_data_fields

Not enough details for me.

What about CAM::PDF?
It comes with a couple of nice sample utilities (the bin/ subdirectory), one of them is called listpdffields.pl . It also does not show me enough details, but I think I will enhance that one.

Update / 2010-12-11:
Yes, CAM::PDF works very well for me. I wrote another article on that.

App::perlbrew : the man page and "perlbrew list"

The man page makes you think, there is a "perlbrew list", and older versions didn't have it. Older versions had a "perlbrew installed" instead. Quite a good reason to upgrade you perlbrew.

Thursday, December 9, 2010

editing JRXML in emacs using nxml-mode

Just created an RELAG-NG ("compact") grammar for editing JRXML files.

I used trang for that, and the "input module" was a sample JRXML file. Yes, that means: occasionally some JRXML file will have tags or attributes, that my jasperreport.rnc does not know yet. But then re-running trang on an additional sample file is not really a big job.

I really love editing XML.

I re-ordered and "grouped" the XML pieces for the elements in my sample reports. That helps to clean up some things, that got a little messy over the time. In the end you recognize, how much duplicate code you have.

You may want to fight the redundancy problems through JRXML subreports.
I actually made my JRXML a "here document" for a shell script. A couple of hours later I knew, that a perl script is the better approach. Another couple of hours later there were plenty little parameterized "here documents". I have solved my redundancy problem here through "looping over lists of configurations".

Wednesday, December 8, 2010

building pdftk-1.44 on opensuse-11.3

I just succeeded building the current pdftk using Makefile.Redhat with no modifications at all.

Precondition: have the GCJ RPM-s and the fastjar RPM installed.

I tried hard to ignore all the warnings regarding the Java source code.