Tuesday, June 28, 2011

Selected as an LTer

I've selected as an Lightning Talker in RubyKaigi2011.

Lightning talks 1 - July 17, 2011 (Main Hall)

My LT title is Yet Another "ASP.NET MVC 3 vs. Ruby on Rails 3".

I will do my best!!

Goodies

RubyKaigi staffs release some goodies in here.

Saturday, June 25, 2011

Calculate the firefox year #2

(continued from phosphorescence: Calculate the firefox year)
A rapid pace of growth of IT is often likened to a "dog year". And now, more rapid pace comes! It calls "firefox year".

http://mozilla.jp/firefox/preview/faq/#q-rapid-3
  • Firefox 5 was released at 2011-06-21.
  • Firefox 6 will be released at 8 weeks after Firefox 5's one.
  • Firefox n + 1 will be released at 6 weeks after Firefox n's one.

So I again try to calculate the year when the version equals release year and when the version passes release year, in F#.

Thursday, June 23, 2011

Calculate the firefox year

A rapid pace of growth of IT is often likened to a "dog year". And now, more rapid pace comes! It calls "firefox year".

http://mozilla.jp/firefox/preview/faq/#q-rapid-3
  • Firefox 5 was released at 2011-06-21.
  • Firefox 6 will be released at 8 weeks after Firefox 5's one.
  • Firefox n + 1 will be released at 6 weeks after Firefox n's one.

So I try to calculate the year when the version equals release year and when the version passes release year, in Ruby 1.9.

Monday, June 20, 2011

Studying F# : Combination of Generics and Discriminated Union

We can use generics in Discriminated Union's of clause.
type Component<'a> =
    | Composite of list<Component<'a>>
    | Leaf of 'a
let compositeSample = Composite([ Leaf(2); Composite([ Leaf(1); Leaf(3) ]) ])

Friday, June 17, 2011

MariaDB 5.2.7 for windows is big change.

In yesterday, MariaDB 5.2.7 has been released. For POSIX, this release is minor release. But. for windows, this release is almost major release with three things.
  1. Upgrading wizard for existing MariaDB windows services.
  2. HeisiSQL is bundled as Defualt client for Windows MariaDB.
  3. Default my.ini is in "MariaDB installation directory\data\my.ini".

Tuesday, June 14, 2011

Studying F# : Reference cell

Reference cell is a keyword for using immutable binding as mutable container approximately.

define reference cell

> let refCellInt = ref 10;;

val refCellInt : int ref = {contents = 10;}

change value in reference cell

> refCellInt := 20;;
val it : unit = ()
> System.Console.WriteLine(refCellInt.Value);;
20
val it : unit = ()

undefine reference cell

> let normallInt = !refCellInt;;

val normallInt : int = 20

Saturday, June 11, 2011

Comparison of Ruby's Enumerable and C#'s Linq to Object #2

The samples for Grouping in interactive shell.

Ruby 1.9's Enumerable on Mac OS X

$ irb1.9
irb(main):001:0> one_to_ten = 1..10
=> 1..10
irb(main):002:0> one_to_ten.group_by {|i| i % 3}
=> {1=>[1, 4, 7, 10], 2=>[2, 5, 8], 0=>[3, 6, 9]}

Mono(C#)'s Linq to Object on Mac OS X

$ csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> using System.Linq;
csharp> int[] oneToTen = new int[]{1,2,3,4,5,6,7,8,9,10};
csharp> oneToTen.GroupBy(i => i % 3).ToDictionary(g => g.Key, g => g.ToList());
{{ 1, { 1, 4, 7, 10 } }, { 2, { 2, 5, 8 } }, { 0, { 3, 6, 9 } }}

Thursday, June 9, 2011

Comparison of Ruby's Enumerable and C#'s Linq to Object #1

The samples for restriction and projection in interactive shell.

Ruby 1.9's Enumerable on Mac OS X

$ irb1.9
irb(main):001:0> one_to_ten = 1..10
=> 1..10
irb(main):002:0> one_to_ten.find_all {|i| i % 2 == 1 }.collect {|i| i**2}
=> [1, 9, 25, 49, 81]

Mono(C#)'s Linq to Object on Mac OS X

$ csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> using System.Linq;
csharp> int[] oneToTen = new int[]{1,2,3,4,5,6,7,8,9,10};
csharp> oneToTen.Where(i => i % 2 == 1).Select(i => Math.Pow(i, 2));
{ 1, 9, 25, 49, 81 }

Monday, June 6, 2011

Timetables of RubyKaigi2011 are revealed

Timetables of RubyKaigi2011(a.k.a. THE LAST RubyKaigi) are revealed now.
The most notable and the most misterious session is Yami RubiKaigi. It means roughly "Conference In The Dark".

Friday, June 3, 2011

Studying F# : let in

I confused about "let in" clause because there are no explains and no descriptions about this in the book Professional F# 2.0. So I search about it in another sites, then I guess "let in" clause is used for "throwaway" binding. The sample is below:
> let useForRightSideOfIn arg =
-     System.Console.WriteLine(arg.ToString()) in List.iter useForRightSideOfIn [1;2;3];;
1
2
3
val it : unit = ()
> useForRightSideOfIn [1;2;3];;

  useForRightSideOfIn [1;2;3];;
  ^^^^^^^^^^^^^^^^^^^

stdin(3,1): error FS0039: The value or constructor 'useForRightSideOfIn' is not defined