Jump to content

Lars Fosdal

Administrators
  • Content Count

    3416
  • Joined

  • Last visited

  • Days Won

    113

Everything posted by Lars Fosdal

  1. Lars Fosdal

    Quickly zero all local variables?

    It would be for Sydney that it is most interesting to report, me thinks.
  2. Lars Fosdal

    Quickly zero all local variables?

    Slightly worrysome that there was no warning. Is it complicated to reproduce it and report it?
  3. The check has a performance penalty, so using assert is probably the better option if you must have verification.
  4. @Marat1961 According to your link So, by the general rule is not required, as the caller is responsible.
  5. You can have an example repository with several sub-projects in their own folders. Each example would be a self contained project, ready to download, compile and run. Doing fixes would be easy. Adding features would be easy. Taking contributions would be possible.
  6. Correct. Which ones that one can trust to be. Which ones that can be made to be - and how. The impossible ones. Perhaps even a set of cookbook examples on how to do atomic exchange of different variable types, and what to do if you can't do them atomically due to misalignment.
  7. Someone should author the definitive article on the memory alignment of variables. Which ones always are? Which ones may not be, and how to fix it? Which ones, if any, are out of your control?
  8. Would it not be nice if the whole thing was on GitHub, GitLab, BitBucket or similar where it could be easily shared and modified, instead of a wall of code on a forum?
  9. Lars Fosdal

    Comunicate with POS terminal (Ingenico)

    That protocol looks more like a Serial cable protocol, than a TCP protocol? What happens if you send it as binary bytes instead of text hex? I.e. each hex value converted to a byte.
  10. Nice, Carlo. I use the SVG preview capability from https://docs.microsoft.com/en-us/windows/powertoys/file-explorer
  11. Scoping can lead to some weird scenarios. F.x. type TBase = class private public Data: Integer; end; TChild = class(TBase) private public Data: string; end; But, being able to "hijack" methods, simply by introducing them to the visible scope, is also kinda useful. A set of hints would be nice, though, so that you don't do it by accident.
  12. Lars Fosdal

    Casting pointer to TBytes

    Nothing beats pointers to arrays for InterOp - even today.
  13. Lars Fosdal

    Casting pointer to TBytes

    By "need to pass it to a (read only) memory area" - what do you actually mean? Do you want to get data from aData or put it to aData? Edit: ok, I read that again. What you want to do, is to allocate your TBytes array instead of using GetMem. SetLength(MyData, Size); Whatever fills your GetMem block, should also be able to fill @MyData[0] with the length you have preallocated? You then pass that as Something(MyData);
  14. Here is how our TIdTCPServer shutdown code looks. That exception doesn't really happen anymore, though. 🙂
  15. Lars Fosdal

    Inherited on Properties and co.

    Ah - Brain fog cleared. Thanks, guys.
  16. Lars Fosdal

    Inherited on Properties and co.

    If it is public, why do you need to use inherited? I think the point just wooshed over my head here. (Not the first time)
  17. @Marco Cantu I wish I as a subscriber could download it without having to reenter information already in your systems.
  18. Lars Fosdal

    Inherited on Properties and co.

    I guess private is not private - unless strict private?
  19. Lars Fosdal

    Inherited on Properties and co.

    That is interesting - and a little disturbing.
  20. BTW; Wouldn't this do the job without putting extra load on the PC? https://www.philips-hue.com/en-nz/p/hue-play-hdmi-sync-box-/8718699707248
  21. Lars Fosdal

    Delphi and the new Apple M1 CPU

    Voted and watched too.
  22. True, although he may need to take into the consideration whether the monitor and game is using HDR or not?
  23. @Der schöne Günther I.e. the overall luminosity of the image? https://stackoverflow.com/questions/7964839/determine-image-overall-lightness Unsure if there needs to be something additional in the equation as mathematical and perceived luminosity might not be the same?
×