GeekStreet

Geek stuff, mostly.

Wednesday, July 14, 2004

Google puzzle

Some time last week, a huge billboard appeared on Highway 101 in Silicon Valley. It said simply:

"{ First 10 digit prime in consecutive digits of e }.com"
While this has not made much of a stir(where stir=when somebody claims he wrote the linux kernel) on the Intarweb, it's something of a teeny puzzle.
The first ten-digit prime number in the digits of e is 7427466391.

The billboard was a hint to go to 7427466391.com, where the next step of the puzzle lay.

Congratulations. You've made it to level 2. Go to www.Linux.org and enter Bobsyouruncle as the login and the answer to this equation as the password.

f(1)= 7182818284
f(2)= 8182845904
f(3)= 8747135266
f(4)= 7427466391
f(5)= __________
Meanwhile, astute puzzle-solvers had done a whois query on the site, and found the name of Google in the fine print.

Of course, I cheated.

Feel free to try your hand at the puzzle, before reading the rest.

The clue is that, the digits sum to 49, for all these numbers. The digits of e are available on the web, from where I obtained the first 2M digits in the expansion. Next, a ruby script to look for my numbers.
(I love the way Ruby gets out of my way)

class Array
def sum
inject(0) {|s,i| s+i}
end
end

def _find49(str)
arr = str.scan(/\d/).collect {|i| i.to_i}
found = []
arr.each_index { |i|
if(i < arr.length - 10)
if(arr[i..i+9].sum == 49)
found << arr[i..i+9].inject(0){|s,ii| s*10+ii} if(arr[i]>0)
end
end
}
found
end
require 'yaml'
list = _find49(File.open('C:\Files\Docs\e.2mil') {|f| f.read})
File.open('C:\Files\Docs\data.yaml',"w") {|f| f.write(list.to_yaml)}


A moment's grokking of the resulting yaml file in irb gave me the answer.

Well, disappointingly, that was the last step of the puzzle, leading here. Bah.

(The whole thing was being discussed on JoS forums, from where I picked up the relevant hints.)

Wednesday, June 23, 2004

Recent must-reads

Most of you will already have read these, but this is really the stuff of legends.


  • Cory Doctorow - "uber-geek", sci-fi author and EFF activist - goes to Microsoft and tells them why DRM is bad.

  • Joel Spolsky - New York-based programmer, Software Design/Usability Guru - writes with immense insight and clarity about how Microsoft lost the "API war" - a seminal essay doing the weblog rounds these days.



This stuff is good, man.

Wednesday, June 16, 2004

Cabir.

Detected recently by the Russian Antivirus firm Kasparsky, EPOC.Cabir is supposedly the first network worm that infects mobile phones. Well, it has to be a smartphone. Running Nokia's series 60 platform. With Bluetooth.

Still a first.

The author goes by the handle "Vallez", and is reportedly a member of an international group of virus-writers called 29a. These folks specialize in "Proof of Concept" viruses.
Previous achievements?


  • Cap - The first Word macro virus that spread on a global scale.

  • Stream - The first virus to use a "feature" of NTFS, streams1, as its method of infection.

  • Donut - The first virus for the .NET platform(written in IL). +1 for the name.

  • Rugrat - The first Win64 virus.



What does it do? Well, "Hello World!" in virii-speak. It's transmitted as an SIS (Symbian Installation File)2 file, which when launched, disguised as a phone Security Manager Utility(touche), displays "Caribe" on the screen. The worm's code has been pronounced harmless, after initial analysis.

What's interesting is that it spreads through bluetooth. It will infect any bluetooth enabled device within range, even a printer. What's interesting about that is that this quite literally means that it can spread like a real virus. It can jump to any bluetooth enabled device in the vicinity. This inevitably brings futuristic scenarios to my mind. Hordes of self-replicating virii swooping down on the WiFi hotspot that is the entire planet, gadgets of the world uniting under one swarm-consciousness and rebelling against their human overlords.
Hail the Drones!




[1] This strikes me as a remarkably brain-dead idea to implement, in an already exploit-prone environment. (Inspired by a "+4 Funny" comment on /., and I quote: Is there some way we can work a random, irrelevant Microsoft bash into this discussion about viruses? )
[2] Well, it prompts the user to go on with the installation, which is technically not very virii-like.

Tuesday, June 15, 2004


#include <sys/time.h>
#include <signal.h>
#include <unistd.h>

static void Handler(int ignore)
{
char fpubuf[108];
__asm__ __volatile__ ("fsave %0\n" : : "m"(fpubuf));
write(2, "*", 1);
__asm__ __volatile__ ("frstor %0\n" : : "m"(fpubuf));
}

int main(int argc, char *argv[])
{
struct itimerval spec;
signal(SIGALRM, Handler);
spec.it_interval.tv_sec=0;
spec.it_interval.tv_usec=100;
spec.it_value.tv_sec=0;
spec.it_value.tv_usec=100;
setitimer(ITIMER_REAL, &spec, NULL);
while(1)
write(1, ".", 1);

return 0;
}


'Nuff said.

(Couldn't entirely follow the diagnosis. A problem with the FPU exception handler. Link.)

Friday, May 07, 2004

Thoughts

I feel we can use the "test run" period to work on what the scope of this thing will, be and how we'll operate.

Just jot down stuff that we feel should matter.

Off the top of my head, one is proper attribution of sources. Another is enough research to back an article.

I see "articles" and "cool links" as two things likely to come up here. We could keep posting links, but with at least a brief writeup detailing the context - ala slashdot - and once in a while post detailed articles on any subject. I for one relish research, especially of online nature. Let's attract like-minded folks to this.

Why?

Makes sense to really word down why this has been started.

Will try to bring news/links/topics related to books, technology, fiction, movies, opinions and loads of other stuff i haven't named yet. ;)

I wish this grows up to be something great. Really.

Friday, April 23, 2004

Test run

Just parking this name. Maybe later.