Jump to content

Mike Torrettinni

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Mike Torrettinni

  1. I was sure I got rid of all Goto usage in my code. But I found this example today : for i := 0 to Length(vArray) - 1 do begin if vArray[i].SkipThisLine then goto labelSkipThisLine; ... ... labelSkipThisLine: // no code, do nothing with this data line end; This is probably close to 20 years old code, and never failed! I almost want to leave it there, just as a reminder it took me almost 20 years to get past the beginner level 🙂
  2. Looking for some input on successful and non-successful migration from Delphi to .Net, why yes and why no, what to look for and what to avoid. I'm seriously considering porting my projects from Delphi to .Net. I'm not an expert in .Net so this would be also learn as I go. I have fairly simple projects, no db access, no relying on complex UI controls or using any framework that would prevent me to migrate because nothing like that exists in Visual studio. I use a lot of VirtualTreeView control which is just probably find comparable .Net control that fits and use that. I don't see a problem with that. I found this presentation https://www.slideshare.net/SergeyPilko/migration-of-legacy-delphi-projects-to-net-framework-desktop-web-mobile and 2 interesting slides: And I guess the UI in failed case was too complex and wasn't adapted to .Net controls. Not interested in automatic converters, I will do all the coding myself. I have no time limit on this. Any input on this topic is more than welcome!
  3. Mike Torrettinni

    Simple debugger bug in 11.1

    Happy to report this is fixed in 12.0 debugger!
  4. Mike Torrettinni

    Simple debugger bug in 11.1

    Delphi 11.1, no patch 1 installed, yet. Can someone confirm they get same/similar debugger bug in this example code: uses System.StrUtils; procedure TForm1.Button2Click(Sender: TObject); var vPos1, vPos2: Integer; vLine, s: string; begin vLine :='testingcompiler'; vPos1 := 5; vPos2 := 7; s := MidStr(vLine, vPos1 + 1, vPos2 - vPos1 - 1); <-- Park cursor here and copp MidStr call to debugger end; Run and park on MidStr() call and copy the expression to debugger. I get an error F2084 Internal error... instead of 'n' in watch value: I really hope is just my copy and perhaps reinstall or patch 1 solves this. No problems with this code in 10.2.3
  5. Mike Torrettinni

    Delphi 11.3 : FORSAKEN

    I agree with your conclusions and as said above, it's been the same with small improvements for years, so I just accepted it. I use these 'tricks' on a daily basis and consider them as part of development workflow: - highlighting words fails when code is folded, so I unfold all the code in unit I work on - use Kill task to kill LSP multiple times a day (https://stackoverflow.com/questions/74164165/is-there-a-way-to-setup-a-shortcut-to-re-run-the-delphi-lsp-instances) - when IDE starts acting up (bookmarks behaving strangely, watch window shows odd values, debugger hangs or slows down...) - restart IDE - search will likely start with Whole words checked, so check the status of Whole words regularly - 64 bit debugger requires special attention, so handle with care and don't be impatient and probably some more that I can't remember right now...
  6. Mike Torrettinni

    Coming soon

    THtSQL* and TSQL* are your components?
  7. Mike Torrettinni

    Coming soon

    Looks good, and short description would be good, too. I'm trying to figure out if anything can be used for my projects or some of my clients. Is this SQL highlighting control? Will you have dedicated SQL stuff page on your website? I see the SQL framework pdf, but I'm trying to understand how HTML library, HTML editor, Office controls fit with SQL stuff.
  8. Mike Torrettinni

    Unit dependency viwer

    Nice! I showed this to another developer who is looking for simple drawing control that would do all this. Not for Delphi source dependencies, but custom relationship data and it would simplify his current very cumbersome drawing solution that achieves similar result - I helped with some small improvements, but I'm not expert in drawings. He is excited to try your control when this is implemented.
  9. Mike Torrettinni

    Unit dependency viwer

    Great! Any timeline? I don't have the library, yet, so I don't know how controllable the HTML control is, but will this be possible: - custom Context menu on selected unit? - select and add Context menu on dependency line? - select multiple units? and get info on all selected units? - control drawing objects, bg color, font, size? - control selection from code, not just mouse?
  10. Mike Torrettinni

    Unit dependency viwer

    Can you share what is the plan for this tool/feature? - Shareware? - or can users of HTML Component Library access source and implement the view in our projects? - or integrate into GExperts or MMX?
  11. Mike Torrettinni

    Unit dependency viwer

    A filtering option would be nice: hide/filter out System*, Vcl* dx*... units. Most of the time I don't need to see these dependencies.
  12. Mike Torrettinni

    Unit dependency viwer

    Thanks! Better version, but I still get error on not finding a .pas file and it seems it stops and doesn't show anything. Can you make it skip missing .pas files and make it work with what it can access? Some units only have compiled .dcu accessible, not pas files.
  13. Mike Torrettinni

    Unit dependency viwer

    So, this will not work with any projects that we have source code, but was not compiled with for current installed Delphi? Older projects, not migrated projects, open source projects from github that are downloaded but not compiled, yet (so Library path is not updated)...
  14. Mike Torrettinni

    Unit dependency viwer

    Video looks very promising! I get same or similar error messages as above, so let us know when you publish fix or perhaps change version number in original .rar file, so we know it's newer. Is it possible to make it work without dependency on Delphi installation? I don't have Delphi development started all the time, while source code is always accessible.
  15. I'm using Delphi 10.2.3 and waiting for 10.5 release. I have a few test cases that measure performance of some common used functions and I want to know if performance in 10.5 will degrade, 32 and 64bit version. I never install 2 versions at the same time - this means I can't just run both versions and compare results, so when 10.5 is released I will uninstall 10.2.3 and just have 10.5 installed. So, I was thinking to create all performance tests executable with 10.2.3, and when 10.5 is released I can run old test executable and new 10.5 compiled code and compare timing results. Is there any other, easier way to do this?
  16. Mike Torrettinni

    How many people use Delphi?

    In some way it would make sense that Delphi developer's salary would go up, due to lack of developers, but I guess lack of demand keeps it pretty low, compared to C#: https://www.ziprecruiter.com/Salaries/Delphi-Programmer-Salary https://www.ziprecruiter.com/Salaries/C-Net-Developer-Salary
  17. Mike Torrettinni

    Delphi 11.3 is available now!

    Pretty annoying! I like word highlighting so I just unfolded all, for now.
  18. Mike Torrettinni

    Migrating projects from Delphi to .Net

    Interesting. I see they even went a little further and you can deploy your app without the need for making sure the OS has the right framework installed:
  19. Mike Torrettinni

    Migrating projects from Delphi to .Net

    The way remote work is changing the whole software employment opportunities, I'm realizing being an expert is becoming a niche and not a must. And since I'm not a Delphi expert, after 20+ years, I can freely let go an illusion that I can become one at some point, or that this is a prerequisite for a job. So, it seems one way to get to a good remote work salary opportunities, is to develop something and sell it. And as my projects are Windows apps, C# seemed like a natural step in the right direction.
  20. Mike Torrettinni

    Migrating projects from Delphi to .Net

    Thanks, but the main idea is to migrate and learn on the go, so quick conversion is not what I'm looking for. Actually, at the end, they should not notice the difference between a solution written in Delphi or C#, except of course for the gazillion dlls being installed instead of 1 exe 🙂 .
  21. Mike Torrettinni

    Migrating projects from Delphi to .Net

    Yes, I guess this is more accurate. Shame, but the more I think about this, the more I realize none of the cool, smooth, flicker free UI elements were never really commented from my users - the sale would happen even without carefully designed and customized views. Starting again, I don't see any reason to focus on more than 'as long as it doesn't look like it's from 1999, is almost good enough, with a few exceptions'.
  22. I'm refactoring usage of various different look-up tables and I'm trying to come with 1 fast look-up table design. Most of them have 1 thing in common: search by integer (ID) and search by string (Name). All data is sorted. So, I bench-marked TArray.BinarySearch, TDictionary and custom binary search. Even though a flaw in design was pointed out for TArray.BinarySearch, (see https://en.delphipraxis.net/topic/4575-why-is-tarraybinarysearch-slower-than-normal-binary-search-function/), I still wanted to compare results: For search by integer, custom binary search seems to be a little faster than TDictionary, until large tables: For search by string, custom binary search wins even more, still for not large tables: Interesting is that for smaller searches, 10 records, a sequential search is faster than TDictionary. I also tried TGpStringHash (by Primoz Gabrielcic), which is very fast, but unfortunately no implementation for integers. TSynDictionary (from mORMot) is also very fast, but I don't use mORMotand license is not friendly for my commercial project. Is there any other fast search implementations that is not too specialized and ready to use out of the box, that I can try?
  23. Mike Torrettinni

    Does anyone know if Nils Haeck is OK ? SimLib and NativeXml

    No complaints on OXML, very fast but I don't use any special CDATA stuff or Schema related stuff, so basic read/write access. The sax event access was a little to get used to it, but I never used it before, so I have no idea if it's using standard sax events approach or it's own implementation. Works good. And support is good, too! I moved from NativeXML to OXML most of my projects, except 1 and not regretting it.
  24. Mike Torrettinni

    Dynamic Arrays not working

    If you want to initialize const then, I think, it has to be a constant expressions, so dip can't be dynamic array. So, something like this: type def_dip_value=record dip_val:word; dip_name:string; end; tdef_dip=record mask:word; name:string; number:byte; dip:array [0..1] of def_dip_value; // if you want to initialize as const expression end; const my_dip:array [0..1] of tdef_dip=( (mask:$f;name:'name1';number:16;dip:((dip_val:$2;dip_name:'name1'),(dip_val:$5;dip_name:'name2'))), // NO SQUARE BRACKETS! (mask:$10;name:'name2';number:2;dip:((dip_val:$10;dip_name:'name3'),(dip_val:$0;dip_name:'name4'))) // NO SQUARE BRACKETS! ); Try and see if this helps.
  25. Mike Torrettinni

    The software industry has moved to the Web, why?

    For me it's surprising that after so much time, most of the online solutions are quickly sluggish and awkward to use compared to desktop solutions. And don't let warez-king bother you about your posts, I find them always interesting to read.