/var/log/messages

Mar 6, 2018 - 1 minute read - Comments - Linux

strace の出力

なんとなくハロワを比べてみました。golangpython のハロワで。

python は以下。

print("hello world")

golang は以下。

package main

import (
	"fmt"
	"os"
)

func main() {
	s := "world"

	if len(os.Args) > 1 {
		s = os.Args[1]
	}

	fmt.Printf("Hello, %v!", s)
	fmt.Println("")

	if s == "fail" {
		os.Exit(30)
	}
}

wc -l な出力ですが

  • python が 743
  • golang が 328

となっています。ばたばたしてるので中身確認は別途でorz

Linux のしくみ slack で RSS 読めるのか

comments powered by Disqus