-
Content Count
721 -
Joined
-
Last visited
-
Days Won
53
Everything posted by Vincent Parrett
-
VSoft.UUIDv7 - a Delphi implementation of UUIDv7 (RFC 9562)
Vincent Parrett replied to Vincent Parrett's topic in I made this
I rely on TGUID.NewGuid to generate the random parts - under the hood it uses CoCreateGuid which uses windows cryptographic apis - which are far more random than Delphi's Random function (and faster). -
VSoft.UUIDv7 - a Delphi implementation of UUIDv7 (RFC 9562)
Vincent Parrett replied to Vincent Parrett's topic in I made this
Updated to add some new methods type TUUIDV7Helper = record class function CreateV7 : TGuid;overload;static; class function CreateV7(const dt : TDateTime) : TGuid;overload;static; class function CreatedUTC(const guid : TGUID) : TDateTime;static; class function IsV7(const guid : TGuid) : boolean;static;inline; class function Version(const guid : TGuid) : integer;static;inline; end; -
VSoft.UUIDv7 - a Delphi implementation of UUIDv7 (RFC 9562)
Vincent Parrett replied to Vincent Parrett's topic in I made this
for v7 yes - in theory just reverse the process that inserts the unix epoc timestamp and convert to datetime. I would have created a record helper for TGuid - except the rtl already has one (where all the useful methods are) - and only 1 helper per type can be in scope at a time. -
Microsoft Trusted Signing service
Vincent Parrett replied to Angus Robertson's topic in General Help
Interesting how there is no mention that to use MFA you need to pay for Entra - so they have quietly just raised the cost of entry for Azure. -
Microsoft Trusted Signing service
Vincent Parrett replied to Angus Robertson's topic in General Help
I got the same email and also see the "get a free preimium trial to use this feature" message. Typical Microsoft bait and switch - suck you in with what seems like a low priced offering, only to force another down your throat. So to use azure now in any form, you need to pay AU$9 per user per month just for Entra ID (previously Azure Active Directory). -
updated Delphi64RTL intel ipp onetbb
Vincent Parrett replied to RDP1974's topic in RTL and Delphi Object Pascal
I don't see the source to any of the dll's in those repos. I get that you are using those projects to build the dll's, but the fact remains that they are black boxes - I cannot tell exactly what they do, what their provenance is and whether I can trust them. I'm not trying to dismiss your work as invalid, just pointing out that and open source project distributing dll's need to provide a way for them to be built, or they must come from a trusted source (and usually code signed). -
Embedded javascript engine in Delphi
Vincent Parrett replied to duzzell's topic in Network, Cloud and Web
If you have Delphi 11 or 12 enterprise or architect edition, then there is an aws sdk library in GetIt - if not - https://www.appercept.com/ (the author of the one in getit) are close to releasing a commercial version which will work with pro edition. The library is really well thought out, follows the same conventions as the official aws sdks which makes it pretty easy to use. -
updated Delphi64RTL intel ipp onetbb
Vincent Parrett replied to RDP1974's topic in RTL and Delphi Object Pascal
Certainly looks interesting, but you are asking people to trust the dll's for which no source is provided? How were these dll's compiled? It's one thing to provide binaries from a trusted source (for example intel) but to provide self compiled unsigned dll's - with todays supply chain attacks etc - not going to fly. -
VSoft.Ulid - A Delphi Implementation of ULID for Delphi XE2 or later.
Vincent Parrett posted a topic in I made this
Hi All I created a Delphi implementation of ULID - A Universally Unique Lexicographically Sortable Identifier. ULID's are a better option than GUIDs where sorting is needed 128-bit compatibility with UUID 1.21e+24 unique ULIDs per millisecond Lexicographically sortable! Canonically encoded as a 26 character string, as opposed to the 36 character UUID Uses Crockford's base32 for better efficiency and readability (5 bits per character) Case insensitive No special characters (URL safe) Monotonic sort order (correctly detects and handles the same millisecond) https://github.com/VSoftTechnologies/VSoft.Ulid -
VSoft.Ulid - A Delphi Implementation of ULID for Delphi XE2 or later.
Vincent Parrett replied to Vincent Parrett's topic in I made this
You have a typo PUInt64(@result.FRandomness0)^ := random; << should be FRandomness2 I did actually implement that and it did make a big difference - it's in the f-optimise branch - I haven't merged the changes in to main just yet. I also removed the call to default(TUlid) since we're setting all the fields anyway (as pointed out by Stefan!). I would say that codegen on later versions of delphi is only slightly better than XE8 - mostly it's improved rtl methods. I'm no assembly expert though so take that comment with a pinch of salt. 12.1 is slightly faster due to some div by const optimizations (again thanks to Stefan). -
VSoft.Ulid - A Delphi Implementation of ULID for Delphi XE2 or later.
Vincent Parrett replied to Vincent Parrett's topic in I made this
This made no discernable difference. Your version of avoiding the move was slightly faster than the variant array idea. Thanks to a bunch of suggestions from Stefan & Kas it is now a lot faster than the c# version I was comparing it to (64bit create - 63ns) - I did also add some validation to the parse method which slowed it down again! The big speedup in the Parse method was avoiding TEncoding.GetBytes - which uses a dynamic array (slow). D 11.3 - 32bit ------------------------------------------------------------------- Benchmark Time CPU Iterations ------------------------------------------------------------------- TUlid.Create 52.1 ns 51.6 ns 10000000 TUlid.Parse - AnsiString 28.4 ns 28.5 ns 23578947 TUlid.Parse 33.7 ns 33.0 ns 20363636 TUlid.ToString 32.0 ns 32.5 ns 23578947 D 11.3 64bit ------------------------------------------------------------------- Benchmark Time CPU Iterations ------------------------------------------------------------------- TUlid.Create 10.9 ns 11.0 ns 64000000 TUlid.Parse - AnsiString 28.1 ns 28.5 ns 23578947 TUlid.Parse 29.2 ns 29.5 ns 24888889 TUlid.ToString 29.4 ns 29.3 ns 22400000 D12.1 32bit ------------------------------------------------------------------- Benchmark Time CPU Iterations ------------------------------------------------------------------- TUlid.Create 51.2 ns 51.6 ns 10000000 TUlid.Parse - AnsiString 28.5 ns 28.3 ns 24888889 TUlid.Parse 30.2 ns 30.5 ns 23578947 TUlid.ToString 30.2 ns 29.3 ns 22400000 D 12.1 64bit ------------------------------------------------------------------- Benchmark Time CPU Iterations ------------------------------------------------------------------- TUlid.Create 8.94 ns 8.79 ns 74666667 TUlid.Parse - AnsiString 28.1 ns 28.5 ns 26352941 TUlid.Parse 32.8 ns 32.2 ns 21333333 TUlid.ToString 33.0 ns 33.0 ns 20363636 Anyway, that's more than fast enough - given that this is more than likely used to generate id's for use with databases or in messaging - it's unlikely you would ever hit a performance issue with this! https://github.com/VSoftTechnologies/VSoft.Ulid/tree/f-optimise I'll merge into main shortly. Edit : forgot to mention, the reason 32bit is still slower than 64bit is due to way the compiler does Int64 division (calls a helper function). -
VSoft.Ulid - A Delphi Implementation of ULID for Delphi XE2 or later.
Vincent Parrett replied to Vincent Parrett's topic in I made this
@Stefan Glienke is way ahead of you already sent me a few suggestions. Using a variant record case Boolean of True: ( FRandomness0 : byte; FRandomness1 : byte; FRandomness2 : byte; FRandomness3 : byte; FRandomness4 : byte; FRandomness5 : byte; FRandomness6 : byte; FRandomness7 : byte; FRandomness8 : byte; FRandomness9 : byte); False: ( FRandomness0_1 : Word; FRandomness2_9 : UInt64); Did squeeze a out few ns better performance. I'll test your idea though - because micro optimising is more fun the boring stuff I was working on... 😉 -
Upgrading to new RAD Studio vs. project Lib names
Vincent Parrett replied to w0wbagger's topic in General Help
I can only suggest looking at the dpk files in the rs source folders - e.g BuildWinRTL.dpk - seems like they didn't ship dpk's for anything other than rtl. You might be able to use tdump.exe to get a list of files from the .lib files. -
Upgrading to new RAD Studio vs. project Lib names
Vincent Parrett replied to w0wbagger's topic in General Help
Ah ok, C++Builder is not my expertise - but the comment about libsuffix still stands when it comes to lib files - the vendors are at fault if their lib file names change for each version of rad studio. The only way I know of to whittle down the list if libs is to remove them all and keep adding back until it compiles. -
VSoft.Ulid - A Delphi Implementation of ULID for Delphi XE2 or later.
Vincent Parrett replied to Vincent Parrett's topic in I made this
Out of curiosity I decided to benchmark TUlid - using the excellent Spring4D Benchmark - some interesting results 32bit 64 bit Not being a performance guru - I am guessing the difference in the TUlid.Create performance is down to the Random number generator - @Stefan Glienke -
Upgrading to new RAD Studio vs. project Lib names
Vincent Parrett replied to w0wbagger's topic in General Help
wrong topic - deleted -
Upgrading to new RAD Studio vs. project Lib names
Vincent Parrett replied to w0wbagger's topic in General Help
This is a pet peeve of mine, library authors and package naming - not using LibSuffix in their packages and adding the version to the package names. If you are not using runtime packages (most people don't) - then the IDE doesn't really track what is used by the project - it just uses the Library path and project Search path to make those libraires available. I have been working on a solution for a while - a package manager - still a work in progress but getting there - see delphi.dev - it will need library author/vendors to create packages to make it work though. DPM does store the package references in the dproj file - when you load up the project in a new version of RAD Studio (and the ide plugin is installed) - it will automatically download and install the dpm packages (assuming there are versions available for the new delphi version). -
Devin AI - Is it already happening?
Vincent Parrett replied to FreeDelphiPascal's topic in General Help
Read this the other day - https://www.nvidia.com/en-us/glossary/generative-ai/ Interesting that there is no mention of eithics etc - I guess shareholders don't care. -
Devin AI - Is it already happening?
Vincent Parrett replied to FreeDelphiPascal's topic in General Help
Who mentioned anything about perfect - just pretty good would be an improvement. That is where I would rather my subscription $$$ go towards fixing than more AI distraction. -
Devin AI - Is it already happening?
Vincent Parrett replied to FreeDelphiPascal's topic in General Help
Here we are talking about AI integration in the IDE - meanwhile, code insight, code completion, code navigation etc - ie the basics of a modern IDE are still pretty much completely broken after how many versions of delphi? -
Tool to sort units used in project by dependency
Vincent Parrett replied to uligerhardt's topic in Delphi IDE and APIs
Pro tip, don't use the Library Path for anything other than the rtl/vc/fmx. Only add the third party libs your project actually needs to the project search path. That avoids the compler trawling through a bunch of paths that it doesn't need to. -
What version of Delphi has the least amount of bugs throughout history?
Vincent Parrett replied to Al T's topic in Delphi IDE and APIs
I don't think there is a correct answer to this question - it all depends on whether you are affected by particular bugs. I liked Delphi 7 for stabilty back in the day, wasted several years migrating through 2009-XE2, skipped XE3-6 due to major issues, have stuck with XE7 for many years now (not stable, but I have learned to work with it) and more recently migrated through 10.3 to 11.3 (finally able to compile and run with 11.3). In between XE7-11.3 I have wasted a lot of time (and money for versions I am unable to use) trying to migrated our code, only to hit roadblocks - either rtl/vcl issues, or IDE/Debugger issues or failed HighDPI support. Each time I renew my subscription I wonder why, but the lack of upgrade pricing now means I am on this treadmill like everyone else. -
RAD Studio 12 Update 1 IDE Instability
Vincent Parrett replied to Navid Madani's topic in Delphi IDE and APIs
Not sure if this is related or not, but we had issues with running FinalBuilder 8 on windows 11 arm - it would crash on startup or just hang shortly after - I "fixed" it (so far so good) by changing the emulation settings to "strict execution" - try that on bds.exe -
What do you think of "Local Global variables"
Vincent Parrett replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Not a fan of nested procedures/functions - but if I do use them I prefer to pass parameters - I prefer the narrowest scope possible on all variables/fields etc. -
I'd be happy to see dark mode for GExperts too - I'm a dark mode user. I also wish these forums had a dark mode!