Jump to content

Anders Melander

Members
  • Content Count

    2330
  • Joined

  • Last visited

  • Days Won

    121

Everything posted by Anders Melander

  1. Anders Melander

    ANN: Better Translation Manager released

    There's no difference between ITE and BTM in that regard. They use the exact same RTL mechanism. Ie. the BTM and ITE resource modules are identical. It's only the localization editor/manager/compiler that's different. I believe LoadNewResourceModule used to be in the RichEdit example (no longer included with Delphi but you can find it on the net). Instead you can use LoadResourceModule, in the system unit, or my version of LoadNewResourceModule, in the amLocale unit of the BTM source.
  2. Anders Melander

    ANN: Better Translation Manager released

    Thanks. Please read the last part of the answer for info on controlling the active language: ...But be aware that once a form has been created (and thus the DFM loaded from the resource module) you will need to either recreate the form or reload it from the DFM resource (not recommended) in order for it to use the new language.
  3. Anders Melander

    Primary Key on FDMemTable

    I believe you're thinking of the pfInKey value of TField.ProviderFlags. <rant>I know the help has improved but why the hell isn't there a link in the help from the ProviderFlags property to the type of the property. Don't they have computers that can do this stuff for them?</rant>
  4. Anders Melander

    Primary Key on FDMemTable

    What do you mean? Can you rephrase the question, please.
  5. That's a very short sighted attitude. Technical debt accumulates and your memory will not get better with age, or so I've heard
  6. No I don't think so. You've just made your code more complex and harder to maintain and gained almost nothing.
  7. Anders Melander

    NERO5 chess engine

    Define "well" I'm pretty sure it can easily beat me. https://www.chessprogramming.org/Nero
  8. Anders Melander

    Primary Key on FDMemTable

    There isn't really a "primary key" index on a TFDMemTable. You can have multiple indices on a table and one of them can be the "current index". http://docwiki.embarcadero.com/Libraries/Sydney/en/FireDAC.Comp.DataSet.TFDDataSet.Indexes I guess you can specify the soPrimary option on an index but I'm not sure if there's any practical difference from the soUnique option. http://docwiki.embarcadero.com/Libraries/Sydney/en/FireDAC.Comp.DataSet.TFDIndex.Options
  9. Anders Melander

    NERO5 chess engine

    ...and no comments. Not a single one! It's almost as if the code was generated by a decompiler. Not that I think it was because then there would be comments
  10. Anders Melander

    Speed of Graphics32

    I think the primary strength of OpenGL is that it's portable. Coming in at a close second is the performance of 2D and 3D vector graphics helped by the fact that many operations are hardware accelerated. Of course this is only a benefit if you have a fast graphics card (otherwise it's a bottleneck), but the same can be said for Direct2D. I do not think that it can compete when it comes to raster graphics which I think is what Mike is asking for.
  11. Anders Melander

    Speed of Graphics32

    Why do you think that?
  12. Anders Melander

    Hex2Binary

    Seriously?
  13. Anders Melander

    Delphi and the new Apple M1 CPU

    I think Apples revenue speaks for itself. Even though they make some really nice hardware it's obviously overpriced.
  14. Anders Melander

    Speed of Graphics32

    It's been a while since I did any comparisons of Graphics32 and GDI+ but AFAIR in the few cases where GDI+ came close to Graphics32 it did so at the cost of quality - e.g. fewer anti-aliasing levels or anti-aliasing via oversampling. To be fair the performance of Graphics32 comes at the cost of versatility since it only does 32-bit images. Graphics32 also has a steep learning curve. In those cases where GDI+ has a feature missing from Graphics32 I believe one can use GDI+ to draw on a Graphics32 bitmap via the bitmap handle.
  15. Anders Melander

    Hex2Binary

    The iterators were David's code and was just part of the test bench. As long as every solution uses the same test bench code then that doesn't matter much but when some solutions then replaces the test bench code to optimize the solution that invalidates the comparison.
  16. Anders Melander

    Speed of Graphics32

    Generally Graphics32 does everything faster but specifically you will need to clarify what operations you're asking about to get a usable answer.
  17. Anders Melander

    Hex2Binary

    While I don't question the timings I don't think these latest benchmarks are fair; The goalposts have been moved. It seems the first solutions were aiming at optimizing conversion of a single hex digit and the later ones are optimized for strings. Some have had the iterators replaced by classic for and some haven't.
  18. Anders Melander

    Hex2Binary

    That was my thought too but then again, apart from the challenge of it, it's kinda pointless trying to squeeze every last microsecond out of an ASCII HEX to ASCII BIN conversion. It would be more relevant for HEX to binary conversion. Maybe in this case. You can find plenty of examples out there which demonstrates that a LUT isn't always faster. For example: What's the fastest way to convert hex to integer in C++?
  19. Anders Melander

    Code Librarian

    Refactor it into a generic unit. Save it in its own Git repository (or have all these utility units in a single repository). Reuse it as a Git submodule in the projects where I need it. Git submodules are a bit of a hassle but it's better than just copying units into other projects and then have to manually update each one every time you fix a bug or make an enhancement.
  20. Anders Melander

    64 bit compiler running out of memory

    The config file helped for me One thing though: The conversion doesn't preserve the file encoding; The new file is written as ANSI even if the source file was UTF-8 encoded.
  21. Anders Melander

    BTM Import CSV Greyed out

    Yeah that's a bit unfortunate. The button is there to remind me to implement it - and it's disabled simply because I never got around to that. Same with the Import from and Save to Excel buttons. I take it your would expect to be able to import CSV in the same format as the exported CSV? I.e.: Module;Item;ItemType;Property;Source;Translation_0;...;Translation_n The original aim was to be able to map arbitrary CSV columns to the localization columns, but that's more work than I have to spare right now.
  22. Anders Melander

    WinUI in Delphi (planned for 10.5?)

    Looking into my crystal ball I see that in a few years Microsoft will introduce something even better and we will be left with yet another UI layer. One can hope that they've learned from their mistakes but their track record isn't too great.
  23. Anders Melander

    Need help: Variant in 64 bit application

    Ah yes. Shouldn't TServerServiceMethod be declared like this then: type TServerServiceMethod = function(Sender: TObject; const ClientIdent: TkbmMWClientIdentity; const Args:array of Variant): variant of object; (add "of object") Also I think you need to call it like this: var ServiceMethod: TMethod; begin ServiceMethod.Data := Self; ServiceMethod.Code := MethodAddress(Func); TServerServiceMethod(ServiceMethod)(Self, ClientIdent, Args); end;
  24. Anders Melander

    Need help: Variant in 64 bit application

    I think you'll have to ask @Kim Madsen for help on this one. I would imagine that it's supposed to work with 64-bit but since I don't have the source I can't tell.
  25. Anders Melander

    Outdated Delphi Roadmap

    I haven't participated since Pulsar (I think that ended up as XE2) so I don't know how it's done these days. Back then pretty much everything was already written in stone at the time the field tests started so you could really only contribute with bug reports. In the beginning (up until around D9 (and please forget D8)) the field tests started much earlier (and ran longer) so there was a much better chance of influencing what ended up shipping. Regardless, if they're aiming for improved FP performance it would make sense to get early feedback from those to whom it actually matters.
×