Seth Woolley's Blog

Occasional Musings

Tue Feb 2 08:01:20 2010 -- javascript irc bot

javascript irc bot(3)

Sieve of Eratostenes:

+js var buffer = ""; function dump() { return buffer += arguments[0]; }; var n=659,i=2,m=Math.sqrt(n),c = []; while (i <= m) { if (!c[i]) { var s=2; while(s <= n/i) { c[i*s]=1; s++; } } i++; } i=2; while (i <= n) { if (!c[i]) dump(i + " "); i++; }; dump("");

Euclid's Method:

+js var buffer = ""; function dump() { return buffer += arguments[0]; }; var e=600851475143, f=e, i=2, s=Math.sqrt(f); while (i < s) { if (e % i == 0) { dump(i + " "); e /= i; if (e == 1) { i=s; } } i++; } dump("");

Fibonnaci Sequence:

+js var buffer = "1 "; function dump() { return buffer += arguments[0]; }; var n=10, f=0, g=1, v, i = 1; while (i < n) { v = f + g; f = g; g = v; i++; dump(v + " "); }; dump("");

Seth Woolley's Blog

Sat Feb 20 22:35:12 2010 -- Comment testing -- by Ben

testing

This is just Ben testing security.

Sat Feb 20 22:33:51 2010 -- Comment ?.?..?blog.cgi -- by test

?.?..?blog.cgi

#!/bin/sh
env

Sat Feb 20 22:25:49 2010 -- Comment test.cgi -- by test

test.cgi

#!/bin/sh
env

Leave A Comment

Secret is used for editing your own comment. If subject, secret, and name all are the same as a previous comment, it will be overwritten. Turing is the name of this program (look at the Source Code link on the front page), used to see if you are human.