Jump to content

David Heffernan

Members
  • Content Count

    3711
  • Joined

  • Last visited

  • Days Won

    185

Everything posted by David Heffernan

  1. David Heffernan

    Stay-on-top for just our app?

    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.
  2. David Heffernan

    Graphics32

    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.
  3. David Heffernan

    Stay-on-top for just our app?

    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.
  4. David Heffernan

    Graphics32

    Download the source from the repo and include it in your project
  5. Compiler warnings, rather missing the point
  6. 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.
  7. David Heffernan

    Custom Managed Records Coming in Delphi 10.3

    In C++ you can prevent it from happening.
  8. David Heffernan

    Custom Managed Records Coming in Delphi 10.3

    This is still an enormous weakness in the language.
  9. David Heffernan

    Clean Code and Fast Code Slides at EKON 22

    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.
  10. David Heffernan

    Clean Code and Fast Code Slides at EKON 22

    But the language was designed differently. Use records. What's so difficult about that?
  11. David Heffernan

    Clean Code and Fast Code Slides at EKON 22

    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.
  12. David Heffernan

    Aligned and atomic read/write

    Fair enough.
  13. David Heffernan

    Clean Code and Fast Code Slides at EKON 22

    You'll need to declare two record types for this. The language isn't going to change now.
  14. David Heffernan

    Aligned and atomic read/write

    @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.
  15. David Heffernan

    Aligned and atomic read/write

    You agree then that unaligned access of data greater than a single byte is not atomic?
  16. David Heffernan

    Aligned and atomic read/write

    That's what you said.
  17. David Heffernan

    Aligned and atomic read/write

    Yes, I read what you wrote. What you wrote was wrong. You said nothing about cache lines.
  18. David Heffernan

    Custom Managed Records Coming in Delphi 10.3

    There's nothing to switch off. You choose to switch it on on a type by type basis.
  19. David Heffernan

    Aligned and atomic read/write

    Single bytes are aligned, because they can't straddle cache lines. Reads are therefore atomic, because they are aligned. Two byte reads can straddle cache lines and unaligned reads are not atomic.
  20. David Heffernan

    Aligned and atomic read/write

    Actually both of these statements are wrong. Reading unaligned memory is not atomic for reads that straddle cache lines. And unaligned memory access is not slow on modern processors.
  21. David Heffernan

    Managing Version Information Across Builds

    The IDE's tools aren't well designed in my view. Don't set the version information that way, instead make it part of your automated build process.
  22. It's not that the override does nothing. There is no override. It makes no sense to me to reintroduce a method of that name.
  23. Why don't you override the method from TObject?
×