Awesome Pascal – A curated list of Delphi, FreePascal, and Pascal shiny things
github.com
github.com
It hasn't been completely smooth. Doing more modern tasks like HTTP requests are not included, and adding the plugin for it is a little fiddly, but for your basic GUI tasks, it is actually pretty fun, and simple on a level reminiscent of Visual Basic.
I encourage everyone to give it a try, and though you might not make your name writing pascal software in 2022, its fun like driving a car with a stickshift, or using hand tools to build a table. It is an experience worth enduring to experience the appreciation and perspective it provides.
Try it!
You can certainly make money with it. People still pay for native-code software after all.
Pretend you want to write a ... oh, I dunno, let's say Task tracker, collaboration tool, or order-entry, or some other office productivity tool, consisting of only a few forms.
Sure, you can make a web-based UI, and there's many advantages to doing so, or you could make it a native application, and there's many advantages there too.
I've used the Lazarus IDE to make a small productivity application, and it was by far much easier than to make a web-based GUI.
It was also instant startup, never used more than around 30MB of RAM and ran insanely fast compared to the web-based "native" applications we have now.
> It was also instant startup, never used more than around 30MB of RAM and ran insanely fast compared to the web-based "native" applications we have now.
Silly things like ease of development, lower resource usage, and responsiveness/execution speed are unimportant to real Electron developers.
There are only three things that matter:
1. Sharing code between the web app and desktop "app"
2. Easy integration with web-based backend services
3. Being able to tell management that you use Electron
Microsoft Teams is a perfect example. The backend is so slow, buggy, and frequently down that any time spent improving or optimizing the client app is not going to provide any meaningful benefit. In fact it might have the perverse effect of raising user expectations and decreasing overall satisfaction with the product.
So, we need an Object Pascal to JavaScript compiler?
The key point though is that many have to or feel compelled to use C++ because of their job or possible job opportunities. There are jobs for Delphi/Object Pascal, just not as much. Though sometimes being a more limited commodity can be beneficial to various individuals. Additionally, for independents, freelancers, small businesses, or mavericks Object Pascal can be wonderful.
If you look at TIOBE Index, you will see that Delphi/Object Pascal (presently #12) is often ranked above such notables as Go (Golang), Swift, Ruby, Rust, and Lua. A list of languages many would argue a person could make a name for themselves with.
Not saying that TIOBE is the "be all, end all", but it's not like nobody knows Delphi/Pascal or that there aren't companies that have lots of code written in it. To include that Delphi/Pascal is still being taught in many school systems throughout the world (https://www.youtube.com/watch?v=FHcqZEtWBy0&list=PLxAS51iVMj...).
We also have to be mindful to separate from the propaganda and hit jobs by corporate backed competing programming languages that would prefer people not know how competitive, powerful, and useful that Object Pascal is.
FWIW a package can provide components but it should be possible to do HTTP requests out of the box without installing anything using the FPHttpClient unit (there is also a server one too if you need it), which is part of FCL (which is available by default on Lazarus projects):
{$mode objfpc}
uses FPHttpClient;
begin
with TFPHttpClient.Create(nil) do
try
Writeln(Get('http://example.org'))
finally
Free
end
end.
Sadly the documentation[0] is not that great - in fact it doesn't exist aside from the autogenerated stubs - but it should be possible to understand what is going on by the method names and arguments.[0] https://www.freepascal.org/daily/packages/fcl-web/fphttpclie...
Not at all. Lazarus being community project is rough in edges but Delphi runs on "automatic" just fine.
>"and simple on a level reminiscent of Visual Basic"
It runs circles around it and the language has all modern doodads.
That is included now
Although I maintain my own functions for that
Make the effort to use or promote lazarus.
I was a natural fan boy. We just assume that the thing we happened to land on is for some reason the best. Pascal is the best, Windows is the best, my country is the best, etc, etc. I know people who lived like that their entire (up to this point) life.
If I happened to start with c++ or java, I could stay ignorant forever. I was lucky that Pascal's ecosystem was so limited that I needed to learn c++ and from there I went to java, c#, python, and a little bit of others.
Now, when looking back at Pascal, I have the deep nostalgic emotion, but I know that for most things I can do with it, there are much better tools out there.
So, that said, looking back and trying to teach the current generation basic programming concepts beyond variables/loops/etc, aka data structures. I repeatedly think that my high school data structures/etc teachers did a far better job than the current crop trying to wedge more advanced computer science topics into languages like Java, python, C++ or even C. The replacements (Rust) are bad or worse for teaching these concepts because the language just simply gets in the way to much. C is maybe the best of the allowed choices because its possible to write say linked lists, or linked tree structures fairly easy but its got so many foot guns that Pascal manages to avoid. Languages like C++ might be reasonable, until some prof dictates that the class should be using std::unique_ptr() or whatever, which just adds confusion to something that should at its heart be fairly simple.
So in the end, I think Niklaus Wirth actually has a bit of an masterpiece in Pascal when it comes to creating a language for teaching computer science topics.
The fact that I also convinced the place I worked to use Delphi on a couple of greenfield projects in the mid 1990's and that was probably some of the most productive work I've ever done shows that pascal also works just fine in a commercial setting.
But it is lacking good libraries. Then I write everything myself, and then it does not even work, because it is lacking a good oss compiler.
As a consequence out of necessity a couple of years later I ended up self teaching myself PHP then Ruby then JS. These days I'm pretty proficient with it.
I had an easier time doing it because of those early concepts I learned with Pascal.
I often wonder what would have happened if I had learned C++ instead.
Although I've had previous contacts with computers, my first personal computer was a windows box in the beginning of the second half of the 90's. Never had in my mind "windows is best".
A couple more well known titles are:
- BeyondCompare
- InnoSetup
- Nero Burning ROM
- Macromedia Dreamweaver!I wish I had instead learned C and C++.
The tooling around Pascal was phenomenal, with Turbo Pascal, Borland Pascal, and Delphi. But the tooling around C++ is just as good or better now, in my opinion.
I wish I had instead learned Go and Rust.
The tooling around C++ was phenomenal, with Turbo C++, Borland C++, and C++ Builder. But the tooling around Rust is just as good or better now, in my opinion.
Walk me through which AAA games are developed in Go and Rust, just as a conversation starter.
https://www.embark-studios.com/
Now if you consider them AAA class is another matter.
>
> The tooling around C++ was phenomenal, with Turbo C++, Borland C++, and C++ Builder. But the tooling around Rust is just as good or better now, in my opinion.
I know you say it's just your opinion, but that's an extraordinary claim, don't you think?
Also, don't forget some of the better (IMHO), but lesser known open-source self-compiling Pascal compilers:
BeRoTinyPascal: https://github.com/BeRo1985/berotinypascal
XD Pascal for MS-DOS: https://github.com/vtereshkov/xdp
XD Pascal for Windows: https://github.com/vtereshkov/xdpw
It's a Worms clone that actually gave me as much joy as the original. What's quite interesting is that the game is written in many languages - I heard that e.g. AI is written in Haskell.
A Delphi app that I released in the mid-90's is still the longest-running, most entrenched, still in-use application of anything else I did in that era. It amazes me that people are still using this little application and I still get heaps of praise for having written it, almost 30 years ago. People are still using it .. a testimony to just how well Delphi works and how powerfully useful apps can be made with it.
I only wish I still had the sources for the app so I could try a Lazarus build an maybe fix a few bugs ..