-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
I will be less active for a few weeks
Fr0sT.Brutal replied to Lars Fosdal's topic in Community Management
Come to us, we have those vaccines at every corner ๐ -
Unicode string - how element iterating?
Fr0sT.Brutal replied to vfbb's topic in RTL and Delphi Object Pascal
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 :)) -
List of usable RegEx for source code
Fr0sT.Brutal replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
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. -
Unicode string - how element iterating?
Fr0sT.Brutal replied to vfbb's topic in RTL and Delphi Object Pascal
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. -
List of usable RegEx for source code
Fr0sT.Brutal replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
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 -
List of usable RegEx for source code
Fr0sT.Brutal replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
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. ๐ -
Returning a dynamic array from DLL
Fr0sT.Brutal replied to Tim Chilvers's topic in RTL and Delphi Object Pascal
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 ๐ -
List of usable RegEx for source code
Fr0sT.Brutal replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
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. -
Google Tests (unit testing framework) working with Embarcadero C++ clang compiler?
Fr0sT.Brutal replied to Roger Cigol's topic in General Help
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- 26 replies
-
- c++
- google tests
-
(and 1 more)
Tagged with:
-
List of usable RegEx for source code
Fr0sT.Brutal replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
What about them? -
[patch] Samples: change unsafe Integer(Pointer) typecasts to W/LPARAM
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in ICS - Internet Component Suite
That's weird. I based them on V8.66 - Part 10. Probably that encoding issue of Francois' name is the reason. -
List of usable RegEx for source code
Fr0sT.Brutal replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
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. -
List of usable RegEx for source code
Fr0sT.Brutal replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
I see, but in general it's not a mistake. "Hint" level, not even "Warn" ๐ -
Google Tests (unit testing framework) working with Embarcadero C++ clang compiler?
Fr0sT.Brutal replied to Roger Cigol's topic in General Help
Anyway I guess adopting DUnitX would be much easier than trying to glue with completely different platform- 26 replies
-
- c++
- google tests
-
(and 1 more)
Tagged with:
-
List of usable RegEx for source code
Fr0sT.Brutal replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
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 -
Google Tests (unit testing framework) working with Embarcadero C++ clang compiler?
Fr0sT.Brutal replied to Roger Cigol's topic in General Help
Is there a trouble with DUnitX? CB consumes Delphi code AFAIK.- 26 replies
-
- c++
- google tests
-
(and 1 more)
Tagged with:
-
+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.
-
Google Tests (unit testing framework) working with Embarcadero C++ clang compiler?
Fr0sT.Brutal replied to Roger Cigol's topic in General Help
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?- 26 replies
-
- c++
- google tests
-
(and 1 more)
Tagged with:
-
Range Check Error ERangeError
Fr0sT.Brutal replied to david_navigator's topic in RTL and Delphi Object Pascal
Remy maintains Indy, ICS is maintained by Francois and Angus. Anyway, all sources should be examined for such casts -
Range Check Error ERangeError
Fr0sT.Brutal replied to david_navigator's topic in RTL and Delphi Object Pascal
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 -
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
-
USB Keyboard + USB host-capable phone or Bluetooth keyboard ๐
-
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;
-
Showing a non-closable modal form eliminates such issues
-
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