-
Content Count
2627 -
Joined
-
Last visited
-
Days Won
91
Everything posted by dummzeuch
-
Some more fun with ChatGPT and Delphi
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I didn't expect it to perform that well, in particular the descriptions it gave for what those functions do. I found that interesting. These were simple tests where I knew the correct answers. It might be helpful in cases where I don't know the answers. Our possibly not. The code I'm usually dealing with is much more complex than a simple function. But you never know. Regardless of whether it will ever be helpful, I had some fun. -
It has been in the source code for quite a while and some few people and I have tested it, but I didn’t tell anybody else about it: There is a new expert in GExperts for editing the current project’s unit search path. It looks like this: (read on in the blog post)
-
I have just applied patches that are supposed to fix some Unicode issues with Russian characters. These apply to the following experts: Macro Template Locate/ Move to matching delimiter Previous / Next Identifier reference My tests so far have shown no changes on how these work on my source code, but I usually don’t use any special Unicode characters and in particular no Russian characters. So if you want to help out, whether or not you are using Unicode characters anywhere (for identifiers or within strings or comments) and especially Russian characters, please compile a new DLL from the current source code an test whether anything has been broken (or fixed). (Original blog post with links)
-
Generic from the RTL for sorted list of objects
dummzeuch posted a topic in RTL and Delphi Object Pascal
I'm still kind of new to using generics but I try to start using them where previously I would have created a pseudo template. I need to store some objects and access them giving a string key. I thought that a TObjectDictionary<string, TMyClass> would be the solution for this, but it turns out that it does not allow duplicates, but I need that. Later on I want to get the first matching entry and enumerate all of them. What would be the best generic container for allowing duplicates in this case, if there is any? Some kind of sorted object list? (I'm asking for generics that are part of the RTL, please don't point me to any 3rd party implementations.) -
Generic from the RTL for sorted list of objects
dummzeuch replied to dummzeuch's topic in RTL and Delphi Object Pascal
It not merely compiles but works as expected. -
Generic from the RTL for sorted list of objects
dummzeuch replied to dummzeuch's topic in RTL and Delphi Object Pascal
Hm, you declared K and V as class. An oversight? Changing this to TObjectDictionaryWithDuplicateObjects<K; V:class> (semicolon instead of comma) made it work (or rather compile) for me. -
Generic from the RTL for sorted list of objects
dummzeuch replied to dummzeuch's topic in RTL and Delphi Object Pascal
I'll try that dictionary + object list approach tomorrow. It's actually much neater than the sorted object list I was thinking about, and should also perform better, but that's not a real concern as I expect only a few dozen entries for the current need. But on the other hand, I'll probably start using this in a lot of other cases in the future. -
Generic from the RTL for sorted list of objects
dummzeuch replied to dummzeuch's topic in RTL and Delphi Object Pascal
Hm, shouldn't freeing the dictionary automatically free the object lists stored in it, which would then in turn free the objects stored in those? So there should be no need for the MyFreeObjectsFromList procedure, or am I overlooking something? -
Generic from the RTL for sorted list of objects
dummzeuch replied to dummzeuch's topic in RTL and Delphi Object Pascal
You're still miffed, apparently. -
What are the correct settings for "Code inlining control"?
dummzeuch replied to Der schöne Günther's topic in RTL and Delphi Object Pascal
You might want to turn inlining on for debug builds if what you are trying to debug might be releated to inlining. But in most cases I would also turn it off because it is really annoying if you can't step into a function because it was inlined. -
I just tried it in Delphi 10.2: I can only rename identifiers, it doesn't work for any other text or even special characters. But even with this limitation it is useful. And I know now, why I haven't used it: It's available since Delphi 2010 and until a while ago I was using Delphi 2007 for most projects.
-
I didn't even know it has a keyboard shortcut. I have never used it.
-
I'm sure I saw a similar functionality demonstrated in the Delphi IDE. Was it called SyncEdit? https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Sync_Edit_Mode_(Delphi,_C++) An older version of the documentation links to a video: But that's only for identifiers, not for generic text.
-
GExperts does not have this functionality.
-
Does ChatAI make StackOverflow obsolete ?
dummzeuch replied to david_navigator's topic in Tips / Blogs / Tutorials / Videos
Sorry, I couldn't resist letting ChatGPT write a reply to this: (I'll try to resist in the future though because I don't want this to escalate into a thread that consists of ChatGPT generated stuff only.) -
And those command line compilers do not use the dccxxxx.dll files?
-
What they mean is "Don't use a patched IDE to produce anything (DLL, Exe, DCUs, BPLs whatever) that's going to be used in production".
-
For all I know about that patch it might replace a dll that the commandline compiler uses.
-
Does anybody know whether this patch also affects commandline builds? For me it would be a huge inconvenience to be forced to uninstall the patch every time I want to do a production build. But having a better working less broken IDE is definitely desirable.
-
Is asked ChatGPT: What is Internet Component Suite for Delphi?
dummzeuch replied to FPiette's topic in ICS - Internet Component Suite
Yes, that's exactly what I did. And then I asked the first question again and got the same wrong answer again. So it doesn't "learn" but simply adjusts the answer when you tell it it's wrong, but not for the actual question but only as a reply to you telling it that the answer is wrong. Question -> wrong answer -> "I's wrong, beause ..." -> correct answer (maybe, otherwise rinse an repeat) -> orignal question -> original wrong answer -
Is asked ChatGPT: What is Internet Component Suite for Delphi?
dummzeuch replied to FPiette's topic in ICS - Internet Component Suite
Ask it that very same question again, it will then fall back the the same wrong answer as the first time or possibly modify it slightly but still be wrong. I tried that several times with different questions from different domains (and within the same session as it only "learns" within such a session). -
"Always break line between else and if" vs. comments
dummzeuch replied to uligerhardt's topic in GExperts
No, that's not the case. But the Unit Tests don't use the DLL, so you can create test cases for the unit tests and then implement the code directly using that program. -
"Always break line between else and if" vs. comments
dummzeuch replied to uligerhardt's topic in GExperts
No. It's something totally unrelated. -
"Always break line between else and if" vs. comments
dummzeuch replied to uligerhardt's topic in GExperts
If you really want that kind of formatting: I am accepting patches. -
"Always break line between else and if" vs. comments
dummzeuch replied to uligerhardt's topic in GExperts
There is no option (as far as I know, I might have missed it). And I remember seeing a comment in the original formatter sources from Egbert van Nes that he implemented this behaviour because he couldn't get the formatter handle these comments in any useful manner without breaking the source code. If anybody really wants to use that kind of comments: I am accepting patches.