Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/16/23 in all areas

  1. I think we are down to the real issue here: one's own personality. I rather filter out some ego-stroking to get good peer-reviewed advice than some untested garbage but I know people that are already offended when you say: "Sorry, but there is a slight possibility of you being not 100% correct here" (actually meaning: you could not be more wrong). People with a personality like that are usually the ones complaining about SO. I am worried that their solution is using AI-provided help that is completely unchecked and will turn into the software that runs the world in the future.
  2. @David Schwartz But that is exactly the point: ChatGPT just blurts out unchecked stuff someone might naively use and if it compiles ... ships it. No matter what happens then. And that is simply unacceptable and dangerous, no matter how fascinating (or in my case not) on may consider the subject.
  3. Yellow all, https://github.com/TommiPrami/Delphi.GetProcessReservingFile Made quick and dirty port of code found from here: https://devblogs.microsoft.com/oldnewthing/20120217-00/?p=8283 If find anything to fix or make code better, feel free to send pull request or so... -Tee-
  4. Dalija Prasnikar

    Creating FMX controls in a background thread

    There is way more in UI thread safety than thread safe communication between controls. In Windows API windows can communicate across thread-boundaries, but each window still belongs and is bound to a thread where it is created and that thread's message queue. This basically prevents you to create window control in one thread (background) and use it in another (main).
  5. Lajos Juhász

    Creating FMX controls in a background thread

    You can have a strong belief that the Earth is flat but that will not change the fact that isn't. Yes, I know that the Flat Earth Society has members from all around the globe.
  6. Alexander Sviridenkov

    Which library for "Small" Graphics Application, GR32, GDI+, Skia, ...

    IMHO such tasks should not depend on graphic library and should not require low-level graphics knowlege. What you need is object manipulation library, like vector diagram editor. Here is simple implementation using HTML Component Library (compiled and project source). 20 minutes, 50 lines of code. You can drag images from lbrary at right side, select it, resize, rotate, delete (Del key): https://delphihtmlcomponents.com/ImageMove.zip It can use Direct2d or GDI+ or FMX canvas on any platform - doesn't matter.
  7. Stefan Glienke

    Some sneak peek of some performance numbers with 11.3

    Everything but windows uses libc memmove - we can assume they do their job and have optimized it - similar to FillChar which then uses memset. Until Embarcadero gets their sh*t together with their llvm compilers not generating kinda -O0 quality code personally I don't care about Linux performance anyway.
  8. Just an excerpt from the mormot2 tests (win32, win64 numbers look similar) running on an i7-12700 10.4.2 - Custom RTL: 297,648 assertions passed 285.77ms FillChar in 9.37ms, 41.4 GB/s Move in 22.25ms, 14 GB/s small Move in 25.05ms, 4.3 GB/s big Move in 25.06ms, 15.5 GB/s FillCharFast in 8.21ms, 47.3 GB/s MoveFast in 42.99ms, 7.2 GB/s small MoveFast in 17.15ms, 6.3 GB/s big MoveFast in 26.59ms, 14.6 GB/s 11.3 - Custom RTL: 297,648 assertions passed 247.86ms FillChar in 6.37ms, 60.9 GB/s Move in 10.10ms, 30.9 GB/s small Move in 17.98ms, 6 GB/s big Move in 14.77ms, 26.4 GB/s FillCharFast in 7.37ms, 52.6 GB/s MoveFast in 42.76ms, 7.3 GB/s small MoveFast in 16.83ms, 6.5 GB/s big MoveFast in 27.69ms, 14.1 GB/s The first 4 are RTL functions, last 4 are mormot implementations. Take this with a grain of salt though as these are just unit tests and not a performance benchmark but it gives a little idea. FillChar has already been improved by me for 11.1 and Move will be in 11.3 (along with other improvements in the core RTL) No, this is not suddenly making your applications twice as fast but solves the old complaints of FillChar and Move being sooo slow. 😉
  9. Probably ImageEN should do the job, but it is not free. It has a lot of demos you can check.
  10. Reading your post, I think you are looking for a library which does exactly what your application has to do. That would be marvelous but forget it! You actually need a library (or even none since you can use Delphi built-in function) capable of doing primitive graphic manipulation and display. Speaking about the main image - as you name it - your application should have a model of what is expected on screen and a rendering engine. The model is a list of operation applied to images. The list is ordered. By manipulation, I mean and image, and an operation such as position at X/Y coordinate, rotate of a given angle, scale with a given factor, crop this way, mask like that, and so on. The user interaction solely work on the list. When the user want to move an image, you use mouse event and the list to find which (sub)image if on the top and the user want - for example - drag. At each user interaction, you do the rendering. At the end, instead of rendering on screen, you render to a standard bitmap that you write as JPG or other image file format. Got the idea?
  11. uligerhardt

    Lib for Getting process name that has the file open

    FWIW: There's also IFileIsInUse. E.g. delphi - Checking if the file is in use and by which application? - Stack Overflow. But it only works for apps that support it.
  12. Fr0sT.Brutal

    Software licensing system recommendations

    .superdupersecure 🙂
  13. Uwe Raabe

    TNumberBox and scientific notation (exponential format)

    Seems like a feature request in QP would be appropriate.
  14. David Heffernan

    TNumberBox and scientific notation (exponential format)

    What's wrong with a simple edit control?
  15. That would be suicide not murder, because wrong answers kill only if the answer is accepted without any critical thought at all. (OK, it would probably kill about 90% of all people. Fair enough.)
  16. That's what I was talking about. AI won't kill us in the way you have seen it in the television. It will kill us with wrong answers.
  17. Because there isn't (at least not in the RTL) - ChatGPT is making that up (as so often).
  18. EugeneK

    How to draw a semitransparent ellipse on a canvas?

    You can easily do it with Direct2D // ... uses Winapi.D2D1, Vcl.Direct2D; // ... procedure TForm1.Button3Click(Sender: TObject); begin if (TDirect2DCanvas.Supported) then begin var D2DCanvas := TDirect2DCanvas.Create(Canvas, ClientRect); try D2DCanvas.Font.Assign(Font); D2DCanvas.RenderTarget.BeginDraw; D2DCanvas.RenderTarget.SetAntialiasMode(D2D1_ANTIALIAS_MODE_PER_PRIMITIVE); D2DCanvas.Brush.Color := clRed; D2DCanvas.Brush.Handle.SetOpacity(0.5); D2DCanvas.Ellipse(10, 10, 200, 200); D2DCanvas.RenderTarget.EndDraw; finally D2DCanvas.Free; end; end end;
  19. Uwe Raabe

    String literals more then 255 chars

    I for myself have never spent any time on this limitation, because I never had to (and probably never will) write that long string literals. Not only that the style guide is much stricter, it is just way less readable and thus I would never even think of doing that. In addition I would literally slap such code in the face of the developer presenting it to me. So better don't count me in here.
  20. PeterBelow

    String literals more then 255 chars

    The compiler accepts this without problems: const CTest = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'+ '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'+ '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'+ '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'+ '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'+ '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'+ '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'+ '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'+ '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'+ '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ;
  21. I've used memory mapping for sure. But it sucks for this application which wants messages. Important to use the right tool for each job.
  22. Lars Fosdal

    Delphi 11.3 is available now!

    The What's New presentation made a point of the number of issues that were fixed for 11.x versions - nearly 3k of them. The amount of issues highlights the need for a change in their development process. The marketing driven release process needs to come to an end, and a quality driven release process to replace it. There are many good developers in the team, but there is not enough time/resource to ensure that quality is the primary goal. There also seems to be developers that write code that really is sub par, but no process that corrects it. Instead, it seems to be, "let's add this cool new feature for the sales guys and release it on this pre-determined date to make sure marketing can maximize their campaigns". That needs to change.
  23. Lajos Juhász

    FreeAndNil 10.4 vs 10.3.1 and Pointers

    Nice catch, first read the full documentation of the procedure: Embarcadero Technologies does not currently have any additional information. If you're for some strange reason not satisfied with the official documentation check out the source code: { CPPFreeAndNil is a helper to implement a C++ type-safe FreeAndNil }
  24. Ann Lynnworth

    Does anyone know if Nils Haeck is OK ? SimLib and NativeXml

    I use & maintain a fork of TNativeXml, with permission from nils, in the ZaphodsMap project which is open source on sourceforge, here: https://sourceforge.net/p/zaphodsmap I have not corresponded with Nils in more than 10 years. Good to know he is still posting on LinkedIn. FWIW, I still prefer to use TNativeXML when I need to iterate through nodes of XML.
×