Friday, December 2, 2011

Hello, world!

It's a sentiment I can express in at least ten languages:

B:
 main()
 {
   extrn a, b, c;
   putchar(a); putchar(b); putchar(c); putchar('!*n');
 }
 a 'Hell';
 b 'o, w';
 c 'orld';

C:

 #include <stdio.h>
 int main()
 {
        printf("Hello, world!\n"); 
        return 0;
 }
 
C++:
 #include <iostream> 
 int main()
 {
        std::cout << "Hello, world!\n";
        return 0;
 }

Python:
print("Hello, world!") 
 
BASIC:
PRINT "Hello, world!"
 
Visual Basic:
 MsgBox "Hello, world!"
 
TI-BASIC:
 Disp "Hello, world!"          (on a TI-89, of course)
 
Perl:
 print "Hello World.";
 
Mathematica:
 Print["Hello, world!"]
 
MATLAB:
 disp('Hello, world!')
 
Brainfuck:
 
 ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<++++
 +++++++++++.>.+++.------.--------.>+.>.
 
Okay, that last one I copy-pasted.  But you get the idea.

The purpose of this blog is to post stuff that I'm thinking about, and to
serve as a repository for experiments of several types, from grinding to
DIYbio to brain training.  Hope you enjoy it ;-)

~Ian










No comments:

Post a Comment

Anything which is both a known logical fallacy and a personal insult will be mercilessly mocked all the way to fictional hell, and anything which is one or the other will be relentlessly rebuked. I am an unconditional proponent of free speech, and as such open debate is always welcome. This means that disemvowelling and temporary suspension will only be used when commenters have shown that they are nothing more than flamers. Commenters will only be banned completely when they post information that can actively harm another individual, such as docs. Anonymous comments are disallowed to weed out cowardly flamers who hide behind anonymity. If you play nice, this may change in the future :-)