Thursday, October 28, 2010

Studying F# : Difference of List, Array and Tuple

Now I'm studying about F#. And I learned the difference of List, Array and Tuple.

List

A list in F# is an ordered, immutable series of elements of the same type.
Each elements are separated by semicolons.
> let integer_list = [1; 2; 3];;

val integer_list : int list = [1; 2; 3]

> let string_list = ["a"; "b"; "c"];;

val string_list : string list = ["a"; "b"; "c"]

Monday, October 25, 2010

IronRuby 1.1.1 is released

A few days ago, IronRuby 1.1.1 has been released. It is the first release compatible with Ruby 1.9.2. And now, non-English languages are recognized almost correctly.

Friday, October 22, 2010

If you want to use Mono 2.8 on openSUSE 11.3 immediately...

In default Mono repository for openSUSE 11.3 (http://download.opensuse.org/repositories/Mono/openSUSE_11.3/), there are packages of version 2.6, not 2.8. If you want to use Mono 2.8 on openSUSE 11.3 immediately, use the repository below:

http://ftp.novell.com/pub/mono/download-stable/openSUSE_11.3/

Tuesday, October 19, 2010

F# TIMTOWTDI : fibonacci

1st step

let defines function, and let rec defines recursive function.
> let rec fibonacci n = if n=0 then 0 elif n=1 then 1 else fibonacci(n-2) + fibonacci(n-1);;
> for i in [0..10] do
-     let fibn = fibonacci i
-     printfn "%d" fibn
- done;;
0
1
1
2
3
5
8
13
21
34
55
val it : unit = ()

Saturday, October 16, 2010

Install F# on Mac OS X

This article is for Mono 2.8.x and older. Mono 2.10.x and newer contain F# out-of-the-box.
Since Mono 3.0.2, Our Mac can run F# 3.0. Please check F# 3.0 on Mac

F# is an object-oriented functional language by Microsoft. It's based on C#. I try to explain what technologies of Java-lang are corresponding to:
execution environmentobject-oriented languageobject-oriented functional language
Java technologiesJVMJavaScala
.NET technologiesCLRC#F#

And F# is also available on Mono, not only .NET . Let's install F# on Mac OS X from scratch!