Posts

First update to BogBat: the bog-basic template program

Image
Just over a year ago I posted about the first (v0.1.0) release of BogBat , a very simple template replacement program. I've finally got around releasing v0.2.0. This release simply fixes the problem identified in that first post, i.e. that the --help command wrote its output to stderr , and so couldn't be paged using the Windows more command. This was a problem since the help text is copious! Anyhow, help text, along with usage info and the output of the --version command, now get sent to stdout instead. At the same time I corrected / clarified some of that copious help text. And now Delphi 13.1 is the compiler of choice; and the deploy script is less annoying. ➣ Download the v0.2.0 release from GitHub .

Here's the promised v2.5.0 release of CompFileDate

Image
As I hinted in the previous post, another new release of my rather niche file date comparison utility has escaped into the wild. This one's v2.5.0. After releasing v2.4.0 I was browsing Delphi's RTL code that reads file dates and found that, when requesting the file creation date for Linux, the code actually returns the status changed date. After some research I found that most Linux file systems don't support the creation date and stat(2)  API calls doesn't provide it anyway. To fix this I added a new command option, for Linux only, to explicitly read the status changed date instead of using the misleading creation date option. I also greatly expanded the number of aliases for date types, mainly because I keep guessing the correct options (slightly) incorrectly. Having more aliases increases the likelihood of guessing correctly without having to RTFM.  Additional aliases for comparison operators were also added, including the ability to specify arithmetic operators as ...

Linux build of File Date Comparison Utility released.

Image
Hot on the heels of the release of v2.3.0 of CompFileDate , my file date comparison utility, comes v2.4.0. The main thing about this release is that I've managed to build a Linux version. That's a first for me. This release ends 30+ years of Windows only programming! There's a new script that creates debug builds for all OS targets, to save having to build them all separately from the IDE, but no other new functionality. You can see all the changes in this version's change log . 👉  Download v2.4.0 from GitHub And here we are, running on Ubuntu 22.04 LTS (on Windows 11 WSL2) Don't tell anyone, but there might just be a 2.5.0 release before too long, because I had an idea for a couple of new options just as I was pushing out this release. But then again, there might not. 

Release v2.3.0 of my File Date Comparison utility

Image
What a time I've had since Christmas: a mild cold, then a weird dose of flu followed by a nasty cold that I can't shake off. Marvellous way to start the year. Still, when I'm not well I often do a bit of coding to take my mind of things, so here's a new release of CompFileDate that compares file dates! It's very simple. It can compare either file creation or modification dates of two files using any of the <, <=, =, <>, > or >= operators. It returns 0 if the comparison fails, 1 if it succeeds and >= 100 on error. It can optionally follow Windows shortcuts (i.e. .lnk files). That's it. It's designed for use it batch files. The program is open source (MPL 2.0) with source available from the ddabapps/compfiledate repo on GitHub. You will also find installation and usage instructions in that repo's Docs/ReadMe.txt file and can read about this release's changes in CHANGELOG.md . 👉 Download v2.3.0 from GitHub

Finally there - BDiff v1.0.0 has been released

Image
Well, it's been a long haul to get this little diff and patch suite from v0.2.x to v1.0. 22 years and 2 days ago I released my first attempt at translating Stefan Reuther's bdiff / bpatch utilities from C to Pascal. Stefan's original code was first published in 1999. This was v0.2.1(pas). Then, 1 day short of 2½ years ago the first v1.0 beta was released. 1 year, 1 month and 1 week ago the release candidate was made available. In the related blog post I said I was almost there, "almost there" meaning "about a year away", obviously. And today, v1.0.0 has finally been let out into the wild. Slow and steady does it! What's the difference between the release candidate and the final release? Not much. There are no new features, just a bit of refactoring, extra error checking and a new test. I've moved over to compiling with Delphi 13 & tweaked the docs. If you're not sure what these utilities do, then read the man pages:  BDiff  /  BPatc...

System Information Unit v5.33.0 released

Image
Despite continually threatening to retire the  System Information Unit , here's an update The update was prompted by GitHub user weirdo12 who submitted a pull request that added $EXTERNALSYM compiler directives to make the code usable with C++ Builder. His code is included in this release. While adding the above code I decided I'd better update TPJOSInfo with details of all the changes to Windows 10 and 11 since the end of last year. The result of a very boring day poring over this year's Windows builds is that the class now detects Windows 11 version 25H2 and has provisional support for the previews of the forthcoming version 26H1 released so far. 🠊  Get the new version (5.33.0) from the  GitHub release page . The VCL & FMX versions of the demo program's have been updated to display info about Windows 11 25H2 and 26H1. So will this be the last release? I doubt it because I'm planning on doing a year end update and maybe a revision once Windows 11 26H1 is rel...

Code Snippets Collection Updated to v2.3.0

Image
Did I say that the previous post was the last concerning changes in response to the release of Delphi 13? Well I lied! I remembered that my  Code Snippets Collection  didn't have any information about whether snippets compiled with Delphi 13, so I've been through all 700+ of them and checked. All the results are now in the database. The collection specification docs needed to be updated as a result of adding this support, so that's been done too. And the version number got a minor version bump because of the change. In addition to that I discovered some other changes I'd made to the develop branch back in April, so these were rolled into this release too. There's a couple of new snippets, along with a whole bunch of new unit tests. For full details see the change log for v2.3.0 . ✅ Download release v2.3.0 from GitHub . To install it into CodeSnip , select the  Database | Install or Update DelphiDabbler Snippets Database  menu option and the resulting wizard guide...

CodeSnip 4.27.0 released with Delphi 13 support

Image
And finally ... after a few updates to reflect the release of Delphi 13 Florence , last but not least we have an update to CodeSnip . This program can test compile snippets with any Delphi compiler installed on the host computer, along with Free Pascal. But every time there's a new Delphi release CodeSnip has to be modified to be able to use it. I wish there was a config file to update, but it's not that simple with this ancient code base! So, CodeSnip 4.27.0 knows about the existence of Delphi 13, can use it for test compilation, can record the results of such compilations in its databases and can emit code that selectively turns warnings on and off for the compiler. That's the only new feature of this release. The docs and help file have been suitably updated. ➣  Download the v4.27.0 release from GitHub . BTW the first time you run this new version after installing Delphi 13, CodeSnip will notice and will offer to configure itself to use the new compiler, unless you'v...

Updated DUSE to load units from Delphi 13

Image
The second thing I did after the release of Delphi 13,  after updating my website , was to enable the unit-scope look-up program, DUSE , to create a new mapping of all the units used by Delphi 13 to their unit scopes. This is easy to do: Having clicked  OK  then Save And Close  DUSE will read the names of all library units installed with Delphi 13. A new "mapping" named Delphi 13 Florence is created and you can select it whenever you're using Delphi 13: You can switch to any other mappings you may have created at any time: you can see the ones I've made in the above image. ➣ Download DUSE v0.3.2 from GitHub For help using DUSE, see the mini-help section of the program's read-me file. By the way, the code in DUSE that finds a given Delphi installation is very similar to that discussed in my article  How to programatically detect installed versions of Delphi . And finally, I used Delphi 13 to compile this new version of DUSE.

Website updates following release of Delphi 13

Image
Now that Delphi 13 Florence is out, I've updated delphidabbler.com to bring relevant pages up to date. The changes are: The Delphi Version Numbers page has been updated with relevant information about Delphi 13. The most notable change is that the product version has now been brought into line with the compiler version, internal version and defined symbol. This means the product version has jumped from Delphi 12's version 29 to 37. The Delphi Version Features page has had numerous additions relating to features introduced in Delphi 13. If you know of any more please tell me by raising a new issue on GitHub (no C++ stuff though!). Article #27 (How to programatically detect installed versions of Delphi)  has been updated to include Delphi 13 in the list Delphi versions than can be detected. The notable change is that, due to the change in version numbering noted above, the registry key for Delphi 13 has changed similarly. For e.g. Delphi 12's key is  \Software\Embarcader...

New inline if statement slated for Delphi 13

The new feature currently planned for release in the forthcoming Delphi 13 that I'm most excited about is the inline if statement. According to Marco Cantu's blog post , the new syntax is like this: X := if Left < 100 then 22 else 45; Another use is something like this: ShowMessage(if Odd(X) then 'odd' else 'even'); The values returned from the then and else parts must be of the same or compatible type. Apart from being really chuffed that this feature is being added I'm just as happy that the syntax is Pascal like, and is therefore more readable than the cryptic C style ?: construct. Also pleasing is the fact that Embarcadero have gone with version number 13 instead of being ridiculously superstitious! Since Delphi 13 has yet to be released the usual disclaimer applies that this feature is not guaranteed to be included.

Delphi / C++ Builder CE License Issues Resolved

I just heard from Ian Barker @ Embarcadero that some Delphi and C++ Builder Community Edition users have been receiving messages that their CE license was expiring. Unfortunately, when they went to renew, they would get an unhelpful reply which didn't renew their license (and incorrectly mentioned a trial period). That issue should now be solved. If you've had that problem then hou should go to the relevant one of the following links which should let you successfully renew your CE license for another year: https://www.embarcadero.com/products/delphi/starter/free-download https://www.embarcadero.com/products/cbuilder/starter/free-download If you still have problems, please contact Embarcadero direct, not me! There's no news yet about when the next Community Edition will be released or what version of RAD Studio it will be based on. It's currently the equivalent to Delphi 12.1 / C++Builder 12.1.

New and very basic template replacement program released

Image
Yesterday the first release of my new console application, BogBat v0.1.0 was released. I wanted a program to replace templates (or placeholders) in a text file with values from a data file. I didn't need anything fancy such as loops, conditionals, built in text processing functions or white space control. Only simple replacement was needed. And the name, well it's the Bog Bas ic t emplate program. The reason I wanted this program was to help automate some program builds by automatically updating version numbers and dates in source files. To be honest I'd started writing this program in a private GitHub repo in 2023 and forgotten all about it. Upon stumbling across it the other day I decided to finish it and make the repo public. Anyhow, here it is. All the usual warnings about early release code apply: bugs likely, command line and functionality subject to change across v0.x releases. The program takes two input files, one containing the templated text and another contai...

Array Utilities Unit GitHub repo now public

Whoops! It's just been pointed out to me that the Array Utilities Unit I published yesterday isn't accessible because the GitHub repo is private. Thx Luca. I've now made it public . ➡️  Download the 1st release from GitHub Sorry about that

New Array Utilities Library Unit released

Image
Yesterday I added a shiny new unit to the DelphiDabbler Code Library - the Array Utilities Unit . It lives in the ddablib/arrayutils  repo on GitHub. This unit, named DelphiDabbler.Lib.ArrayUtils.pas ,   provides a single "Advanced" record, TArrayUtils , that contains static methods that perform common operations on generic arrays. There are numerous overloaded versions of many of the methods. Every method operates on a given generic array that is passed as a parameter, either as an array of T or a TArray<T> . The unit requires Delphi XE or later. It has been tested with Delphi XE and Delphi 12. The code depends only on the Delphi RTL, so it should work for any platform supported by Delphi and be both VCL and FireMonkey compatible. I've only tested Windows 32 bit and 64 bit targets. There are far too many methods to describe in here, but you can find them all listed and explained in the comprehensive  online documentation . As a taster you'll find Methods that ...

CodeSnip v4.26.0 released

Image
CodeSnip v4.26.0 has just been released. This release focusses mainly on adding more file formats when saving snippet information to file. You can now save such info in Plain Text, Markdown, HTML 5 & XHTML in addition to the existing Rich Text Format. The Help menu item that used to link to the CodeSnip blog now links here, as does any read-me file that links to the blog. There have been a few other changes and a minor bug fix which you can read about in the change log . ➤  Get v4.26.0 from GitHub

CodeSnip v4.25.0 released (includes a fix of a fix for a fix)

Image
It's nice to be able to release a version of  CodeSnip  containing new features instead of bug fixes. Except that this release also includes bug fixes, including episode 3 of the hibernation bug fix saga. So what's new? Not a lot except for some new snippet export options: For the longest time you've been able to get a copy on the clipboard all the information about a snippet that gets displayed in the detail pane. Now you can finally save the information directly to a file. The only option is Rich Text Format just now, but more formats may make an appearance later. When exporting Pascal units and annotated snippet source code various formats can be chosen. HTML 5 format export files has now joined the list or plain text, Pascal, RTF and XHTML Some annoying, but relatively trivial bugs have also been fixed. Go see the change log if you're curious. But I can't close this post without mentioning the hibernation bug fix saga. A third fix of the bug where CodeSnip somet...

Hotfix available: CodeSnip bug fix fix

Image
It had to happen didn't it? Not long after my  post about yesterday's bug fix  release of CodeSnip,  Oliver  reached out to point out a potential problem with the way I'd implemented it. See the linked post and comments if you're interested in the details. Suffice to say that the problem was sufficient for me to hunt for an alternative solution. Having found one I've rushed out hotfix v4.24.2 to patch yesterday's release (v4.24.1) and make it more robust. Whether or not you downloaded yesterday's you really should update CodeSnip to the hotfix release. ⮞  Get hotfix release v4.24.2 from GitHub . For more info please see the similar post on the CodeSnip Blog .

Apologies to Oliver for deleting comment re CodeSnip bug fix

This is just a quick post to apologise to Oliver  for accidentally deleting his very useful comment on yesterday's post about fixing a long running bug in CodeSnip. I've reinstated as much of his comment as I could glean from an email notification as a reply to the deleted comment. Suffice to say, I'm now fixing the CodeSnip fix as a result of the info Oliver provided! So thanks for your help Oliver - I appreciate it.

Long running bug fixed in CodeSnip v4.24.1

Image
This has been a  l o n g   time coming. For several years a nasty access violation bug has been lurking inside  CodeSnip . It crashed the program when the computer was resumed from hibernation, but only sometimes. Because the bug was intermittent and required numerous hibernation / resume cycles to be run before it finally cropped up it defied diagnosis for a long, long time. Until now. Or up until someone finds my fix doesn't work for them! ⮞  Get the fix from GitHub   EDIT: no, don't get it - I'm releasing a fix for the fix soon. See comments below. For an explanation of what was causing this little horror of a bug, see the longer post on the CodeSnip Blog .