-
Content Count
3711 -
Joined
-
Last visited
-
Days Won
185
Posts posted by David Heffernan
-
-
26 minutes ago, Arnaud Bouchez said:Delphi would be a weird choice for programming
Yes. Same argument applies.
-
Fossil would be a weird choice. Regardless of how good it is, it's not widespread. git is everywhere, and has so much tooling and resources available. Very hard to see past it.
-
5
-
-
This __imp_ mangling, IIRC, is used by ms tools when linking using a import lib. Delphi links to DLLs in a different way. Not sure if the difference is important.
If it were me I'd compile each source file individually using cl and then link those.
Although I don't like to do that very much. It's tempting to be able to link objects statically. But it's fraught with difficulties. It's fiddly. And under x64 you have a further problem. The Delphi compiler doesn't respect the meta data in the object file describing the exception tables. So if exceptions are raised in the linked C code, then it's common for the process to be terminated forcefully.
These days I always prefer to link to DLLs using an sxs assembly to avoid problems with dll search paths.
-
How did you compile the C code?
-
As for backups with git you can use a cloud repo in addition to any local ones to give you extra redundancy.
-
1
-
1
-
-
The revision control comments are on topic. Revision control is a key part of how you develop new features in an existing code base.
-
2
-
-
18 minutes ago, Mike Torrettinni said:great minds think alik
Every effective programmer understands the value of revision control
-
1
-
1
-
-
You only feel the need to develop in such an isolated fashion because you don't use revision control.
If you had revision control you'd branch and develop your feature. You'd run your existing tests to prove that you had not damaged existing code.
Why do you resist using revision control? It will make you far more productive and effective.
-
1
-
-
3 hours ago, Mike Torrettinni said:I don't have real source control,
You should drop everything and fix this. I'm sure we've told you this before. We were right then, we are right now.
-
5
-
-
3 minutes ago, Mike Torrettinni said:I didn't even know about WITH ... AS .. DO.:
"with as do" is not a thing in its own right. There is with (expr) do. And here we see as used in an expression. We are just composing different aspects of the language.
-
1
-
-
4 hours ago, Mike Torrettinni said:I was hoping new LSP would sort this out. Maybe in future updates. Never give up hope on Delphi 🙂
LSP isn't about changing the language warning definitions.
Never give up hope is a strange message. Keep hoping if that hope is justified.
-
20 minutes ago, Lars Fosdal said:It doesn't need to be complicated.
If the type of the variable you reference by with contains a field or property that has the same name as a local field or property - you do not get a hint or a warning, but the property set will be the on the with reference, not on the class instance doing the with reference.
All problems relating to with could be solved by the compiler warning about such collisions.
-
1
-
-
3 hours ago, Gary Wardell said:What should I change so I can get a helpful answer?
More clarity in the question. Full details of error, and a minimal reproduction. And don't post criticism for not receiving a response immediately. That does not motivate people.
-
Given that so much that is actually important is broken, this should be way down the list of priorities.
-
3
-
-
8 hours ago, Gary Wardell said:Hmm, 23 views and nobody knows what FMX files are or where they are from or how to add them to the library files so they can be found?
Not sure this approach is helpful.
-
19 minutes ago, Vincent Parrett said:My records have constructors, I'm guessing that now makes them managed records
No I don't think it does make them managed records.
I don't really understand how such simple code could break the compiler. It's as if Embarcadero don't have comprehensive tests in place.
-
3
-
1
-
-
40 minutes ago, Vincent Parrett said:More on my issue, removing the record constraint does allow it compile, but removes some compile time type safety
Will it compile if you restore the constraint but specify the generic type explicitly instead of relying of type inference?
-
24 minutes ago, Kas Ob. said:In C/C++ it way easier to convert a simple bufferflow into security hole, let you take over the system in full if not only the application, parameters passed in registers and memory allocated buffer along with the way stack in Delphi preserve itself with the locals, makes it way harder to run code passed by a parameter, unlike C and many other languages there is many ways to do it, and it is easier and and even when you are expert programmer, the candidate code to be abused code can easily escape your eyes and mind, the stack is the cause in 90% of those security holes you see in an application/OS written in C/C++. while the stack is sacred and better protected against simple and complex abuse in Delphi, i am not saying it is impossible to do an abuse, but it is near impossible to predict the abuse outcome, mostly it will end up in AV at random address, defusing the greater lost by running hand crafted malicious code.
This is just not true.
-
1
-
-
1 hour ago, Kas Ob. said:See, pascal/Delphi is more secure than C++ and C#, less than Rust
Security is not a property of the language. It's a property of the code. And the code is written by programmers. They determine how secure a piece of code is, not the choice of language.
1 hour ago, Kas Ob. said:it is secure for many reason but mostly due the declaration of variables before using them when entering procedure
Hard to see how that brings security.
-
21 minutes ago, Incus J said:does Delphi have a repair option?
Yes.
-
28 minutes ago, Mike Torrettinni said:No, not using any of it, yet. Planning to do some profiling and benchmarking on real data and will see if there are any bottlenecks in this area.
If you don't have a performance bottleneck, make sure that you use a version of the code that is easy to read and maintain.
-
1
-
-
1 hour ago, Mike Torrettinni said:Interesting stuff: asm, registries, aligning... it's like a black-box to me. Reading how little insignificant changes (order of functions calls) affect the performance, is kind of scary.
But it shows how real performance optimization is based on case by case. It's hard (or impossible) to make 1 super performant algorithm for all cases. Just from this thread we can see the differences on optimization for short vs long strings, or like @aehimself pointed out if we need to consider nested brackets, escaped chars, quoted chars...
Here I am thinking if increasing char pointer is faster than using integer iterator, while you guys are discussing condition branching and using stack and full set of registries 🙂
Do you have a performance bottleneck with this code?
-
14 hours ago, River_Forest said:Is there an easy way to add scrollbars to the main window of my project? (I hope this is the right place to post this question. Also, as a user of the Community Edition, it appears that I don't have access to "Help," so I can't find the answer there.) I thought something might be listed in "Properties," but I'm not seeing it there.
You can get help in the community version I believe. But in any case it's all online.
-
3 hours ago, Mike Torrettinni said:I like all the buzz being created around Delphi.
There is no buzz. Where are all the new developers?
-
1
-
Why should I use good source control versioning system?
in Tips / Blogs / Tutorials / Videos
Posted
Yes. Same argument applies. I use delphi because I have a huge code base written in Delphi. If I was starting from scratch I would categorically not use delphi.