-
Content Count
3586 -
Joined
-
Last visited
-
Days Won
176
Everything posted by David Heffernan
-
Why is public class method marked as used, while it's not actually used?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Using packages would achieve that -
Why is public class method marked as used, while it's not actually used?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
If you really want to reduce the size of what you deploy then use runtime packages instead of DLLs and you won't duplicate RTL/VCL classes. Likely that would save you far more than you would save by stripping RTTI in the RTL/VCL code that you link, were it even possible for you to do that. -
Why is public class method marked as used, while it's not actually used?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Why would it be duplicated? Why would the same RTTI be found in different DLLs? Why are you singling out the RTTI here? Isn't the fundamental issue that you have duplicated code. If the duplication of the code bothers you, don't have duplicated code. And guess what. You then won't have duplicated RTTI. Or am I missing something? -
Why is public class method marked as used, while it's not actually used?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Why does it make a difference whether or not the code is in a DLL? -
Why is public class method marked as used, while it's not actually used?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
@Stefan Glienke is not suggesting that you use a class method. He's just pointing out that the title of this topic is misleading. -
Why is public class method marked as used, while it's not actually used?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
You can read the documentation to find out: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Methods_(Delphi)#Class_Methods -
Why is public class method marked as used, while it's not actually used?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
I don't think RTTI doubles or triples the size of your executables. I also think that people worry overly about the size of the executables. Certainly worry about this on mobile platforms, but generally on desktop platforms you should be less concerned of the increases due to RTTI. -
Why is public class method marked as used, while it's not actually used?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Presumably it's because of your RTTI settings, which by default allow public methods to be called from RTTI, but not private. -
Interesting sort implementation, does not fit into usual API tough
David Heffernan replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Timsort is stable, and performs well on partially ordered data. It's the default sort for Python and Java. -
As I read the documentation, I think you are right. Well done. On the home straight now. As I said, this is fundamentally a numpy issue. No doubt a numpy expert would have been aware of this.
-
No. Python buffer API gives you access to the internal buffer of Python objects. Pass that to Delphi and have your delphi code populate it.
-
It seems odd to me that you won't use the solution that I outlined above which is known to work. But if you won't entertain that then you are probably asking in the wrong place. Because what you are asking is really a numpy question. I'd ask the question on SO and tag it python and numpy. Doesn't matter at all that the array is from Delphi. It's just an array of double.
-
You want to do more than this don't you. You want to use numpy methods with this shared data. Is that correct?
-
What @fjames wants to do in Python is to use numpy without copying data between Delphi and Python. Are you aware of a way to do this with numpy that I have missed?
-
I don't think there's an easy way to get numpy to use your raw array memory. My initial suggestion, I suspect, is the only tractable way to do this without copying.
-
Reading fields with different lenghts
David Heffernan replied to AndrewHoward's topic in Delphi IDE and APIs
Beyond the compilation error which is just a typo, pointless to zeroise the record and then write over those zeros. -
Something can't be both a Delphi array and a numpy array. You should do what in said. Work with a numpy array's buffer. You'll access that as a pointer in Delphi. Use pointer math.
-
If you want to work with numpy, and minimise copying, then you create a numpy ndarray array object and use the buffer protocol to gain access to the object's internal buffer. Do all your work in Delphi using that internal buffer.
-
Reading fields with different lenghts
David Heffernan replied to AndrewHoward's topic in Delphi IDE and APIs
If the fields are at known, fixed positions then you can read them directly. If not then you need to parse the data. -
IOTAProcess.ReadProcessMemory / .WriteProcessMemory
David Heffernan replied to dummzeuch's topic in Delphi IDE and APIs
Seems unlikely. The winapi functions return a BOOL and call SetLastError. HRESULT seems very implausible. -
IOTAProcess.ReadProcessMemory / .WriteProcessMemory
David Heffernan replied to dummzeuch's topic in Delphi IDE and APIs
That's called returning a value through a parameter. If you look at this function, what else could these integer return values hold? -
function reference feature for Delphi source code
David Heffernan replied to Nasreddine's topic in GExperts
By output I mean what is produced by the compiler. -
function reference feature for Delphi source code
David Heffernan replied to Nasreddine's topic in GExperts
I don't think so. I think that you don't seem to understand the requirement. You certainly can't achieve the functionality shown in the original post from a native executable file (like the ones that Delphi produce). -
function reference feature for Delphi source code
David Heffernan replied to Nasreddine's topic in GExperts
A map file doesn't list functions calls. You can't map the graph of function calls from a map file. Parsing isn't enough. You also need to interpret the tokens that the parser emits, using the syntax of the language. For sure you need a parser. But it's not enough. You need more. -
function reference feature for Delphi source code
David Heffernan replied to Nasreddine's topic in GExperts
No. You need way more than a map file to find all the incoming references to a function. This won't tell you the information either.