Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The same program for GNU/Linux/XLib is not much less complicated: http://www.paulgriffiths.net/program/c/srcs/helloxsrc.html

Under Windows it is easy to create a console application, which is similar to the usual C helloworld. But the application here creates a windows to show hello world - so it's fair to compare it with a similar program on GNU/Linux/Xlib.

EDIT: Yes, it is much easier to use something as Qt on GNU/Linux, but there are also abstractions around the WinAPI available, so using Qt on GNU/Linux for a helloworld example yields no fair comparison.



My Master's thesis in electronic engineering was supposed to be based on a previous work written by a maths phd in c++ on XWindows. I'd only used C and Basic before and not done any GUI programming. I couldn't believe how much code was involved to set up a few simple windows. It really put me off and I pretty much gave up and started writing my own [image manipulation] code in C. I wish I'd had the sort of resources you can get for free nowadays available it might have been a fun project!

It was the mid 90s and I didn't have unix/linux at home. In those days you had to pay for a compiler on windows and I didn't know anyone running linux. Just a couple of years later it was so much easier!


I would say that this X hello world is needlessly complicated by things that are not strictly needed like WM hints and font selection.


That's not fair. On Ubuntu it's part of systemd already.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: