Archive for August, 2006

Why I need to use del.icio.us

Friday, August 25th, 2006

I have a del.icio.us account that I should really be using and combining with the blog so I can post all the cool (non comic related URLs) I seem to come across, like the one on NTP time synchronization and RAID 6 (though I got that from someone else’s blog). But anyways, this phdcomic seemed appropriate :D

Ze Panda

The promised, now dead entry

Saturday, August 19th, 2006

Anyone who’s been following the past few weird entries in the blog would have noticed that there has been some python content posted and a promise of more to come. Well I am no longer completely sure about the more, it will probably come about eventually, since the hack fulfills something for me, but various factors, including a few not listed above, and to be expanded on later make it less important. However, this is not about my previous posts, this is more about an underlying cause. You see right until a few weeks ago I’d never have used Python in my right mind, it always had C to contend with, and I hadn’t been writing anything for fun for a while. I really haven’t been doing too many things for fun at Brown, except things whihc are an explicit, forced attempt to engage in fun, and these explicit forced attempts while being somewhat fun, haven’t fulfilled any particular niche in my life. But this is where New York, and some of its brilliantness come in and change this, but we’ll deal with this change soon. See, back when I was younger, the world was less bleak, and I didn’t worry quite as much about how to finish all the homework I accumulated on a daily basis, I used to code for fun. Sometimes I used to even wake up early and code for fun, because this was umm fun. The code didn’t serve any particular purpose, sometimes it did, but usually it was all about trying to do something which other, cooler, people did, and see what came out of it. And then I stopped, sort of with the rest of the things I did for fun, I am sure I can assign explicit blame to certain circumstances, institutions and events, but essentially I didn’t try hard enough to maintain any of this. And then I came to Brown, and we did a lot of Scheme the first semester I was here, and well who needed to code for fun when schoolwork involved Scheme. No that wasn’t sarcastic, I do believe coding in Scheme was one of the most fun things I did my first semester at Brown, and it is a shame no one continues it past the first semester. Sure, the one company I have worked for does not have too many programmers who work in Scheme or any LISP derivative, but that is their loss. So anyways, come summer, I was bored, and um work was meh for a little bit, and coding in something sounded like a good idea, and I wanted to work on this hack of mine before Apple anounced the new MacBook Pros with the shiny new Merom chips (bah Apple), and well I started using C and figured that umm while I loved C, and statefulness in C is easily implemented, this was perhaps a good time to delve into C++, STL and all the amazing benifits people keep talking about. Well ok, as an aside, I did end up using a lot of the STLed goodness at work, and umm, yes STL has its benifits, and it sort of has improved, but I digress. The problem as I saw it was that none of the languages made me happy about playing around with them, and that was one of the Python things I really enjoyed. Which bringus up the obvious question of what’s so special about Python, sure the fact that everyone’s forced to write pretty code is sort of cool, though indentation instead of parens was weird and hard at the beginning, and any mention of Python always brings up questions about Ruby. Well yes I have tried Ruby, and it seems like a very powerful language, however the semantics are somewhat ambiguous, which drives me crazy, and I didn’t find it as simple to adapt to as Python. But, and this is funny, one of the things I have been playing around with in Python is using functions as a datatype, passing them around, doing things in a simpler way. I really like functional languages, sure some people argue about the lack of loops being weird, but recursion is pretty easy to accomplish, and writing good tail recursive procedures is almost as cool. And well, I have sort of gone back to playing with Scheme, and learning all the things I didn’t learn about it so far, like macros and syntax definitions, and I am happy about it, since lambda rules, and no I am not going to go out there and develop a new mail client in scheme, or some such, but in terms of just having fun with a language, Scheme’s really cool. Oh and all this programming language trying out comes at the expense of a wishlist of books at Amazon, now if only they made the entire Schemer series of books available in India, hmmmmmmmmmmmmmm.

According to this reputed source of information, New York has one of the highest newspaper sales in the world because people read newspapers on the subway. While this might be true, I haven’t come across too many subway cars full of people reading newspapers. That being said, commuting to and fro New York has certainly allowed me to read far more books than I had planned for, and that’s one of the weird things I have been observing about New York. I don’t think I have used libraries as much as I have in New York, and well that’s saying a lot, since I really didn’t use it that much. I am one of those people who buys books, it is what I tend to do, and as far as I am concerned it is easier to do at home, than actually go to a library. The last time I was really a member of a library which wasn’t at my school, was in Delhi, a library which held little promise in terms of books for anything other than random British fiction, a collection of books in which very few were actually of interest, and fewer still which were new. Even if there were books, there was the effort required to actually get to this place and convincing my parents to drive me there. That’s sort of the cool thing about New York, if there’s anaything around, you really don’t need a car to get to it, which is helpful, but I digress. The NYPL isn’t like the British Council library, it has books you could actually read, which is cool. In general I like New York, and this entry is dead, so up it goes.

Ze Panda

Posts and such

Wednesday, August 16th, 2006

I said I’d post yesterday, ensuing weirdness at work, return of certain people, and other events conspired against this. Won’t go up today either, I am going to get Chinese food sometime this evening with other people from the intern program. I know like three people well in this entire gathering, can’t say I am unhappy about this. Hmm, someone want to confirm the rumors about Apple getting a large Merom delivery sometime in the first week of September. I am doing something I consider stupid and waiting for a processor upgrade, despite being a believer in the entire it is never worth waiting for computer upgrades school, and confirmations would be amazing. Also, someone want to buy me a Tezro and 8 gigs of RAM. I’d preffer the tower, but racks are fine by me too. Note this would be pricey, but greatly appreciated.

Ze Panda
PS: I did like Irix once, and the more I think about it, it was a cute operating system, nice with the entire how its version of X worked and such.

Makings of an Entry

Tuesday, August 15th, 2006

I swear there’s a longer entry waiting for this thing at home, like it needs to be completed and such, and it probably sprawls across like 5 or 6 printed pages right now should I choose to print it, but this was just a minor thing I remembered earlier today.
Yesterday when I was typing that longer entry out, I was going to comment on biometrics, and I wasn’t completely sure why I was doing that. Then I remembered, it all began with how I liked New York because no one needed to drive, and then I was thinking about how there was at least one country where I had a driver’s license, but hadn’t really used it, seeing as I had gotten it like a month before I left, for a long time anyways, and my parents weren’t OK with letting me drive around the few times I was home after (though this changes this time round I am told), and then I was thinking about how my license looked like such a fake piece of plastic, and how I could scan it and produce another one using something which printed on plastic, and the only thing which associated it with me in reality, was this signature which sort of looks like mine, but not really because it was done by making me sign on a stylus thing which was worse than all the POS machines. And this somehow got around to how I have been scared about hurting my index finger all summer since I need it to work, like I cannot work unless I can present my index finger in its current unaltered form. And this made me laugh, because I am waiting for other things to happen. But I shall go back and try and complete and post the actual entry, maybe today, maybe later, we’ll see.

Ze Panda

More NNTPS fun for Python

Tuesday, August 8th, 2006

So people on like half a dozen Python forums quibble about how the socket.ssl library for python doesn’t allow for certificate checking, and such, and well since I have really been spending miniscule amounts of time on this project anyways (like 30 mins to an hour a day), I figured I’d get a better OpenSSL implementation in. Be aware, that because I am using pyOpenSSL, I need to make this LGPL, rather than the usual Python license. To use this version of the module, you willl need pyOpenSSL, and perhaps OpenSSL, I refuse to distribute cryptographic libraries directly on this website because of all the legalese involved, all the export control requirements, and such. It is so much easier to let other people take care of that.

Ze Panda

PS: Forgot to link to the module. A bundle with the module and sample code is available here

Python nntps hack

Sunday, August 6th, 2006

I have a bunch to write about a recent surge in python use for me, some of the cool things I played with, and using Python for testing weird C programs. But it is late, and I need to get to sleep soon, so I am just going to put something less harmful, and less likely to require me to figure out legal tangles.

I have been working on something involving NNTP, mostly a minor project to create a few very simple command line NNTP tools, in part so I can pipe these together and create some sort of a NNTP-IMAP bridge, and perhaps a NNTP-RSS bridge, I preffer the IMAP idea, but well this is a little more in the future. Anyways, I spent some time creating a monitor, that I am not going to post quite yet, since I want to improve it a little, and one of my pet peeves with the python lib was that it provided fairly good NNTP support, but no NNTPs support, and it is sort of hard to extend the NNTP class itself to provide NNTPs support, because <i>init</i> seems to call on a few receive methods before returning, and this leads to some problems with where to put the ssl initialization code. Now seeing as Brown’s news servers, something I use pretty frequently because of internal newsgroups, runs on SSL, this was something which was bugging me. So I sort of took the library as it existed, and modified it to do NNTPs, and these are fairly minor changes, and my version of the library is completely backward compatible with nntplibrary’s current non-ssl functionality. There’s a patch submitted on sourceforge, but seeing as that’s going to take some time I am putting a tar with both the library (nntpslibrary, so I don’t have to worry about overriding someone’s nntplibrary) and a test program which doesn’t do much, but shows the basic steps for connecting.

This code is not covered by the Creative Commons license for the blog, and is distributed as is, without waranty, under the Python 2.4 license.

File

Weirdness from Other Planets

Thursday, August 3rd, 2006

This is going to be short since it is inappropriate to post long posts from other planets.

Off by one errors, subsequent array indexing issues, and memset with negative numbers which are pretending to be positive because of unsignedness sucks.

Also if we go by the number of NDAs I have seen this summer, I really should know more about the world than I did before this summer began, saddly this seems not to be the case. On the other hand, I have managed to attain a new level of sinning at the Church of Emacs, and my new found dislike for RMS and GNU makes this good.

The TextPattern password reset instructions on deleting passwords and setting them to the md5 hash of passw0rd doesn’t work, you need to delete the nonce too, on the other hand TextPattern’s using nonces, feels like I should be using some sort of ssled connection to post this.

Ze Panda