smilax:: Daily Tasks [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   

[Bedstraw] *smilax*
 
[Mega-Changes]
[Mega-Calendar]

Daily Tasks

1. Install golang 1.0.3. Write hello_world.go and run it.

2. Write echo

Hints: http://golang.org/pkg/os/ (Stdout; Args)

3. Write "wc" in go (with no command line flags). It should work with or without command line filenames. Count bytes, not runes. Count bytes and lines, don't worry about words.

Hints: http://golang.org/pkg/os/ (os.Open; file.Read; Stdin; Stdout; Args)
Alternative: write md5sum (again, no flags).
Hints: http://golang.org/pkg/crypto/md5/

4. Write a trivial http server that answers "Hello World".

Hints: http://golang.org/pkg/net/http/ (http.HandleFunc; http.ListenAndServe)

Bigger Tasks

B1. 2012-12-12:
https://github.com/strickyak/goterp
The Makefile calls src/externs/externs.go to get a list of names exported from the std go libs. Then lots of kludgy heuristics are applied in src/externs/generate[12].tcl and in the Makefile (look for grep -v) to try to remove tests & other symbols that are not actually available from the libraries. Task: Do this right. Eliminate the tcl scripts, by doing it all in src/externs/externs.go. Eliminate the need for grep -v. Notice other packages like "os" have big problems. Would understanding Build Constraints ( see Build Constraints at http://golang.org/pkg/go/build/ ) fix these problems? I think it might. How does godoc find only the exported things?

(last modified 2012-12-12)       [Login]
(No back references.)