[Haskell-cafe] Re: A heretic question

Mauricio briqueabraque at yahoo.com
Wed Oct 22 06:23:55 EDT 2008

>> At first, make sure you have Bjarne Stroustrup book
>> (very important: last edition). If there's anything good
>> in C++, it's there. Look also at his homepage:
>> http://www.research.att.com/~bs/homepage.html
> I got the third edition and read it a couple of times... It's not that
> I'm lacking knowledge of the language, but routine and a deeper
> grokking of it's essence like I have with C, Scheme, Java and I guess
> also Haskell.

Well, one thing I miss from C++ is the idea of acquiring resources in 
constructors and releasing them in destructors, as explained here:


(Haskell uses that in 'with...' functions, like 'withFile', but the 
syntax in C++ seems cleaner to me.) So, I can sugest you to try 
something where dealing with external (out of your control) resources is 
important, and where you need graceful handling of exceptions. Also, 
it's very easy to write your own memory allocator and use it to manage 
memory "under pressure", and so you can go far beyond where 
'Foreign.Marshal.Pool' Haskell module can go.

Here is my sugestion: write something to interface with hardware. I 
tried to find something more specific but failed in available time, so I 
sugest you to take a look at many stuff you can find in thinkgeek. Then 
you can try unusual uses for it. For instance, they have a USB 
microscope. I don't know if you can move the microscope from the 
computer, but if you do, you could write something to automatically find 
evidences of failure in some kind of material or traces of chemical dust 
in surfaces. Or maybe you can get some security toys and try to identify 
people using their faces, or allow them to type text using just the 
movements of their heads. All of that involves heavy processing and at 
the same time interaction with equipment that can behave badly (like 
faces that can just go away from the computer). The nice thing about 
this is that in the end you can write a C wrapper over the main code and 
we can use it from Haskell :)


More information about the Haskell-Cafe mailing list