Jump to content

David Heffernan

Members
  • Content Count

    3586
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by David Heffernan

  1. David Heffernan

    "Incompatible parameter lists" when using Types.T*DynArray?

    This doesn't seem to hang together. Could you provide a complete program to demonstrate the issue. I get that if you need to support pre generics versions then TArray<string> is out but if you don't need to support those ancient versions then this for is much preferable.
  2. David Heffernan

    while TStream_TryRead() do

    I didn't see that condition documented. I also hadn't realised that some streams can read fewer than the requested bytes but there still could be more left. That does seem a strange design choice. If you can wait for at least one byte then surely you can wait for all requested.
  3. David Heffernan

    while TStream_TryRead() do

    I not advocating the repeat. I think the TryRead is nice. Class helper for TStream would be good. I general TryXXX methods tend to be useful in loads of places.
  4. David Heffernan

    while TStream_TryRead() do

    Weird repeat loop. I'd do: repeat BytesRead := Stream.Read(Buffer, BufSize); until BytesRead < BufSize;
  5. David Heffernan

    .exe File not outputting

    It's because the second arg must refer to writeable memory and UniqueString ensures that. A websearch on CreateProcess and UniqueString will yield many discussions of the issue.
  6. David Heffernan

    bitmap is not displayed

    At this point, you probably need to sort it out yourself. You seem to have decided to take an approach that won't work. Given that nobody can make it work, you need to come to that realisation yourself.
  7. David Heffernan

    .exe File not outputting

    Why are you asking the shell to create a cmd process which in turn creates another process. Use CreateProcess and miss out the cmd middle man.
  8. David Heffernan

    PythonEngine and VCL.PythonGUIINPUTCOMPONENT not working

    Seems like a good place to start. Why keep asking here if when the answer comes, you don't heed it?
  9. David Heffernan

    PythonEngine and VCL.PythonGUIINPUTCOMPONENT not working

    So what is the question?
  10. David Heffernan

    bitmap is not displayed

    WinProcs? Why are you working with code from the 1990s? Where did that code come from?
  11. David Heffernan

    Spring4d in Linux

    Is this a minimal do nothing program? Or is your actual application logic there?
  12. Likely a defect in your code. You'll need to start debugging.
  13. David Heffernan

    Rounding issue

    There will be other calculations where that isn't the case
  14. David Heffernan

    Rounding issue

    Floating point can be tested for exactness too. Your idea of doing floating point calcs and then rounding to 4dp before equality testing is still subject to issues. If there are differences after the floating point calc, then the round to 4dp could fall on different sides of the rounding boundary. Always in these discussions there needs to be more specifics of the calcs involved.
  15. David Heffernan

    Rounding issue

    Why would you be calling power and then truncating to 4dp and comparing for exactness?
  16. David Heffernan

    Rounding issue

    Seems like bad advice. Why would you do this?
  17. David Heffernan

    How do I upgrade an old 2007 project ?

    Generics in 2010 were super bugged but generics is irrelevant for a port. Trying to find versions of all libraries that work with 2010 could be tricky. I see no reason in doing multiple ports here.
  18. David Heffernan

    String comparison in HashTable

    This is the part I didn't watch, but yeah, that makes so much more sense now!
  19. David Heffernan

    String comparison in HashTable

    He's probably using UTF-8
  20. David Heffernan

    Windows 11 (22H2) 8bit bitmap problem

    It's a sign from above
  21. David Heffernan

    String comparison in HashTable

    Perfect hash only works if you can restrict your input domain, or am I wrong?
  22. David Heffernan

    String comparison in HashTable

    The thing is, how are you going to get to the stage where you have got a token that you know is a valid keyword? Perfect hashes are cool and all, but I wonder if this is the best example.
  23. David Heffernan

    String comparison in HashTable

    What seems missing to me is how to restrict the input data to be just valid typescript keywords.
  24. I use option sets. They are in my repo and if I want to change the all my projects pick them up.
  25. David Heffernan

    How do I upgrade an old 2007 project ?

    Nah, I'd go all the way to the latest. Multiple stepping stones is just adding extra complexity. The big change is Unicode. Everything else is simple.
×