Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Clément last won the day on August 26 2019

Clément had the most liked content!

Community Reputation

53 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I like my constructors to construct No loading, no process, no fancy stuff inside the constructor other than parameter assignment, variable initialization or other class creation.
  2. Clément

    language updates in 10.4?

    I'm not the only one who runs out of coffee! .
  3. ARC! I need coffee for my memory management
  4. I was not using FMX for serious development, so for me nothing will change at all. Except, maybe I will give FMX another try. Hopefully FMX will improve faster without ARM. There's a lot to catch either to match VCL counter part or Android Studio! What I really want to see: Bug Fixes RTL Improvement / optimization Debugger Stability Win32 AND Win64 IDE Quality Language Server Protocol for Delphi Language Enhancements: Managed Records Unified memory management across all platforms VCL High DPI Styles Support VCL Per Control Styling New VCL Components Updated VCL styles for HighDPI Windows API Updates
  5. Clément

    Biometric Template type

    That was fast! I past so many times over those pages but I guess I needed an extra pair of eyes! Thank you
  6. Hi, I'm using our beloved Delphi to capture fingerprints from a device and send them to another device. Usually, small Biometric Desktop USB device is used to capture fingerprints, and I send the data to controller (Door, etc). I specifically asked the controller manufacturer to have his device compatible with ANSI378-2004, as the biometric Desktop USB supposably captured in that format. The Controller manufacturer is saying that ANSI378-2004 template should begin with 46 4D, but of course none of the templates I capture begins with those bytes. And the desktop manufacturer says the format of his device is ANSI378-2004. Is there any library (or application) that can help me identify the biometric template format? I was ask to find something, but as it seems there's a strong copyright over those modules, there's no much information. Anyway, maybe someone can shed some light. Thanks
  7. TStringList has a Direct access of O(1), if you are accessing it unsorted, and this is as fast as it gets. But, when used as a dictionary, TStringlist must be sorted, and that's another ball game! When you add an element to a sorted list it goes through binary search ( O log n ) , same happens if you delete. When you need a lookup structure, TDictionary is the way to go as it's always O(1).
  8. Actually both. I needed to write a small interface between SAP (text files with a +/- ten thousand records) and another system that needed to check if a RFID card number was in a list. Depending on some card property (returned by the associated class, I had to call a certain REST API). I was using a simple sorted StringList, when I switched to TDictionary the performance boost was noticeable. Routines dropped from minutes to seconds. I replaced: idx := fCardList.indexof( aCardNumber ); if idx>-1 then lObj := TMyObject( fCardList.Objects[idx] ) with if fCardlist.TryGetValue( aCardNumber, lObj ) then case lObj.RoleType of [..] end; Faster and more readable! It depends. When performance is the key, I usually write a lot of comment to compensate the lack of readability. In those cases I know the routine must be lean and mean I will use the fastest data structure. When the routine is simpler, not called very much, or performance is not an issue then I move to a "more readable" coding approach.
  9. Actually I guess is the other way around! The more expert I get the more refactoring I do! As @Lars Fosdal said, cryptic code, WTF was I thinking code, Code that could benefit from modern RTL code if there's no performance penalty. For example: For lPair in SomeObjectList is slower than for i:= 0 to SomeobjectList.count-1. So I won't refactor it. Depending where the code is placed, I will use one form or the other. Replacing TStringList (used as dictionary) with a TDictionary/TDictionaryObject makes a huge diference!
  10. Have you compared your results with: https://github.com/maximmasiutin/FastMM4-AVX ?
  11. I'm still working on that reading routine . I can't read all 5Gb in memory (even in chunks). That particular file have lines over 64Kb of data without finding a CRLF. And of course my buffer was set to 64Kb! I'd go straight to 1Mb of data to walk back to the last CRLF. I'm not walking back the stream position per se. I'm using the buffer I just read to count the number of chars I need to go back, and set the stream back that amount of bytes. For other large files it works just fine, but there's always "that file" that messes everything.
  12. Hi, I'm using Delphi Rio to read some rather large log files ( some might have 5Gb). The encoding might be Ansi or UTF8. The log files are created from different systems and each encodes differently. I would like to use TFileStream ( or TBufferedFileStream) to read the file in chunks of 32k, but how can I be sure that an UTF8 character split between chunks will be decoded correctly?
  13. Hi, You can test with a tool I wrote. The community edition is free: http://www.dhs.com.br/dhsPinger.html