10/20/2008

Progress of My Opensource

I have developed open source since 01/20/08.
Application which is my open source has two feature, one is to make triangle strip and other is to load 3ds and obj file.

Following picture is created by This Application.




This picture is 3d model formed by triangle strip.

Next picture is origin of 3d model.




Yet My open source is incomplete.

10/19/2008

To refer part of string

When You want to refer in Ruby program.

You would be comfortable, If you write next codes.

puts "abcdefg"[3 .. 5]


When above codes run, prompt show you "def".

10/18/2008

The Way Defining Member

When you want to define member belong to your class as next sample code.

class Data

attr_accessor :param, :index, :parent, :children



def initialize()

@index = index

@param = param

@children = []

@parent = nil

end

end



It is important that "attr_accessor" keyword in above codes.
Because words following attr_accessor are recognized as member by ruby.

10/08/2008

Range Type in Ruby

Ruby has fifth principle types.
These are integer, string, array, hash and range.


I have not seen range type, First I see it in Ruby program.

Range type is very useful.
For example, when you use case sequence, you feel that range type is convenience.

The way is as next codes


case Time.now.hour # get now time
when 6..9 # use range type
puts "Good Morning"
when 9..17
puts "Hello"
when 17..6
puts "Good night"
else
puts "What?" # nothing time
end

Define class with Ruby

If I create a class with Ruby, I program as following code.


class Test
end



If I want to create inheritance class from super class, I program as following code.


class SubTest < SuperClass
end

10/02/2008

Emacs in iMac

I try to use emacs in iMac, But Two problems appear as following.

  • Ctrl key & Space key action invokes search program.
  • Meta key is nothing.

    First problem is disappeared by assigning this combination of keys disable.
    Second problem is at loose ends.
  • 10/01/2008

    I found great web page. It shows me many paper.

    It is this page.
    Paper described in GPU GEMS is there.

    VirtualMachine

    I use VMWare for working.
    VMWare is very simple to apply.

    I installed Ubuntu8.04 to it, and enjoy programing on it.
    Network on VMWare is enable.

    I hesitate to install VMWare to iMac in my house.
    Because I am not hard up iMac at the moment.