You are not logged in.

#26 2008-04-19 14:59:17

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: A script proclaiming Arch's superiority

Added some dependency check instructions

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

He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#27 2008-04-19 15:01:12

qball
Member
Registered: 2004-04-02
Posts: 40
Website

Re: A script proclaiming Arch's superiority

bash scripts are to slow, so I rewrote it in C

#include <stdio.h>

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

edit: should not forget compile instructions:
gcc -o best best.c

or for gentoo users:
gcc -O3 -fomit-frame-pointer  -march=<your_arch>  -o best best.c

Last edited by qball (2008-04-19 15:04:28)

Offline

#28 2008-04-19 15:18:52

bavardage
Member
Registered: 2008-02-17
Posts: 160

Re: A script proclaiming Arch's superiority

You guys - you are developing the old version - we are using a GUI now.

Offline

#29 2008-04-19 15:27:01

qball
Member
Registered: 2004-04-02
Posts: 40
Website

Re: A script proclaiming Arch's superiority

Sorry

#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);
}

compile:  gcc -o best best.c `pkg-config --libs --cflags gtk+-2.0`

Offline

#30 2008-04-19 16:22:23

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: A script proclaiming Arch's superiority

I believe a project this big, sophisticated and important to Arch's community should have its own Flyspray category and its own project page on Arch's server.

Offline

#31 2008-04-19 17:03:54

insane
Member
Registered: 2006-06-04
Posts: 106

Re: A script proclaiming Arch's superiority

Any chance this package to make it in the core?

Offline

#32 2008-04-19 17:43:52

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: A script proclaiming Arch's superiority

We should add a wiki page about this.

(BTW, I didn't know qball was an archer, too big_smile)

Last edited by finferflu (2008-04-19 17:45:05)


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#33 2008-04-19 18:08:51

Eradest
Member
From: Germany
Registered: 2007-07-18
Posts: 56

Re: A script proclaiming Arch's superiority

edit: should not forget compile instructions:
gcc -o best best.c

or for gentoo users:
gcc -O3 -fomit-frame-pointer  -march=<your_arch>  -o best best.c

Absolutely cool, that gave me a 100% performance boost:

[me@machine archisbest]$ time ./best
Arch is the best!

real    0m0.002s
user    0m0.000s
sys     0m0.001s
[me@machine archisbest]$ time ./best_gentoo
Arch is the best!

real    0m0.001s
user    0m0.000s
sys     0m0.000s

Offline

#34 2008-04-20 13:33:54

hrist
Member
From: Germany
Registered: 2007-01-07
Posts: 61
Website

Re: A script proclaiming Arch's superiority

Reimplementing GUI and CLI in lush (aur)

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)

For friends of cli

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

two - Arch64 | dwm | nvidia
three - Arch64 | dwm | nvidia

Offline

#35 2008-04-20 16:00:42

ornitorrincos
Forum Fellow
From: Bilbao, spain
Registered: 2006-11-20
Posts: 198

Re: A script proclaiming Arch's superiority

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>
'''

Last edited by ornitorrincos (2008-04-20 16:01:21)


-$: file /dev/zero
/dev/zero: symbolic link to '/dev/brain'

Offline

#36 2008-04-20 16:29:54

Dream_Team
Member
Registered: 2006-01-06
Posts: 34

Re: A script proclaiming Arch's superiority

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

Fight our cause here . http://freesyko.co.nr

Offline

#37 2008-04-20 17:06:26

CuleX
Member
Registered: 2007-09-15
Posts: 107

Re: A script proclaiming Arch's superiority

Rasi wrote:

Added some dependency check instructions

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

That cannot handle the kernel version bumping. Consider this:

#!/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

Last edited by CuleX (2018-11-15 18:14:55)

Offline

#38 2008-04-20 17:42:33

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: A script proclaiming Arch's superiority

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

That's it! The only proper language for stuff like this is lolcode big_smile.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#39 2008-04-21 07:52:33

venox
Member
From: Curitiba, Brazil
Registered: 2003-08-23
Posts: 137
Website

Re: A script proclaiming Arch's superiority

This is the way <put a distro's name here> people would do 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}~+#");}

Edit: there was no need to include stdio.h tongue

Last edited by venox (2008-04-21 17:51:32)

Offline

#40 2008-04-21 10:50:36

Arkane
Member
From: Switzerland
Registered: 2008-02-18
Posts: 263

Re: A script proclaiming Arch's superiority

#include <stdio.h>
#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}~+#");}

...I give up.


What does not kill you will hurt a lot.

Offline

#41 2008-04-21 11:44:58

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: A script proclaiming Arch's superiority

Why doesnt it use XML?

Offline

#42 2008-04-21 12:11:45

danielsoft
Member
From: Czech Republic
Registered: 2008-02-16
Posts: 102

Re: A script proclaiming Arch's superiority

CuleX wrote:
Rasi wrote:

Added some dependency check instructions

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

That's undynamic. If the kernel version get's higher, eh? Here is some (Simple...) solution:

#!/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

NOTE: I'm currently LEARNING Perl. Thus, i can't do fucking fancy stuff with it.

BTW: THIS code is now licensed under the WTFPL2. Period.

in fact, 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

Last edited by danielsoft (2008-04-21 12:12:46)


may the Source be with you

Offline

#43 2008-04-21 18:21:57

Issh
Member
Registered: 2007-12-02
Posts: 58

Re: A script proclaiming Arch's superiority

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

Last edited by Issh (2008-04-21 18:22:11)

Offline

#44 2008-04-21 22:14:42

TheBodziO
Member
From: Dukla, Poland
Registered: 2006-07-28
Posts: 230
Website

Re: A script proclaiming Arch's superiority

Now… this is fun big_smile

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 above 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.


It's not the best thing when they call you a "member" you know… wink

Offline

#45 2008-04-21 23:58:46

peets
Member
From: Montreal
Registered: 2007-01-11
Posts: 936
Website

Re: A script proclaiming Arch's superiority

I have to announce that I'm leaving this project. At first, development was lots of fun with a great team and some fast and excellent results, but it seems that as the project and its userbase grew, discussion got to be more and more about the bikeshed. It's just not what it used to be.

All the best.

Offline

#46 2008-04-22 00:04:46

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: A script proclaiming Arch's superiority

Can this be ported to *BSD?


Follow me in: Identi.ca, Twitter, Google+

Offline

#47 2008-04-22 00:25:54

venox
Member
From: Curitiba, Brazil
Registered: 2003-08-23
Posts: 137
Website

Re: A script proclaiming Arch's superiority

kensai wrote:

Can this be ported to *BSD?

Why would you want to run it on *BSD? Arch is the best!

Offline

#48 2008-04-22 08:23:17

TheBodziO
Member
From: Dukla, Poland
Registered: 2006-07-28
Posts: 230
Website

Re: A script proclaiming Arch's superiority

peets wrote:

I have to announce that I'm leaving this project. At first, development was lots of fun with a great team and some fast and excellent results, but it seems that as the project and its userbase grew, discussion got to be more and more about the bikeshed. It's just not what it used to be.

All the best.

Buahahahahaha! Stop! big_smile You're killin' me! big_smile lol


It's not the best thing when they call you a "member" you know… wink

Offline

#49 2008-04-22 16:18:36

Demind
Member
Registered: 2007-07-10
Posts: 111

Re: A script proclaiming Arch's superiority

How can i have transparence enabled?I have to convince my father to leave Ubuntu

Offline

#50 2008-04-22 18:08:09

XChrisX
Member
Registered: 2007-10-21
Posts: 29

Re: A script proclaiming Arch's superiority

I rewrote in FreePascal:

program archisbest;

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

Save the file as archisbest.pas
To compile: fpc archisbest.pas

Offline

Board footer

Powered by FluxBB