ADA

What about ADA ?

Here is an ADA implementation. Tested with gnat 4.1

with Ada.Text_IO;

procedure Best is
begin
   Ada.Text_IO.Put_Line("Arch is the best!");
end Best;

~ Arnaud MAZIN, 2008-06-05 10:13:16

ASP

Assembler (All Variants)

Motorola M68HC12 port

In an effort to spread Arch's word to new places, I've ported this super-app to the Motorola M68HC12 platform. The source code is untested and provided as is. The author is not responsible if your microcontroller stops working, catches fire or blows up. The author is *totally* responsible if the microcontroller starts working better, or if you get a raise as a result of using this program.

    ORG    $0800
    LDX    $F684
    LDY    #str
loop:    LDAB    0, Y
    BEQ    done
    JSR    0, X
    INY
    BRA    loop
done:    SWI

str    DC.B    $41,$72,$63,$68,$20,$69,$73,$20,$74,$68,$65,$20,$62,$65,$73,$74,$21,$00

~ peart, 2008-05-14 14:19:56

x86 Implementation

I decided to take it upon myself to port this wonderful program to a few other languages.

    SECTION .data

    msg    db    "Arch is the best!",0xa ; 
    len    equ     $ - msg

    SECTION .text
    global main

main:
        mov     eax,4        ; write system call
        mov     ebx,1           ; file (stdou)
        mov     ecx,msg         ; string
        mov     edx,len         ; strlen
    int     0x80        ; call kernel

    mov    eax,1        ; exit system call
        mov     ebx,0      
        int     0x80        ; call kernel

~ sco50000, 2008-05-14 14:28:45

AWK

AWK from script

load the interpreter and self executing

#!/usr/bin/awk -f
BEGIN {print "Arch is the best!"}

~ Starchox, 2008-07-10 08:27:43

B

B Port

We have had ports to C and D so here are B and E

/* Archbest in B */

main() {
  extern a, b, c, d;
  putchar (a); putchar (b); putchar (c); putchar (d); putchar ('!*n');
}

a 'arch' ;
b ' is ' ;
c 'the ' ;
d 'best' ;

~ The_Major, 2008-05-14 14:47:17

BASIC

BASIC Implementation

I decided to take it upon myself to port this wonderful program to a few other languages.

10 PRINT "Arch is the best!"

~ sco50000, 2008-05-14 14:29:03

Loopy!

Why not a BASIC version? (yabasic)

10 CLEAR SCREEN
20 PRINT "ARCHLINUX IS THE BEST!"
30 SLEEP 2
40 GOTO 20

~ Mariuccio, 2008-05-14 14:34:21

Casio Basic

Tested on a Casio CFX-9850GB Plus Calculator

"Arch Is Best"

Or Alternatively

Blue, "Arch IS Best"

~ , 2008-08-27 18:26:15

Casio Basic

Tested on a Casio CFX-9850GB Plus Calculator

"Arch Is Best"

Or Alternatively

Blue, "Arch Is Best"

~ Zeist, 2008-08-27 18:26:31

Befunge

I hurt my brain doing this.

Here it is in Befunge

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

~ Barrucadu, 2008-05-14 14:45:53

Bengali

Brainfuck

For the sake of readability and simplicity

I know that this bf program is far from beeing optimized using 4 bytes of data memory yet it is quite stable on my setup. I think that we should settle up on a cli version creating gui as a frontend. A separate library with bindings for different languages would be even better thing. This way one could easily implement a nicely scalable solution for whole hosts farms using client—server paradigm. With code below I wanted to create only a rapid prototype (hence the language choice) but IMO more universal facility with various backends would be a definite go.

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

~ TheBodziO, 2008-05-14 14:12:44

C

C Implementation

I decided to take it upon myself to port this wonderful program to a few other languages.

#include <stdio.h>

int main (void)
{
    print "Arch is the best!\n";
    return 0;
}

~ sco50000, 2008-05-14 14:27:02

Kernel Patch

This patch has been submitted to Linus, unfortunately he said it needed to be tested - and may be merged into upstream around linux-3.0.x, or linux-3.2.x.

printk ("Arch is the best");

~ ckristi, 2008-05-14 14:35:17

Kernel Module

Since we can't wait until linux-3.0.x and definitely not linux-3.2.x, we wrote a patch.

/* aitb.c - "Arch Is The Best!" kernel module
 */
#include <linux/module.h> 
#include <linux/kernel.h>


int init_module(void)
{
   printk("Arch is the Best!\n");
    
   return 0;
}


void cleanup_module(void)
{
  printk(KERN_ALERT "Removing aitb module...\n");
  printk(KERN_ALERT "Arch is still the Best!\n");
}

~ firewalker, 2008-05-14 14:37:31

C++

A 'faster' program.

bash scripts are to slow, so I rewrote it in C. should not forget compile instructions: gcc -o best best.c or for gentoo users: gcc -O3 -fomit-frame-pointer -march= -o best best.c

#include <stdio.h>

int main (int argc, char **argv)
{
    fputs("Arch is the best!\n",stdout);
}

~ qball, 2008-05-14 14:03:49

A GUI 'faster' program.

Since the CLI version has been superceeded by a GTK version, here it is.

#include <gtk/gtk.h>

int main (int argc, char **argv)
{
    GtkWidget *dialog;

    gtk_init(&argc, &argv);
   
    dialog = gtk_message_dialog_new_with_markup(NULL, 0,GTK_MESSAGE_INFO,GTK_BUTTONS_CLOSE, "<span size='xx-large' weight='bold'>Arch is the best!</span>");
    gtk_dialog_run(GTK_DIALOG(dialog));
    gtk_widget_destroy(dialog);
}

~ qball, 2008-05-14 14:04:55

Obfusticated...

Some form of weird obfusticated C++. Kudos to you if you can decypher it.

#define _(_,___,__,____) ___ ## _ ## ____ ## __
_(o,v,d,i) __(_(h,c,r,a)*___){_(h,c,r,a)*____=\
___;_(o,d,,){_(ut,p,ar,ch)(((*____==0x23)?0x14:
*____)-0xa);}_(h,w,le,i)(*++____);}_(n,i,,t) _(
a,m,n,i)() {__("K|mr*s}*~ro*lo}~+#");}

~ venox, 2008-05-14 14:10:07

C++ Implementation

I decided to take it upon myself to port this wonderful program to a few other languages.

#include <iostream>
using namespace std;

int main ()
{
    cout << "Arch is the best!\n";
    return 0;
}

~ sco50000, 2008-05-14 14:27:18

CASIO-BASIC

Amazing displaying for CASIO (Graph 35+,65+,85)

That will show the truth itself on your screen right after you launch it. Copy-paste this into gasetta.

\ClrText
\Locate 1,1,"Arch is the best"
\Stop

~ Dream_Team, 2008-05-20 18:59:53

CASIO Graph (35+,65+,85) Screensaver

The truth itself (TM) will bounce on your screen if you run it while you are afc (away from calculator). May run amazingly too fast on Graph 85, might spread awesomeness around you. Copy-paste this directly into gasetta and transfer.

1\->A~F
\While 1
A\->C
B\->D
A+E\->A
B+F\->B
A=1\=>1\->E
A=7\=>\(-)1\->E
B=1\=>1\->F
B=5\=>\(-)1\->F
\ClrText
\Locate B,A,"Arch is the best !"
\WhileEnd

~ Dream_Team, 2008-05-20 19:02:16

COBOL

COBOL sure makes this difficult...

Hay guise, I ported this to cobol

000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID.     ARCHISTHEBEST.
000300
000400*
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER. RM-COBOL.
000800 OBJECT-COMPUTER. RM-COBOL.
000900
001000 DATA DIVISION.
001100 FILE SECTION.
001200
100000 PROCEDURE DIVISION.
100100
100200 MAIN-LOGIC SECTION.
100300 BEGIN.
100400     DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
100500     DISPLAY "Arch is the best!" LINE 15 POSITION 10.
100600     STOP RUN.
100700 MAIN-LOGIC-EXIT.
100800     EXIT.

~ phrakture, 2008-05-14 14:14:33

Common Lisp

Don't forget Common Lisp...

don't forget Common Lisp. This works in the "clisp" dialect.

(with-open-stream (uname-r (ext:run-shell-command "uname -r" :output :stream))
  (if (search "ARCH" (read-line uname-r))
    (format t "Arch is the best!")
    (format t "Get a proper Distribution - Arch Linux is the best!")))

~ danielsoft, 2008-05-14 14:17:07

D

Phobos Library Implementation

I'm surprised nobody has done this in the D programming language yet. Nah, not really. That was sarcasm.

import std.stdio;                                                                           

void main()
{                                                                                           
    writefln("Arch is the best!");
}

~ peart, 2008-05-14 14:39:19

Tango Library Implementation

I'm surprised nobody has done this in the D programming language yet. Nah, not really. That was sarcasm.

import tango.io.Stdout;

void main()                                                                                 
{                                                                                           
    Stdout("Arch is the best!").newline;
}

~ peart, 2008-05-14 14:39:35

E

E Port

We have had ports to C and D so here are B and E

# Archbest in E

println("Arch is the best!")

~ The_Major, 2008-05-14 14:47:35

Emacs Lisp

Emacs OS^H^HEditor Port

Here's a port to the emacs operating system^W^Weditor, including support for prefix arguments:

(defun arch-is-best (&optional count)
  (interactive "p") 
  (if count
      (dotimes (i count)
    (arch-is-best))
    (insert "Arch is the best!")))
;; make sure it gets used often enough ;)
(global-set-key (kbd "C-x") 'arch-is-best)
(global-set-key (kbd "M-x") 'arch-is-best)

~ Asgaroth, 2008-05-14 14:44:19

Erlang

Erlang. Usage: $ erl 1> c(arch). {ok,arch} 2> arch:arch_is_the_best(). Arch is the best! ok

-module(arch).
-export([arch_is_the_best/0]).

arch_is_the_best() -> io:fwrite("Arch is the best!\n").

~ wuischke, 2008-05-14 14:41:14

Firefox

Arch is the best! Firefox Plugin

Ok, here is now the Firefox addon to have a better Archlinux is the best!'s web 4.0 experience. It's provide a contextual menu to be informed if Archlinux is the best!, change the page title, change buttons, change links, fill inputs, change links and change the page. There is a Archlinux is the best! pagerank system, with an icon showing information about the current Archlinux is the best! status of the page, who can of course improved with the menu x].

http://theglu.org/archisthebest.xpi

~ the_glu, 2008-05-14 15:13:53

FreePascal

FreePascal Implementation

I rewrote in FreePascal. Save the file as archisbest.pas To compile: fpc archisbest.pas

program archisbest;

begin
  writeln('Arch is the best');
end.

~ XChrisX, 2008-05-14 14:13:39

Haskell

Simple

Simple, in accordance with The Arch Way.

main = do putStrLn "Arch is the Best!"

~ adekoba, 2008-05-14 14:38:39

Java

Very portable code

This one should also be added ... Run it .. javac ArchlinuxIsTheBest.java java ArchlinuxIsTheBest It works on windows, mac, linux, bsd, solaris .... (portable, WORA code)

public class ArchlinuxIsTheBest {
    public static void main(String args[]) {
        System.out.println("\nArch is the best!!\n");
    }
}

~ paramthegreat, 2008-05-14 14:33:23

Public Key Verification

Hi all. I developed a java version of the program which provide two functionalities: - create a signed file of the message "ArchLinux is the best!" and export the public key - verify that a signed message file is the really true and correct message "ArchLinux is the best!" I used a self-signed certificate, but we can ask for a certificate form a recognized Certification Authority, in this way we could distribute a signed and secured "ArchLinux is the best!" message around the World. Here a demonstration code:

[Signer]
package it.la41318.archlinux;

import java.io.FileOutputStream;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.SecureRandom;
import java.security.Signature;

public class ArchLinuxSigner
{

    public static void main(String[] args)
    {
        try
        {
            KeyPairGenerator keyGen=KeyPairGenerator.getInstance("DSA", "SUN");
            
            SecureRandom random=SecureRandom.getInstance("SHA1PRNG", "SUN");
            keyGen.initialize(1024, random);
            
            KeyPair pair = keyGen.generateKeyPair();
            PrivateKey priv = pair.getPrivate();
            PublicKey pub = pair.getPublic();
            
            Signature dsa = Signature.getInstance("SHA1withDSA", "SUN");
            dsa.initSign(priv);
            
            dsa.update("ArchLinux is the best!".getBytes());
            
            byte[] realSig = dsa.sign();
            
            FileOutputStream sigfos = new FileOutputStream("archlinux.signature");
            sigfos.write(realSig);
            sigfos.close();
            
            byte[] key = pub.getEncoded();
            FileOutputStream keyfos = new FileOutputStream("archlinux.pk");
            keyfos.write(key);
            keyfos.close();
            
        } catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

[Verifier]
package it.la41318.archlinux;

import java.io.FileInputStream;
import java.security.KeyFactory;
import java.security.PublicKey;
import java.security.Signature;
import java.security.spec.X509EncodedKeySpec;

public class ArchLinuxMessage
{

    public static void main(String[] args)
    {
        try
        {
            FileInputStream keyfis = new FileInputStream("archlinux.pk");
            byte[] encKey = new byte[keyfis.available()];  
            keyfis.read(encKey);
            keyfis.close();
            
            X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(encKey);
            KeyFactory keyFactory = KeyFactory.getInstance("DSA", "SUN");
            PublicKey pubKey = keyFactory.generatePublic(pubKeySpec);
            
            FileInputStream sigfis = new FileInputStream("archlinux.signature");
            byte[] sigToVerify = new byte[sigfis.available()]; 
            sigfis.read(sigToVerify);
            sigfis.close();
            
            Signature sig = Signature.getInstance("SHA1withDSA", "SUN");
            sig.initVerify(pubKey);
            
            sig.update("ArchLinux is the best!".getBytes());

            boolean verifies = sig.verify(sigToVerify);
            
            if (verifies) System.out.println("Yes, ArchLinux is the best!");
            else System.out.println("ATTENTION: this is not the real ArchLinux message");
        } catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}

~ pulsar1971, 2008-05-14 14:40:34

LOLCODE

LOLCODE implementation

Truely, LOLCODE is the only language suitable for this purpose.

HAI
CAN HAS STDIO?
VISIBLE "Arch is the best !"
KTHXBYE

~ Dream_Team, 2008-05-14 14:07:39

Lua

Slim Uname Implementation

I have made a lua version, it is much slimmer.

#/!bin/lua

if os.execute("uname -r "):match("ARCH") then
    print("Arch is the best!")
else
    print("Get a proper Distribution - Arch Linux is the best!")
end

~ Issh, 2008-05-14 14:11:21

Lush

Reimplementing GUI in Lush

OMG I CAN HAZ WINDOWS 'N STUFF

#!/usr/bin/lush
(ogre)

(setq ww (new windowobject 0 0 120 25 "Best!"
          (setq c1 (new column (new string "Arch is the best!")))))
                     
(new timer 2000 (lambda(c) (==> ww delete)))
(wait ww)

~ hrist, 2008-05-14 14:05:54

Reimplementing CLI in Lush

For friends of cli

#!/usr/bin/lush
(print "Arch is the best!")

~ hrist, 2008-05-14 14:06:21

Perl

Perl Implementation

I decided to take it upon myself to port this wonderful program to a few other languages.

#!/usr/bin/perl
print "Arch is the best!\n";

~ sco50000, 2008-05-14 14:25:41

A good example for "There is more than one way to do that"

Description? Nobody needs that! (Overcomplicated version!)

#!/usr/bin/perl
@iabt=("si","hcrA","tseb","eht");for($i=0;$i<2;$i++){push(@iabt,shift(@iabt));}@iabt=reverse@iabt;$okaythisisthelastvariableusedinthisscriptofabsouluteuselessfunctionalitythisscriptcouldvebeencodedjustbymodifyingasimplehelloworldprogramsowhyamidoingitthehardwayidontknowbutwritingthisoverlongvariableisprettyfunyoushouldtrythissomewhentoo=0;foreach(@iabt){$_=reverse scalar$_;if($okaythisisthelastvariableusedinthisscriptofabsouluteuselessfunctionalitythisscriptcouldvebeencodedjustbymodifyingasimplehelloworldprogramsowhyamidoingitthehardwayidontknowbutwritingthisoverlongvariableisprettyfunyoushouldtrythissomewhentoo==3){print$_."!\n";exit 0;}print $_." ";$okaythisisthelastvariableusedinthisscriptofabsouluteuselessfunctionalitythisscriptcouldvebeencodedjustbymodifyingasimplehelloworldprogramsowhyamidoingitthehardwayidontknowbutwritingthisoverlongvariableisprettyfunyoushouldtrythissomewhentoo = $okaythisisthelastvariableusedinthisscriptofabsouluteuselessfunctionalitythisscriptcouldvebeencodedjustbymodifyingasimplehelloworldprogramsowhyamidoingitthehardwayidontknowbutwritingthisoverlongvariableisprettyfunyoushouldtrythissomewhentoo + 1;}

~ CuleX, 2008-05-14 16:15:57

PHP

PHP Implementation

I decided to take it upon myself to port this wonderful program to a few other languages.

#!/usr/bin/php
<?php
echo "Arch is the best!\n";
?>

~ sco50000, 2008-05-14 14:26:40

PHP/GD Implementation

I decided to take it upon myself to port this wonderful program to a few other languages.

<?php
header("Content-type: image/gif");
$rscImage    = imagecreatetruecolor(80, 25);
$intFontC    = imagecolorallocate($rscImage, 255, 255, 255);
$intBGC        = imagecolorallocate($rscImage, 0, 0, 0);
imagestring($rscImage, 2, 5, 5, "Arch is the best!", $intFontC);
imagegif($rscImage);
imagedestroy($rscImage);
?>

~ sco50000, 2008-05-14 14:29:30

Piet

Piet, anyone?

Yes. Piet DOES store its source code in images, how cool is that!?

http://img181.imageshack.us/img181/1876/archpietpe5.png

~ tm8992, 2008-05-14 14:19:00

PKGBUILD

PKGBUILD to say that Arch is the best!

Untested (wow, it's been a while since I've written a PKGBUILD from scratch).

pkgname=best_script_in_the_world
pkgver=1.0
pkgrel=1
url="http://www.archlinux.org"
arch=('i686' 'x86_64')
license=('GPL')
source=()
md5sums=()

build()
{
    mkdir -p $startdir/pkg/usr/bin/
    echo #!/bin/sh >> $startdir/pkg/usr/bin/best_script.sh
    echo >> $startdir/pkg/usr/bin/best_script.sh
    echo 'echo "Arch is the best!"' >> $startdir/pkg/usr/bin/best_script.sh
   
    chmod a+x $startdir/pkg/usr/bin/best_script.sh
}

~ Cerebral, 2008-05-14 13:59:31

Kernel Module PKGBUILD + Sources

I've created a PKGBUILD for the kernel module now. I had to create a tar.gz with the source files, sorry.

http://www.file-upload.net/download-851633/aitb-kernel.tar.gz.html

~ CuleX, 2008-05-15 11:26:20

Postscript

Maybe not such a good idea

Run this on your printer and go and stick the output somewhere

%!PS
/Font /Helvetica-Bold findfont def
/FontSize 72 def

Font FontSize scalefont setfont

{newpath 0 0 moveto (Arch is the Best!) show showpage} loop

~ Borb, 2008-05-14 14:38:07

Pseudocode

A Simple Pseudocode

The great thing about pseudocode is that it is pseudo. It can be anything, as it is an abstract representation of code, which makes me = yay!

INCLUDE(io_libraries)

PRINT("Arch is the best!")

STOP()

~ Barrucadu, 2008-05-14 18:51:34

Python

Python Web Version

python web version(for administering the script remotely)

#!/usr/bin/env python
print 'Content-Type: text/html charset=utf-8'

print '''
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title>Superiority</title></head>
<body>
<h1>Arch is the best!</h1>
</body>
</html>
'''

~ ornitorrincos, 2008-05-14 14:07:02

Python Implementation

I decided to take it upon myself to port this wonderful program to a few other languages.

#!/usr/bin/python
print "Arch is the best!"

~ sco50000, 2008-05-14 14:26:12

GIMP Plugin

I need to contribute in a more meaningful way here. Ingredients: GIMP Python 3D modeler or image viewer that supports importing of .obj files An image saying "Arch is the best!" Place this script somewhere where GIMP can find it. Maybe your plug-in directory, or like I do, in a user defined Python directory. Please ignore the redundant math and amatuerish Python. Put your created image (see above edit) and place it in it's own directory for your own sanity. Go into that directory from the terminal and run (replace gimp-2.5 with gimp-2.4 if that's your version). This may take a bit depending on how fast your computer is. (Replace "base_image.png" with your image file. Keep the quotes): gimp-2.5 -inbdf '(python-fu-pic-to-obj RUN-NONINTERACTIVE "base_image.png" 10 )''(gimp-quit 1)' When finished, open the resulting file "base_image.png.obj" in your 3D modeler or viewer. WARNING: This is a severely high-poly image. Every pixel was mapped!

#! /usr/bin/env python
from gimpfu import *

def pic_to_obj(file_name, depth):
    
    if depth==0:
        depth = 1
    
    depth = float(1000/depth)
    
    FILE = open(file_name + ".obj", "w")
    firstline = "g " + file_name + ".obj\n\n"
    FILE.writelines( firstline )
            
    image = pdb.gimp_file_load(file_name, file_name)
    drawable = pdb.gimp_image_get_active_layer(image)
        
    if pdb.gimp_drawable_is_gray(drawable)!= True:
        pdb.gimp_image_convert_grayscale(image)
            
    width = pdb.gimp_image_width(image)
    height = pdb.gimp_drawable_height(drawable)
        
    for j in range(height):
        for i in range(width):
            num_channels, pixel = pdb.gimp_drawable_get_pixel(drawable, i, j)
            list = "\nv " + str(float(i)/10) + " " + str(float(j)/10) + " " + str(float(pixel[0])/depth)
            FILE.writelines(list) 
            
        
    FILE.writelines( "\n" )
        
    for l in range((width)*(height-1)-1):
        if((l+1)%width)!=0:
            list = "\nf " + str(l+1) + " " + str(l+2) + " " + str(l+width+2) + " " + str(l+width+1)
            FILE.writelines(list)
            
    

register(
  "pic_to_obj", "", "", "", "", "",
  "<Toolbox>/Xtns/Languages/Python-Fu/pic_to_obj", "",
  [
  (PF_STRING, "file_name", "file_name", "file_name"),
  (PF_FLOAT, "depth", "depth", "depth")
  ],
  [],
  pic_to_obj
  )

main()

~ skottish, 2008-05-14 14:42:49

PyGTK Implementation

Possibly not upholding the pricipal of "simplicity" that Arch loves.

#!/usr/bin/python

import pygtk
pygtk.require('2.0')
import gtk
import random

class ArchIsTheBest:
	def __init__(self):
		window = gtk.Window(gtk.WINDOW_TOPLEVEL)
		window.set_title("Arch is the best!")
		window.set_size_request(500,250)
		window.connect("delete_event", self.delete_event)
		window.connect("destroy", self.destroy)
		
		vbox = gtk.VBox(False, 0)
		window.add(vbox)
		vbox.show()
		
		textview = gtk.TextView(buffer=None)
		textviewb = textview.get_buffer()
		textviewt = "Arch is the best"
		textviewb.set_text(textviewt)
		textview.set_editable(False)
		textview.set_cursor_visible(False)
		textview.set_wrap_mode(True)
		vbox.pack_start(textview, True, True, 0)
		textview.show()
		
		button = gtk.Button(stock=gtk.STOCK_CLOSE)
		button.connect("clicked", lambda w: gtk.main_quit())
		vbox.pack_start(button, False, False, 0)
		button.set_flags(gtk.CAN_DEFAULT)
		button.grab_default()
		button.show()
		
		window.show()

	def delete_event(self, widget, event, data=None):
		return False
	
	def destroy(self, widget, data=None):
		gtk.main_quit()

	def main(self):
		gtk.main()

if __name__ == "__main__":
	archisthebest = ArchIsTheBest()
	archisthebest.main()

~ Barrucadu, 2008-05-14 14:48:55

Python/Tk Gui

Promotes Arch in the form of an smexy Tk dialog. (disclaimer: Might contain newbie code)

#!/usr/bin/env python

import Tkinter as tk
from sys import exit

THE_BEST = 'Arch is the best!'

class Dialog(object):
	def __init__(self, label):
		self.label = label
		top = tk.Tk()
		f = tk.Frame(top)
		f.pack()
		l_msg = tk.Label(f, text=self.label)
		l_msg.pack()
		b_exit = tk.Button(f, text='Ya, rly!', command='exit')
		b_exit.pack()
		top.mainloop()


def main():
	Dialog(THE_BEST)

main()

~ Mr.Elendig, 2008-05-29 19:23:35

Rexx

Linux Rexx Implementation

It should work under Linux with Regina, but I haven't done anything radical like, you know, test it.

/*arch_is_best.rexx*/
say 'Arch is the best!'

~ dunc, 2008-05-14 14:15:22

Amiga/UAE Rexx Implementation

If you have an Amiga or UAE this should be prettier, provided rexxreqtools.library is installed. This is great! I spent ages learning that language and I never get to use it any more.

/*arch_is_best_reqtools.rexx*/
options results
call addlib('rexxreqtools.library',0,-30,0)
req = rtezrequest('Arch is the best!','Better than AmigaOS?','Hey!')

~ dunc, 2008-05-14 14:16:04

Ruby

What, no Ruby?

i didn't see a ruby version..

#!/usr/bin/ruby -w

puts "Arch is the best!"

~ sehwoo, 2008-05-14 14:21:33

What, no Ruby?

i didn't see a ruby version..

#!/usr/bin/ruby -w

puts "Arch is the best!"

~ sehwoo, 2008-05-14 14:21:33

Ruby on Rails

Shellscript

Bash - The Original

This is the original code, should work with any shell.

#!/bin/sh

echo "Arch is the best!"

~ lucke, 2008-05-14 12:53:49

Bash - Alternate

Handy for piping the output through your favourite IRC/IM/email client to tell the world how you feel about Arch!

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

~ Pierre, 2008-05-14 13:03:17

A GUI version.

You can't expect newbie-ubuntu-users to manage to run it in the CLI all on their own! So here is a GUI version, which has some GNOME dependencies for them.

#!/bin/sh
/usr/bin/zenity --info --text "Arch is the best"

~ bavardage, 2008-05-14 14:01:48

A speedy Dash implementation

This checks the output of uname to decide if Arch is in use, and uses Dash because it's different from bash and it can.

#!/bin/dash
tmpfile=/tmp/$$.best.dash;echo $(echo -n $(uname -r))|perl -e'chomp($_=<STDIN>);print;'>$tmpfile;check=$(perl -e 'print <STDIN>'<$tmpfile | grep '\-ARCH');if [ $check ];then echo "Arch is the best!";else clear;echo "Get a proper Distribution - Arch Linux is the best!";fi;rm $tmpfile

~ CuleX, 2008-05-14 14:09:05

Another Uname Implementation

You can use shell's regexps to adapt to a new kernel version: this will just check the presence of the string "ARCH"

#!/bin/bash
arch=$(uname -r)
if [[ "$arch" =~ "ARCH" ]]; then
echo "Arch is the best!"
else
clear
echo "Get a proper Distribution - Arch Linux is the best!"
fi

~ danielsoft, 2008-05-14 14:10:44

Talking shell!

For the visually impaired. Requires the espeak package installed to work.

#!/bin/bash
echo "Arch is the best" | espeak

~ finferflu, 2008-05-14 14:45:06

Critical Notification

Based on danielsoft's script, but using libnotify. Urgency set to "critical" because it is, of course, vital that the user should be aware of Arch's superiority.

#!/bin/sh
arch=$(uname -r)
if [[ "$arch" =~ "ARCH" ]]; then
    notify-send -u critical 'Arch is the best!'
else
    notify-send -u critical 'Get a proper distribution...' 'Arch is the best!'
fi

~ dunc, 2008-05-14 22:46:51

SPL

The most amazing.

While all your efforts have been grand, none of your programs have properly captured the amazingness of Arch compared to the rest. Thusly, I have converted the application into SPL:

Ode to Arch Linux, a play in six parts.

The Ghost, also known as Judd, former ruler of Arch.
Arthur, the good sir Aaron, new overlord.
Hamlet, a die-hard Archer.
Ophelia, lover of other distributions.

                     Act I: Praise for the Rulers.
  
                     Scene I: Glory to He Who Started the Arch.

[Enter The Ghost and Hamlet]

Hamlet:
 Thou art as noble as the quotient between the sum of a cunning 
 gentle handsome trustworthy noble mighty honest hero and a cute 
 angel and a golden summer's day.

 Speak your mind!

The Ghost:
 You are as bold as the difference between a charming cunning 
 peaceful fair fine gentle happy Lord and the difference between
 a blossoming amazing warm rich smooth hero and the sum of a
 happy animal and a cat.

Hamlet:
 Thou art as big as the sum of thyself and the sum of a kingdom 
 and the sum of a huge blue cunning handsome hero and a loving 
 mighty noble sweet trustworthy rose.

 Speak your mind!

The Ghost:
 Speak YOUR mind!

Hamlet:
 Thou art as good as the difference between thyself and the sum
 of a prompt proud trustworthy King and a golden angel.

 Speak your mind!

The Ghost:
 You cunning happy honest noble mighty hero!  Speak your mind!

[Exit Hamlet]
                     Scene II: The torch passes on.

[Enter Arthur]

Arthur:
 You are as lovely as the sum of yourself and a rose.

 Speak your mind!

The Ghost:
 YOU are as lovely as the sum of myself and the sum of a beautiful
 blossoming red rose and a delicious thing!

 Speak your mind!
                     
[Exit The Ghost]

[Enter Hamlet]

Arthur:
 Speak your mind!

[Exit Hamlet]

                     Act II: Dismissal of the Outsider.
  
                     Scene I: Aaron Takes The First Volley.

[Enter Ophelia]

Ophelia:
 Thou art as rotten as the difference between thyself and a pig!
 
 Speak your mind!

Arthur:
 You are as vile as the difference between The Ghost and a cat!
 
 Speak your mind!

Ophelia:
 Thou art as evil as the sum of The Ghost and a dusty lying leech!

 Speak your mind!

[Exit Arthur]

[Enter Hamlet]

Ophelia:
 Speak your mind!

[Exit Hamlet]

                     Scene II: Judd takes a stab.

[Enter The Ghost]

Ophelia: 
 You are as hairy as the difference between thyself and the 
 difference between a devil and an oozing infected rotten toad!

 Speak your mind!

 You are as rotten as Arthur! 

 Speak your mind!

The Ghost:
 You are as half-witted as the difference between thyself and
 the sum of a foul fat-kidneyed distasteful pig and the sum of 
 an evil plague and a goat!

 Speak your mind!

 You are as miserable as the difference between thyself and a 
 beggar!

 Speak your mind!

[Exit The Ghost]

                     Act III: Final Glory.
  
                     Scene I: Ophelia gets TOLD.

[Enter Arthur]

Ophelia: 
 You hound!

 Thou art as rotten as the sum of thyself and a cat!

Arthur:
 You are as stupid as the difference between a hero and
 a foul little oozing smelly disgusting codpiece!

                     Scene II: Ophelia is Converted.

Arthur:
 Speak your mind!

Ophelia: 
 Thou art as noble as the sum of thyself and a hero!

Arthur:
 Am I worse than the sum of a hero and a brave hero?

 If so, we must proceed to scene II.

 You rose. Open your heart!

 You are as healthy as the sum of a brave noble loving 
 hero and a red rose. 

 Speak your mind!
 
[Exeunt]

~ Cerebral, 2008-05-14 14:20:49

SQL

Simple SQL

What about SQL?

SELECT "Arch is the best!"

~ prune, 2008-05-18 10:01:39

Reusable SQL

What about SQL? Or, for reuse...

DECLARE @Arch varchar(14);
SET @Arch = "Arch is the best!";

SELECT @Arch

~ prune, 2008-05-18 10:06:39

Tcl

Tcl, simple CLI

Barebones, but effective.

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

~ xelados, 2008-10-05 06:06:18

TeX

Simple TeX

TeX is great. But this greatness is severely diminished by not using it to proclaim Arch's superiority.

Arch is the best!
\end

~ Barrucadu, 2008-05-15 15:49:36

More complex...

An A4 document proclaiming Arch's superiority!

\documentclass[11pt,a4paper]{scrartcl}
\usepackage{ifpdf}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\title{Arch is the best!}
\author{Barrucadu}
\date{\today}
\ifpdf
\pdfinfo {
	/Author (Barrucadu)
	/Title (Arch is the best!)
	/Subject (Arch is the best!)
	/Keywords (Arch)
	/CreationDate (D:20080515160447)
}
\fi
\begin{document}
	\maketitle
	Arch is the best!
\end{document}

~ Barrucadu, 2008-05-15 16:01:37

Thue

TI-BASIC

TI-BASIC, 68k

Now ported to TI calculators: TI-BASIC, 68k

:archbest()
:Prgm
:RclPic arch
:Dialog
:  Title "Arch is the Best"
:  Text "Arch is the best!"
:EndDlog
:DispHome
:EndPrgm

~ MetalRandomist, 2008-05-14 14:43:14

TI-BASIC, 83plus-compatible

Now ported to TI calculators: TI-BASIC, 83plus-compatible

:CoordOff
:GridOff
:AxesOff
:LabelOff
:ExtrOff
:FnOff
:ClrDraw
:DispGraph
:"ARCH IS THE BEST!!! :)->Str0
:1->A
:For(X,1,22
  :randInt(0,22->B
  :9->C
  :Repeat B=A and C=1
    :Text(C6,B4,"    "
    :B+(B<A)-(B>A->B
    :If C≠1:C-1->C
    :Text(C6,B4,sub(Str0,A,1
  :End
  :If C:Then
    :Text(C6,B4,"    "
    :Text(0,B4,sub(Str0,A,1
  :End
  :A+1->A
:End
:Pause
:ClrGraph
:AxesOn
:ClrHome

~ MetalRandomist, 2008-05-14 14:43:34

Visual Basic

We can't exclude Windows users from knowing the truth!

We wouldn't want our friends in Redmond to feel slighted, so I have ported this to Microsoft Visual Basic 6: A VB.NET version is now in development.

Module Superiority
  Sub Main()
      MsgBox("Arch is the best!") 
  End Sub
End Module

~ tigrmesh, 2008-05-14 14:18:13

Visual Basic.NET

Redmond are going to LOVE this!

Finally, a VB.NET implementation for us to call our own and love.

Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        MessageBox.Show("Arch is the best", "Arch is the best", MessageBoxButtons.OK, MessageBoxIcon.Information)
    End Sub
End Class

~ prune, 2008-05-14 14:30:17

Whitespace

Whitespace port

This code is so secret, you can print it out and nobody will be able to read it!

   	     	
	
     			  	 
	
     		   		
	
     		 	   
	
     	     
	
     		 	  	
	
     			  		
	
     	     
	
     			 	  
	
     		 	   
	
     		  	 	
	
     	     
	
     		   	 
	
     		  	 	
	
     			  		
	
     			 	  
	
     	    	
	
     	 	 
	
  

~ debris, 2008-05-14 14:31:16