This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gover=go1.1.1 # update as needed | |
cd # I build go from my home directory | |
sudo apt-get install git # needed for go get | |
sudo apt-get install mercurial # also needed for some go-gettable packages | |
wget --quiet --output-document - https://go.googlecode.com/files/${gover}.src.tar.gz | tar xz # download, unpack source | |
cd go/src # move to the source directory | |
./all.bash # build and test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output of go build -gcflag=-w when compiling hello.go (Go 1.2.1) | |
# command-line-arguments | |
walk [100232bf8] | |
. NAME-fmt.Println u(1) a(1) l(4) x(0+0) class(PFUNC) tc(1) used(1) FUNC-funcSTRUCT-(FIELD- | |
. . NAME-fmt.a·3 u(1) a(1) l(4) x(0+0) class(PPARAM) f(1) ARRAY-[]INTER-interface {} ...INTER-interface {} "esc:0x0") STRUCT-(FIELD- | |
. . NAME-fmt.n·1 u(1) a(1) l(4) x(24+0) class(PPARAMOUT) f(1) int int, FIELD- | |
. . NAME-fmt.err·2 u(1) a(1) l(4) x(32+0) class(PPARAMOUT) f(1) error error) | |
walk [100255d40] | |
. LITERAL-"hello, world" u(1) a(1) l(8) tc(1) string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# command-line-arguments | |
walk [100363848] | |
. NAME-main.autotmp_0000 u(1) a(1) l(8) x(0+0) class(PAUTO) esc(N) tc(1) used(1) string | |
walk [1003620d0] | |
. LITERAL-"hello, world" u(1) a(1) l(8) tc(1) string | |
walk [100364300] | |
. AS u(2) l(8) tc(1) | |
. . NAME-main.autotmp_0000 u(1) a(1) l(8) x(0+0) class(PAUTO) esc(N) tc(1) used(1) string | |
. . LITERAL-"hello, world" u(1) a(1) l(8) tc(1) string | |
walk [10033dd78] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo python -m smtpd -n -c DebuggingServer localhost:25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"github.com/ajstarks/openvg" | |
"os" | |
"fmt" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"os" | |
"github.com/ajstarks/deck/generate" | |
) | |
func main() { | |
deck := generate.NewSlides(os.Stdout, 0, 0) | |
deck.StartDeck() // start the deck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/ajstarks/deck/generate" | |
"image" | |
"bufio" | |
_ "image/jpeg" | |
_ "image/png" | |
"strings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func cube(d *generate.Deck, x, y, w, h float64, color string) { | |
xc := make([]float64, 4) | |
yc := make([]float64, 4) | |
w2 := w/2 | |
h5 := h * .2 | |
yh := y+h | |
xc[0], xc[1], xc[2], xc[3] = x-w2, x, x+w2, x | |
yc[0], yc[1], yc[2], yc[3] = yh-h5, yh, y-h5, yh-(y5*2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cube makes a cube with its front-facing bottom edge at x,y, lit from the top | |
func cube(d *generate.Deck, x, y, w, h float64, color string) { | |
xc := make([]float64, 4) | |
yc := make([]float64, 4) | |
w50 := w/2 | |
h20 := h * .2 | |
h40 := h20 * 2 | |
yh := y+h | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gift: command line interface to Go image filtering toolkit | |
// please go to http://github.com/ajstarks/gift for the latest | |
package main | |
import ( | |
"flag" | |
"fmt" | |
"image" | |
"image/color" | |
"image/jpeg" |