Live data from Hacker News

Ask HN: Anyone else use FreePascal as their low level language?

news.ycombinator.com

51–58 of 58 posts

Re: Ask HN: Anyone else use FreePascal as their low level language?

#51
post #38
post #23

If you like go, modern pascal is basically that with less curly braces. The other way around is true, too. There’s zero technical reasons to not use pascal. Popularity, library availability, programmer availability and LLM quality of responses may be, but the technical foundation is there and has been for at least a decade (if not since turbo pascal from early nineties.)

What about memory safety? Go uses garbage collection but FreePascal doesn't and is essentially as unsafe as C++, from what I understand.

There is COM-like ARC in Free Pascal

Re: Ask HN: Anyone else use FreePascal as their low level language?

#52

If you consider Go as a low level language, you might want to try C# which can be as low level as Go while having a lot of high level features. NativeAOT compiler allows you to statically link native libraries or create native shared libraries (.dll/.dylib/.so) that can be consumed from other languages. It's kind of 2-in-1 language, but the ecosystem is primarily focused on the high level part, so you can only depend…

Recently created a smart card reading n writing tool for internal use.

Manipulating bits with c# was very pleasant. Building the UI was incredibly quick and easy.

Can recommend.

Re: Ask HN: Anyone else use FreePascal as their low level language?

#53
post #52

If you consider Go as a low level language, you might want to try C# which can be as low level as Go while having a lot of high level features. NativeAOT compiler allows you to statically link native libraries or create native shared libraries (.dll/.dylib/.so) that can be consumed from other languages. It's kind of 2-in-1 language, but the ecosystem is primarily focused on the high level part, so you can only depend…

Recently created a smart card reading n writing tool for internal use. Manipulating bits with c# was very pleasant. Building the UI was incredibly quick and easy. Can recommend.

Would also recommend. We've integrated many different hardware devices with an app, and the process has consistently been very straightforward.

Re: Ask HN: Anyone else use FreePascal as their low level language?

#54
post #26

Earlier quoted context omitted.

The referred paper C isn't a low level language - your computer isn't a fast PDP11 [1] was not really addressing multicore parallelism. It was discussing instruction-level parallelism , which is done within an execution thread and is achieved by speculative and out-of-order execution of instructions that do not have sequential dependency on previous instructions. [1] https://queue.acm.org/detail.cfm?id=3212479

The article does go into cache coherency which is very much intertwined with multicore parallellism: > The cache coherency protocol is one of the hardest parts of a modern CPU to make both fast and correct. Most of the complexity involved comes from supporting a language in which data is expected to be both shared and mutable as a matter of course. I feel like we live in a world where everyone works very hard to pret…

APL? Sure, but CSP perhaps? ... I am going to have to think about a FPGA implementation of APL... perhaps..

Re: Ask HN: Anyone else use FreePascal as their low level language?

#55
Yes, I still use FreePascal for utilities, libraries and console apps. I write these in Lazarus on Linux, and run them on local machines or (for some console apps) on our Intel Synology NAS. It's nice knowing I can easily recompile for other operating systems if I need to.

For some tasks FreePascal is quite clunky, but the lower level the task, the quicker it is to write a solution.

Re: Ask HN: Anyone else use FreePascal as their low level language?

#56
post #26

Earlier quoted context omitted.

The referred paper C isn't a low level language - your computer isn't a fast PDP11 [1] was not really addressing multicore parallelism. It was discussing instruction-level parallelism , which is done within an execution thread and is achieved by speculative and out-of-order execution of instructions that do not have sequential dependency on previous instructions. [1] https://queue.acm.org/detail.cfm?id=3212479

The article does go into cache coherency which is very much intertwined with multicore parallellism: > The cache coherency protocol is one of the hardest parts of a modern CPU to make both fast and correct. Most of the complexity involved comes from supporting a language in which data is expected to be both shared and mutable as a matter of course. I feel like we live in a world where everyone works very hard to pret…

Fair enough, though I still think even there the headspace of the author was more in line with proving single-threaded C virtual machine model does not map to how CPU actually behaves, not that a natively parallel language would be best suited to model a contemporary multicore or data parallel processor.

Re: Ask HN: Anyone else use FreePascal as their low level language?

#57
I quite liked FreePascal and thought that Lazarus makes the experience even more palatable. Stuff like this is really good for cross platform GUIs without having to shove a whole browser in there: https://en.wikipedia.org/wiki/Lazarus_Component_Library Oh and the compiler is pleasantly fast and the language feels a bit easier to work with than C++ and the whole RAD approach in general for GUI software in particular is something that I yearn for more of.

At the same time, even modern Pascal dialects seem niche and the communities and libraries aren't quite there, especially when it comes to the ease of doing something like webdev: mORMot exists but will never be as popular and deeply integrated with everything like something like Spring Boot https://github.com/synopse/mORMot2

That said, there are also some cool projects out there, for example, a whole game engine: https://castle-engine.io/

I'm especially mentioning that, because the dev actually did a nice writeup on Pascal: https://castle-engine.io/modern_pascal

There's also a list of some software using Pascal: https://wiki.freepascal.org/Projects_using_Free_Pascal and sometimes it's packages that you might not immediately think of, like PeaZip which is a nice little program: https://github.com/peazip/PeaZip

I will also say that the idea of having a community Wiki for the programming language and the projects around it seems really nice: https://wiki.freepascal.org/ Maybe not possible for super widespread languages, but for someone taking a look around this is really, really nice.

Post reply on HN