Leaderboard
Popular Content
Showing content with the highest reputation since 06/04/25 in Posts
-
TOML is a "config file format for humans", that has gained a lot of traction in the python and rust communities among others. It is basically the INI file format on steroids. It compares quite well to alternative formats such as JSON, YAML and XML. Compared to JSON is way more readable and compact. Since I could not find any Delphi library for processing TOML, I have created my own: toml-delphi. Features: TOML v1.0.0 compliant. Passes all 734 (valid/invalid) official validation tests. Fast. Single stream tokenizer and lexer that doesn't use regex. Converts TOML documents to Delphi's RTL's TJSONObject, thus allowing for easy traversal, manipulation and query of the generated documents. Includes TTOMLWriter for converting TJSONObjects back to TOML. Provides for easy (de)serialization of Delphi objects and records from/to TOML. This is the interface of the main unit: TJSONObjectHelper = class helper for TJSONObject function ToTOML(MultilineStrings: Boolean = False; Indent: Integer = 4): string; procedure StreamTOML(Stream: TStream; MultilineStrings: Boolean = False; Indent: Integer = 4); procedure SaveTOMLtoFile(const FileName: string; MultilineStrings: Boolean = False; Indent: Integer = 4); class function FromTOML(const Contents: string): TJSONObject; overload; class function FromTOML(Contents: TBytes): TJSONObject; overload; class function FromTOML(Stream: TStream): TJSONObject; overload; class function FromTOMLFile(const FileName: string): TJSONObject; end; ETOMLSerializer = class(Exception); TTOMLSerializer = class class function Serialize<T>(const AValue: T): string; overload; class function Deserialize<T>(const ATOML: string): T; overload; end; Example usage: You can convert TOML source to TJSONObject using one of the FromTOML functions. For example to parse a TOML file you use: var JsonObject := TJSONObject.FromTOMLFile(FileName); //or for parsing a TOML string: var JsonObject := TJSONObject.FromTOML(TOMLstring); To convert a TJSONObject to TOML you use one of the methods ToTOML, StreamTOML or SaveTOMLToFile. For example: TOMLString := JsonObject.ToTOML; // or JsonObject.SaveTOMLToFile(FileName); Example serialization: type TTestRec = record IntValue: Integer; FloatValue: double; StringValue: string; DateValue: TDateTime; ArrayValue: TArray<string>; end; procedure TestSerializer; var Rec: TTestRec; TOMLString: string; begin Rec.IntValue := 123; Rec.FloatValue := 3.14; Rec.StringValue := 'abc'; Rec.DateValue := Now; Rec.ArrayValue := ['A', 'B', 'C']; Writeln('Serialized record:'); WriteLn('=================='); TOMLString := TTOMLSerializer.Serialize(Rec); Writeln(TOMLString); Writeln('Record deserialized and serialized again:'); Writeln('========================================='); Rec := TTOMLSerializer.Deserialize<TTestRec>(TOMLString); TOMLString := TTOMLSerializer.Serialize(Rec); Writeln(TOMLString); end; Output: Serialized record: ================== IntValue = 123 FloatValue = 3.14 StringValue = "abc" DateValue = "2025-06-18T05:37:02.110+03:00" ArrayValue = [ "A", "B", "C" ] Record deserialized and serialized again: ========================================= IntValue = 123 FloatValue = 3.14 StringValue = "abc" DateValue = "2025-06-18T05:37:02.110+03:00" ArrayValue = [ "A", "B", "C" ] I hope you find it useful.
-
Feature Request for the Delphi Language (Rethink or Eliminate the Concept of Units)
Dalija Prasnikar replied to dmitrybv's topic in Algorithms, Data Structures and Class Design
This has only been an issue if you make a mess out of your code design. In rare situations where you do need circular references using implementation section in one unit will suffice. I doubt that proposed changes would bring too much overall benefit and they would require extensive rework of the existing compiler architecture. There is existing feature which would be more beneficial for code organization: class helpers. Currently there is only a single supported helper in scope and having multiple ones would allow breaking down more complex code and organizing it into separate files. Implementing those would be a much simpler task, consistent with the existing architecture. -
Smart Setup is a unified tool for installing and building Delphi packages, whether they come from TMS or elsewhere. See: https://www.tmssoftware.com/site/blog.asp?post=1360
-
Code signing certificates have become so expensive...
Vincent Parrett replied to RaelB's topic in Delphi Third-Party
With Signtool Yes, however with Signotaur you do not. -
Fair enough! I was searching for “application run parameters” and other more general things - I should’ve just searched for cleaninstall! Curiously, if you type cleaninstall into the search box in the docwiki, it initially says “Nothing matches the search” until you actually press return, which also caught me out. That’s my excuse anyway 😂
-
🔧 [JOB] Part-Time Delphi Developer (VCL / Win32) – Support & Mentorship Role Location: Remote (U.S. preferred, but open) Commitment: Part-time (5–10 hrs/week) Project Type: Ongoing support + mentoring role We’re looking for an experienced Delphi developer (VCL / Win32 only) to help support and sustain a well-established, industry-specific engineering software package used for retaining wall and geotechnical design. The application has been actively developed and maintained by the original developer (who’s still involved), but we’re now looking to add a second experienced Delphi developer to: Assist with ongoing support and small enhancements Help document and organize the codebase into a shared source control repository (Git) Collaborate with the original developer on architecture and long-term sustainability Mentor a junior team member (with technical aptitude) as they begin learning Delphi and the codebase We’re not looking to rewrite the software — just to maintain it, support it, and prepare for long-term continuity. The original developer has been incredibly generous with his knowledge and is ready to help onboard someone gradually. 🧰 Tech Stack & Context: Delphi VCL (Win32 only — no FireMonkey) Long-running proprietary engineering app (wall design, CAD integration, etc.) Some external modules involve MathCAD and AutoCAD scripting We’re setting up a Git-based source control repository internally for collaboration ✅ Ideal Candidate: 5+ years of Delphi (VCL) experience Comfortable reading and documenting legacy code Good communicator; able to mentor or explain logic to others U.S.-based preferred for communication ease, but flexible for the right person Bonus: experience with AutoCAD integrations, MathCAD, or engineering tools ⏱ Availability: Part-time: ~5–10 hours per week, with flexibility Occasional check-ins with our team (main developer + junior mentee) 💼 To Apply: Email tim@earthretention.com with: A brief intro or CV Your hourly rate or fee structure A note on your experience with Delphi VCL and any mentoring/legacy experience This is a great opportunity for a seasoned Delphi developer looking to support a stable, well-built product with a thoughtful team — no chaos, no rewrites, just clean continuity. Looking forward to hearing from you. — Tim Winders COO, Earth Retention / CTi Software
-
- delphi vcl
- win32
- (and 10 more)
-
Beware of imitations and possible scams
Patrick PREMARTIN posted a topic in Tips / Blogs / Tutorials / Videos
Wondering why I created Copyright Pascal Projects and use it on all my repositories to add copyright comments and links to the top of files? Here is one of the many repositories that sums up the answer: https://github.com/prasanna-debug/Bubbleoid-GGJ2025 Automated robots, humans, AI, and spammers are pumping code repositories, replacing copyright notices and README.md files (but not in other languages like LISEZMOI.md for French), remove sponsorship information, and claim third-party project content in order to generate traffic to GitHub (and probably elsewhere) while retaining the reference to the original contributor to give their submission an air of “seriousness.” Their goal? To get developers or users to download their versions of source code or executables... If you use public code repositories, go to the source, don't rely on copies (whether dubious or unmaintained). Make your own fork or clone of the original repository if you have changes to make. Keep the link between repositories to benefit from source updates and share your own. Remain very cautious, on GitHub as elsewhere! -
Beware of imitations and possible scams
tinyBigGAMES replied to Patrick PREMARTIN's topic in Tips / Blogs / Tutorials / Videos
This very same thing happened to me recently. Sigh. Someone copied (not forked) my OllamaBox repo, changed the README, and added a release—even though my repo doesn’t have a release yet. Their release was an obfuscated Lua script that no doubt does bad things when executed. My name was listed as a contributor on the repo. I reported the user to GitHub, and all their accounts were taken down. Yes, be very careful and always get your code from the official repo. -
Every time someone calls SameValue a puppy dies
-
Some games and project samples with FireMonkey in Delphi
Patrick PREMARTIN replied to Patrick PREMARTIN's topic in I made this
Last week-end I finished the rebuild in Delphi FMX of the video game Bidioo I've created in AGK Basic in 2013. It's a match-3 game. I used the sample match-3 TFrame added to Delphi FMX Game Snippets two weeks ago. The graphics are in SVG. I use Skia like in my other recent games. On iOS and macOS with Metal it's very speed. The best experience is of course on an iPad. On Windows without the Skia raster it works as expected (in a VM, I didn't check on a real PC). On Android it's too slow to have the full animations, but it works. I've to find the reason and check with Skia4Delphi and EMB teams if a solution can be found. The 2.0 version has been published on stores. you'll find the download links on this page. I can send you free coupons if you want to test the game on an Apple device. Just send me a private message. For Windows, use Itch to get the installer (and the game) for free. The source code of the project are on GitHub except some files where are stores the SVG (the images are under closed licenses). It won't compile as it instead of the match-3 sample project. Some demos are available from YouTube and PeerTube. If you want to talk about game programming in Delphi or this particular game, you know how to message me. We can do anythings in Delphi. Just try. 😉 -
My only problem with that is the license: GPL simply makes it useless for me. But since it's based on another GPL library you probably didn't have a choice.
-
I know it's not the same but one of the FMX demos in the WebView4Delphi project shows how to embed a Monaco editor : https://github.com/microsoft/monaco-editor https://github.com/salvadordf/WebView4Delphi/tree/main/demos/Delphi_FMX/MonacoEditor
-
TECNativeMap is a 100% Delphi mapping component that uses neither browser nor javascript, and is available on all Delphi-supported platforms. Compatible since Delphi 7 for VCL and XE3 for Firemonkey. Download the trial version for Delphi 12
-
Delphi bindings to libxml2 and libxslt libraries. One of the most important goals of the project is the cross-platform replacement of MSXML 6.0. Therefore, where possible, the library should follow the W3C DOM model, but compatibility with MSXML is a priority. Library For details, see readme on GITHUB https://github.com/apokroy/LX2 P.S. The library is still at an early stage of development, therefore, changes to the API are possible.
-
You might try also the CompressionQuality property, 60% instead of 90% should reduce the size in bytes (losing quality of course) https://engineertips.wordpress.com/2021/11/27/delphi-resize-jpeg/ The Webp format is an alternative, it gets smaller size vs jpeg with the same quality, and there are Delphi libraries to do so in vcl (and fmx) https://github.com/Wykerd/delphi-webp
-
promise Introducing My Delphi TFuture PPL For Thread Safe UI
Dalija Prasnikar replied to bravesofts's topic in I made this
The whole point of Delphi Future implementation is to be a blocking call. Now, we can discuss whether this kind of design is useful or not and in which circumstances. However, your improved Future is mostly useless. Instead of creating a future and then resolving it in additional task (you are involving two threads here) you should just run the code in the task and that is it. Simply use TTask.Run( procedure begin var LValue := (...); TThread.Queue(nil, procedure begin LogReply('Result: ' + LValue.ToString); // update UI on main thread that service the TTask end); end); No need to overcomplicate things. -
Feature Request for the Delphi Language (Rethink or Eliminate the Concept of Units)
Uwe Raabe replied to dmitrybv's topic in Algorithms, Data Structures and Class Design
Well, in this case you can. I did a lot of refactoring such code myself during the last decades. The constraint you suggested to remove is a good indicator of progress in such an endeavor. -
The principle of a function that compares real values for equality, up to a specified tolerance, is a valid thing to do in many cases. But there are lots of caveats. In practise, most developers (and far from just in the Delphi space) that I see recommending it are completely unaware of these caveats. Some of these caveats and issues: How do you choose a tolerance? Does your tolerance account for the scale of the values, and indeed should it? Some use cases demand absolute tolerances, some demand relative tolerances. If you are accounting for scale, how do you choose the scale? Is it based on the pair of values being compared, or should it be based from the total pool of values. For instance, you might have two series that you wish to compare. Shouldn't the scale be based on the series rather than individual samples? Or maybe it is individual samples. It's easy to mistake this as an equality, but the resulting relationship implied by equality to tolerance is not transitive, so is not a mathematical equality. That is a R b and b R c does not imply a R c. Looking more specifically at Delphi's SameValue, the tolerance used when the Epsilon parameter is zero (or omitted) is very odd. I definitely think puppies are dying left, right and centre when that code path is chosen. One of the common misconceptions with floating point is that it is not exact. I think of it as exact, subject to the rules of the domain, but the key point is that not all values are representable. So if you have floating point values a and b, then they represent some precise real value. But when you do a * b, say, then the true value may not be representable. And so the result is the closest representable value. This is well defined, and reproducible. A lot of people think that there's just some random errors and fuzz in it all. That FuzzFactor constant in the RTL source seems to be a classic example of that sort of thinking. This famous question on SO is a useful resource: https://stackoverflow.com/questions/588004/is-floating-point-math-broken One of my pet bug bears in Delphi is its inability to convert correctly between floating point and textual representations. In every other mainstream language (and most non-mainstream languages) this is possible. But in Delphi the code used to perform these conversions is home grown and broken. There are good algorithms for doing this, and it's a subject of active research, but Embarcadero don't seem to care about this. In my codebase I use correct algorithms. Which means that for all values I can convert from float to text and back and always get the same value. The inability to do this often leads to users calling SameValue. My own codebase does call comparison function that compare for equality to tolerance. But there is a lot of care taken in how the tolerance is chosen and applied. I guess that's the crux of what I am saying. So many people just say, this is hard, slap a tolerance onto the comparison that is good enough for the two values I have to hand, and surely that's fine for all other values! I'm a bit of a pedant in this area, I admit. But it's kind of my job to be. Sorry!
-
There are several bugs fixed in 12.2 and 12.3 affecting frames. https://quality.embarcadero.com/browse/RSP-37402 https://quality.embarcadero.com/browse/RSP-39847 https://quality.embarcadero.com/browse/RSP-40110 https://quality.embarcadero.com/browse/RSP-43560 https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-1020 Perhaps these will fix your problem, too. I will test your project later when I've found some time to configure my system for monitors with different dpi.
-
Need help how to get me Embarcadero RAD Studio 2010 Professional (Delphi/Pascal) • All of the 3rd-party VCL packages at the versions listed in your table
Brian Evans replied to Jimoffice9@gmail.com's topic in General Help
When you buy the latest version of Delphi, you also get access to earlier versions of Delphi at no extra charge.: https://www.embarcadero.com/products/delphi/previous-versions Delphi 2010 is covered by this. A lot of third party component vendors do something similar for the same reason with older versions available in the registered users download areas. You may need to make a request or they might be there already. -
Isn't the root problem where you read these strings in the wrong way and shouldn't it be handled right there?
-
The chart by default draws the labels for the first series in the chart. You could add the labels of the second series as "custom labels". Ie: Chart1.Draw; for i:=0 to Chart1.Series[1].Count-1 do Chart1.Axes.Bottom.Items.Add(Chart1.Axes.Bottom.Items.Count, Chart1.Series[1].Labels[i]); Chart1.Draw; You can use OnGetMarkText event to intercept the marks drawing and empty them according to any condition you define. In this example I've set the threshold to 7000 because I don't see any 0 value in your test project: procedure TForm2.FormCreate(Sender: TObject); begin Chart1.Series[0].OnGetMarkText:=SeriesGetMarkText; end; procedure TForm2.SeriesGetMarkText(Sender:TChartSeries; ValueIndex:Integer; var MarkText:String); const threshold = 7000; begin if Assigned(Sender) and (ValueIndex > -1) and (Sender.YValue[ValueIndex] < threshold) then MarkText := ''; end; Steema Software support forums are publicly readable but only writeable to customers with active commercial subscriptions. The contact form should work fine. If it doesn't, you can always write at "info at steema.com" or "sales at steema.com". --- Yeray Alonso Steema Software
-
No serious developers are interested in binary-only Delphi components.
-
GoogleMaps Policy changes in EU
Anders Melander replied to Rollo62's topic in Network, Cloud and Web
As far as I can tell they've been forced to replace their proprietary APIs with standard APIs (in order to avoid vendor lock-in) and to allow competing third party applications access to their map data. Did I understand that right? It seems Google has few friends in the map business; They aren't allowed to link to Google Maps from their Google search results - or even from the search page (which is pretty stupid and doesn't do the users any good), while the same restrictions doesn't apply to Bing. Could it be that Bing map data is provided by Tom-Tom? -
A stable Delphi is also important to me. That's why I do my best to help Embarcadero achieve this.