Jump to content

David Heffernan

Members
  • Content Count

    3586
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by David Heffernan

  1. David Heffernan

    How can I allocate memory without raising exceptions ?

    What do you want to happen if memory allocation fails? Isn't process termination actually the best thing? When you say string, you can't expect to do this for built in string types since you don't control how they are allocated.
  2. David Heffernan

    Sorting two lists in step?

    Create an array of integers 0 to N-1, sort that leaving the raw lists unchanged. Whenever you want to refer to an item in either list, instead of list use list[arr]
  3. Not sure what you mean by "this"
  4. David Heffernan

    How to execute a cmd file in delphi in invisible mode

    This relies on the other process to respond to that flag, and they often won't. And certainly they won't of they are console apps. It's a very common mistake to try to run a console app with ShellExecuteEx which is designed to execute shell verbs not to create processes.
  5. VCL apps already do this
  6. David Heffernan

    How to execute a cmd file in delphi in invisible mode

    What does "run a cmd file" mean? My guess is that you need to use CreateProcess with the CREATE_NO_WINDOW flag.
  7. You aren't using Delphi XE. You are using 10.2. You can find your version stated in the about window in the IDE.
  8. David Heffernan

    Encryption

    That looks like base64 encoded binary data. No evidence that it is encrypted. You must know more about where this text came from. That information is probably useful.
  9. Isn't the top of the stack protected by guard pages?
  10. The 32 bit behaviour is preferable. Why do you want to do anything after a stack overflow?
  11. David Heffernan

    Creating multiple threads in a DLL

    We don't know what your code does, and how it interacts with its host. Nobody can answer your question with the amount of information provided here.
  12. David Heffernan

    Rendering form content

    Are these all windowed controls? Seems like something like this might be better as a single custom control. I'd expect that to have much better performance.
  13. David Heffernan

    CE registering problem

    Perhaps you haven't got a valid serial number.
  14. David Heffernan

    calling C code from Delphi

    Compile the code into a dll and link that. Directly linking obj files is possible but it can be tricky. Especially for 64 bit code where the compiler doesn't respect exception table meta data.
  15. David Heffernan

    Delphi says "x is not a valid integer value"

    The point about return value vs out param is that the former can be composed directly in chained function calls.
  16. David Heffernan

    Delphi says "x is not a valid integer value"

    I'm guessing what happened here is that asker put the variable name into a string and imagined it would be interpreted in the context of the variable namespace.
  17. David Heffernan

    C to Pascal

    Why not compile the code as is, and link it from your program?
  18. David Heffernan

    Delphi says "x is not a valid integer value"

    This is not true. You can use an inline variable declaration. https://docwiki.embarcadero.com/RADStudio/en/Inline_Variable_Declaration Please don't tell us we are jerks. That's just offensive and rude.
  19. David Heffernan

    Delphi says "x is not a valid integer value"

    I had to read this question x times before I understood it
  20. David Heffernan

    How many people use Delphi?

    Not with Electron. I'm thinking of programs built with other tools. Or do you claim that programs exist that perform their task efficiently? I don't disagree. I'm talking about the other use cases. Have you seen how much labour Arnaud puts in to writing asm code? Because the Delphi compilers can't do the job. Other tools can do the job though. I don't think that's a fair assessment. The programs you are talking about call into libraries like numpy and scipy and the kernels of these libraries are implemented in Fortran and C. I wish people would stop telling me that performance doesn't matter to me. How do you all know what matters to me?
  21. David Heffernan

    How many people use Delphi?

    Let's look at this argument. There also exist many dev tools and programs built with them, that are blazingly fast. By your logic we would conclude that market does care about speed. But now we've got contradictory conclusions using your logic. There must be a flaw somewhere. Is it possible that performance is critical in some cases, but not others? If go right back to the start of this particular thread, my original comment was in response to a claim that code compiled by delphi was fast. I disagreed with that. Seems like you actually agree with me.
  22. David Heffernan

    How many people use Delphi?

    Sorry, I don't know what point you are making. Can you elaborate?
  23. David Heffernan

    How many people use Delphi?

    Why not? My experience is that the OS is largely unimportant because it's the hardware that matters. Well no, but that's not even remotely what I'm talking about. My competitors aren't coding for 90s Crays. They are coding for today's hardware, as am I. For of all, we haven't been getting annual doubling of performance for quite a while now. But again I'm not competing against last year's computers. The developers writing code that competes against mine are also able to use that same hardware as me. Just because performance isn't important to you doesn't mean that it isn't important to others. Your experience of the world isn't the same as others.
  24. David Heffernan

    How many people use Delphi?

    That's nice. But plenty of other people are in the situation which you are lucky enough never to have found yourself in.
  25. David Heffernan

    How many people use Delphi?

    If only delphi's poor performance was limited to math
×