Jump to content

Leaderboard


Popular Content

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

  1. Lars Fosdal

    August 2020 GM Blog post

    We're gonna need more moderators And... perhaps some anger management classes
  2. Dalija Prasnikar

    August 2020 GM Blog post

    Great colors... make me blind... since color theme matches horrible 10.4 colors, this is all Embarcadero or Idera production...
  3. Lars Fosdal

    August 2020 GM Blog post

    Looks like YAME. Yet Another Marketing Event.
  4. PyScripter, an Open Source, freely available Python IDE written in Delphi, has reached 1 million downloads from Sourceforge. This is in addition to many millions of downloads from its earlier home at the now defunct Google Code and an unknown number of downloads from other distribution channels. Historic note: The initial motivation was to build a good scripting solution for Delphi applications. About 20 years ago Microsoft was still promoting ActiveX scripting and Windows Script Engines (such as vbScript and jScript) as the way of building scripting solutions for Windows applications (one of many Microsoft technologies that was all but abandoned). At that time Python was relatively unknown, but it so happened that it was available as a Windows Script Engine and I looked into it. I loved the clean syntax, the expressiveness and conciseness of the language. Other things I liked were duck typing, batteries included, strong object orientation (everything is an object) etc.. The first iteration was an IDE (editor/debugger) for ActiveX Script Engines. But there were many bugs and limitations of Active Scripting both on the Microsoft/Windows side and the Python side. I then came across Python4Delphi which at the time was maintained by a Canadian developer Morgan Martinet. I started contributing to that project and later become its main maintainer, when Morgan's interested shifted to other things. I also developed a simple Python IDE which was named PyScripter and was originally distributed alongside Python4Delphi. There was very few Python IDEs available at the time and somehow the project became known in the Python community and instantly popular. For me, developing PyScripter was just a hobby, but I received a lot of encouragement and kept on improving it. I was also making some income from donations and Google AdSense. Both PyScripter and Python4Delphi were later moved to Google Code. Python popularity was steadily increasing and at the peak of PyScripter's popularity around 2010, there were hundreds of thousands of downloads the days following each new release. More recently as we all know Python became one of the most popular programming languages, but at the same time there was strong competition to PyScripter from freely available commercial grade IDE's such as Jetbrains PyCharm and Microsoft's Visual Studio and Visual Studio Code. PyScripter was almost abandoned when Google Code closed down due to my frustration, but after a couple of years of inactivity the project was moved to Github and development resumed. Downloads are available through Sourceforge, since 2016. Through the years PyScripter has kept a large and loyal group of followers. I get many comments along the lines "I have tried VSCode, I have tried PyCharm, but I keep going back to PyScripter". PyScripter is also quite widely used in many Universities for introducing Python to students. And almost 20 years after its first release, PyScripter is still going strong...
  5. Dalija Prasnikar

    August 2020 GM Blog post

    If you want to discuss then forum is the right place, if you have specific question then SO is the right place to go. I would not say it is about preferences, but what you need at particular moment. Besides Delphi I am using other tools for development, most notably Android Studio and Xcode. I never needed forums to solve my problems... I could find all the answers on SO and official documentation. Hanging out with other developers and discussing all kinds of things... well, Delphi forums and communities were more than enough for me.
  6. Stefan Glienke

    August 2020 GM Blog post

    The alternative to Italic... scnr
  7. Dalija Prasnikar

    August 2020 GM Blog post

    Not really... official forums were already dead. They basically died when NNTP was dropped.
  8. Look for more traffic here soon as they are discontinuing their public forums. (Their current forums are horrid to use...maybe they should replace the forum software instead...) https://blogs.embarcadero.com/august-2020-gm-blog/
  9. Lars Fosdal

    August 2020 GM Blog post

    But SO is not a forum. Questions that are ... unprecise ... get eradicated fast and hard.
  10. Uwe Raabe

    August 2020 GM Blog post

    https://delphi.fandom.com/wiki/Bold_for_Delphi http://boldfordelphi.blogspot.com/2017/01/help-me-to-make-bold-open-source-project.html
  11. David Heffernan

    When can Class.Create fail?

    Well not necessarily. Typically you let exceptions float upwards to be handled by some high level exception handler.
  12. David Schwartz

    When can Class.Create fail?

    There are situations where the ctor can fail, for sure. So you put it in a try...except. The try...finally is partly to ensure that properly constructed instances get freed in case an exception is thrown. But more than that, if you call Exit at any point between the 'try' and 'finally', the Exit goes to the Finally clause as well. It helps to think of things in your mind as always composed as three parts: * set-up or initialization * operation * tear-down For example: * You set up some scaffolding on a wall to do some work on second-story windows. * You do whatever it was you intended to do * You tear down the scaffolding, pack up and go home. If you fall off the scaffolding (like throwing an exception) an ambulance comes and takes you away. But someone has to tear things down and clean up, right? Now say you get a call from someone saying you won the lottery. You probably want to rush off and claim your money (like calling Exit). You still want to be sure that everything gets torn down and cleaned up as well. This is a frequently repeating pattern in any program. When you start to see it, you can't un-see it, and it makes organizing things far easier. Ditto for finding stuff. It's how classes are structured, how you can organize units, how you organize chunks of code inside of a unit, and even within methods. Classes make it explicit with the notion of a "constuctor" and "destructor". Try...Finally and Try...Except blocks do the same thing, but the "constructor" part is above the Try. The difference is that the 'except' is provided specifically to trap exceptions while 'finally' is to act more like a destructor to clean things up.
  13. pyscripter

    August 2020 GM Blog post

    It refers to the intention to promote Python4Delphi as a means of bringing Python and Delphi closer together: Python for Delphi (P4D) is a set of free components that wrap up the Python dll into Delphi and Lazarus (FPC). They let you easily execute Python scripts, create new Python modules and new Python types. You can create Python extensions as dlls and much more. P4D provides different levels of functionality: Low-level access to the python API High-level bi-directional interaction with Python Access to Python objects using Delphi custom variants (VarPyth.pas) Wrapping of Delphi objects for use in python scripts using RTTI (WrapDelphi.pas) Creating python extension modules with Delphi classes and functions P4D makes it very easy to use python as a scripting language for Delphi applications. It comes with an extensive range of demos and tutorials.
  14. Lars Fosdal

    Grid Sort indicator

    No worries. The only benefit of custom draw is if the column title is wider than the actual column.
  15. Wil van Antwerpen

    Grid Sort indicator

    Hi, I remember looking for it in the past and that it didn't work well.. forgot why I'm afraid. Had shelved the project for several months and when I just look at it again, this bit was really annoying me. Now I just tried again and used your suggestion: ▲ ▼ #$25B2 / #$25BC It works well and looks fairly reasonable. Perhaps not 100% perfect, but certainly a lot better than my alternative. Thanks so much for taking the time to reply. This will do for the moment, I agree with you that custom draw is not worth my time as then there's plenty of other things that I could work on instead.
  16. If you need VCL/FMX conditions in your own code, this works: {$DEFINE HAS_VCL} {$IF DECLARED(FireMonkeyVersion) and (FireMonkeyVersion >= 16.0)} {$UNDEF HAS_VCL} {$DEFINE HAS_FMX} {$IFEND}
  17. Lars Fosdal

    Grid Sort indicator

    Surely there are better characters in Unicode that you can use? ↑ / ↓ #$2191 / #$2193 ˄ / ˅ #$02C4 / #$02C5 ▲ ▼ #$25B2 / #$25BC Optimal solution could be a custom draw, but... is it worth the effort?
  18. Ralf Junker

    CodeFormatter removes indentation from within comment

    https://sourceforge.net/p/gexperts/bugs/208/
  19. Another good reason for parameters. I'm looking into VirtualTrees.pas (Virtual treeview) to see how it is implemented there, and I'm starting to understand. Still a long way to not question what to do every time, but with experience I will. Like everybody here is saying: there's no one exact rule, just guidelines.
  20. Can't you use middle click to close the file?
  21. David Heffernan

    System.GetMemory returning NIL

    Premature optimisation
  22. Arnaud Bouchez

    System.GetMemory returning NIL

    Delphi MM (FastMM4) is just a wrapper around the OS API for big blocks. No benefit of calling direclty the OS function, which is system-specific, and unsafe. Just use getmem/fremem/reallocmem everywhere.
  23. The new features of this compiler are just untested/unfinished... Even the type helpers are broken with sub-types: if you define TMyInteger = type integer then you can't use myinteger.ToString... Non-inheritance is a "feature" which IMHO is wrong. What always work, and is the very same, is to write: TUsers = array of TUser; > Too bad we are working with Delphi where it does not matter because I can still assign a TUserName to TUserFirstName Yes, only var/out variables have compile-time strong checking... But at least you can read the code and verify the consistency either since the type (and RTTI) are explicit. And refer to the type definition comment as documentation. And it also helps writing more natural code, by having the type defined in the time, not in the parameter I prefer: function CopySession(source, dest: TSessionID): boolean; .... property session: TSessionID; instead of function CopySession(sourceSessionID, destSessionID: integer): boolean ... property sessionID: integer;
×