F# - First Impressions

   It seems like it is time to inform my multimillion reader base about my impressions about the F# programming language.  As I mentioned in my previous post I picked F# over IronPython because Python uses indentation to define scope. The first thing that got me annoyed about F# is that there is an option to turn on indentation based syntax like in Python and everyone uses it. At least it is an option and unlike Python when this option is turned on the F# compiler forces the use of spaces instead of tabs. On the other hand

let wordCount text =
   let words = String.split [' '] text
   let wordSet = Set.of_list words
   let nWords = words.Length
   let nDups = words.Length - wordSet.Count
   (nWords,nDups)

really looks better than

let wordCount text =
   let words = String.split [' '] text in
   let wordSet = Set.of_list words in
   let nWords = words.Length in
   let nDups = words.Length - wordSet.Count in
   (nWords,nDups);;

   Right now when I am trying the examples from the "Expert F#" book I am always rewriting them with the heavy syntax. That way I am learning both types of syntax and what is more writing these keywords helps understand how expressions are composed. However when you get used to it these tokens are just messing around. Maybe with time I will get used to indentation based syntax and will give IronPython a try.

  Otherwise F# looks cool but strange. It is not even lispish. The first thing one needs to do is let go of type declarations which is not so simple because F# is as strongly typed as C#. It takes time to get used to type inference even if one has experience with C#'s way of doing it. Another thing that seems strange at first is that functions can return more than one value by automatically forming a tuple.  Tuples are then decomposed back to variables using pattern matching i.e. placing the first element of the tuple in the first variable, the second element in the second variable and so on. However this can get more complicated because an element in a tuple can itself be a tuple. Worth noting is that one can switch to C# style programming at any time. I hope I will not get tempted to program in F# like I do in C# when I try to do something myself because there will be no point in using F# if I write it like C#. What is more C# is better at being C# than F# is.

   Overall I think F# is fun but I have to wait to see what happens when I get into the deep waters.
Posted by:   Stilgar
14:55 05.08.2008

I'm Going Functional

   You may have noticed that I did not post any programming related articles lately. The main reason for this is that after I played with C# 3.0 and LINQ I have not learned anything really interesting. That is why I am beginning to study F#. To quote the "Expert F#" book review:

   "Expert F# is about practical programming in a beautiful language that puts the power and elegance of functional programming into the hands of .NET developers."

   Why learning F#?
   ...
Posted by:   Stilgar
16:54 29.07.2008

Switching FTP Clients

   Since the latest version of SmartFTP client the authors stopped providing a free version for home users. I figured out the price would be like $20 and headed for the website to buy it. However it turned out that the price is double of what I expected. I can afford it but it is a matter of principle. It should not cost so much to upload some files to this website twice  week. So I dropped the pretty SmartFTP in favor of the ugly FileZilla. If at some point SmartFTP gets cheaper for home users or I get to do extensive amount of work with an FTP client I will buy it. No 64 bit version for me anymore. No pretty interface.
Posted by:   Stilgar
05:42 29.07.2008

The Hate of the Linux Hater

   I have new favourite website - The Linux Hater's Blog. I found this site through a link on Slashdot to this article by Jeremy Allison (obviously well known in the Linux community for his work on Samba). After reading all of the posts and a great deal of the flames (that is how the Linux Hater calls the comments) I can confirm that Jeremy is right. This blog is Linux Hater's way to submit bug reports. More often than not the bug reports are not against the software but against the Linux community itself. In my opinion the Linux community is the greatest problem this platform has. It seems like they are more focused on hating Microsoft than improving Linux. The existence of phrases like "Microsoft-free" proves that. Also when they try to convince a victim to join their cause they do not point out the virtues of Linux but the downsides of Windows instead.

   You probably want to read Linux Hater's blog no matter on which side of the barricade you are fighting on. The guy is really competent (he says he has contributed code for KDE in one post) and is disillusioned enough to criticize the OS and the ideology behind it. Besides there are jems of pure fun for example calling Slashdot "Al Jazeera of tech journalism".

P.S. I have a challenge for Linux lovers reading this. Point me to a reason I should switch to Linux. Mind you that I use my computer for .NET programming (I do this for a living), games (I am living for this) and web/chat (also I think that the software mIRC is the greatest desktop software ever). Try me!
Posted by:   Stilgar
16:32 23.07.2008

End of an Era

   Yesterday was the last day of Bill Gates as a full time employee at Microsoft. Love him or hate him this man changed the world. Including your world. A true visionary he had that rebellious idea that the software costs money. Before that software was seen as something that comes with the hardware. That vision made him the richest man in the world. At the same time that another true genius called Richard Stallman came up with the idea that software should be free (as in speech), Gates wrote his infamous Open Letter to Hobbyists where he stated that software was a product and should be payed for in order to increase its quality and stimulate developers.

   Bill Gates will continue to be chairman of the board in Microsoft and is still the largest single shareholder so you can bet that his word will still matter. His everyday job from now on will be his charity foundation - the Bill and Melinda Gates Foundation.

   However there is one more important event. Windows XP will retire on Monday. From then on Microsoft will not sell Windows XP. This edition of Windows was the most successful of all and it took 5 years for Microsoft to release a successor which is the longest timespan between Windows releases.

   In my opinion these two events mark the end of an era.
Posted by:   Stilgar
22:03 28.06.2008
First Previous ... 21 22 23 24 25 26 27 28 29 30  ... Next Last