~/talk

Go as a Scripting Language in Linux

Talkat GopherCon UK 2019 · 2019-08-21..08-23· [go]
slides:none on file

Claim: Go is usable as a practical Linux scripting language by pairing a small interpreter shim with kernel-level registration. Demonstration shows go run masks exit codes and raw shebangs fail, the fragile shell-ism workaround breaks when invoked outside a shell, and a custom interpreter plus binfmt_misc registration lets .go files execute with correct argument passing and exit status and still compile as regular Go binaries. Implemented with a third‑party go-run shim and Linux binfmt_misc; the approach works in demos and on real systems.

AI-written summary · about

  1. 0:00Start
  2. 1:50Why? • easy to learn, write and read
  3. 3:00Potential uses
  4. 4:11What do you need for a proper script?
  5. 5:46What do you need from a proper script?
  6. 7:02The shebang line
  7. 13:03with shellism (take 2)
  8. 13:33How Linux executes files
  9. 16:37gorun tool
  10. 17:01with gorun
  11. 19:24binfmt_misc usage 101
  12. 20:52with nothing!
  13. 21:40Conclusions . Go may be useful as a scripting language
  14. 22:24Useful links
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.