You are not logged in.
@EMartin
The date of files SynRestVCL.pas and SynRestMidasVCl.pas is 10-04-2018. Is this correct?
Maybe mORMot can benefit of this "branch-free lomuto partition algorithm".
Sorting using the branchless Lomuto partition, however, is the clear winner by a large margin regardless of platform, backend, and input size.
Explanation and graphs
https://dlang.org/blog/2020/05/14/lomutos-comeback/
@ab
I noticed that your version of FastMM4-AVX, that comes with mORMot, have some IFDEFs and corrections.
Do you will send a patch to original FastMM4-AVX? There are any bugfixes needed for Delphi 7?
Testing BorlndMM.dll replacement compiled with D7 and FastMM4-AVX.
After replacing the DLL I have noticed:
- Compilation is faster.
- Delphi D7 IDE don't hangs anymore when using code completion and code helpers.
Edit: I was using the original (from 2002!) BorlndMM.dll due to a reinstall of Delphi and didn't remember to replace de DLL.
Yes, please, end of discussion. D7 works. D7 have components that I don't want buy again in new versions.
Reinstall components is hell.
Even today, Delphi can't work as a ruby bundle or rust crate, and I can't have a dependency list neither a place to download them.
Delphi 7:
20% + 1
I don't voted in this survey because I was in vacation.
I will only try the BorlndMM DLL with Delphi 7.
Thank you.
Thank you.
For years, all my programs .DPR always used this opening uses clause:
uses
FastMM4, FastCode, FastMove,
Windows, Forms,Reading mORMot examples, I found
// first line of uses clause must be {$I SynDprUses.inc}
uses
{$I SynDprUses.inc}
Forms,I did a comparision of mORMOt's version of FastMM4 and liked it. I will use the mORMot version.
But, what about FastCode and FastMove units? The optimizations of mORMot code will have better performance that the old FastCode, FastMove units? It's a drop-in replacement?
@ab
It's ready for use mORMot 2 as replacement?
I never used SynDB before, so I don't knew how to rename a column in a SQLite3 table using mORMot.
Maybe this can be useful for someone.
var
Props: TSQLDBSQLite3ConnectionProperties;
begin
Props := TSQLDBSQLite3ConnectionProperties.Create('my-db.sqlite','','','');
Props.ExecuteNoResult('alter table my_table rename column OLD_NAME to NEW_NAME',[]);
end;@ab what type of clients you write for DDD? Do you write desktop clients using Delphi with DDD approach?
I don't have tried yet.
Will this edition work well with mORMot?
I see now. Thank you.
Found a bug today. Using D7 and the current git version.
When parsing the string/CSV '-1,25,0' after a call to CSVToRawUTF8DynArray(), the CSV array will have only two elements: ('-1','25). The last element, '0' will be left out.
Code to reproduce:
procedure BugCSVToRawUTF8DynArray;
var
CSV: TRawUTF8DynArray;
begin
CSVToRawUTF8DynArray('-1,25,0', ',', #0, CSV);
Assert(Length(CSV) = 3);
end;We have a example of this?
I like very much the integration possiblities with webassembly
Pas2JS is a project with scope at UniGui level? I don't know nothing, will check today.
I have used reverse proxy with Apache and mORMot, worked well.
@EMartin you can get all needed files using git.
C:\> git pull
And it's done.
Yeah, SynCommons is a better place
Excellent solution, @ab.
Despite being Carnival here in Brazil, today I learned a little more.
@jaclas what font do you use in the IDE?
Yeah you need to recompile and redeploy both. That happened here too.
Hi !
Finally,I had changed my project's structure。
unigui app<->mormot app<->databaseTWinHttp(unigui app servermodule.pas) as httpclient。
THttpApiServer(mormot app) as httpserver。
TOleDBMSSQLConnectionProperties(mormot app) as database client( or manager)。
Mormot server is a different app? I have writed a couple of Unigui+mORMot, but was using mORMot server in the same application (sqlite3).
Please give us some screen shot of this
I think that this is a bug
About naming: Ruby uses Array.Compact() for this function.
I agree, very useful.
Change
DynArray(TypeInfo(TStudents),MyStudents).LoadFromStream(MStream_); // access violation
to
aDynArray(TypeInfo(TStudents),MyStudents).LoadFromStream(MStream_);
Great!
@ab
Please give more details about "Some meta-services are able to identify on which node a device is connected (using TSynBloomFilter)."
I have read your blog post about TSynBloomFilter, can you talk about a real world usage?
Many thanks
Oh thank you
@ab what you think?
That don't works for me. The @ab solution works.
ftDateTime: PDateTimeRec(Dest)^.DateTime := TimeStampToMSecs(TS);
^this works
Great! Trying now...
@ab
I have a function that does some data validation after reading a text file. All possible errors are added to a TDocVariant instance.
I need to display this error list on a sort of a grid or equivalent control [Delphi 7].
What is the best way, or the best shortcut, to make this happen?
The error list are like one array of [(ErrorCode, Int1, Int2, ErrorMsgStr)].
Thank you.
Excelent question.
@ab, I think that TSynRestDataSet should be added as a oficial class/component for mORMot. Esteban did a great job here.
These 'not a valid timestamp' erros are preventing me of updating mORMot. The last good commit, that don't give this errors, was 938ae78a5b5ecb464e8e0d7d8544ba3a9e09eb38 in january, 23.
Which error?
Yeah that works. Thank you.
Arnaud, what is the best approach to get keys and values from a TSynDictionary instance?
I have a dictionary where the keys are Double and the values are integers. My objective is get the count of integers by key. And I am using this:
My HugeList[] is a TDoubleDynArray:
D := TSynDictionary.Create(TypeInfo(TDoubleDynArray), TypeInfo(TIntegerDynArray));
try
for I := 0 to High(HugeList) do begin
if D.FindAndCopy(HugeList[I], N) then
N := N + 1
else
N := 1;
D.AddOrUpdate(HugeList[I], N);
end;
SetLength(Keys, D.Keys.Count); // get a copy of the keys <--- this works, but
D.Keys.Slice(Keys, D.Keys.Count);
SetLength(Counts, D.Values.Count); // get a copy of the values <--- there are a better way?
D.Values.Slice(Counts, D.Values.Count);
finally
D.Free;
end;Arnaud, if I declare a type to be used as a dictionary key in TSynDictionary:
TMyKey = record
A, B: Double;
end;
TMyKeyDynArray = array of TMyKey;and initialize a TSynDictionary instance as
D := TSynDictionary.Create(TypeInfo(TMyKeyDynArray), TypeInfo(TItensArray));in a loop, we add itens to dictionary:
K.A := SomeFuncionA;
K.B := SomeFuncionB;
if D.Exists(K) then { do something }
else D.Add(K, SomeItem);In the second pass of loop, I get a AV when call D.Exists().
Works when I change the key type to be a RawUTF8 or a variant.
This is by design?
For me, the last good mORMot commit is 938ae78a5b5ecb464e8e0d7d8544ba3a9e09eb38, january, 23. Every commit after that raises '0.4<something> is not valid timestamp'.
What version of mORMot are you using?
I will provide a test case.
The exception still raising in the function TSynVirtualDataSet.GetFieldData().