Jump to content

Lars Fosdal

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Lars Fosdal

  1. Lars Fosdal

    ChatGPT Converted Unit

    Chat in, shit out?
  2. Lars Fosdal

    Find String in TstringList

    Right, so it should be set to false to match the original code samples. There is something odd in the original samples. If I copy the text, and paste it into a code block here - I get artifacts in other.cff - note the red dots. Makes me wonder if the artifacts also exist in the original code - in which case it should fail.
  3. Lars Fosdal

    Find String in TstringList

    Isn't that case sensitive?
  4. Lars Fosdal

    Find String in TstringList

    Have you checked the data in the string list for non-printable characters around the .extensions?
  5. Lars Fosdal

    Find String in TstringList

    The first three can fail because you are resetting Result for each entry, meaning only the last line will decide the result. Result := False; for var s in StrList do begin Result := Result or (SameText(s, 'some.pds') or SameText(s, 'other.cff')); if Result then Break; end; Is there whitespace in the strList entries? If there is - Trim. Why the double search in ContainsStr? Is that the AnsiStrings.SameString or the SysUtils.SameString?
  6. Lars Fosdal

    Find String in TstringList

    Perhaps you should show us the search code you use?
  7. Lars Fosdal

    Unicode normalization

    Is there Unicode support in @Alexander Sviridenkov's https://delphihtmlcomponents.com/index.html ?
  8. Lars Fosdal


  9. Lars Fosdal

    Loop a Delay in a thread??

    WaitForMultipleObjects or WaitForSingleObject or the ..Ex versions allows waiting with a minimum of looping, i.e. less CPU usage. Examples of usage can be found f.x. in OmniThreadLibrary.
  10. We also used SVN for nearly a decade before switching to Git. We do not have any regrets, but we are grateful for a lot of the new possibilities. We chose GitKraken as GUI, but Fork was runner up. I can't remember what pulled us in direction of GitKraken. This "Git, Demystified" video from Delphicon 2023 is an awesome intro to Git.
  11. Lars Fosdal

    How many people use Delphi?

    @Fr0sT.Brutal I use VSCode a lot to search source code and structured data (XML, JSON), and I've got 47 plugins installed. I find it to be pretty snappy for my use, TBH.
  12. Lars Fosdal

    FMX mobile database

    @omnibill Don't access a DB directly over the internet. It exposes the DB and eventual vulnerabilities It binds your UI to the current DB model, instead of a general data model, making it harder to make changes to the DB without breaking the UI Use a REST server to hide the underlying database and communicate with API structures (JSON, BSON, XML, etc) adapted to your general data model It hides the actual structure of the DB - such as unique integers used for relationships, but which has no information content It prevents SQL injection attacks Using proper authentication models (OAUTH2), you avoid exposing DB internal users It allows server side sanity checks of incoming content It makes outgoing content access control more flexible You can allow third party to access your APIs You can change the DB on the backside of the API You can scale the DBs on the backside of the APIs
  13. Lars Fosdal

    Delphi 11.3 is available now!

    @PeaShooter_OMO 11.0 to 11.3 is definitively worth it. Tired of code completion issues and Ctrl+click navigation not working? Lots of IDE fixes to be had. I personally prefer to uninstall all libs and plugins, then uninstall the IDE, and clean folders and clean registry before installing 11.3. Tip: If you are comfortable with .reg files - backup the old registry branch to yank out and reapply f.x. custom syntax highlighting settings afterwards.
  14. Lars Fosdal

    Delphi 11.3 is available now!

    @PeaShooter_OMO Which version are you on now? Which platforms are you using? We went from 10.4 to 11.1, and now to 11.3 - doing mostly Windows development. IMO, it was worth it.
  15. Lars Fosdal

    How many people use Delphi?

    Well, if you work with databases, everything else feels fast 😛
  16. Lars Fosdal

    How many people use Delphi?

    In Norway, Delphi developer salaries are relatively high compared to others - but I guess that is connected to the seniority of the average Delphi devs - We've been around for a long time 😛
  17. Lars Fosdal

    How many people use Delphi?

    Delphi is not dead, but a niche language. It is great for many uses, easy to learn, has readable code, and is nice for the hobbyist or for doing inhouse tools. However, if you intend to make a living doing software development and easily find employment, learn C#, Java, TypeScript and SQL. C++ if you want to do games. C if you want to do embedded.
  18. Lars Fosdal

    Updated XMLMapper

    @Miguel Moreno - I have an XSD schema that the XMLMapper doesn't like. Should I create an entry in Quality Portal? When I try to select the entire structure, I get multiple of these. The document also has more than one root - which seems to be handled.
  19. No, not really. Very little Delphi work these days, as I am trying to get my head around an ERP system and all its wrinkles.
  20. I have the weirdest issue. I just installed a fresh Delphi 11.1 + patches on a new, fully patched Windows 10 Enterprise laptop. For some weird reason - I can't debug. Breakpoints don't break. Exceptions break shows assembly code, says it is mixed mode, but no source lines show, and I can't trace to next sourceline. Yes, I am in 32-bit debug mode. Yes, the project has the debug settings and debug info included. Yes, the output folders have full access for the current user. Yes, there is only one set of DCUs in the path. Yes, there is only one .EXE file. Edit: Yes, they are debug DCUs Yes, line endings are CRLF Yes, current user has local admin rights As soon as my app starts, the breakpoints are grayed out. Edit 2: It does not happen to all apps. The problem app is about 600k lines. Tiny apps and a larger 1100k line app - no problems. What am I missing? Update - Possible causes? A developer on a non-corporate laptop does not have this problem. Another developer on corporate laptops have the same problem as me on both new and old laptops. That seems to indicate a Windows policy may be a factor here. Anyways - workaround: Project | Options | Linking | Include remote debug symbols: A tick here gave working breakpoints for us.
  21. Lars Fosdal

    Delphi 11.3 Patch 1 Available

    https://blogs.embarcadero.com/rad-studio-11-3-alexandria-patch-1-available/ Edit: Corrected the link
  22. Lars Fosdal

    How do I convert from string to char?

    It clearly tells you that a string is an array of characters. That should give you some ideas?
  23. Lars Fosdal

    How do I convert from string to char?

  24. But - there are other uses than generating code - namely analyzing it. https://betterprogramming.pub/i-used-gpt-3-to-find-213-security-vulnerabilities-in-a-single-codebase-cc3870ba9411