Posts

Showing posts with the label Delphi

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...

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.

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 .

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 .

Version Information Editor v2.17.0 released

Image
Here we go again. I've found another repo with some outstanding issues and part completed code. So once again things have been finished off and the result is the release of Version Information Editor (VIEd) v2.17.0. The release is pretty much a tidying up exercise. The code, like me, is old and not pretty. So too make it less embarrassing there's a lot of refactoring been done. Some dialogue boxes have been tarted up too. The only reason that this release gets a minor version bump instead being a patch of v2.16 is that a new -open command line option has been added to open the program with a specified file already loaded. For a list of changes see the change log . ➤ Download this release from GitHub . Here's an image showing the  -open  command being used to start VIEd with its own version information file loaded.

Pascal Highlighter v2.4.0 released

Image
As part of my current manic programming streak, I've been poking around in some of my neglected repos (I really do have too many). I noticed that last year I'd been doing some work on PasHi  , my Pascal source code highlighter console app, but had never finished it. So I finished it, and the result is this v2.4.0 release. A few more command line options have been added and one bug has been fixed. A couple of command line parameters were deprecated. I won't list the changes here. Go look at the change log if you're interested. PasHi comes with an installer that gives the option to a install a GUI front end if you want it. That is PasHiGUI. It interfaces with PasHi to save you having to go anywhere near the command line. PasHiGUI is pictured below ⮞ Get the download from GitHub .

The Garbage Program hits v0.5

Image
My busy streak of programming continues! v0.5.0 of GBG , my little utility that creates files filled with pseudo-random bytes of  G ar b a g e, is now available. Previous releases would fill up a 10MiB buffer of random stuff and then repeatedly output that until a file of the required size had been generated. So, for files smaller than 10MiB all the data was random but for larger files the data did eventually repeat. It struck me that having repeated data could be useful, but only if there was some control over the length of the repeated blocks. Conversely having a file of entirely random data may also be handy. So, I've added a new command line option with which a repeating block size can be specified. For e.g. to create 100 byte random block you would pass the -r:100 option to the program. To get a file that is full of entirely random bytes you can use -r:all . Now, when generating large files in can be tedious typing in long numbers of bytes and having to calculate (or remember...

Released v0.2.0 of the Fractions unit

Image
What I hope is the last v0.x release of my Fractions unit has just been released. If all is well v1.0 should finally be out in May 25, just 12 years after it first appeared. This unit provides an advanced record, TFraction , that encapsulates an immutable fraction and a whole bunch of methods for manipulating them. There are also a lot of operator overloads that make it easy to perform arithmetic and comparisons. You can cast from integers and to and from floating point values. TFraction is well documented online if you want to check out what operations it supports. Finally there are comprehensive DUnit tests for every method and operator. ⮞  Get it here . Here's the properties, methods & operators (with various directives deleted): property Numerator : Int64; property Denominator : Int64; property WholeNumberPart : Int64; property FractionalPart : TFraction; function IsProper : Boolean; function IsWholeNumber : Boolean; function Sign : TValueSign; function CompareTo (const ...

DUSE v0.3.1 released

Image
Following a bug report I've updated DUSE , the Delphi Unit Scope name Expander program, to allow Delphi 12 unit names to be imported easily. That's it really. If you use DUSE and Delphi 12 this is worth the update. 🠞  Get DUSE v0.3.1 from GitHub .

Code Snippet Collection v2.2.3 released

v2.2.3 of the DelphiDabbler Code Snippets Collection has just been released. It includes bug fixes, so you should updated For details see  this post on the CodeSnip blog .

Code Snippet Collection v2.2.2 released

v2.2.2 of the DelphiDabbler Code Snippets Collection has just been released. This version adds lots of new mathematical function, mainly related to statistics and number bases. For details see this post on the CodeSnip blog .

Almost there - BDiff v1.0.0-rc.1 released

Image
It's only taken 21 years, but we're approaching the release of v1.0 of the BDiff/BPatch utilities . I don't want to rush it though (😉) so I've just put out a release candidate. There are various tweaks since beta 2, but the headline is that the programs are now available in 64 bit versions in addition to 32 bit. I'd been putting this off because I expected trouble, but everything happily re-compiled with the Delphi 64 bit Windows compiler and just worked. No changes required. Phew. If you want to read about the other tweaks then take a look at the change log . Not sure what these utilities do, then read the man pages: BDiff / BPatch . ✅ You can get RC1 from the GitHub release page .