Posts

Showing posts from 2007

From dev to politics: I am taking part of Fox News boycott

I am officially boycotting Fox News and their supporters for there not allowing Ron Paul to participate in the Jan 2008 debate. http://www.debone.com/boycottFoxNewsSponsors.html

Cool links, cool projects

I have always like the lucene/nutch project. This looks like yet another cool tool. http://wiki.apache.org/lucene-hadoop/Hbase Project Euler, enough said. http://projecteuler.net/index.php And LLVM. http://ocamlnews.blogspot.com/2007/12/jit-compilation-from-ocaml-using-llvm.html

Why botlist sucks but doesnt suck as bad?

By and large, I have tried to live a life of purpose. When I mean purpose, I mean that I try to use my time for doing useful things. I try to create useful things. Sometimes it becomes difficult because time is limited and creating useful things in the year 2007, 2008 never straight-forward. I am working on the botlist application as a means of gathering useful information on the web, and filtering useful information on the web, allowing users to filter useful information on the web. Botlist may not get to the point where I want it to, but at least I made an effort to create a useful application. The data is open, the code is open. I will do my best to provide users with other useful tools. I look at other web 2.0 applications and shake my head in amazement at the uselessness of the various public tools. Twitter is a good example. It will probably receive a lot of funding and the twitter team will come up with a snazzy implementation, but the original concept is pretty usele

Made it through some of the Project Euler examples

I made it through a couple of the project euler examples (ok, 2) in Haskell. Here is the source. http://haskellnotebook.googlecode.com/svn/trunk/haskell/euler_problems/set1/ http://project euler .net/

Short Post, an working example for a meta language with Antlr 3.0+

There aren't too many FULL examples of a Antlr based grammar for the 3.0+ versions. If you actually research the grammar file, it isn't too difficult to go from vers 2 to 3, but when you are starting out it may throw some people off. In any case, I was working on a grammar for my botlist remote definition file and threw together a grammar. The full source is available and it will parse an example grammar and print out critical tokens and values. http://groups.google.com/group/jvmcookbook/browse_thread/thread/14b60345c6da2cbb

Berlin from Dallas, going after text analysis

Hello, I am coming to you from Dallas Texas (close to it, anyway). I am going to take a break from the Octane operating system and looking at text analysis. If you look at the botlist application, it is more than just a URL aggregation service; there are internal services that don't get a lot of attention. The content analysis is one part of that. So over time, I hope to look at text analysis utilities including some simple natural language parsing; noun/verb parsing. From there, who knows. Recent Resources http://www.ibm.com/developerworks/library/wa-lucene/ Anagram Trees

New site, botnode.com

If anyone on the planet was following the botprojects, I have moved them to a new host. Basically, same development articles and projects: http://www.botnode.com/newspirit/ Moved newspiritcompany.com to the new host botnode (be warned, some of the project did not mirror correctly).

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

Factor screencast, take 2, basic Factor usage with the tty listener

Image
(Image of the Factor UI, edited by Elie) (Images taken from Elie's blog at http://fun-factor.blogspot.com/ he created them, I didn't) The following screen cast was developed to show basic factor usage including analysis of the data stack, how one would go about looking up help on words, etc. Also, working with the stack takes a little getting used to, that is why I went it over in the screencast. Elie has some great images that I want to show here of some basic operations. I go over a couple of them in the screencast. "Let's take our rot example from above and practice it with the help of the illustration. Write 1 2 3 4 in your input area and hit Enter (the Return key) on your keyboard. You should see the start stack displayed in your stack area. Notice the position of the top and bottom of the stack in your stack display area. Now write "rot" (without the quotation marks) in your input area and hit Enter. You should see the rot stack displayed as above

How to post to blogger through gdata API (example in Scala Language)

In some earlier posts, I was ranting about the inadequacies of the blogger wysiwyg interface. Actually, I have ranted a lot about this system in the last couple of days. So, the next logical step was to create a simple blog client that could connect with the blogger/gdata API. It actually wasn't that complex. Envision an API for posting a blog entry to blogger, and the operations shall include: Authenticating to the service, provide a post URL to connect to, provide the actual content and title to post. That is basically all that is required to use the API. The documentation does a much better job of explaining the overall functionality available through the service. And it is freely available and fairly easy to use. I created the source below in a couple of hours. When using the API, just make sure to secure your google username and password as it is probably use to access all of the google services. Most of the scala source can be found below. class ContentReader(filename

Firefox (2 and possibly 3) are unusable on Linux

This will be a short entry but Firefox on Linux is not doing the Linux community any favors. Firefox is really buggy software. At first I thought maybe I was doing something wrong like visiting websites (you know, typical web browsing tasks) but after yet another memory upgrade and yet another Ubuntu release, I am convinced there is something seriously wrong with the Firefox/Mozilla engine on the linux platform. Maybe the FF community grew too fast and the FF group were unable to adequately handle the demands of the modern web user. There are a couple of problems that plaque my internet use. Slow startup (at least with FF2). Heavy javascript oriented pages wreak havoc on FF and the operating system. Don't you find it a little odd that Ubuntu just recently upgraded to Firefox 2.0.0.8 only 2 weeks (or so) after the Gutsy (Ubuntu 7.10) release. I bet it was yet another Firefox memory fix or something along those lines. The worst part, as far as I can tell it works fine on the

Project Diary Update: JVM Notebook

I have made the initial import of jvm language notebook source. Basically just a collection of source related to programming languages that run on the jvm. People are always curious about how one should get started working with for example Jython. Hopefully these notebook projects will show one how to do so. Here is a blurb from the project: "The Java Virtual Machine ( Sun's JVM is called HotSpot? ) is a java bytecode intepreter which is fast, portable and secure. Jython, JRuby, Scala, ABCL (Common Lisp) are popular language implementations that run on the JVM that allow for the syntatic sugar of their particular languages. This project contains multiple subprojects and code demos related to those jvm language implementations. " http://code.google.com/p/jvmnotebook/wiki/projectdiary

Random Ramblings: Haskell OpenGL on Win32 doesn't work at all?

Random Ramblings I can't tell if it is a failure on the part of the Haskell OpenGL testing team (open source developer volunteers) or on my part for not doing enough research? Whatever the case may be, there seem to be a lot of issues with writing Haskell OpenGL code on the Win32 platform. If you read the mailing list, you will get 100 steps on how to either compile with FreeGLUT or get the opengl haskell source from darcs or both. With that being said, my issue is that I will compile some code and then attempt to launch the application and you can tell that the window launches but no 3D graphics and the window does not stay open. Typically in a win32 environment. The runtime OpenGL DLL is resident on the system and the developer will only have to compile against a particular set of libraries. The Glut DLL is normally not installed but hardware vendors typically are supporting it now. I don't know if Haskell uses a FFI interface to connect to those DLLs or is it compiled agains

Updated OctaneMech Project Diary

http://code.google.com/p/octanemech/wiki/MechProjectDiary

Why contractual oriented programming is the only way to program in java

Java, by and large is a mess. The applications and the need for java systems is not a mess. At least for the time being there is still going to be a need for java applications and developers. With that being said, there are a couple of steps that can be taken to ensure a robust system with a limited number of bugs if you abide by a couple of rules and don't get caught in some java development traps. I don't go over the most obvious ones but I have gotten interested (again) into Contract oriented programming. Contract oriented programming, design by contract; ensures a true object oriented model, allows for better testing. Here is a quote from an Eiffel document, "In human affairs, contracts are written between two parties when one of them (the supplier) performs some task for the other (the client). Each party expects some benefits from the contract, and accepts some obligations in return". Basically, with design by contract, you limit the number of side-effects that

Happiest day of my life, playing FFT on Linux

Image
When several magazines call it the best game ever, there must be something to that. I knew it was the best game 10 minutes after playing it. Also, people always ask me why my screen name on freenode is ramza; where there you go. Ramza is the main character in FFT. http://en.wikipedia.org/wiki/Final_Fantasy_Tactics Anyway, I am playing through the psx emulator. Awesome. Thanks linux.

Last Java Reader Writer Utility you will need (especially for Log Analysis)

It is actually kind of funny, it is amazingly hard to write Java classes/utilities that you can really use over and over again. The requirements of a particular project may change to where code changes to your base library are always required. Your initial library may be too slow or to cumbersome to work with. Whatever the case may be, code-reuse in the Java world is hit or miss in my opinion. Sure it happens, libraries like the Jakarta commons provide useful libraries for common tasks. But, I see way more reuse in functional programming libraries; for example, there are some common data structure libraries that have been in use for a decade. With that being said, I found this first cut at a simple read writer utility reusable. The goal is simple; given a input file, read the file and then rewrite the output based on that file. I am using this particular code for log file analysis. Python pseudo code: f = open(filename) fw = open(filename, 'w') data = f.read() for line in data:

Imperative Haskell OpenGL development and demo

Image
I have finally created the camera component for the Octane Mech game. It is pretty basic, but is a basis for the camera movement. The camera, as you would expect, is a n important aspect of a 3D game. You can read more about the source and download the demo by going to the project wiki. I would have posted it on blogger.com but the code formatting here is terrible so I will only post to the wiki now and in the future. http://code.google.com/p/octanemech/wiki/MechProjectDiary

Haskell Cookbook(Notebook) Released on Google Code

It is always difficult to save a repository of code snippets that you consider useful. Sure, you could keep them in a blog or post them on some random wiki. These both work, but in my case, I will be hosting a Haskell cookbook including useful Haskell full source and snippets. It may include the "wrong" way to do things in Haskell and the "right" way but I will let you decide. And all examples will compile with a modern Haskell (GHC is the target system). http://code.google.com/p/haskellnotebook/

Octane Mech, OpenGL Haskell based mech game; early code and some haskell notes

Image
I am in the initial design and some development of OctaneMech; as the title implies is a OpenGL Haskell based Mech (bot, tank mobile) game. An early goal is to recreate/port glAnts (mech game) to haskell http://glants.sourceforge.net/ On Haskell Haskell is a pure functional programming language where your primary view of your software is through the use of functions. In java or other objected oriented/imperative languages, you are looking at the lowest level components; in Haskell, you are able to concentrate on the operation a particular function is used for without focusing on the low-level details (step-by-step sequences) of the function. I won't now or probably in the future detail the power you are given with Haskell and I leave that up to you the reader. I will focus on how I am using Haskell to build my project. And this first entry will contain some simple Haskell snippets. Main Like other applications, a Haskell application begins with entry point definition main fu

Botlist released on code.google.com

Botlist has been released on code.google.com. There really isn't much to say. The web application has been released in its raw form. There are some issues I mentioned on the wiki page with the SQL database create scripts and some "url" path issues. But I will fix these real soon. Stay tuned for updates. Also, I hope to send over the opml feeds so that you can import into your RSS readers. Here is the blurb from the googlecode page. Botlist is a social bookmarking web application that contains a news aggregating/news/article submission site. There is also an ads listing section so that users can post personal/ad profiles. The application itself is created with the following libraries; JRuby and J2EE's Spring framework as a middleware piece, Hibernate for object relational mapping (ORM). It is designed to run with Tomcat but should work with other J2EE servers. Search functionality uses the Lucene API. Other Features News aggregation (some links will be included);

Why Java still sucks but there are some things done right for web development (to me anyway), in 10 minutes

Overview Writing this will get me banned from the development community for life. Actually, I don't know if I really belong to any development community so I guess I can sleep soundly at night. Basically, unless you are living under a rock, the development world has made great strides in terms of language development. There are at least a dozen popular/mainstream programming languages that are used to perform various computing tasks. Some are open sourced, some are closed. Some are geared towards a specific niche in computing. Some are more general purpose languages. Java , C, C++, C#, Haskell, Common Lisp, Python, Ruby, Erlang Assembly/Machine Language (x86 for example) are probably some you have heard of. Lets get to the point (this is really about Java); Java and some other imperative languages that are defined by a sequence of steps to define a particular task (which can be cumbersome) are not as productive as declarative programming styles where the step-by-step inner worki

Hello Welcome

Hello, my name is Berlin Brown. I am a software developer that doesn't really have one particular niche or favorite programming language. I like them all and hate them a little bit at the same time. I love: http://programming.reddit.com/ But, you may also see me on: http://www.joelonsoftware.com/ I like creating various projects that frankly, users may not like. But, I love creating them anyway. My most recent project is (botlist, social bookmarking site): http://www.botspiritcompany.com/botlist/ My next project is a web server/application server/database server in haskell. And with that, various snippets of haskell development.