Name: Anonymous 2009-03-14 12:45
(begin
(display "Hello World") (newline)
)
(display "Hello World") (newline)
)
(begin
(display "Hello World") (newline)
)(format t
"You are not welcome here.")
putStrLn "Hello, what's your name?" >> getLine >>= \x -> putStrLn $ x ++ " is a faggot."
#include <iostream>
using std::cout;
using std::endl;
int main() {
cout << "Stop using toy languages, please." << endl;
return 0;
}
print "You are all faggots"
"toy languages rule!\n".each_byte{|c|print c.chr}
putStrLn "Hello, what's your name?" >> getLine >>= putStrLn . (++ " is a faggot.")data Colour = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White deriving (Show, Read, Enum, Bounded)
colour c bold = putStr $ "\x1B[" ++ (if bold then "1" else "0") ++ ";" ++ show (fromEnum c + 30) ++ "m"
resetColour = putStr "\x1B[m"
-- Proper behaviour with nested calls is left as an exercise to the reader.
withColour c b a = bracket (colour c b) (const resetColour) (const a)
#include <stdio.h>
char *getLineR(FILE *in_stream, char *line, int n)
{
char c = fgetc(in_stream);
if (c != '\n') {
line = getLineR(in_stream, line, n + 1);
}
else {
line = malloc((n+2)*sizeof(char));
if (line == NULL) exit(1);
line[(n+1)] = '\0';
}
line[n] = c;
return line;
}
int main()
{
char c, *line;
printf("Hi.");
line = getLineR(stdin, NULL, 0);
while (strcmp(line, "bye") != 0) {
printf("I know you said \"%s\", but no you're a faggot.\n", line);
line = getLineR(stdin, NULL, 0);
}
printf("Bye, faggot\n\n");
return 0;
}
#include <stdlib.h>
["Toy","Languages","Suck"].each{|s|eval("class "+s+";end;puts "+s+".new.class.to_s.downcase")}