Melbourne Meeting 16 May 2022

Graham Grieve will be presenting on

Writing Code for Delphi and Lazarus

When: 6:00 pm for a 6:15pm start.
Where: At the Melbourne Men’s Shed, and on Zoom.

1 Like

Reminder, it is this coming Monday.


1 Like

Melbourne ADUG is inviting you to a scheduled Zoom meeting.

Topic: ADUG Melbourne Meeting
Time: May 16, 2022 06:00 PM Canberra, Melbourne, Sydney

Join Zoom Meeting

Meeting ID: 832 3187 1620
Passcode: 155003
One tap mobile
+61280156011,83231871620#,*155003# Australia
+61370182005,83231871620#,*155003# Australia

Dial by your location
+61 2 8015 6011 Australia
+61 3 7018 2005 Australia
+61 7 3185 3730 Australia
+61 8 6119 3900 Australia
+61 8 7150 1149 Australia
+1 646 558 8656 US (New York)
+1 669 900 9128 US (San Jose)
+1 253 215 8782 US (Tacoma)
+1 301 715 8592 US (Washington DC)
+1 312 626 6799 US (Chicago)
+1 346 248 7799 US (Houston)
Meeting ID: 832 3187 1620
Passcode: 155003
Find your local number: Zoom International Dial-in Numbers - Zoom

Look forward to receiving the link shortly.

A random collection of Notes from the Melbourne Adug May Meeting 16/05/2022

Writing Code for Delphi and Lazarus by Graham Grieve

This was quite an interesting talk and corresponding discussion.

Some bits and pieces, hope it makes some sense :slight_smile:

Has a routine included as first thing in every unit (

It sets up assorted things based on if Delphi or FPC (and then which
architecture it was compiling for)

All the pascal code is setup for Delphi Mode in FPC.

Mostly the coding is done from a Delphi Programmers view.

There is an an interface unit, that provides replacement routines for
things used in Delphi that are not present in FPC (and a bit of visa

Iterating strings needs special handling, as strings in FPC are usually
AnsiStrings With UTF8 variable length encoding, where Delphi uses UTF16
(also a variable length) encoding.

There is an iteration routine which handed back a special Unicode
Character type. So it would read the number of bytes necessary for each
Unicode character from the UTF8 string. and (presumably) the 1 or 2
words needed for each Unicode character from the UTF16 string.

Discussed how packages in FPC/Lazarus were different to packages in Delphi.

Benefit of using an object (and descendants) that has a built in reference
count, and has container classes to handle them. So have less need to
keep track of ownership of objects.
(Smart Pointers?, ARC compiler??)

His Gui Programming has migrated completely to Lazarus. As it has cross
platform capabilities, which Delphi is only recently achieving. Main
targets Win64, Linux 64, MacOS 64

Using the trunk versions of FPC and Lazarus, and including some
ModeSwitches to enable beta features.

Some links

Generics a short discussion about how generics in delphi (and Lazarus)
don’t do covariance.

Part of which is. If you make a list, it’s fiddly to use the
list for SomeClassDescendant (Need to cast on putting in, and getting

The articles below have some information on this, and why it’s that way.

A TestInsight like tool for Lazarus Unit Testing

Compiler quite a bit slower, but can build packages in parallel using multiple cores.

Building a DevOps toolchain with Delphi, or FPC/FreePascal takes quite a
bit of work. (Malcolm Groves may also have something similar).

Licensing of Delphi in this role at this time is likely dubious.

When a commit to master on Github is attempted. The build system (On the
fly) creates a docker image with a (Microsoft) SQL server as well as My
SQL?, fpc compiler, required pascal packages, etc. and imports and
builds the source, and runs a bunch of unit tests. It also runs a bunch
of checks over the source. If everything is satisfactory, the commit can

This creation of docker image with all it’s supporting infrastructure
can occur many times in a day.

One test tests for inclusion of certain unicode characters
that cause text to be skipped/not shown, (so stuff can be hidden from
view in the source, but will be compiled)

Visual Studio Code
WinMerge for reviewing and fixing Conflicts.
Delphi AST

Some Misc Comments

Big and Slow like a Goods Train, but carries a lot, not fun.
Who feels love for a goods train?
(lots of train people? perhaps Java same…)
It will be around a long long time. (Think Cobol).

Good for Gui Programs, cf many other options.

Good, WPF released too early.

Thank You Grahame

1 Like

Hi Roger

Was the Melbourne meeting recorded?
Unfortunately I could not make but would love to listen to a recording.


Thanks for the summary @Roger_Plant Roger.

Maybe some DevOps talks would be suitable topics for meetings.

As Graham demonstrated, having automated processing for building and testing makes for more reliability with little extra effort (once the processes are set up).

1 Like

Yes, I am not sure where/how recordings are accessed.
(You could perhaps ask Geoff)

At the meeting I said that we could meet at the Chelsea Hotel on the Nepean Highway to watch the symposium.
I was wrong, :blush:, it is the Chelsea Heights Hotel, on the corner of Springvale Rd and Wells Rd. The venue is only a short taxi ride from the Edithvale and Chelsea Stations. More on getting there will be posted on our website.

Sue. I understand that there will be a restricted number of attendees at that venue.

Please add me to your short list.

Will do.

We are opening it up to more people, as there was more interest when I mentioned it than expected. See announcement in the Symposium topic.

Springvale Rd and Wells Rd??

Yes, another oops!

Changed the post, and thanks!

Hi Sue

I haven’t seen any emails regarding the symposium for some time and have
missed the last couple of meetings.

Would you please indicate if I can apply to attend you and when the
early bird applications close


The registrations page is being done now. There are no early birds this year. Emails will start tomorrow.

There is info on the ADUG website, though details still being added.

Thanks Sue

I thought the invites were out - sorry to hassle you.


Thanks Geoff

Have downloaded the file - will try and have a look tomorrow.
Thanks for your assistance.


@GrahameDGrieve … reported on fb today …

FPC now supports Anonymous Functions and Function References! [,59468.0.html](Feature announcement: Function References and Anonymous Functions