#1 Re: mORMot 1 » Be careful on PosEx from mORMot » 2022-12-29 13:11:51

BTW: How Delphi determine which file/class has priority when functions have the same name? For example to how to force first use native in all code places and as second use other 3rd party libraries

#2 mORMot 1 » Be careful on PosEx from mORMot » 2022-12-29 13:08:54

Greg0r
Replies: 2

is this bug or by design?
I found your function Arnaud over internet, problem is that that function does not work with those conditions:
- UTF8 char is used
- Project uses your mORMot

Then it uses first PosEx from mORMot which works buggy, forcing usage from native Delphi (StrUtils) fixes the issue.
Is this known for you or is that a bug?
Below mentioned function

function ExtractText(const Str: string; const Delim1, Delim2: string): string;
var
  pos1, pos2: integer;
begin
  result := '';
  pos1 := Pos(Delim1, Str);
  if pos1 > 0 then begin
    pos2 := PosEx(Delim2, Str, pos1+1);
    if pos2 > 0 then
      result := Copy(Str, pos1 + 1, pos2 - pos1 - 1);
  end;
end;

#3 Re: mORMot 1 » Decrypt using mORMot » 2022-12-08 16:38:40

ps. I know it's perhapns not the safest AES implmentation but it's more than enough for my purposes.

#4 mORMot 1 » Decrypt using mORMot » 2022-12-08 14:19:05

Greg0r
Replies: 2

Hello,

Can anyone help me with mORMot(v1 or V2 whatever ) decrypt  string encrypted which such C# code?

public string Encrypt(string data, string key)
        {
            if (string.IsNullOrWhiteSpace(data))
            {
                return string.Empty;
            }

            using var aes = Aes.Create();
            aes.Key = Encoding.UTF8.GetBytes(key);
            var iv = Convert.ToBase64String(aes.IV);
            var transform = aes.CreateEncryptor(aes.Key, aes.IV);
            using var memoryStream = new MemoryStream();
            using var cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Write);
            using (var streamWriter = new StreamWriter(cryptoStream))
            {
                streamWriter.Write(data);
            }

            return iv + Convert.ToBase64String(memoryStream.ToArray());
        }

#5 Re: mORMot 1 » IsValidUtf8Avx2() and D11 » 2021-09-20 20:23:53

sad have you got technical possibility to report issue to EMB?
So (maybe) there is a chance to make real full support in 11.1...

#6 Re: mORMot 1 » IsValidUtf8Avx2() and D11 » 2021-09-20 16:43:26

smile this time I increased size of output Messages window for wider picture:
https://i.imgur.com/djjKPQ7.png

#7 Re: mORMot 1 » IsValidUtf8Avx2() and D11 » 2021-09-20 15:33:52

Probably as you have said, it's paper support only..

If you want try the last time or not anyway I'm pasting with the latest commit:  https://i.imgur.com/Dl6tUbm.png

#8 Re: mORMot 1 » IsValidUtf8Avx2() and D11 » 2021-09-19 11:49:38

ab wrote:

Does it compile with ymmword instead of oword ?

Please try with the latest commits.

pulled today, [dcc64 Error] mormot.core.base.asmx64.inc(142): E2003 Undeclared identifier: 'ymmword'

#10 mORMot 1 » IsValidUtf8Avx2() and D11 » 2021-09-16 09:53:31

Greg0r
Replies: 11

I've heard that D11 could support AVX2 finally. Don't have installed
anyone checked?
Would be good to support if possible not only for FPC..

#11 Re: mORMot 1 » Sqlite 3.35.0 not found on github » 2021-03-30 08:55:20

it's old now, 3.35.4 on the way ☺

#12 Re: mORMot 1 » Today i decided to upgrade to last build, now my code is not working » 2020-06-12 11:43:18

danielkuettner wrote:

Wow, please send me your account number to make a donation

I believe it's in the top menu of website: https://synopse.info/fossil/wiki?name=HelpDonate

#13 Re: mORMot 1 » 10.4 sydney issues » 2020-06-10 08:13:20

@ab, ok I thought it will need own compilation but if that's matter of your github update then ok, thx

ps. you was so right about sqlite version...current comming is : 3.32.3 smile

#14 Re: mORMot 1 » 10.4 sydney issues » 2020-06-10 07:43:02

Superb news, congratz!
for me does not worked however but I suspect c compiler version issues..
Tried with freeware bcc32c C++ 7.x for Win32: https://www.embarcadero.com/free-tools/ccompiler
[dcc32 Error] SynSQLite3Static.pas(1287): E2068 Illegal reference to symbol '_STRLEN' in object file 'D:\mORMot-master\SQLite3\sqlite3.obj'
Unfortunately don't have XE7 compiler to test

#15 Re: mORMot 1 » 10.4 sydney issues » 2020-06-08 10:01:24

@ab, good decision SQLite3MultipleCiphers  and VFS is the best way to go, serialize/deserialize due to memory issues is not an option.
In long term much harder solution will pay and I guess it should be future major sqlitle changes resistant.
+ optional compression is very nice addition.

#16 Re: mORMot 1 » 10.4 sydney issues » 2020-06-06 09:19:00

Agree with utelle, that author will not help there, probably intentional block even
I don't think that  this change will be ever reverted

I have no idea for now which method will be the best and work stable and fast, but my imagination and experience tells me that forking SQLite is the worst possible idea.
Perfect solution should also do not require to touch amalgamation c oryginal files.

#17 Re: mORMot 1 » 10.4 sydney issues » 2020-06-05 17:58:06

@ab, test TestSQL3 worked, thanks,
sad news about troubles with encryption custom patch,
quick latest versions of sqlite was BIG mORMot advantage..

#18 Re: mORMot 1 » 10.4 sydney issues » 2020-06-05 13:22:55

ab wrote:

I don't have Sidney 10.4 and there is no community edition yet, so I can't investigate any further.
Do you mean TestSQL3 demo?

SQlite 3.32.2 is planned soon.
I waited for the latest 3.32.xxxx fixes - there are always last time minor fixes with SQlite3: the 3.xx.0 version is never the final. wink


Yes, TestSQL3 demo.
Correct about Sqlite minor version : )

#19 mORMot 1 » 10.4 sydney issues » 2020-06-05 10:32:23

Greg0r
Replies: 37

1. Sqlite demo does not work for me do not passes the tests on 10.4 See this: https://i.imgur.com/2SqXXmC.png
2. When update to Sqlite: 3.32.2 is planned ?

#20 Re: mORMot 1 » Revision 2.x of the framework » 2020-03-06 10:08:11

For all very old Delphi lovers:
Here something for you: https://winworldpc.com/product/delphi/1x

I suggest to you to use 1.0 why so "new" like 2007?
Mindset of all "1.0" lovers is just funny for me.

I'm staying strong that min version should be Tokyo (which is by the was the last edition officially supporting XP)
If you want to go little more compatible option: XE7 as minimum, absolute total min should be XE4.

Summary:
Go with Tokyo(best) or XE7 - that's all.
For absolutelty free - good Lazaurs/FPC is here.
For no/low income - free Embarcadero Community edition. Latest 10.3.3 for free.

Spending valuable time to save "1.0" users -  waste of time - and NO its NOT mORMot strength! It's exactly reverse -
this is sensless ballast and perfect stopper of develop(er)/mnet

For those who need very old, mormot 1.x is there - which support should be slowly dropped soon or max end of 2020.

ps. "1.0" - irreverent naming of very old D users.

#21 Re: mORMot 1 » Revision 2.x of the framework » 2020-03-04 16:29:28

1) Forget about older Delphi compilers
Minimum supported XE4 or XE7 (personally I would go with Tokyo 10.2 as minimum)
At least if possible forget all before XE4

Waste of energy to maintain very old or very buggy/outdated Delphis
This energy could be spend on development new things/improving current instead of patching vendor bugs.
Aside from the topic point:
I never understand moneygrubbers who create sell their software make money on it and the same cannot spend some bucks to support creators.
Ok, maybe EMB policy and quality is far far away from beeing good anyway c'mon spending money on new compiler once a 5 years should not be big pain.
Nobody telling that you should have sub and new twice or one per year.
For those who love to be free so much - yes please, you have Lazaurs and FPC - good luck.

Now there is even stonger argument for getting rid of Old Delphi - Emb offers FREE compilers for free low income usage.
This is another argument against supporting very old.

2) SQLite object compilation - re-check which compiler produces the fastest/most realiable(least buggy) obj code:
BCC5.5 vs XE7 vs RIO 10.3.3  vs MS C++ (with coff conversion)
http://rvelthuis.de/articles/articles-cobjs.html

3) Add Argon2id, Argon2, Bcrypt/Scrypt hashing/key der.

4) Add AES GCM mode cipher,

5) Implement native 7-zip compression LZMA2, beside current solutions, native without external dlls based on c objects.

#24 Re: mORMot 1 » Current time in miliseconds or more precise » 2020-03-02 09:38:25

@ab, thx
I'm after lecture of https://www.thedelphigeek.com/2007/10/c … urate.html
I did not imagined before how not accurate are std functions.

Solutions from your framework looks good.
Can you provide shortest simplest usage of your functions to get current time in XXXXXXXXXXXXX int64?
UnixMSTimeUTC() function and  TSynUniqueIdentifier/TSynUniqueIdentifierGenerator

#25 mORMot 1 » Current time in miliseconds or more precise » 2020-03-02 08:42:55

Greg0r
Replies: 6

Guys,

Can you help with making time based uuid(timestamp)?
Very quick comes to my mind curtime:=FloatToStr(Now);
But maybe there is something more precise? As result some Int64 will be good.
Maybe mORMot could help there?

#26 Re: mORMot 1 » SQLite Release 3.31.1 » 2020-02-18 21:36:06

Ok thank you for information.

#27 mORMot 1 » SQLite Release 3.31.1 » 2020-02-18 19:15:26

Greg0r
Replies: 2

Hi,

Can you please update to the latest minor release of SQLite object?

#28 Re: mORMot 1 » Delphi 64bit sqlite compilation » 2019-09-24 23:41:53

@Eugene Ilyin,

Nice addition anyway hmm strange for me works without this mod with D10.3.2 x64 under Win10x64 on .o included in .5378 as well in my own build of sqlite.o with bcc64 llvm

#29 Re: mORMot 1 » Delphi 64bit sqlite compilation » 2019-09-24 15:03:05

Quick test, No problem noticed with Delphi 10.3.2 will continue testing.

Using mORMot 1.18.5378
    TSQLite3LibraryStatic 3.29.0 with internal MM
Generated with: Delphi 10.3 Rio 64 bit compiler

Time elapsed for all tests: 1m01
Performed 2019-09-24 16:54:48 by Greg0r on DESKTOP-GR

As for noticed problems looks like .o from new compiler must be used with XE6+ without issues
Anyway great results and lot of Delphi's are covered assuming usage of both "normal" and newer llvm compiler.

#32 Re: mORMot 1 » Delphi 64bit sqlite compilation » 2019-09-23 14:24:03

Yes, indeed preety strange that there is no RAD studio community and problem with installing both at same time.
Do you think sharing files would work? I could pack installed folder od 10.3 free and share archive for "lend"/test.

#33 Re: mORMot 1 » Delphi 64bit sqlite compilation » 2019-09-21 12:54:19

Fantastic! Thank you so much..
1) Successfully build with bcc64 7.40 from 10.3 Community with warnings and without -6 switch
https://i.imgur.com/8d0jkGL.png
2) While build Delphi mormot sample and 64 bit .o build above, following errs:
[dcc64 Error] SynSQLite3Static.pas(1279): E2065 Unsatisfied forward or external declaration: '_FInf'
[dcc64 Error] SynSQLite3Static.pas(1279): E2065 Unsatisfied forward or external declaration: '_Log'
[dcc64 Fatal Error] TestSQL3.dpr(874): F2063 Could not compile used unit 'SynSQLite3Static.pas'

#34 Re: mORMot 1 » Delphi 64bit sqlite compilation » 2019-09-20 12:29:17

Please understand guys that it's not matter loving one or another but matter of business choices I like both FPC and Delphi the same.
Lack of full 64 bit support with static linking and encryption in SQLite is big pain in ass and makes such wonderful product like mormot little "retarded"

So if there is technical issue with object build let's open fund for @ab Arnaud and he will buy C++ builder compiler and make 64 bit version.

#35 Re: mORMot 1 » Delphi 64bit sqlite compilation » 2019-09-19 21:06:05

@ab what about vc++ express and coff/comm converter?

#36 Re: mORMot 1 » Download particular checkin » 2019-06-01 06:43:30

thanks all guys for answers
@Chaa, that's perfect exactly what I was looking for.

#37 mORMot 1 » Download particular checkin » 2019-05-31 13:00:46

Greg0r
Replies: 4

How to download easy and quick files from particular check-in for example as zip.
Sample URL: https://synopse.info/fossil/tree?ci=116c04d0eed0d176

#38 Re: mORMot 1 » LZMA/2 compression unit » 2019-04-04 09:59:39

I dont need browser support, just typical storage compressed data, LZMA fastest could be the best there

#39 Re: mORMot 1 » LZMA/2 compression unit » 2019-04-03 14:27:40

You all guys are right totally but I'm afraid my needs are different I post frequent ~100 kb Jsons with txt data
For me it make difference if server store 50 or 30% of oryginal size.
Also I have noticed that most of even programmers doesn't know about blazing fast LZMA in fastest method compression
I agree that in normal it unusable slow for server purposes.
LZMA normal and fastest are not comparable when comes to speed.
@mpv do you know any good component or way to compress json string with LZMA in Delphi (10.2, 10.3)

#40 Re: mORMot 1 » LZMA/2 compression unit » 2019-04-02 15:15:54

ab wrote:

IMHO LZMA is too slow at compressing data for communication, and it could be easily blocked by most proxies, since "Accept-Encoding: lzma" is not supported anywhere (but Opera browser?).

Sample txt UTF8 file:
Oryginal- 4280KB
LZMA - Fastest 273KB
ZIP - normal - 1291KB
Speed: Both very similar.
I don't see the reason to choose ZIP.
LZMA eats it in every aspect.

Does anyone know good way for strings data LZMA compression/decomp in Delphi?

#41 Re: mORMot 1 » LZMA/2 compression unit » 2019-04-01 17:36:10

@ab
For JSON txt data: Fast/fastest method it compress text much better than zip/gzip at similar speed or even faster.
(I have tested 7-zip)

#42 mORMot 1 » LZMA/2 compression unit » 2019-04-01 09:45:37

Greg0r
Replies: 10

Hi,

Can you add LZMA compression ?
Could anyone recommend solution without .dll ?
I want LZMA equivalent of

 CompressDeflate(data,true);

#44 mORMot 1 » How to change header properly in .c sources » 2019-03-09 15:12:40

Greg0r
Replies: 2

I need to change header and have question
I know change is needed also in .pas but wonder about c sources.
Is this enough to change
define SQLITE_FILE_HEADER "SQLite format 3"
in sqlite3.c?

I'm asking becasue
I have found hardcoded strings  with "SQLite format 3" in two places in shell.c

....
static int apndIsOrdinaryDatabaseFile(sqlite3_int64 sz, sqlite3_file *pFile){
  int rc;
  char zHdr[16];
  static const char aSqliteHdr[] = "SQLite format 3";
  if( sz<512 ) return 0;
  rc = pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), 0);
  if( rc ) return 0;
  return memcmp(zHdr, aSqliteHdr, sizeof(zHdr))==0;
}
.....

  n = fread(zBuf, 16, 1, f);
  if( n==1 && memcmp(zBuf, "SQLite format 3", 16)==0 ){
    fclose(f);
    return SHELL_OPEN_NORMAL;

#45 Re: mORMot 1 » 64 bit support for Delphi » 2019-01-30 18:50:18

emk wrote:

@Greg0r
Please don't be upset but sounds rude to me also.

@ab
Please grant @Greg0r wish and make us all happy. smile
Thank you.


Don't worry I'm not upset, If I sound bad, sorry then.

#46 Re: mORMot 1 » 64 bit support for Delphi » 2019-01-30 14:21:31

leus wrote:
Greg0r wrote:

Many people see for that and it's 2019, still not supported.
Please add.

I can see English is not your primary language, so here's a tip: your post is extremely rude.


Really, so today truth is called "rudeness"?
Maybe please read this 3 more times to see who is rude there - only you by calling me rude, moreover extremely rude.

I clearly asked about specific fact - 64 bit SQLite object for Delphi and I've got trivial response that's it's supported already.
@ab If by mistake, then pardon but again where you see something rude there?

Yes English is not my primary, but this does not change the case.

#47 Re: mORMot 1 » 64 bit support for Delphi » 2019-01-29 14:34:10

ab wrote:

There is 64 bit support for Delphi since almost the beginning.
https://gist.github.com/synopse/015a892 … 1d5df56c03

Windows 10 64bit (10.0.17134) (cp1252)
    4 x Intel(R) Core(TM) i7-3517U CPU @ 1.90GHz (x64)
Using mORMot 1.18.4949
    TSQLite3LibraryDynamic 3.26.0 with internal MM
Generated with: Delphi 10.3 Rio 64 bit compiler

Total assertions failed for all test suits:  0 / 41,734,045

No, it's not supported why you saying it's supported  ? hmm
I exactly pointed out static linking and bundled 64 bit sqlite C .obj files...
So I mean full mORMmot with Sqlite 64 bit included file.
I do not mean dynamically loaded sqlite libraries.
For example want to utilize fast AES asm optimized etc.
Many people see for that and it's 2019, still not supported.
Please add.

#48 mORMot 1 » 64 bit support for Delphi » 2019-01-29 11:19:26

Greg0r
Replies: 6

Thanks for great work on this superb framework.
Please add support for 64 bit support for Delphi, please understand that there are Delphi users there who love your framework.
64 bit support for Delphi should be natural upgrade (as far as I know it only supports FPC/Lazarus now)

As for building c++ object from sqlite sources, you can use Free Trial of C++ Builder, of course not to include it for all if that depends on fact if user has or don't have license for CPP Builder.
But possibility should be very welcome.
My app require to allocate much more memory than now.....32 bit limit to delphi is serious pain.
I don't want to link external sqlite libs etc, rather full features native pas + sqlite obj.

Board footer

Powered by FluxBB