Search This Blog

Tuesday, November 28, 2023

Skia in Delphi 12: Pros and Cons


Skia is a cross-platform 2D graphics library that is now available for Delphi 12. This library is a powerful tool for creating high-quality graphics, and it can be used to develop a wide variety of applications, including games, user interfaces, and more.

In this blog post, we will discuss the pros and cons of using Skia in Delphi 12.

Pros

  • Cross-platform: Skia is a cross-platform library, which means that it can be used to develop applications that run on a variety of platforms, including Windows, macOS, Linux, Android, and iOS.
  • High-performance: Skia is a high-performance library, which means that it can be used to create applications that are smooth and responsive.
  • Hardware-accelerated: Skia can be hardware-accelerated, which means that it can take advantage of the GPU to improve performance.
  • Feature-rich: Skia is a feature-rich library, which means that it provides a wide variety of features for creating graphics.
  • Easy to use: Skia is relatively easy to use, especially for developers who are familiar with Delphi.

Cons

  • New to Delphi: Skia is a new library to Delphi, which means that there is not a lot of documentation or support available yet.
  • Learning curve: Skia has a bit of a learning curve, especially for developers who are not familiar with 2D graphics programming.
  • Not officially supported by Embarcadero: Skia is not officially supported by Embarcadero, which means that there is no guarantee that it will be compatible with future versions of Delphi.

Overall

Skia is a powerful and versatile library that can be used to create high-quality graphics in Delphi 12. However, there are a few things to keep in mind before using this library, such as the fact that it is new to Delphi and not officially supported by Embarcadero.

Here are some additional things to consider when using Skia in Delphi 12:

  • Your target platform: If you are targeting a specific platform, such as Windows or macOS, you may want to use a platform-specific graphics library instead of Skia.
  • Your performance requirements: If you need very high performance, you may want to consider using a hardware-accelerated graphics library, such as OpenGL or Vulkan.
  • Your development experience: If you are not familiar with 2D graphics programming, you may want to consider using a higher-level graphics library, such as FireMonkey or VCL.

Ultimately, the decision of whether or not to use Skia in Delphi 12 depends on your specific needs and requirements.

Skia4Delphi on GitHub: https://github.com/skia4delphi/skia4delphi

Have a look for the demo video on YouTube: https://youtu.be/nZLnGhkp08E?si=0HCMggdepHn9E7S3


Wednesday, August 2, 2023

What Are the Greenest Programming Languages?




There is a recent study that compared the energy consumption of 27 of the most popular languages, using ten different programming problems.

Based on this research the most environmentally friendly languages in terms of least energy usage are C, C++, Rust, and Java.

The lowest-ranking languages are Ruby, Python, and Perl.

What about the Pascal?

As you can see, It is evident that Pascal is performing exceptionally well after 50 years, surpassing Swift, C#, GO, Dart, F#, JavaScript, TypeScript, PHP, Erlang, Ruby, Python, and numerous other programming languages.

The team used Intel’s Running Average Power Limit (RAPL) tool to measure power consumption, which can provide very accurate power consumption estimates.

Abstract of the paper:

This paper presents a study of the runtime, memory usage, and energy consumption of twenty-seven well-known software languages. We monitor the performance of such languages using ten different programming problems, expressed in each of the languages. Our results show interesting findings, such as slower/faster languages consuming less/more energy, and how memory usage influences energy consumption. We show how to use our results to provide software engineers support to decide which language to use when energy efficiency is a concern.”


You can find more info in this regard here on the original report: https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf