-
Content Count
3586 -
Joined
-
Last visited
-
Days Won
176
Everything posted by David Heffernan
-
Impact of debug dcus on performance
David Heffernan replied to pyscripter's topic in Delphi IDE and APIs
Is it possible that the difference is due to the PCRE code being compiled with poor settings? Something similar to this: https://stackoverflow.com/q/27821277/505088 -
Impact of debug dcus on performance
David Heffernan replied to pyscripter's topic in Delphi IDE and APIs
My understanding has always been that debug dcus are compiled with optimisations etc. and so there should be no performance difference. Can you provide a cut down program that demonstrates the issue? -
Before you ask: GExperts for Delphi 10.3 is not ready
David Heffernan replied to dummzeuch's topic in GExperts
Usually in this scenario one would prefer to get on with the job rather than spend time explaining the issues. I'm sure that if @dummzeuch would like some help he know how to ask. -
Solved: Application Run Check and bring to foreground
David Heffernan replied to KodeZwerg's topic in Windows API
You just have to extend the code to bring itself out of the tray as you say. Although strictly speaking it isn't in the tray and in fact the tray isn't even called that. It's a notification icon in the notification area. What you mean by being in the tray is that the main form is hidden, Visible is false. So you just need to show it. Presumably you already do that when the notification icon handles being clicked. -
Strange and Random Access Violations
David Heffernan replied to Ugochukwu Mmaduekwe's topic in RTL and Delphi Object Pascal
You write a zero byte beyond the end of the char array. Solve the problem by using Move to perform the copy. -
GitHub is not a fork. That is the master repo.
-
What is XE10?
-
Why wouldn't you get the latest source from the repo?
-
Scale it back to a small test program. As for what's wrong, the thing that keeps the window on top is the window owner property. In VCL that's known as popup parent. I know you want a quick answer but sometimes you have to work a bit. Make that minimal test program and the answer will be easy to find.
-
This doesn't make a lot of sense to me. Why would anyone want to use some random files whose history we have no knowledge of, when we can simply checkout the source from the repo and use it directly.
-
What you are looking for is the default behaviour. Clearly there is something in your code that changes this. The solution is not to ask for some new code to make this work for you. The solution is for you to remove or fix whatever it is in your code that has broken this behaviour. Start a brand new VCL app. This will come with a main form. Create a second form, and show it. Note how the second form can never be behind the main form.
-
Download the source from the repo and include it in your project
-
JMP to expernal methods <> inlined call to external method, bug or correct design?
David Heffernan replied to Johan Bontes's topic in RTL and Delphi Object Pascal
Compiler warnings, rather missing the point -
JMP to expernal methods <> inlined call to external method, bug or correct design?
David Heffernan replied to Johan Bontes's topic in RTL and Delphi Object Pascal
Bug in your code. The inliner has no reason to pass any parameters because you told it the external function has none. If you want to use inline, and doing so removes the jmp leaving just a single call, then you need to declare the external function correctly. I think I already told you this on SO. -
Custom Managed Records Coming in Delphi 10.3
David Heffernan replied to Marco Cantu's topic in RTL and Delphi Object Pascal
In C++ you can prevent it from happening. -
Custom Managed Records Coming in Delphi 10.3
David Heffernan replied to Marco Cantu's topic in RTL and Delphi Object Pascal
This is still an enormous weakness in the language. -
Clean Code and Fast Code Slides at EKON 22
David Heffernan replied to Arnaud Bouchez's topic in Tips / Blogs / Tutorials / Videos
It's fairly clear that the Delphi language we are referring to was designed to make such types assignment compatible. That is made clear by the documentation for the Delphi language. There are other languages that have taken different approaches, but we aren't discussing those languages here. We are discussing Delphi. Whilst you might wish that a different decision had been taken, it wasn't. It's really not likely to change. -
Clean Code and Fast Code Slides at EKON 22
David Heffernan replied to Arnaud Bouchez's topic in Tips / Blogs / Tutorials / Videos
But the language was designed differently. Use records. What's so difficult about that? -
Clean Code and Fast Code Slides at EKON 22
David Heffernan replied to Arnaud Bouchez's topic in Tips / Blogs / Tutorials / Videos
Since the language regards these two types as assignment compatible, it's pretty hard to imagine adding warnings or hints when you write such assignments. Wrap the value in distinct record types. -
Aligned and atomic read/write
David Heffernan replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
Fair enough. -
Clean Code and Fast Code Slides at EKON 22
David Heffernan replied to Arnaud Bouchez's topic in Tips / Blogs / Tutorials / Videos
You'll need to declare two record types for this. The language isn't going to change now. -
Aligned and atomic read/write
David Heffernan replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
@Stefan Glienke And the existence of two byte data that cross cache lines shows that unaligned access is not atomic. When arguing about non deterministic properties like atomic access or thread safety the language used is a little different. When we say code is. It threadsafe we don't mean that it will always fail. We mean that we can't guarantee that it will always succeed. When we say memory reads are not atomic we don't mean that they won't always be read with multiple bus reads. We mean that we can't guarantee that they will always be read with a single bus read. -
Aligned and atomic read/write
David Heffernan replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
You agree then that unaligned access of data greater than a single byte is not atomic? -
Aligned and atomic read/write
David Heffernan replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
That's what you said. -
Aligned and atomic read/write
David Heffernan replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
Yes, I read what you wrote. What you wrote was wrong. You said nothing about cache lines.