-
Content Count
3527 -
Joined
-
Last visited
-
Days Won
175
Posts posted by David Heffernan
-
-
Jokes aside, any user that feels that the testing could be broadened can write some tests and submit a PR.
-
2
-
-
Tested 42 and Lorem ipsum, that seems pretty complete to me. 😉
-
1
-
4
-
-
11 minutes ago, FredS said:Maybe you need to use a WOW key: Accessing an Alternate Registry View
No. It's in HKCU.
-
OK, just looked tlat the documentation and it explains it all. You have to delete the sub keys. And you won't get an error in your code because the function returns a boolean indicating success or failure. You didn't check this.
Let me gently suggest that rather than tearing hair out, the documentation may help!
-
Don't you need to empty the key before you delete it?
-
Is the key empty?
-
Delphi is no easier than Java to learn.
Delphi on mobile hasn't had the greatest track record. For instance at the moment there is no 64 bit Android compiler, thus locking delphi out of the app store. Yes there are temporary workarounds but it is not a great situation.
Embarcadero are struggling to keep pace with developments on the platforms that they attempt to support.
Quality has historically been a huge problem for Delphi. Both in their various compilers and related tooling, and their library code. They have a track record of releasing products and libraries that are full of bugs, and then spending many releases trying to fix them.
The VCL remains a brilliant piece of work and for native Windows UI development it still excels.
If I were you I'd widen the search. You say that you don't have time to learn a more difficult language. And that you want to start a business on the side. To be honest, those two statements don't sound very compatible. Making a business work takes a huge investment of time. Being a successful programmer demands mastery of tools and language. And that takes time. There are no shortcuts.
-
7
-
-
Dude, before my time. Also, how we miss Rob Kennedy from the Delphi world.
-
1
-
-
But they have a much wider scope. Not a problem if your units have only one class. But with many classes it can be an issue.
-
Nested methods are one of the biggest things stopping me porting my code to C++.
-
No, it's using arctan2 rather than arctan.
Just read every single other implementation on that page.
As far as both sumsin and sumcos being very close to 0, I would still advise not using a tolerance. All you can achieve by that is giving a less inaccurate answer than is possible to reach.
If you want to do better, use one of the algorithms used for dealing with roundoff when calculating sums, for instance Kahan summation.
-
Actually the comparison against eps is wrong and should be removed. Call arctan2 unconditionally. Also the divide by cnt is utterly wasteful.
Bogus comparisons against small numbers drive me mad.
-
1
-
-
The const param reference counting bug that keeps on giving.
https://stackoverflow.com/a/31028671/505088
https://stackoverflow.com/a/7640979/505088
https://stackoverflow.com/q/4509015/505088
QC report 90482 and presumably many others. Of course, Emba killed QC. Thanks so much for that. Can I be arsed to re-enter all the unsolved reports that were killed when QC was killed? No I cannot.
-
1
-
-
Not so much humour as a comment about the arrogance of imagining that the big company can just decide to buy the small company. Perhaps the small company is happy to be independent.
-
3
-
-
7 hours ago, RDP1974 said:So is better if emba buy remobjects and leverage the big quality of their llvm Island for the whole new platforms
Perhaps they could buy Greenland as well
-
12
-
-
6 minutes ago, Mahdi Safsafi said:You can use LoadLibrary with exe file ! The only things is that you need to keep an eye on initialisation.
No. Because there is no DllMain and so nothing is initialized. And then there are the lack of relocations.
What's wrong with Delphi programmers. Read the standard output already!
-
34 minutes ago, Mahdi Safsafi said:You don't need to convert Program2 into DLL. Just exports your functions and consume them directly from Program1 (just like DLL).
// ========================================== Program1 ========================================== program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, WinApi.Windows; const Program2 = 'Project2.exe'; type TGetProgram2Result = function(Param1, Param2: Integer): string; var LIB: HMODULE; GetProgram2Result: TGetProgram2Result = nil; s: string = ''; begin try LIB := LoadLibrary(Program2); @GetProgram2Result := GetProcAddress(LIB, 'GetProgram2Result'); s := GetProgram2Result(5, 2); Writeln(s); Readln; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. // ========================================== Program2 ========================================== program Project2; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, WinApi.Windows; function GetProgram2Result(Param1, Param2: Integer): string; begin Result := Format('%d+%d=%d', [Param1, Param2, Param1 + Param2]); end; // ------------- EXPORTS ------------- exports GetProgram2Result; begin try Writeln('This is Program2'); Writeln(GetProgram2Result(5, 2)); Readln; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end.
Nope, that doesn't work. You can't expect to load an exe file with LoadLibrary. Also, even if you could, don't go exporting string across a module boundary.
I'm astounded at all the posting here for a trivial problem with a standard solution.
-
9 hours ago, aehimself said:Or not to use Styles in general
The most reliable way to avoid the legion of bugs with this feature
-
1
-
-
Regarding a fix, this is only one of a number of problems with scope resolution in the language.
Same issue arises when you use units, where more recently imported symbols hide those from units imported earlier. Same for local variables and methods. Same for local variables and global symbols.
Anywhere where you refer to a symbol and there are multiple matches then the compiler chooses the most recent.
In princple the resolution is simple. Introduce a new compiler warning whenever the compiler uses this most recent principle.
-
5
-
-
Debugging was never the issue. That was just annoying. Refactoring was never the issue either. That also is annoying but one of many broken aspects of the refactoring.
The issue is the silent bugs that arise when you add a field to a type and that one hides local variables.
This has been discussed hundreds of times. Try some more websearch.
Then, stop using with.
-
4
-
-
Don't you just declare the property as TStrings? Use its Text property when you want a string representation including line feeds.
-
1
-
-
I am defending a very important, and very well respected, member of the Delphi community. That's all.
-
1
-
-
7 hours ago, msintle said:I reported a bug with madSecurity a while back here:
http://forum.madshi.net/viewtopic.php?f=8&t=28726
Unfortunately the issue hasn't been fixed for over two months since the public report.
Privately, he has made it clear that he has no interest in fixing the bug unless he is getting paid for it, which makes it sound like the library is dead to me.
The self-professed "mad" author has moreover censored and edited the title of the post at his forum where I drew attention to the fact that he is no longer maintaining the library.
My company had sponsored the 64-bit version of madSecurity a while back, so we're definitely very taken aback that our investment was misguided.
Are there any alternatives to this library?
Moving forward, we will be moving our code off his platform, and would advise other developers to steer clear of madSecurity which has many subtle bugs and code that is very obtuse.
In defence of Mathias his madExcept library is superb and very actively maintained.
And his response to your comments in the thread seem reasonable. Why expect him to work on freeware? Anything he does is a bonus. It looks like your frustration is getting the better of you.
-
7
-
-
There are simply some rules of use for certain types of library that cannot be enforced effectively by the compiler, or even by runtime checks. For these rules you need documentation and developers that are prepared to read documentation.
My personal view is that if a developer is not prepared to go to the trouble of reading the documentation, then any problems they have are their concern and not that of the library developer.
Rules for changing cursor to HourGlass and back
in Tips / Blogs / Tutorials / Videos
Posted
Why would that be odd? That's pretty much a canonical use of try finally.