Live data from Hacker News

Shell-ish scripting in Go with ease

github.com

1–10 of 68 posts

Re: Shell-ish scripting in Go with ease

#3

pairing 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

#4

pairing 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

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

#5

Earlier 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.

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

#6

Earlier 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.

Strongly opinionated languages beget strong opinions on the same, both positive and negative.

Re: Shell-ish scripting in Go with ease

#8

pairing 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

These sorts of comments always make me wonder what you prefer.

Re: Shell-ish scripting in Go with ease

#9
post #5

Earlier 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.

dependency management in Go is best in class what are you talking about? go mod is that good.

Re: Shell-ish scripting in Go with ease

#10
I just rewrote a tangled 500 line shell script in go.

It 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.

Post reply on HN