Posts

Showing posts from November, 2007

Web requests with the Haskell HTTP library

Overview Web development work can exist at the server level but it can also exist at the client level. You may need to build a simple HTTP load test framework or test if a particular web application or page is available. It is also possible that you need to upload files. I have built a couple of simple HTTP frameworks in Java and Python but this be a first attempt at Haskell based framework. Actually, in this small example; there isn't much of a framework but just an example on how to use the most recent HTTP library update. Install the HTTP library It seems that GHC Haskell release 6.8 encourages that libraries exist outside of the base Haskell build. For example, the parsec parser library requires that you download parsec from haskell.org or other location or extract the source from darcs. Basically, development will continue on haskell libraries outside of the typical GHC development. With that being said, the same holds true for the HTTP library. You can pull the source

Blog Spam: Cat programming language

This is my first blog spam post but I hope to post more in the future. Basically, blog spam is a post that does not have any real content and is generally used to promote the blog. In my case, I am not promoting my blog but I just thought this post on the Cat programming language is interesting and I didn't really feel like trying to come up with some witty entry so instead I will just copy the project description and resource links: "Cat is a functional stack-based programming language inspired by the Joy programming language . The primary differences is that Cat provides a static type system with type inferencing (like ML or Haskell), and a term rewriting macro language extension language called MetaCat ." http://www.cat-language.com/ What I also thought was interesting was that Cat is embeddable. http://code.google.com/p/scheme-cat I hope to make OctaneLang embeddable as well.

Science behind botlist

I haven't done a lot of work on botlist recently. I have been captivated by other projects. But I have a couple of doable features that I want to implement. First I need to develop the push-pull system a little bit further. This allows for botlist to be updated remotely. Right now, it is working fine but I want to ensure data integrity for when the client is communicating with the server. Basically, when the client sends data uploads to the server, I want to ensure that the server has all the right data. It will probably be a simple MD5 scheme to validate a binary upload or something similar. As of right now, the push pull system just ignores invalid records when they are encountered. Recommendation System Botlist is a really simple system, right now. New links are submmitted by users or by the remote bots and added to the table. I am currently working on a system for the main page to be filled with popular links and actual content. Recently I picked up a USA today newspaper and am

Additional Resources (link blog entry: haskell and parsing links)

My old take on a blog was to write useful entries. That didn't go so well, I mean I didn't really get that many readers. So this time around, I am just going to post whatever I feel like posting. A free for all of sorts. In this entry, here are some useful haskell and other functional programming resources and blogs. Blogs and articles that I have been reading over the last couple of days: Resources http://legacy.cs.uu.nl/daan/download/parsec/parsec.html http://planet.factorcode.org/ http://halogen.note.amherst.edu/~jdtang/scheme_in_48/tutorial/overview.html

More practical Scala, searchable help document system

Image
I go into more detail on the google code site, but here is a tool for creating searchable help documents: "This is a small utility for indexing developer help documents with Lucene. And because some botlist documents have already been indexed, you can use it to search some of those example docs." http://code.google.com/p/openbotlist/wiki/BotlistHelpDocumentSystem

Practical Scala; Walking a tree directory

One of my requirements for botlist is to have a searchable help system. E.g. instead of man pages or Java API. I want to be able to add files to a directory. Index the files in the directory and then have the data as searchable. All of this through a command line interface. I started some initial code and used the following Scala idioms: First Version, use of File Class: class DocWalkFile(file: File) { def children = new Iterable[File] { def elements = if (file.isDirectory) file.listFiles.elements else Iterator.empty; } def andTree : Iterable[File] = ( Seq.single(file) ++ children.flatMap(child => new DocWalkFile(child).andTree)) } def listDocuments(dir: File): List[File] = (new DocWalkFile(dir)).andTree.toList filter (f => (f.getName.endsWith(".java") || f.getName.endsWith(".txt"))) Second Version: import java.io.File object DocWalkFile { def andTree(dir: File): List[File] = { val fileList = dir.listFiles.toList (fileList filte

Short primer, importing a SVN repository into a GIT one

I wanted to convert parts of the Botlist project to GIT. Basically, I did just that. I saved the history from the Subversion repository and was able to import that into a new GIT repository. My entry will discuss the steps that I took to make that happen, also I work with several different remote machines so I hacked together a startup script for git-daemon. Get GIT and install I am working with an Ubuntu Dapper machine (yes, it is an older distro) and I didn't want to go through the hassle of using a very out of date version of git, so we are going to download the most recent git from kernel.org. wget http://kernel.org/pub/software/scm/git/git-1.5.3.5.tar.gz tar -xvf git-1.5.3.5.tar.gz Pre configure and Installation Actually, before running configure on the git source; you may need to get two libraries. On Ubuntu, I did the following: sudo apt-cache search libsvn-core-perl sudo apt-get install libsvn-core-perl sudo apt-get install libcurl3-dev In order for the git-svn to work,

Now Playing: Brandenburg Concerto

In my effort to find the perfect development music, I stumbled upon these concertos by Bach, in particular "Brandenburg Concerto No. 2 in F - 1 Allegro" http://en.wikipedia.org/wiki/Brandenburg_concertos They are widely regarded as among the finest musical compositions of the Baroque era .

13949712720901ForOSX Vote! I am actually helping Java

I am not really a big Mac user, but I use it every once in a while. And I still develop in Java, so I am helping the Java cause by posting this vote to get Java6 OSX. Personally, I feel that Apple has a right to leave out whatever software they choose. Plus, they already have Java5 working with their operating system so it is not like they are totally ignoring the Java community. But, if enough momentum is created for adding the new Java; would it hurt for them to listen to some of their users. So, I am doing as the blog instructed and here is my vote: 13949712720901ForOSX http://blogs.sun.com/bblfish/entry/vote_for_java6_on_leopard

Google, we are watiing?? on opensocial

http://code.google.com/apis/opensocial Google, what is the deal? Where is opensocial. I am actually kind of excited about this technology. I heard reports that library was supposed to be released on Thurs. It is 6:42PM (PST) , you have a couple more hours left. Don't be evil by lying to us.

I have a new perspective, Firefox and Flash bugs

After a little bit of research I eventually ended up on at the bugzilla.mozilla.org site. It seems like there are various issues with flash and FF. So hopefully, I will do some work in trying to resolve my problems as opposed to just ranting. https://bugzilla.mozilla.org/buglist.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&content=flash