-
Content Count
3499 -
Joined
-
Last visited
-
Days Won
174
Posts posted by David Heffernan
-
-
1 hour ago, Markus Kinzler said:But this was the "old-gen" compiler beeing subsituted for most of the targets now. Only the Win32 and OS32 compilers are based on it.
Win64 also I believe
-
9 hours ago, PeterPanettone said:I could easily write a small script-tool which fixes the commas. But at a more general scope, it would be interesting if it was possible to fix these syntax errors with the help of the compiler?
Writing a tool is how I would approach this. Learn a language like Python so that task like this can be done very easily and quickly.
Of course, an even better solution is to fix the process that is generating erroneous code in the first place.
-
Wouldn't you just add the commas? I mean, how many lines of code do you have with this mistake in?
- 1
-
Is this the only error that you want to be fixed automatically?
-
Pretty bad reasoning.
If it's for paid customers only, then there's no security in case Emba go bust.
"Because we love Delphi more than you do."
How to win friends and influence people.
- 4
-
I don't think that this is encryption. And in any case, it's probably worth knowing that the password can be removed trivially.
-
Being able to manage the lifetime of classes is not an expert skill. It's well worth learning how to do it. Likely in your case you have somewhat tangled code into which you are jamming these classes. The difficulty is not that TList is hard, or that lifetime of classes is hard, but refactoring large code with different standards is hard.
-
1 hour ago, Mike Torrettinni said:Eh, I just got some unexplained nil pointers and exceptions... and debugger kept hiding value of TList variables, never had so much hassle with TArray. So I converted all code from TList<T> back to TArray<T>,
I will keep TList<T> for just simple cases. Well, I tried.
When done right, it is simpler and cleaner to code using higher level constructs. Sounds like you are blaming the tools.
-
Aren't you meant to do work in a background thread?
- 1
-
2 hours ago, Dalija Prasnikar said:If everyone stays away, bugs will never be found and fixed...
Herd immunity springs to mind
- 1
-
-
5 hours ago, Mike Torrettinni said:I like the DLL option, but the client is not too happy about it as they don't want to have additional external files for deployment.
Spend the time to get the deployment right and it's no problem. If you can deploy a single exe file then you can deploy a dll alongside it. If anyone is complaining then perhaps you aren't deploying correctly. I wonder, you aren't trying to deploy to system 32?
-
3 hours ago, Holger Flick said:There is the new unit IOUtils. What does TFile, TPath, or TDirectory use?
You can read the code to find out
- 1
-
1 hour ago, Ian Branch said:Hi David,
Agreed, but knowing where they change means I can insert conditionals relevant to the Delphi version.
Ian
If you don't have those versions, you don't need to do that.
-
Knowing the version where things changed doesn't influence how you resolve the warnings
-
2 hours ago, Rudy Velthuis said:I have put code through godbolt quite a few times already. Yes, the generated code is not bad, but can still be improved, manually.
That's not the same as starting from scratch.
Also, didn't you have trouble with bugs in you asm code in your bigint library?
-
37 minutes ago, Rudy Velthuis said:The ideal situation would be, of course, if the compiler automatically added (wrote) such a destructor for us, using the knowledge it has about the types in the record at compile time, instead of simply compiling in a function like FinalizeRecord and type info. But what I have seen (and which was removed again) already showed a lot of promise.
Well, that's exactly what I have been arguing for. It seems utterly insane to me that this task is handled at runtime when it can be handled at compile time.
Anyway, as I understand it the record dtor would run in addition to the RTTI based finalization code. So adding a dtor could only ever make code slower.
- 2
-
4 minutes ago, Rudy Velthuis said:And yet I think well but manually written assembler beats every compiler, despite the often used "a good compiler ... etc.".
True years ago, but these days not so. Just put some code through godbolt and marvel at the code that it generates. You don't have to get that complicated before you see the compiler spotting optimisations that are very far from obvious. Optimisers now have deep knowledge of hardware architecture and can use that to make choices that are beyond almost all human asm programmers.
- 1
-
That's because your button event handlers run busy message loops waiting for the child processes to finish.
Your mistake is to run those busy loops in the main thread. You should consider running those loops in dedicated threads, and obviously remove the message processing.
You code leaks the process handles and has other problems. Duplicating the code is a bad idea.
You should be using CreateProcess to create processes.
Fundamentally I would say that your main issue is that copying code without understanding it is a bad idea. You then become unable to maintain it and are unable to critique it.
- 1
-
1 hour ago, Rudy Velthuis said:That is why the new constructors/destructors etc. would be so cool: you can do your own initialization, finalization and copying manually, i.e. your code knows what to do with which field and doesn't have tediously to loop through type info.
Why would we want to finalize records manually? What a terrible retrograde step.
-
32 minutes ago, Rudy Velthuis said:Well, no compiler without a language. If I don't like the language, it is very unlikely I will gladly use a compiler for it.
I don't much care what you like, or don't like.
My point was that there exist plenty of compilers that can emit optimised code that is exceedingly efficient, and extremely hard to beat by humans writing code themselves.
- 1
-
18 minutes ago, Rudy Velthuis said:It is very hard to find good compilers I like.
You mean language rather than compiler.
-
Can I ask why you are interested in complexity of this algorithm? If it is for the sake of learning, fair enough, but there are far better examples to teach you. If it is for a real application, complexity is the wrong question to ask.
-
3 hours ago, Rudy Velthuis said:That's a commonplace, but I am not convinced. A good assembler programmer can produce better code than any optimizing compiler.
Very hard to find them though, and so easy to find good compilers.
Delphi compiler need to be opensourced
in RTL and Delphi Object Pascal
Posted
That's surely not a problem with LLVM per se, rather the Delphi compiler on top of LLVM?