This time it has taken me more than I planned but I finally have something to show off.
As usual the compiled exe here and the full code here.
This week I have really struggled to figure out how to mix functional and imperative concpets. After a few days of trying to recursively build an F# list I gave up and resorted to using a ResizeArray<> which is simply an equivalent of C# List<>. I really wonder if a bit more “functional” way of building a list is possible.
So, another weekend, another F# excercise. This time I decided have some fun with Cairo inside Gtk# and a port of the old Knockout example from C# seemed like a prefect idea. Here’s what I got:

Compiled executable here, code here. Now, what I’ve done was pretty much a simple “translation” to get it running but I would love to make the code really functional. So, go headed and comment on what I could change to do it.
Another embarrassing udpate: fixed indentation
Update 2: indentation is broken by Wordpress editor. Code replaced with a link.
This little pretty window:

is a result of this tiny bit of F# code:
#light
open System
open Gtk
Application.Init()
let window = new Gtk.Window(”F# Gtk”)
let vBox = new Gtk.VBox()
let closeButton = new Gtk.Button()
let label = new Gtk.Label(”Hello World!”)
window.WindowPosition < – Gtk.WindowPosition.Center
window.SetDefaultSize(160, 40)
window.Destroyed.Add(fun _ -> Application.Quit() )
closeButton.Label < – “Close”
closeButton.Clicked.Add(fun _ -> Application.Quit() )
vBox.BorderWidth < – (uint32) 6
vBox.PackStart(label, false, false, (uint32) 6)
vBox.PackStart(closeButton, false, false, (uint32) 6)
window.Add(vBox)
window.ShowAll()
//brown paperbag update: I’ve missed this line during Copy/Paste
Application.Run()
Next step is piece of code that actually does something semi-useful. I’m thinking about implementing a convex hull algorithm which F# seems pretty well suited for.
…all the time. Here’s the reason:
A few weeks ago I have noticed a lot of traffic on the Psycho website. A quick look at referring sites showed me that it’s all coming from the Gnome page of Google Summer of Code ideas. Some kind soul has mentioned Psycho in the mind mapping proposal. Turns out that increased traffic on my website was the only positive outcome of that proposal. For some reason it was not picked us as SoC project. That was one of the things that made me decide to seriously get back to work on Psycho. It’s haunting me all the time anyway so I can just as well put the constant thinking about it to a good use and get into a usable state. As a part of that resolution I have decided to spend at least an hour a day hacking. We’ll see how that goes. The important thing is that I have also decided to rewrite the whole thing, although rewrite is probably not the best word here. It would mean that something valuable was already written… :-) Anyway, I’m starting from scratch and that should provide me with some additional motivation as I have a lot of new ideas that I’m going to be very eager to try.
- Complete separation of data and its visual presentation.
Last time round the main object (Topic) was based on Gtk.Widget which didn’t really make a lot of sense. Even though it was using the MVC framework the data was still tightly coupled with the with. That will change and thanks to that it should be possible to write different frontends, not necessairly based on Gtk. - Mind map widget as a separate Gtk# library.
The first reason for that is the same as above but there are some additional benefits. I’ll try to make that library usable for others so maybe someone will be able to use it in some other projects. A mind map is an amazing way of visualizing all sorts of data so someone may find it useful. Beside it I was inspired by the amazing work that Aaron Bockover has done on his ListView widget and Banshee in general. - Using MonoDevelop and Linux as primary development environment.
I decided that it’s time to put my money… er… my freedom, where my mouth is. I’m complaining about being stuck on Windows all the time and still I’m choosing to use it when nobody forces me to. Of course the biggest factor here is the amazing progress happening in MonoDevelop which actually makes it possible. - Using Git for local source code management.
Well, just being trendy here… I’m using Git-svn to communicate with the Google Code SVN repository. I’m actually playing with it so much that most of my commits have around 2 lines. It’s better to commit too often than not often enough, right? - Supporting Mono.Addins right from the start.
That’s just something that I’m considering right now. It would be cool to enable other people to easily enhance Psycho’s functionality, but first I need learn how to do it. I guess it should be easier if I start doing that right from the start of the rewrite.
OK, so as you can see I have a lot of plans and I certainly didn’t abandon the project. As usual, some help would be nice. I have a lot of questions and doubts that someone experienced could easily answer. Without those answers I’m wasting a lot of time and I get very frustrated sometimes not being able to progress as fast as I would like to. So, if you were going to mentor a project for Google SoC but it wasn’t accepted, I could really use your help. Especially if you know a thing or two about Gtk(#) and cairo. Please.

Happy 2008
Originally uploaded by piotr zurek.
Note to self:
Remember, it’s never so bad that it can’t get any worse… :-)
I’ve read it somewhere on the Internet a few days ago. Somebody was saying that Apple was looking at buying Autodesk and switching all their products to Mac OS only. It’s obviously a ridiculous speculation and I really don’t believe it could happen. EVER! Nevertheless I’ve let my imagination run wild for a moment and decided to write down what I was thinking…
Why would it be so beautiful?
Just a few of my personal reasons why I would love to see that happening:
- Big blow to Microsoft’s dominance
I have nothing against Microsoft as a software maker. I just hate that I have no choice and when I’m not happy with their product I can’t simply switch to something different. For me, just like for millions of engineers, designers, detailers, draftsmen and other technical professionals there is no choice – we run whatever AutoCAD and other Autodesk products run on. - I would get to work on a Mac
Don’t get me wrong – I’m not an Apple fan boy. My system of choice would probably be Linux, but since I am stuck on an evil proprietary platform I’d rather be stuck on something as good as Mac OS (security, performance, stability, usability) additionally running on beautifully designed hardware. - No funny looks at work
Our industry (CAD/CAM/CAE) is so Windows centric that when I tell my colleagues at work that I am sometimes using a Mac at home they look at me as if I was trying to be original. A snob with a girly notebook (my gf’s MacBook). - Just for the fun of it
It would be really exciting to watch, just like a big storm on the sea. Not a lot of people would probably see that one coming and implications of such a move by Apple would be huge to the whole industry.
What could make you think it is possible?
During the last couple of months a few things have happened that could be seen as signals of something significant going on. No hard evidence but still enough for a hungry mind…
- This job posting.
Autodesk is looking at hiring a BDM for AutoCAD and Apple is mentioned as one of vendors who would be selling and marketing it. Here’s an excerpt in case the original expires:
| Business Development Manager: AutoCAD | Posted 02-Nov-2007 | |
| Location: 3950 Civic, SRF | ||
| Are you ready to travel the world, develop partnerships with major technology players, and grow a half billion dollar business as the Business Development Manager for AutoCAD? You must be a highly-motivated business person ready to develop a product strategy for selling and marketing AutoCAD with vendors such as hp, Dell, APPLE, Lenovo, Amazon, CDW, and many others. |
||
- Windows application compatibility in Mac OS
A few weeks ago someone has noticed something that was interpreted as a chance for Windows compatibility coming to Leopard in future versions. - Autodesk buying out its own shares
I won’t pretend I know what and why they are doing but maybe they want to accumulate some stock to actually have something to offer to Apple?
(Edit 1:10 pm, 20 Dec 2007) - They both like nice new toys
Multitouch namely. We all know the beautiful and intuitive multitouch interface of iPhone and iPod touch, but if you read Scott Sheppard’s blog you have probably seen this and earlier posts on the subject. Multitouch interfaces seem to be perfect for CAD software and Apple definitely knows a lot about them.
Why I don’t believe it will happen?
I would be happy to eat my gym shorts if I’m not right but I simply think that Apple buying Autodesk is not possible. No matter how strong you wish for something to happen it won’t happen JUST BECAUSE you wish, unfortunately…
- Autodesk and Microsoft are too close
Autodesk is all buddy-buddy with Microsoft. The next version of AutoCAD looks as if it was an Office 2007 application (ribbon control). They have created their DWFx file format as an implementation of Microsoft’s XPS and it is natively viewable in Vista. I wouldn’t be surprised if the next generation omnipotent file format called DWGx (if rumors turn out to be true) would be somehow based on the OOXML format. - Too much work to port products to Mac OS
I can’t even imagine how much time and resources would it take to port, even just the most important Autodesk products, to Mac OS. Maybe temporary use of some kind of Windows compatibility (as mentioned above) would be a good temporary solution but I find it hardly believable that anyone would like to use critical applications in non-native environment. - Too much resistance from Windows users
A lot of computer users don’t cope with a change very well. Especially if they use their computers as tools at work and they only care about getting their job done. For them a change of platform would be just an unnecessary disruption.
Why would it make sense for Apple?
Obviously it’s all about the number of users and revenue that they bring to the company. Think about over 8 million of seats of AutoCAD (only legal) and multiply that by the price of a single Leopard license. That alone would give a number close to $1 billion and although it is the biggest, AutoCAD is not the only Autodesk product that people would like to use on a Mac.
- Access to a huge community of technical clients
Apple hardware and Mac OS would become an instant standard in a number of different engineering industries. They are already pretty strong (or even dominant) amongst professional photographers and graphic designers. There is also a decent number of architects using ArchiCAD on Macs but bringing Autodesk products to the table would introduce Mac OS platform to all sort of engineers and big corporate customers. - Halo effect or platform synergy bringing new customers
Huge number of people use Windows at home just because they use it at work. Either because they simply don’t know Mac OS or they don’t want to use two different environments. Bringing AutoCAD (Inventor, Revit, etc.) to Mac OS would introduce it to a lot of people that would simple prefer it over Windows or again use it at home just because they use it at work (or school). This way the number of new Mac OS licenses would probably be much bigger then the number of Autodesk product licenses. - Media & Entertainment products
Over the last couple of years Autodesk has acquired a few companies that that are widely used in TV and movie production. Disney and Pixar are probably amongst significant users of those systems. Can you smell the connection already? Huge render farms running on Mac OS on XServ must sound appealing. - Leverage in product politics
Apple never knows when Microsoft decides to kill off Office for Mac. If they decided to keep Autodesk products running on both platforms they would have something to keep Microsoft playing nice. Of course before iWork becomes a full blown Office replacement. It would also give a lot of ISVs a reason to treat Mac OS on the same conditions as Windows.
Why would it make sense for Autodesk?
Well, I don’t believe it would unless they make it run on both platforms, but that’s not really the point here. If Apple buys Autodesk it is supposed to be good for Apple, but looking at the graph below I know in whose boat I would like to sit. Apple is still worth half of Microsoft but its value is growing quickly and consistently. They have overtaken IBM already and probably have enough cash in the pocket to buy Autodesk as a Christmas gift to all the people patiently waiting for AutoCAD on a Mac all those years.
Click the image for 6 year value growth history.

Update (10:40 am, 20 Dec 2007):
We all know how impossible that story is, but if you have something that would back it up I would love you to see your comment. That could develop into a nice bogus gossip. :-)
Recently I have been seeing a lot of dark themed screenshots and I think I could get used to that. But you know what I could get used to even easier – not coming to the office every morning to start my Windows machine. Somebody put me out of that misery, please…
Click the image for a full size screenshot.
![]()
Wow! I have just noticed that the “Hybrid” button in Google Maps was replaced with a “Terrain” button. So when I use it on my Google Maps default location it looks like that:
Of course there are better things to look at than your own neighborhood. Like for example those fascinating features of the terrain in Venezuela:


