HNHacker News
TopNewBestAskShowJobs

Peter5

163 karma · joined August 28, 2022

submissionscomments
Peter5··on Lazarus Release 4.0
fpcupdeluxe is great if you want to get a particular revision or build cross-compiling. If you need a stable version, just download the setup from. The docked IDE is the default option for this version.
Peter5··on Lazarus Release 4.0
2.5 MB is for most of the Lazarus Component Library (LCL) with minimal size increases even as program complexity grows. For example, Dadroit JSON Viewer EXE is less than 6 MB while having complicated tree views, JSON handling, networking, and more. By the way, an empty CLI EXE on Windows is less than 50KB.
Peter5··on Lazarus Release 4.0
Custom control set is supported too, and there are multiple alternatives.
Peter5··on Lazarus Release 4.0
Yes. Try the IDE itself; on Windows it is built with Win API. PeaZip is a sample of it https://github.com/peazip/PeaZip
Peter5··on Programming your way to generate dummy JSON
https://github.com/DadroitOrganization/Generator
Peter5··on A guided intro to the Free Pascal language
That's reasonable to not believe me, but can you enlighten me with more samples? If you mean managing pointers in Pascal, you can code in a style of high-level language like JS and never see a pointer to manage, thanks to managed records, objects, strings, and arrays. And if you are doing low-level stuff that needs getmem, alloc, and pointers, you better know what you are doing with your memory; otherwise, what is the point of writing these low-level codes? speed and control. Furthermore, pointers are typed and managed at compile time, with plenty of hints and warnings to show you the correct behaviour.

I stand by what I said about speed: I've been comparing the resulting code of GCC or Clang and FPC for years, and if you know what you're doing, the resulting speed will be almost the same. Sure, Clang does some quirky things, but at the end of the day, I've never seen a piece of code written by the same person in both languages (the result of one mind with one style of code) that resulted in a different speed. To be fair, GCC or Clang are a step ahead because they are the result of millions of dollars in corporate support, but my response was to emphasize that the speed is not what people remember from decades ago. As a sample, you can try the Dadroit tool, I linked, I am on the team, and you can compare a result of Pascal with similar tools.

And I agree with you. Don't get me wrong; despite my passionate response about Pascal, I am not saying that Pascal is a one-to-one replacement for new languages; my thesis is that you have most of the cool stuff you hear in this old language too, just without the hype, to encourage people to give it a try and not repeat the old "Pascal is old."

Peter5··on A guided intro to the Free Pascal language
Note for people who don't know much about FreePascal. It is a full-featured and very fast compiler. The resulting program is a rival for the best output of C/CPP compilers. It can be used in the style of simpler languages like Go and is almost as safe as Rust in a much faster manner. It has a great but old-looking IDE, Lazarus. It has been under active development for decades and is used for proper projects like:

https://dadroit.com/ https://peazip.github.io/ https://cudatext.github.io/ https://lazpaint.github.io/

As far as I know, there is no toolkit out there that lets you make fine looking applications for multiple platforms with proper speed.

The old Pascal you may know is not the new Pascal. The development of Pascal is mostly focused on ease of development while maintaining low-level programming and backward compatibility. It looks old on its face, but it is young at heart.

I recommend starting with Lazarus, https://www.lazarus-ide.org, a much lighter IDE compared to so-called light projects like VSCode, with many more features and components to play with.

Friendly word: don't let the comments with outdated information make you miss a great and fun tool.

Peter5··on A guided intro to the Free Pascal language
In these days, Lazarus and FPC are a valid choice instead of Delphi, except when you are doing some heavy component based codes, like organization oriented projects. Plus side is Lazarus can produce a project and UI for almost any OS.
Peter5··on A guided intro to the Free Pascal language
This website, is a collection of cool samples and sources. Check https://www.getlazarus.org/learn/tutorials/examples/ for many cool projects and the author has many nice projects including https://github.com/sysrpl/Tiny.Sim
Peter5··on Software I’m thankful for (2021)
Everything (Instant file search): https://www.voidtools.com/
Peter5··on Compiling a Million Lines of Code with Delphi
A good compiler is much more than just speed, but it is good to have more information on compilers speed, and there is a lot about decedents of C. Maybe some appreciate the speed of Delphi, the son of Pascal. For a more real world scenario, this video is good too: https://www.youtube.com/watch?v=9S7fM_kAmjE
Peter5··on High speed Unicode routines using SIMD
I searched for it and couldn't find a match. I chose the code instead of the document, as the repository links to the paper too, and almost always, code is more welcome than a paper.
Peter5··on JSON Crack – Visualize JSON data into graphs
This is a very good one for understanding API results, so you can debug what the properties are. For bigger ones, we are working on Dadroit Viewer.