Monday, June 27, 2005
The Su-Doku solver improved
Sunday, June 26, 2005
A nice busy day.
Friday, June 24, 2005
Su-Doku Solver
When I reached Delhi I started learning Python, mainly because the language intrigued me and there were a lot of people ( Eric. S. Raymond and Bruce Eckel to name a few ) had given it a thumbs up. Now it has been around 3 days since I started learning it and I must say it is a beautiful language in it's own rights.
So, I wrote a Su-Doku puzzle solver today in the evening of 24th June because it was too hot outside and I wanted to learn python.
Here is the python code. I have just used two test cases for it, which can be found here and here.
[update 25th June] The solver is in fact broken. I guess I should have used more test cases. It solves easy puzzles but gets stuck in some of the medium to hard puzzles. I will try to get it working for them also.
[update 25th June]Took care of the problem. Now it is solving the hard and medium puzzles also. I will feed it some more test cases before announcing success.
Thursday, June 23, 2005
Rahul's PC
Wednesday, June 22, 2005
Delhi heat
Sunday, June 19, 2005
Back at Delhi
Wednesday, June 15, 2005
Exams over once again..
I leave for Delhi tomorrow. I hope to have some fun there although I don't have too much time ( The college reopens on 1st July *damn* ).
Monday, June 13, 2005
Last one..
Saturday, June 11, 2005
Nearing the end..
Wednesday, June 08, 2005
An AJAX hack gone bad...
I thought this can be used to somehow serve content remotely. Suppose you have a web site and are running short of storage space, which is obviously expensive. What you could do is store your HTML document in an encoded format in one of the free web hosts found over the web and use XMLHttpRequest to fetch the page for you. Thus you don't need to worry about the ads of the free web hosting site (ads are placed on HTML documents and we will be using a text file).
The encoding could be the one like which we have at osix, meaning using a '[' and ']' instead of a '<' and '>' for html tags.
For an example check this
The client will request for the document using AJAX and then parse it, basically replacing each '[' and ']' with a '<' and '>' and then display the page by (maybe) using document.write .
It looked to me that it will work and it even did when I tried it locally on my PC. But unfortunately when I try to do it over the internet it doesn't work. In my case I uploaded the client over at geocities and the server (the document which has to be served, rather) here at osix. But when I run the client nothing happens. Is it because the request is coming from another domain name ? If I keep both the client and server in the same directory at geocities it works.
Anyone know what is going wrong. Is, what I am trying to do even possible??
Monday, June 06, 2005
Random thoughts
I wrote another article. I guess I am getting a bit bored of all the exams, even though only one is over.
Slashdot had an article about a guy making a home brewn CPU. Pretty cool.