Communications · Foundation · Tips & Tricks · Uncategorized

Delphi’s 27th anniversary! Startup settings and parameters revisited

This week is Delphi’s 27th anniversary and the team here at Grijjy is excited about all the great things that have happened over the past year in the Delphi world. Just seeing the thousands of attendees this week for the Delphi 27th webinar was amazing, but we can really feel the growing momentum in the… Continue reading Delphi’s 27th anniversary! Startup settings and parameters revisited

Foundation · Libraries · Tips & Tricks · Uncategorized

Build your own Error Reporter – Part 3: macOS Intel

A while ago, I started a small series about trapping exceptions and turning them into an error report for consumption by your development team. This enables you to get information about errors that happen out “in the field”. The first part focused on the iOS platform and the second part on Android. In this part… Continue reading Build your own Error Reporter – Part 3: macOS Intel

Foundation · Patterns · Tips & Tricks · Uncategorized

Custom Managed Records for Smart Pointers

In this 3rd part in (what turns out to be) a series about Custom Managed Records, we take a look at how they can be used to create smart pointers. About Smart Pointers But first we have to get some terminology straight. Smart Pointers is an umbrella term behind different technologies for making it easier… Continue reading Custom Managed Records for Smart Pointers

Communications · Foundation · Libraries · Uncategorized

Using OpenSSL 1.1.1 with all Delphi target platforms

In this article we are going to discuss how to use the latest version of OpenSsl 1.1.1 with Delphi directly to create X.509 certificates, decode, verify, encode and sign JSON Web Tokens and generate random data. Additionally we will do this in a way that works on Delphi supported platforms including Windows, macOS, iOS, Android… Continue reading Using OpenSSL 1.1.1 with all Delphi target platforms

Foundation · Patterns · Tips & Tricks · Uncategorized

Automate Restorable Operations with Custom Managed Records

There are those common try..finally blocks that you write over and over again. For example entering and leaving a critical section to protect resources from multiple threads, or calling BeginUpdate and EndUpdate to efficiently bulk-update a FireMonkey control. These kinds of “restorable” operations can be automated with the new Custom Managed Records feature introduced in… Continue reading Automate Restorable Operations with Custom Managed Records

Foundation · Libraries · Tips & Tricks · Uncategorized

Using Static Libraries and Assembly with 64-bit macOS

We show how you can use Delphi’s new 64-bit macOS compiler toolchain to link 3rd party static libraries and your own assembly code. We also look into some common linking errors you may run into and how to fix them. LLVM based Compiler and Linker Like all recent Delphi compilers, the new Delphi compiler for… Continue reading Using Static Libraries and Assembly with 64-bit macOS

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

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

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