Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Evolution of a Python programmer

Name: Anonymous 2007-05-25 5:34 ID:e87L90K/


#Newbie programmer
def factorial(x):
    if x == 0:
        return 1
    else:
        return x * factorial(x - 1)
print factorial(6)


#First year programmer, studied Pascal
def factorial(x):
    result = 1
    i = 2
    while i <= x:
        result = result * i
        i = i + 1
    return result
print factorial(6)


#First year programmer, studied C
def fact(x): #{
    result = i = 1;
    while (i <= x): #{
        result *= i;
        i += 1;
    #}
    return result;
#}
print(fact(6))


#First year programmer, SICP
@tailcall
def fact(x, acc=1):
    if (x > 1): return (fact((x - 1), (acc * x)))
    else:       return acc
print(fact(6))


#First year programmer, Python
def Factorial(x):
    res = 1
    for i in xrange(2, x + 1):
        res *= i
    return res
print Factorial(6)


#Lazy Python programmer
def fact(x):
    return x > 1 and x * fact(x - 1) or 1
print fact(6)


#Lazier Python programmer
f = lambda x: x and x * f(x - 1) or 1
print f(6)


#Python expert programmer
import operator as op
import functional as f
fact = lambda x: f.foldl(op.mul, 1, xrange(2, x + 1))
print fact(6)


#Python hacker
import sys
@tailcall
def fact(x, acc=1):
    if x: return fact(x.__sub__(1), acc.__mul__(x))
    return acc
sys.stdout.write(str(fact(6)) + '\n')


#EXPERT PROGRAMMER
import c_math
fact = c_math.fact
print fact(6)


#ENGLISH EXPERT PROGRAMMER
import c_maths
fact = c_maths.fact
print fact(6)


#Web designer
def factorial(x):
    #-------------------------------------------------
    #--- Code snippet from The Math Vault          ---
    #--- Calculate factorial (C) Arthur Smith 1999 ---
    #-------------------------------------------------
    result = str(1)
    i = 1 #Thanks Adam
    while i <= x:
        #result = result * i  #It's faster to use *=
        #result = str(result * result + i)
           #result = int(result *= i) #??????
        result str(int(result) * i)
        #result = int(str(result) * i)
        i = i + 1
    return result
print factorial(6)


#Unix programmer
import os
def fact(x):
    os.system('factorial ' + str(x))
fact(6)


#Windows programmer
NULL = None
def CalculateAndPrintFactorialEx(dwNumber,
                                 hOutputDevice,
                                 lpLparam,
                                 lpWparam,
                                 lpsscSecurity,
                                 *dwReserved):
    if lpsscSecurity != NULL:
        return NULL #Not implemented
    dwResult = dwCounter = 1
    while dwCounter <= dwNumber:
        dwResult *= dwCounter
        dwCounter += 1
    hOutputDevice.write(str(dwResult))
    hOutputDevice.write('\n')
    return 1
import sys
CalculateAndPrintFactorialEx(6, sys.stdout, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)


#Enterprise programmer
def new(cls, *args, **kwargs):
    return cls(*args, **kwargs)

class Number(object):
    pass

class IntegralNumber(int, Number):
    def toInt(self):
        return new (int, self)

class InternalBase(object):
    def __init__(self, base):
        self.base = base.toInt()

    def getBase(self):
        return new (IntegralNumber, self.base)

class MathematicsSystem(object):
    def __init__(self, ibase):
        Abstract

    @classmethod
    def getInstance(cls, ibase):
        try:
            cls.__instance
        except AttributeError:
            cls.__instance = new (cls, ibase)
        return cls.__instance

class StandardMathematicsSystem(MathematicsSystem):
    def __init__(self, ibase):
        if ibase.getBase() != new (IntegralNumber, 2):
            raise NotImplementedError
        self.base = ibase.getBase()

    def calculateFactorial(self, target):
        result = new (IntegralNumber, 1)
        i = new (IntegralNumber, 2)
        while i <= target:
            result = result * i
            i = i + new (IntegralNumber, 1)
        return result

print StandardMathematicsSystem.getInstance(new (InternalBase, new (IntegralNumber, 2))).calculateFactorial(new (IntegralNumber, 6))

Name: Anonymous 2007-07-17 12:13 ID:Heaven

>>80
Nederlanders op mijn /prog/?

Name: Anonymous 2007-07-17 12:17 ID:u+WleX1S

mup da dup etc etc bix nood?

Name: Anonymous 2007-07-17 15:55 ID:zUWsyzea

GTFO NEDERFAGS.

Name: Anonymous 2007-07-17 16:37 ID:IzZYU9Ih

from __future__ import bbcode #OH SHI-

Name: EXPERT PROGRAMMEUR 2007-07-17 16:42 ID:4gmhyX8l

>>81

Het is waarschijnlijker dan je denkt!

Name: Anonymous 2007-07-17 21:32 ID:zUWsyzea

    i = 1 #Thanks Adam

LOL'd

Name: Anonymous 2007-07-17 22:23 ID:lDQQBSw2

Evolution of a Python programmer

hi I am a python programmer

ONE WORD THE FORCED INDENTATION OF CODE THRAED OVER

oh my god.. you are right, I will stop python at once

Name: Anonymous 2007-07-17 22:25 ID:lDQQBSw2

>>88
This production broute to you by WORZERZ!  BBcode masters.

Name: Anonymous 2007-07-18 8:58 ID:hcG4jx2B

>>88
LOL

Name: Anonymous 2007-08-02 3:35 ID:uMyTzGIm

                                                       ,、ハ从 jvヘ,、
               r一… ¬                               、!トミ   )ヘ }i /し;ィ
                  \   (           ┌‐-、                  _jJミ`丶ゝトヘノ∨Vて.ィ__
                  \   丶、      |   !                 水Z二≧ミー、ゝ X‐く冫‐ァ仏ィ
                   ̄` 、  ー- ..__j___j_        トMi          ´,j癶こフ¨了;介f^ヾヾミミY"にフr__
                       `丶、___,,_ ` ト、_jL!Wし1 厂二ニヽハ!  '^゙マ!;イハl ハiい{、≧ーマ乙
                                 r=ミミoヽ} i{L_h { /     /r;{ヽ,   〝フメjy}八!、、ゞヘニ=ミ-
                                _,. -≧ニ≦ミドヘ) ヾ'^y,'二フ ^ー\ィ^ー__,,.ィ〝'ヘi);ィノヾこ>
               _,.  -‐ ' "  ̄ " '' ー;ァ'"_,ニ" ̄-三 =ミヽゝヘ.〈 {!'´ !  ノ,へ广で下,`ー-、ニ⇒ミ公-`
        __,. _ -‐=≦≦ニニ≧=≡ニ二三ミy',"≠´ _;=一''" ̄  ̄≧ミヘ い vリ ( ム )彡ミ`¨^メ;  ぅシrァ7八ヽ、  テンプレ終了
     ,,=彳__,ニ===--ミ ` ¨ ´   _`⌒⌒Y拜≡'´ ,,r=ァァ -‐≠'  ,=ミソrベ,! 汽ミ、⌒'′ ,ィ/彳 〃z'_ン/√)‐1
  ,,=彳‐彡'´ 、、、   ミヾミ`ヽv=‐=ァ-yァァ`7爪伐辷彡タ竺=‐≠≡=ハ ノヾ.彡ヘ!  ヽ.\  〃へ} j ノ(_,.ィi介ミー-イ
r彳 vヤ斧父`   ゛ ミヽ、 )》ヾキfテ´'フフ丿 ;ハ込ミ三二≡≡=;气ニ7⌒>く/;ゝ、r'ヘ([_〉`>ン"ノ ノ ,. イリ i|NくN | 八__jノヘし
|ハ‐yぐ⌒゙`゙ミゝ、   `ヾV}}゙ヾV斗彡'彡ジ'¨)>ベミ≧≡===≡≦ヾ´;/ く r'ヘヽー'ノ>,、),斗-='彡シ;1′iljハ}ヾil ピ人ハ,.ィチ
lハヾ! 、`ヽi{{ト、`ヾ、 {{Nハ{ ,ゞキ≦fr≦- ←'" ̄`゙ヾ≡=-ミ、    rr‐、ヽ  ,.ベー;ノ>く ´ `ヽF=≦彡;1′ilイ} {  il !`ヽ'YiしJ
!{ゞゝヘ \ ヾ{{{ト、  ヾゞミ辷キミ'火辷ー---‐彡')>≫ミミミヾ、_ ヾー'^ゞく '"ノX '´ "  ,ハ `)(/ ;1' j/il|} i{ j| ハ. トWハh__
ヾミ≧xゝ、丶 `丶ミヽ、 丶`ヾミゞミミ≧‐===´==彡彡シシニ≧‐ミ三ゞr'ヘノX´ "   /   }v'/ ;1;ilil;ハl|}.ハf'!j} }} }{(_、`乙_
  ヾミ≧=ミwx、   `ヾミヽ、,.ゞ‐.ニ=ゞ=辷竺三二ニ=彡'il{⌒ヾ≦三≧(ヾノ "   ,.イ   ,バ ノノll;イヾミ、ヾィ7 // 〃〃亥^弋⌒
   Vミミ、 ヾ℡x、    > // ̄ ̄ >`''<二=彳爪iゞミミミヘミ竺找´ Y´ ,.  ´//{ /  iK_/{ム{f'r㍉シ j,' 〃 /c'ニゞ+rヘ
   ∨`ヾ、 ヾ㏍№xァ'//    / ,. -‐…→<iハハ)ヾミミミミミ≧]]ソ ノハ    _´_ノ/  /ノ) )X⌒゛v__;リ 〃 〃 广ア´iハ}!ハい
     ヾミミゞヽ、ヾ㏍V/ _ノ     / / /  ̄ ̄ >┴=ミ、ヾヾ(⌒フイ /,ノヘニ-‐ ∠ イ/ノ// ∨ノリレ' / 〃≠⌒7iliしi小ハ}}|
      `゙㍉ミ№㏍'/  ̄`ーr / /, '´ /   /,.r‐-ゞミr’ イ レ /  〉、_ _フ´/, '// ,. -ヘV/ ≠彡'⌒゙丁ヾvリ/ノ川}}!
          `"'1{       / /〃   /   //rf`ー-v'⌒jメ、_,ノ  〈 ({ゞ=≠=彡 / /    ヾv';.;,'7フr~'´ミヾ《/フ7メ、ノノ
            ヾ、       { , il  /    //r冖-x'/⌒jメ、'´\    ヽニ-‐    _/       r' Y7 ri|;:べ⌒トミ、ヾvン/
                 `丶、   i { ハ '    / 厶{{/ //⌒jメ、'´)\_{_)  ノ  》ヘ〈/,   〈     //レイfili  {N}ミヾ}Y7{
                ` ミ弍>ミゝL{[ミ辷{ (/⌒>{(_ ' 'ノ\ ( ) /   /ハヘ〈/,   \ __///`ヾヘ{li!  ヽNヾJ川
                        ` ー=ゝし'/ 〃`ヽ\   _rヘ-'′   /'′ハヘ.〈/ ,   ___//ri、 ヾヽヾ〉、丶{ヾヽjリリ


Name: Anonymous 2007-08-02 4:50 ID:Heaven

                                                       ,、ハ从 jvヘ,、
               r一… ¬                               、!トミ   )ヘ }i /し;ィ
                  \   (           ┌‐-、                  _jJミ`丶ゝトヘノ∨Vて.ィ__
                  \   丶、      |   !                 水Z二≧ミー、ゝ X‐く冫‐ァ仏ィ
                   ̄` 、  ー- ..__j___j_        トMi          ´,j癶こフ¨了;介f^ヾヾミミY"にフr__
                       `丶、___,,_ ` ト、_jL!Wし1 厂二ニヽハ!  '^゙マ!;イハl ハiい{、≧ーマ乙
                                 r=ミミoヽ} i{L_h { /     /r;{ヽ,   〝フメjy}八!、、ゞヘニ=ミ-
                                _,. -≧ニ≦ミドヘ) ヾ'^y,'二フ ^ー\ィ^ー__,,.ィ〝'ヘi);ィノヾこ>
               _,.  -‐ ' "  ̄ " '' ー;ァ'"_,ニ" ̄-三 =ミヽゝヘ.〈 {!'´ !  ノ,へ广で下,`ー-、ニ⇒ミ公-`
        __,. _ -‐=≦≦ニニ≧=≡ニ二三ミy',"≠´ _;=一''" ̄  ̄≧ミヘ い vリ ( ム )彡ミ`¨^メ;  ぅシrァ7八ヽ、  テンプレ終了
     ,,=彳__,ニ===--ミ ` ¨ ´   _`⌒⌒Y拜≡'´ ,,r=ァァ -‐≠'  ,=ミソrベ,! 汽ミ、⌒'′ ,ィ/彳 〃z'_ン/√)‐1
  ,,=彳‐彡'´ 、、、   ミヾミ`ヽv=‐=ァ-yァァ`7爪伐辷彡タ竺=‐≠≡=ハ ノヾ.彡ヘ!  ヽ.\  〃へ} j ノ(_,.ィi介ミー-イ
r彳 vヤ斧父`   ゛ ミヽ、 )》ヾキfテ´'フフ丿 ;ハ込ミ三二≡≡=;气ニ7⌒>く/;ゝ、r'ヘ([_〉`>ン"ノ ノ ,. イリ i|NくN | 八__jノヘし
|ハ‐yぐ⌒゙`゙ミゝ、   `ヾV}}゙ヾV斗彡'彡ジ'¨)>ベミ≧≡===≡≦ヾ´;/ く r'ヘヽー'ノ>,、),斗-='彡シ;1′iljハ}ヾil ピ人ハ,.ィチ
lハヾ! 、`ヽi{{ト、`ヾ、 {{Nハ{ ,ゞキ≦fr≦- ←'" ̄`゙ヾ≡=-ミ、    rr‐、ヽ  ,.ベー;ノ>く ´ `ヽF=≦彡;1′ilイ} {  il !`ヽ'YiしJ
!{ゞゝヘ \ ヾ{{{ト、  ヾゞミ辷キミ'火辷ー---‐彡')>≫ミミミヾ、_ ヾー'^ゞく '"ノX '´ "  ,ハ `)(/ ;1' j/il|} i{ j| ハ. トWハh__
ヾミ≧xゝ、丶 `丶ミヽ、 丶`ヾミゞミミ≧‐===´==彡彡シシニ≧‐ミ三ゞr'ヘノX´ "   /   }v'/ ;1;ilil;ハl|}.ハf'!j} }} }{(_、`乙_
  ヾミ≧=ミwx、   `ヾミヽ、,.ゞ‐.ニ=ゞ=辷竺三二ニ=彡'il{⌒ヾ≦三≧(ヾノ "   ,.イ   ,バ ノノll;イヾミ、ヾィ7 // 〃〃亥^弋⌒
   Vミミ、 ヾ℡x、    > // ̄ ̄ >`''<二=彳爪iゞミミミヘミ竺找´ Y´ ,.  ´//{ /  iK_/{ム{f'r㍉シ j,' 〃 /c'ニゞ+rヘ
   ∨`ヾ、 ヾ㏍№xァ'//    / ,. -‐…→<iハハ)ヾミミミミミ≧]]ソ ノハ    _´_ノ/  /ノ) )X⌒゛v__;リ 〃 〃 广ア´iハ}!ハい
     ヾミミゞヽ、ヾ㏍V/ _ノ     / / /  ̄ ̄ >┴=ミ、ヾヾ(⌒フイ /,ノヘニ-‐ ∠ イ/ノ// ∨ノリレ' / 〃≠⌒7iliしi小ハ}}|
      `゙㍉ミ№㏍'/  ̄`ーr / /, '´ /   /,.r‐-ゞミr’ イ レ /  〉、_ _フ´/, '// ,. -ヘV/ ≠彡'⌒゙丁ヾvリ/ノ川}}!
          `"'1{       / /〃   /   //rf`ー-v'⌒jメ、_,ノ  〈 ({ゞ=≠=彡 / /    ヾv';.;,'7フr~'´ミヾ《/フ7メ、ノノ
            ヾ、       { , il  /    //r冖-x'/⌒jメ、'´\    ヽニ-‐    _/       r' Y7 ri|;:べ⌒トミ、ヾvン/
                 `丶、   i { ハ '    / 厶{{/ //⌒jメ、'´)\_{_)  ノ  》ヘ〈/,   〈     //レイfili  {N}ミヾ}Y7{
                ` ミ弍>ミゝL{[ミ辷{ (/⌒>{(_ ' 'ノ\ ( ) /   /ハヘ〈/,   \ __///`ヾヘ{li!  ヽNヾJ川
                        ` ー=ゝし'/ 〃`ヽ\   _rヘ-'′   /'′ハヘ.〈/ ,   ___//ri、 ヾヽヾ〉、丶{ヾヽjリリ

Name: Anonymous 2007-08-04 21:30 ID:iPBKYHTR

wtf

epic fail nerds

Name: Anonymous 2007-08-04 23:15 ID:5NzrohHM

Penis

Name: !mOOTIMeb9o 2007-08-16 8:17 ID:NsPrt8LH

Linked from the rest of the internets again:
http://brad.livejournal.com/2337185.html?thread=13991329#t13991329

Name: Anonymous 2007-08-16 8:21 ID:dsH650m+

>>95
are you dense? >>1 is a very old copypasta.

Name: Anonymous 2007-08-16 23:06 ID:laBcnFM2

>>96
What? Nope, I wrote it for this thread. It was based on some Haskell joke.

Name: Anonymous 2007-08-16 23:31 ID:rm8KZwuH

posting in an epic shit thread

Name: Anonymous 2007-08-17 2:24 ID:fCqO9r3o

Next post after mine will be 100 GET

Name: Anonymous 2007-08-17 2:39 ID:OMcduqEX

100 GET

(thanks >>99!)

Name: Dongs 2007-08-17 4:33 ID:oGubub1S

I like penis

Name: Anonymous 2007-08-18 23:47 ID:boB+xCqU

I hate penis

Name: Anonymous 2007-08-19 0:18 ID:aiCp8RXu

I have penis

Name: Anonymous 2007-08-22 11:01 ID:Heaven

>>274
[aa][/aa] = ascii art. you fuck wit.

Name: Anonymous 2007-09-06 17:24 ID:19+GYgFf

penis

Name: Anonymous 2007-09-06 17:26 ID:19+GYgFf

[color=red][u]/b/ /b/ code?[/u][/color]

Name: Anonymous 2007-09-06 17:28 ID:19+GYgFf

[i][b]/b/ /b/ code?[/b][/i]

Name: Anonymous 2007-09-06 17:29 ID:19+GYgFf


[size=30]/b/ /b/ code?[/code][/size]

Name: Anonymous 2007-09-06 17:30 ID:19+GYgFf

[quote]/b/ /b/ code?[/quote]

Name: Anonymous 2007-09-06 17:30 ID:19+GYgFf

[list]
[*]/b/ /b/ code?
[/list]

Name: Anonymous 2007-09-06 17:55 ID:THldAKyt

what FAG told reddit!?

Name: Anonymous 2007-09-06 21:28 ID:z3sX2P12

penis

Name: Anonymous 2007-09-06 21:32 ID:Heaven

how long has this thread been going for!?

Name: Anonymous 2007-09-06 21:41 ID:6RdMq0nP

BBCPL
in the beginning....
[BBCPL]
[/BBCPL]

then, there was function definitions.

[BBCPL]
[DEF URL]<a href="$1">^</a>
[/DEF]
[/BBCPL]

how is this used, you ask?

welll, you end up using
[URL][/URL]

to follow the syntax of bbcpl, you use more specifically
[URL = $1]^[/URL]

BEHOLD THE SHEER POWER OF BBCPL!

Name: Anonymous 2007-09-13 3:52 ID:m3LCX0Or

Na Izumiya staat Hosokin op het programma. Hier bekijken we enkel de tosai en bestellen er enkele honderden. ... Na Hosokin

Name: Anonymous 2007-09-13 8:26 ID:Heaven

>>113
Since 25 May 2007 at 5:34 AM.

Name: Anonymous 2007-09-13 13:56 ID:fMPqwWAA

>>114
Unintuitive...

Name: Anonymous 2007-09-13 14:11 ID:644akdtP

Tantilating

Name: Anonymous 2007-09-26 3:38 ID:m7xgbSqA

nice boat.

Name: Anonymous 2007-09-26 3:38 ID:ZnydAF6M

do evolution of /prog/ next

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List