Hacker News new | ask | show | jobs
by mikewarot 827 days ago
Lazarus/Free Pascal, I've run the IDE on a Raspberry Pi Zero W, it wasn't anywhere near as fast as I'm used to on a PC, but it got the job done. It makes small compact efficient GUI and command line applications.
1 comments

Yup. I've tested it for sizes of the generated binaries, versus C and Go, for a hello world program. C was smallest, next FP, last Go. Both C and FP were under 50 KB, IIRC. Go, much more, in the 1 MB range, IIRC.

I have also written a few small CLI and GUI utilities in FP and Lazarus respectively, and it was mostly a breeze. Had fun.

If you have Delphi or VB experience, it is very similar, conceptually, so fairly easy to pick up.

This is because Go bundles a big runtime in every binary.
Is there a way to not do that?
You can also write allocation free Go, by computing everything on the stack. (Use pprof tool to analyze your code's allocations)

If you want smaller binaries without a runtime or GC bundled, you can try out tinygo [1]

[1] https://github.com/tinygo-org/tinygo