Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 10/05/24 in all areas

  1. Please see the blog post and watch the videos! Although the videos show PyScripter, the underlying editor control is SynEdit. Note: Development of SynEdit has moved back to pyscripter/SynEdit: SynEdit is a syntax highlighting edit control, not based on the Windows common controls. (github.com) for the reasons explained here. The multi-caret developments are in the multicaret branch, which will be merged to master after a period of testing. It is quite solid, but if you would like to try and help iron out bugs, that would be much appreciated.
  2. Arnaud Bouchez

    ANN: mORMot 2.3 Stable Release

    This was time for a new "stable" release of the Open Source mORMot 2 framework! You can find it on our GitHub repository: https://github.com/synopse/mORMot2/releases/tag/2.3.stable 🙂 This release will be a Long Term Support Security Branch, as we will maintain it for the next years for main bugs and security fixes. Added - Swagger/OpenAPI Client Generator - IDocList/IDocDict Containers - SID/DACL/SACL/SDDL/ACE Security Objects - async web server: IOCP support on Windows, metrics gathering and standard logging - TSynMustache can work on plain data via RTTI, in addition to TDocVariant - introducing TRttiMap for DTO process. Changed - Upgraded SQLite3 to 3.46.1 - Enhancements to the LDAP client, HTTP/HTTPS client, Kerberos auth, Peer Cache, ORM. - Lots other bug fixes, optimisations and enhancements. More information on our blog: https://blog.synopse.info/?post/2024/10/16/Release-of-mORMot-2.3-Stable
  3. Brandon Staggs

    tag as String

    What could possibly go wrong
  4. Jim McKeeth

    fmxLinux missing?

    This might work getitcmd -i=fmxlinux-12-1.78 this is the version that is installed in 12.1, and if you use the getitcmd from the RAD Studio command-prompt it should install and work.
  5. Uwe Raabe

    creating a frame at runtime

    It is even possible at design time. Setting an empty name to a component will remove the corresponding field in the class. It is often used with TLabel instances that only exist to display some static text, but won't be accessed in the code. It reduces code cluttering a bit.
  6. Jim McKeeth

    What is your Update Process?

    With 12.2 Patch 1 just dropping, we've all spent some time updating. I have a process for updating, but I'm always curious what everyone's process is. I'll share mine: Ideally I have a complete backup of my system Backup my activation/license files: "C:\ProgramData\Embarcadero" (I just zip files and folders including hidden) Your activation should still work after a recovery if your computer name doesn't change Backup settings with MigrationTool "C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\migrationtool.exe" I used to always export the registry too, but haven't that in a while. Might still be useful. Computer\HKEY_CURRENT_USER\Software\Embarcadero\BDS\23.0 Manually backup GetIt Packages via GetItCmd (ran from the RAD Studio Command Prompt): getitcmd -l= -f=installed >getitpkgs.txt Uninstall all the GetIt packages (Parnassus seems to be the most likely to cause trouble, but FMXLinux has hit me too, so I just uninstall them all) Get the packages names from the manual backup getitcmd -u=FmxLinux-12-1.78;ParnassusCoreEditor-12-1.6.4.1;CodeSite-5.4.4;AWSSDKforDelphi-12 Start the installation Let it automatically uninstall, keeping the settings (the default) Before it starts the install I manually delete the CatalogRepository folders C:\Users\jim\Documents\Embarcadero\Studio\23.0\CatalogRepository C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository Manually reinstall the GetIt packages getitcmd -i=FmxLinux-12-1.78;ParnassusCoreEditor-12-1.6.4.1;CodeSite-5.4.4;AWSSDKforDelphi-12 The MigrationTool doesn't seem to like restoring to the same version it was backed up from, which is frustrating, but maybe I'm missing something. When I restore from a backup of 12.x then 12.x is missing from the dropdown list. I've never had to use it, but in theory I figure I could edit the backup file to make it work if worse comes to worse.
  7. Stefan Glienke

    String memory usage

    If you were using the RTL dictionary with its abysmal performance, that does not surprise me at all. Mostly because of its poor hash function, replacing that with a better one speeds it up significantly. However, string interning does not require a dictionary with key/value but just a hashtable for strings. DelphiAST has the option to use one for its parsing - we needed that when using it in the context of the IDE to avoid spikes in memory consumption.
  8. Remy Lebeau

    Delphi 12.2 Patch 1

    https://blogs.embarcadero.com/rad-studio-12-2-athens-inline-patch-1-available/
  9. Uwe Raabe

    tag as String

    @PeterBelow It is even possible to inject new properties to the Object Inspector. In Cmon.DataSense.Design.pas I use this technique to add a DataSource and DataField property to supported controls. The additional data is stored in a special component (TDataSense) using a dictionary internally:
  10. Uwe Raabe

    String memory usage

    That sounds more like Quantum Mechanics than Mathematics.
  11. Stefan Glienke

    win11 24h2 msheap fastest

    That benchmark proves almost (*) nothing, the only point where it allocates is during the form creation where it builds the card deck and later when it prints the output into the TListBox. (*) the only thing affected here is the possible layout of the card objects in the heap as they are all read during the hand-processing code. The difference that you can observe here between Delphi buids using different memory managers is most likely caused by the amount of overhead the respective memory manager is using thus fitting more card objects within the same memory pages, thus more of them (most likely all on modern processors) fitting into L1 cache. As for this particular code - removing the name of the Cards from the object and only building it when it is needed for some UI would probably speed up code more than anything else because you get rid of 20 Byte for every object (Name is a string[19]) - on my CPU this makes the code go down from ~900ms to ~680ms - simply because it does not need to copy the strings in CopyCardFromDeck. Circumventing the getter and setter of TList (which contribute around 25% of the remaining time) brings it down to 460ms. And after that we are not done with string stuff - in every loop iteration, it calls Hand.SetHighValues which produces a name for the cards on the hand - removing that gets me down to ~400. Now because I have a run and SamplingProfiler open already I see that now one of the scorers is TcaaPokerHand.CopyCardFromDeck - the Items getter is not inlined which causes it to be called 10 times for the same 2 card objects. Changing that gets me down to 270ms. But how about avoiding repeated access to the same object in the 2 lists altogether? 230ms I could go on because I see a lot more room to optimize - but I think I made my point. Instead of fiddling with the memory manager one should first look if heap allocations are even the issue. And then identify unnecessary work and eliminate that. ... change TcaaEvaluationCard to be 8 Byte size - (that avoids that the compiler creates a movsd/movsb instruction but simply does an 8 byte mov) -> 160ms
  12. That's so obvious that I just asked myself why I didn't think of it. So, thanks a lot! I could either call plink.exe (from Putty) or even easier, use libssh2 and the pascal bindings from @pyscripter. In fact I just got the sources, downloaded the libssh2 and openssl dlls from the PHP project page and changed the SshExec demo to bypass the password prompt and call a test script as root. Worked fine. And as a plus I don't even have to install anything on the server, just use the existing ssh server, create some scripts and allow the appropriate users to call them as root without password in the sudoers configuration.
  13. 1.8% rating is far from being popular. It's just marginally better than the 1.64% of SQL on place 11. Compare that to the ratings of the top 3! That's one of the problems with this "index". The differences between the rankings even some in the top 10 are lower than the error margins of the data source.
  14. You're better off doing something like function myfunc(const InVal: String; out OutVal: Double): Boolean; Return True if the value was set and false if not. There are other ways to handle this but the worst way is a magic value in Double. There's no reason to do that when it is so easy to indicate explicitly whether or not the value is valid.
  15. pyscripter

    SynEdit now supports mulit-caret, multi-selection editing

    Main Issues with the Delphi editor: Unicode handling The most serious issue with the Delphi editor IMHO is proper Unicode handling. It has issues with surrogate pairs. combining characters etc. Try for instance to paste ḱṷṓn to the editor. Even wide Unicode characters have wrong spacing (e.g. 爾雅爾雅爾雅爾雅爾雅爾雅). Let alone of course the handling of emojis, bi-directional text etc. Missing standard code editor behaviour Handle triple and quadruple clicks for selection Double click and drag should select whole words Triple click and drag should select line The track changes bar does not play correctly with undo redo Missing many nice-to-have features common in other code editors Multi-caret editing Move/Duplicate lines commands HTML copy/paste to copy code with syntax highlighting to other apps Alpha-blending of selection OLE drag & drop Support for font ligatures etc. SynEdit now has first-class Unicode support based on DirectWrite, multi-caret editing, all other features from the list above and much more. It is also very fast and responsive, but of course there is a lot of scope for performance optimizations.
  16. I’m working on a project using Material 3 Design in Delphi FireMonkey for Athens 12.2. With Skia now integrated in Athens 12.2, we have a similar graphics foundation to Flutter, but we still need a powerful UI component suite to fully unlock Delphi’s design potential. I’ve been using Alcinoe to customize components like Text, Buttons, Switches, TrackBars, etc., into Material 3 Design or even Cupertino style—whatever fits the design. You can easily manage different states like hover, pressed, or disabled directly through the object inspector, which makes it super easy to work with in Athens 12.2. For more info on Alcinoe and Material 3 controls for Delphi, you can check it out here: Material 3 Controls for Delphi – A Modern UI Approach 3. I’ve put together a demo app specifically for Athens 12.2, and I’d really appreciate it if you could test it and give me your feedback. Here’s the link to the demo: https://play.google.com/apps/internaltest/4701314002613599109 To get the app on Google Play, I need around 20 testers. If you’re interested, please send me your Android Gmail address, and I’ll invite you to give it a try. Thanks a lot for your help!
  17. David Heffernan

    "Divided by zero" exception

    That's Embarcadero's fault. They've known how to fix this for at least 10 years, and my patched version of the RTL fixes it. That said, the real issue isn't really a language issue. It's a platform issue. It all stems from the way floating point is implemented on x86 and x86-64 hardware.
  18. Jim McKeeth

    Feature enhancement request - Filter DFM properties

    I was talking to someone the other day about this too. I had thought about creating an IDE add-in to effectively "lock the form," where it ignores all those "accidental" changes. I think it would be really useful to also ignore things like active tab in the tab control, etc. Usually when I'm submitting changes in source control I only want to submit the minimum changes for the fix I made, but then I want to make sure that that subset works, so I have to revert unneeded changes, test that code state, and then submit it. So a filter or lock would be really helpful.
  19. pyscripter

    String memory usage

    This is the unit @Stefan Glienke was referring to. 100 lines and it uses no other unit!
  20. Lars Fosdal

    Delphi 12.2 Patch 1

    Make sure to uninstall the Parnassus plugins before installing the patch.
  21. Uwe Raabe

    Delphi 12.2 Patch 1

    A suitable version for MMX is available now.
  22. havrlisan

    creating a frame at runtime

    Or to an empty string. It's the safest and easiest way, in my opinion.
  23. Lol, we had to do the same migration at our company, complained to Atlassian that cloud Jira is super slow compared to old hosted one, their response - our code is very big and complex you should get a faster computer. And our company is much bigger than Embarcadero. Jira is dominating the market and there is no easy migration to something else, there is no reason for them to do anything right now.
  24. They probably thought that 2047 was "enough for everybody" and didn't think of it as a limit, so they didn't impose a limit on WriteString either. But we can only guess. OTOH nobody(*1) uses TIniFile any more but TMemIniFile because it overcomes all the limitations of Get/SetPrivateProfileString so that's a moot point. (*1 for suitable definitions of nobody )
  25. Kazantsev Alexey

    Items of custom managed records

    program Project1; {$APPTYPE CONSOLE} uses System.Rtti; type TvatIndividual = record DocumentNumber: string; TurnoverDate: TDate; PaymentDate: TDate; DocumentType: string; Year: integer; TurnoverDescription: string; TurnoverAmount: Currency; end; begin for var f in TRttiContext.Create.GetType(TypeInfo(TvatIndividual)).GetFields do WriteLn(f.ToString); ReadLn; end.
×