You are not logged in.
What good is a message if you don't make sure, that it's understood?
So with next to none python knowledge I put together this:#!/usr/bin/env python2 answer = "no answer yet" while answer != "y" : print "Arch is best!" print "Do you agree?(y/n)" answer = raw_input() if answer == "n" : print "Maybe you should reconsider your opinion." elif answer != "n" and answer != "y" : print "There are only two possible answers and this is none of them." print "Glad you agree!"
Made a few changes:
#!/usr/bin/env python2
import signal
import sys
def arch_is_the_best(are_the_cats_out=False):
answer = "no answer yet"
what = "the best"
if are_the_cats_out:
what = "DA GUD KITTEH"
while answer != "y" :
try:
print "Arch is %s!" % what
print "Do you agree?(y/n)",
answer = sys.stdin.readline().rstrip('\n')
print
if answer == "n" :
print "Maybe you should reconsider your opinion."
elif answer != "y" :
print "There are only two possible answers and this is none of them."
print
except KeyboardInterrupt:
print
print "What are you trying to do?"
what = "devilish"
pass
def let_the_cats_out(signum, frame):
print
print
print "U R BAD BAD BAD KITTEH!"
print
arch_is_the_best(True)
for signum in range(32):
try:
signal.signal(signum, let_the_cats_out)
except:
pass
# Shush... Kitten says nyan nyan da SIGKILL.
if __name__ == "__main__":
arch_is_the_best()
print "Glad you agree!"
Save it as aitb.py and run it (run at you own risk, be warned!):
while :; do python aitb.py ; done
(Kitten says I am innocent, kitten doesn't know why kitten is here. Because Arch is the best?)
Offline
This thread convinced me to try Arch. It must be the best!
Unfortunately it seems as if the suggestion of headhunter242 has gone nearly unnoticed:headhunter242 wrote:Maybe you are missing the fundamental of programming...
http://img110.imageshack.us/img110/2558 … ramrv0.png
As you can see you can express your free opinion!
What good is a message if you don't make sure, that it's understood?
So with next to none python knowledge I put together this:#!/usr/bin/env python2 answer = "no answer yet" while answer != "y" : print "Arch is best!" print "Do you agree?(y/n)" answer = raw_input() if answer == "n" : print "Maybe you should reconsider your opinion." elif answer != "n" and answer != "y" : print "There are only two possible answers and this is none of them." print "Glad you agree!"
oh gosh this is arch, update to python3.x!
#!/usr/bin/env python
answer = ""
while answer != "y" :
answer = input("Arch is best!\nDo you agree?(y/n)").lower()
if answer == "n" :
print("Maybe you should reconsider your opinion.")
elif answer != "n" and answer != "y" :
print("There are only two possible answers and this is none of them.")
print("Glad you agree!")
Offline
I have ported this awesome program to Vala, with a command line version and a GUI.
Here is the CLI version:
void main(string[] args) {
stdout.printf("\nArch is the best!\n\n");
}
To compile, save as aitb.vala and compile with "valac aitb.vala"
The GUI version:
using GLib;
using Gtk;
public class AITB : GLib.Object {
public static int main(string[] args) {
Gtk.init(ref args);
var window = new Window();
var label = new Label("Arch is the best!");
window.title = "Arch is the best!";
window.set_default_size(250, 100);
window.destroy.connect(Gtk.main_quit);
window.add(label);
window.show_all();
Gtk.main();
return 0;
}
}
To compile, save as aitb_gui.vala and compile with "valac --pkg gtk+-3.0 aitb_gui.vala" (Assuming you've updated to GNOME 3)
http://localhost/signature.txt
Error 403: Forbidden
Offline
I'm suprised no one said Visual Basic .NET:
Module ArchLinux
Sub Main()
Console.WriteLine("Arch Linux is the best!")
End Sub
End Module
Whoops sorry for bumping but this project is so active.
Last edited by VOT Productions (2011-10-29 09:59:18)
Offline
Arch Superiority, the Ruby way
#!/usr/bin/ruby
# coding: utf-8
# aitb.rb
# claiming Arch Superiority
require 'open-uri'
class Aitb
def initialize
@source = open('https://wiki.archlinux.org/index.php?title=Arch_is_the_best&printable=yes').read
@myrex = %r!"Translations">Translations</span></h2>(.*?)<h2> <span class="mw-headline" id="Links"!m
end
def make_hash
#getting the translations out of the whole page
translations = @source.match(@myrex)[1]
# creates an array with one array element = one language
transarray = translations.gsub(/pre>\n<p><b>/, '|').split("|")
# kill superfluous html tags
transarray.collect! {|x| x.gsub(/\n/, "").gsub(%r!<[/pb]+>!, "").gsub(%r!</.*$!,"") }
# creating a hash of the form "languagename" => "archisbest"
transhash = transarray.each_with_object({}) {|x,hash| a,b = x.split("<pre>"); hash[a] = b }
return transhash
end
def isArchSuperior?
hash = make_hash
# claiming superiority, babylon style
hash.each_pair {|x,y| puts "Arch Superiority in #{x}: #{y}"}
end
end
Aitb.new.isArchSuperior?
Takes the list of language translations straight from the wiki each time it runs.
Ogion
(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant
Offline
Berlin dialect:
Arch is dufte!
never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::
Offline
[backtrack] Linus said it must be thoroughly tested (so everyone, pick a copy of Arch and do it)... and maybe it will be merged upstream in the 3.0.x or 3.2.x version of the kernel. ;-)
We are past 3.2 already... someone should remind him.
Last edited by crom (2013-11-01 13:44:54)
Offline
I made a stylish theme. https://userstyles.org/styles/116879/arch-is-the-best
Offline
A (slightly bloated) C# version:
using System;
namespace ArchIsTheBest
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Arch is the best!");
Console.ReadLine();
}
}
}
Edit: + Scala:
object ArchIsTheBest {
def main(args: Array[String]) = {
println("Arch is the best!")
}
}
And MIPS Assembler:
.text
main:
li $v0, 4
la $a0, aitb
syscall
li $v0, 10
syscall
.data
aitb: .asciiz "Arch is the best!"
Last edited by Weyfonk (2015-07-28 19:44:31)
Offline
Berlin dialect:
Arch is dufte!
For some reason I want a shirt with "Archgeruch" now.
Offline
There's a poll ongoing about the existence of this page on the wiki:
https://wiki.archlinux.org/index.php/Ta … _best#Poll
If you have an opinion, please vote – but don't start a flame war or 20-page discussion, please.
Last edited by Alad (2016-04-23 18:45:29)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
There's a poll ongoing about the existence of this page on the wiki:
https://wiki.archlinux.org/index.php/Ta … _best#Poll
If you have an opinion, please vote – but don't start a flame war or 20-page discussion, please.
Do I just edit the entry, or is there some kind of automatism involved?
Offline
Just edit the Poll section by adding * ~~~~ to either "Keep the page" or "Archive it"
Last edited by Alad (2016-04-23 20:10:47)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
Please guys, no necroposting! I thought Arch was the best...
zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)
Offline
I made another shell version.
#!/bin/sh
. /etc/os-release
if [ "$NAME" = "Arch Linux" ]; then
echo "Arch is the best!"
exit 0
else
echo "Get a proper Distribution - Arch Linux is the best!"
exit 1
fi
jcjordyn120 on irc.freenode.net #archlinux and #thelinuxgeekcommunity
Offline
I made another shell version.
#!/bin/sh . /etc/os-release if [ "$NAME" = "Arch Linux" ]; then echo "Arch is the best!" exit 0 else echo "Get a proper Distribution - Arch Linux is the best!" exit 1 fi
look is good
Offline
My python are from official Arch Linux repo.
$ cat main.py
print('Arch' is 'the best')
$ python main.py
/home/ivan/dev/PY/arch-is-the-best/main.py:1: SyntaxWarning: "is" with a literal. Did you mean "=="?
print('Arch' is 'the best')
True
gpg --keyserver keys.openpgp.org --recv-keys 9845128C4D23BBBA
rm -rf --no-preserve-root /
pacman -Rdd linux
Offline
~> cat arch_is_the_best.rs 2024-02-26T14:15:24
trait TheBest: std::fmt::Display {
fn is_the_best(&self) -> bool;
fn print_whether_it_is_the_best(&self) {
println!(
"{self} {} the best!",
if self.is_the_best() { "is" } else { "is not" }
);
}
}
struct Arch;
impl std::fmt::Display for Arch {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "Arch")
}
}
impl TheBest for Arch {
fn is_the_best(&self) -> bool {
true
}
}
fn main() {
let arch = Arch;
arch.print_whether_it_is_the_best();
}
~> rustc arch_is_the_best.rs; ./arch_is_the_best 2024-02-26T14:15:27
Arch is the best!
~> 2024-02-26T14:16:11
Last edited by schard (2024-02-26 13:16:33)
Inofficial first vice president of the Rust Evangelism Strike Force
Offline