RSSAmplifier

Blog

Posts

Life Happens, Programs Don't - Musings About Programming and Software Engineering

gettalong.orgRSS feed ↗19 posts

Latest posts

10 Years of HexaPDF

I have been implementing HexaPDF for the last 10 years now and just released version 1.0.0 . It all started due to missing features in an existing library (like with kramdown and so many other things) and an odd desire to implement a largish specification from scratch. Little did I know what that would entail… The Beginnings (around September 2013) It all started when I was creating a website…

Benchmarking Ruby 2.6 to 3.2

It’s this time of the year again where Ruby is released and everyone asks: Is it faster? You will find out below! And if you are interested, you can compare the results to the previous installations of this post for the years 2016 , 2017 , 2020 and 2021 . This christmas Ruby 3.2.0 was released, featuring improvements across the board. The YJIT just in time compiler has been ported to Rust and can…

Benchmarking Ruby 2.5 to 3.1

This is another Ruby comparison benchmark, in the tradition of 2016 , 2017 and 2020 . This christmas Ruby 3.1.0 was released, featuring the brand-new YJIT just in time compiler. Pre-liminary benchmarks showed noticeable performance benefits for HexaPDF , so let’s see what the final version brings. The Benchmark Setup I will be using the same applications/libraries as last time (look there if you…

An Unusual Performance Optimization

I regularly run the HexaPDF benchmarks to make sure that HexaPDF gets faster and not slower. One of the benchmarks, the “raw_text” benchmark, always had me wondering why using TrueType fonts was visibly slower. So I decided to investigate. The Odd Benchmark Result The “raw_text” benchmarks tests the performance of close-to-metal text output. This is important because it is the limiting factor when…

Benchmarking Ruby 2.4 to 3.0

I ran some benchmarks using HexaPDF after Ruby 2.4 was released in 2016 and again after Ruby 2.5 was releasd in 2017 . Since Ruby 3.0.0 was released this Christmas, I think this warrants another round of benchmarks. And this time three different real-world benchmarks are used to evaluate relative Ruby performance. Three Real-world Benchmarks The last two times I just used HexaPDF to evaluate the…

On maintaining webgen

My static website generator webgen has been around for a long time. Though there are now many other static website generators written in Ruby, I still maintain webgen because some of its functionality is unique. Development of webgen started 16 years ago, back in 2003 because I needed a tool for creating my personal website. From there it grew into a full-blown static website generator over the…

kramdown 2.0 and beyond

The kramdown project has become an umbrella project for many parsers, converters, math engines, … It is time to split things apart to make them more manageable and have faster release cycles. Once kramdown was really a pure-Ruby Markdown-superset conversion library. Nowadays, it includes many extensions that rely on Ruby gems with C extensions or even on other programming languages like NodeJS.…

Privacy Enhancements

The European Union’s General Data Protection Regulation (GDPR) will be enforced from May 25th forward. In the light of this I adjusted some things on *.gettalong.org websites. Update 2018-06-13 No External Resources I have never used many external resources but now even those few are gone. This means: Fonts that were previously hosted by Google Fonts are now locally hosted. So Google won’t get any…

Ruby 2.5 Is Out - Let's Benchmark

Ruby’s performance is getting better and better with each release and the newly released 2.5.0 version is no different. Before the release of Ruby 2.4 last year I benchmarked Ruby 2.3.3p222 and 2.4.0preview3 and was pleasantly surprised. Since the release notes of Ruby 2.5 highlight some performance improvements I ran another benchmark. This time I benchmarked Ruby 2.3.6, 2.4.3 and 2.5.0 on all…

Memory Conscious Programming in Ruby

When programming in Ruby many people think that egregious memory usage is the norm and unavoidable. However, there are ways and strategies to keep memory usage down and in this post I will show you some of them. Keeping Ruby’s Internals in Mind Ruby’s main built-in classes like TrueClass , FalseClass , NilClass , Integer , Float , Symbol , String , Array , Hash and Struct are highly optimized in…

PDF Filter Implementation in HexaPDF Using Fibers

In the previous post about HexaPDF I introduced the basic PDF object system. This post will focus on one of the available object types, PDF streams and their filters. If you are already familiar with the basics of PDF streams and filters, jump down to the section about their implementation in HexaPDF. PDF Streams As described in the previous post, a PDF stream represents a potentially unlimited…

Animated Turtle Graphics using PDF

After seeing one of Jamis Buck’s weekly programming challenges being the implementation of a turtle graphics system, I decided to tackle this one using HexaPDF as backend. First I will introduce the basics of turtle graphics. Then I will show you how a simple implementation using HexaPDF looks like and some examples. After that it’s show time - (ab)using the presentation capabilities of PDF to…

Ruby 2.4 Performance Looking Good

There are some articles highlighting new features of the upcoming Ruby 2.4. I decided to run a basic benchmark comparing Ruby 2.4 to Ruby 2.3.3 and was pleasantly surprised. A few weeks ago I wrote about HexaPDF’s performance by running a benchmark that compares HexaPDF to various other tools in regards to optimizing the size of a PDF file. However, with this real-world benchmark I cannot only…

PDF Object Representation in HexaPDF

To work with PDFs using a library means that you need to understand at least the part of the PDF specification that is about the PDF object system. This post will introduce this part and then look at how HexaPDF implements it. The PDF File Format - A Short Introduction If you look at a PDF file using a text editor (e.g. vi -b ) you will find ASCII text intermingled with binary data . The reason…

HexaPDF Performance Benchmark

My pure Ruby PDF library HexaPDF contains an application for working with PDFs. In this post I look at how this application performs in comparison to other such applications. About PDF Optimization Although the hexapdf application can perform various commands, for example displaying information about a PDF file, modifying a PDF file or extracting files from a PDF file, I will concentrate on the…

HexaPDF Code and First Version Released

As of today the HexaPDF source code is available on Github and the first version has been released . HexaPDF is a pure Ruby library with an accompanying application for working with PDF files. In short, it allows creating new PDF files, manipulating existing PDF files, merging multiple PDF files into one, extracting meta information, text, images and files from PDF files, securing PDF files by…

On HexaPDF and Releasing Early

After my lightning talk about HexaPDF at Euruko 2016 I was asked why I haven’t released the source code to HexaPDF, yet. I have my reasons and in this post I will shed some light on them. Why Releasing Early is Good Many open source developers put their code online at very early stages of development in the hope that others are interested and contribute in one way or another. For example, this was…

Static Websites with webgen

The static website generator webgen has been in development for over a decade now. It provides the essential functionalities out of the box and is easy to use, even for non-programmers. Designed to be a general purpose static website generator it can be used for any kind of website, not just blogs. In this post I will show you how to create a basic website with webgen. First Steps As with most…

A Blog at Last

I never really started blogging all these years although I developed a static website generator and a Markdown converter ages ago. Don’t know why really… probably thought that I wouldn’t find the time to actually post something. But now is always a better time to start than never, isn’t it? :-) What will I blog about? Since I’m programming in my spare time I will write about programming and…