Jump to content

Dave Novo

Members
  • Content Count

    135
  • Joined

  • Last visited

  • Days Won

    1

Dave Novo last won the day on March 12 2021

Dave Novo had the most liked content!

Community Reputation

51 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Dave Novo

    Parallelize Regex

    Parallelizing works well if you can break your overall job into multiple independent tasks, and each task can operate independently of the results of the other task. If the tasks depend on each other in any way, it becomes quite complex quite quickly, generally having to introduce locking and communication mechanisms. In the case of RegEx parsing, how would you break your overall search into multiple independent searches. I dont see an easy way to do this. Each match depends on the results of previous matches. I am not saying it cannot be done, someone might have thought of something extremely clever, but its going to be complicated I think.
  2. Dave Novo

    Simulate Multiple Inheritance

    The other thing I would suggest is to have a look at the "implements" keyword. Please consider the code below as pseudocode ICommonFuncs=Interface procedure CommonProc; end TCommonObj=class(TInterfacedObject,ICommonFunc) procedure CommonProc end TapRectangle=class(TRectangle, ICommonFunc) private FCommonObj:ICommonFunc function GetCommonFuncImp:TICommonFunc; public constructor Create; property CommonFuncImpl:ICommonFunc read GetCommonFuncImpl implements ICommonFunc; end constructor TapRectangle.Create; begin FCommonObj:=TCommonObj.Create as ICommonFunc; end The idea here is that the functionality needed for ICommonFunc is actually implemented by a separate object. When you query the ICommonFunc interface from TRectangle you get it from FCommobObj. You can then easily add the same functionality to TCircle in the same way. In general, FCommonObj may need some way to talk back to its owning object to get some specific information. This is helpful if the methods FCommonObj/ICommonFunc follow a template patter where most of the code is in TCommonObj but there is some specific information needed from TRectangle or TCircle.
  3. Dave Novo

    Minimum Viable Product (MVP)

    I agree with Anders. This question is impossible to answer. An MVP for a "Sale Management and POS software" for one group of products is completely different than from another group of products. i.e. an MVP for selling gumballs is a totally different ballgame from an MVP for a product cars. If deciding an MVP is so simple that you can create one from asking a 1 sentence question to a group of people who know nothing about what you are doing then there would be no need for any domain experts for anything in software development.
  4. Dave Novo

    Parallel.For optimization

    There is also FastMM5. However, I would suggest looking at your code and figuring out a way to allocate required memory (even if you have to overallocate) and minimize/eliminate heap memory allocations during the threading code.
  5. Dave Novo

    TeeChart 11.3 to 12.1

    They did a bunch of work recently to autoscale fonts based on the DPI. There is are some new enums to control this TCanvasZoomText=(ztManual, ztNo, ztAuto); TCanvasZoomPen=(zpManual, zpNo, zpAuto);
  6. Dave Novo

    Docking Example

    Hello all, If you go to the Delphi help Docking (Delphi) - RAD Studio Code Examples (embarcadero.com) You see if refers to a "docking demo". The general help for the built is docking is woefully inadequate. If you go to RAD Studio Code Examples (embarcadero.com) You find that the code examples are supposed to be at Embarcadero Technologies · GitHub or GitHub - Embarcadero/RADStudio11Demos: Delphi and C++Builder Demos for Embarcadero RAD Studio version 11 I cannot find a docking demo in either location. Has this been removed from the demos? Or am I just going crazy and its really there. Searching the github for the work "dock" and also cloning the repo and searching for "dock" does not turn up any files
  7. Hello, Is there an example of how TPropertyChangedEventArgs and associated infrastructure is supposed to be used? I am hoping there is some magic somehow where I can get a notification that a property changed on a class, without having to modify the source of that class to throw an event. Not sure how this would be done, magic code hooks, VMT hijacking or some other craziness. But when I see some of the magic in Spring4D, I can believe that almost anything is possible 🙂
  8. I never meant to imply that it was unnecessary. In fact, I already applied your excellent code to my own code that was writing out CSV files from large 2D matrices of integers. I was just wondering if there was a wider variety of circumstances that I could also leverage this technique that I was not thinking of. In fact, I also have to write out large matrices of floating point values, so will try to modify the Delphi float conversion routines to work on array of char similar to what you proposed below. TBH though, I have not done much timing. I wonder if the overhead of writing the file to disk dwarfs the time it takes for the conversions.
  9. I am trying to understand when this stack based allocation can practically help, because it seems to me that for the most part, you usually are going to have to do something with this array of char, and inevitably transform it to a string which will do some heap allocation and copy the stack data. The one thing that pops to my head is if saving a large number of integers to a file (as strings of course), when you can write to the file directly from the char buffer allocated on the stack. Then you avoid any heap allocation for a large number of conversions. Are there many other circumstances where you can avoid the eventual conversion to a heap allocated string and reap the benefits of the stack based memory allocation? It seems limited to areas where you are doing large numbers of IntToStr and only need to keep the string value within the local method within the loop.
  10. Dave Novo

    Intel Simd-sort library

    Correct, we sort arrays of integers and floats all the time. Both double and single. And have to process these millions of values as well. By "process" I mean perform mathematical operations on them. For us the Dew Research library mtxVec has proven invaluable.
  11. Dave Novo

    Intel Simd-sort library

    We write software that does scientific data analysis. We regularly have to sort arrays of millions of elements of data. But I recognize we are in the minority of developers.
  12. If all threads are fully utilizing the CPU you will more than likely cause slowdowns. The CPU will force one thread to stop, have to push its stack and pop the stack of the new thread, etc etc. As indicated above, for any process where each thread is waiting a lot (not just IO but really anything) you can happily create as many threads as you like (within reason).
  13. Dave Novo

    How to remember tests in VCL GUI Logger

    I figured it out. You have to close the TestRunner Gui properly. Since my test was failing (i.e. crashing) the GuiRunner never closed properly because I stopped running the program after the crash. I had expected that the Guirunner would save the selected tests prior to the test run started.
  14. Dave Novo

    TestInsight dissapeared

    Hello, Does anyone have any idea why my TestInsight could have dissapeared. I do not see it in the View menu, nor can I right click on a project and make it a "test insight" application (ie it just adds the TESTINSIGHT compiler directive". I have uninstalled/reinstalled testinsight 3x already. I am using version 1.2.0.0 that I just installed.
  15. I am a newbie to DunitX so this may be a dumb question. If I select some tests to run in the VCL GUI logger, they run fine. When I recompile my app, all the tests are selected again, even though previously I only selected one. Is there a way to have the VCL GUI logger remember my previous selections so I dont have to keep selecting the same things?
×