

DelphiUdIT
Members-
Content Count
734 -
Joined
-
Last visited
-
Days Won
17
Everything posted by DelphiUdIT
-
Suggestions needed for serial (RS232 style) packet interface
DelphiUdIT replied to madyn's topic in General Help
I suggested the same in my previous post- 8 replies
-
- c++
- serial data
-
(and 2 more)
Tagged with:
-
Suggestions needed for serial (RS232 style) packet interface
DelphiUdIT replied to madyn's topic in General Help
There are lot of packages for Delphi and C++, look at GETIT from IDE and search for: 1) asyncpro or 2) serial I have been using this component for a long time too: https://sourceforge.net/projects/comport/files/comport/4.11/comport411f.zip/download To read the Help you must use an old WinHelp executable. You can discharge it from Microsoft (I had ones for Windows 7 and is working in Win 11). Bye- 8 replies
-
- c++
- serial data
-
(and 2 more)
Tagged with:
-
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
I don't expect that they change anything and I express explicity that. But I think that signal it is a chance to go better in the future. -
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
Sorry, i mention 16 bit register only for quickly "writing". Of course the implementatio was on 64 bit register. Of the cases you indicated, I have honestly never noticed them (I don't go to debug in assembler unless there is a specific reason). I don't work much with strings, if not merely for the visualizations on the UI and therefore I have not noticed problems such as performance drops or anything else. I sometimes look into assembler, I produce exclusive 64 bit application and no more 32 bit, and I saw that they use tipically REX (so pure 64 bit instruction) and rarely 32 bits instructions (with 32 bit arguments), it may also be that the latter are reminiscences of the past. Of course, for a perfect code as you indicated (and as I would also like it to be) there would be a lot of indications to follow ... in reality I think that the projects (like the compilers) have been carried forward by adding functionality without ever rewriting them from scratch and therefore they necessarily carry with them some legacies of the past. Putting in place all those precautions with which the code could improve both its functionality and stability and perhaps even security is an effort and requires a lot of resources. -
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
I write "really weird" because if you use manually "mov ax, source" and "mov dest, ax" you do it more quickly, and not a little bit. "movsd" and his brothers are complex instructions (like you link): https://uops.info/html-instr/MOVSQ.html The use of them should be carefully considered and evaluated. In the Intel Reference Manual (Intel® 64 and IA-32 Architectures Software Developer’s Manual, - Ed. JUNE 2024) they told about these instructions: So, they should use in these cases (I don't look more deep) to be "fast", otherwise they are "poor" (may think). I don't know if Embarcadero can think (and of course want) and resolve this situation, whether there really is a need to fix it. We try near a bilion of cycles, but it's really a normal situation ? P.S.: I try the same in Lazarus / FPC and the timing is lower (near 400 ms.) for double operations in x64 and their compiler use normal "mov [RBP...], RAX" and company to execute the same work. -
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
I have open an issue to QP: RSS-2192 -
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
x64: It's incredible, but writing 3 times in memory is more fast that using MOVSQ ... really weird hardware implementation, may be that this works better with long data, like string. The x32 implements in facts 3 single writing (if datatype is "single") and with "double datatype" use the similar weird approach like x64 with more high timing because it's 2xMOVSD in use. -
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
This should be another way to do (like @Kas Ob. suggested): //l_vec3 := k_vect3_nul; //option 3 for var i := Low(l_vec3) to High(l_vec3) do l_vec3[i] := k_vect3_nul[i]; //option 3 It's more fast then the orginal in x64 and near the same more slow in x32 -
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
It should also be kept in mind that the number of cycles (almost a billion) has a significant impact on the times: even in modern processors, using a "machine" instruction that takes 1 cycle more than another corresponds more or less to having an equivalent time of about 400 ms more (taking into account a base frequency of 2.5 GHz of the single Core and only the theoretical calculated time). -
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
Like me and @Kas Ob. said something wrong with the assembler coding. In theory the compiler do the right way (my personal opinion), but the timing is not right ... should do more study about that. Now I look to my code also, I facing some problems that may be originate from that. I don't think tha Embarcadero do something in real time ... surely they will improve in the future. You can open a bug report on new quality portal. -
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
The difference depends from assembler decoding: for example if use the "option2" and all single (x32 and x64), the x64 is more fast .... May be can be optimize better, but on compiler time. If you want you can write an assembler function that do something better. EDIT: seems that an indirection write use [si] and [di] cpu registers is really more slow that other tecnique, that is know but I really don't think that is so slow... -
Execution time difference between 32b and 64b, using static arrays
DelphiUdIT replied to lg17's topic in General Help
Replace: //l_vec3 := k_vect3_nul; //option 3 move(k_vect3_nul, l_vec3, sizeof(t_vect3)); //< Edit with sizof(type) -
Ehmmm, I explain bad, it's your update. The Palette come from Indy source repo, already in the recenct past he was added (form Oauth-ssl branch ?). All other points, I already know about them of course and I tried in the recent past the very first commit of TLS-OpenSSL with success. But I wanted to try the PR299 for historical test and to see if LivePreview was working like in the past (In the 11.x, 12, and 12.1 LivePreview was working with Indy Repo applied).
-
I install the new Indy from github and the old PR299 (with the same changes like always to maintain compatibility with Embarcadero environment and third parties) and all is working with RAD 12.2 Patch 1. I tried with the SSL DLL 3.1.5 for HTTPS and e-mail (not Oauth) and is working. Also the new OAuths in the components palette. I didn't try them. The new (but it worse) is that "LivePreview" should not be installed. It generate AV in the IDE on startup and shutdown.
-
I always do a clean install. I never used migration tools 'cause heavy issues in the far past. FIrst thing is backup the "Styles" and "Style Template" folders. Uninstall every getit packages (really fews). After I have disinstalled RAD STUDIO, I do those steps: 1) Delete the Windows registry (and all subfolders of course): HKEY_CURRENT_USER\Software\Embarcadero HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Embarcadero 2) Delete the folders (and subfolders) of my disk (YOURACCOUNTNAME is the name of my account): C:\Program Files (x86)\Embarcadero C:\Users\YOURACCOUNTNAME\AppData\LocalEmbarcadero C:\Users\YOURACCOUNTNAME\AppData\Roaming\Embarcadero C:\Users\Public\Documents\Embarcadero\Studio\23.0\Bpl C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp I left this path without delete anything, 'cause normally have no relevants for issues (only one time this locked an installation, I had to delete it to continue). C:\ProgramData\Embarcadero
-
There is also another resource on GitHub (in some topics of this forum there are some references about that): https://github.com/geoffsmith82/GmailAuthSMTP
-
With Indy is a little bit complex, you must install the github version and a branch "ssl-oauth". You must delete the original Indy shipped. But now some works were done and I don't know how is the status of Indy repository and relative branch. Alternative the is a thirdy tool not free (based on Indy): https://www.esegece.com/ You can try also ICS that is free, but I don't know if they have implemented Oauth protocol: https://wiki.overbyte.eu/wiki/index.php/ICS_Download Bye
-
If you have thirdy parts component installed try to delete them. If this don't help, you can try to do a clean install. After you have disinstalled RAD STUDIO !!!, do those steps: 1) Delete the Windows registry (and all subfolders of course): HKEY_CURRENT_USER\Software\Embarcadero HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Embarcadero 2) Delete the folders (and subfolders) of your disk (YOURACCOUNTNAME is the name of your account): C:\Program Files (x86)\Embarcadero C:\Users\YOURACCOUNTNAME\AppData\LocalEmbarcadero C:\Users\YOURACCOUNTNAME\AppData\Roaming\Embarcadero C:\Users\Public\Documents\Embarcadero\Studio\23.0\Bpl C:\Users\Public\Documents\Embarcadero\Studio\23.0\Dcp C:\ProgramData\Embarcadero Take care about you are doing.
-
EDIT: The answer is very "basic", I don't think I fully understand what you are asking ... I think it refers to differences from other languages where an "array" is automatically created in certain cases. In Pascal every object, variable, type or other must be known and defined before use. So in your case, knowing that you will have more "strings" to use you must predict their use using for example these solutions (there can be a thousand others that can be created, but these are some of those that the language and the predefined types handle natively, except for database that is another kind of container): Here same ref: https://docwiki.embarcadero.com/RADStudio/Athens/en/Structured_Types_(Delphi)#Arrays 1) static arrays; 2) dynamic arrays; 3) Lists; 4) Collections; 5) Dictionary; 6) Generics array; 7) .... 1) Static arrays are arrays with a predefined and immutable length, they are defined at compiler time and are fine when you know how long your list is at most. //This array contains 1000 strings (i.e. for example a thousand names) var myarray: array [0..999] of string; i: integer; myarray[0] := ' Mario'; myarray[1] := ' Maria'; //loop through the entire array for i:= Low(myarray) to High(myarray) do ShowMessage(myarray[i]); 2) Dynamic arrays: they are defined at compiler time (with the number of elements predefined at 0) and can be changed at runtime. var myarray: array of string; s: string; //Creates space for a thousand strings //I can change this number whenever I need it during the program, either increasing or decreasing it SetLength(myarray, 1000); myarray[0] := ' Mario'; myarray[1] := ' Maria'; //loop through the entire array, you can also use the same syntax with for //as for the static array. for s in myarray do ShowMessage(s); ........ ........ //At the end of the use, the space must be returned by setting the length to zero SetLength(myarray, 0); 3) and 4) and 5) They are specialized "containers": https://docwiki.embarcadero.com/Libraries/Athens/en/System.Generics.Collections 6) Generics can contain any "thing", in this example I show you the use with strings: var myarray: TArray<string>; s: string; //Create space for a thousand strings //I can vary this number whenever I need it during the program, both increasing and decreasing it SetLength(myarray, 1000); myarray[0] := ' Mario'; myarray[1] := ' Maria'; //loop through the entire array, you can also use the same syntax with for //as for the static array. for s in myarray do ShowMessage(s); ....... ....... //At the end of the use, the space must be returned by setting the length to zero SetLength(myarray, 0); 7) ... you can create your own array, for example with adavanced record: type //Really simple example TAnag = record private fName: string; fAge: integer; public property Age: integer read fAge write fAge; property Name: string read fName write fName; end; var Anag: TArray<TAnag>; s: TAnag; SetLength(Anag, 1000); Anag[0].Name := 'Mario'; Anag[0].Age := 21; Anag[1].Name := 'Maria'; Anag[1].Age := 18; //loop through the entire array, you can also use the same syntax with for //as for the static array. for s in Anag do ShowMessage(s.Name); ....... ....... //At the end of the use, the space must be returned by setting the length to zero SetLength(Anag, 0); A lot of functions in standard library return an array of object, like strings, integers of doubles. In this case you can assign to an empty generic or dynamic array the result ... automatically the array will be resized. Remeber to free it after used, example; var Data: TArray<string>; Combo: TComboBox; .... .... Data := Combo.Items.ToStringArray; ..... ..... SetLength(Data, 0);
-
In this post, Ian Barker reply about compatibility of 12.2 Patch 1: https://blogs.embarcadero.com/rad-studio-12-2-athens-inline-patch-1-available/#comment-11544
-
May be you should use 'I' and 'i' (case sensitive) in the events ?
-
May be I'm wrong, but the e-mail should go to support if you have an active subsricription otherwise sales ... I undesrtood weird ? In the past I asked to support to bump the number.
-
May be you have only expired the number of installation allowed (I think they are 3). Send an e-mail to customer service in Embarcadero and ask to higher that.
-
That is not true, May be the BPLs are compatible with old version (so the design component are OK), but the DCU are not. Try to compile a project, the new version say that some DCU (64 bit) use a different "System.xxx.xxx" version and of course they don't link together. I must recompile, and for "security", rebuild all components (Design and Runtime).
-
I don't think you can do something, except to capture the keyboard in the control (or in the OnKey... of the Form with the KeyPreview property active). In the event intercept the combination key and put tha value to ZERO (0). Take care that you must try wich event you can use ... not all the OnKey... events are the same scope. Edit: you can see an example how to implement the OnKeyDown event in a TControl descendent here: https://docwiki.embarcadero.com/RADStudio/Athens/en/Responding_to_Key-down_Messages Bye