28/03/10

Weird Programming Languages

Para quem está sempre a dizer mal do Haskell e do Prolog, aqui vão uns Hello Worlds em linguagens bem mais parvas:

Brainfuck:

++++++++++[>+++++++>++++++++++>+++>+<<<<]>++.>
+.+++++++..+++.>++.<<+++++++++++++++.>.+++.——.——–.>+.>.


Intercal:

DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP


E a melhor de todas, Chef:

Hello World Souffle.

This recipe prints the immortal words "Hello world!", in a basically brute force way. It also makes a lot of food for one person.

Ingredients.
72 g haricot beans
101 eggs
108 g lard
111 cups oil
32 zucchinis
119 ml water
114 g red salmon
100 g dijon mustard
33 potatoes
12 turtles


Method.
Put turtles into the mixing bowl. Put potatoes into the mixing bowl. Put dijon mustard into the mixing bowl. Put lard into the mixing bowl. Put red salmon into the mixing bowl. Put oil into the mixing bowl. Put water into the mixing bowl. Put zucchinis into the mixing bowl. Put oil into the mixing bowl. Put lard into the mixing bowl. Put lard into the mixing bowl. Put eggs into the mixing bowl. Put haricot beans into the mixing bowl. Liquify contents of the mixing bowl. Pour contents of the mixing bowl into the baking dish.

Serves 1.


Eu próprio experimentei está última:




De referir, que fui eu quem adicionou as tartarugas ao exemplo do site oficial, para que aparecesse uma linha nova depois do "Hello World". A quantidade de cada um dos ingredientes corresponde ao código decimal ASCII que é convertido posteriormente pela invocação: "Liquify contents of the $variavel"


Mais em:
http://www.babelmachine.com/top-10-weird-programming-languages



P.S. "Hello World" em Haskell:
main = putStrLn "Hello, World!"

5 comentários:

Cláudia disse...

Gosto da chef. xD

geek 010 disse...

num mintas xD

Cláudia disse...

Não minto! Essa receita parece mesmo saborosa =')

geek 100 disse...

Ainda estou em choque com a linguagem chef! Coitadas das tartarugas x.x não mereciam x.x

F3N1X disse...

OMFG... Awesome