In which language is TC written??

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

My latest Unicode program in C was 4 KB where 2 KB are version information :D
Egh
Junior Member
Junior Member
Posts: 41
Joined: 2009-02-06, 20:37 UTC

Post by *Egh »

Lefteous wrote:My latest Unicode program in C was 4 KB where 2 KB are version information :D
Yeah, but I guess that was a console application? You definitely were not linking entire Delphi VCL with unicode :)
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think it was normal C/C++ application that was linked w/o static CRT (static CRT adds about 50-100 KB for empty application or library).
My tools that doesn't use CRT at all have similar size (e.g. in my signature). :)

Delphi 3 adds about 180 KB for empty form, Delphi 2 I think even less.
Egh
Junior Member
Junior Member
Posts: 41
Joined: 2009-02-06, 20:37 UTC

Post by *Egh »

MVV wrote:I think it was normal C/C++ application that was linked w/o static CRT (static CRT adds about 50-100 KB for empty application or library).
My tools that doesn't use CRT at all have similar size (e.g. in my signature). :)

Delphi 3 adds about 180 KB for empty form, Delphi 2 I think even less.
Taht's the point, 2010 would be closer to 1mb for an empty form. Unicode VCL does come at a price! :)
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Egh
Yeah, but I guess that was a console application? You definitely were not linking entire Delphi VCL with unicode
No it's a Window application.

Why should anyone waste so much disk space? Real WInAPI is the sh**! Everyelse else are kid tools :D
Egh
Junior Member
Junior Member
Posts: 41
Joined: 2009-02-06, 20:37 UTC

Post by *Egh »

Lefteous wrote:2Egh
No it's a Window application.

Why should anyone waste so much disk space? Real WInAPI is the sh**! Everyelse else are kid tools :D
Yeah, just remind me please how many windows messages an average application needs to process before even displaying it's main window ;)
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Egh wrote:Yeah, just remind me please how many windows messages an average application needs to process before even displaying it's main window ;)
Only WM_INITDIALOG (optional) if it uses DialogBoxParam function to create dialog window. :D
Or WM_CREATE (optional), WM_DESTROY and WM_QUIT if it uses DefWindowProc in window procedure and CreateWindow[Ex] function to create window. But app will also need to register simple window class and message loop. Just to display window.

Some other messages may be needed to limit window size, to act on keyboard/mouse events etc.

Anyway, IMHO window management should take a little part of code for great apps.
Egh
Junior Member
Junior Member
Posts: 41
Joined: 2009-02-06, 20:37 UTC

Post by *Egh »

MVV wrote:
Anyway, IMHO window management should take a little part of code for great apps.
That's the point, with VCL it takes none (i.e. programmers' code, as it is dealt with by VCL code already included)
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

But often this 'VCL code already included' eats much more code than true app's code...
In case of Delphi - e.g. because linker can't include only methods of class/object that are really usable in app... Add simple label (first) to form (w/o any settings) - size will grow by 5-10 KB.
Egh
Junior Member
Junior Member
Posts: 41
Joined: 2009-02-06, 20:37 UTC

Post by *Egh »

MVV wrote:But often this 'VCL code already included' eats much more code than true app's code...
In case of Delphi - e.g. because linker can't include only methods of class/object that are really usable in app... Add simple label (first) to form (w/o any settings) - size will grow by 5-10 KB.
That is given of course. Thing is, in most cases you just don't bovver with that VCL code size. Makes programmer's life easier :)
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Easier, of course, but I prefer to have 10 executables with size 100 KB each instead of 10 executables with size 1 MB each if they do the same thing. :wink:
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

On Friday I finally managed to compile the entire TC with Lazarus (after a few weeks of hard work). It starts, but many functions still don't work correctly, mainly because Lazarus blocks the handling of all standard Windows messages like WM_PAINT by program methods. So there is still a lot of work ahead.

The size has grown from 3.5MB to 5.5MB with smart linking turned off. I haven't tried with Smart linking on yet. The Overhead of Lazarus is 2MB compared to Delphi 2. At least there seems to be no noticeable slowdown on my test machine (old Pentium III with 866MHz).
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think the main plus in LazarusTC is Unicode support by run-time library. So we shouldn't use own methods for that :)
Egh
Junior Member
Junior Member
Posts: 41
Joined: 2009-02-06, 20:37 UTC

Post by *Egh »

MVV wrote:I think the main plus in LazarusTC is Unicode support by run-time library. So we shouldn't use own methods for that:)
And considerably cheaper than 2010 Delphi I suspect :))

But, to tell the truth, they did put a considerable effort to maximize backwards compatibility.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
Thanks for the update. Keep up the the great work!
I guess you are already participating in the Lazarus forum to clarify the open questions:
http://www.lazarus.freepascal.org/index.php?action=forum
Post Reply