Jump to content

darnocian

Members
  • Content Count

    133
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by darnocian

  1. darnocian

    ANN: Sempare Template Engine for Delphi

    I just looked at the tests... mostly testing with #$A. 😉 But made a test to replicate the issue.
  2. darnocian

    ANN: Sempare Template Engine for Delphi

    Thanks for the report. Could you please raise the issues on https://github.com/sempare/sempare-delphi-template-engine/issues I'll check it out. A double #$D would not be ideal. The #$A is more easily noticeable, but most of the stuff I used was HTML where this would have been ignored.
  3. Performance wise 100% agree with you David. It was more an example to check it out initialisation in case that was an issue.
  4. I realise this is an old post... The other thing - usually with COM, you need to CoInitialize() in each thread, and if you are a nice citizen, CoUninitialize(). To coordinate shutdown, you may also want to look at TCountdownEvent from System.SyncObjs. TCountdownEvent waits for a counter to reach zero. A signal in a thread would trigger the countdown. Could do something like (sorry, I automatically referenced TTask.Run rather than Parallel.Async) // This is pseudocode, so might not be 100% accurate with params var event := TCountdownEvent.Create(); event.AddCount(length(workList)); for var work in workList do begin TTask.Run(procedure begin CoInitialize(); try process(work); finally CoUninitalize(); event.signal(); end; end; end; event.WaitFor(INFINITE); With the above code, if run from a UI would still block, so that should also be threaded if the UI is meant to remain responsive.
  5. darnocian

    ANN: Sempare Template Engine for Delphi

    A new version (v1.3.1) is available on github with bug fixes (https://github.com/sempare/sempare-delphi-template-engine) Hope to have the update in getit shortly too.
  6. darnocian

    ANN: Sempare Template Engine for Delphi

    It is now available via GetIt as well
  7. darnocian

    Accessing the memory of a Python List

    FYI. I recall that you can reference the base ptr on the underlying PyArray. Definitely coming from unmanaged code, you want to try avoid copying if you can. C++ Boost does it quite nicely actually. I last bridged the c++ / python route a number of years ago, so with delphi it will be possible. https://www.boost.org/doc/libs/1_64_0/libs/python/doc/html/numpy/tutorial/ndarray.html https://github.com/boostorg/python/blob/develop/src/numpy/ndarray.cpp inside there is from_data_impl which I think should also be an interesting reference.
  8. darnocian

    No C/S FireDac for Delphi Professional

    I was very disappointed too. It seems like they are trying to force people to upgrade. Requesting pricing won't help - I've done it twice already - they simply state it is no longer available. I appreciate it takes some time to manage packages, but is it really worth upsetting users that have been buying the product? Anyways, alternatives are available, even other programming environments were connecting to a database is not 'an enterprise feature' and is free...
×