Archive for the ‘Delphi’ Category
Posted by jpluimers on 2022/11/16
A long time ago, I posted one of the answers to [Wayback/Archive] Where can I find a comprehensive list of Delphi “compiler magic” declarations? – Stack Overflow
So for my link archive, these are the main ways of assembling an (always incomplete, as only partially documented) list:
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, EKON, Event, Software Development, Undocumented Delphi | Leave a Comment »
Posted by jpluimers on 2022/10/20
Last week I found out that I had some Windows ATOM issues before, but this beats them easily was still a draft in stead if in the blog queue.
I got reminded to it by someone asking on Telegram about
“Do I need to use GarbageCollectAtoms in Delphi? I used it in delphi 7, but I dont know what is benefit. 😐”.
The short answer is: yes, if your Delphi application does terminate in a way that the Controls unit cannot cleanly unload (and cannot free the Windows atoms) or leaks Windows atoms in a different way. I have been in that situation and that’s why I wrote the above blog post that got published in 2016.
The longer answer is likely no, both the Windows atom and registered Windows message table share a heap and that registered VCL Windows message leaking bug got fixed some 10 years ago in Delphi XE2, see:
Read the rest of this entry »
Posted in Conference Topics, Conferences, Delphi, Development, Event, Power User, Software Development, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows NT, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Vista, Windows XP | Leave a Comment »
Posted by jpluimers on 2022/07/13
For a very long time (about 2 decades) Duncan Murdoch had his home page at www8.pair.com/dmurdoch which somewhere in 2021 has moved to
I figured that out thanks to some help from [Wayback/Archive] Pair Networks (@pairnetworks) / Twitter.
So you need to do a replacement of many URL link prefixes
- from
http://www8.pair.com/dmurdoch/
- to:
http://murdoch-sutherland.com/
For instance some old and new pages:
Read the rest of this entry »
Posted in Borland Pascal, Delphi, Development, Pascal, Software Development, Turbo Pascal | Leave a Comment »
Posted by jpluimers on 2022/06/07
A while ago, I got reminded of a few occurrences of Delphi apps hanging after a little less than 2 months of being active.
It does not happen that often, as usually Patch Tuesday requires a reboot, but sometimes it doesn’t, or ops forgot to patch the affected machine.
The common thing for these hanging apps was that they all used the System.Threading unit (introduced in Delphi XE7). That unit relied on [Wayback] TThread.GetTickcount (added in Delphi XE3 in the System.Classes unit) which uses a 32-bit unsigned [Archive.is] cardinal value as it relied on the Windows API [Wayback] GetTickCount function which in turn has this remark:
Read the rest of this entry »
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »
Posted by jpluimers on 2022/05/18
Subtitle:
GetFullPathName thread-unsafety because of SetCurrentDirectory isn’t, so derived functions (like Delphi GetDir/ChDir/TPath.GetFullPath, or .NET System.IO.Path.GetFullPath) are not thread-safe either (via The Old New Thing)
A while ago I got a big reminder because of [Wayback] What are these dire multithreading consequences that the GetFullPathName documentation is trying to warn me about? | The Old New Thing:
Read the rest of this entry »
Posted in Delphi, Development, Pascal, Software Development, Turbo Pascal, Windows Development | Leave a Comment »
Posted by jpluimers on 2022/05/17
Earlier this year, [Wayback/Archive] Lars Fosdal posted a long thread about Embarcadero/IDERA software quality and one special person trying to offset the lack.
It is important not just because of his opinion, but also because Lars posts rarely about his Delphi opinion. He is the kind of guy quietly working with Delphi and doing a lot of community support.
When he posts, it is important and should be a signal to be picked up by Embarcadero/IDERA. Until now, not so much of that.
The first tweet was this:
Read the rest of this entry »
Posted in Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2022/03/08
The [Wayback/Archive] Embarcadero/IDERA Documentation Wiki has been mostly down since March 3rd, 2022 (not the main page, but almost all other pages are).
I modified [Wayback/Archive] Docwiki https – EmbarcaderoMonitoring to show the actual status of a deeper page as the (mostly static) top page is up, so monitoring that is useless as the deeper pages are down.
The deeper pages are dynamic and require a functioning MySQL database connection. That connection is mostly down (the error message is not clear, so this could be a network or a database server problem, or maybe even a loadbalancer gradually entering bit heaven).
Since it had been down for like 6 days in February*, I’d expect Idera to keep an eye on it and prepare for more downtime. Apparently that’s either not a 24×7 thing for them or they missed the “pre” in preparation as it is dead-silent on .
It also runs on an unsupported version of Mediawiki 1.31** which by itself does not explain the outage, but does indicate that their idea of handling their internal lifetime management is different than what they advocate to clients in their software subscription model, see [Wayback/Archive] Delphi – Embarcadero store, [Wayback/Archive] Update Subscription – Embarcadero and [Wayback/Archive] Special Offers on RAD Studio, Delphi & C++Builder – Embarcadero:
Read the rest of this entry »
Posted in *nix, Bookmarklet, Delphi, Development, JavaScript/ECMAScript, Lightweight markup language, MediaWiki, Monitoring, Power User, Scripting, SocialMedia, Software Development, Twitter, Uptimerobot, Web Browsers | Leave a Comment »
Posted by jpluimers on 2022/02/15
From my Windows XP days (which are long gone), but historically relevant the answer to [Wayback] DELPHI : EEncodingError – Invalid code page on windows xp embedded – Stack Overflow by [Wayback] Remy Lebeau:
The TEncoding.ASCII property uses codepage 20127, which is not installed on XP Embedded by default. You have to install it manually. The TEncoding class does not exist in D2006.
Are you using Indy 10, by chance? It uses TEncoding.ASCII by default for its string encodings. This exact error has been known to occur when using Indy on XP Embedded.
–jeroen
Posted in ASCII, Delphi, Development, Encoding, Power User, Software Development, XP-embedded | Leave a Comment »
Posted by jpluimers on 2022/01/26
When working with converging algorithms, sometimes floating code can become very slow. That is: orders of magnitude slower than you would expect.
A very interesting answer to [Wayback] c++ – Why does changing 0.1f to 0 slow down performance by 10x? – Stack Overflow.
I’ve only quoted a few bits, read the full question and answer for more background information.
Welcome to the world of denormalized floating-point! They can wreak havoc on performance!!!
Denormal (or subnormal) numbers are kind of a hack to get some extra values very close to zero out of the floating point representation. Operations on denormalized floating-point can be tens to hundreds of times slower than on normalized floating-point. This is because many processors can’t handle them directly and must trap and resolve them using microcode.
If you print out the numbers after 10,000 iterations, you will see that they have converged to different values depending on whether 0 or 0.1 is used.
Basically, the convergence uses some values closer to zero than a normal floating point representation dan store, so a trick is used called “denormal numbers or denormalized numbers (now often called subnormal numbers)” as described in Denormal number – Wikipedia:
…
In a normal floating-point value, there are no leading zeros in the significand; rather, leading zeros are removed by adjusting the exponent (for example, the number 0.0123 would be written as 1.23 × 10−2). Denormal numbers are numbers where this representation would result in an exponent that is below the smallest representable exponent (the exponent usually having a limited range). Such numbers are represented using leading zeros in the significand.
…
Since a denormal number is a boundary case, many processors do not optimise for this.
–jeroen
Posted in .NET, Algorithms, ARM, Assembly Language, C, C#, C++, Delphi, Development, Software Development, x64, x86 | Leave a Comment »