Disconnected Mutterings of a Random Geek

Fri, 10 Nov 2006

Observe

Wrote, and type-checked, the back end to Observe. Now I need to tie it to the front end, which might be harder than it looks. I didn't do this last night since it was half two in the morning.

posted at: 10:34 | path: /computing/hat | permanent link to this entry

Stack and Cover

Have shuffled things around so that stack and cover use the new design. Thngs seem to work, though I can see at least one bug in Stack. Its owrth noting that they run in the control thread, rather than getting a thread of their own.

posted at: 10:22 | path: /computing/hat | permanent link to this entry

Tue, 07 Nov 2006

Detect Bugs

I have finally fixed all the bugs in Detect bar one, which means I have finally got a bit of the project working. Yey. I also have a better test case. I'm going to move Hat-Stack and Hat Cover to the new design, then fix Hat-observe. I'll post a screenie at some point.

posted at: 16:32 | path: /computing/hat | permanent link to this entry

Fri, 03 Nov 2006

Almost Working

I almost got Hat detect working today. It needs a bit of tlc to get the new stuff added to actaully respond to GUI events, but it compiles and type checks, and doesn't look too bad. When its going I'll post a screenie.

Three things worry me about it:

The other thing I need to do is fix the openfile bug and make some more test cases. My mjc compiler is a place to start.

posted at: 01:53 | path: /computing/hat | permanent link to this entry

Wed, 01 Nov 2006

Prototype

I have a design prototype! It has three threads, one of which is the GUI main loop, one of which is the controller, and one of which simulates background work. The good news: The GUI appears to be fairly responsive, despite timing out as per the threading instructions. The Controller seems to work, and my similuated backend stuff does wait.

The other good news is that concurrent haskell is lovely to write in, and that my plan for letting other threads edit the gui by passing partally applied functions works.

posted at: 12:21 | path: /computing/hat | permanent link to this entry

Tue, 31 Oct 2006

Final year project

For my final year project, I'm working on a GUI interface to hat. Some work has been done already by Neil Mitchell" and you can see the first screen shots at his hat page. I have reached the conclusion, after trying to keep a log on paper, that I might as well blog about it.

I have been trying to nail a design, as its one of the things I'm marked on and my quick hacking attempts suggest that thought now will save work later. My current arch is MVC and I'm planning to use threads for each serious bit of computation that hat wishes to do.

gtk2hs, which is the latest crack at writing a haskell GUI library, has the odd problem with threads, with the docs over here. You basicily end up with one thread handling GUI stuff and a few more threads doing everything else. I want to write a system with a event thread, which deals with the gui stuff in a tight loop, a controller thread, which processes events and deals with finshed computation from the tools, and a thread for each toool, that actually does work.

Using The IRC example.

This gives us some idea of the code structure. first of all we wish to fork off the Controller, then register each tool with the controller. we aslo wish to register any GUI elements that we need to change with the Contoller. I suspect the controller is going to have a massive state tuple and a massive type sig.

The controller will read events from the channel and process them, which will consist of working out what type of event they are and doing the right thing with them. a Giant datatype is coming up!. having worked out how its going to work, I'm going to make a prototype.

posted at: 13:50 | path: /computing/hat | permanent link to this entry

Made with PyBlosxom