Recently I installed the latest stable version of Free Pascal and Lazarus on KDE Neon and I must say I was pleasantly suprised! The IDE is very capable and polished, complete with syntax highlighting, refactoring, Delphi like form design, components and packages. Free Pascal is the first class Pascal compiler, compatible with Delphi, used by Lazarus. The community has done an excellent job with these awesome tools, rock solid and very impressive.
What is Lazarus?
Lazarus is a Delphi compatible cross-platform IDE for Rapid Application Development. It has variety of components ready for use and a graphical form designer to easily create complex graphical user interfaces.
What can it do?
You can create your own open source or commercial applications. With Lazarus you can create file browsers, image viewers, database applications, graphics editing software, games, 3D software, medical analysis software or any other type of software.
What is Free Pascal?
Free Pascal is a 32, 64 and 16 bit professional Pascal compiler. It can target many processor architectures: Intel x86 (including 8086), AMD64/x86-64, PowerPC, PowerPC64, SPARC, ARM, AArch64, MIPS and the JVM. Supported operating systems include Linux, FreeBSD, Haiku, Mac OS X/iOS/iPhoneSimulator/Darwin, DOS (16 and 32 bit), Win32, Win64, WinCE, OS/2, MorphOS, Nintendo GBA, Nintendo DS, Nintendo Wii, Android, AIX and AROS. Additionally, support for the Motorola 68k architecture is available in the development versions.
Seriously, you can build pretty much anything with Free Pascal and Lazarus, including:
As Jon Aasenden writes on his blog, Pascal and Object Pascal are archetypal languages like C and C++, they are designed around how the computer actually works.
Mifare card encoding done on an older version of Lazarus (Linux):
Write once compile everywhere
Lazarus runs on a number of operating systems. Write your code on your favourite operating system, then compile it on any operating system you want to deploy to. There is no need for cross-compiling. For example, you develop on Linux, then compile on the Raspberry Pi. The code compiles to a single executable file which makes distribution very simple.
How to install Lazarus?
Lazarus has pre-built installers for Windows and Mac, and most Linux distributions can install it from their respective software repositories. However, on Linux the repositories often contain older versions. Rather than manually building the source code, I chose to use an awesome tool call FPCUPDeluxe. Installation couldn’t have been easier. Not only did it take care of downloading and building the latest version of the software, it also simplified the installation of comon IDE extension modules, such as anchordocking. I followed this guide here, installation was flawless.
Delphi or Lazarus?
This really depends upon you, both are very capable tools. Some people prefer the open source philosophy of Lazarus, or even Lazarus itself. Previously the cost of Delphi was prohibitive for hobbists and indy developers, but now with the free Community Edition available anyone can use Delphi. Personally I prefer Delphi, I especially like FMX. However, if I’m targeting Linux alone, I’ll usually reach for Lazarus. Lazarus is a very capable cross-platform development environment.
Where to learn more?
Youtube has a number of Pascal and Lazarus videos available, see here.
Finally, there are a number of Pascal books available via stores like Amazon, here are a couple of Lazarus related books which can help you get going:
Getting Started with Lazarus and Free Pascal: A beginners and intermediate guide to Free Pascal using Lazarus IDE, see here.
Getting Started with Lazarus IDE, see here.
And for fun, Writing an Interpreter in Object Pascal: Part 1: Lexical and Basic Syntax Analysis, see here.