English version of http://codnote.net/ . But my english is usually strange.
Friday, September 3, 2010
This blog was moved to wordpress
Change feed and some bookmarks, please.
New blog is here:
http://codnote.net/
Monday, August 16, 2010
Monday, August 9, 2010
Sunday, August 8, 2010
Use Homebrew for substitution of port
What's?
MacPort is heavy.
Install
Install something (like perl)
Make custom formula
Brew's package is created by formula.
I'm studying Perl, so I tried create perl's formula. because brew doesn't have perl package.
search tarball
http://www.cpan.org/src/5.0/perl-5.12.1.tar.gz
is a package tarball.
make template
[sorah@lemonade]:~/brew% brew create http://www.cpan.org/src/5.0/perl-5.12.1.tar.gz
Version detected as 5.12.1.
And editor will be opened.
Created template:
And edited it:
Install
woooooooooooooooooo!
Sunday, July 25, 2010
Saturday, July 24, 2010
Wednesday, July 14, 2010
Received an admission ticket of toeic
Today I received an admission ticket of toeic.
I put headshot to ticket.
I'll take the TOEIC exam at Jul 25...
doki doki
Tuesday, July 13, 2010
Try coffee-script
Javascript isn't easy to write for Rubyists.
But coffeescript is simple version of javascript.
It compiles into Javascript.
Install
http://github.com/jashkenas/coffee-script
I don't have|know node.js
, what is it?
vim-coffee-script
Syntax file of coffee-script
http://github.com/kchmck/vim-coffee-script
I am vimmer, and I like vim, vim vim and vim vim vi, vim, vim vivmvivmivmvivmvivvmvivvvv... vim!
Node.js
It's [evented I/O for V8 javascript.
I already installed V8, so I tried:
You can take some coffee in making.
CoffeeScript
yey
Hello, world
Function
CoffeeScript doesn't have statement ? true : false
...
Last
Coffee script is funny and fun and useful.
Javascript is crazy :p
Wednesday, April 14, 2010
Syntax error in method call with Hash argument in Ruby
Problem
Factor
{1=>2}
must process for Hash object.
But {1=>2}
is processed for a block.
It is Ruby's spec... (nurse said "It is spec..?" at IRC ( #ruby:*.jp in ircnet. )
Solution
p({1=>2})
p 1=>2
h = {1=>2}
p h
:-)
Tuesday, March 30, 2010
I'll take a TOEIC exam in June.
I'm studying English because my English is usually strange.
But I don't know my English level, so I take a TOEIC exam in June to know my English level.
I exert the maximum effort.....
But I don't have confidence.
To-do
- Vocabulary
- Grammar
Friday, March 26, 2010
yet another `rvm`.. ruby-tapper
Are you using rvm
?
Ruby version manager
rvm
is a contraction of "Ruby Version Manager".
It makes can switch rubies easy.
Like this:
% rvm install 1.9.1
% rvm 1.9.1
% rvm install 1.8.7
% rvm 1.8.7
rvm
switches $PATH and $GEM_HOME.
But... rvm
is very intricate, it's not easy.
So I made ruby-tapper.
ruby-tapper
ruby-tapper is very easy.
Install
HINT: ~/opt/ruby-tapper
is example.
% git clone git://github.com/sorah/ruby-tapper ~/opt/ruby-tapper
Then add ~/opt/ruby-tapper/bin
to your shell's $PATH.
Setup
HINT: ~/rubies
is example.
HINT: rbt
is command of ruby-tapper.
% mkdir ~/rubies
% rbt --rubies ~/rubies
Add ~/rubies/bin
and ~/rubies/gem/bin
to your shell's $PATH.
And set ~/rubies/gem
to your shell's $GEM_HOME.
Add tapper
rvm
can install rubies automatic, but ruby-tapper cannot.
- First, download source code of ruby.
- Then, run
./configure --prefix=$HOME/rubies/{ruby-version}
to configure ruby. - Last, run
make && make install
to install to tapper.
Use
Tapper name is directory in ~/rubies
Ruby-tapper is very useful and easy.
Monday, March 22, 2010
Fizzbuzz in Ruby&C
This patch adds fizz?
, buzz?
, fizzbuzz?
methods to Ruby's Numeric
class.
First download source of Ruby. Then configure the source, and run make main install-nodoc
.
ruby -e '(1..100).map{|i|('FizzBuzz' if i.fizzbuzz?)|| ('Fizz' if i.fizz?) || ('Buzz' if i.buzz?) || i}'
And you can run this code.
You're not extended Integer
class. The fizzbuzz methods included in Ruby.
I want to include these methods include in Ruby master...
Saturday, February 27, 2010
I got blogger.vim commit permission.
Hi. I'm using blogger.vim.
Yesterday ujihisa said 'I want to blogger.vim that post code to gist.github.com if code over 5 lines'.
I implemented that, I got commit permission.
I'll push soon. Now I'm testing.
And I'm sorry to I posted many useless post.
Demo
this is not gist
Gist is only over 5 lines.
And can paste embed
hi
yey
Friday, February 26, 2010
Online.sg #9 "LLVM" report #onsg9
This is report of Online.sg #9 "LLVM".
Lecturer
ujihisa http://ujihisa.blogspot.com/
Optimize
- Brainf**k "Hello, world" file to llvm assembly file is 2114 lines.
- optimized version is 25 lines. !!!!!!
LLVM Commands
- llvm-as: llvm assembly file to llvm byte code.
- lli: execute llvm byte code.
- opt: optimize llvm byte code.
- llvm-dis: disassembly llvm byte code.
Next
- We're planning online.sp lighting talks at March.
Blogger.vim @ Snow Leopard
I'm writing a article to blogger with blogger.vim @ snow leopard.
What I did
- Install ghc/cabal
- Install pandoc
How to
See This wiki page.
Future
I thought i want study haskell in future.
Saturday, February 13, 2010
Auto load 'g'
I use on rails.
So i want auto require 'g' (Because delete `require` line is troublesome).
It like this:
Wednesday, January 13, 2010
First post from blogger.vim
Blogger.vim
Blogger.vim is made by ujihisa. It is plugin for vim and support markdown.
Very convenience.
Problem
- Blogger.vim needs
pandoc
. Butpandoc
doesn't work at Snow Leopard. I'm writing at Ubuntu (ideapad) now.
Saturday, January 9, 2010
I installed StarDict and Eijiro
I'm using Eijiro for dictionary. And I'm using Ubuntu.
I want Eijiro at ubuntu.
I googled and challenged. It use StarDict.
1. apt-get install stardict stardict-tools
2. install PDIC for win32 use wine.
3. Convert Eijiro to "1 line text type". I saved to eijiro.txt .
4. Replace "///" to "\t" and "\" to "\n" use sed.
5. run "/usr/lib/stardict-tools/tabfile eijiro.txt"
6. move some generated files to /usr/share/stardict/dic .
7. yay
Friday, January 8, 2010
Update Ruby (dev version) everyday
I update manually each one month until yesterday. But Ruby developping is very active, manual update isn't chase them.
Then, I heard "Let's auto update!".
So I challenged Ruby dev version auto update.
I tryed on Mac OS X Snow leopard (XCode installed).
This is list of I did:
- Get latest Ruby's source. use
svn co
. - Create
update_ruby
script. - Register to launchd using Lingon.app
- Yay
update_ruby
is here:#!/bin/bash cd ~/path/to/ruby-source svn up && make main && make install-nodoc
hi
I start English blog here.
But my English is usually strange.
And I don't know continue this blog....
About Me

- Shota Fukumori (sora_h)
- A Ruby Committer. http://twitter.com/sora_h http://sorah.cosmio.net/