Archive for 一月, 2010

Petar Maymounkov加入golang的開發?

星期二, 一月 19th, 2010

今天看到r新增了這個討論串,才想起這個名子好像再哪聽過…

Google了一下才發現是Bittorrent DHT(Distributed Hash Table)網路所使用的Kademlia演算法的發明人之一。

目前他主要的貢獻是在golang中改良http package。go的http package還在初期規劃階段,一般遇到最大的問題是他把http.send列為私有的function。

Russ cox認為如果在沒有規劃好http package就開放http.send的話,會導致之後的很多相容性問題。所以目前部份軟體(ex. ed2kcrawler)是另外實做http.send的,在Petar Maymounkov加入後或許會有更讚的http package吧。

Package Document鬼打牆

星期一, 一月 18th, 2010

在irc討論function時發現Document裡的一件趣事。

11:44 < happy> anyone know what function converts a string to an int?
11:48 < kevinwatt> happy: http://golang.org/pkg/strconv/#Atof64
11:49 < happy> ty
11:49 < happy> lol
11:51 < happy> Atoi is like Atoi64 but returns its result as an int; Atoi64 is
like Atoui64 but allows signed numbers and returns its result in
an int64.; Atoui is like Atoui64 but returns its result as a
uint.
11:51 < happy> does it go on forever? They are in reverse order :-\
11:51 < happy> the one at the top says refer to the next one which says refer to the next one…

文件中一直請你參照別的function,就像鬼打牆一樣繞不出去。
Atoi這種其實只要簡單的一行說明就好了,沒有說明卻一直附上參考實在是頗有趣…

Package Link
Screenshot-2