Leaderboard
Popular Content
Showing content with the highest reputation on 03/22/23 in all areas
-
TO ChatGPT: In Delphi, is there any kind of an adapter or class that takes a TList<T> and makes it look like a TDataSet?
Brandon Staggs replied to David Schwartz's topic in Databases
I don't see any language bias in this. The outlets I follow have lots of people trying to be rational about this and most of them probably don't know Delphi still exists, LOL. I am impressed by these tools to be sure. But I also know what they are, and I also know that when I ask AI a non-trivial question that I already have expert knowledge about, I am surprised at how bad the answer is. So, I am extremely skeptical when it comes to using it for things I am NOT an expert on. Is that unreasonable? Also, it's a simple fact that these are not any form of intelligence. The mainstream reporting on this issue has been mostly absurd and with far too much cheerleading or doomsaying. This is how these tools work: https://writings.stephenwolfram.com/2023/02/what-is-chatgpt-doing-and-why-does-it-work TL;DR: it's autocomplete. Very complex and impressive autocomplete. When you ask ChatGPT a question, no entity is giving it consideration or thought, no abstract reasoning is occurring, no intuition is being exercised. An algorithm is scraping its database with a "this word should come next" algorithm. A really complex one. Knowing how it works should make anyone skeptical about broadly generalized applications of the technology. I don't think I am being unreasonable at all. -
TO ChatGPT: In Delphi, is there any kind of an adapter or class that takes a TList<T> and makes it look like a TDataSet?
Lars Fosdal replied to David Schwartz's topic in Databases
@hsvandrew There is no doubt "AI" (Machine Learning) will impact our work and business systems. What's wrong with me, is that I don't care for a deluge of "My AI generated code doesn't work. Why?" posts. -
compiling DCU without creating EXE
Anders Melander replied to Dave Novo's topic in RTL and Delphi Object Pascal
Congratulations. -J* makes the compiler output .obj files instead of dcu files. -JHurrah!NoDCUs works "just as well". -h will tell you all the command line switches. No need to have an AI invent new ones. -
TO ChatGPT: In Delphi, is there any kind of an adapter or class that takes a TList<T> and makes it look like a TDataSet?
Brandon Staggs replied to David Schwartz's topic in Databases
I don't buy this line of argument at all. ChatGPT will try its best to give you want you say you want, but it will try so hard that it will give you completely useless time-wasting information. If I tell an intern to write a base class for me that uses multiple inheritance in Delphi, I would not expect to be given a unit full of plausible-looking code that cannot compile. I would expect to be told that what I asked for cannot be done in Delphi. ChatGPT fails that basic test. Who has time to check that kind of work product? Sticking with your workplace analogy, wouldn't you fire someone who blithely pretended to fulfil your request like that? I wouldn't put up with it. -
Why is Url an undeclared identifier here?
Uwe Raabe replied to dummzeuch's topic in RTL and Delphi Object Pascal
In fact they are: type TStringArr = array of string; const cStringArr: TStringArr = ['Hello', 'World']; Just not with the record element type, because the record constants are not accepted as true constants. -
What you see is due to rounding errors when scaling individual character widths, these accumulate over the text width. If you want true WYSIWYG display you have to basically place each character individually at positions calculated from the font information. The API offers a large group of functions for this purpose, see Font and Text Functions
-
TO ChatGPT: In Delphi, is there any kind of an adapter or class that takes a TList<T> and makes it look like a TDataSet?
Sherlock replied to David Schwartz's topic in Databases
Oh, I see it, believe me. And I'm looking forward to making more money by fixing stuff this so called AI breaks. Nothing wrong there. -
Why does CoInitializeEx returns 1 or $80010106 ?
Remy Lebeau replied to maXcomX's topic in Windows API
Per https://stackoverflow.com/a/20019023/65863: And also: https://learn.microsoft.com/en-us/windows/win32/api/ole2/nf-ole2-oleinitialize So, there you go. If your project uses the ComObj unit, it will call CoInitialize/Ex() when Vcl.Forms.TApplication.Initialize() is called, which won't matter since the constructor of Vcl.Forms.TApplication will have already called OleInitialize() beforehand, which calls CoInitializeEx(): constructor TApplication.Create(AOwner: TComponent); var ... begin inherited Create(AOwner); if not IsLibrary then FNeedToUninitialize := Succeeded(OleInitialize(nil)); ... end; -
New OpenSSL release 3.1.0
M.e.l replied to Angus Robertson's topic in ICS - Internet Component Suite
It can happen. Thanks fixing that as well as for your time and component suite. -
TO ChatGPT: In Delphi, is there any kind of an adapter or class that takes a TList<T> and makes it look like a TDataSet?
Lars Fosdal replied to David Schwartz's topic in Databases
For sure! Who needs an AI to f... things up, when I am perfectly capable of f...ing stuff up myself? 😄 -
TO ChatGPT: In Delphi, is there any kind of an adapter or class that takes a TList<T> and makes it look like a TDataSet?
Stefan Glienke replied to David Schwartz's topic in Databases
Especially when your own code doesn't work and you don't even know why, amirite? 😉 -
spring4d Spring4d compile error on Delphi CE 10.4.2
baeckerg replied to Giorgi Chapidze's topic in General Help
You need to check under Downloads / Tags: Tags for Spring4D -
Why does CoInitializeEx returns 1 or $80010106 ?
programmerdelphi2k replied to maXcomX's topic in Windows API
look at: VCL -> System.Win.ComObj.pas, line 2600 (RAD 11.3)... and "finalization" section procedure InitComObj; begin if InitComObjCalled then Exit; if SaveInitProc <> nil then TProcedure(SaveInitProc); if (CoInitFlags <> -1) and Assigned(System.Win.ComObj.CoInitializeEx) then begin NeedToUninitialize := Succeeded(System.Win.ComObj.CoInitializeEx(nil, CoInitFlags)); IsMultiThread := IsMultiThread or ((CoInitFlags and COINIT_APARTMENTTHREADED) <> 0) or (CoInitFlags = COINIT_MULTITHREADED); // this flag has value zero end else NeedToUninitialize := Succeeded(CoInitialize(nil)); InitComObjCalled := True; end; -
Best way to embed a binary structure so it is linked/compiled in
Remy Lebeau replied to alank2's topic in General Help
Put the raw data into a separate binary file, and then add an .rc script to your project (or use the Resources and Images dialog) to compile the data file as an RCDATA resource in your final executable's resources. Then, in your code, you can use a TResourceStream whenever you want to access the resource data at runtime. See Resource Files Support (just ignore the part about using a Multi-Device project, this works in a VCL project, too). -
spring4d Spring4d compile error on Delphi CE 10.4.2
Stefan Glienke replied to Giorgi Chapidze's topic in General Help
I do, in fact, last week I did the 2.0 rc1 -
You need to update Xcode, and import the iOS 16.1 SDK. Xcode 14.1 requires at least macOS Monterey 12.5
-
TO ChatGPT: In Delphi, is there any kind of an adapter or class that takes a TList<T> and makes it look like a TDataSet?
Brandon Staggs replied to David Schwartz's topic in Databases
Tell ChapGPT to show you how to write a class with multiple inheritance in Delphi. It will confidently show you how to do it. Of course, you can't do it, and the code doesn't work. How useful is this stuff when you have to already be an expert on the topic to make sure you aren't being fed complete BS? Programmers ought to know better than to trust a massive auto-complete algorithm with any real work. -
Questions about Application and Package .dproj files.
PeterBelow replied to Pat Foley's topic in Delphi IDE and APIs
Design-time packes are only 32 bit, they are only used by the IDE and this is 32 bit programm. Run-time packages (that is what youre compiled programs use) can be 32 or 64 bit. Put the component class into a run-time package and add that to the requires clause of the design-time package. The only thing that package does is registering the component, i. e. it contains the Register procedure the IDE looks for to add the component to the palette. See https://docwiki.embarcadero.com/RADStudio/Alexandria/en/64-bit_Windows_Application_Development#Making_Your_Components_Available_at_Design_Time_and_Run_Time in the online help. It also tells you how you can specify which platforms your component is compatible with (ComponentPlatformsAttribute) if the default is not to yor taste. -
You might not like it but it's according to the Licenses. Open source does not mean that any modification automatically has to be open and free - that would be the case if choosing MPL.
-
Open source without the source... not sure what I think about that - particularly when it is based on another open source project.
-
Been working with 11.3 since it came out. Very smooth upgrade from 11.2. My other observations are: As before, using inline variables seems to break certain code refactoring functions like Rename Variable, which I like to use more than I like inline variables, so I don't use inline variables. The new editor feature that highlights words that you select where visible elsewhere in the editor causes the editor to scroll unexpectedly if you are using folding, which I do, so I had to disable that feature. LSP does not seem to fail anymore. Control-Click jumps in the editor don't stop working near as often as before, but still do sometimes. In that case I use Ctrl-G or I reboot the IDE. The compiler is fast as blazes as far as I am concerned. When I was young, I learned guitar by practicing during compiles, haha. Nowadays compiling 100,000 lines of code takes only a few seconds. I just frickin' love Delphi. I am very happy it exists.
-
if fact, the "BEEP" came from OS messages, not any Delphi components, like ActionList or anyother... VCL or FMX you can try "supress" all beeps using a "windows API"... NOTE: in my VCL (empty) project or FMX (empty) project... pressing ALT + any_key = BEEP!!! then, does not matter if VCL or FMX = beep always sounds implementation {$R *.fmx} uses Winapi.Windows; procedure TForm1.Action1Execute(Sender: TObject); begin Close; end; // Disable system beep SystemParametersInfo(SPI_SETBEEP, 0, nil, SPIF_SENDWININICHANGE); // Enable system beep SystemParametersInfo(SPI_SETBEEP, 1, nil, SPIF_SENDWININICHANGE);
-
Fast lookup tables - TArray.BinarySearch vs Dictionary vs binary search
balabuev replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Here is my try. I've changed a lot in existing code (mentioned early comparers, equality comparers, etc.). Also, I've replaced returned string type in functions by PString, just because otherwise string handling takes too much time and algorythms comparison becomes not interesting. As well I've added my own minimalistic implementation of hash maps (not universal). mapstest.zip -
Best components for creating windows service apps
Angus Robertson replied to microtronx's topic in VCL
I've completed a new release of DDService Application Framework from the late Arno Garrels, it now supports Delphi 5, 7 and 2006 to XE8, 10 Seattle, 10.1 Berlin, 10.2 Tokyo and 10.3 Rio, as well as C++ Builder 2006 to XE5. Note that bugs fixed in these new releases had already been done in DDService. Also added new unit to control, install and remove Windows Service applications. The new and old versions may be downloaded from https://www.magsys.co.uk/delphi/ddservice.asp or from an SVN repository at: http://svn.magsys.co.uk:8443/svn/ddservice/ , use username = ics and password = ics for read access. Angus -
compiling DCU without creating EXE
Dave Nottage replied to Dave Novo's topic in RTL and Delphi Object Pascal
Not sure when it was added, but this compiler option appears to just compile (i.e. omits the linking phase): -Jc I discovered this after probing ChatGPT for an answer. The reason why I'm using this option is because I want my CI to just do a compile check in case there's been any boneheaded mistakes in the code, without having it linking to SDKs or other binaries (which can take ages) Jc = "Just compile"? 😉