#1 2014-05-20 07:07:37

ComingNine
Member
Registered: 2010-07-29
Posts: 293

Will SynCrossPlatformJSON be compatible with CrossKylix / Kylix ?

Really exciting to see cross-platform mORMot ! Great Work ! roll
http://synopse.info/fossil/timeline

Will SynCrossPlatformJSON be compatible with CrossKylix / Kylix ? Right now it complains

program Project1;
{$APPTYPE CONSOLE}
uses SynCrossPlatformJSON, SysUtils;
begin
end.

[CrossKylix] Writing configuration...
[CrossKylix] Building Project1.dpr...
[Error] SynCrossPlatformJSON.pas(236): Undeclared identifier: 'TFormatSettings'
[Error] SynCrossPlatformJSON.pas(252): Too many actual parameters
[Error] SynCrossPlatformJSON.pas(663): Undeclared identifier: 'GetLocaleFormatSettings'
[Fatal] Project1.dpr(7): Could not compile used unit 'SynCrossPlatformJSON.pas'
[CrossKylix] No Linux binary was created.

Offline

#2 2014-05-20 09:58:51

edwinsn
Member
Registered: 2010-07-02
Posts: 1,177

Re: Will SynCrossPlatformJSON be compatible with CrossKylix / Kylix ?

wow! Arnaud is really fast! He is highly productive.

IMHO,  CrossKylix / Kylix has no future and not sure if it worths to support them. FPC/Lazarus it the future of Pascal cross-platform development, especially for server-side development where mORMot is well fit.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#3 2014-05-20 10:28:34

ComingNine
Member
Registered: 2010-07-29
Posts: 293

Re: Will SynCrossPlatformJSON be compatible with CrossKylix / Kylix ?

I agree. Before Embarcadero comes up with their Delphi linux implementation, FPC has a brighter future than Kylix, development of which ceased ten years ago.

Nonetheless, CrossKylix / Kylix tends to give better performance than FPC. Compatibility with CrossKylix / Kylix should be a plus, if there is not too much trouble...

Offline

#4 2014-05-20 10:34:23

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,269
Website

Re: Will SynCrossPlatformJSON be compatible with CrossKylix / Kylix ?

Yes, the purpose of this unit is to be cross-platform.
Including CrossKylix/Kylix and FPC.

Now I focus on building the units and debugging/optimizing them on Windows.
Then we will ensure that they are truly cross-platform and cross-compilers.
Any feedback will be welcome!
smile

Now, I've added TJSONTable for client parsing of JSON responses of the ORM.

It gives pretty good results (see "Synopse crossplatform" numbers below):

 2.2. Table content:
  - Download files if necessary: no assertion  427us  19,269,320/s
  - Synopse parse: 1 assertion passed  2.73ms  3,013,553/s  1.1 MB
  - Synopse ORM loop: 41,135 assertions passed  6.18ms  1,330,153/s  1.1 MB
  - Synopse ORM list: 41,135 assertions passed  6.47ms  1,270,775/s  952 KB
  - Synopse table direct: 41,135 assertions passed  18.45ms  445,690/s  1.1 MB
  - Synopse table variant: 41,135 assertions passed  21.63ms  380,281/s  1.1 MB
  - Synopse doc variant: 41,137 assertions passed  43.27ms  190,092/s  4.6 MB
  - Synopse late binding: 41,137 assertions passed  36.37ms  226,153/s  4.6 MB
  - Synopse crossplatform: 41,135 assertions passed  20.56ms  400,048/s  1.9 MB
  - Synopse to BSON: 2 assertions passed  9.34ms  880,269/s  1.1 MB
  - Super object properties: 41,136 assertions passed  2.20s  3,739/s  6.3 MB
  - Super object record: 41,136 assertions passed  145.01ms  56,732/s  6.3 MB
  - dws JSON: 41,136 assertions passed  32.05ms  256,628/s  4.7 MB
  - DBXJSON: 41,136 assertions passed  240.84ms  34,159/s  9.9 MB
  Total failed: 0 / 452,496  - Table content PASSED  2.80s

Offline

#5 2014-05-20 10:48:49

ComingNine
Member
Registered: 2010-07-29
Posts: 293

Re: Will SynCrossPlatformJSON be compatible with CrossKylix / Kylix ?

Kudos for your great work ! Your plan of work is very good !

Very happy to know CrossKylix / Kylix is considered.

Speaking of which, could you have a look at this (MSEide+MSEgui) commit about Kylix compatibility ? That is to say, manual definition of TFormatSettings within {$ifndef mswindows}. Perhaps this could help with the compilation under CrossKylix / Kylix.
https://gitorious.org/mseide-msegui/mse … 55d905cb58

Last edited by ComingNine (2014-05-20 10:59:00)

Offline

#6 2014-05-20 10:53:34

ComingNine
Member
Registered: 2010-07-29
Posts: 293

Re: Will SynCrossPlatformJSON be compatible with CrossKylix / Kylix ?

More references :

Martin' work on compatibility with Delphi 7 ** AND Kylix ** , as shown in "${MSEDIR}\lib\common\delphicompatibility\*.pas", should be helpful. big_smile

Nils' NativeXML tries to be compatible with  FPC / Linux. http://simdesign.googlecode.com/svn/tru … Compat.pas

Dieter' Open XML has Delphi / Kylix compatibility. http://philo.de/xml/

Last edited by ComingNine (2014-05-20 10:58:26)

Offline

#7 2014-05-20 13:14:16

ComingNine
Member
Registered: 2010-07-29
Posts: 293

Re: Will SynCrossPlatformJSON be compatible with CrossKylix / Kylix ?

On a side note:

When going for cross-platform capability, if you plan to put functionalities into individual units, it may be just as good as your previous layout...

Please see the comments in this post http://www.thedelphigeek.com/2010/06/bu … speed.html. Specifically, "Conversely, DCC isn't really that fast because it uses almost-linear lookup algorithms in many places where it shouldn't (read Barry's comment on http://blog.marcocantu.com/blog/hundred … _unit.html)". In other words, big unit may be slower to view/edit/compile/debug in IDE than small units... big_smile

Last edited by ComingNine (2014-05-20 13:19:20)

Offline

#8 2014-05-20 13:22:06

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,269
Website

Re: Will SynCrossPlatformJSON be compatible with CrossKylix / Kylix ?

ComingNine wrote:

In other words, big unit may be slower than small units... big_smile

I exactly stated the contrary, from experiment.

Project with thousands of units were dead slow to compile... or even crashing the IDE.
Whereas the same number of code lines with a smaller number of units was no problem.

But when the unit tends to be huge (like SynCommons.pas or mORMot.pas), then the Delphi IDE starts to be quite limited and unstable.

'In medio stat virtus', as Aristotle stated ...
http://en.wikipedia.org/wiki/Virtue#Aristotelian_virtue
big_smile

Offline

#9 2014-05-20 13:26:52

ComingNine
Member
Registered: 2010-07-29
Posts: 293

Re: Will SynCrossPlatformJSON be compatible with CrossKylix / Kylix ?

I completely agree with "Aristotelian virtue" roll and thank you for your observations big_smile !

Offline

#10 2014-05-21 07:53:18

edwinsn
Member
Registered: 2010-07-02
Posts: 1,177

Re: Will SynCrossPlatformJSON be compatible with CrossKylix / Kylix ?

Hi Folks,

If we use recent versions of Delphi and would like to keep the code compatible with FPC, seems that we should not utilize some of new language features introduced since D2009, such as anonymous methods, record helper, etc.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

Board footer

Powered by FluxBB