Category Archives: Uncategorized

Profiling F Sharp Code for Speed

I wrote earlier about profiling F# code for memory usage. I’ve been looking at products for profiling speed, and have settled on JetBrains dotTrace for the forthcoming .NET release of our PDF tools. Here are a couple of screenshots profiling … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

PDF Command Line Tools 1.3 and CamlPDF Progress

PDF Command Line Tools 1.3 now out, with new features for fonts, better splitting by bookmark, and dozens of smaller improvements. There will be a new release of CamlPDF in the next few months. It will be somewhat backward-incompatible due … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Building Cpdf into a .NET library – progress

I’ve been turning our cpdf PDF command line tools into a .NET DLL by cross-compiling it with F#. Here are a couple of screenshots of editing code using the library in C#. And here are a couple of screenshots of … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

On the Use of non-Tail-Recursive Functions In Commercial Code

Dear Customer, Attached is the software for which you paid several hundred pounds. It should work. Maybe on larger inputs it will fail. Sometimes several small parts of it will work, but when you put them together it will fail. … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

New Reviews of Old Books #57

Digital Typography, Donald E. Knuth, 1999 (Amazon) This collection of more than thirty articles and notes covering the Knuth’s foray into digital type in the late seventies and eighties. They range from font design (a whole chapter on the shape … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Compiling Code Under OCaml and F# (Part Two)

[Part One] Twenty thousand lines of CamlPDF and cpdf later, here are some numbers: Occasions on which conditional compilation is required: 22 Compilation warnings with fsc –no-warn 62: 15 Time taken: 22 hours The current executable appears to be about … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Books for the PDF Programmer

1200 pages of specification, referencing about fifty other documents. Not complete, not even self-consistent, but essential. One of O’Reilly’s Hacks series – a little book about generating, manipulating, annotating, and consuming PDF information. Lots of stuff which doesn’t need Acrobat, … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Compiling code under OCaml and F#

I spent a couple of afternoons last week beginning to compile our CamlPDF library under F#, with the intention of making our PDF Command Line Tools available as a .NET library. CamlPDF + the command line suite is about 20000 … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

PDF Command Line Tools 1.1

I’ve just uploaded the new version of our tools for merging, splitting, annotating, encrypting and stamping PDF files┬áhere. New features: -blacklines and -blackfills (Blacken lines and fills) -idir (Add whole directory of files) -scale-to-fit (Scale pages to fit a given … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Storing Colours in 31 bits (Part 2)

Jean-Baptiste Rouquier rose to the challenge in my last post: to provide a fast way of storing premultiplied colours in OCaml’s 31bit integers (see his post here). With his kind permission, I’ve included this code (somewhat optimized) in the Colour … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment