You are not logged in.
Pages: 1
Hello,
is there any working example how to search for user in AD using mORMot2? (meanmormot.net.ldap.pas unit)
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
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;
ps. I know it's perhapns not the safest AES implmentation but it's more than enough for my purposes.
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());
}
have you got technical possibility to report issue to EMB?
So (maybe) there is a chance to make real full support in 11.1...
this time I increased size of output Messages window for wider picture:
https://i.imgur.com/djjKPQ7.png
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
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'
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..
it's old now, 3.35.4 on the way ☺
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
@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
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
@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.
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.
@ab, test TestSQL3 worked, thanks,
sad news about troubles with encryption custom patch,
quick latest versions of sqlite was BIG mORMot advantage..
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.
Yes, TestSQL3 demo.
Correct about Sqlite minor version : )
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 ?
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.
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.
Thank you
@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
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?
Ok thank you for information.
Hi,
Can you please update to the latest minor release of SQLite object?
@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
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.
Ok thank you
@ab, check msg
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.
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'
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.
@ab what about vc++ express and coff/comm converter?
thanks all guys for answers
@Chaa, that's perfect exactly what I was looking for.
How to download easy and quick files from particular check-in for example as zip.
Sample URL: https://synopse.info/fossil/tree?ci=116c04d0eed0d176
I dont need browser support, just typical storage compressed data, LZMA fastest could be the best there
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)
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?
@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)
Hi,
Can you add LZMA compression ?
Could anyone recommend solution without .dll ?
I want LZMA equivalent of
CompressDeflate(data,true);
Thanks
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;
@Greg0r
Please don't be upset but sounds rude to me also.@ab
Please grant @Greg0r wish and make us all happy.
Thank you.
Don't worry I'm not upset, If I sound bad, sorry then.
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.
There is 64 bit support for Delphi since almost the beginning.
https://gist.github.com/synopse/015a892 … 1d5df56c03Windows 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 ?
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.
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.
Pages: 1