Leaderboard
Popular Content
Showing content with the highest reputation since 03/19/24 in all areas
-
We're excited to announce the release of DelphiLint v1.0.0, a free and open-source static analyzer and linter for the Delphi IDE! DelphiLint is powered by SonarDelphi, our Delphi analyzer for the SonarQube code quality platform that scans entire codebases with more than 120 different rules. With DelphiLint, the feedback loop is shortened - it allows you to analyze individual files within your editor and correct problems before they're even checked in. GitHub: https://github.com/integrated-application-development/delphilint Release: https://github.com/integrated-application-development/delphilint/releases/tag/v1.0.0 Features Analyze one or more files on demand View detected issues, descriptions, and rationale inline in the Delphi IDE Two analysis modes: Standalone - run analyses entirely locally with a default set of active rules Connected - connect to a SonarQube instance, allowing for Fetching of active rules and configuration from the server's configured quality profiles Suppression of issues that have been resolved in past analyses Usage of the server's version of SonarDelphi Uses the same rules and configuration files as SonarDelphi, making configuration easy for projects that already use SonarDelphi for code quality DelphiLint supports RAD Studio for Delphi 11+. Feedback and contributions are welcome!
-
Do you need an ARM64 compiler for Windows?
David Heffernan replied to Lars Fosdal's topic in Cross-platform
I think all in all, it's clear that the current in-process design is the right one -
My workmachine is not quite JRE free, due to IBM ACE. But in general, I don't install Java apps if I can avoid it.
-
A gem from the past (Goto)
Lars Fosdal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Fun observations on the GoTo topic: https://jerf.org/iri/post/2024/goto/ -
Hi fellows, I wanted to inform you that I have made an improvement to my AI-integration plug-in called ChatGPTWizard. Now it supports Ollama, the offline AI chatbot server. You can download the latest version (v3.0) to try it out here: https://github.com/AliDehbansiahkarbon/ChatGPTWizard To set up your offline GPT-like server read this section: https://github.com/AliDehbansiahkarbon/ChatGPTWizard#:~:text=How to use it in Offline mode I am eagerly looking forward to receiving your valuable feedback. Thank you in advance.
-
In case anyone is not already aware of this https://quality.embarcadero.com is now in a permanent read-only mode. A new system is being implemented, but has not been opened to the public yet. So, if you do have a legit bug/feature to report, feel free to post it in a public forum, or write to Embarcadero directly, and someone who has internal access to the new system can open tickets for you until the new system is ready for public use.
-
A better way to share global data structures than as global variables?
Bill Meyer replied to DavidJr.'s topic in Algorithms, Data Structures and Class Design
Before anyone gets too upset, my perspective is based on dealing with legacy code you have come into. There are numerous advantages to encapsulating global variables. Not only do you establish a measure of access control, but if you expose them as properties with getters and setters, you can easily set breakpoints to discover points of interaction. Equally, you could introduce logging. But even without those benefits, you will be altering the calling code to reference MyGlobals.SomeState, rather than simply SomeState. Once you have accomplished that tedious task, it is also a simple matter to search for all such references by searching on MyGlobals. Other benefits will become apparent as you work through things. -
A better way to share global data structures than as global variables?
Dave Nottage replied to DavidJr.'s topic in Algorithms, Data Structures and Class Design
Straight Outta ChatGPT -
One option would be to add some operator overloading to TProductID: type TProductID = record ID: nativeint; public class operator Explicit(A: TProductID): NativeInt; overload; class operator Implicit(A: NativeInt): TProductID; overload; class operator Implicit(A: TProductID): string; overload; end; class operator TProductID.Explicit(A: TProductID): NativeInt; begin Result := A.ID; end; class operator TProductID.Implicit(A: NativeInt): TProductID; begin Result.ID := A; end; class operator TProductID.Implicit(A: TProductID): string; begin Result := A.ID.ToString; end; This allows to write something like this: var cid : TCustomerID; var pid: TProductID; pid := qryGetStockProductID.AsInteger; cid := qryGetStocCustID.AsInteger; --- procedure TForm6.AddToStock(pid: TProductID; cnt: nativeint); // Both uses internally nativeint begin ShowMessage(pid); end; Note that the operator to convert TProductID to NativeInt is Explicit instead of Implicit. That prohibits the use of TProductID as a NativeInt parameter and the compiler throws an error when the parameters to AddToStock are given in the wrong order.
-
Same thing happened to me re Ios Island đ Following the live activities link leads to: https://developer.apple.com/documentation/ActivityKit/displaying-live-data-with-live-activities Which talks about using Widget Extensions, which are yet to be possible in Delphi, however there's a slim chance that the extension can "talk" to Delphi code: https://blog.grijjy.com/2018/11/15/ios-and-macos-app-extensions-with-delphi/ I have very little optimism about the possibility
-
As mentioned in my previous post on dzDebugVisualizer I was thinking about writing a generalized debug visualizer which can be user-configured to register itself for any data type. Well, that debug visualizer now exists. Itâs part of dzDebugVisualizer and called âUniversal Visualizer for Delphiâ. Read on in the blog post.
-
Do you need an ARM64 compiler for Windows?
David Heffernan replied to Lars Fosdal's topic in Cross-platform
I mean, how hard could it be???? -
challenge Offical launch of the 1 Billion Row Challenge in Object Pascal
Arnaud Bouchez replied to Gustavo 'Gus' Carreno's topic in Tips / Blogs / Tutorials / Videos
Easy, and wrong. You are reading the station weathers reference data with one row per station. And making a min/max/average of a single data per station. The challenge is to read a 1 billion (1,000,000,000) rows of CSV data for all those 41343 stations, and compute it. There is a generator of a 16GB CSV file to inject and process. So 0.33s for 41343 rows would make around 8000 seconds, i.e. 5.5 days.- 58 replies
-
- object-pascal
- free-pascal
-
(and 1 more)
Tagged with:
-
How can I extract a row's data from a TMyQuery object ?
Uwe Raabe replied to dormky's topic in Databases
I'm not sure if that is what you are after: Dataset Enumerator Reloaded. The current location for the unit described in that article is now on GitHub as part of my CmonLib library: https://github.com/UweRaabe/CmonLib/blob/main/source/Cmon.DataSetHelper.pas The code allows to retrieve the current record of a dataset either as a record or a class. The record example shown in the article requires the declaration of a record type [DBFields(mapAuto)] TEmployee = record EmpNo: Integer; LastName: string; FirstName: string; PhoneExt: string; HireDate: TDateTime; Salary: Double; end; With that you can retrieve the data of the current dataset record like this: var Employee: TEmployee; begin { Show the employee's name and the hire date. } Employee := QuEmployee.GetCurrentRec<TEmployee>; ShowMessage(Format('%s %s was hired on %s', [Employee.FirstName, Employee.LastName, FormatDateTime('dddddd', Employee.HireDate)])); end; The article also has another example using a class instead of a record. -
However, it might not be permitted to do so in corporate environments.
-
Delphi 12: Installing via GetIt Corrupts the DPK of AsyncPro, VirtualTree, and SynEdit
twe replied to twe's topic in Delphi IDE and APIs
This is definitely because the .dpk has LF line endings. Steps to reproduce manually: 1. Open SynEditDR.dpk in Notepad++. Make sure "rrequires", "ocontains", and "d." are all fixed and correct. 2. Turn on View -> Show Symbol -> Show End of Line so you can see the end of line characters. 3. Convert SynEditDR.dpk to Unix line endings in Notepad++ with Edit -> EOL Conversion -> Unix (LF) and save 4. Open SynEditDR.dpk in Delphi 12 5. In the project manager, right click on SynEditDR290.bpl and select Options... 6. In the Project Options window make no changes and click the Save button 7. Click Save All on the toolbar or use File -> Save All.. 8. Now go back to Notepad++. It will have detected that the .dpk has changed. Reload the file and you'll see that it's now corrupted with a mix of LF and CRLF line endings, and the usual "rrequires", "ocontains", and "d." problem. If you do exactly the same thing but start by making sure the .dpk has CRLF line endings then there is no corruption of the file. -
Is it still not possible to create self-contained executables with Java? If so it would be nice because that would remove the requirement for the JRE.
-
https://docwiki.embarcadero.com/Libraries/Athens/en/System.SysUtils.TStringHelper.TrimLeft
-
Does it ever. Removes any collaboration between users. Also, without knowing if something is already reported hard to put in the effort to create a good report or find an uncomplicated way to reproduce - no idea if the effort will be wasted. I did not use the old one all that much but was happy to collaborate and help get the odd bug fixed. Like the dangling scrolls bars from code insight. With no collaboration not sure how that bug would ever have been fixed - reporter did not have a way to reproduce it, another person provided some insights and yet another (me in this case) was able to use that to find a way to reproduce. Then it was fixed in the next release which was nice to see. ([RSP-34111] Editor leaves dangling vertical scrollbar behind - Embarcadero Technologies)
-
Yes, you can safely ignore them ( until Google decides to enforce this probably in the future ). I considered that too, but I'm afraid these warning will be hard to remove, because they require certain Android tools, like ProGuard. Not sure if this will be ever included in the Delphi process. One idea, at least for the first warning, was to add a neutral or empty "manifest.txt" file. This might work technically, but on the other hand, the Google Review might see this as an attempt to circumvent or infringe their PlayStore policies, which might put you in bigger troubles. My hope is, that Embarcadero put this onto their roadmap.
-
Do you need an ARM64 compiler for Windows?
Brandon Staggs replied to Lars Fosdal's topic in Cross-platform
Embarcadero's ARM compilers use an LLVM backend. This leads to differences such as how exceptions are handled. This is not a trivial difference and this is likely only scratching the surface of the problems that would have to be resolved. They haven't even given us a 64-bit Intel IDE yet. I doubt ARM64 is anywhere near. This is also likely one reason native Windows ARM compile target is not going to be available soon or if it is, will not be a simple matter of recompiling for many non-trivial projects. -
Regression - Delphi 12 - Unable to debug dynamically loaded packages
Marco Cantu replied to @AT's topic in Delphi IDE and APIs
We have received reports for this issue already. We don't have a ETA for the solution, but have been looking into it -
Search for JumpList.TJumpList. Here are a few links to get you started. https://docwiki.embarcadero.com/RADStudio/Athens/en/VCL_Taskbars https://docwiki.embarcadero.com/Libraries/Athens/en/Vcl.JumpList.TCustomJumpList.AddTask https://blog.marcocantu.com/blog/2014-september-vcl-xe7-taskbar-jumplist.html https://perevoznyk.wordpress.com/2011/05/25/adding-windows-7-jump-list-to-a-delphi-2010-application/
-
A gem from the past (Goto)
Pat Foley replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Here is a dangerous example of Goto causing endless loop you never finish this gamebook's first edition. In the gamebook You Can Be The Stainless Steel Rat by Harrison. There's an example of a typo goto 290 should be goto 190. https://stainlesssteelrat.fandom.com/wiki/You_Can_Be_The_Stainless_Steel_Rat -
DLL usage difference between Delphi 11.3 and Delphi 10.4
David Heffernan replied to Ron Howard's topic in RTL and Delphi Object Pascal
There is no such incompatibility. It's just 64 to 32 bit value truncation caused by defective code.