Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/22/23 in all areas

  1. 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.
  2. @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.
  3. Anders Melander

    compiling DCU without creating EXE

    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.
  4. 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.
  5. 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.
  6. PeterBelow

    Drawing text with GDI

    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
  7. 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.
  8. Remy Lebeau

    Why does CoInitializeEx returns 1 or $80010106 ?

    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;
  9. M.e.l

    New OpenSSL release 3.1.0

    It can happen. Thanks fixing that as well as for your time and component suite.
  10. For sure! Who needs an AI to f... things up, when I am perfectly capable of f...ing stuff up myself? 😄
  11. Especially when your own code doesn't work and you don't even know why, amirite? 😉
  12. baeckerg

    Spring4d compile error on Delphi CE 10.4.2

    You need to check under Downloads / Tags: Tags for Spring4D
  13. programmerdelphi2k

    Why does CoInitializeEx returns 1 or $80010106 ?

    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;
  14. 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).
  15. Stefan Glienke

    Spring4d compile error on Delphi CE 10.4.2

    I do, in fact, last week I did the 2.0 rc1
  16. Dave Nottage

    Delphi 11.2 and MacOS SDK 15.5

    You need to update Xcode, and import the iOS 16.1 SDK. Xcode 14.1 requires at least macOS Monterey 12.5
  17. 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.
  18. 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.
  19. Stefan Glienke

    [Very unsure] Indy vs sgcIndy

    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.
  20. Lars Fosdal

    [Very unsure] Indy vs sgcIndy

    Open source without the source... not sure what I think about that - particularly when it is based on another open source project.
  21. rgdawson

    Delphi 11.3 is available now!

    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.
  22. programmerdelphi2k

    [FMX beginner] Key Handling

    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);
  23. 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
  24. Angus Robertson

    Best components for creating windows service apps

    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
  25. Dave Nottage

    compiling DCU without creating EXE

    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"? 😉
×