使用 gops 查看 當前 Go 程序的相關資訊

Go 的程式在執行,到底跑得怎麼樣呢?使用多少資源呢?可以使用 Go 專用的 ps 來查看~

閱讀全文〈使用 gops 查看 當前 Go 程序的相關資訊〉

如何將 Go 程式編譯成 WebAssembly

Go 1.11 之後的版本,支援可以直接將 Go 寫的內容編譯成 WebAssembly (wasm),然後搭配已經寫好的 wasm_exec.html 和 wasm_exec.js 就可以直接在頁面上執行。

  • 註:WebAssembly 在 Firefox 52+ 和 Chrome 57+/latest Opera 是預設支持的

閱讀全文〈如何將 Go 程式編譯成 WebAssembly〉

gorun:使用 Go 當 Script language

Golang 除了 Compile (build) 外,平常可以使用 go run 直接執行。

gorun 的作者想要在 go 的程式第一行加上類似 #!/usr/bin/go 就可以執行 .go 的作法

  • 詳見:GitHub - erning/gorun: gorun is a tool enabling one to put a "bang line" in the source code of a Go program to run it, or to run such a source code file explicitly. It was created in an attempt to make experimenting with Go more appealing to people used to Python and similar languages which operate most visibly with source code.

閱讀全文〈gorun:使用 Go 當 Script language〉

Amazon Go 未來實體商店的影片

Amazon 預計於 2017年在美國西雅圖開設無店員、自動結帳的實體商店,只要拿走要買的東西,就可以直接離開了。

註:未來不只是工廠被機器人取代,連收銀員都被取代了... orz..

閱讀全文〈Amazon Go 未來實體商店的影片〉