Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/16/24 in Posts

  1. Well at least theoretically, if the heat death of the universe doesn't occur first Here is a video to get you warmed up.... I updated my sample from last year with a callback allowing you to view the digits of Pi as they are generated. All the source code is on GitHub. Happy Pi day 2024! Created a few fun wallpapers too.
  2. Unfortunately, it is not so simple. There are many different ways for file types to be associated with an app. The Registry keys you are currently looking at (the ones starting with a dot) is just the beginning. Those are static verb registrations, and the most common approach. But there are other ways, too. Especially when you start taking into account things like dynamic registrations, Shell COM objects for File Type handlers and Context Menu handlers, etc. A lot can go on behind the scenes when the OS is asked to open an app associated with a given file.
  3. Hi all, I've always missed a modern implementation of a syntax highlighting in RAD Studio. So when I saw a github repo containing pascal grammar for Tree-sitter, I started working on an IDE extension that makes use of it. Since there are no Delphi bindings for Tree-sitter I wrote a simple TCP Server in Rust, which receives the currently opened source code, parses it and generates the highlight information. After this information is sent back to the IDE I use it to draw more informative highlighting. Simple example below. I'm not sure about the performance, since it sends the code, parses and sends back the entire ToolsApi.pas file with 83k lines in 421 milliseconds. But it doesn't need to reparse the entire file on changes so it should be able to provide real-time highlighting, although I haven't implemented that yet. Now the grammar isn't finished and I haven't really looked into how to write grammar files, plus I really don't know enough about the Pascal and Delphi language to undertake something like that. The Point of this post is to gauge if there is even any interest for an extension like this.
  4. Stefan Glienke

    How to quickly hash growing files

    SHA1 is dead. I suggest using SHA2 or SHA3 even if it is "just" for a file checksum. If you want performance-optimized implementations I would suggest using mormot2. uses mormot.core.buffers, mormot.crypt.secure; ... HashFile(myFileName, THashAlgo.hfSHA256); Fun fact: mormot2 SHA256 is faster than RTL SHA1.
  5. Attila Kovacs

    Work for Embarcadero Sales!

×