Recent

Author Topic: KOL x64  (Read 9688 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 19625
  • Glad to be alive.
Re: KOL x64
« Reply #30 on: December 20, 2018, 09:37:26 pm »
That's not a GUI application, but that size is correct for a terminal/console application.
Any "programmer" that knows only one programming language is not a programmer

fasdfasdfasdfasdfasdf

  • New Member
  • *
  • Posts: 45
Re: KOL x64
« Reply #31 on: December 21, 2018, 12:35:16 pm »
I think i will try to reimplement it in C++.

Thaddy

  • Hero Member
  • *****
  • Posts: 19625
  • Glad to be alive.
Re: KOL x64
« Reply #32 on: December 21, 2018, 12:43:48 pm »
I think i will try to reimplement it in C++.
Then the size would likely increase!!!! >Be warned! (We've actually done that around 2001-2002 for C++builder)
And the code will likely become less safe, too.
Further size gains are basically only possible with plain C and you will loose OOP.

For the concept of KOL, Object Pascal is an ideal language because the compiler has so many things built-in compared to C++.
« Last Edit: December 21, 2018, 12:50:17 pm by Thaddy »
Any "programmer" that knows only one programming language is not a programmer

fasdfasdfasdfasdfasdf

  • New Member
  • *
  • Posts: 45
Re: KOL x64
« Reply #33 on: December 21, 2018, 12:47:54 pm »
How much? And which C++ are we talking?

Thaddy

  • Hero Member
  • *****
  • Posts: 19625
  • Glad to be alive.
Re: KOL x64
« Reply #34 on: December 21, 2018, 12:52:31 pm »
C++ builder. Around 30-50% depending on 32/64. Visual C++ was never tested, mainly because C++ builder has some features to co-operate with Delphi code.
Note it is very hard to go smaller, because e.g. the 32 bit version is over 50% already written in BASM. And KOL uses any and all available tricks to achieve its small sizes while still being OOP.
I would advice against it, unless you want to see that here the Pascal language is superior to C++: safer, smaller, more readable.
« Last Edit: December 21, 2018, 12:58:30 pm by Thaddy »
Any "programmer" that knows only one programming language is not a programmer

fasdfasdfasdfasdfasdf

  • New Member
  • *
  • Posts: 45
Re: KOL x64
« Reply #35 on: December 21, 2018, 01:06:16 pm »
One more thing can we use callbacks in KOL for events? Or do we have to use MakeMethod??

Thaddy

  • Hero Member
  • *****
  • Posts: 19625
  • Glad to be alive.
Re: KOL x64
« Reply #36 on: December 21, 2018, 01:15:07 pm »
Makemethod is only necessary if an event implementor is declared outside of an object.
The event mechanism from KOL is otherwise based on the same mechanism as the VCL: procedure of object. (TOnEvent is basically the same as TNotifyEvent).
And yes, you can implement callbacks too: hey it is Pascal  8-)
Any "programmer" that knows only one programming language is not a programmer

Thaddy

  • Hero Member
  • *****
  • Posts: 19625
  • Glad to be alive.
Re: KOL x64
« Reply #37 on: July 16, 2026, 02:06:48 pm »
I am finally close to a new KOL4 beta, hours, not days:
Features/non-features featured are:
- Pascal only. Almost.
- Works on Win32/64
- most legacy code removed
- almost all assembler code removed
- Delphi compatible with any version from Delphi 2
- FreePascal 2.6.x + compatible
- rewritten include files

Size indications:
Delphi 2:around 18kb
Delphi 7: around 21kb for a simple one form, still 14kb with system unit replacement.
Fpc 3.0.2: around 50kb
Fpc 3.3.1: around 70kb
Delphi 12.1: around 70kb (same as Freepascal main/trunk, given a few bytes difference)

Design philosophy:
- Remove old code and codeswitches
- Make it Pascal only, the compilers have evolved, you can still use old compilers with the old code.
- Clean up the code: should have been done years ago.

I hope to convert the mck part later.

Please wait for commits and code on https://github.com/Thaddy/kol4/blob/main/

Committed, works, but work in progress.
Kol is notoriously difficult to parse all defines and it needs to be done by hand, not AI...
There will be may more commits, but for today this is enough.

Try the koldemo...
« Last Edit: July 16, 2026, 04:19:01 pm by Thaddy »
Any "programmer" that knows only one programming language is not a programmer

 

TinyPortal © 2005-2018