Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/18/21 in all areas

  1. Hello, this is the announcement that I just re-released a classic Delphi component called TComPortDrv. The new release is in agreement of the original author and the license was changed to Apache 2.0 by this. What is this non-visual VCL component about? It is an encapsulation of the Windows RS232 API so you can send and receive data via real and virtual COM-ports. The new version works from 10.4.1 Sydney onwards (due to the use of $(Auto) for the LibSuffix setting of the packages. You should get it compile on older versions though as well. Where can I get it from? https://github.com/MHumm/ComPortDriver/releases/tag/V3.0 What got changed in this V3.0 * made compilable with Unicode Delphi * fixed a severe bug in the data receive event which would overflow the internal buffer when using this component with a high baudrate (over 230400) * changed all external comments to XMLDOC * added a method to get a list of available COM-ports (only as COM3, COM4 etc. as of now) * added SetCommBreak and ClearCommBreak methods * made DelayForRX function a method now and based its calculation on the current serial settings * changed the component Icon Enjoy TurboMagic
  2. TurboMagic

    New/old component re-released: TComPortDrv

    Thanks for notifying me. Fixed now, so you can enjoy it now 😉
  3. First because 64bit does not suffer from the "virtual method glitch". Second because even with a class implementing the IComparer interface you get adjustor thunks which you don't have with the default comparers provided by Generics.Collections.Defaults because those are directly crafted IMTs (interface method tables) BTW: you again unnecessarily slow down your benchmark results by putting everything into the dpr main. And you are comparing different things - your CustomBinarySearch uses CompareValue which is a function call. So if you decide to roll your custom implementation then don't dumb it down: function GetName_CustomBinarySearch2(const aData: TArray<TDataLine>; const aItem: TDataLine): string; var L, H, i, c: Integer; begin L := 0; H := High(aData); while L <= H do begin i := L + (H - L) shr 1; c := aData[i].SeqNo - aItem.SeqNo; if c < 0 then L := i + 1 else if c > 0 then H := i - 1 else Break; end; if L <= H then Result := aData[i].CustomName else Result := ''; end; makes it almost twice as fast as your implementation. I decided to use the subtract approach as you did with the comparers - keep in mind this only works if there cant be an overflow which wont happen if SeqNo is just 0..MaxInt Anyhow at least in this benchmark it did not make any noticable difference to writing: if aData[i].SeqNo < aItem.SeqNo then L := i + 1 else if aData[i].SeqNo > aItem.SeqNo then H := i - 1 else Break;
  4. miab

    Zeos 7.3 entered the beta phase.

    ZEOS 8.0.0 (trunk) svn 7386 Works with: Lazarus 2.0.12(fpc 3.2.0) NEW: TryKeepDataOnDisconnect - possibility to work without connection to the server https://zeoslib.sourceforge.io/viewtopic.php?f=50&p=168409#p168409 https://sourceforge.net/projects/zeoslib/ https://github.com/marsupilami79/zeoslib There have been a few fixes. Feel free to download, testing, use, submit comments. Michał
  5. No library used, just a simplest implementation of hash map. Use it as you need. I'm hearing about this the first time ever, and it seems to me very strange. Also, a single hash map can be organized on top of TDataLine user objects without any additional objects (via additng Next and Hash fields directly to TDataLine). Two maps, however will need another one pair of such properties, which is not so graceful, but also possible, if we speak about the extreme case. I've only tested with 100k items. I can see the effect. However, it's not clear for me why this happens.
  6. Some very impressive numbers, x32 and x64!
  7. Here is my try. I've changed a lot in existing code (mentioned early comparers, equality comparers, etc.). Also, I've replaced returned string type in functions by PString, just because otherwise string handling takes too much time and algorythms comparison becomes not interesting. As well I've added my own minimalistic implementation of hash maps (not universal). mapstest.zip
  8. Vincent Parrett

    Profiler for Delphi

    Don't stop now.. we're all here waiting for the exciting news (and screenshots) 😉. I've long been envious of devs who were able to use vtune (and other tools which didn't support delphi ) - this would be massive if you pull it off!
  9. KodeZwerg

    IsElevated

    RunElevatedSupport.pas is what I use. Call IsElevated (Boolean) thats all you need to do. Also offers to elevate code pieces. I love it.
  10. Lars Fosdal

    10.4.2 IDE Compilation Memory leak

    I commented on this one. https://quality.embarcadero.com/browse/RSP-32768 https://quality.embarcadero.com/browse/RSP-32792 and 93 are duplicates of that one, it seems.
  11. miab

    Zeos 7.3 entered the beta phase.

    ZEOS 8.0.0 (trunk) svn 7339 Works from Delphi 7 to Delphi 10.4.2 Sydney (and Lazarus 2.0.12 - fpc 3.2.0) https://zeoslib.sourceforge.io/viewtopic.php?f=50&p=165990#p165990 https://sourceforge.net/projects/zeoslib/ https://github.com/marsupilami79/zeoslib There have been a few fixes. Feel free to download, testing, use, submit comments. Michał
  12. microtronx

    PaxCompiler

    Guys, have heard about htscripter from Delphihtlmcomponents? We are using it as runtime interpreter and it is working very good and stable plus it registers classes with only few lines of code (rtti) and the most important thing is: it is still developed and optimized by the developer. We have switched over from jvInterpreter! and it was a very good decision!
×