Board index » delphi » Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net


2005-01-14 02:43:05 AM
delphi78
Anders Isaksson writes:
Quote
>+++ The ability to rationally consider other alternatives such as
>Win64.

But one point of .net is that when W64 comes, and the .net framework
gets 64 bits, your pure .net programs will also be run in 64 bits -
without you having to do anything about it!
"When"?
Win64 has been here for a number of years now, I think as far back as
NT supporting Alpha. I know for certain that Win64 has existed for as
long as the Itanium has been supported (as far back as Windows 2000).
Win64 also supports AMD64 today in Microsoft's beta/RC versions of
Windows XP and Windows Server 2003.
The reality is, it is very possible that Windows Server 2003 for x64 and
Windows XP for x64 will ship *without* support for native .NET
compilation. (AFAIK the x64 versions of the OS are supposed to happen
in the 1H of 2005, while .NET 2.0 is more towards 2H 2005).
Will
--
Want a 64-bit Delphi compiler for AMD64 / IA-32e? Vote here--
qc.borland.com/wc/wc.exe/details
 
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

On 13 Jan 2005 10:43:05 -0800, "Will DeWitt Jr."
<XXXX@XXXXX.COM>writes:
Quote
The reality is, it is very possible that Windows Server 2003 for x64 and
Windows XP for x64 will ship *without* support for native .NET
compilation.
Oh man...wouldn't that be absolutely pricess?
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Joanna Carter (TeamB) writes:
Quote
'Native' exes have given us unsafe code; something which .NET aims to
fix.
There is no such thing as "unsafe code", only "unsafe developers". It's
telling that universities churn out poor developer after poor developer
that have no ability to consider the security implications of the code
they write and instead need something at the OS level to hold their
hand through it all. (And all in the name of "productivity" when just a
little forethought would give you the secure code you require without
the performance degredation of a sandbox).
"Unsafe code." Ridiculous. Mere marketing dribble meant to incite and
inflame with no real basis in fact.
Will
--
Want a 64-bit Delphi compiler for AMD64 / IA-32e? Vote here--
qc.borland.com/wc/wc.exe/details
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Michael Anonymous writes:
Quote
Rudy Velthuis [TeamB] writes:

>Lord Crc writes:
>
>
>>On Thu, 13 Jan 2005 00:10:41 -0700, Michael Anonymous
>><XXXX@XXXXX.COM>writes:
>>
>>
>>>+++ eliminate programming with pointers
>>>( I love pointers as much as I love html links! )
>>
>>You can program with pointers as much as you like in .Net
>
>
>Indeed. But you must specify "unsafe" and such.
>

Good. I am glad we cleared that up.
Now can I do this same program in Delphi for .NET:

program Project1;
{$APPTYPE CONSOLE}
uses SysUtils;

Type
TByteArray = packed array[0..0] of byte;
pTByteArray = ^TByteArray;

var
p : pointer;
pBA : pTByteArray;

i : integer;
begin

GetMem (p, High(Byte) ); //this is just an example of
// the memory coming from another
function pBA := p; // set the byte array pointer.

for i := 0 to High(Byte) do
begin
pBA^[i] := i;
WriteLn ( IntToStr ( pBA^[i] ));
end;

readln;
end.
--
Rudy Velthuis [TeamB] rvelthuis.bei.t-online.de
"The most important job is not to be Governor, or First Lady in my
case." -- George W. Bush
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Michael Anonymous writes:
Quote
I value pointers, so I must be a different kind of programmer than
you Rudy.
Obviously, judging from the demo you posted. <g>
If your not using pointers in Win32, I am not sure you can
Quote
sympathize with my plight.
I am using pointers in Win32. I have used lots of pointers in my life.
And I have always found ways of doing things without them, later.
Quote
>I wonder where he got that idea. After all, Delphi is not an MS
>tool.

Isn't the JIT compiler is written by Microsoft?
The jitter, yes. So what?
--
Rudy Velthuis [TeamB] rvelthuis.bei.t-online.de
"A scholar who cherishes the love of comfort is not fit to be deemed a
scholar."
-- Lao-Tzu (570?-490? BC)
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Michael Anonymous writes:
Quote
Rudy Velthuis [TeamB] writes:

>Lord Crc writes:
>
>
>>On Thu, 13 Jan 2005 00:10:41 -0700, Michael Anonymous
>><XXXX@XXXXX.COM>writes:
>>
>>
>>>+++ eliminate programming with pointers
>>>( I love pointers as much as I love html links! )
>>
>>You can program with pointers as much as you like in .Net
>
>
>Indeed. But you must specify "unsafe" and such.
>

Good. I am glad we cleared that up.
Now can I do this same program in Delphi for .NET:

program Project1;
{$APPTYPE CONSOLE}
uses SysUtils;

Type
TByteArray = packed array[0..0] of byte;
pTByteArray = ^TByteArray;
var
p : pointer;
pBA : pTByteArray;

i : integer;
begin

GetMem (p, High(Byte) ); //this is just an example of
// the memory coming from another
function pBA := p; // set the byte array pointer.

for i := 0 to High(Byte) do
begin
pBA^[i] := i;
WriteLn ( IntToStr ( pBA^[i] ));
end;

readln;
end.
That would be rather unsafe code. It would not be range checked, which
is a pity, since your array is only 255 bytes in size (0..254), while
you access 256 bytes (0 to 255). That is one of the reasons why one
might want to avoid pointers, if possible. Don't forget that the
compiler will compile pointers, where appropriate, anyway (just look at
the generated code in the CPU window).
My version would be (it would compile without modification on both
platforms, be type safe and range checked as well, and easier to read
and maintain):
type
TByteArray = array of Byte;
var
BA: TByteArray;
I: Integer;
begin
SetLength(BA, High(Byte)); // !!
for I := Low(BA) to High(BA) do // !!
begin
BA[I] := I;
Writeln(BA[I]); // 0 .. 254
end;
Readln;
end.
--
Rudy Velthuis [TeamB] rvelthuis.bei.t-online.de
"Everything that can be invented has been invented."
-- Charles H. Duell, Commissioner, U.S. Office of Patents, 1899
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Will DeWitt Jr. writes:
Quote
Rudy Velthuis [TeamB] writes:

>Perhaps they aren't. Perhaps they see that there isn't one yet.

Then they aren't seeing correctly.
Says you. <g>
--
Rudy Velthuis [TeamB] rvelthuis.bei.t-online.de
"Chaos Theory is a new theory invented by scientists panicked by the
thought that the public were beginning to understand the old ones."
-- Mike Barfield.
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Very very true.
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Rudy Velthuis [TeamB] writes:
Quote
Says you. <g>
Indeed. <g>Nice of you to notice that, like everyone else here, I'm
talking from the position of my opinion. =)
Will
--
Want a 64-bit Delphi compiler for AMD64 / IA-32e? Vote here--
qc.borland.com/wc/wc.exe/details
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Rudy Velthuis [TeamB] writes:
Quote
Michael Anonymous writes:


>I value pointers, so I must be a different kind of programmer than
>you Rudy.


Obviously, judging from the demo you posted. <g>

Your right.
If you had a hard time figuring it out,
you should of let me know! ;-)
Quote
I am using pointers in Win32. I have used lots of pointers in my life.
And I have always found ways of doing things without them, later.
BTW, you never do without them - programming languages try to camouflage
the fact that a computer uses them all the time.
Quote

>>I wonder where he got that idea. After all, Delphi is not an MS
>>tool.
>
>Isn't the JIT compiler is written by Microsoft?


The jitter, yes. So what?

"You have to use their tools, whether you like it or not, to create
even the simplest applications."
All Delphi for .NET code goes through the jitter to run, right?
Well, that is one tool. ;-)
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Anders Isaksson writes:
Quote
On Wed, 12 Jan 2005 22:05:29 -0700, Michael Anonymous
<XXXX@XXXXX.COM>writes:


>The problem is I don't want to be forced into using a MS compiler.
>I want to be able to select a compiler from a variety of organizations
>and individuals.


Why?

I want to select what is best for my own development.
Quote

>There is a big deal if you have many megabytes worth of code that uses
>pointers and memory routines.


OK. Fair point, but previously you just said "I love pointers..." and
that's not a heavy argument IMO.

I should have stated it more clearly:
I love the purpose pointers serve.
Quote

>Correct me if I am wrong, but doesn't all code go through their JIT compiler?
>Therefore, you have to use the JIT compiler even if you don't like it.


OK, if you see it like that. But then it is the same in W32: you have to
use all the Windows DLL:s even if you don't like it. I view the JIT
compiler, not as a tool, but as a system component. I don't *see* the
JIT compiler, it is completely background work. Remember that the JITc
only compiles IL code to native, you use a tool of your choice to
produce the IL code.

However, the IL code is only compiled into machine language code by
Microsoft.
The problem is having a monopoly in native compilers ( in the future).
Quote

>But I'd like to compare Win64 vs Microsoft .NET for performance reasons.


Oh, I have no doubts that one could write faster programs by writing
directly for W64 than by going through .net. I am not sure you could
write programs faster, though.
I'm not sure that Delphi for .NET would help me write programs faster.
Honestly, understand a programming paradigm or framework could take awhile.
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

David Clegg writes:
Quote
Anders Isaksson writes:


>Oh, I have no doubts that one could write faster programs by writing
>directly for W64 than by going through .net. I am not sure you could
>write programs faster, though.


I like that, and think it sums up the situation nicely.
The problem is that no one has proven that
it's faster to write program's in Microsoft's .NET.
So there is no summation from my view point.
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Rudy Velthuis [TeamB] writes:
Quote
Michael Anonymous writes:


>Your right: I don't know the license agreement because I never saw
>it. But I do know, based on the news report, they licensed some
>Microsoft .NET technology to use ( or build ) Delphi 8.


No, only to distribute the SDK. Didn't you read the article?
I read part of the article since I have read an article about it in the
past.
Did you read the license agreement Rudy?
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

On Wed, 12 Jan 2005 22:05:29 -0700, Michael Anonymous
<XXXX@XXXXX.COM>writes:
Quote
The problem is I don't want to be forced into using a MS compiler.
I want to be able to select a compiler from a variety of organizations
and individuals.
Why?
Quote
There is a big deal if you have many megabytes worth of code that uses
pointers and memory routines.
OK. Fair point, but previously you just said "I love pointers..." and
that's not a heavy argument IMO.
Quote
Can I free 10 bytes I allocated ten minutes ago?
You can free them, but you will not know exactly when those precise 10
bytes will be used for a new allocation. Just like in W32 :-)
Quote
Correct me if I am wrong, but doesn't all code go through their JIT compiler?
Therefore, you have to use the JIT compiler even if you don't like it.
OK, if you see it like that. But then it is the same in W32: you have to
use all the Windows DLL:s even if you don't like it. I view the JIT
compiler, not as a tool, but as a system component. I don't *see* the
JIT compiler, it is completely background work. Remember that the JITc
only compiles IL code to native, you use a tool of your choice to
produce the IL code.
Quote
But I'd like to compare Win64 vs Microsoft .NET for performance reasons.
Oh, I have no doubts that one could write faster programs by writing
directly for W64 than by going through .net. I am not sure you could
write programs faster, though.
--
Anders Isaksson, Sweden
BlockCAD: w1.161.telia.com/~u16122508/proglego.htm
Gallery: w1.161.telia.com/~u16122508/gallery/index.htm
 

Re: Separate releases: Delphi 10 Win32 / Delphi 10 .Net

Rudy Velthuis [TeamB] writes:
Quote
My version would be (it would compile without modification on both
platforms, be type safe and range checked as well, and easier to read
and maintain):

type
TByteArray = array of Byte;

var
BA: TByteArray;
I: Integer;

begin
SetLength(BA, High(Byte)); // !!
for I := Low(BA) to High(BA) do // !!
begin
BA[I] := I;
Writeln(BA[I]); // 0 .. 254
end;
Readln;
end.

Yes, your example is is good for arrays.
However, type safe arrays don't seem to help me with
certain routines where pointers are extremely useful.
I can think of 1 example: Image Processing Microsoft DIBs.
(
msdn.microsoft.com/library/default.asp
)
A Microsoft DIBs can:
++ have a different width or height
++ be top-down ( upside down, right side up )
++ Each scanline can have a pad ( extra bytes ) at the end.
++ can have different pixel formats ( 8, 16, 24, 32 )
Without going into the whole process of loading a DIB into memory,
one has to figure out where the location of each scanline is before
processing the image.
Since Microsoft padded each scanline to a 32bit boundary,
one has to use that fact to determine the location of each scanline for
image processing instead of just using a certain pixel array. ( I wish
it was that simple. )
Writing routines to process DIBs seems to be easier and necessary using
pointers.