-
Content Count
3586 -
Joined
-
Last visited
-
Days Won
176
Everything posted by David Heffernan
-
Running python code in Delphi threads
David Heffernan replied to pyscripter's topic in Python4Delphi
My recollection of Lutz's work is that Learning Python is the book of his to read. As for the Python 2 vs 3 distinction, I'd be less worried about that. That's more about syntax details than concepts. A really good work written for Python 2 is better than an average work for Python 3. The differences between 2 and 3 aren't significant conceptually. -
True thread parallelism with P4D and Python 12
David Heffernan replied to pyscripter's topic in Python4Delphi
Python is very good at managing change in my experience. -
Unable to Cast UInt64 to Double on 32bit Compile in Windows 11 ARM: Has Anyone Experienced This?
David Heffernan replied to gomsun2's topic in RTL and Delphi Object Pascal
Well I'd not want to use rtl code to convert float to string anyway because it doesn't get it right for all floats -
Unable to Cast UInt64 to Double on 32bit Compile in Windows 11 ARM: Has Anyone Experienced This?
David Heffernan replied to gomsun2's topic in RTL and Delphi Object Pascal
I've seen other reports similar to this. It smells like an emulator bug. -
Is it a problem if I create more threads than host CPU has ?
David Heffernan replied to William23668's topic in General Help
Why would that be? Would it be because you asked a technical question without offering any details. Using more threads than processors can be effective when some of the tasks aren't CPU bound. A good example would be writing to or ready from disk. Accessing memory as the task I would not expect to be amenable to using more threads than processors. Usually computers have greater peak CPU throughput than memory throughout. So if the work is purely memory access then I'd expect CPUs to be idle. Because the memory access should be the bottleneck. You are quite right when you point out that nobody can advise you accurately without knowing your precise needs. -
Is it a problem if I create more threads than host CPU has ?
David Heffernan replied to William23668's topic in General Help
Just use thousands of threads and get results yesterday, simples. No, if you use too many threads then your will get results slower. How do you even think computers work?!! -
Is it a problem if I create more threads than host CPU has ?
David Heffernan replied to William23668's topic in General Help
There won't be a problem, but it just won't be efficient to use more threads than processors. My question for you is why you want to do that? -
Is it a problem if I create more threads than host CPU has ?
David Heffernan replied to William23668's topic in General Help
Depends what the threads are doing -
You can't suggest that without knowing what the numbers represent.
-
I need advice on converting a 500k lines 32bit Delphi 7 application to 64bit
David Heffernan replied to Yaron's topic in General Help
It's as necessary as it always was if you are using a pre Unicode Delphi. And yeah it's still around. Code doesn't vanish. Why would anyone develop it for compilers that aren't developed?? -
I need advice on converting a 500k lines 32bit Delphi 7 application to 64bit
David Heffernan replied to Yaron's topic in General Help
Most of the tnt components map cleanly to standard vcl components iirc -
I need advice on converting a 500k lines 32bit Delphi 7 application to 64bit
David Heffernan replied to Yaron's topic in General Help
My take on this is that you want to start making changes in your Delphi 7 code base that don't change the meaning of the program there, but mean that it will compile and work as expected in both ANSI and Unicode Delphi. In an ideal world you'd be able to do all that work preparing for the switch and reach a point where you can compile with both ANSI and Unicode Delphi, and the program works the same. Then you can cut the chord to Delphi 7 and commit to Unicode Delphi. Then you do the second piece of work which is to get the code working on 64 bit. -
That blows my mind!!
-
Sounds a little implausible
-
Obviously Microsoft's header files handle struct alignment correctly
-
Delphi compiled EXE are flagged as malware by anti virus software
David Heffernan replied to Jaska's topic in General Help
Signing would help -
Setting the drop down width of a Combobox in Delphi
David Heffernan replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I've never in my life seen it written like that. Sure it works. But when you read it, it's not familiar and so it makes you think about it. Impedence. Patterns matter. -
Setting the drop down width of a Combobox in Delphi
David Heffernan replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
What's especially awesome about the VCL code is that it writes the for loop in a really weird way as for var I: Integer := 0 to -1 + Items.Count do with the -1 before the count, and that seems to have taken from Setting the drop down width of a Combobox in Delphi – twm's blog (dummzeuch.de) which in turn is taken from Sizing the ComboBox Drop Down Width (thoughtco.com) -
Using inline variables inside loops
David Heffernan replied to havrlisan's topic in RTL and Delphi Object Pascal
I think the asker knows this. The question though is how many variables are there for an inline var inside a loop. Is there one variable? Or is the N variables where N is the number of times the loop body executes? That's the question being asked as I understand it. The answer is that there is one variable. Seems like this is the opposite behaviour from C# https://stackoverflow.com/q/271440/505088 Personally I feel like Delphi has a poor design choice here. I'd expect a local variable that is defined inside a scope, to have a lifetime that was that scope. With the C# design you can achieve both possible behaviours by defining the variable inside or outside the loop body. In Delphi you have to resort to putting the body in a separate procedure. The we have C++ which allow capture by value or variable as specified by the programmer in code. That would also give the same flexibility but without requiring extraction to separate procedure. Or am I wrong? I'm basing this on reading and not practical experience so I may have misunderstood. -
64-bit debugger confirmed broken on 11.1 when using TypeInfo(T) for generic structs
David Heffernan replied to PaulM117's topic in RTL and Delphi Object Pascal
Use the 32 bit debugger -
Load DLL from resource, bypassing a file?
David Heffernan replied to Angus Robertson's topic in Windows API
If you can distribute one file you can distribute more than one. This always feels like a pointless discussion. Solving a problem that doesn't exist. -
Usually each release comes with a bunch of bugs fixed, and a new set of bugs released into the wild. I do think the product is slowly getting better though.
-
Delphi TOIOBE index lifted in May 2022?
David Heffernan replied to wuwuxin's topic in RTL and Delphi Object Pascal
Do they treat you differently when you answer? -
Delphi TOIOBE index lifted in May 2022?
David Heffernan replied to wuwuxin's topic in RTL and Delphi Object Pascal
Who cares about TIOBE? It's just irrelevant. -
When will we have a 64-bit IDE version ?
David Heffernan replied to luciano_f's topic in Delphi IDE and APIs
It's strange that if this is what you want that you ask for something else. Classic XY problem.