Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/12/20 in all areas

  1. Uwe Raabe

    When will we have an updated Delphi roadmap?

    In contrast to software a roadmap is always released when its ready.
  2. FMX / VCL form designer plugins for VSC would be sweet.
  3. Uwe Raabe

    Delphi 10.4 compiler going senile

    Oh, I meant to have heard that they are trying to eliminate the dependence on DotNet 🤔
  4. Did you know that this is possible: type TImageConvertOuputConfigEnum = ( IMAGE_CONVERT_OUTPUT_CONFIG_IMAGE_ID = $02, //(1 << 1), //**< output pixels points to a ImageId */ IMAGE_CONVERT_OUTPUT_CONFIG_O0 = $04, //(1 << 2), //**< disable CPU optimizations such as SSSE3 */ IMAGE_CONVERT_OUTPUT_CONFIG_BAYER_METHOD_1 = $10, //(1 << 4), //**< select bayer decoding method 1 (3x3 interpolation, a.k.a. legacy method) */ IMAGE_CONVERT_OUTPUT_CONFIG_BAYER_METHOD_2 = $20, //(2 << 4), //**< select bayer decoding method 2 (3x3 median-based interpolation, a.k.a. advanced method) */ IMAGE_CONVERT_OUTPUT_CONFIG_BAYER_METHOD_3 = $30, //(3 << 4), //**< select bayer decoding method 3 (5x5 gradient-based interpolation) */ IMAGE_CONVERT_OUTPUT_CONFIG_DEFAULT = IMAGE_CONVERT_OUTPUT_CONFIG_BAYER_METHOD_1, IMAGE_CONVERT_OUTPUT_CONFIG_BAYER_ADVANCED = IMAGE_CONVERT_OUTPUT_CONFIG_BAYER_METHOD_2 ); This is a translation of a C header file. I only now noticed that the enum contains duplicate values which I until now thought was impossible. IMAGE_CONVERT_OUTPUT_CONFIG_DEFAULT is a duplicate of IMAGE_CONVERT_OUTPUT_CONFIG_BAYER_METHOD_1, both having the ordinal value $10, and IMAGE_CONVERT_OUTPUT_CONFIG_BAYER_ADVANCED is a duplicate of IMAGE_CONVERT_OUTPUT_CONFIG_BAYER_METHOD_2, both having the ordinal value $20. The Tokyo Docwiki actually has such an example: It compiles with Delphi 2007 so it must have been possible for a long time. "Man wird alt wie 'ne Kuh und lernt immernoch dazu." -- my mother
  5. Remy Lebeau

    enums with duplicate values

    According to my notes, assigning explicit ordinal values to enums has been supported since D6. I haven't tested it in earlier versions, though.
  6. Another post about Custom Managed Records. This time, this new language feature is used to create smart pointers. https://blog.grijjy.com/2020/08/12/custom-managed-records-for-smart-pointers/
  7. Oh gosh... As for what temporal coupling means - use google before I spend my time explaining it to you - someone else probably already did a better job anyway. P.S. Your use of "class field" and "class method" is wrong - what you are referring to are instance fields and methods. type TFoo = class fName: string; // instance field or just field - because every instance has its own class var fCount: Integer; // class field because there is just one - basically like a global variable but only visible inside of TFoo procedure Bar; // instance method or just method - can access instance members (like fName) but also class members (like fCount) - Self refers to the instance of TFoo class procedure SomeStuff; // class method - can access class members (like fCount) but not instance members - Self refers to the class itself - here TFoo - many other languages don't have something like this class procedure MoreStuff; static; // static class method - can also access class members but has no Self end;
  8. Stefan Glienke

    Delphi 10.4 compiler going senile

    I wish when they did (most of all that .NET API inspired copies happened years ago) they actually did not mindlessly copy it: - Monitor... I think C# at that time already had the lock keyword which does all that underneath to avoid boilerplate, - generics and mostly type constraints - understanding that class in C# is a constraint on reference types and not only on classes and that struct is a constraint for value types. Porting that properly to Delphi which has kind of hybrid types such as string or dynamic array. - System.IEnumerable and IEnumerable<T> and that in Delphi without a rooted type system it does not make a bloody sense to inherit the generic one from the non generic one - System.IOUtils - plagued with ton's of bugs and a rather terrible API and performance I think there are more examples. .NET is not perfect but I am amazed how much effort goes into it - how APIs are being improved (and yes mostly without breaking them - the issue with inventing and dropping things is mostly in the eco system that builds upon it). Damn they even care about binary size for their guard code! (see the comment in https://github.com/dotnet/runtime/blob/master/src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs) Recently they refactored many APIs to use Span<T> to avoid unnecessary allocations - while in Delphi we still allocate strings all over the place when using the stringhelper methods for example and only the people that care for performance then do all that ugly mess with PChar.
  9. That was a good hint: Enumerating the emf file shows a EMR_BITBLT as the main graphics command. I was hoping that painting the SVG to a GDI canvas will result in a bunch of GDI commands/operations, but the SVG is rendered to a bitmap representation instead. That's OK for me.
  10. My first impulse was pure function! as well but that depends on how SearchByFieldName is implemented - ultimately this looks like it mutates internal state. However you should avoid temporal coupling as it leads to hard to maintain code.
  11. Stefan Glienke

    ANN: TMS Web Core for Visual Studio Code - Public Beta

    Sure but as it stands and even with LSP support in 10.4 Visual Studio Code with OmniPascal (not sure what you offer for code tooling in your package) even with its glitches runs circles around what you can do in RAD Studio coding and code navigation wise. So doing all form stuff and debugging in RAD Studio while doing the pure coding in Visual Studio Code (yes some people don't just slap components on forms and implement event handlers!) is often the superior experience.
  12. VSC is a great tool, seems to be well thought from ground up, with a zillion users out there. Also consisting of a large ecosystem, with plugins and many supporters. Most important maybe, as said before, the young guys are there: If you want catch attraction to Delphi code in the young generation, then this is a good place to go. VsCode is Open-Platform, mostly used on Macos, because of its coolness factor. By the way: Worth to mention, its free and open source IMHO this is the new way to go, all other IDE look old fashioned against this ( Ok, I know Atom, etc. too, but the winner takes it all).
  13. There's a strong opinion pro using parameters for the sake of testability. Some people even insist on using pure functions (those which do not use external variables at all) as much as possible. But everything depends on your needs and use cases. My opinion is to try with parameters; if you need to tie some values to an object, then use fields
  14. dummzeuch

    When can Class.Create fail?

    Just one remark here: If the constructor raises an exception, the destructor will be called automatically. You must always be aware that the destructor might run on an only partially initialized instance.
  15. Vincent Parrett

    Delphi 10.4 compiler going senile

    I don't have a problem with it - the DotNet api is really quite nice, broad functionality, well tested, well documented. Nothing wrong with using it for inspiration. What I wish more than anything is that Embarcadero stops releasing unfinished untested features. 10.4 is up there amongst the worst Delphi releases ever and pretty much unusable for me. LSP is half baked, the IDE is a mess, the debugger barely works and it;s a sloth. The VCL is ruined by poor implementation of themes - flicker everywhere.
  16. Stefan Glienke

    ANN: TMS Web Core for Visual Studio Code - Public Beta

    I watched the video series and I have to say it unfortunately did not do a very good job showing why this is a big deal. Tedious copying and modifying the template and all that. When I watched this I thought by myself "I am a noob with web development but probably would have slapped this together faster with something like knockout.js or similar. Don't get me wrong - it looks interesting - just the video series was a bit off-putting. What get's me more interested here is if you could use the designer to design VCL forms within VSC - not asking for the entire featureset and behavior at designtime but just the basic align, anchor, size/position shebang.
  17. vfbb

    StoryBoard launch screen - Delphi 10.4

    I found the problem and this is not a delphi bug. The problem is with the iOS cache, the app don't update new launchscreen / icon, even you uninstall and install your app. The solution is: 1) Uninstall the app 2) Power down the device 3) Power up the device 4) Install the app
×