Leaderboard
Popular Content
Showing content with the highest reputation since 02/24/25 in all areas
-
Links to Web installer and ISO are available in https://my.embarcadero.com
-
I think we should stop feeding the troll.
-
TParallelArray Sort Performance...
Stefan Glienke replied to Steve Maughan's topic in RTL and Delphi Object Pascal
Just a few new numbers of a not yet released parallel pdq sort - using the benchmark code from this comment earlier in this thread Fill array (double), elements count: 500000 Start sorting ... RTL TArray.Sort (ms.): 47 RTL TParallelArray.Sort (ms.): 35 Spring TArray.Sort (ms.): 12 Spring TArray.Sort_Parallel (ms.): 3 Fill array (double), elements count: 5000000 Start sorting ... RTL TArray.Sort (ms.): 551 RTL TParallelArray.Sort (ms.): 128 Spring TArray.Sort (ms.): 136 Spring TArray.Sort_Parallel (ms.): 64 Fill array (double), elements count: 100000000 Start sorting ... RTL TArray.Sort (ms.): 12724 RTL TParallelArray.Sort (ms.): 1884 Spring TArray.Sort (ms.): 3035 Spring TArray.Sort_Parallel (ms.): 675 Again - these numbers are fluctuating a bit because the benchmark is a "run once" benchmark and it depends on the current CPU state etc - also I did not tweak the threshold and CPU count yet - simply calling TTask.Run from System.Threading to fork some slices into parallel execution. But overall it does not look too bad, doesn't it? -
Virtual class methods and properties
Stefan Glienke replied to pyscripter's topic in RTL and Delphi Object Pascal
It appears that Marco lacks the technical understanding to evaluate this issue. I left a comment. -
What are the performance profilers for Delphi 12?
loki5100 replied to dmitrybv's topic in General Help
Hi, i just made a new performance profiler for delphi 12 that have the advantage to work on iOS and Android too! it's about instrumenting the source code, it's work pretty well. you can found it here : https://github.com/MagicFoundation/Alcinoe?tab=readme-ov-file#alcinoe-code-profiler -
FWIW, my wife who speaks "human" tells me that my directness was indeed impolite. So sorry, I guess.
-
Programming with AI Assistance: A personal reflection.
David Heffernan replied to Juan C.Cilleruelo's topic in Tips / Blogs / Tutorials / Videos
AI is just a tool. It has its uses. It's not going to do everything. Yes it's over hyped. But that does not mean it has no value. As usual the value lies somewhere in between what the hypers and the doubters say. -
The claim that it compiles faster is bogus - prove me wrong. Most compile time from spring4d comes from generics, which I reported years ago. Also, my suggestion for third-party libraries is to pre-compile them, which removes any dependency on the project options in your project. Currently, Spring4d supports down to XE, and as long as that is the case, I am not putting even more conditionals into the code than there already are.
-
ICS V9.4 is ready for RAD Studio 12 Update 3, aka RAD Studio 12.3, and specifically the new 64-bit IDE. The ICS Delphi V9.4 design packages already have Windows 64-bit as a target, allowing them to be installed into the 64-bit IDE. The 32-bit IDE allows design packages to be built with target Windows 64-bit, but not installed. Note the 64-bit IDE does not support Windows 32-bit targets, only Windows 64-bit. If you use the IcsInstallVclFmx.groupproj Build Group, all design packages will be built for Windows 64-bit. All the main samples build OK in the 64-bit IDE, with a Windows 64-bit target being automatically added, unfortunately even when deliberately missing such as the OverbyteIcsNetMon sample that does work in Windows 64-bit. Currently, GetIt only works in read-only mode in the 64-bit IDE, so you will need to install ICS using GetIt from the 32-bit IDE, then start the 64-bit IDE and manually install the three design packages. The ICS V9.4 C++ Builder packages can be currently be installed successfully into C++ Builder 12.3 32-bit IDE for the Windows 32-bit target only. The 32-bit IDE should be able to build for Windows 64-bit and Win64x (Modern) as well, all the package paths are correct, but both targets currently give compiler errors. The C++ Windows 64-bit errors are four unresolved external, and the same error happens in Delphi 11, so should be fixable by someone with C++ knowledge. Building for Win64x (Modern) gives lots of undefined symbol errors due to RAD Studio being unable to import other packages compiled built with C++ Win64x, this error was reported six months ago for C++ 12.2 but is not fixed in 12.3. So ICS can not be used in the C++ 64-bit IDE that only supports Win64x (Modern), not Windows 64-bit. Separately, there is a new version of the DD Service Application Framework used by two of the ICS samples, adding support for 64-bit IDE Wizards. Available shortly from https://www.magsys.co.uk/delphi/ddservice.asp Angus
-
AppWatcher - Remote Application Management for Delphi Developers
maumsti posted a topic in I made this
Hello Delphi Praxis community, I'm excited to share my new open-source project, AppWatcher: https://github.com/mbaumsti/Delphi-App-Watcher Have you ever faced the challenge of managing dozens of Delphi applications running on multiple network machines? Finding a convenient time window to replace executables can be a real headache. That's why I developed AppWatcher. AppWatcher is a Delphi component and applications that allows you to remotely control the stopping and restarting of your Delphi applications across your network. Here's how it works: Integrate the TAppWatcherClient component into your Delphi applications. Deploy the AppWatcher Agent on your client machines. Use the AppWatcher Master application to remotely control all your applications. Key features: Remotely stop applications with user notifications. Automatically restart applications after updates. Avoid using RDP or physically accessing each machine. Minimize downtime and streamline deployment. If you're looking for a solution to simplify remote application management in your Delphi environment, I encourage you to check out AppWatcher. Contributions and feedback are welcome! Thank you, -
Issues migrating away from Indy
Remy Lebeau replied to Jan Breukelman's topic in ICS - Internet Component Suite
Just because modern OpenSSL is not directly in Indy itself yet does not mean there are no options for it at all. For example: https://github.com/JPeterMugaas/TaurusTLS Did you see this? https://www.indyproject.org/2024/10/20/sasl-oauth-support-finally-added-to-master/ -
It might also be worth considering a shift from forums to blogging platforms.
-
It depends a bit what the exact use case is, but it probably can be achieved with a class derived from TMemo with the following extensions: type TLinkMemo = class(TMemo) private FLinkedMemo: TLinkMemo; procedure WMVScroll(var Message: TMessage); message WM_VSCROLL; procedure DoScroll(var Message: TMessage); public property LinkedMemo: TLinkMemo read FLinkedMemo write FLinkedMemo; end; procedure TLinkMemo.DoScroll(var Message: TMessage); begin var saveLinkedMemo := FLinkedMemo; try FLinkedMemo := nil; Perform(Message.Msg, Message.WParam, Message.LParam); finally FLinkedMemo := saveLinkedMemo; end; end; procedure TLinkMemo.WMVScroll(var Message: TMessage); begin inherited; if FLinkedMemo <> nil then FLinkedMemo.DoScroll(Message); end; In FormCreate you just assign both LinkedMemo properties: procedure TForm1.FormCreate(Sender: TObject); begin Memo1.LinkedMemo := Memo2; Memo2.LinkedMemo := Memo1; end; To avoid having to register this new control TLinkMemo you can use an interposer class declared before the form, either in the same unit or in a separate unit used in the interface uses clause. type TMemo = class(TLinkMemo); Note, that editing one of the memo will break sync between the controls.
- 39 replies
-
- delphi xe7
- synchronize
-
(and 2 more)
Tagged with:
-
At program startup, detect the presence of the debugger (dynamically, or via a command-line parameter) and then use SetStdHandle() to replace STDIN with your own handle to a named pipe or anonymous pipe, and then write your desired debug data to that pipe. Or better, simply move your logic into a function that takes an input TStream as a parameter, and then decide whether you want to use a THandleStream for STDIN or a TStringStream or TMemoryStream for your debug data. On a side note - using a 'while (Position < Size)' loop is not a good idea. You should simply call Read() with a fixed-sized buffer, and let it tell you when it reaches the end of the stream, eg. SetLength(Buffer, SomeSize); repeat BytesRead := StdInStream.Read(Buffer, SomeSize); if BytesRead < 1 then Break; // do stuff until False;
-
Delphi TOIOBE index lifted in May 2022?
Kryvich replied to wuwuxin's topic in RTL and Delphi Object Pascal
1. Python -- First appeared 20 February 1991; 34 years ago 2. C++ -- First appeared 1985; 40 years ago 3. Java -- First appeared May 23, 1995; 29 years ago 4. С -- First appeared 1972; 53 years ago ... 10. Delphi -- Initial release 1995 Attention! Dinosaurs have won prizes! -
Agree. We do need a roadmap....
-
That's okay. I don't mind critique. I don't think I was being impolite; I was direct. I assumed that the OP was a hobby programmer (or not a professional) since: He needed to ask the question at all. He used 24 years old code copied verbatim from experts-exchange. Code that anyone with a bit of experience should be able to write on their own. He didn't provide any details about the exception such as where it occurred, call stack, etc. which to me shows that he might be able to read code but doesn't understand debugging. Hence the suggestion that he learns how to debug. Next step would be to explain how to debug.
-
https://joeduffyblog.com/2006/08/22/priorityinduced-starvation-why-sleep1-is-better-than-sleep0-and-the-windows-balance-set-manager/
-
To avoid repeating the unit throughout the source code, you can declare an alias at the top and only explicitly put the unit name there. That, however, only works for non-generic types and consts. I wish it would also work for generics and routines.
-
Programming with AI Assistance: A personal reflection.
PeaShooter_OMO replied to Juan C.Cilleruelo's topic in Tips / Blogs / Tutorials / Videos
All this is grand but at the end I still have to tell the "AI" what to do, then keep correcting it by repeating what I said but with additions and changes and then again go over everything it gave me just to make sure it did it right. That is time I could have spent doing a proper documented design and then coding everything myself. I started coding because I love coding. As such I don't dread spending time to type out code to get stuff done and so I don't need a Artificial Non-Intelligence to do my coding for me. Asking A"N"I for information is like walking a mine field. Numerous times while testing A"N"I it gave me totally incorrect answers based on poor data from the internet or even non-existing functions. There is nothing the A"N"I can tell me that I cannot already learn from people like @PeterBelow, @David Heffernan, @Jim McKeeth, @Darian Miller, @Uwe Raabe, @Anders Melander, @Remy Lebeau, @Dalija Prasnikar, (missed a bunch, I am sure). Most of them have already laid down a rich treasure of knowledge and Delphi wisdom on the internet. Willingness to search and read on my part is required though. -
How do I create an Android simulator under Delphi 11.3 ?
Dave Nottage replied to FreeDelphiPascal's topic in FMX
Most likely. The only bearable way I have found of using an Android emulator is to have a Mac with a silicon chip (e.g. M1, M2 etc), and run Arm64 emulators on it. Delphi can communicate with them using the relevant adb commands, along with a secure shell client such as PuTTY, all of which I describe in this video. -
OK, I'm moving as far away from hand coding as possible. So, I'm looking for a company that wants to do the same. If you have new projects or legacy systems built with Delphi and you are looking to hire someone to replace coders or you just want to get started now with the AI code generating future, I'm available. PM me with your contact information and I'll be in touch.
-
Ummm.. if you are worried about being left behind, why are you still here, still using Delphi? Surely you should be hanging out with all the cool kids using flavor of the week? 🤷♂️
-
Guidance on FreeAndNil for Delphi noob
Dalija Prasnikar replied to Paul Dardeau's topic in RTL and Delphi Object Pascal
FreeAndNil is something that you will need to use rarely (it might depend on the kind of code you are writing). In places where your code needs it logically it will be obvious that you need it and everywhere else you can use Free. The point that FreeAndNil can help you avoid errors and mistakes is full of holes. First, simple access after Free is usually easy to catch either by looking at the code (local variables) or by using memory manager in debug mode or other specialized tools. Next, FreeAndNil nils only single reference to the object instance. If you have multiple ones you will still have to deal with dangling pointers and you will need to learn how to use previously mentioned tools. Most of the problems with memory management in Delphi are caused by having multiple references to single manually managed object instance as such code is more complex. This is exactly the place where FreeAndNil cannot help you, but where using it will give you false sense of security. Another reason against using it everywhere, is that it obscures the code intent. Logically, FreeAndNil means that variable will be reused and this is important information. If you use it everywhere, you will have mush harder time reading the code and understanding its intent. And code which is harder to understand is also harder to maintain in the long run. Of course, that can be solved with comments, but then you will have to use them everywhere or you will never know whether some comment is missing somewhere. Manual memory management requires some discipline. thinking about the code you are writing enforces the discipline and makes you a better programmer. Taking the "easy" path where you will slap FreeAndNill everywhere just so you can avoid accidental mistakes and thinking is going to cost you at some point. Many existing codebases where it is used everywhere cannot be easily migrated to not using it as it can be hard to determine where it is needed and where it is not (except for local variables) and they need to continue using it indefinitely in all places, as the only thing worse than using FreeAndNil everywhere is using it randomly. Consistence in code is the king. In my codebase I have less than 50 places where I am using FreeAndNil (I cannot tell the exact amount as I have many smaller projects and it is not easy searching through them as some contain fixed VCL code which uses FreeAndAil a lot, so I cannot easily count usage in my files only) One of the advantages of being a new Delphi developer is that you don't have a lot of existing code where FreeAndNil was used in places where it is not needed and now is the right time for you to decide whether you want to pollute your code with FreeAndNil and stick with it forever or not.