Mike Torrettinni
Members-
Content Count
1509 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Mike Torrettinni
-
Micro optimization: IN vs OR vs CASE
Mike Torrettinni replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Something like this, right?: const cControlsRec: TControlsRec = (EditID: 1; ButtonID:2; CheckID: 3; FormID:4; FrameID:5; ListBoxID:6; PageControlID:7; TabControlID:8; RadioBtnID:9; ComboBoxID:10 ); When I use const cControlsRec, the difference is not that big and @SetElem is called anyway non-const: const: You can see my asm code is quite different than yours. Is it possible because of Delphi versions? I still use 10.2.3. -
Micro optimization: IN vs OR vs CASE
Mike Torrettinni replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
@Stefan Glienke I got a little 'nudge' that my reply above was rude and seems inconsiderate to your help in the past. I hope you didn't read it that way. I took your comment as if my benchmark was waste of time, but re-reading it, I see what you meant. Anyway, I think I was always appreciative to your help and expressed it in past topics. Don't feel like you need to help me in every topic, I have no problem getting no comments on my benchmarks, I take it as "nothing big is wrong with it" or "it's so wrong, it would take me too long to explain", I welcome both options, because they mean either I did something right or I'm slowly getting there. The 64bit projects will go through a lot of benchmarks, so I will probably post more observations like this one, so be on the lookout for something that peeks your interest, I will not be offended if you skip the rest. Also, come on, you can't say that Moe, Larry and Curly's reprisal of 'First!' comment wasn't worth at least a little chuckle at my expense... I know I did, he he. -
Micro optimization: IN vs OR vs CASE
Mike Torrettinni replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
I recently reached the age bracket that many would probably consider 'unteachable', so it's not on purpose. I was away from Delphi for a couple of months and now preparing projects for 64bit, so it's fun to do some benchmarking again. If I can make some good progress, like in this case reducing some process runtime by half a second, even better. This process is part of search feature, so user interaction feature, and any speed improvement is very useful because users notice them very quickly. -
Strange Benchmark Results; Am I Missing Something?
Mike Torrettinni replied to Joseph MItzen's topic in I made this
Interesting to know other compilers can parallelize a simple loop. I thought you need to split and parallelize manually, like Delphi. Can you imagine Delphi had a flag: parallel=True and does everything for you. I guess Numba developers saw TTask, TThread, OmniThreadLibrary... and just decided to implement a simple flag. Nice! -
Why Tokyo? Alexandria's been out for months.
-
Pleasantly surprised the Alexandria page has been working for the last few days! Good progress! π€ΈββοΈ
-
It's the same for me, some settings you use so rarely it's easy to forget. The reason I know this one is because I'm making my projects ready for 64bit and did a few test installations recently and making sure 64bit is available platform.
-
If you don't have it listed under Target Platforms: Try right-click on Target Platforms and Add Platform and choose 64bit:
-
Delphi 11.1 is available
Mike Torrettinni replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
It worked for me, I just selected a delphipraxis.png logo file: I don't know who thought that awful bg color looks good. -
Does anyone know if Nils Haeck is OK ? SimLib and NativeXml
Mike Torrettinni replied to Blavatsky's topic in VCL
I just compiled one of my projects on D11.1 and it uses NativeXML. I used to use it a lot, then replaced with OXML, but still keep NativeXML around just for a few tasks. -
Yes, perhaps this thread and us being vocal with our keyboards helped move things along! Let's hope the momentum is kept until every page works.
-
Great! Just a little something they still need to do: [5e9d67bd4958162e561dcaf6] /CodeExamples/Alexandria/en/Main_Page Wikimedia\Rdbms\DBQueryError from line 1457 of /var/www/html/shared/BaseWiki31/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: SELECT lc_value FROM `cde_alexandria_en_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'deps' LIMIT 1 Function: LCStoreDB::get Error: 1146 Table 'wikidb.cde_alexandria_en_l10n_cache' doesn't exist (10.50.1.120)
-
until 11.1.
-
I guess it's all business as usual, they are improving it: So, no more complaining, let's give them time to finish it.
-
Every now and then I notice that SourceTree seems to detect as if the whole .dproj file is changed: ... and all red lines until line 499, the limit to what it shows. If I use External diff option, the Beyond Compare finds just 2 lines of change: I will report to JIRA, but since it's freeware I doubt any useful help will be provided. I'm curios if anybody else noticed this anomaly and found a solution. Could it be 10.2.3 IDE is causing some odd issue that triggers how SourceTree handles this file, while BeyondCompare handles it correctly?
-
I assume they would care very much as soon as one (or a few) of the big customers would say to fix it before they pay their yearly fee. Eh, no big bucks in community itself. Probably many of you guys who are part of bigger teams (2 developers and up π ) can say that rarely the whole team cares about stuff like that. 100% of my team is not happy about stuff like that is not shy about voicing it. But, my team is just me. If one of the bigger teams would voice dissatisfaction to their bosses, as a whole team, perhaps they can move some stuff.
-
DPROJ changes: SourceTree vs Beyond Compare
Mike Torrettinni replied to Mike Torrettinni's topic in General Help
Yes, I had a feeling it could be something like that. Their SourceTree support site doesn't give too much confidence: https://community.atlassian.com/t5/Sourcetree/ct-p/sourcetree Luckily, it was mistake on my side not realizing the option to ignore whitespace was switched on, in Beyopnd Compare, so nothing to report to JIRA. -
DPROJ changes: SourceTree vs Beyond Compare
Mike Torrettinni replied to Mike Torrettinni's topic in General Help
It could be some relic from older versions (the project went from D7 -> D2006 -> D2009 -> a few XEs -> 10.2.3), and I've been using 10.2.3 for years now with this project, and the change I showed above occurred in today's commit. -
DPROJ changes: SourceTree vs Beyond Compare
Mike Torrettinni replied to Mike Torrettinni's topic in General Help
That was it! I had an option to hide whitespace difference. Here is without this option enabled: I checked the other .dproj files and with new project and actually double (4 char) indentation seems to be normal, so every now and then I get a version with single (2 char) indentation. -
Analyze strings for common parts
Mike Torrettinni posted a topic in Algorithms, Data Structures and Class Design
I'm analyzing a log file full of sql scripts of I'm trying to come up with a some sort of summary view that would show what kind of scripts are in the log. A simple example: select fname, lname, city, zip, taxcategory, taxowed from taxcustomers where taxcategory = 'TXX-01' and taxowed>0 select fname, lname, city, zip, taxcategory, taxowed from taxcustomers where taxcategory = 'NL-xxxx' and taxowed>500 and 100s+ of same scripts with different values in taxcategory and taxowed fields. So, I would like to end with something like this: SQL script: select fname, lname, city, zip, taxcategory, taxowed from taxcustomers where taxcategory = '?' and taxowed>? Column: taxcategory, values: ['TXX-01', 'NL-xxxx' , ... ] Column: taxowed, values: [0, 500 , ... ] Any suggestions how to approach this? Any such string utilities already exist, commercial perhaps? -
Analyze strings for common parts
Mike Torrettinni replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Actually it seems I could use regex at the end. I managed to find diff between 2 scripts and get results like this: Common[0] = select fname, lname, city, zip, taxcategory, taxowed from taxcustomers where taxcategory = ' Common[1] = ' and taxowed> then I can define regex like this: (?<=Common[0]).*?(?=Common[1]) and will extract all taxcategory values from all scripts, so: ['TXX-01', 'NL-xxxx' , ... ] I just need to then extract after Common[1], but I don't have correct regex script, yet. But using regex gets a lot more complicated with more than 2 Common parts in same script. -
If this is the case, this looks more and more like international failure π
-
Analyze strings for common parts
Mike Torrettinni replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Log viewer, not diff viewer. I wish it was this simple π -
Analyze strings for common parts
Mike Torrettinni replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
They can't control the content of the log. It's some type of an audit log that sometimes contain info on critical accounts, errors... and I offered to provide a viewer that would make sense and be useful to them. It depends on date range, but there could be single or multiple log files, each containing from 10s to 1000s of scripts. So, I need to parse and reduce the scripts to manageable and viewable form. -
Analyze strings for common parts
Mike Torrettinni replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
I will see how far I get with string diff. Perhaps I was too ambitious about getting each column and it's possible values, and just showing common string part and then list of differences, could be useful enough. SQL parsing will get me a lot of info, but will be hard to reconstruct the matching script part. Perhaps a combination of both approaches, but this is a lot of testing what will work for useful outcome.