You are not logged in.
Now it is possible, since I've just added a new "Server Launch" button to the LogView tool.
It allows to run the tool as a HTTP server, ready to display remote logs, echoed from mORMot HTTP clients.
Fantastic work !
When LogView.exe starts to listen, everything works perfect after replacing
"var ILog: ISynLog" and "ILog := TSynLog.Enter" and "ILog.Log(sllInfo" with
"" and "SQLite3Log.Add.Enter" and "SQLite3Log.Add.Log(sllInfo"!
However, as shown from the right panel of the picture, it seems that SQLite3Log has put quite a few extra log messages into the log file. Could you help to comment how to disable the log messages related to "TSQLHttpClientWinHttp" ? This will help me to double-click and view the log content some other time.
Thank you for your elaboration of what should be done source-code-wise, but I am wondering if you could help to implement the feature ?
![]()
I wonder if there is a "IPC" or "TCP/IP" version of LogView, so that it will constantly accept incoming messages and display them ? ![]()
The log content is indeed flushed, because the log displays the updated content when opened with LogView.exe.
"Dir" under "Cmd" behaves the same as the explorer. However, "ls" under "Cygwin Bash" will shows the increased file size ( after this, the Dir and the explorer will also show what ls shows).
Thank you for your comments !
O_O
I did not describe correctly.
It seems that when run in D:\ drive:
(1) The log is indeed flushed, because the log displays the updated content when opened with LogView.exe
(2) However, if I only press F5 to refresh (in Explorer), the file size of the log does not change ! <--- The file size of the log shown in Explorer changes when run in C:\ drive. Could you help to comment ?
When AutoFlushTimeOut is set, the compiled program is supposed to flush log at the specified interval. However, it does not work if the compiled app is run in non-C drive (D:\ drive, for example). Could you help to comment whether this is a bug ?
project14.dpr
program Project14;
uses
Forms,
SysUtils,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
Forms.Application.Initialize;
Forms.Application.MainFormOnTaskbar := True;
Forms.Application.CreateForm(TForm1, Form1);
Forms.Application.Run;
end.unit1.pas
unit Unit1;
interface
uses
SynCommons, SyncObjs,
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TEchoThread = class(TThread)
private
FTerminateEvent: TSimpleEvent;
protected
procedure Execute; override;
public
constructor Create(ACreateSuspended: Boolean);
destructor Destroy; override;
procedure StopNow;
end;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
FEchoThread: TEchoThread;
procedure OnThreadTerminated(Sender: TObject);
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TEchoThread }
constructor TEchoThread.Create(ACreateSuspended: Boolean);
begin
inherited Create(ACreateSuspended);
FTerminateEvent := TSimpleEvent.Create;
end;
destructor TEchoThread.Destroy;
begin
FTerminateEvent.Free;
inherited Destroy;
end;
procedure TEchoThread.StopNow;
begin
Terminate;
FTerminateEvent.SetEvent;
end;
procedure TEchoThread.Execute;
var
ILog: ISynLog;
begin
ILog := TSynLog.Enter;
while not Terminated do
begin
try
try
ILog.Log(sllInfo, ' hello world ');
finally
end;
except on E: Exception do
begin
ILog.Log(sllException, E);
end;
end;
FTerminateEvent.WaitFor(5 * 1000);
end;
end;
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
var
ILog: ISynLog;
begin
ILog := TSynLog.Enter;
FEchoThread := TEchoThread.Create(True);
FEchoThread.FreeOnTerminate := False;
FEchoThread.OnTerminate := OnThreadTerminated;
FEchoThread.Start;
end;
procedure TForm1.FormDestroy(Sender: TObject);
var
ILog: ISynLog;
begin
ILog := TSynLog.Enter;
// FEchoThread.Terminate;
FEchoThread.StopNow;
FEchoThread.WaitFor;
FEchoThread.Free;
end;
procedure TForm1.OnThreadTerminated(Sender: TObject);
var
ILog: ISynLog;
ex: TObject;
begin
ILog := TSynLog.Enter;
Assert(Sender is TThread);
ex := TThread(Sender).FatalException;
if Assigned(ex) then begin
// Thread terminated due to an exception
if ex is Exception then begin
ILog.Log(sllException, Exception(ex));
Application.ShowException(Exception(ex));
end else
ShowMessage(ex.ClassName);
end else begin
// Thread terminated cleanly
end;
end;
initialization
with TSynLog.Family do
begin
AutoFlushTimeOut := 1;
Level := LOG_VERBOSE;
PerThreadLog := ptIdentifiedInOnFile;
RotateFileCount := 50;
RotateFileSizeKB := 20 * 1024; // rotate by 20 MB logs
end;
end.unit1.dfm
object Form1: TForm1
Left = 0
Top = 0
Caption = 'Form1'
ClientHeight = 202
ClientWidth = 447
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
OnDestroy = FormDestroy
PixelsPerInch = 96
TextHeight = 13
endThank you for your knowledgeable comments !
Both PDFlib 9 and PDFlib lite 7 provide the shading as shown in the first post. A sample Java program is shown as below:
// http://www.pdflib.com/fileadmin/pdflib/Cookbook/java/color/color_gradient.java
import com.pdflib.pdflib;
import com.pdflib.PDFlibException;
public class color_gradient {
public static void main(String argv[]) {
String outfile = "color_gradient.pdf";
pdflib p = null;
int sh;
try {
p = new pdflib();
// This means we must check return values of load_font() etc.
p.set_option("errorpolicy=return");
if (p.begin_document(outfile, "") == -1)
throw new Exception("Error: " + p.get_errmsg());
p.begin_page_ext(595, 842, "");
// Fill a circle with a gradient: Save the current graphics state
p.save();
// Set the first color for the gradient to white
p.setcolor("fill", "rgb", 1.0, 1.0, 1.0, 0.0);
// Set the second color for the gradient; define a radial gradient
sh = p.shading("radial",
182.32, 617.68,
182.32, 617.68,
0.9412, 0.0, 0.0, 0.0,
"r0 0 r1 50 extend0 false extend1 true");
// Draw a circle and set the clipping path to the shape of the circle
p.circle(200, 600, 50);
p.clip();
// Fill the clipping path with the gradient
p.shfill(sh);
// Restore the current graphics state to reset the clipping path
p.restore();
p.end_page_ext("");
p.end_document("");
}
catch (PDFlibException e) {
System.err.print("PDFlib exception occurred:\n");
System.err.print("[" + e.get_errnum() + "] " + e.get_apiname()
+ ": " + e.get_errmsg() + "\n");
}
catch (Exception e) { System.err.println(e.getMessage()); }
finally { if (p != null) { p.delete(); } }
}
}However, I knows little about the inside of SynPDF. O_O
Do you think if you could help to put in the abilities ?
Thank you for your time and efforts !
I wanted to use SynPdf to get the shading as shown in this picture
.
The Java source code of how to produce this smooth shading effect is on gist.github.com as https://gist.github.com/anonymous/a60cb … panel-java.
How to display smooth shading of a circle with EPS is shown in three steps :
The source file is https://gist.github.com/anonymous/a60cb … ition1-eps

The source file is https://gist.github.com/anonymous/a60cb … ition2-eps

The source file is https://gist.github.com/anonymous/a60cb … ition3-eps
Could you help to comment whether it is possible to use SynPdf to produce the given radial gradient of a circle ?
PS: It seems the forum does not attributes to img tag to resize image ?
Many thanks for you great efforts !
2014-07-28
[50208921410a] now SynCommons unit compiles with Kylix - but not tested, and exception interception for logging and stack trace are disabled (user: User, tags: trunk)Really nice work ! Kudos for your efforts ! Nevertheless, when "exception interception for logging and stack trace" are disabled, it seems that one cannot expect line number from TSynLog ?
Hi Arnaud,
Please find in the zip archive an example of handling exception stack trace using Kylix (Linux) . In short, it uses JclDebug & JclHookException compatible with Kylix (Linux) .
As shown in the quoted post, JclDebug & JclHookException that is compatible with Kylix (Linux) can be used to handle exception stack trace using Kylix (Linux). However, the workflow seems different from what SynCommons does.
Furthermore, the MultiLog has a SendException that gives stack trace (only when compiled with Free Pascal). https://code.google.com/p/luipack/ The workflow also relies on API different from the above one or the SynCommons one. Would you think it is feasible to enable SynCommons to handle exception stack trace for Delphi (on Windows), Kylix (on Linux), and Free Pascal in a unified way ?
Thanks for your comments ! ![]()
Now how much money are we talking about ? If the amount is beyond me then I just have to forget about the idea for the moment.
Could you help to provide a rough estimation when your great SynLog will turns cross-platform ? ![]()
Many thanks for your efforts and comments !
Compile RegressionTests.dpr with Delphi.
Then put the RegressionTests.exe in one folder.
And run RegressionTests.exe without quitting it (do not press Enter).Compile RegressionTests.dpr with FPC.
Then run the generated exe.
Does it work for you?
Why is Delphi involved ? Server or client not compatible with FPC ? What if one wants to test Kylix instead of FPC ? Could you elaborate ? ![]()
Many thanks for your helpful answer ! ![]()
I wonder whether there can be multiple (TSQLRestClientDB, TSQLRestServerDB, defined in mORMotSQLite3) pairs in one .exe application ?
The reason to ask is that there are two units and I would like to have a (TSQLRestClientDB, TSQLRestServerDB, defined in mORMotSQLite3) pair dedicated for each unit. However, there is a global variable "GlobalURIRequestServer" defined in mORMot, which makes me wonder if it is theoretically possible to have multiple (TSQLRestClientDB, TSQLRestServerDB, defined in mORMotSQLite3) pairs in one .exe application
Hi Arnaud,
Please find in the zip archive an example of handling exception stack trace using Kylix (Linux) . In short, it uses JclDebug & JclHookException compatible with Kylix (Linux) . ![]()
Many thanks for your brilliance and efforts !
About the more difficult parts, have you complained to the FPC community ? Are there URLs that we can go and vote for ? ![]()
Some bugs need to be fixed with the FCL, if I want mORMot to work as expected.
For instance:
- the new code-page strings available in FPC 2.7 branch is not as consistent as Delphi 2009 (e.g. it changes the code page e.g. when you write aStr := '"'+aStr);
- TInvokeableVariantType.SetProperty() is broken and do not allow to set property values inside a variant via late-binding;
- some missing functions for old RTTI (e.g. dynamic array published properties support).
How do we create tickets for FPC? What is the best approach?
Another useful messages in today's FPC maillist:
Message: 8
Date: Sun, 01 Jun 2014 23:05:23 +0100
From: Graeme Geldenhuys <mailinglists@geldenhuys.co.uk>
To: fpc-pascal@lists.freepascal.org
Subject: Re: [fpc-pascal] Typinfo incompatibilities between FPC and
Delphi
Message-ID: <538BA3A3.3040707@geldenhuys.co.uk>
Content-Type: text/plain; charset=UTF-8
On 2014-05-31 10:57, Vincent Snijders wrote:
> I think it is possible to write code without $ifdef (valid for Delphi
> and FPC) if you use the typeinfo unit to extract the information.
> http://www.freepascal.org/docs-html/rtl/typinfo/
Almost, but not quite. Good news is, it is not nearly as bad as Sven
makes it out to be.
The tiOPF project uses RTTI extensively. I have written a lot of that
code, and with the following helper function, I could eliminate a lot of
IFDEF's between FPC and Delphi RTTI behaviour.
function tiGetTypeInfo(PropInfo: PPropInfo): PTypeInfo;
begin
{$IFDEF FPC}
Result := PropInfo^.PropType;
{$ELSE}
Result := PropInfo^.PropType^;
{$ENDIF}
end;
I've also introduced an enhanced GetPropInfo() with a signature as follows:
function tiGetPropInfo(AClass: TClass; PropPath: string; PInstance:
Pointer): PPropInfo;
To see the complete code, take a look at the Core/tiRTTI.pas unit in the
tiOPF's 'tiopf2' branch.
That unit is also fully unit tested. Tests and usage examples can be
found in the following unit:
UnitTests/Tests/tiRTTI_TST.pas
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
------------------------------
Message: 9
Date: Tue, 3 Jun 2014 11:08:08 +0200
From: Sven Barth <pascaldragon@googlemail.com>
To: FPC-Pascal users discussions <fpc-pascal@lists.freepascal.org>
Subject: Re: [fpc-pascal] Typinfo incompatibilities between FPC and
Delphi
Message-ID:
<CAFMUeB9b9r_bW_9RUpg0g_BFCu9T0hWo6fE7SN3GmB7z1dZ8Rg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Am 03.06.2014 10:26 schrieb "Graeme Geldenhuys" <
mailinglists@geldenhuys.co.uk>:
>
> On 2014-05-31 10:57, Vincent Snijders wrote:
> > I think it is possible to write code without $ifdef (valid for Delphi
> > and FPC) if you use the typeinfo unit to extract the information.
> > http://www.freepascal.org/docs-html/rtl/typinfo/
>
> Almost, but not quite. Good news is, it is not nearly as bad as Sven
> makes it out to be.
>
If one uses a helper function like you did then it's indeed not as bad, but
if one doesn't...
> function tiGetTypeInfo(PropInfo: PPropInfo): PTypeInfo;
> begin
> {$IFDEF FPC}
> Result := PropInfo^.PropType;
> {$ELSE}
> Result := PropInfo^.PropType^;
> {$ENDIF}
> end;
Out of curiosity: is this helper declared as "inline"? Would get rid of the
call completely in both Delphi and FPC...
>
> I've also introduced an enhanced GetPropInfo() with a signature as
follows:
>
> function tiGetPropInfo(AClass: TClass; PropPath: string; PInstance:
> Pointer): PPropInfo;
Might also profit from a declaration as "inline" :)
Yours,
SvenFrom my Third Person Point of view i Realy can't See any Reason why Arnaud should spent Time in brook or is anyone else here who is in Need of mormot to brook Support ?
IMHO, it can only bring benefits when knowledgeable authors like ab and silvioprog start to communicate. Not to mention that silvioprog is kind enough to offer help to port mORMot to FPC.
Some bugs need to be fixed with the FCL, if I want mORMot to work as expected.
For instance:
- the new code-page strings available in FPC 2.7 branch is not as consistent as Delphi 2009 (e.g. it changes the code page e.g. when you write aStr := '"'+aStr);
- TInvokeableVariantType.SetProperty() is broken and do not allow to set property values inside a variant via late-binding;
- some missing functions for old RTTI (e.g. dynamic array published properties support).
How do we create tickets for FPC? What is the best approach?
Another useful message in today's FPC maillist:
Message: 5
Date: Sat, 31 May 2014 14:24:56 +0200
From: Maciej Izak <hnb.code@gmail.com>
To: FPC-Pascal users discussions <fpc-pascal@lists.freepascal.org>
Subject: Re: [fpc-pascal] Typinfo incompatibilities between FPC and
Delphi
Message-ID:
<CAFTppY4_VZfUToXwe7WY9jpJHb7G7+H903YZOmviLfnA50qs+g@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
>
> In FPC's TPropInfo the PropType field is PTypeInfo whereas in Delphi it is
> PPTypeInfo. I'm not sure what is actually gained by this extra level of
> indirection but it exists none the less.
>
>
By Barry Kelly in comment :) :
[url]http://stackoverflow.com/questions/3443097/what-is-the-identity-pointer-before-a-ttypeinfo-there-for[/url]
"all typeinfo fixups - pointers from one blob of typeinfo to another - are
of type PPTypeInfo, not PTypeInfo, to handle the dynamic linking case. In
the case of static linkage, there needs to be an intermediate pointer for
the convention to work, and part of the typeinfo itself makes as much sense
as any. That is to say, it's not there for the linker; it's there because
of the convention, and the convention is there because of dynamic linking,
which is done the way it is to maximize potential for page sharing."
Regards,
Maciej Izak (hnb)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <[url]http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140531/b755eb8c/attachment-0001.html[/url]>
------------------------------
Message: 6
Date: Sat, 31 May 2014 15:45:39 +0200 (CEST)
From: marcov@stack.nl (Marco van de Voort)
To: FPC-Pascal users discussions <fpc-pascal@lists.freepascal.org>
Subject: Re: [fpc-pascal] Typinfo incompatibilities between FPC and
Delphi
Message-ID: <20140531134539.85117730B5@toad.stack.nl>
Content-Type: text/plain; charset="US-ASCII"
In our previous episode, Maciej Izak said:
> By Barry Kelly in comment :) :
>
> [url]http://stackoverflow.com/questions/3443097/what-is-the-identity-pointer-before-a-ttypeinfo-there-for[/url]
>
> "all typeinfo fixups - pointers from one blob of typeinfo to another - are
> of type PPTypeInfo, not PTypeInfo, to handle the dynamic linking case. In
> the case of static linkage, there needs to be an intermediate pointer for
> the convention to work, and part of the typeinfo itself makes as much sense
> as any. That is to say, it's not there for the linker; it's there because
> of the convention, and the convention is there because of dynamic linking,
> which is done the way it is to maximize potential for page sharing."
Thanks, I added it to the wiki:
[url]http://wiki.freepascal.org/packages#Details[/url]I already circumvent it.
But the issues I wrote about in above post are more serious..
http://bugs.freepascal.org/my_view_page.php
http://forum.lazarus.freepascal.org/index.php
http://lists.freepascal.org/cgi-bin/mai … fpc-pascal
:-D Maybe through these FPC-related links ? ...
Some bugs need to be fixed with the FCL, if I want mORMot to work as expected.
For instance:
- the new code-page strings available in FPC 2.7 branch is not as consistent as Delphi 2009 (e.g. it changes the code page e.g. when you write aStr := '"'+aStr);
- TInvokeableVariantType.SetProperty() is broken and do not allow to set property values inside a variant via late-binding;
- some missing functions for old RTTI (e.g. dynamic array published properties support).
How do we create tickets for FPC? What is the best approach?
Some interesting messages from today's FPC-maillist :
Message: 4
Date: Fri, 30 May 2014 22:53:11 -0500
From: Kenneth Cochran <kenneth.cochran@gmail.com>
To: FPC-Pascal users discussions <fpc-pascal@lists.freepascal.org>
Subject: [fpc-pascal] Typinfo incompatibilities between FPC and Delphi
Message-ID:
<CALe4hHWcU_OuntMyG=UDRu2ZncaTOTPQTDY9+GEWhpRhx7VBLg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
I'm attempting to port GExperts from Delphi to Lazaurus and noticed the
definition of TPropInfo differs from Delphi's.
In FPC's TPropInfo the PropType field is PTypeInfo whereas in Delphi it is
PPTypeInfo. I'm not sure what is actually gained by this extra level of
indirection but it exists none the less.
Are there any plans to update TPropInfo to be compatible with Delphi or do
I need to wrap dependent code with compiler conditionals?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140530/44a7fd17/attachment-0001.html>Message: 6
Date: Sat, 31 May 2014 11:48:48 +0200
From: Sven Barth <pascaldragon@googlemail.com>
To: fpc-pascal@lists.freepascal.org
Subject: Re: [fpc-pascal] Typinfo incompatibilities between FPC and
Delphi
Message-ID: <5389A580.5020701@googlemail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 31.05.2014 05:53, Kenneth Cochran wrote:
> I'm attempting to port GExperts from Delphi to Lazaurus and noticed the
> definition of TPropInfo differs from Delphi's.
>
> In FPC's TPropInfo the PropType field is PTypeInfo whereas in Delphi it
> is PPTypeInfo. I'm not sure what is actually gained by this extra level
> of indirection but it exists none the less.
>
> Are there any plans to update TPropInfo to be compatible with Delphi or
> do I need to wrap dependent code with compiler conditionals?
There are no plans as we have to stay compatible with our own old
codebases as well. You'll need to use compiler conditionals.
Regards,
SvenMessage: 7
Date: Sat, 31 May 2014 11:57:40 +0200
From: Vincent Snijders <vincent.snijders@gmail.com>
To: FPC-Pascal users discussions <fpc-pascal@lists.freepascal.org>
Subject: Re: [fpc-pascal] Typinfo incompatibilities between FPC and
Delphi
Message-ID:
<CAMDhvckvJo8vZNniFy+b-3p9T7_8Zv2mGFMzx9HuToMJai2=Uw@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
2014-05-31 11:48 GMT+02:00 Sven Barth <pascaldragon@googlemail.com>:
> On 31.05.2014 05:53, Kenneth Cochran wrote:
>
>> I'm attempting to port GExperts from Delphi to Lazaurus and noticed the
>> definition of TPropInfo differs from Delphi's.
>>
>> In FPC's TPropInfo the PropType field is PTypeInfo whereas in Delphi it
>> is PPTypeInfo. I'm not sure what is actually gained by this extra level
>> of indirection but it exists none the less.
>>
>> Are there any plans to update TPropInfo to be compatible with Delphi or
>> do I need to wrap dependent code with compiler conditionals?
>>
>
> There are no plans as we have to stay compatible with our own old
> codebases as well. You'll need to use compiler conditionals.
>
I think it is possible to write code without $ifdef (valid for Delphi and
FPC) if you use the typeinfo unit to extract the information.
http://www.freepascal.org/docs-html/rtl/typinfo/
Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140531/fd32bb13/attachment.html>I can feel your pain ...
RTTI incompatibility is indeed the reason why several vendors shy away from FPC ...
Would it be possible you place the task on the FreePascal forum to seek for FPC experts' help or participation ?
Right now only the "SynCrossPlatformJSON.pas" under "crossplatform" directory can be compiled with Free Pascal.
SynPDF is a very good library !
EPS is also a well-accepted format. One advantage of EPS is that it can easily be incorporated into other softwares such as MSOffice, Adobe Illustrator, etc. Furthermore, it can be converted to PDF painless.
Therefore, I am wondering whether there will be SynEPS to produce EPS files ? ![]()
Could you help to provide a test case that fails for sure for FPC ? It may be easier to diagonise ... :-D
Thank you for your efforts ! Sorry for trouble !
I do not know why "// assume string is UTF-8 encoded (as with Lazarus/LCL) // note that when working with variants, FPC 2.7.1 sometimes clear the code page".
Could you present the problem in "Lazarus forum" http://forum.lazarus.freepascal.org/index.php ? :-P
-------------
from this FPC webpage, it is claimed "There are significant improvements to development branches of FPC 2.7.1 with regard to Strings. See RawByteString and UTF8String."
http://wiki.freepascal.org/LCL_Unicode_Support
from this FPC webpage, UTF8String is Not implemented. It is currently just an alias for ansistring.
http://wiki.freepascal.org/FPC_Unicode_ … UTF8String
from this 2007 FPC maillist and two related webpages, it seems that Unicode as stored in 16-bit Unicode format is supported by FPC.
http://free-pascal-general.1045716.n5.n … 14536.html
http://lptk.sourceforge.net/
http://pasgf.sourceforge.net/
There are String<->Integer and String<->Currency conversion replacements in Syncommons unit. Furthermore, there are even a few improvements of them last week.
I am thus curious why there is no String<->Float conversion replacement in Syncommons ? Is it because the RTL version is already close to best ?
Thank you for your helpful comment !
PS: Just for reference purpose, OXml (www.kluug.net/oxml.php) claims to be compatible with D/FPC on Windows/Linux/Mac. Probably contains useful ideas. :-P
I guess you are mixing rawutf8 and string types.
The Syncrossplatform unit uses strings, not rawutf8.
Could you help to comment, if it does not use RawUTF8, how can it handle UTF8 when the Kylix/FPC compiler is used ? ![]()
Very good reasoning ! ![]()
But the primary key should be an integer, otherwise the ORM won't work...
There is no simple workaround yet...
Could you help to elaborate the reason ? ![]()
I would think that multiple-string-field primary key is rather common ?
I completely agree with "Aristotelian virtue"
and thank you for your observations
!
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... ![]()
Thank you for your comments !
I seem to read somewhere that you considered "MSEide+MSEgui" is "very well designed". You all build great softwares !
More references :
Martin' work on compatibility with Delphi 7 ** AND Kylix ** , as shown in "${MSEDIR}\lib\common\delphicompatibility\*.pas", should be helpful. ![]()
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/
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
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...
@ab
Could you help to comment whether "MSEgui (or MSEide+MSEgui)" can be used together with mORMot ?
In 2013 Martin mentioned about Delphi 7/Kylix compatibility, but there is not yet any news following...
Really exciting to see cross-platform mORMot ! Great Work ! ![]()
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.Last weekend I tried SynCommons with CrossKylix and sadly failed due to my incompetence. Several problems :
(1) encoding/UTF8: MultipleByeToWideChar function (not sure NativeXmlWin32Compat.pas works as expected by mORMot)/SynAnsiConvert type/etc
(2) memory-mapped files: how to implement the same functionality using Libc.mmap function etc
(3) Windows-specific: TWindowsVersion type/GetACP function/some {$IFDEF MSWindows} in the interface section but not in the implementation section but referenced in many places/etc
Furthermore, when debugging for the Linux port: OpenSuse+Kylix and windows+Delphi7 seems to be better (more straightfoward) than Delphi7+CrossKylix to me...
IMHO .Net Native uses normal GC, which is one of the pains....
Very knowledgeable comments ! Very good news ! ![]()
Congratulations for the great performance ! ![]()
Thank you for your time and knowledgeable comments ! ![]()
It appears to be an interesting framework and just turns 3.0 (A lot of messages in fpc-pascal mail list today
). http://silvioprog.github.io/brookframework/
From its webpage: the Brook features
Advanced routes management – Actions are performed by means of routes. Brook knows how to receive a request and choose the correct URL and the correct method to reply to it.
Integrated data persistance – Brook offers a table object where data can be handled. Less instantiations, less coding, with an elegant syntax.
JSON native support – JSON is widespred in the web for data exchange purposes. You will really appreciate Brooks' good JSON support.
REST architecture support – REST is an architecture able to simplify and standardize data requests and replies. Brook is powerful even if you don't use REST – but you will want to use it.
Lazarus wizards for installation and usage - With Lazarus, development is easier; with the Brook wizards, only a few clicks are required to start and configure your Brook projects.
Could you help to share your opinions on it ? e.g., architectural, performance-wise, roadmap/future ...
On a side effect, it is noted that Brook can run in four modes:
CGI (with any HTTP server like Apache, nginx etc.);
FastCGI (with any HTTP server like);
Stand alone (with embedded server);
Stand alone service/daemon (with embedded daemon server).
Probably this helps with mORMot's switching to Linux ?
Thank you for your prompt help !
Further observations with Delphi 7, "Compiler"->"Use Debug DCUs" and "Stack frames", "Linker"->"Detailed Map" and "TD32", XXXLog.Enter without parameters :
Could you help to comment on the different behaviors ?
1. For MainDemo
(1) You have used the line below to trigger an exception. The line number can indeed be recorded, whether "Compiler"->"Optimization" is on or off...
Ribbon.ToolBar.AddPage(nil); Could you use an uninitialized TStringList to trigger the exception (shown as below) ? I have tried and the line number of the exception cannot be recorded, whether "Compiler"->"Optimization" is on or off...
var sl: TStringList;
...
sl.Add('')2. For an simple Console project, source code shown as below, the line number of the method and the exception can be recorded, whether "Compiler"->"Optimization" is on or off.
program Console;
{$APPTYPE CONSOLE}
uses
SynCommons, Classes, SysUtils;
var sl: TStringList;
begin
TSynLog.Family.Level := LOG_VERBOSE;
TSynLog.Enter;
sl.Add('');
end.3. For an simple VCL project where everything happens in FormCreate, source code shown as below, the line number of the method and the exception can be recorded, only when the "Compiler"->"Optimization" is off. Furthermore, when the "Compiler"->"Optimization" is on, the with statement has to be used instead of the line above it, otherwise no method or exception will be recorded.
procedure TForm1.FormCreate(Sender: TObject);
var sl: TStringList;
begin
// TSynLog.Family.Level := LOG_VERBOSE;
with TSynLog.Family do begin Level := LOG_VERBOSE; end;
TSynLog.Enter;
sl.Add('');
end;