#On the name of ALLAH and may the blessing and peace of Allah
#be upon the Messenger of Allah Mohamed Salla Allahu Aliahi Wassalam.
#Author : Fouad Teniou
#Date : 13/08/10
#version : 1.1
#!/usr/bin/env python
#This is a portable way to declare the language being used. In
#our case, it is Python, a language created by Guido van Rossum,
#a non-Muslim born in 1956, who holds a masters degree in
#mathematics.
"""
allah_is_great uses random numbers Mersenne Twister to decide
whether to output "Allah is Great" or to output it.
"""
from random import randint
var = randint(1, 1000)
#generates a random integer between 1 and 1000 using the
#Mersenne Twister, named after Marin Mersenne, a non-Muslim
#(but French) mathematician born in 1588.
#As a laureate of an international Baccalaureate of mathematics
#I am very familiar with his work.
if (var < 500):
print "Allah is great"
#Prints "Allah is great"
else:
print "Allah is great"
#Prints "Allah is great"
Name:
Anonymous2010-08-13 20:31
#!/usr/bin/python
from random import randint
var = randint(1, 1000)
i = 0
Bloated? I'd say useful. Imagine how many lines in Java, Python or other shit you'll have to write for such a simple thing like: @array.pick(3);
Combinations without repetitions. Still bloated to you?
And the language is possibly the last language you expected to ever appear.
>>18
No, but close. It's also slow as fuck at the moment. Want a tip? Ruby programmers are people who couldn't wait for _this_ to appear. The challenge is still here.
I made this in my own language: Don't even try to compile it.
$dick = rand(1-1000);
if ($dick < 500) { print "HAX MY ANUS!!!" };
if ($dick > 500) { print "HAX MY ANUS!!!" };
I started reading through the Perl 6 spec the other day, just to make fun of it, but it's not really as bad as I had hoped for.
It's the numero uno kitchen sink language, of course, but fixing that train wreck of special cased syntax goes a long way towards putting Perl on a level above its retarded little brother PHP, and its inbred syntax brother-in-law C++. It's almost like a real language, only slower and more bloated.
>>39 retarded little brother PHP
I think you mean "rapechild." Even Perl4 stands far apart from that shit. It might be a different story if PHP had a completely different standard library and sane defaults for at least most of its features.
>>42 I think you mean "rapechild."
I think you mena mena.
Name:
Anonymous2010-08-15 22:45
BUMP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Name:
Anonymous2010-08-16 0:11
>>39
Rakudo☆ on the current Parrot is hopelessly slow. The startup time reminds me of what it used to be like to run a Python program without the precompiled bytecode. The good news is that Parrot is being unfucked. I guess when you take a decade to get to this point, rewriting the VM and imcc isn't something you flinch at.
They've brought in a lot of things that just didn't fit in Perl 5. The type system in particular is finally sensible allowing you to constrain the DWIM semantics in a natural way, in fact a lot of changes seem to make it natural to subvert unintended DWIMmery. You can actually mean "do what I say." My biggest issue with Perl so far has been general abuse of numbers. I might start writing Perl again.
OP, I found a bug in your code. There is only a 49.9% chance that it will print "Hax my anus!", and a 50.1% chance that it will print "Hax my anus!". I'm assuming that you meant for it to be 50-50?
>>15
At least be interesting: subset Heads of Num where { $_ >= .5 }
subset Tails of Num where { $_ < .5 }
given(rand) {
when Heads { say "HMA" }
when Tails { say "MHA" }
}
ABBC has done a fine job coloring all of the Perl 6 code in this thread and that scares me. Would someone please produce a Perl 6 script that shiichan will shii all over, so I don't have nightmares?