Jump to content

Fr0sT.Brutal

Members
  • Content Count

    2268
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by Fr0sT.Brutal

  1. Fr0sT.Brutal

    I will be less active for a few weeks

    Come to us, we have those vaccines at every corner ๐Ÿ™‚
  2. Not all applications need rendering, don't forget non-visual text processing tasks. I guess these ones are more critical to support bleeding edge standards (imagine someone would strongly urgently perform full-text search among many posts written in Quenya :))
  3. Fr0sT.Brutal

    List of usable RegEx for source code

    Stefan answered better than I could. In addition, don't you do premature optimization here? In numerous cases reallocs are not an issue even in multithread apps, and really heavy multithread tasks will try avoiding allocs at all.
  4. Relying on OS facilities is simpler but they depend on updates (Unicode committee constantly adds more and more weird combos) so own ICU seems the most reliable way.
  5. Fr0sT.Brutal

    List of usable RegEx for source code

    FastMM already reserves some space after a string/array so manual reservations are unneeded where it is used. F.ex., the following test case procedure TForm1.Button2Click(Sender: TObject); var arr: array of byte; i: Integer; begin for i := 0 to 30 do SetLength(arr, length(arr)+1); end; only caused four reallocations
  6. Fr0sT.Brutal

    List of usable RegEx for source code

    There's no super-universal algo for every case. ๏ปฟDealing with single-threaded / several-threaded / multi-threaded and non-performance-demanding / performance-critical applications should be done via different approaches. ๐Ÿ˜‰
  7. Fr0sT.Brutal

    Returning a dynamic array from DLL

    General approach is to write results to a memory allocated by caller. To handle beforehand unknown number of elements, there are options: 1 - limit a maximal number of elements and always allocate memory for this number 2 - caller allocates memory and passes number of elements he had allocated space for, function returns how much elements it had copied (if ResultCnt <= AllocatedCnt) or how much elements were skipped (if ResultCnt > AllocatedCnt) 3 - caller calls function with NULL memory, function returns how much elements it could copy, caller allocates memory and calls function again P.S. Learn WinAPI, it has pretty good approaches to interacting with DLLs. Everything I know on this subject, I took from WinAPI practice ๐Ÿ™‚
  8. Fr0sT.Brutal

    List of usable RegEx for source code

    Sure they will, but we're going too deep in details here. There's no super-universal algo for every case. Dealing with 10 and 10000 items should be done via different approaches.
  9. I personally use attributes only to mark Setup/Teardown methods, rarely to ignore some parts. The former could be achieved by adding empty virtual methods to TTestSuite
  10. Fr0sT.Brutal

    List of usable RegEx for source code

    What about them?
  11. That's weird. I based them on V8.66 - Part 10. Probably that encoding issue of Francois' name is the reason.
  12. Fr0sT.Brutal

    List of usable RegEx for source code

    Contrary, you can mess with reservation and optimization for 10-item-arrays. FastMM already reserves some space after strings and arrays so reallocating won't happen every time.
  13. Fr0sT.Brutal

    List of usable RegEx for source code

    I see, but in general it's not a mistake. "Hint" level, not even "Warn" ๐Ÿ™‚
  14. Anyway I guess adopting DUnitX would be much easier than trying to glue with completely different platform
  15. Fr0sT.Brutal

    List of usable RegEx for source code

    What's wrong with this one? I'd add checks for integer typecasting: "Integer(..." and "Cardinal(..." to catch incorrect pointer casts which will likely fail on x64
  16. Is there a trouble with DUnitX? CB consumes Delphi code AFAIK.
  17. Fr0sT.Brutal

    How to "dim" a TabSheet?

    +1 Semi-transparent topmost Panel-dimmer with progress/label/cancel button on it, that's all. Usually it's invisible and appears only when needed.
  18. What's so special in "testing framework"? It must run tests, have convenient way of adding tests, maybe pretty GUI and, more important, file output to most used formats. Talking about checking methods, AreEqual, AreNotEqual and WillRaise are enough. So what's the demand?
  19. Fr0sT.Brutal

    Range Check Error ERangeError

    Remy maintains Indy, ICS is maintained by Francois and Angus. Anyway, all sources should be examined for such casts
  20. Fr0sT.Brutal

    Range Check Error ERangeError

    This is exactly the case when devs do things wrong, not following OS vendor's recommended way, and it kinda works for years but then BADABOOM happens. All external functions must use their own typedefs. If WinAPI header says it wants DWORD and WPARAM, don't try using Cardinal/Integer
  21. Fr0sT.Brutal

    Determining why Delphi App Hangs

    Sure! But resolvable. I, OTOH, like the fact that modal dialogs won't block internal message queue. In my apps Windows' messaging is used massively for communication between threads and I can open some child dialog without stopping the main workflow
  22. Fr0sT.Brutal

    Delphi 10.4 Portable

    USB Keyboard + USB host-capable phone or Bluetooth keyboard ๐Ÿ˜‰
  23. Fr0sT.Brutal

    Determining why Delphi App Hangs

    What's wrong with timers in this situation? Well, I'm not a App.PM's fan and I last used it quite long ago but some cases just don't worth much efforts. Anyway if one dislikes App.PM, and if a process could be split, he can use PostMsg procedure TForm.MsgDoNext; message MSG_DONEXT; begin DS.Next; if DS.Eof then Exit; ..do stuff.. PostMessage(Self.Handle, MSG_DONEXT, 0, 0); end;
  24. Fr0sT.Brutal

    Determining why Delphi App Hangs

    Showing a non-closable modal form eliminates such issues
  25. Fr0sT.Brutal

    Delphi 10.4 Portable

    I'm sure there is (pirated surely so no further discussion). Obviously they're not made by magicians so you can make it yourself as well (I remember there was software called Thinstall for such purposes). I'm not sure it will be strictly legal but if you own a legal copy, at least your conscience will be clear
ร—