You are not logged in.
145 days of war
Really appreciate the update. Glimps of the reality you and many Ukrainian people are facing every day.
Stay strong!
cybexr,
Can you post a working example?
Another excellent step ahead!
Is the server side ready for Android, IOS?
(I know, who runs a server on mobile? But in some of my use cases it does make sense. )
Wow, congrats! Great addition to the framework.
Thanks, best case scenario!
Well deserved!
+1
He is very-very productive, but everyone needs time to regenerate off the regular paths. I am hoping that is all.
Yes, my rookie mistake. I wanted to test M2, but picked the lpk's from the wrong folder.
Neverless the error is still strange, should not happen. Maybe an other compiler issue.
Got it, thx.
Lazarus fixes + FPC Fixes + Windows 7
The error comes when trying to compile mormot_cross.lpk
Hi,
I have just begun exploring M2. Some very naive questions to be expected.
This should be something which does not require AB.
Lazarus keeps the "Use"."Install" menu grey. How this package supposed to be used?
ab,
just a very small issue:
SynCrossPlatformREST.pas(2918,15) Error: Incompatible types: got "Variant" expected "TID"
/// marshall {result:...,id:...} and {result:...} body answers
function CallGetResult(const aCall: TSQLRestURIParams; var outID: TID): variant;
{$ifndef ISSMS}
var doc: TJSONVariantData;
jsonres: string;
{$endif}
begin
...
outID := doc.Value['id'];
{$endif}
end;
Excellent, this is a really important part of the library.
Ok, got it. The easily predictable question is: any plans?
https://gitlab.com/freepascal.org/fpc/s … 372da876e6
https://gitlab.com/freepascal.org/fpc/s … 372da876e6
This was amazingly fast fix during a weekend from the FPC devs!
I have applied the changes to the fixes branch locally and the range checking errors are gone, but unfortunately there other compiler errors like this with ResStringRec.Identifier:
mORMoti18n.pas(901,19) Error: Illegal qualifier
function LoadResString(ResStringRec: PResStringRec): string;
var Buffer: array [0..4095] of Char; // char = use the generic string type
i: integer;
begin
if ResStringRec=nil then begin
result := '';
Exit;
end;
if ResStringRec.Identifier[<64*1024 then begin
The problem was stated in a misleading way. Sorry! It actually works when the parameter is a constant.
In my case the value comes from an XML reader as a UnicodeString which is assigned to a RawUTF8 property. No direct conversion, the compiler is handling it, because anything I have tried made it worse.
When this property is the parameter, that is when the problem occurs.
Yes.
This is most likely the cause.
I will do some digging.
AFAIK we are using the same "fixes" branch .
At which commit is yours?
I have tried it with a freshly created application in Lazarus and the problem is the same.
Is it possible that the compiler's behavior has changed?
Hi,
only the part before the national character is in the result.
Utf8ToString('parkolás') ---> 'parkol'
Versions:
FPC/Lazarus fixes branch -up to date
mORMot 1.18 -up to date
I have all units in the project with {$I Synopse.inc}
Checked Synopse.inc, it is the same as in the repository
(********************** Shared Conditionals **********************)
{$ifdef PUREPASCAL}
{$define NODELPHIASM}
{$define FPC_OR_PUREPASCAL}
{$else}
{$endif PUREPASCAL}
{$H+} // we use long strings
{$R-} // disable Range checking in our code
There are no range checking defines in project options or in the source files.
Is there something else I can check?
Hi,
I am trying to use mORMoti18n the first time.
Versions:
FPC/Lazarus fixes branch -up to date
mORMot 1.18 -up to date
mORMoti18n.pas(324,15) Error: range check error while evaluating constants (255 must be between 0 and 59)
const
/// value stored into a TLanguages enumerate to mark no language selected yet
LANGUAGE_NONE = TLanguages(255);
Thank you!
Ok, thanks!
Hi,
At https://github.com/synopse/mORMot2/releases the latest static files are still for SQLite 3.37.2.
Is there any other/preferred address for download?
In Ukraine, we now have to fight for our lives and the lives of our families. I ask everyone to bring the truth to the Russians. Because their lies have already crossed all boundaries.
Stop the war!
If only all Russians were properly informed it would probably have ended this war by now. Many of them simply had no idea what was happening. Luckily ugly propaganda cannot hide the consequences of the sanctions, which will be a wake up call for many. The turning point is when the propaganda is no longer effective and people realize that their country is the brutal aggressor. The only way putin can stay in power somewhat longer is through martial law. In this case it's main purpose is to mislead and silence the inside opposition.
Pavlo,
the way your people are fighting sets an example for the rest of the world. If you can stand your ground long enough, it will cause more and more problems to Putin.
I do not know if you have any connections to military leaders, but there are strategic questions that bother me.
1. Even today there was news about a large Russian convoy. Why are not these targeted? Learn from the Afghans! Roadside bombs ...
Guerrilla warfare should be planned a prepared. Once a territory falls into enemy hands, it should start right away. A few well selected targets causing significant losses makes it somewhat less risky for those risking their lives.
2. Hit the enemy at it's weakest point: the Russians have logistical and supply problems. (They probably only want to negotiate to refill their supplies) Targeting their storages and vehicles transporting supplies seems like an effective strategy.
3. Street fights: It seems most Russians do not have night-vision equipment and training. So they only fight from dawn. They could be attacked while they are sleeping. The very least preventing their sleep might be useful.
The human cost is just terrible. Civilians hiding in uncomfortable shelters without proper sleep, limited food and water ... being a kid in such a terror ...
Human kind had two gigantic lessons to learn from in the 20th century ... some did not learn a thing which shows that they are pure evil.
AB,
in case someone wants to add a different/modified protocol it would be better to store the names of the protocols in some sort of extendable list.
Also it might help code maintainability if the protocol names were not used directly as strings. Mapping the strings to constants and using those constants in the code seems better to me.
function TSynopseServerProtocol.GetSubprotocols: RawUtf8;
begin
// mormot.net.ws.core's TWebSocketProtocolRest variants
result := 'synopsejson, synopsebin, synopsebinary';
end;
function TSynopseServerProtocol.SetSubprotocol(
const aProtocolName: RawUtf8): boolean;
begin
result := FindPropName(
['synopsejson', 'synopsebin', 'synopsebinary'], aProtocolName) >= 0;
end;
Lightning fast.
Thank you!
ab,
there is one more sqlite release (3.35.4.) with a few fixes.
Hello ab! Your product is fantastical (hungarian slang: “nagyon Gromek”). In the new project I use mormot2.
In the new update I not found 3.35.0 static binaries for mormot2. Mormot2 test not run. Are any timeframe for update or just fix the version string in the file?mormot.db.sqlite3.static.pas:
{$ifdef OSANDROID} '3.34' {$else} '3.35.0' {$endif};Thx
It is usually worth waiting a bit with new SQLite releases until the newly introduced bugs are fixed.
ab,
do you already have a concept on how JS debugging could work? I started to think if it was a viable option to bridge the JS debug info with Lazarus + pas2js. With such an addition it would practically make pascal scripting possible too.
edwinsn,
dialects usually introduce some additions which can be ignored for compatibility. Lack of documentation/support can be a problem for free solutions. This is why PaxCompiler was worth it's money. Because of the lack of proper free solutions I think probably there is still place for a similar commercial product.
Leslie7 - it's depends. JS is a good choice for at last 3 reason:
1) JS is popular - in my company 60 developers know JS and 2 pascal (10 years ago 60 pascal and 2 JS)
2) there is 100500 ready to use JS libraries, much more when for pascal
3) modern JS engines what supports JIT is VERY fast. For business logic cases as fast as a compiled code
JS is widely known and used of course and you are right about all these. But there are good reasons why we still work with Delphi/Lazarus beyond maintaining legacy code as well.
And if the required skills are already there it would make sense to do the scripting in pascal too. It is much more productive and leaves less room for errors.
Being able to debug and fix errors in libraries can be very handy when you are short on time. I find it much more difficult to do this with JS.
I find development and testing - especially for mobiles - much faster if fixes, changes are introduced through scripting. When they are proven to be logically correct then I can compile the same pascal code to machine code into the application and deploy it when it is prudent.
... did not see your last post.
The most natural solution would be some sort of pascal scripting written in pascal. The problem is that there does not seem to be any really good fit for mORMot.
Remobjects's Pascal Script is the only free one I know of which is mature enough and can be used with both Lazarus and Delphi. Unfortunately it does not allow script defined classes, which is important for ORM. Functionally something like PaxCompiler would be a good solution but it does not seem to be available even for purchase any more.
Freepascal JS compiler combined with the new JS engine might be a viable route for those who want to stick with Pascal even for scripting, but I do not see how debugging could work in this case.
ab,
there is a relevant bug fix in 3.35.1
Yes, I can see now. It was at the end of a comment for AB.
Maybe this was overlooked ...
Okokba,
can you see a way to include the "decimal" extention too? It is not part of the SQLite amalgamation, so it may be tricikier.
Okokba,
can you see a way to include the "decimal" extention too? It is not part of the SQLite amalgamation, so it may be tricikier.
Websockets makes much more sense with a thread pool.
Lots of work done in a short time.
PascalDragon,
I just want to say that it is great to have you here. Your attention to make mORMot and FPC work well together is appreciated.
The problem was something else: after base64 decoding first TAESECB.DecryptPKCS7 works PERFECTLY.:)
Yes, of course.
Unfortunately this info is not in the documentation currently available. "No info" suggests to me that it is probably the most basic/standardish/frequently used option. I assume there are things I could try.
I am aware of the weakness, but thanks for the warning. This is something from an outside source.
The string's length is 87.
I have already tried DecryptPKCS7Buffer with TAESECB and TAESECB_API yesterday but I got "Invalid input length."
I figured that copy-pasting an example would be least time consuming help.
Hi,
I have not found how to do this with mORMot. A simple example would be useful if somebody has one.
Any quick solution outside mORMot is welcome too.
I suspected something like this. Anyhow, excellent addition to the framework.
The way you care for mORMot and it's users is amazing. Your love for your work is kind of contagious.
Great news!
Not to be greedy, but the question comes kind of naturally: why v10, why not the latest v13?