Go as a scripting language in Linux

Do you like Go so much and use it in every software project? Do you think Go is a truly universal language? How about taking it to the next level and trying Go as a scripting language for your favourite Linux distribution?

Abstract

Do you like Go so much and use it in every software project? Do you think Go is a truly universal language? How about taking it to the next level and trying Go as a scripting language for your favourite Linux distribution? Why use Go as a scripting language? Short answer: why not? Go is relatively easy to learn, not too verbose and there is a huge ecosystem of libraries which can be reused to avoid writing all the code from scratch. Some other potential advantages it might bring: - build your complex Go project with Go-based build system: no Makefiles, bash or Python - all pure Go! - easy non-privileged package management out of the box: if you want to use a third-party library in your script, you can simply go get it to your GOPATH - quick code prototyping on early project stages: short-circuit the “edit-compile-check” cycle, instead immediately execute your source file - fail early with strongly-typed scripting language: if you have a typo in your 2k line script, it will fail to start instead of executing first 1800 lines and leave your system in an inconsistent state. There were previous attempts to make Go scriptable using a shebang line, however (mostly because lines starting with # are not valid in Go) the solution is not perfect: you end up with .go files either to be used as scripts only or as real compilable Go programs, but not both. This talk describes a way how one can use some advanced features of binary execution on Linux to overcome previous problems and make Go truly native scripting language.

Video

GoLab is a conference made by Develer.
Develer is a company based in Campi Bisenzio, near Florence. Our motto is : "Technology to give life to your products". We produce hardware and software to create exceptional products and to improve industrial processes and people's well being.
In Develer we have passion for the new technologies and we offer our clients effective solutions that are also efficient, simple and safe for the end users. We also believe in a friendly and welcoming environment where anybody can give their contribution. This passion and this vision are what we've been driven to organize our conference "made by developers for developers".


Subscribe to our newsletter

We hate spam just as much as you do, which is why we promise to only send you relevant communications. We respect your privacy and will never share your information with third parties.
©2024 GoLab | The international conference on Go in Florence-Design & devCantiere Creativo-Made withDatoCMS