-
Content Count
3710 -
Joined
-
Last visited
-
Days Won
185
Everything posted by David Heffernan
-
A painful read from a development team that has bitten off way more than it can chew.
-
issues using filenames with spaces
David Heffernan replied to FranzB's topic in Algorithms, Data Structures and Class Design
Doesn't seem plausible. FileExists doesn't care about spaces. You'll want to do some debugging on a machine that exhibits the behaviour. -
question about GPL and Delphi
David Heffernan replied to RDP1974's topic in Tips / Blogs / Tutorials / Videos
could be a long wait -
Invalid Compiler Directive: 'MESSAGES'
David Heffernan replied to Incus J's topic in ICS - Internet Component Suite
Replace that with AtomicIncrement or the Increment method from System.SyncObjs.TInterlocked -
Translation of C headers.
David Heffernan replied to pyscripter's topic in RTL and Delphi Object Pascal
Problem could be how you call the function -
Why should I use good source control versioning system?
David Heffernan replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
It really makes not a lot of difference which vcs you use, compared to not using revision control. -
question about GPL and Delphi
David Heffernan replied to RDP1974's topic in Tips / Blogs / Tutorials / Videos
If your program requires the covered code in order to function then I think your code needs to also be GPL. Worth talking to the developer of the code. Often they will dual license for such eventualities. -
Probably it is mature now.
-
Not quite. The default initialisation is outside the function.
-
You don't get this because the return type is a managed type and so is actually passed as an extra var parameter. So the variable is assumed to have been default initialised outside the function. I'm not trying to defend the compiler design here. The handling of function return variables is a complete mess in my view. They should be passed by value from callee to caller. The whole hidden var param is a weird hack from the ancient past that should never have been done.
-
omnithread Omnithread DELPHI, many calls in the same function
David Heffernan replied to bill parish's topic in OmniThreadLibrary
https://stackoverflow.com/questions/63111541/omnithread-delphi-many-calls-in-the-same-function For reference, here is the same Q on SO -
Adding madExcept or EurekaLog or similar is the obvious way to find out what is going on here.
-
TCriticalSection and cache line size
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
I'm not denying the existence of the problem. I'm just putting up a flag to say that I believe that in a great many codebases you are very unlikely to encounter it. So, don't get to too stressed about this, and perhaps don't worry about trying to fix the problem unless you know for sure that you are affected by it. -
TCriticalSection and cache line size
David Heffernan replied to dummzeuch's topic in RTL and Delphi Object Pascal
It's pretty unlikely to encounter this issue in real code. -
Linking to a C obj file that makes Windows calls
David Heffernan replied to pyscripter's topic in RTL and Delphi Object Pascal
I always turn off stack checking for this reason. Wouldn't it just be better to put it in a DLL? -
Linking to a C obj file that makes Windows calls
David Heffernan replied to pyscripter's topic in RTL and Delphi Object Pascal
Just compile the C++ code with options that suppress stack checking. Seriously though, putting all this in a DLL is a far better approach. -
have anyone made tool to convert Delphi files from Ansi to UTF-8
David Heffernan replied to Tommi Prami's topic in General Help
https://superuser.com/questions/1163753/converting-text-file-to-utf-8-on-windows-command-prompt -
Anybody up for an ethics question?
David Heffernan replied to David Schwartz's topic in General Help
And to think that the question was meant to be about ethics. -
Running Tokyo 10.2.3 dcc32 from the command line
David Heffernan replied to David Schwartz's topic in Delphi IDE and APIs
What can of worms? It has always been easy enough for me. And clearly we do have a dproj in this instance. -
Running Tokyo 10.2.3 dcc32 from the command line
David Heffernan replied to David Schwartz's topic in Delphi IDE and APIs
That might make it compile, but you'll also need to specify any other options that are non-default. And then update the code that invokes compilation any time you make a change to the project config being compiled. Why not let msbuild do it for you? -
Anybody up for an ethics question?
David Heffernan replied to David Schwartz's topic in General Help
As a programmer, you are aware of the issues around invalid data, missing data, etc. The client who provides the specification is often less aware of these issues, and their consequences. In terms of ethics, I would say that as a programmer it is your responsibility to raise the issue with the client. That's part of being a good professional. How the client responds to that is down to them. If they insist on ignoring invalid data, then that is their choice. But you should strongly advise them against that, and if they do insist, then document that this was their choice. In your case it sounds like the ultimate client is not being advised of this, and the culture in your organisation is to do what the client asks without questioning it. That's a slightly different problem. If the decision takers in your organisation are not receptive to best professional practise then there's only so much you can do. -
Running Tokyo 10.2.3 dcc32 from the command line
David Heffernan replied to David Schwartz's topic in Delphi IDE and APIs
Using msbuild is the simple way to get this done. -
Running Tokyo 10.2.3 dcc32 from the command line
David Heffernan replied to David Schwartz's topic in Delphi IDE and APIs
Shouldn't you be using msbuild? That's how you make sure that you get all the project settings. Otherwise you have to manually convert all the project settings into the dcc32 arguments. The msbuild rules do all that for you. -
Why should I use good source control versioning system?
David Heffernan replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
These decisions depend very heavily on what type of coding you are doing. In my case it's a numerical code, whose bottlenecks are floating point calculations. So runtime performance is highly important, and Delphi is very poor in this regard. My working assumption is that C++ would be the right choice, at least for the numerical part of the code. But if and when we come to migrate then I'd need to spend a lot of time evaluating options, and I'd look beyond C++ too. This is not to say that I am a big fan of C++. -
Why should I use good source control versioning system?
David Heffernan replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
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.