Jump to content

David Heffernan

Members
  • Content Count

    3513
  • Joined

  • Last visited

  • Days Won

    174

Everything posted by David Heffernan

  1. David Heffernan

    Is another process running as admin?

    https://stackoverflow.com/a/4497572/505088
  2. David Heffernan

    What to do with unsupported components?

    Spend the time to get the deployment right and it's no problem. If you can deploy a single exe file then you can deploy a dll alongside it. If anyone is complaining then perhaps you aren't deploying correctly. I wonder, you aren't trying to deploy to system 32?
  3. David Heffernan

    What is the fastest way to check if a file exists?

    You can read the code to find out
  4. David Heffernan

    Changes in Delphi from version to version?

    If you don't have those versions, you don't need to do that.
  5. David Heffernan

    Changes in Delphi from version to version?

    Knowing the version where things changed doesn't influence how you resolve the warnings
  6. David Heffernan

    Rapid generics

    That's not the same as starting from scratch. Also, didn't you have trouble with bugs in you asm code in your bigint library?
  7. David Heffernan

    Rapid generics

    Well, that's exactly what I have been arguing for. It seems utterly insane to me that this task is handled at runtime when it can be handled at compile time. Anyway, as I understand it the record dtor would run in addition to the RTTI based finalization code. So adding a dtor could only ever make code slower.
  8. David Heffernan

    Rapid generics

    True years ago, but these days not so. Just put some code through godbolt and marvel at the code that it generates. You don't have to get that complicated before you see the compiler spotting optimisations that are very far from obvious. Optimisers now have deep knowledge of hardware architecture and can use that to make choices that are beyond almost all human asm programmers.
  9. David Heffernan

    Issue closing external apps..

    That's because your button event handlers run busy message loops waiting for the child processes to finish. Your mistake is to run those busy loops in the main thread. You should consider running those loops in dedicated threads, and obviously remove the message processing. You code leaks the process handles and has other problems. Duplicating the code is a bad idea. You should be using CreateProcess to create processes. Fundamentally I would say that your main issue is that copying code without understanding it is a bad idea. You then become unable to maintain it and are unable to critique it.
  10. David Heffernan

    Rapid generics

    Why would we want to finalize records manually? What a terrible retrograde step.
  11. David Heffernan

    Rapid generics

    I don't much care what you like, or don't like. My point was that there exist plenty of compilers that can emit optimised code that is exceedingly efficient, and extremely hard to beat by humans writing code themselves.
  12. David Heffernan

    Rapid generics

    You mean language rather than compiler.
  13. David Heffernan

    Delphi permutation code complexity

    Can I ask why you are interested in complexity of this algorithm? If it is for the sake of learning, fair enough, but there are far better examples to teach you. If it is for a real application, complexity is the wrong question to ask.
  14. David Heffernan

    Rapid generics

    Very hard to find them though, and so easy to find good compilers.
  15. David Heffernan

    Rapid generics

    Practical for small amounts of code that is seldom modified. Of course good compilers typically produce better code than humans can manage.
  16. David Heffernan

    Rapid generics

    I'm not talking about the runtime. I'm talking about the code emitted by the compiler when it compiles my code. Performance is critical for my program. Some of the critical sections of code I translated to C in order to reap significant performance benefits of having a good optimising compiler. So yes, this is a real issue.
  17. David Heffernan

    Delphi permutation code complexity

    The complexity is linear with the number of digits. In this case it's probably much easier to write the code if you convert each number to text. You then need an array of counts for each digit. Count the digits. Finally check that each digit has the same number of occurrences. In practical terms, complexity arguments aren't actually going to be relevant here. It's the constant of proportionality that will matter most in performance.
  18. David Heffernan

    Rapid generics

    I see pretty much the same code in 10.3 as produced by XE7 in my real world app, using the Windows x64 Delphi compiler. Performance is identical. Still significantly worse than could be achieved by the mainstream C++ compilers. Probably worse than what could be achieved in C#!
  19. David Heffernan

    Rapid generics

    Runtime optimisation only helps if your code relies heavily on the runtime functions that have been improved. And where are these improvements in the code emitted by the compilers? I've not seen anything. What has changed?
  20. David Heffernan

    Rapid generics

    It's more complex than that. Maybe for users of System.Generics.Collections. But what about those of us that write our own generic types?
  21. David Heffernan

    Who is doing MacOS app with RadStudio for clients ?

    Is it the case that Delphi apps are still locked out of the app store because there is no 64 bit Mac OSX compiler?
  22. David Heffernan

    aItem := nil

    You never need to set a pointer to nil.
  23. David Heffernan

    aItem := nil

    You said that the objects were instantiated by calling the constructor. You later say that they are loop variables used when iterating over a collection. So that's a total contradiction. So, with this new information the simple answer is that you never need to set the loop variable to nil. We read the question just fine. Please don't tell us to read it again. It's you that should read it again.
  24. That's the not true part of what I am saying. There's also the not helpful part of what you stated. I found your comment to be entirely unhelpful.
  25. That's not true, and not helpful. The function can return anyrhing it likes. No reason where there has to be a field anywhere whose value is returned.
×