#51 Re: mORMot 1 » Contribution: TSynRestDataset » 2020-05-17 17:42:33

@EMartin

The date of files SynRestVCL.pas and SynRestMidasVCl.pas is 10-04-2018. Is this correct?

#52 mORMot 1 » Can mORMot's quicksort benefits of a different pivot algorithm? » 2020-05-15 13:15:26

Junior/RO
Replies: 0

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/

#53 Re: Low level and performance » BorlndMM.dll compiled with FastMM4-AVX » 2020-05-08 17:21:26

@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?

#54 Low level and performance » BorlndMM.dll compiled with FastMM4-AVX » 2020-05-08 17:18:59

Junior/RO
Replies: 1

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.

#55 Re: mORMot 1 » Fast MM5 » 2020-05-05 17:54:55

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.

#56 Re: mORMot 1 » Fast MM5 » 2020-05-02 17:41:12

Delphi 7:

20% + 1

I don't voted in this survey because I was in vacation.

#57 Re: mORMot 1 » Fast MM5 » 2020-05-01 13:07:30

I will only try the BorlndMM DLL with Delphi 7.

#60 mORMot 1 » Using SynDprUses.inc » 2020-04-22 11:19:40

Junior/RO
Replies: 9

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?

#62 mORMot 1 » Rename a column with mORMot » 2020-04-07 13:53:39

Junior/RO
Replies: 28

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;

#63 Re: mORMot 1 » TSQLModel with custom data (JSON encoded) » 2018-07-26 08:51:24

@ab what type of clients you write for DDD? Do you write desktop clients using Delphi with DDD approach?

#66 mORMot 1 » Bug in CSVToRawUTF8DynArray » 2018-06-08 16:58:18

Junior/RO
Replies: 2

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;

#68 Re: mORMot 1 » Smart Mobile Studio supported or not?? » 2018-05-02 15:22:57

I like very much the integration possiblities with webassembly

#69 Re: mORMot 1 » Smart Mobile Studio supported or not?? » 2018-05-01 17:41:32

Pas2JS is a project with scope at UniGui level? I don't know nothing, will check today.

#70 Re: mORMot 1 » Mormot Production Mode » 2018-04-25 18:42:12

I have used reverse proxy with Apache and mORMot, worked well.

#71 Re: mORMot 1 » Errors compiling SynSQLite3Static.pas in commit 4482 » 2018-03-28 13:32:44

@EMartin you can get all needed files using git.

C:\> git pull

And it's done.

#72 Re: mORMot 1 » Pattern match failed » 2018-02-24 18:19:32

Yeah, SynCommons is a better place

#73 Re: mORMot 1 » Change type field » 2018-02-13 16:42:26

Excellent solution, @ab.

Despite being Carnival here in Brazil, today I learned a little more.

#75 Re: mORMot 1 » Client-server contract incompatibilty » 2018-02-06 19:24:25

Yeah you need to recompile and redeploy both. That happened here too.

#76 Re: mORMot 1 » [Problem] Implementation conn pool in unigui ? » 2018-01-27 17:05:44

zhyhero wrote:

Hi !

Finally,I had changed my project's structure。
unigui app<->mormot app<->database

TWinHttp(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).

#77 Re: mORMot 1 » SELECT return error data » 2018-01-09 20:09:49

Please give us some screen shot of this

#79 Re: mORMot 1 » Use of TObjectDynArrayWrapper and compact the wrapper array... » 2017-11-23 15:30:07

About naming: Ruby uses Array.Compact() for this function.

#81 Re: mORMot 1 » TDynArrayHashed:Trouble with loading file saved file... » 2017-09-11 20:41:44

Change

  DynArray(TypeInfo(TStudents),MyStudents).LoadFromStream(MStream_); // access violation

to

aDynArray(TypeInfo(TStudents),MyStudents).LoadFromStream(MStream_);

#83 Re: mORMot 1 » About Big Data Support » 2017-09-01 15:14:49

@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?

#87 Re: mORMot 1 » Fix to timestamp bug regression » 2017-04-30 22:38:10

That don't works for me. The @ab solution works.

ftDateTime: PDateTimeRec(Dest)^.DateTime := TimeStampToMSecs(TS);

^this works

#89 mORMot 1 » Best way to display a list of informations in a TDocVariant » 2017-04-25 17:53:25

Junior/RO
Replies: 2

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

#91 Re: mORMot 1 » Migrating big client-server (2 tier) application to mORMot » 2017-04-04 19:45:21

@ab, I think that TSynRestDataSet should be added as a oficial class/component for mORMot. Esteban did a great job here.

#92 Re: mORMot 1 » Json to DataSet is error, 0.0 is not a valid timestamp » 2017-04-01 13:02:15

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.

#95 mORMot 1 » TSynDictionary: keys and values » 2017-03-13 14:06:11

Junior/RO
Replies: 2

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;

#96 mORMot 1 » TSynDictionary type of keys? » 2017-03-11 16:09:48

Junior/RO
Replies: 1

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?

#97 Re: mORMot 1 » '0.42793' is not a valid timestamp » 2017-03-09 18:16:23

For me, the last good mORMot commit is 938ae78a5b5ecb464e8e0d7d8544ba3a9e09eb38, january, 23. Every commit after that raises '0.4<something> is not valid timestamp'.

#98 Re: mORMot 1 » '0.42793' is not a valid timestamp » 2017-03-09 18:11:57

What version of mORMot are you using?

#100 Re: mORMot 1 » git bisect: 4b1ef819c6f1d76801be is the first bad commit » 2017-02-15 00:03:42

The exception still raising in the function TSynVirtualDataSet.GetFieldData().

Board footer

Powered by FluxBB