description Packaging for Google Go
owner Ondrej Sury
last change Sat, 7 May 2011 18:27:37 +0000
URL https://alioth.debian.org/anonscm/git/pkg-google/golang.git

Debian golang Package
五月 10th, 2011create INITRAMFS
三月 14th, 2011ln -s bin/busybox /init
cd /home/kevin/work/export/dist
find . | cpio -H newc -o > ../dist.cpio
#
# General setup
#
…
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=』/home/kevin/work/export/dist』
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0
…
#
# UBI – Unsorted block images
#
…
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=1
CONFIG_BLK_DEV_RAM_SIZE=8192
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
…
# remove root= from boot args.
setenv bootargs console=ttyS0,115200 mem=256m ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:nec_tj:eth0:off ethaddr=12:34:56:78:ca:10
Go, significant changes in this week.
二月 3rd, 2011http://groups.google.com/group/golang-nuts/browse_thread/thread/b877e34723b543a7
Non-blocking channel operations have been removed from the language.
The equivalent operations have always been possible using a select statement with a default clause. If a default clause is present in a select, that clause
will execute (only) if no other is ready, which allows one to avoid blocking on a communication.
For example, the old non-blocking send operation,
if ch <- v {
// sent
} else {
// not sent
}
should be rewritten as,
select {
case ch <- v:
// sent
default:
// not sent
}
Similarly, this receive,
v, ok := <-ch
if ok {
// received
} else {
// not received
}
should be rewritten as,
select {
case v := <-ch:
// received
default:
// not received
}
Christine ODonnell
十月 19th, 2010
Christine O’Donnell大嬸是Delaware州在共和黨內初選勝選的茶黨(Tea Party) 參議院後選人。(TEA的意思是稅收得夠多了!Taxed Enough Already!)茶黨在共和黨裡的角色有點類似黨內的』派系』。
總之… 她似乎是一個怪怪的人… 她反進化論,反用保險套,反自慰,反色情影片,造假學歷…鼓吹婚前守貞。但這些我都沒有很關心,主要是因為她最近一些廣告實在太紅了。所以看了不少youtube上跟她有關的影片,這就真的挺有趣了。
她原版的廣告看起來還蠻像PC & Mac的。
之所以她會說』I’m not witch』,是因為在1999年的一個脫口秀上她說出曾練習過巫術。
schmoyoho看上她了
SNL 也整她.
還不止一次…
didi-diamond
九月 27th, 2010前情提要… 我想這種事是現在不做以後一定會被唸的事。
所以… 就出現下面這張照片了。
其實… 我得了一種買東西不做功課就會死的病(笑)
我們跑了超過10間珠寶店、2間DXX、Alxxxx、I-Pxxx、京XXX… 能跑的店幾乎跑光了,到最後我都不確定自己到底是要買婚戒還是要做相關產業研究了。XD
didi-diamond是我開始選婚戒時候唯一的一間拿 Rapaport 報價單出來的店。戒款種類多、服務滿分、訂金下完還讓我們又換了一棵,選了半天最後又將兩隻戒台幫我們保留個把月。
雖然這篇非常不符合我會寫的東西,不過還是該寫一篇廣告味濃厚的文章來謝謝他們…
Slax的scim中文模組
六月 4th, 2010因為icos2010主打』語言友善的電腦』而新增的三個slax module。
scim安裝方法:
方法1.(較多步驟) 先將 slackware的scim
這些package這個裝起來. 接著安裝設定, 新酷音, 明體. 這些Module。
方法2.(較少步驟) 直接裝綜合包scim full package
方法2的輕輕鬆鬆的多國語言綜合包安裝詳細步驟如下:
首先連到slax的網站,點選那雙鞋子(modules, 模組)

將頁面往下拉,點選國旗(multilang, 多國語言)

找到scim full package 0.0.1,點選active

然後上面就會出現提示,告訴你正在安裝此套件

接著安裝好後離開X window,重新開機即可

最後你就可以擁有多國語言的輸入環境囉。:D

最近很熱門的資料庫 cassandra
四月 29th, 2010雖然go目前還沒有cassandra的connection library,不過已經有相關討論了。
(不管寫什麼都要置入性行銷一下go)

http://cassandra.apache.org/
cassandra 是Apache Top level Project之一,facebook,Digg 跟 Twitter 都有採用它作為一部分的資料庫.
cassandra 是一個cluster database 就像 BigTable 一樣,但他們還是不同的。
從CAP理論(http://devblog.streamy.com/2009/08/24/cap-theorem/)的角度來看
一致性(Consistency): “Is the data I’m looking at now the same if I look at it somewhere else?”
系統可用性(Availability): “What happens if my database goes down?”
分散容錯(Partition tolerance): “What if my data is on different networks?”
BigTable偏向於CA, 而cassandra則是AP。
Cassandra的API應用也相當廣泛. php, perl, python, ruby 甚至連haskell都有支援.
目前我只試過兩套python的api, lazyboy跟pycassa
簡單執行
git clone http://giturl
sudo python setup.py install
就可以安裝這兩套library了.
以下是lazyboy的example code.
from lazyboy import *
from lazyboy.key import Key
import time;
# Define your cluster(s)
begin = 0;
btime = time.time();
connection.add_pool('Keyspace1', ['192.168.23.168:9160', '192.168.23.169:9160','192.168.23.172:9160'])
for i in xrange(begin, begin + 500000):
if i!=begin and (i % 10000) == 0:
print time.time() - btime;
btime = time.time();
rc = record.Record({'value': i, 'text': "ruslan text"})
rc.key = Key("Keyspace1", "Standard1", str(i));
rc.save(0);
print time.time() - btime;
pycassa也是很nice
import pycassa
client = pycassa.connect(['192.168.23.168:9160', '192.168.23.169:9160'])
cf = pycassa.ColumnFamily(client, 'Keyspace1', 'Standard1')
cf.insert('foo', {'column1': 'val1'})
cf.get('foo')
print(cf.get('foo')['column1'])
nodetool
kevin@Office:~$ nodetool -host 192.168.23.168 -port 8080 ring
Address Status Load Range Ring
103440706267102512524414743070503313038
192.168.23.169Up 143.96 MB 10179247206633247959723284233859042110 |<--|
192.168.23.172Up 143.97 MB 24715272519024223240814048623324812800 | |
192.168.23.168Up 144.02 MB 103440706267102512524414743070503313038 |-->|
kevin@Office:~$ nodetool -host 192.168.23.168 -port 8080 info
103440706267102512524414743070503313038
Load : 144.02 MB
Generation No : 1272273320
Uptime (seconds) : 72795
Heap Memory (MB) : 128.90 / 1016.13
個人還是比較喜歡劍魂中的遊戲人物 cassandra ![]()

Go blog新上線
三月 23rd, 2010
official Go blog
Go官方的Blog跟這星期的Go一起正式Release囉。
Go主要是希望透過這個Blog將最新的訊息帶給使用Go的開發者們,在Go Blog的第一篇文章中 Go: What’s New in March 2010 ( Btw: 這標題都超沒誠意的 『Go: 2010年三月的新消息』 )
將介紹從去年11月一直到現在Go的世界發生了什麼事。
new command: goinstall
三月 17th, 2010
http://golang.org/cmd/goinstall/
各位太太小姐,您是否每次安裝library都要下10行command呢?還記不清是先pull還是先up?
upgrade 時老忘記這個library是在下git還是hg?還是前面兩種都試完才發現是svn?
體貼各位開發者的辛苦,美國加力佛尼亞的g公司最新科技登場…
每次裝library要手動一步一步來的時代已經過去了。
現在裝Go-MySQL-Client-Library就是這麼簡單
goinstall -dashboard=true github.com/thoj/Go-MySQL-Client-Library
程式中要使用它,直接import library在goroot/pkg/$arch/下的路徑即可。
import (mysql "github.com/thoj/Go-MySQL-Client-Library")
這個cmd是Russ Cox上個月底加的,
主要是簡單安裝第三方library. 目前goinstall支援git, hg, svn 三種。
Go Wiki!
三月 17th, 2010http://code.google.com/p/go/wiki/WikiIndex
其實這一兩天已經從golang-dev嗅到一點wiki的味道了,go wiki正式上線。
不過要參與編輯的話必須要成為contributer,需照以下方法確保你的貢獻會採用Google版的BSD Style License。
Contributor License Agreement: http://golang.org/doc/contribute.html#copyright
我個人不是很喜歡這種作法。




