#1 Re: mORMot 1 » Stop the war! » 2022-07-23 19:13:27

mpv wrote:

145 days of war sad

Really appreciate the update. Glimps of the reality you and many Ukrainian people are facing every day.
Stay strong!

#2 Re: mORMot 1 » ICU extension for SQLite » 2022-07-23 18:59:32

cybexr,

Can you post a working example?

#3 Re: mORMot 1 » Native TLS Support for mORMot 2 REST or WebSockets Servers » 2022-07-10 05:32:51

Another excellent step ahead! smile smile

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. smile  )

#4 Re: mORMot 1 » New Async HTTP/WebSocket Server on mORMot 2 » 2022-05-26 08:22:29

Wow, congrats! Great addition to the framework.

#7 Re: mORMot 1 » what happened to ab? » 2022-05-06 13:32:54

+1

He is very-very productive, but everyone needs time to regenerate off the regular paths. I am hoping that is all.

#8 Re: mORMot 1 » mORMot2-Lazarus compile error in SynCrossPlatformREST.CallGetResult » 2022-04-28 16:53:50

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.

#10 Re: mORMot 1 » mORMot2-Lazarus compile error in SynCrossPlatformREST.CallGetResult » 2022-04-24 20:14:11

Lazarus fixes + FPC Fixes + Windows 7

The error comes when trying to compile mormot_cross.lpk

#11 mORMot 1 » mormot_base.lpk » 2022-04-24 19:58:15

Leslie7
Replies: 2

Hi,

I have just begun exploring M2. Some very naive  questions to be expected. smile

This should be something which does not require AB.

Lazarus keeps the "Use"."Install" menu grey.  How this package supposed to be used?

#12 mORMot 1 » mORMot2-Lazarus compile error in SynCrossPlatformREST.CallGetResult » 2022-04-24 19:30:49

Leslie7
Replies: 4

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;                   

#13 Re: mORMot 1 » mORMoti18n - LANGUAGE_NONE » 2022-04-05 14:29:05

Excellent, this is a really important part of the library. smile

#14 Re: mORMot 1 » mORMoti18n - LANGUAGE_NONE » 2022-04-04 13:03:17

Ok, got it. The easily predictable question is: any plans? smile

#15 Re: mORMot 1 » mORMoti18n - LANGUAGE_NONE » 2022-04-03 16:14:31

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    

#16 Re: mORMot 1 » Utf8ToString shortens strings with national characters » 2022-04-01 15:03:14

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.

#18 Re: mORMot 1 » mORMoti18n - LANGUAGE_NONE » 2022-04-01 08:50:17

This is most likely the cause.
I will do some digging.

AFAIK we are using the same "fixes" branch .
At which commit is yours?

#19 Re: mORMot 1 » mORMoti18n - LANGUAGE_NONE » 2022-04-01 08:04:36

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?

#20 mORMot 1 » Utf8ToString shortens strings with national characters » 2022-04-01 07:06:38

Leslie7
Replies: 3

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

#21 Re: mORMot 1 » mORMoti18n - LANGUAGE_NONE » 2022-04-01 06:35:27

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?

#22 mORMot 1 » mORMoti18n - LANGUAGE_NONE » 2022-04-01 05:59:59

Leslie7
Replies: 14

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);

#25 mORMot 1 » mORMot2 Static Files dowload » 2022-03-08 11:33:29

Leslie7
Replies: 5

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?

#26 Re: mORMot 1 » Stop the war! » 2022-03-04 08:31:41

lagodny wrote:

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.

#27 Re: mORMot 1 » Stop the war! » 2022-02-27 23:29:02

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.

#28 mORMot 1 » Websocket protocol extendability » 2021-09-03 19:52:27

Leslie7
Replies: 1

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;

#30 Re: mORMot 1 » New Statics for mORMot » 2021-04-02 22:20:00

ab,

there is one more sqlite release (3.35.4.) with a few fixes.

#31 Re: mORMot 1 » mORMot 2 in Good Shape » 2021-03-21 10:48:54

HollosCs wrote:

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.

#32 Re: mORMot 1 » Rename a column with mORMot » 2021-03-18 09:51:30

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.

https://github.com/koush/vscode-quickjs-debug

#33 Re: mORMot 1 » Rename a column with mORMot » 2021-03-18 09:36:30

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.

#34 Re: mORMot 1 » Rename a column with mORMot » 2021-03-16 21:04:20

mpv wrote:

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.

#35 Re: mORMot 1 » Rename a column with mORMot » 2021-03-16 20:27:41

... did not see your last post.

#37 Re: mORMot 1 » Rename a column with mORMot » 2021-03-16 19:37:24

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.

#38 Re: mORMot 1 » Rename a column with mORMot » 2021-03-16 12:39:01

ab,

there is a relevant bug fix in 3.35.1

#39 Re: mORMot 1 » All SQLite3 library API calls » 2021-03-04 14:05:59

Yes, I can see now. smile It was at the end of a comment for AB.

#40 Re: mORMot 1 » All SQLite3 library API calls » 2021-03-04 06:56:22

Maybe this was overlooked  ... smile

Leslie7 wrote:

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.

#41 Re: mORMot 1 » All SQLite3 library API calls » 2021-03-03 07:03:43

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.

#42 Re: mORMot 1 » Fastest AES-PRNG, AES-CTR and AES-GCM Delphi implementation » 2021-02-14 00:27:53

Websockets makes much more sense with a thread pool. smile

#43 Re: mORMot 1 » 1000th Commit for mORMot 2 » 2021-02-14 00:22:04

Lots of work done in a short time.

#44 Re: mORMot 1 » [Solved] No variant method call dispatch error (occurs in Lazarus/FPC) » 2021-02-12 07:14:43

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. smile

#45 Re: mORMot 1 » AES-128 ECB decrypt » 2021-01-29 13:30:15

The problem was something else: after base64 decoding first TAESECB.DecryptPKCS7 works PERFECTLY.:) smile smile

#46 Re: mORMot 1 » AES-128 ECB decrypt » 2021-01-29 11:07:12

Yes, of course. smile
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.

#47 Re: mORMot 1 » AES-128 ECB decrypt » 2021-01-29 10:08:40

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.

#48 mORMot 1 » AES-128 ECB decrypt » 2021-01-29 01:23:49

Leslie7
Replies: 5

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.

#49 Re: mORMot 1 » Case-insensitive search Cyrillic in SQLite3 » 2021-01-26 18:17:07

I suspected something like this. smile Anyhow, excellent addition to the framework. smile smile

The way you care for mORMot and it's users is amazing. Your love for your work is kind of contagious. big_smile

#50 Re: mORMot 1 » Case-insensitive search Cyrillic in SQLite3 » 2021-01-26 16:36:38

Great news!
Not to be greedy, but the question comes kind of naturally: why v10, why not the latest v13?

Board footer

Powered by FluxBB