It all sounds Geek to me! [Gautam Arora]

Monday, December 05, 2005

Reddit rewritten in Python!

It a day to celebrate for the Python Geeks ...

Reddit in a new Pythonic Avtaar!

p.s. got to use my limited python skills at work. A python script to analyse some bugs in .java files under a given target directory (and sub-dirs...).A 20-odd lines code that scans through 2225 files and 201 folders to generate a log file in ~ 4 secs! (This aint for setting any benchmarks though!) Python Rocks! also used the py2exe module to get a .exe

Just for the records, for the last few weeks i have been workin on:

-Cygwin and IBM WebSpehere App Assembly Tool


- and now Python

-and most of the work was on Linux!


More on Py Reddit:

What is reddit written in?

Seriously? I heard it was written in Lisp.
It was, but we rewrote it.

So what Python framework did you use?, the web application framework of choice for discriminating programmers. is itself upon SQLObject and Cheetah. The data is stored in a PostgreSQL database and served by lighttpd.


Nadeem Mohsin said...

+1 - Python does indeed rock! Any chance you could actually post that code here?

Gautam Arora said...

I 'should not' be posting the code here ;)
It was a simple 'walk' across the directory structure and 're' for getting the pattern.
But this was an J2EE Enterprise App code getting scanned , so it was the speed that even took me by surprise!

plus making the .exe outta it helped me solve the issue of ppl complaing that they wont be able to run it coz they dont have python on their pc...

i hope you are keeping a watch at the reddit blog comments....ROTF!

Nadeem Mohsin said...

Right - keep the code secret...:)

I usually prefer to use glob when I handle files in this way. For some reason it just feels more intuitive. Sadly I have a bad habit of forgetting whatever library-specific stuff I know in Python...I really need to use it more, but with college in the way it's been difficult. Will be using it a lot over the vacations, though...

The Reddit blog comments are pretty hilarious :) and at times, very informative. I remember one very nice explanation of why Lisp beats the pants off other languages in new problem domains, and is mostly useless in more established ones. Definitely worth the read.