via: Curl: Delphi binding [WayBack]
–jeroen
Posted by jpluimers on 2017/10/03
via: Curl: Delphi binding [WayBack]
–jeroen
Posted in Delphi, Delphi XE2, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2017/09/27
How I use Linux to write software for multiple target platforms – Kris Kamil Jacewicz – Google+
WINE has come a long way. Many things do not have a native look and feel, but so do many Delphi FMX or Lazarus LCL applications.
In fact I use quite a few tools (including Mikrotik WinBox) through Wine on Mac OS and it runs a lot more stable than quite a few of the FMX applications I’ve tried and ditched.
So for business applications not requiring a platform specific look and feel this indeed is quite acceptable direction to follow.
More at http://kriscode.blogspot.tw/2016/10/how-i-use-linux-to-write-software-for.html
–jeroen
Posted in Delphi, Development, Software Development | 2 Comments »
Posted by jpluimers on 2017/09/20
Tools and steps for analysing Delphi or FreePascal code: Dependency Analysis – Pascal Today [WayBack]
Used tools:
–jeroen
Posted in Delphi, Development, Software Development | 2 Comments »
Posted by jpluimers on 2017/09/19
TL;DR: yes it is.
Answer by Allen Bauer at delphi – Is AtomicCmpExchange reliable on all platforms? – Stack Overflow [WayBack]
On Windows, it directly translates into lock cmpxchg which is way faster than the Windows API call [WayBack] InterlockedCompareExchange, as that is a jump to the actual code:
InterlockedCompareExchange: 00417CA8 FF2528E12901 jmp dword ptr [$0129e128]KERNEL32.InterlockedCompareExchange: 75855E40 8BFF mov edi,edi 75855E42 55 push ebp 75855E43 8BEC mov ebp,esp 75855E45 8B550C mov edx,[ebp+$0c] 75855E48 8B4D08 mov ecx,[ebp+$08] 75855E4B 8B4510 mov eax,[ebp+$10] 75855E4E F00FB111 lock cmpxchg [ecx],edx 75855E52 5D pop ebp 75855E53 C20C00 ret $000c
whereas AtomicCmdExchange looks like this:
Test.pas.20: RestoreValue := AtomicCmpExchange(FieldToBeModfied, 1 {new value}, 0 {expected value}, Success {true if the expected value was found, and new value set}); 0111A838 8B45FC mov eax,[ebp-$04] 0111A83B 8D500C lea edx,[eax+$0c] 0111A83E 33C0 xor eax,eax 0111A840 B901000000 mov ecx,$00000001 0111A845 F00FB10A lock cmpxchg [edx],ecx 0111A849 0F9445F2 setz byte ptr [ebp-$0e] 0111A84D 8945D8 mov [ebp-$28],eax
–jeroen
Posted in Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2017/09/19
I have seen too many projects over the years trying to do input validation by checking KeyPress. This is not limited to Delphi projects (C#, VB and other projects suffer from this just as much). Most of these projects suffer from these::
If doing Delphi, then that code should be rewritten in a generic way based on examples like like these:
–jeroen
Posted in .NET, Delphi, Development, Software Development, Windows Development | Leave a Comment »
Posted by jpluimers on 2017/09/11
I was debugging an issue where a Delphi SOAP implementation was shoe-horned into an Indy server and came across the [WayBack] TWebRequest.UpdateMethodType Method.
The further you get down the if/then/else tree, the more often the indexed property Method is accessed, same for the conversion/comparison code.
property Method: string index 0 read GetStringVariable;
So if the HTTP method is POST (very common), then the calls are being made 3 times:
procedure TWebRequest.UpdateMethodType;
begin
{$IFDEF NEXTGEN}
if Method = 'GET' then { do not localize }
FMethodType := mtGet
else if Method = 'PUT' then { do not localize }
FMethodType := mtPut
else if Method = 'POST' then { do not localize }
FMethodType := mtPost
else if Method = 'HEAD' then { do not localize }
FMethodType := mtHead
else if Method = 'DELETE' then { do not localize }
FMethodType := mtDelete
else if Method = 'PATCH' then { do not localize }
FMethodType := mtPatch;
{$ELSE !NEXTGEN}
if System.AnsiStrings.AnsiStrComp(PAnsiChar(Method), 'GET') = 0 then { do not localize }
FMethodType := mtGet
else if System.AnsiStrings.AnsiStrComp(PAnsiChar(Method), 'PUT') = 0 then { do not localize }
FMethodType := mtPut
else if System.AnsiStrings.AnsiStrComp(PAnsiChar(Method), 'POST') = 0 then { do not localize }
FMethodType := mtPost
else if System.AnsiStrings.AnsiStrComp(PAnsiChar(Method), 'HEAD') = 0 then { do not localize }
FMethodType := mtHead
else if System.AnsiStrings.AnsiStrComp(PAnsiChar(Method), 'DELETE') = 0 then { do not localize }
FMethodType := mtDelete
else if System.AnsiStrings.AnsiStrComp(PAnsiChar(Method), 'PATCH') = 0 then { do not localize }
FMethodType := mtPatch;
{$ENDIF NEXTGEN}
end;
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 4 Comments »
Posted by jpluimers on 2017/09/05
Interesting stuff:
via:
In more detail:
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 3 Comments »
Posted by jpluimers on 2017/09/05
// Don't use SetWorldTransform [WayBack] on Printer.
// Some drivers don't handle it correct
// We will only use ModifyWorldTransform [WayBack]
// Let Windows and Driver do the Job
Source: Hello, I use a component that do some nice things on the Printer’s Canvas…… [WayBack]
–jeroen
Posted in Delphi, Development, Software Development, Windows Development | 1 Comment »
Posted by jpluimers on 2017/08/31
From my link archive:
via: Some time ago I wrote about an IDE plugin I made that modifies code completion behavior to be able to find even misspelled identifiers … – Honza Rameš – Google+ [WayBack]
Both via I remember someone in this group showed a prototype of a ‘code-completion’ replacement IDE expert, which supports fuzzy matching of method names you typed [WayBack]
If I remember correctly, the Kibitz compiler started to expose less functionality around the Delphi 7 or Galileo era rendering many of the GExperts additions useless. Not sure about the current state of that now.
–jeroen
Posted in Delphi, Development, Software Development | 2 Comments »