Jump to content

Brandon Staggs

Members
  • Content Count

    225
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Brandon Staggs

  1. Brandon Staggs

    Hotkey Editor

    There's a good reason this isn't included in the list of possible shortcuts. https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerhotkey "Keyboard shortcuts that involve the WINDOWS key are reserved for use by the operating system."
  2. Nonsense. I've discovered lines of code that incorrectly cast pointers to integers (and vice versa) due to address layout randomization on 64 bits finally pushing a 64-bit value into a 32-bit variable during debugging. I'm not suggesting it is a debugging tool in and of itself (it's not purposed for that), but it does increase the likelihood of being given addresses above the 32-bit range. If you're already using the correct size variables, then obviously this doesn't apply.
  3. Brandon Staggs

    A gem from the past (Goto)

    That's great!
  4. If your code assumes that a pointer is an Integer (likely due to legacy but still invalid assumptions from a decade or more in the past), high-entropy ASLR will more quickly expose those errors when compiling for 64-bit. That's what I was referring to.
  5. Why does the Delphi IDE still not handle line endings properly? Just wondering.
  6. I don't understand this but I would like to know what you are talking about. Link? At first glance it makes zero sense that randomizing the address layout would create any kind of problem for properly written code. Obviously that was not the problem for the OP. In fact, ASLR seems like a great way to make badly written code break during testing rather than only rarely in production...
  7. Somewhat common issue for me, and I don't use GetIt. I have never figured out what causes the IDE to start puking all over the file like that.
  8. Brandon Staggs

    Delphi and "Use only memory safe languages"

    The convergence of documents written by government bureaucrats and corporate marketers would produce nothing other than stupid.
  9. Brandon Staggs

    Delphi and "Use only memory safe languages"

    Nevertheless, all of the non-trivial projects I work on make use of pointer math too. What you say about pointer math, speed, and what companies want, may be true in many cases, but extrapolating from that to your original claim about pointers (math or aliases, regardless) is quite a leap. They have not "pretty much disappeared from use." One example that comes to mind is a custom 8-bit bitmap backing we developed that would be excruciatingly slow were it not for basic, simple, tried-and-true pointer arithmetic. The reality is also that even libraries that don't offer access to these programming methods still make use of them internally. Somewhere, someone is doing the pointer math.
  10. Brandon Staggs

    Delphi and "Use only memory safe languages"

    I didn't mean it like that. I was speaking in practical terms. You are not going to get Delphi with Garbage Collection, and Delphi with ARC-everywhere (not just interfaces and dynamic arrays) has already failed. So if you need it, your only choice is to move away from Delphi. I didn't mean this in the "love it or leave it" sense, LOL!
  11. Brandon Staggs

    Delphi and "Use only memory safe languages"

    That's a pretty bold statement. All of the non-trivial projects I work on make use of pointers. Saying they have "pretty much disappeared" is a bit of a stretch in my experience.
  12. Brandon Staggs

    Delphi and "Use only memory safe languages"

    That's a big problem if you are trying to convince your existing customers that they can reuse their code on new platforms. Embarcadero obviously realized that was a losing strategy.
  13. Brandon Staggs

    Delphi and "Use only memory safe languages"

    Did you read the abstract on the link? There is no way Embarcadero can do anything like that. They would have to literally transition away from Delphi. Try to keep Delphi? You'd have to change the language too much. Their attempt to do that (ARC) failed for several reasons. If you really need that kind of hand-holding, you need to move to a different language. Expecting Embarcadero to do anything to help you transition away from Delphi (or C++) is not realistic. Expecting them to make it so you don't need to transition away (assuming, again, you want the hand-holding instead of having to manage memory yourself) from Delphi is also as unrealistic as expecting Google to somehow make C++ "memory safe."
  14. Brandon Staggs

    What new features would you like to see in Delphi 13?

    Ah, got it. Still, you want to return an instance of a type that is not yet defined for the compiler. Maybe you should be able to, I suppose.
  15. Brandon Staggs

    What new features would you like to see in Delphi 13?

    Beg to differ. At the point you declare an instance of TRecA inside of TRecB, the compiler does not yet know how much memory a TrecA instance takes. type TRecA = record; TRecB = record FieldA: TRecA; end; TRecA = record FieldB: TRecB; end;
  16. Brandon Staggs

    What new features would you like to see in Delphi 13?

    Well, turns out this works exactly as @dummzeuch presumed it would. Which actually makes sense, I suppose. I doubt the IDE refactoring that they would have to do to support sub-process DPI awareness in the form editor is something they would want to tackle. That's too bad. Still, it offers some form of mitigation of DPI scaling dfm disasters if you can put up with the drawbacks during editing
  17. Brandon Staggs

    What new features would you like to see in Delphi 13?

    That is not correct. DPIv2 allows exactly that, and that is when Embarcadero added this option, and I vaguely recall testing it to satisfaction on my Surface Laptop. I have not returned to that to look at it since, though, as I don't do any real dev work there. https://learn.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows?redirectedfrom=MSDN#mixed-mode-dpi-scaling-sub-process-dpi-scaling https://learn.microsoft.com/en-us/windows/desktop/api/Winuser/nf-winuser-setthreaddpiawarenesscontext It is entirely possible that Delphi does not do it this way and I am mistaken. I can't really remember. I think I might check, out of curiosity.
  18. Brandon Staggs

    [dcc32 Fatal Error] F2039 Could not create output file

    No, because this is how Webroot does things. I already went through this experience vicariously when users of our software were affected by Webroot blocking clipboard access by default and not telling their users what was happening. This was like 10 years ago, and nothing has changed since then, and the first thing we do when trying to diagnose odd problems like the one you have is disable this garbage software and it very often fixes it. I did not mean to be insulting and I apologize for that, but the fact remains that you are using software that is fundamentally broken because they choose to inconvenience/disable first so that they can claim to be doing a better job than everyone else.
  19. Brandon Staggs

    What new features would you like to see in Delphi 13?

    I don't know why I was thinking it just let Windows scale the output (ie, the window is treated as DPI unaware). Obviously I agree that editing the form that way is very suboptimal.
  20. Brandon Staggs

    Delphi IDE alternate registry location issue

    Just a comment, I use the registry switch myself and have not experienced this problem, so hopefully there is a straightforward solution.
  21. Brandon Staggs

    [dcc32 Fatal Error] F2039 Could not create output file

    I guess I just have a different experience. In 30 years I have not had my system infected with a virus, I have not fallen for a phishing attack, and have never been infected with ransomware. The idea that I should install something like Webroot which would actively interfere with my ability to use my computer and do my job makes no sense to me given the that track record. BTW, I don't buy this line that Defender doesn't "perform well." But I don't think I'll get into that off-topic conversation. I will say that I am amused by this a little. You've identified software on your computer that is actively interfering with your ability to use it and do your work, but you have convinced yourself that it is somehow in your best interest. 🤷‍♂️
  22. Brandon Staggs

    [dcc32 Fatal Error] F2039 Could not create output file

    Just use what comes with the OS.
  23. Brandon Staggs

    What new features would you like to see in Delphi 13?

    Personally, I see no reason to add more options to obfuscate my code. I can do well enough with goto and with when I need to scratch that itch. And when I really want to spice things up, there is always absolute.
  24. Brandon Staggs

    What new features would you like to see in Delphi 13?

    I am inclined to give some latitude to the devs on dfm dpi issues because they are fighting a very legacy system that goes back to the 80s. Multi-dpi support in Windows is problematic because of the base Win32 api. It's not like Mac where they chucked everything and went to floating point values, which is the real solution, but has the downside of throwing out billions of dollars worth of working code. (On Windows I mean. On Mac, since hardly anybody used it to do real work, it was no big deal to do it in the 90s.) Anyway, doesn't the "Low DPI" setting for the form designer solve the dfm issue? True, it means editing the form is scaled by the OS, but the rest of the IDE should be in the correct DPI. Am I wrong about this?
  25. Brandon Staggs

    What new features would you like to see in Delphi 13?

    I am curious about this. I know that Delphi's DPI support is in a constant state of disrepair, but on this specific issue, doesn't this setting fix the problem? Obviously that has the downside of the form editor being stuck to 96 dpi, but for me at least, that would be acceptable for editing since the vast majority of my time in the IDE is spent elsewhere and the text I care about reading should scale properly in the editor/menus/etc.
×