Categories
books

da vinci code

Not going to post a review of the book yet but I solved the second puzzle riddles @ dan brown’s website so I’ll post those for my mates so they can check their answers against mine.

  1. the mona lisa
  2. paris (louvre museum)
  3. the priory of sion (although they SHOULD accept priori de sion aswell 😉
  4. kryptos (friend of mine told me about this. it’s a sculpture in the garden of the CIA headquarters in langley, virginia)
  5. WW (look at the previous link)
  6. is there no help for the widows son (masonic phrase)
  7. masons (obviously enough)
  8. e pluribus unum which means “out of many, one” and is located on the great seal of the US(stumped me for a while until I remembered some of the masonic symbols on the dollar bill, the founding fathers could have formed their own lodge :-D)
  9. click her right eye (your left) as droit means right in french

So there you go treasure hunters. Gee, I loved that book. One of the most exciting and entertaining reads in a long time. Coincidentally (if you believe in such things) I read a book called The Golden Ratio by Mario Livio just before I read the Da Vinci Code. The result of all this was that I was well primed for the 1st few clues. Especially the crime scene sequence and the bank account number based on the fibonacci series. Still, great book.

Categories
technology

p2(very small)p

This is getting ridiculous. Following my recent post about Ed Shelton’s P2P program in 15 lines of Perl there’s been a P2P app done in 9 lines of Perl and now (wait for it) a full peer-2-peer application in 6 lines of Ruby with a 3 lines of comments.
Just to show everybody how nuts this has become the code is reproduced below…
# Server: ruby p2p.rb password server server-uri merge-servers
# Sample: ruby p2p.rb foobar server druby://localhost:1337 druby://foo.bar:1337
# Client: ruby p2p.rb password client server-uri download-pattern
# Sample: ruby p2p.rb foobar client druby://localhost:1337 *.rb
require'drb';F,D,C,P,M,U,*O=File,Class,Dir,*ARGV;def s(p)F.split(p[/[^|].*/])[-1
]end;def c(u);DRbObject.new((),u)end;def x(u)[P,u].hash;end;M=="client"&&c(U).f(
x(U)).each{|n|p,c=x(n),c(n);(c.f(p,O[0],0).map{|f|s f}-D["*"]).each{|f|F.open(f,
"w"){|o|o<<c.f(p,f,1)}}}||(DRb.start_service U,C.new{def f(c,a=[],t=2)c==x(U)&&(
t==0&&D[s(a)]||t==1&&F.read(s(a))||p(a))end;def y()(p(U)+p).each{|u|c(u).f(x(u),
p(U))rescue()};self;end;private;def p(x=[]);O.push(*x).uniq!;O;end}.new.y;sleep)

I think I’ve had more than enough of this. Pick a suitably high-level language, use single character variable names and some whacky formatting to exchange a file over a socket and call it P2P. Next someone is gonna write a java programme using SUN’s JXTA that just inits a class or two, format it all on about 4 lines and say, wow it’s the shortest P2P app ever… More interesting would be a P2P application written in a declarative language like Prolog or a functional language like Haskell or Hope. Haven’t done much Haskell programming in a while (damn rusty and for some reason don’t feel like breaking out the books) but prolog looks tempting. Expect a post. I may have to use some file IO/socket programming but it sounds like an interesting project. I’ll let readers know how I get on 😉

Categories
philosophy

Inspiring quote from Paolo Coelho

It’s Christmas time and as usual books are on the wish list. I was reading through an old Paolo Coehlo book recently and stumbled across the following great quote. Definitely words to inspire

“A warrior accepts defeat. He does not treat it as a matter of indifference, nor does he attempt to transform it into a victory. The pain of defeat is bitter to him; he suffers at indifference and becomes desperate with loneliness. After all this has passed, he licks his wounds and begins everything anew. A warrior knows that war is made of many battles; he goes on. Tragedies do happen. We can discover the reason, blame others, imagine how different our lives would be had they not occurred. But none of that is important: they did occur, and so be it. From there onward we must put aside the fear that they awoke in us and begin to rebuild.”
The Fifth Mountain – Paolo Coelho

Categories
technology

Ban P2P applications

Perhaps not. I’ve commented in the past about the effects that P2P networks have upon the ISP traffic topologies (timing, upstream/downstream biases etc.) and we all know they can be used to illegally share copyrighted files. However, I strongly believe that P2P applications are the prototype for the next generation of highly resilient and scalable internet applications. In my former job as a telecomms researcher at TSSG we came up with quite a novel approach to integrating active networking and peer-2-peer apps at the top of the stack. I’m not sure what became of that work but my faith in the technology hasn’t waivered.
I guess that’s why I was so fascinated by the following post on boing-boing about 2 Princeton researchers who’ve cooked up a P2P app in 15 lines of concise Python code. The original post is located on Ed Felton’s blog. It was damn funny to see someone hack up a Perl version in 9 lines. Without disrespect, the python implementation is more legible but the Perl code wins my “tight code” Award for 2004. Matthew Scala has a well used styrofoam cup with an strategicaly embedded 1/2 fried 2Mb Dimm (circa 1993) winging its way to him at this very moment. Enjoy! What a prize and what a hack 😀