You are not logged in.
I don't know such page with detailed description of each FPC branch.
In general FPC "fixes3.2" seems like right choice for now. The stable 3.2 was not released yet and AFAIK the fixes3.2 is the base for incoming 3.2 stable release.
about Lazarus: Lazarus version has no meaning (it can be eventually more or less comfortable for end user including not working, but you should be able to use FPC from command line ). IMO always is worth to try new Lazarus for better UX.
You cannot expect from trunk any stability. Only "patches/fixes" branch and "stable" releases are stable.
No idea yet, this needs investigation. Probably some internal changes in RTTI layout (maybe even compiler bug). Try to use "fixes3.2" in fpcupdeluxe FPC Version instead of trunk.
Probably you should add to Synopse.inc the new directive:
{$modeswitch prefixedattributes-}
the problem is related to initial support of attributes in latest FPC trunk.
The first problem can be partially solved via custom TSQLRestServer.OnSessionCreate.
The second part can be solved via custom TAuthSession:
type
TCustomAuthSession = class(TAuthSession)
procedure ComputeProtectedValues; override;
end;
procedure TCustomAuthSession.ComputeProtectedValues;
begin
inherited;
fTimeOutShr10 := (QWord(User.GroupRights.SessionTimeout)*(1000))shr 10;
Inc(fTimeOutShr10);
fTimeOutTix := GetTickCount64 shr 10+fTimeOutShr10;
end;
...
MyServer.SessionClass := TCustomAuthSession;
Default precision is in approximation one second so all seems fine.
Hi,
I found two problems with sessions.
The first:
when TSQLServer has single user and reOneSessionPerUser is used in TSQLAuthGroup.AllowRemoteExecute set, then the session is never released (deleted) even when session time out occurred.
Second:
the precision of timeout is too low for some automation processes (for example for bot clients). The minimal timeout can be set to one minute, IMO should be possible to set such timeout to second/few seconds in some cases. The behavior cannot be changed in simple way. The usefully would be virtual TSQLRestServer.SessionAccess (current SessionAccess cannot be overridden) or some other solution.
here is pull request (merged with latest mORMot) https://github.com/synopse/mORMot/pull/183 extracted from warleyalex archive.
Without improved examples - I have only SMS free compiler so examples are not validated by me. I was able to compile some small project with latest SMS compiler.
Thanks warleyalex!
after few messages I have the same feeling.
AFAIK usage of ZEOS 7.3 is risky (in one of my bugreport (ZEOS bugtracker at sourceforge) some time ago I was warned that I should use 7.2). The recommended version is https://sourceforge.net/p/zeoslib/code- … .2-patches
Anyway whatever was said I was using selected 7.3 with important fixes for me ( PostgreSQL ). You can try to isolate minimal test case and use ZEOS bugtracker at sourceforge to report the problem.
yes but "hacker/attacker" is able to logout user without user knowledge. AFAIK this is still actual : https://synopse.info/forum/viewtopic.php?id=2996
Note that Google or others do send plain passwords over HTTPS, so the mORMot handshake protocol is more secure for sure - at least you can never see the password, and can't replay an old signature!
the only what is possible is usage of current/latest signature to logout user ^^!
NewPascal has few compiler changes (for example "default field" feature for smart pointers and ARC objects via using https://github.com/maciej-izak/PascalSmartPointers) but in most of cases is similar. Lazarus IDE is exactly the same. The main advantage of NewPascal is simple usage, you don't need to install anything -> "download and run with mORMot" out of box.
I was not able to reproduce you error. You can always try to use fpcupdelux to build your own Lazarus & FPC : https://github.com/newpascal/fpcupdeluxe/releases
Worth to note that OnBeforeBody behaves in different way for http.sys and socket server. For the http.sys OnBeforeBody is executed only when body exist but for sockets server OnBeforeBody is executed always (even when body is empty).
Yes, but the way to start is a little complicated (is very easy to mess many things), probably you need to wait a little more for "easy to use" version of NewPascal for Android. For now I have this combo for one of my commercial products for Android which works for many months (also with latest version of NewPascal).
Not much. The sponsorship is a little delayed, if nothing will change in this matter probably I will need to figure some other ways to continue progress for NewPascal. Besides the sponsorship the main problem with Android is deprecated Ant part (which is replaced by Gradle). I have all scripts dedicated for Ant, so here I need to put more work :\. General the combo NewPascal + mORMot + LAMW + crosscompilation Win -> Android ARM7 works great, but the scripts are not fully automated yet. Probably more news in September.
I can't see the attached image. Did you try to clean all *.ppu and *.o files? Btw, 1.9 is the version of Lazarus, current NewPascal is 1.0.55.
We have plan to support this in NewPascal
@michalis thanks! and nice to have you in mORMot forum ^^. Welcome!
@edwinsn Not now but stay tuned. I have advanced talks with sponsor so I will be able to spend more time on NewPascal. Before I will start next language features I'd like to finish many CI stuff. We need some automatic regression test (also the tests for mORMot) for all supported platforms. Cross-compilers for Linux, MacOS (and maybe Android) are in the top of TODO list. Every cross compiler will be created by CI systems.
@hnb,
What were you banned and can you point me to the page of the relative discussion?
to get full picture you need to track April/May mailing list archives (you can read all discussion by clicking "Next message (by thread)" in bottom):
http://lists.freepascal.org/pipermail/f … 38863.html
http://lists.freepascal.org/pipermail/f … 38880.html
after my last message I have got permanent ban - I have no access to SVN FPC repository/trunk nor internal "core mailing list".
TLTR, the general summary (this was not first situation):
This was some time ago, when I was part of FPC core team and NewPascal was almost integrated with official FPC page... Now I have ban in FPC core mailing list and I don't have access to trunk anymore - there is no rational reason for my banishment... I am not able to provide any updates, bug fixes nor new features into FPC trunk. Political decision and revenge of one person in core team...
Anyway still nothing wrong with using FPC trunk instead of NewPascal - individual decision .
Both ways are good. Additional advantage of NewPascal is close cooperation with mORMot, so every change in critical parts of NewPascal (RTL, low level details) are handled in mORMot immediately. FPC trunk is also supported but in some situations update for mORMot may be delayed (and mix of FPC trunk and mORMot may be nonfunctional/full of bugs for some time).
Also NewPascal contains additional patches, bugfixes and features. For example "default field" feature or SmartPointers/ARC objects can be used only with NewPascal. I have also plan of special module dedicated for mORMot for extra features of NewPascal.
mORMot is freedom of choice
Probably you need latest Zeos (I am not sure here), you can download proper/newest version of Zeos here : https://github.com/newpascal-ccr/zeos
Zeos will be part of next release of NewPascal like mORMot .
good idea, seems that users also likes the concept of ReadMe.md : https://github.com/newpascal/newpascal/issues/4
in current v1.0.55 I was focused on merge, cleaning the code and on fixes for CI ( nodejs modules are really dynamic and often updated ).
If you decide to use option 1 then mORMot is ready to use as part of newpascal.zip archive (is located in ccr\mORMot directory) and is detected "out of box" in IDE (you even don't need to configure a project).
If you decide to use option 2 then you need additional step: you can download mORMot via fpcupdelux or you can do download on your own (for example from : https://github.com/synopse/mORMot )
Probably good idea You can do update in 2 ways :
1. http://newpascal.org/download.html / https://github.com/newpascal/newpascal/ … np-v1.0.55
2. via fpcupdelux
Hi,
after more than one year of lack of updates for NewPascal, NewPascal is back to life in new version v1.0.55 and I have hope to continue progress. This version contains fresh, ready to use mORMot and trunk of Lazarus and modified version of FPC trunk in really lightweight form without needs of installation:
Did you try to use in modules :
{$MODE DELPHI}
{$CODEPAGE UTF8}
?
Rather no. InitCSV don't decode, encoded string by ToTextPairs with twJSONEscape option (there is no way to use in proper way InitCSV when twJSONEscape was used in ToTextPairs).
Hi,
seems that we have small problem. The data which is saved by :
SomeVar.test := 'test';
LIni := TDocVariantData(SomeVar).ToTextPairs;
and after is loaded:
TDocVariantData(SomeVar).InitCSV(LIni);
WriteLn(SomeVar.test) // print "test"
LIni := TDocVariantData(SomeVar).ToTextPairs;
TDocVariantData(SomeVar).InitCSV(LIni);
WriteLn(SomeVar.test) // print "\"test\""
works improper (the documentation says : the supplied content may have been generated by ToTextPairs() method). The SomeVar.test contains improper string (encoded JSON string).
The partial solution is:
LIni := TDocVariantData(SomeVar).ToTextPairs('=', #13#10, twNone);
but this is not the point. Probably some additional parameter for InitCSV is needed.
the reality is not perfect and usage of JSON is not always possible. Personally I like the idea of :
https://www.npmjs.com/package/xml-js
some ideas from xml-js may be used in mORMot.
This is a FPC zlib bug...
maybe is worth to report this on FPC mantis bug tracker?
Thanks, for improved/faster implementation. I think that TObjectVariant is better name . The description "lazy-loading to object properties from Variant" is perfect description of my intention.
TObjProxyVariant is here because ObjectToVariant not work for all cases. It is not art for the art but comes from practice and is widely used in my projects. Sometimes "pre generated" Variant form object is not best choice.
thanks TObjProxyVariant can be optimized a lot : by caching TSQLPropInfoRTTI and by TSynDictionary for fast lookup for property names. Anyway current implementation is fast enough for me.
Hi,
I almost forgot about my new small feature already implemented some time ago : TObjProxyVariant
https://github.com/synopse/mORMot/pull/79
TObjProxyVariant is a custom variant type used to have direct access to object published properties. Very usable for cases where conversion from object to variant is not sufficient. TObjProxyVariant provides direct access to object properties from Variant instead of conversion to Variant. Example usage with mustache:
{$MODE DELPHI}
{$APPTYPE CONSOLE}
uses
mORMot, SynMustache;
type
TA = class
private
fi: integer;
function GetR: Integer;
published
property r: Integer read GetR;
property i: integer read fi write fi;
end;
TB = class
protected
fa: TA;
public
constructor Create;
destructor Destroy; override;
published
property a: TA read fa;
end;
function TA.GetR: Integer;
begin
Result := Random(100);
end;
constructor TB.Create;
begin
fa := TA.Create;
end;
destructor TB.Destroy;
begin
fa.Free;
end;
var
b: TB;
v: variant;
begin
b := TB.Create;
TObjProxyVariant.New(v, b);
v.a.i := 10;
WriteLn(TSynMustache.Parse('{{a.r}}/{{a.i}}/{{a.r}}/{{a.i}}/{{a.r}}').Render(v));
b.Free;
readln;
end.
example output :
54/10/59/10/71
@ab seems that open array behave in different way than dynamic array
procedure TestMe(const Key: TArray<Byte>);
works as expected.
@ab github release don't need to be related to stable release. I was thinking about github releases as of kind of storage for our all binaries. For example fpcupdelux has following "binary" releases not related (at all) to fpcupdelux source code:
Libraries for cross-compiling v1.1 : https://github.com/newpascal/fpcupdelux … slibs_v1.1
Darwin i386 binary toolchains for cross-compiling: https://github.com/newpascal/fpcupdelux … sbins_v1.0
GIT for Windows: https://github.com/newpascal/fpcupdelux … Git-2.13.2
GDB 7.11.1 for Windows: https://github.com/newpascal/fpcupdelux … gdb-7.11.1
etc.
we could do the same thing for mORMot for related libraries/object files
IMO mORMot for github should use "releases" (like fpcupdeluxe and newpascal does - https://github.com/newpascal/fpcupdeluxe/tags, https://github.com/newpascal/newpascal/releases ).
also is possible to use different categories for releases (by tags) for example sqlite_object_files, js_libraries.
Releases - very good way to keep all binary files around git repository:
I forgot to add Init/Done in example but SIGSEGV of course still occurs.
Hi,
current implementation of TSynLocker is nonfunctional/buggy for pointers. Simple example will raise SIGSEGV
uses
SynCommons;
var
Locker: TSynLocker;
begin
Locker.Init;
Locker.LockedPointer[0] := Pointer(1);
Locker.Done;
end.
bug is very simple to fix:
https://github.com/synopse/mORMot/pull/49
I wonder why my pull request is still not accepted...
the bug was related to FPC & mORMot. I've fixed the bug some time ago for FPC:
https://svn.freepascal.org/cgi-bin/view … sion=35717
and thanks to help of Alfred also for mORMot:
https://github.com/synopse/mORMot/commi … 3cceb24ee8
New version of NewPascal should be released very soon.
What is strange - it works for few calls. I have error only for i = 2 or for i = 3 (it depends on TSQLRecord)... SQLite is used as external database because I need to use ISQLDBRows.
Hi,
maybe I miss something but for simple code like:
FModel := TSQLModel.Create([TExampleData]);
FServer := TSQLRestServerDB.Create(FModel, ':memory:');
FServer.CreateMissingTables;
FProp := TSQLDBSQLite3ConnectionProperties.Create(FServer.DB);
for I := 0 to 3 do
with FProp.Execute('select count(*) from ExampleData', []) do
begin
if Step(true) then
WriteLn(ColumnInt(0));
end;
I got error: "TSQLDBSQLite3Statement.Step(SeekFirst=true) not implemented for simple". Any ideas?
The mORMot acquisition by Embarcadero would be the worst event on my whole life.
Release will be a little delayed:
1. I need to finish some new compiler feature
2. Maybe NewPascal soon will be more official part of FPC
Thanks for icon, I will use that icon in next release! New release is planned in this month (or early August). My effort in last days was concentrated to improve FPC trunk and Lazarus trunk in few aspects, few of parts of my work was also related to mORMot. mORMot will work with next NewPascal much better (no need to add any path to project settings for mORMot - this step was required for codetools/code completion for Lazarus IDE).
Generally ORM systems are known as slow solutions but mORMot is fast so... maybe new namespace FastORM for ORM related stuff? I like dotted namespaces. So for me for example FastORM.Commons would be best . Anyway most important for me is separation to packages whatever the name is.
ab, did you forgot about our initial list of packages?
mORMot_Commons, mORMot_SQLite3 (+ mORMot_SQLite3Static), mORMot_DB, mORMot_REST, mORMot_DDD, mORMot_MVC, mORMot_PDF, mORMot_UI, mORMot_CrossPlatform, mORMot_ZEOS
Hi,
current helpers without parameters are a little problematic:
{{NewGUID}}
will not work. we have workaround (additional fake parameter) which is not intuitive:
{{NewGUID call}}
I have small patch (parameter less helper is searched after context searching):
https://github.com/synopse/mORMot/pull/45
anyway maybe some other syntax for "parameter less" helpers may be better.
AOG (thanks!) found the problem (I can confirm):
https://synopse.info/forum/viewtopic.ph … 311#p24311
we need to find another fix for:
https://synopse.info/forum/viewtopic.php?id=3126
my newest pull request: