Difference between revisions of "Arch is the best"

From ArchWiki
Jump to: navigation, search
(Translations)
m (Minor correction to php version)
Line 193: Line 193:
  
 
'''PHP''' - a PHP version
 
'''PHP''' - a PHP version
  <?
+
  <?php
 
     echo 'Arch is the best!\n';
 
     echo 'Arch is the best!\n';
 
  ?>
 
  ?>

Revision as of 14:22, 16 August 2010

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Arch is the best#)

Purpose

The Arch is the best project is a very sophisticated and exquisite, ego-boosting and mind-blowing (albeit perhaps a bit over-engineered) project which aims to prove Arch's superiority.

History

The project was initiated in April 2008 by long time Arch community member lucke as a simple shell script which provided irrefutable proof that "Arch is the best". Over the following weeks, this project gathered momentum and was ported to multiple different languages, both programming and verbal.

The Code

The "Arch is the best" project is ported to many programming languages.

Ada - A pascal dialect

with Ada.Text_IO;
use Ada.Text_IO;
procedure ArchIsTheBest is
begin
   Put_Line("Arch is the best!");
end HelloWorld;

Awk

BEGIN {
   print "Arch is the best!"
}

Portable GNU assembler - as -o arch.o arch.s && ld -o arch -O0 arch.o

   .section .data
archIsBest:	
   .ascii 	"Arch is the best!\n"
archIsBest_len:
   .long 	. - archIsBest
   .section .text
   .globl _start
_start:
   xorl %ebx, %ebx
   movl $4, %eax	
   xorl %ebx, %ebx
   incl %ebx	
   leal archIsBest, %ecx
   movl archIsBest_len, %edx	
   int $0x80	
   xorl %eax, %eax
   incl %eax
   xorl %ebx, %ebx	
   int $0x80

Bash - the original program, should be compatible with any shell

#!/bin/bash

echo "Arch is the best!"

Bash (Alternate) - handy for piping the output to your favourite IRC/email/IM client. Should work with any shell.

#!/bin/bash
yes Arch is the best!

C - note the three space indenting used in this project, much like that used by other superior beings.

#include <stdio.h>
#include <stdlib.h>
int main () 
{
   printf(Arch is the best!\n");
   return EXIT_SUCCESS;
}

C++ - Arch == Linux++

#include <iostream>
#include <cstdlib>
int main ()
{
   std::cout << "Arch is the best!" << std::endl;
   return EXIT_SUCCESS;
}

Clojure - A Lisp dialect that runs on the JVM

(def translations {"english" "Arch is the best!",
                   "german" "Arch ist das Beste!",
                   "australian" "Arch is fair dinkum, mate!",
                   "h4x0r" "arhc 51 7he be57!",
                   "spanish" "¡Arch es el mejor!"})

(defn arch-is-the-best
  "Asks for a language and prints the corresponding translation.                                              
   Loops until input is 'quit'"
  []
  (println "Available languages: ")
  (doseq [language (keys translations)]
    (println (str "\t" language)))
  (flush)
  (loop []
    (print "Enter language, or quit: ")
    (flush)
    (let [input (. (read-line) toLowerCase)]
      (if (= input "quit")
	 (println "Goodbye!")
        (do
          (println (translations input "Bad input!"))
          (recur))))))

Common Lisp - Tested on SBCL, feel free to add more of the translations in

#!/usr/bin/sbcl --script
(defparameter *best-list* '((English "Arch is the best!")
 			     (Chinese "Arch, 她出类拔萃!")
			     (German "Arch ist das Beste!")
			     (Greek "Το Arch είναι το καλύτερο!")))
(defun aitb ()
  (format t "Available languages: ~{~{~@(~a~)~*~}~^, ~}.~%" *best-list*)
  (loop for input = (progn (format t "~&Input the desired language, (or 'quit'): ~%")
                           (force-output)
                           (read-line))
     if (string-equal input "quit")
     do (loop-finish)
     else
     do (let ((language-def
               (assoc input *best-list*
                      :key (lambda (lang) (symbol-name lang))
                      :test #'string-equal)))
          (if language-def
              (format t "~&~A~%" (second language-def))
              (format t "~&Invalid language.~%"))))
  (format t "~&May the Arch be with you!~%"))
(aitb)

Go - A language created by Google that's a love child between C, C++ and Python

package main

import "fmt"

func main() 
{
  fmt.Printf("Arch is the best!\n")
}


Haskell - The language where IO is easy and unproblematic

main = putStrLn "Arch is the best!"

Lua

if io.popen("uname -r"):read():match("ARCH") then print("Arch is the best") else print("Get the Arch") end

OCaml

print_endline "Arch is the best!"

Python - a python version

#!/usr/bin/env python

print 'Arch is the best!'

Ruby - a Ruby version

#!/usr/bin/ruby -w

puts 'Arch is the best!'

Shoes - A Ruby version using Shoes for a GUI

Shoes.app :width => 135, :height => 30 do 
    para "Arch is the Best!"
end

Standard ML

print "Arch is the best!\n"

Perl - a Perl version

#!/usr/bin/perl

print "Arch is the best!\n";

Prolog - a version in Prolog

format('Arch is the best~n',[]).

Common Lisp - should run on any implementation (Clisp, Allegro, SBCL...)

(princ "Arch is the best!")

brainf*ck - doesn't the language name exaplain it?

++>++++++>+++++<+[>[->+<]<->++++++++++<]>>.<[-]>[-<++>]
<----------------.---------------.+++++.<+++[-<++++++++++>]<.
>>+.++++++++++.<<.>>+.------------.---.<<.>>---.
+++.++++++++++++++.+.<<+.[-]++++++++++.

LOLCODE - why not?

HAI
CAN HAS STDIO?
VISIBLE "ARCH IS TEH PWNZ LOL!"
KTHXBYE

Befunge - believed to be the first two-dimensional, ASCII-based, general-purpose (in the sense of "you could plausibly write Hunt the Wumpus in it") programming language

<v"Arch is the best!"0
 <,_@#:

PHP - a PHP version

<?php
   echo 'Arch is the best!\n';
?>

JavaScript - a JavaScript version

<script type="text/javascript>
   alert('Arch is the best!');
</script>

Java - an extremely portable language, this will run on pretty much anything, it might even run on your toaster!

public class ArchIsTheBest {
   public static void main(String[] args) {
       System.out.println("Arch is the best!");
   }
}

Scheme - a dialect of Lisp

(display "Arch is the best!\n")

R - a language for statistical computing (and much more!).

archIsBest <- function() { cat("Arch is the best!\n") }
archIsBest()

Tcl/Tk

#!/usr/bin/env tclsh
puts "Arch is the best!"

Pixilang - make me pixels

print("Arch is the best!",0,0,#1897D1)
frame

Objective-C

NSLog(@"Arch is the best!");

Translations

Arabic

ارتش هو الأفضل

Australian

Arch is fair dinkum, mate!

Bahasa Indonesia

Arch terbaik!

Basque

Arch onena da!

Bengali

Arch shobcheye bhalo!

Binary ASCII

0100000101110010011000110110100000100000011010010111001100100000011101000110100001100101001000000110001001100101011100110111010000100001

British

Arch is simply spiffing.

Bulgarian

Арч е най-добрия!

Chinese (Simplified)

Arch 最棒了!

Ancient Chinese

阿祺,盡善矣。

Czech

Arch je nejlepší!

Danish

Arch er bedst!

Desrever (Reversed)

!tseb eht si hcrA

Dutch

Arch is de beste!

Finnish

Arch on paras!

Filipino

Mabuhay ang Arch!

French

Arch est le meilleur!

Galician

Arch é o mellor!

German

Arch ist das Beste!

Greek

Το Arch είναι το καλύτερο!

h4x0r

Arch 15 7h3 b357!

Hantec

Arch je nejbetélnější!

Hebrew

ארצ' זה הכי אחי!

Hexadecimal ASCII

4172636820697320746865206265737421

Hindi

आर्ख सब से अच्छा है ।

Hungarian

Az Arch a legjobb!

Japanese

Archが一番ですよ!

Kazakh

Арч - ең жақсы!

Latin

Arch optimus est!

Latvian

Arch ir labākais!

Marathi

आर्च सगळ्यात भारी आहे!

Norwegian

Arch er best!

Polish

Arch jest najlepszy!

Portuguese

Arch é o melhor!

Québécois

Arch est le plus meilleure du monde!

Romanian

Аrch e cel mai bun!

Russian

Арч - лучший!

Serbian

Arch je najbolji!

Slovenian

Arch je najboljši!

Spanish

¡Arch es el mejor!

Swedish

Arch är bäst!

Turkish

Arch en iyisidir!

Tamil

ஆர்ச்சே சிறந்தது!

Morse Code

..- -... ..- -. - ..- / .. ... / - .... . / -... . ... -

Braille

⠁⠗⠉⠓⠀⠊⠎⠀⠮⠀⠃⠑⠎⠞⠲

Links