| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Comments:
<0> Result: 354224848179261915075 <1> @php function a($a,$b,$x){while(ord($a[$i])||ord($b[$i])){$t=$a[$i]+$b[$i]+$c;if($c=$t>9)$t-=10;$a[$i]=$t;$i++;}$c&&$a[$i]=$c;$x=$a;}function fib($n){$f=array("0","1","1");for($i=2;$i<=$n;$i++){$j=$i%3;$k=($j+1)%3;$l=($k+1)%3;a($f[$k],$f[$l],&$f[$j]);}for($i=strlen($f[$j]);$i>=0;)echo$f[$j][$i--];}for($i=0;$i<10;$i++)echo fib($i).","; <0> Result: ,,1,2,3,5,8,13,21,34, <1> hmm <2> man, i need a job <3> i have a job, but it's on a per-project basis <3> $45/hr doesn't sound as sweet when it's like that <2> i should finish up my resume <3> What kind of job are you looking for? <2> code monkey <2> slash webmaster <2> slash consultant <2> slash all of the above <3> fun fun, that's what I do <3> but my boss takes all of the credit for it <3> "i need you to go over the stuff this client wants in a website, and come up with a quote" 'sure thing' <later he forwards an e-mail to me of the quote where he just copy/pastes what I say to him, posing as the guy giving the quote>
<4> lol <3> Apparently it's taboo to have a "programmer/webmaster/other guy" <3> And half of the stuff I e-mail him with about status updates go right over his head <3> "SSL... that's like... cookies, right?" <5> lol <3> 'yeah... sure...' <3> but he pays me well so I can't complain <2> i have the interesting position of not having a specialty <5> 'but these cookies are chocolate chip' <1> hmm i need a really short way to reverse a string <3> http://us2.php.net/manual/en/function.strrev.php <1> :-o <5> @strrev <0> (PHP 3, PHP 4, PHP 5) <0> string strrev ( string string ) <0> Reverse a string <0> http://www.php.net/strrev <1> i didn't know about that one :-o <3> TECHNOLOGY <5> that's pretty sweet.. <1> thanks kanis <3> I figure if they have a levenshtein feature, they ought to have string reversal <1> heh <2> int i; size_t q; char *str = "hi, i'm gay", *str2 = "hi, i'm gay"; q = strlen(str2) - 1; for(i = 0; i < strlen(str); i++) *(str2 + (q - i)) = *(str + i); <2> /* ? */ <2> oh, PHP! <3> int *********pain; <2> i bet you that jumps into hyperspace, because i wrote it on a whim <1> @php function a($a,$b,$x){while(ord($a[$i])||ord($b[$i])){$t=$a[$i]+$b[$i]+$c;if($c=$t>9)$t-=10;$a[$i]=$t;$i++;}$c&&$a[$i]=$c;$x=$a;}function fib($n){$f=array("0","1","1");for($i=1;$i<=$n;$i++){$j=$i%3;$k=($j+1)%3;$l=($k+1)%3;a($f[$k],$f[$l],&$f[$j]);}!$f[$j]&&$f[$j]="0";return strrev($f[$j]);}while($i<100)echo fib($i++).","; <0> pizza_milkshake: Your result has been truncated. Don't print so much. <0> Result: 0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,1346269,2178309,3524578,5702887,9227465,14930352,24157817,39088169,63245986,102334155,165580141,267914296,433494437,701408733,1134903170,1836311903,2971215073,4807526 <2> and code i write on a whim usually jumps into hyperspace <2> plus i used an immutable string mutably, bad jed <4> jed stfu <2> i'll kill you <4> yhou probably would <4> sick **** <4> then eat me <2> yes i would. <5> pizza_milkshake: what is that? <5> actually. nvm <1> Stoned4Life: fibonacci sequence to arbitrary size <5> i figured it out =P <1> @php function a($a,$b,$x){while(ord($a[$i])||ord($b[$i])){$t=$a[$i]+$b[$i]+$c;if($c=$t>9)$t-=10;$a[$i]=$t;$i++;}$c&&$a[$i]=$c;$x=$a;}function fib($n){$f=array("0","1","1");for($i=1;$i<=$n;$i++){$j=$i%3;$k=($j+1)%3;$l=($k+1)%3;a($f[$k],$f[$l],&$f[$j]);}!$f[$j]&&$f[$j]="0";return strrev($f[$j]);} fib(1000); <0> Result: <1> ah whoops <1> @php function a($a,$b,$x){while(ord($a[$i])||ord($b[$i])){$t=$a[$i]+$b[$i]+$c;if($c=$t>9)$t-=10;$a[$i]=$t;$i++;}$c&&$a[$i]=$c;$x=$a;}function fib($n){$f=array("0","1","1");for($i=1;$i<=$n;$i++){$j=$i%3;$k=($j+1)%3;$l=($k+1)%3;a($f[$k],$f[$l],&$f[$j]);}!$f[$j]&&$f[$j]="0";return strrev($f[$j]);} echo fib(1000); <0> Result: 43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875 <5> but ...... any particular reason, or, fun? <6> damn dude ;\ <7> Your drive has been reformatted to: FAT64 <7> leet <5> Fat64?? <7> y arry <7> ya rry <5> that exists? <4> FAT64? <1> Stoned4Life: because i wrote a fib() that used GMP, but mod_spox doesn't have GMP <5> lol <5> you are truely l337 <7> na, i'm kidding. fay64 would be the most pointless thing since nasa
<4> lol <2> would that be like <2> @php function fib($x) { if($x < 2) return $x; return fib($x - 1) + fib($x - 2); } print fib(1000); <0> PHP Fatal error: Maximum execution time of 10 seconds exceeded <2> ree-hee-eealy <1> ohm: also that would have a problem past fib(46) or so <1> since internally php uses 32 bit ints <2> @php function mul($A, $B) { list($a, $b, $c) = $A; list($d, $e, $f) = $B; return array($a * $d + $b * $e, $a * $e + $b * $f, $b * $e + $c * $f); } function pow($A, $n) { if($n == 1) return $A; if($n & 1 == 0) return pow(mul($A, $A), $n / 2); return mul($A, pow(mul($A, $A), ($n - 1) / 2)); } print pow(array(1, 1, 0), 4)[0]; <0> PHP Fatal error: Cannot redeclare pow() <2> @php function mul($A, $B) { list($a, $b, $c) = $A; list($d, $e, $f) = $B; return array($a * $d + $b * $e, $a * $e + $b * $f, $b * $e + $c * $f); } function ****($A, $n) { if($n == 1) return $A; if($n & 1 == 0) return ****(mul($A, $A), $n / 2); return mul($A, ****(mul($A, $A), ($n - 1) / 2)); } print ****(array(1, 1, 0), 4)[0]; <0> PHP Parse error: parse error, unexpected '[' <2> @php function mul($A, $B) { list($a, $b, $c) = $A; list($d, $e, $f) = $B; return array($a * $d + $b * $e, $a * $e + $b * $f, $b * $e + $c * $f); } function ****($A, $n) { if($n == 1) return $A; if($n & 1 == 0) return ****(mul($A, $A), $n / 2); return mul($A, ****(mul($A, $A), ($n - 1) / 2)); } $q = ****(array(1, 1, 0), 4); print $q[0]; <0> PHP Fatal error: Allowed memory size of 4194304 bytes exhausted (tried to allocate 35 bytes) <2> hah <2> that was fast <1> @php $t=array_sum(explode(' ',microtime())); echo $t; @php function mul($A, $B) { list($a, $b, $c) = $A; list($d, $e, $f) = $B; return array($a * $d + $b * $e, $a * $e + $b * $f, $b * $e + $c * $f); } function ****($A, $n) { if($n == 1) return $A; if($n & 1 == 0) return ****(mul($A, $A), $n / 2); return mul($A, ****(mul($A, $A), ($n - 1) / 2)); } $q = ****(array(1, 1, 0), 4); print $q[0]; <0> PHP Parse error: parse error, unexpected T_FUNCTION <1> whoops <1> ah, it doesn't matter <2> the matrix way is the fastest known, isn't it? <1> i don't know <2> @php print extension_loaded("bc") ? "yep" : "nope"; <0> Result: nope <2> lame <2> !php print bcadd("400", "800"); <2> @php print bcadd("400", "800"); <0> Result: 1200 <2> now that's just weird <1> ah neato <1> @php function fib($n) { $f= array("0","1","1"); for($i = 2; $i <= $n; $i++) { $j= $i % 3; $k= ($j + 1) % 3; $l= ($k + 1) % 3; $f[$j]= bcadd($f[$k], $f[$l]); } return $f[$j]; } echo fib(1000); <0> Result: 43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875 <8> @php print join(", ", get_loaded_extensions()); <2> @php print join(", ", get_loaded_extensions()); <0> Result: yp, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SPL, sockets, soap, SimpleXML, shmop, session, posix, pcre, pcntl, ncurses, mime_magic, mbstring, iconv, gettext, ftp, filepro, exif, dom, dbx, dba, ctype, calendar, bz2, bcmath, zlib, openssl, libxml <2> ah, bcmath <1> @php function fib($n) { $f= array("0","1","1"); for($i = 2; $i <= $n; $i++) { $j= $i % 3; $k= ($j + 1) % 3; $l= ($k + 1) % 3; $f[$j]= bcadd($f[$k], $f[$l]); } return $f[$j]; } $t1=array_sum(explode(" ",microtime())); echo fib(1000) . "in " . (array_sum(explode(" ",microtime()))-$t); <0> Result: 43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875in 1143511764.99 <1> d'oh <1> @php function fib($n) { $f= array("0","1","1"); for($i = 2; $i <= $n; $i++) { $j= $i % 3; $k= ($j + 1) % 3; $l= ($k + 1) % 3; $f[$j]= bcadd($f[$k], $f[$l]); } return $f[$j]; } $t1=array_sum(explode(" ",microtime())); echo fib(1000) . "in " . (array_sum(explode(" ",microtime()))-$t1); <0> Result: 43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875in 0.0113189220428 <2> @php function fib($n) { $f= array("0","1","1"); for($i = 2; $i <= $n; $i++) { $j= $i % 3; $k= ($j + 1) % 3; $l= ($k + 1) % 3; $f[$j]= bcadd($f[$k], $f[$l]); } return $f[$j]; } $blargh = microtime(true); echo fib(1000); printf(" ... in %f seconds", microtime(true) - $blargh); <0> Result: 43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875 ... in 0.012089 seconds <1> ah, microtime(true) <2> @php function fib($n) { $f= array("0","1","1"); for($i = 2; $i <= $n; $i++) { $j= $i % 3; $k= ($j + 1) % 3; $l= ($k + 1) % 3; $f[$j]= bcadd($f[$k], $f[$l]); } return $f[$j]; } $blargh = microtime(true) * 1000; echo fib(1000); printf(" ... in %f ms", microtime(true) * 1000 - $blargh); <0> Result: 43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875 ... in 13.708008 ms <9> ......... ? <8> Ox41464b, there is no salsa available in this channel <9> what's the 'salsa' meaning ? <9> @udefine salsa <0> Error: Urban dictionary server is unreachable. private method `gsub' called for []:Array <2> blarnk <7> gah-sub? <7> pwnt yo <10> they changed the layout <10> bastards <10> !urban roman helmet <11> Definition for roman helmet: <11> <11> Example Usages: <11> "Gary p***ed out, so we all took turns fitting him for a roman helmet" <11> http://www.urbandictionary.com/define.php?term=roman+helmet <10> i cant get the regex right for the damn definition <10> i got the example right though <10> :P <8> ****age <10> yea <10> i was waiting on spox's help for that one <10> heh <10> el senior ruby masteh <8> doesn't ruby use pcre? <10> not really <10> afaik <8> I hope Opera fixes there memory usage issues before they release 9.0 <1> function a($a,$b,$x){while(ord($a[$i])||ord($b[$i])){$t=$a[$i]+$b[$i]+$c;if($c=$t>9)$t-=10;$a[$i]=$t;$i++;}$c&&$a[$i]=$c;$x=$a;}function fib($n){$f=array("0","1","1");for($i=1;$i<=$n;$i++){$j=$i%3;$k=($j+1)%3;$l=($k+1)%3;a($f[$k],$f[$l],&$f[$j]);}return strrev($f[$j]?$f[$j]:0);}$t=microtime(1);echo fib(1000)." in ".(microtime(1)-$t);
Return to
#php or Go to some related
logs:
danziel washington #linux _Cyb0rG #india assholefeever #india #india #allnitecafe #php #java
|
|