Foundation · Libraries · Uncategorized

A YAML Library for Delphi

YAML has become a quite popular human-readable data serialization language. Unfortunately, there aren’t many Delphi libraries that provide tools for it. I hope to fill this void with Neslib.Yaml, a personal project build on top of LibYaml that provides support for parsing and generating YAML documents and streams. LibYaml Bindings Neslib.Yaml uses LibYaml to perform… Continue reading A YAML Library for Delphi

Foundation · Optimization · Tips & Tricks · Uncategorized

Allocation-Free Collections

Say you have a method that creates a temporary list to gather some data. You calculate some statistics based on that data and then you destroy the list again. You call this method a lot, resulting in lots of memory allocations and deallocations and increased memory fragmentation. In addition, all this memory management takes time… Continue reading Allocation-Free Collections

Communications · Tips & Tricks · Uncategorized

iOS and macOS App Extensions with Delphi

In this article we are going to cover how to package iOS and macOS Application Extensions with your Delphi developed iOS and macOS application and interact with the Application Extension from Delphi using the Application Groups API. Introduction There are numerous features on iOS and the Mac that are only available using Application Extensions. App… Continue reading iOS and macOS App Extensions with Delphi

Optimization · Tips & Tricks · Uncategorized

Inline Variables can increase performance

Delphi 10.3 Rio will add inline variables to the language. Besides the various benefits mentioned in Marco’s blog post that introduces the concept, inline variables can potentially improve performance of your code. It’s all about scope If you have been reading my articles, then you may know that I am a sucker for performance. That’s… Continue reading Inline Variables can increase performance

Foundation · Libraries · Uncategorized

Query JSON documents with JSONPath

We have extended our JSON and BSON library with functionality to query JSON documents using an XPath-like query language called JSONPath. About JSONPath JSONPath is to JSON what XPath is to XML. It enables you to search for data in a JSON document using a simple query language somewhat similar to XPath. Although there is… Continue reading Query JSON documents with JSONPath

Libraries · Tips & Tricks · Uncategorized

Chet – A C Header Translator powered by Clang

In my previous post on libclang for Delphi, I mentioned an obvious use case for libclang: to build a (better) C-to-Pascal header converter. I also suggested I may provide such a tool in the future. Well, the future is here and I put my money where my mouth is. The result is Chet, a sort of… Continue reading Chet – A C Header Translator powered by Clang

Foundation · Tips & Tricks · Uncategorized

Using Apple’s Grand Central Dispatch and Android’s ScheduledThreadPoolExecutor for Delphi timers

You are probably already familiar with the NSTimer on iOS/macOS and JTimer on Android for timer events. In addition to the basic timers, most operating systems offer a more advanced threaded schedule event API. On Android there is the ScheduledThreadPoolExecutor which allows you to launch a Runnable at a specific time period. On iOS/macOS the… Continue reading Using Apple’s Grand Central Dispatch and Android’s ScheduledThreadPoolExecutor for Delphi timers

Libraries · Uncategorized

JavaScripting with Duktape for Delphi

Looking to add JavaScript capabilities to you app, but without the bulk and overhead of JIT engines like V8, SpiderMonkey and Chakra? Then take a look at Duktape. Duktape is a lightweight, embeddable and cross-platform JavaScript engine. It fits into a DLL just over half a megabyte in size but supports the complete ECMAScript 5.1… Continue reading JavaScripting with Duktape for Delphi