Hello, World
by jperras
When a programmer takes his/her first steps in a new language, the first example program he/she codes (or skips over) is usually the prototypical “Hello, world”, or a variant thereof. I thought I might run through a few of the classical “Hello, world” examples from programming languages that I find interesting.
This first example is from Factor, an example of a concatenative (as opposed to applicative) language:
I’m trying to find more reasons to toy with Factor, simply because it is such a huge departure from the programming languages I’ve used in the past. Some of the interesting features:
- A postfix syntax
- Stack-based
- Classes can be predicate and union based
The next is from Haskell, my favourite functional programming language:
My favourite Turing-complete joke language, LOLCODE:
As a crazy side note, it appears that the Turing completeness of LOLCODE was in part proven by using it to create a Brain Fuck interpreter (where BF has already been proven to be Turing complete).
That’s fairly mind-blowing to me, especially considering that BF is pretty much as incomprehensible as it gets (by design), and LOLCODE syntax is based off of subtitles from funny cat pictures.
Fortran which is still heavily used in high performance computing, benchmarking and scientific analysis (e.g. computational physics) due to it’s extremely stable and robust floating point arithmetic and floating point exception handling. I still wouldn’t touch it with a ten-foot pole these days, however.
Got any favourite languages that aren’t “mainstream”? Let me know in the comments.