Jump to content

David Heffernan

Members
  • Content Count

    3586
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by David Heffernan

  1. Why is OTL overkill, and PPL is not?
  2. David Heffernan

    Spell Checker implementation?

    http://hunspell.github.io/
  3. Imagine how fast it would be if you wrote code that didn't stress the heap allocator. That's the real route to performance. Real world benchmarks are the only ones that matter.
  4. David Heffernan

    class designation question

    They all do different things. Rather than have us explain this, did you read the documentation? I don't think that item 3 is very widely used. However meta classes, item 2, is widely used. Classic example is the streaming framework. It is used when you need to instantiate a class whose identity is only known at runtime. When streaming properties the framework reads the class name, looks it up using RTTI and then uses meta classes to instantiate the instance if that dynamically determined type. Always seen with virtual constructors.
  5. Threadvar is implemented on top of TLS on Windows. How is lock free going to handle deallocations made from a different thread from that which allocated the memory? But hey, if you want to write this code, go for it.
  6. David Heffernan

    Messages for exceptions only for main thread?

    All UI happens from the UI thread. So if you want an exception from another thread to result in UI, you need to marshal it into the main thread. Having madExcept in your process is great. But there are a class of exceptions that you don't want to trouble the user with a bug report. I call these expected exceptions. You need to decide on a policy for those exceptions.
  7. David Heffernan

    Error when installing JCL from GetIt

    GetIt, I just don't get it. Surely you are better off pulling from the repo?
  8. David Heffernan

    What are your compiler settings for debug builds?

    This is one of the reasons why the cool cats don't use RTL collections
  9. David Heffernan

    How to make app with tabbed set of VNC windows

    Cross process window parenting relationships never end well. Don't try this. https://devblogs.microsoft.com/oldnewthing/20130412-00/?p=4683
  10. David Heffernan

    How to make app with tabbed set of VNC windows

    Cross process UI is fraught with complications. I wouldn't dream of trying to parent a window from one process into another process.
  11. David Heffernan

    What are your compiler settings for debug builds?

    People for sure would rather have an error message than incorrect results. You are just kidding yourself if you say otherwise. It's simple human denial. Suppressing errors will result in a program with more defects. We all know this to be true. And yet people still choose the path with more defects. What happens when you access an array out of bounds with range checking disabled? Perhaps the memory is valid and so the program continues running. But now it's behaviour is unpredictable. Often you will corrupt memory which leads to obscure errors later that you can't tie back to the original defect. Or quite often it's a straight AV which is hardly preferable to a range check error, since it isn't reproducible.
  12. David Heffernan

    What are your compiler settings for debug builds?

    Yes, but since you don't know that the error will be inconsequential, it's kinda pointless looking at the impact.
  13. David Heffernan

    What are your compiler settings for debug builds?

    Better hope that the incorrect information that you show to the user is inconsequential.
  14. David Heffernan

    What are your compiler settings for debug builds?

    I'm amazed that you can guarantee that the error will be far away from the observer. How did you do that?
  15. David Heffernan

    What are your compiler settings for debug builds?

    No you wouldn't. Giving the user the wrong results is always worse than showing an error, even if the error is poorly worded.
  16. David Heffernan

    What are your compiler settings for debug builds?

    I agree with this. If it doesn't impact performance, then for sure include it in release builds. However, sometimes it really does. It does in my numerical code, but obviously that type of code is probably in the minority amongst Delphi code.
  17. David Heffernan

    Dynamic Test creation possible?

    You can change viewer. You don't need to change the test framework in order to use a different viewer.
  18. David Heffernan

    What are your compiler settings for debug builds?

    Unless performance is impacted
  19. David Heffernan

    What are your compiler settings for debug builds?

    Irrespective of what any poll says, opt off, range & overflow checks on is the correct thing to do
  20. I don't understand that.
  21. Certainly I'd do all the work to prepare the resource from the source file as a pre build step, properly automated. I'd question the choice to use compression. What is the point of that?
  22. David Heffernan

    Delphi on Windows 10 HOME 64-bit?

    No
  23. David Heffernan

    Delphi on Windows 10 HOME 64-bit?

    Yes
  24. David Heffernan

    Reading large UTF8 encoded file in chunks

    @Arnaud Bouchez How do you handle a line longer than your buffer?
  25. David Heffernan

    Memory Management with many objects

    Often it's not how much memory you use, but how you use the address space. But if you can, just switch to 64 bit and move on.
×