Some time ago I stumbled upon this stupid meme attempt:
Beyond the syntax errors on the C++ and Java code, what bothered me the most was the basic assumption that languages should be rated purely by such lame use case conciseness.
Well, challenge accepted! Let's create the most concise language possible for a "Hello World" program. It will be named HelloWorlder!
What is the most concise possible language? Easy, an empty file! Close, but no cigar... How about NO file?!
Well, NO file is a bit controversial... how about supporting both then?
And how about non-existent files? Gee... even such stupid specs can get complicated! But oookay, non-existent files too!
You: So you are telling me this article is about processing empty or no files? I am wasting my time!
Me: Yes, you are. Any barely competent programmer could do that within some few minutes. From my side, I took that as a chance of having my first contact with Autotools.
I am a C programmer. In order to make HelloWorlder compilable on most platforms, I should ensure the dependencies are present and find out where they are. Autotools make it at least possible by automating the build generation.
Basically, instead of writing the configuration and building code myself I write what I have on some files and the Automaker creates them on each platform.
Having to learn Autotools basics took me an extra day but the end result looks more professional. So I dared to publish that mess on Github: https://github.com/flaviodesousa/helloworlder.
After compiling it on your platform you will have an interpreter able to:
ANY of those inputs will produce, on your standard output:
Hello World!Share on Twitter Share on Facebook