|smilax:: Daily Tasks||[Changes] [Calendar] [Search] [Index] [PhotoTags]|
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)|
4. Write a trivial http server that answers "Hello World".
|Hints: http://golang.org/pkg/net/http/ (http.HandleFunc; http.ListenAndServe)|
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.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]|