Shell-ish scripting in Go with ease
github.com
Shell-ish scripting in Go with ease
1–10 of 68 posts
Re: Shell-ish scripting in Go with ease
#2Re: Shell-ish scripting in Go with ease
#3pairing this with yaegi [1] would be interesting. You could having a REPL open doing os operations and when you get the data looking like you want, you select which lines to save to a file. [1] https://github.com/traefik/yaegi
Re: Shell-ish scripting in Go with ease
#4pairing this with yaegi [1] would be interesting. You could having a REPL open doing os operations and when you get the data looking like you want, you select which lines to save to a file. [1] https://github.com/traefik/yaegi
I hate go-lang with passion, but these two libs are really cool
Re: Shell-ish scripting in Go with ease
#5Earlier quoted context omitted.
I hate go-lang with passion, but these two libs are really cool
How come the hate? That's a pretty strong emotion for something as benign as a programming language.
To sum it up, the biggest complaints are error handling, null handling, and dependency management. And y’know, being backed by a company of ghouls hellbent on extracting value for themselves at the expense of society.
Re: Shell-ish scripting in Go with ease
#6Earlier quoted context omitted.
I hate go-lang with passion, but these two libs are really cool
How come the hate? That's a pretty strong emotion for something as benign as a programming language.
Re: Shell-ish scripting in Go with ease
#7Re: Shell-ish scripting in Go with ease
#8pairing this with yaegi [1] would be interesting. You could having a REPL open doing os operations and when you get the data looking like you want, you select which lines to save to a file. [1] https://github.com/traefik/yaegi
I hate go-lang with passion, but these two libs are really cool
Re: Shell-ish scripting in Go with ease
#9Earlier quoted context omitted.
How come the hate? That's a pretty strong emotion for something as benign as a programming language.
Not OP, but the usual talking points were covered pretty well in this thread from yesterday: https://news.ycombinator.com/item?id=42884337 To sum it up, the biggest complaints are error handling, null handling, and dependency management. And y’know, being backed by a company of ghouls hellbent on extracting value for themselves at the expense of society.
Re: Shell-ish scripting in Go with ease
#10It was my first time writing a golang project at work, so I'm sure it could have been better. But writing it the naive way, with all the required golang error handling, it ended up taking about 10x more lines of code in golang than the original bash script.
It does have a dramatically better UX (largely thanks to spf13's cobra and viper), and is way faster than the original, and the codebase is a lot cleaner and more maintainable. So I think it was worthwhile for the users and maintainers.
But still, 10x more lines of code. I like the OP, but I'm still not sure I would reach for golang for short shell scripts.