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

Fibs in your favourite language

Name: Anonymous 2008-12-20 15:04

fibs = 1 : zipWith (+) fibs (tail fibs)

Name: Anonymous 2008-12-22 5:46

Shuttleworths?

Name: Anonymous 2008-12-22 9:02

Name: Anonymous 2008-12-22 9:15

the pleasure of being cummed inside

Name: Anonymous 2008-12-22 9:43

>>82
Í þessu forriti eru notaðar þrjár einingar. Fyrsta einingin inniheldur steð aðalstef sem er stef það sem
framkvæmt er þegar forritið er keyrt. Næsta eining inniheldur steð f, og á þá einingu er beitt ítrunarað-
gerðinni til þess að tengja endurkvæmar tilvísanir í f. Innutningsaðgerðinni er síðan beitt til að tengja steð
f við tilvísunina í aðalstenu. Út úr þeirri aðgerð fáum við einingu sem inniheldur aðalstef, og vísar í sten
lesa , skrifa, +, - og <=. Mynd 4.1 lýsir tengingum þessum.

Name: Anonymous 2008-12-22 9:47

>>82
The ``GRUNNUR'' at the bottom adds much to the hilarity. A++, would set as a wallpaper again.

Name: Anonymous 2008-12-22 9:54

>>85
The pleasure of being cummed inside

Name: Anonymous 2008-12-22 10:25

↓   ↓   ↓
╔═════════╗
║"GRUNNUR"║
╚═════════╝

Name: Anonymous 2008-12-22 11:47

Þessi nýja eining vísar nú ekki lengur í "+"og -"heldur í "(+)"og "(-)". Einingin "GRUNNUR" inniheldur stef með þessum nöfnum, og eru það sömu stef og "+"og -". Þar eð aðeins einingarnar GRUNNUR og KJARNI innihalda "(+)"og "(-)"og ekki er mögulegt að uppnefna "(+)"og "(-)"er tryggt að stef þessi tengjast grunnstefjunum eða kjarnastefjunum, sem reyndar eru þau sömu.
Einingin FELAGRUN er reyndar ekkert annað en uppnefning á öllum grunnstefjum sem gefur þeim nöfn með svigum, þ.e.a.s.:
"FELAGRUN" =
{
! -> (!)
% -> (%)
.
.
.
vhliðra -> (vhliðra)
vistfang -> (vistfang)
} ;

Slíka einingu er ekki hægt að skrifa í Fjölni þar eð svigar eru ekki leylegir í nöfnum. Svipað gildir um eininguna FELAKJAR.

Name: Anonymous 2008-12-22 11:49

>>87

[pink]MY O MY WHAT DO WE HAVE HERE?[/pink]


          _________
         |         |
         |   x x   |
         |  \___/  |      
\________|         |______/
         |         |
         |         |
         |         |
        /         /
       /         /


ITS A FAGGOT !

Name: Anonymous 2008-12-22 11:58

_  F    A    G    S   _
/         _________     \
|        |         |     \
|        |   . .   |      \
|        |  \___/  |      |
\________|         |______/
         |         |
         |         |
         |         |
        /         /
       /         /
       \         \
        \         \
        /         /
       /         /
       \         \
        \         \
        /         /
       /         /
       \         \
        \         \
        /         /
       /         /
       \         \
        \         \
        /         /
       /         /
       \         \
        \         \

Name: Anonymous 2008-12-22 13:22

>>34,36
Hey man, nice benchmark for printf function!

Name: Anonymous 2008-12-22 13:43

>>91
At least >>34 redirected to /dev/null, so you wouldn't have to see that over 90% of his results are incorrect.

Name: Anonymous 2008-12-22 13:44

↓   ↓   ↓
╔═════════╗
║"GRUNNUR"║
╚═════════╝

Name: Anonymous 2008-12-22 14:16

>>91
>>36 doesn't use printf.

>>92
He probably did that because the post would be too long if he didn't. That code gives correct results for me.

Name: Anonymous 2008-12-22 14:56

>>94
Let me rephrase it.

Hey man, nice benchmark for write(2)!

Redirecting it to sysnull doesn't help much, you're still doing a syscall and a lot of unrelated shit still happens.

Name: Anonymous 2008-12-22 15:00

>>95
yet it still manages to take less time to run than your shitty code.

Name: Anonymous 2008-12-22 15:03

NEVER FORGET THE HEROES THAT GAVE THEIR TIME AND THEIR LIVES TO DIE FOR [b]THE GREATER CAUSE OF MAKING THE PLEASURE OF BEING CUMMED INSIDE[b] A GOOGLE MEME. YOUR SACRIFICE WILL NOT BE FORGOTTEN.

NVR FGT

Name: Anonymous 2008-12-22 15:04

>>96
I never posted any code in this thread, neither I am lisp supporter.

I just wanted to point out that your(his) benchmark was dumb.

Name: Anonymous 2008-12-22 15:11

>>98
the benchmark shows that the c code hardly takes practically no time at all to do the actual calculation, while the lisp code is slow as fuck. it served it's purpose.

Name: Anonymous 2008-12-22 15:58

>>94
That code gives correct results for me.
Bullshit.  Unless you want to show me where you got a 1000-bit FPU.

>>99
it shows that the c code doesn't fucking work.

Name: Anonymous 2008-12-22 16:19

>>98
neither I am lisp supporter.
And why the hell not‽‽

Name: Anonymous 2008-12-22 19:00

>>98
Incinerate this man immediately. Burn him, burn his Java books, and let him have his anus haxed by an endless procession of Haskell monads.

Name: Anonymous 2008-12-22 22:29

I use an ENTERPRISE-GRADE optimizing fibonacci compiler

Name: Anonymous 2008-12-23 5:22

module Ackermann where
hyper 1 a b = a + b
hyper 2 a b = a * b
hyper n a 0 = 1
hyper 0 _ b = b + 1
hyper n a b = foldr1 (hyper(n-1)) [a|i<-[1..b]]

ackermann m n = (hyper m 2 (n+3))-3

Name: Anonymous 2008-12-23 5:38

Bullshit.  Unless you want to show me where you got a 1000-bit FPU.
'correct' ≢ 'exact'
there are practical uses for fibonacci numbers where the precision of a long double is good enough.
also, fib(999) doesn't require anywhere near 1000 bits:
Prelude> let fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
Prelude> logBase 2 (fromIntegral (fibs!!999))
692.3867076695431

Name: Anonymous 2008-12-23 15:04

module Ackermann where
-- LOL TOY LANGUAGE

Name: Anonymous 2008-12-24 20:18

caaaaaaaaaa$c$
nacaaaaaaaaa$c$
nacaaaaaaaaa$c$
naacaaaaaaaa$c$
naaacaaaaaaa$c$
bbbbbcaaaaa$c$
bbcaa$c$
aaacbbb$c$
aaaaaaaaaaacbbbbbbbbbbb$c$
aaaaaaaaaaaaaaaaaaaaaaaac

Name: Anonymous 2008-12-25 5:17

function fibs(x){a=0;b=1;var c;for(i=x;i>1;i--){ c=a+b;a=b; b=c}return b}

JavaScript is my default language,but not favorite.

Name: Anonymous 2008-12-25 7:57


Io 20080107
Io> fibs := method(n,
    if(n > 1,
        return fibs(n-1)+fibs(n-2),
        if(n < 0,
            return 0,
            return n)
    )
)
Io> fibs(20)
==> 2765
Io>

Name: Anonymous 2008-12-25 11:01

>>109
That should be called fib, not fibs. Also, being written in Io makes it the slowest fib known to man.

Name: Anonymous 2008-12-25 11:04

>>110
I would feel sorry if their language is slower then JavaScript.

Name: Anonymous 2008-12-25 11:09

Name: Anonymous 2008-12-25 15:04

//JavaScript 1.7
function fibs2(x){a=0;b=1;while(x>0){[a,b]=[b,a+b];x--}return a}

Name: Anonymous 2008-12-25 15:22

>>113
Optimized: x20 speed
function fibs3(x){var a=0;var b=1;while(x>0){[a,b]=[b,a+b];x--}return a}

Name: Anonymous 2008-12-25 15:25

Fibs is an infinite series beginning with the elements zero and one,
and pursuing such that each additional element is the sum of the two
elements directly preceding it.

Name: Anonymous 2008-12-25 21:43

>>115
So you think you're being literal?
I implemented fibs by actually breeding rabbits.

Name: Anonymous 2008-12-26 6:19

//Object-oriented fibs
function fibs5(x){var t=this;t.a=0;t.b=1;while(x>0){[t.a,t.b]=[t.b,t.a+t.b];x--}return t.a}

Name: Anonymous 2008-12-26 8:02

"fibs" < main
{
    main ->
        stef(;)
        staðvær i,a,b
        a := 0
        b := 1
        skrifastreng(;"0 1")
        stofn
            fyrir(i := 0; i < 98; i := i + 1) lykkja
                b := a + b,
                a := b - a,
                skrifastreng(;" "),
                skrifa(;b)
            lykkjulok,
        stofnlok
        skrifastreng(;"\n"),
}
*
"GRUNNUR"
;

Name: Anonymous 2008-12-26 15:51

loeb f = fmap ($ loeb f) f

fibs = loeb $ map const [0,1]++[\x -> x!!a + tail x!!a | a <- [0..]]

Name: Anonymous 2008-12-27 11:56

leob sucks, go wash yourself and get awork you sickdumbfuck

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