

A.M. Hoornweg
Members-
Content Count
489 -
Joined
-
Last visited
-
Days Won
9
Everything posted by A.M. Hoornweg
-
Offline Help updates available from Embarcadero
A.M. Hoornweg replied to DelphiUdIT's topic in Delphi IDE and APIs
Does a Docker-like solution exist, that allows a user to "package" a Delphi version and "map" it into the system when necessary? Delphi installations are simply too huge to keep more than a few installed and archiving a whole VM for each Delphi version is overkill. -
Offline Help updates available from Embarcadero
A.M. Hoornweg replied to DelphiUdIT's topic in Delphi IDE and APIs
Correct, with a caveat "Attention: Online documentation for versions earlier than Seattle is currently not available. You can refer to the help file installed with the product." This is a p.i.t.a. if one wants to write code that correctly compiles with older versions of Delphi. -
Offline Help updates available from Embarcadero
A.M. Hoornweg replied to DelphiUdIT's topic in Delphi IDE and APIs
There are some serious issues on that page. Especially with the "wiki" links. If I click on any "what's new" link of an old Delphi version because I want to find out which features were introduced in that version, it always leads me to the Alexandria wiki pages. Very disappointing. Has Embarcadero suffered a data loss of old wiki versions ? -
Hello all, I'm having the worst of times trying to get remote debugging to work between a VMWare virtual machine (running Delphi 11.3, Windows 11 prof) and the host machine itself (Also Windows 11). I have disabled the firewalls on both the host machine and the VM so these won't interfere. I've installed PAServer of Delphi 11.3 on the host machine, then started PAServer, not specifying a password. In the VM I start Delphi, select Run -> Attach to process -> then select "Embarcadero Windows 32-bit debugger" -> Remote machine. I create a new profile that connects to the host machine using the correct IP address, press "test connection" and it says "connection succeeded". So far, so good. But when I press "Finish", Delphi freezes for a while, then says "unable to connect to remote host". I've also tried starting both PAServer and Delphi as administrator. It makes no difference. The remote debugging functionality seems totally broken. And by the way - how does one *delete* PAserver profiles? The drop-down list is getting full and I want to get rid of them.
-
Win32 remote debugging broken on Windows 11 ?
A.M. Hoornweg replied to A.M. Hoornweg's topic in Delphi IDE and APIs
I de-installed and re-installed PAServer on the host machine and re-started the computer several times. Now, all of a sudden, the connection succeeds! -
Besides multi-threading, multi-processing would be an option. Modern browsers use separate processes for each tab but for the user they still look like they're part of one and the same application. Here's an example on how to host an external process in a Delphi form: https://alt.lang.delphi.narkive.com/dXS11op1/external-application-from-within-a-delphi-form
-
No it isn't. Because it isn't stateless. For example, if you draw a shape by a sequence of lines: MoveToEx (hdc,100,100,NIL); LineTo (Hdc, 200,200); LineTo(Hdc, 10,100); the commands draw contiguous line segments because each segment starts at the position where the previous command ended. If multiple threads draw in parallel on the same Hdc, that is not the case anymore.
-
I did not need to recompile my third-party 11.2 packages (TMS Components, LMD Components, Intraweb), so I guess 11.3 is binary compatible to 11.2. I certainly wouldn't mind having a thorough 2-pass compiler producing fast and tight executables for release mode. But during development and debugging I prefer F9 to be fast.
-
I suppose that would make 11.3 binary incompatible to existing packages. Can serious optimization be done by a single pass compiler anyway?
-
Delete all failed jobs from the printer spooler
A.M. Hoornweg replied to msd's topic in Delphi IDE and APIs
Run a "command prompt" as administrator (=elevated). Enter the command Net Stop SPOOLER and confirm with the Enter key. Enter the command Del c:\windows\system32\spool\printers\*.* and confirm. This will delete old print jobs. Enter the command Net Start SPOOLER and confirm. Close the command prompt window. You can easily put this code into a batch file (*.cmd), but remember that it must be run in elevated mode. You can also write a Delphi program that performs the same steps, but its "bitness" should match that of your Windows version and the manifest must specify the execution level "require administrator". -
Hello World, I notice that tList<T> has a terrible growth strategy, it basically does "TListHelper.InternalGrow(count + 1)" whenever an item is appended, there is no granularity and in very large collections the overhead can become undesirable. It is not possible to use the OnNotify event to check and increase the capacity before the insert, because TListHelper "forgets" to send the the notification cnAdding before it inserts. That value exists but is never used. Instead, it sends cnAdded after the fact. Sure it's still possible to check and increase the capacity at that point, but it's not optimal. In my opinion, it would be better if tListHelper would simply send a cnAdding notification before inserting. I can still inherit from tList<T> and override/reintroduce the Add method by a new one that takes granularity into account, but in my opinion it's kinda un-elegant because the base class already has a notification feature that could be used to achieve the same thing. I'd love to hear the opinion of the Delphi community on this!
-
Tlist<T> growth strategy is bad.
A.M. Hoornweg replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
Please ignore my previous post. It appears I was incorrect about my assumption that the size of the list is always increased by one, it uses "GrowCollection" from unit Sysutils which is a more clever strategy. -
Hello all, does anyone know where to find compiled *.obj files of Google's Snappy compressor for the output platforms that Delphi 11.2 supports? The ones I have are outdated and incomplete and I'm unable to compile them myself.
-
Object files for Google Snappy C API?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
The object files compiled by Roberto Della Pasqua are the outdated and incomplete ones which I have. There is no support for 64 bit platforms other than Windows and the return value type of one of the functions has changed since 2016. -
New security requirements for code signing, disruptive ?
A.M. Hoornweg replied to A.M. Hoornweg's topic in General Help
In the case of VMWare, the "hardware identity" of the machine is determined by some entries in the *.VMX file which can be manually edited as long as the VM is unencrypted. These entries are "uuid.bios" and "uuid.location". The VM's MAC addresses are also derived from these ID's. It is vital to set uuid.action="keep" if you want to force VMWare to maintain the hardware identity of a VM if it is moved to a different host machine. -
Hello all, does anyone know a nice algorithm that will connect the points in a polygon in a rounded fashion? Its intended use is a contour map. The polygon must go through all vertices but I'd like to avoid sharp corners for a more natural look; it's OK if the lines between the vertices are slightly curved. The few solutions I found on the internet tend to bend without touching the vertices.
-
The best way to handle undo and redo.
A.M. Hoornweg replied to skyzoframe[hun]'s topic in Algorithms, Data Structures and Class Design
Certainly not! But if the Delphi object represents a document or record in a database, backing up old versions on disk is often possible. A colleague of mine has written a reporting tool that does precisely this. -
The best way to handle undo and redo.
A.M. Hoornweg replied to skyzoframe[hun]'s topic in Algorithms, Data Structures and Class Design
A classical way to achieve undo/redo is if your object can serialize itself, for example using XML or Json. That way you can keep the last xxx modified versions of the object in a temporary folder on disk. -
I am using this open source library to connect to MongoDB. It works quite well but it's a bit bare-bones: https://github.com/grijjy/DelphiMongoDB I've forked it and added some more functionality that I needed myself. https://github.com/tuurke63/DelphiMongoDB
-
Reduce storage space for floating point range
A.M. Hoornweg replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
My recommendation: treat your data as integers, using an implit divisor multiplier of 1000. Your highest value 200000 is hexadecimal $30D40 and as you can see by the number of digits, that will fit in 5 nibbles ( two and a half bytes). Now all you need is a class that will correctly manage a tArray<byte> to read and write individual float values. -
Reduce storage space for floating point range
A.M. Hoornweg replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Cool ! One learns something new every day -
Reduce storage space for floating point range
A.M. Hoornweg replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
If these are measurements of a road, then do you really need 3 fractional decimals at all? I mean, a single car driving over it would probably change the fractional part already. Are the readings a 2-dimensional map of deformation/wear/potholes of the road, like an image? If so, then a lossy data reduction algorithm similar to JPG would shrink the data enormously whilst keeping the essence intact. -
Hello all, I have the impression that Delphi's SHL operator only handles 32 bits even when compiling for 64-bit. Does anybody have an alternative routine that handles 64 bits? function bit(idx,value: uint64): Boolean; begin Result := ((1 shl idx) and value) <> 0; end; procedure test; var i:uint64; b:boolean; begin i:=$ffffffff00000000; b:=bit(33,i); // Should return TRUE but returns FALSE end;
-
64 bit shift operations?
A.M. Hoornweg replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
It has the 32 LSB's set to zero. Bits 32...63 are set to one and I'm testing bit 33. -
64 bit shift operations?
A.M. Hoornweg replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
Thank you all! It works now.