-
Content Count
3586 -
Joined
-
Last visited
-
Days Won
176
Everything posted by David Heffernan
-
How can I allocate memory without raising exceptions ?
David Heffernan replied to Marus's topic in General Help
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. -
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]
-
Why does a stack overflow cause a VCL application to terminate?
David Heffernan replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
Not sure what you mean by "this" -
How to execute a cmd file in delphi in invisible mode
David Heffernan replied to NBilov's topic in Windows API
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. -
Why does a stack overflow cause a VCL application to terminate?
David Heffernan replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
VCL apps already do this -
How to execute a cmd file in delphi in invisible mode
David Heffernan replied to NBilov's topic in Windows API
What does "run a cmd file" mean? My guess is that you need to use CreateProcess with the CREATE_NO_WINDOW flag. -
Execution a process before run host application in delphi xe
David Heffernan replied to NBilov's topic in Delphi IDE and APIs
You aren't using Delphi XE. You are using 10.2. You can find your version stated in the about window in the IDE. -
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.
-
Why does a stack overflow cause a VCL application to terminate?
David Heffernan replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
Isn't the top of the stack protected by guard pages? -
Why does a stack overflow cause a VCL application to terminate?
David Heffernan replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
The 32 bit behaviour is preferable. Why do you want to do anything after a stack overflow? -
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.
-
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.
-
Perhaps you haven't got a valid serial number.
-
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.
-
Delphi says "x is not a valid integer value"
David Heffernan replied to 357mag's topic in General Help
The point about return value vs out param is that the former can be composed directly in chained function calls. -
Delphi says "x is not a valid integer value"
David Heffernan replied to 357mag's topic in General Help
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. -
Why not compile the code as is, and link it from your program?
-
Delphi says "x is not a valid integer value"
David Heffernan replied to 357mag's topic in General Help
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. -
Delphi says "x is not a valid integer value"
David Heffernan replied to 357mag's topic in General Help
I had to read this question x times before I understood it -
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?
-
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.
-
Sorry, I don't know what point you are making. Can you elaborate?
-
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.
-
That's nice. But plenty of other people are in the situation which you are lucky enough never to have found yourself in.
-
If only delphi's poor performance was limited to math