For a long time now, I have wanted an easy way to generate class relationship diagrams for my (far too many) hobby projects. I have created an application that looks at my source code – using the Syntax API in…
My MOOC site now uses bootstrap
I have rewritten the site where I list the online courses that I have taken, and it now has a more modern feel to it. It is now possible to sort the courses by name or date, and to filter…
Getting by without loops
In functional languages, there are typically no loops – there is no way to write a for, while or repeat expression. There are basically two ways to implement what in an imperative lanugage would require loops. The first one is…
Iterating over a sequence using “for .. in”
The for .. in construct was added to Delphi 2005 and allows you to iterate over arrays, lists and other container objects. In this article I will show you how to implement a class that provides this capacity. I will…
Creating a quiz web application in Delphi, part 3
The easiest way to implement an HTTP server is to drop a TIdHTTPServer component (part of the Indy package, included with Delphi) onto a form or data module, create a handler for its OnCommandGet event (which strikes when a client…
Creating a quiz web application in Delphi, part 2
In a traditional desktop application, the application holds its own data and that data is available whenever we need to present it to the user. In a web application, the data is stored on the web server and the client…
Creating a quiz web application in Delphi, part 1
While surfing the net the other day, I stumbled across a quiz that I decided to take. You know the kind – you are asked a question and you may choose one of typically four alternative answers. After a specific…
An introduction to NexusDB
The other day, I did a presentation of NexusDB for my friends in the Göteborg Delphi Meetup Group. After an initial discussion about the history of the database and some comments on the pricing, all of which you can find…
Project 1: Building the parse tree
Now that we have finished our tokenizer, we will look at the second task: building the parse tree. Once we have that, we can ask the tree if a set of strings are a valid match or not. More precisely,…
Project 1: Tokenization
Our tokenizer will perform one task – it will take a sequence of characters and emit a sequence of tokens. We will build it using an input stream from which the source characters are fetched, and then implement specific methods…