Live data from Hacker News

Go is my hammer, and everything is a nail

maragu.dev

701–710 of 816 posts

Re: Go is my hammer, and everything is a nail

#701

Earlier quoted context omitted.

Okay so confirmed you're going meta to dodge any actual points being made, and grind any possible progress of the conversation to a halt. Bye!

Confused by academic paper writing confirmed. What lead you down that path?

Normal conversations have people back up their claims, dude...

You're getting way more academic with this meta waste.

Re: Go is my hammer, and everything is a nail

#702

Earlier quoted context omitted.

> there is nothing to prove. Never was. What was the point of your question, if not to prove something? If you were trying to imply that the implementation doesn't exist, that implication was fatally flawed. If you were asking to waste time, then it worked. If you had another motive, what was it? Are we having a 5d chess game? I thought it was a normal conversation. > He who wrote the "citation". Nobody? Nobody wrote…

> What was the point of your question, if not to prove something? My enjoyment. For what other reason would you spend your free time doing something? > If you were trying to imply that the implementation doesn't exist, that implication was fatally flawed. And if I weren't trying? > If you were asking to waste time, then it worked. I ask nothing, but if you feel wasted your time, why? Why would you do such a thing? >…

It's great that in your reply upthread you actually understood that it was a request for any kind of evidence, including evidence you just created on the spot, but now you pretend not to understand that.

Re: Go is my hammer, and everything is a nail

#703

Earlier quoted context omitted.

Confused by academic paper writing confirmed. What lead you down that path?

Normal conversations have people back up their claims, dude... You're getting way more academic with this meta waste.

You could just go to godbolt.org, as others have already said, and as any normal person would do. Evidence is neither here nor there, though. We're talking about citations, which nobody of sound mind does. Why on earth would you have a conversation using someone else's words? That's the stupidest thing I have ever heard of.

Re: Go is my hammer, and everything is a nail

#704
post #335

Earlier quoted context omitted.

> It will work perfectly fine and end up being very readable for you and for the other persons reading your code. And make all future work both 3 times simpler, and take 3 times as long. I suppose there’s situations in which this is great, but I’m partial to requiring more. I’ll admit that hasn’t worked out very well for me unless I’m working my myself though.

I'll take verbose and simple code over terse trickery every day. People who disagree have never had to wake up at 3 in the morning to fix a critical production issue in someone else's code. And that someone else really loved "elegant and terse" code. It's not fun to grok your brain around weird language trickery when you're half-awake and in a hurry to fix stuff before the customers wake up.

You don’t write terse tricky code. That’s just silly. But you can write beautiful Typescript constructs that are completely impenetrable but will disallow all wrongdoing.

Re: Go is my hammer, and everything is a nail

#705

Earlier quoted context omitted.

> I used to work for a Go shop. We dealt with financial data. People dealing with finance are THE MOST risk-averse people I know. No new tool will be used without years of vetting and it'll still be blamed if something goes wrong - even if the new tool never touched that bit of the process =) Source: Consulted for a finance company and it was Ye Olde Java and COBOL all the way down =)

I'm surprised they were adventurous enough to use Java.

Someone picked Java at the start of the millennium-ish and they never dared to move away. =)

Re: Go is my hammer, and everything is a nail

#706
post #419

Earlier quoted context omitted.

2012: Python is Awesome! 2014: Python is a pain in the butt to manage packages and dependencies, how the hell am I gonna deploy this? It's still a mess 10 years later unless you live deep in the ecosystem and know what third-party solutions du jour to manage that complexity. At least we have Docker now. Also let's not forget the Python 3 migration fiasco that lasted ~2008-2018 and I still find myself porting librarie…

Hah, even at Google, the Python 3 migration lasted well into 2020.

I remember a large bank building a major new project in 2017 with python 2.7.

Re: Go is my hammer, and everything is a nail

#707
post #384

Earlier quoted context omitted.

Amen. I was unreasonably opposed to TypeScript at first after lots of bad experiences with messy JavaScript when I was first learning development - but after immersing myself in it for a year or so at $NEW_JOB, I absolutely love it. The only ways in which I can see that Go outperforms TypeScript is in performance, but frankly I don't care and most developers shouldn't - unless you're writing truly low-level high-perf…

I have been using typescript as my primary language for years and since I am used to it I actually enjoy it (much more than I enjoyed Java or Python in the past). And depending on what you built I agree, especially for one off scripts or if you plan on hosting just one or two things somewhere. On the other hand I recently saw a video by webdev Cody that got me thinking, where he was comparing a dead simple api server…

Good points, thank you! I'm lucky enough that I don't really need to worry about operating cost because I self-host the few things I have built and am nowhere near maxing out my hardware, but your point is well made.

Although...

> writing the equivalent server in go wasn’t really all that different from the typescript code

I think _that's_ true - one strength I'll absolutely concede to Go is that spinning up a basic server is very concise with the stdlib. The problem is that implementing its _logic_ is then super-verbose.

Re: Go is my hammer, and everything is a nail

#708
post #549
post #517

Earlier quoted context omitted.

> The de-facto standard of venv and pip (using a requirements.txt file) is generally painless these days. Except Python themselves now recommend the third party, pipenv. [0] Which means that there are multiple authoritative voices saying different things, and that produces confusion. [0] https://packaging.python.org/en/latest/tutorials/managing-de...

That's why I deliberately described the pip/venv solution as a "de-facto" standard. Is Python perfect in this regard? Absolutely not but the situation is FAR less painful than it was 10 years ago. The original comment claimed nothing has changed in 10 years. I used Python 10 years ago and disliked it intensely but I've recently (in the last 3 years) used it again and it is simply not true that nothing has improved in…

Poetry is a reasonable solution and has been for a few years now. We use it in production for deployments, and it's worked well for us.

Re: Go is my hammer, and everything is a nail

#709

Earlier quoted context omitted.

I would rather go had real enums, and I would _prefer_ if there were sum types. I agree it's more verbose, but I don't find that that verbosity really bothers me most of the time. Is res= [x for x in foo if "banned" in x] really actually more readable than var result []string for _, x := range foo { if strings.Contains(x, "banned") { result = append(result, x) } } ? I know it's 6 lines vs 1, but in practice I look at…

Filtering a container by a predicate is 50 year old technology and a very common thing. It's unbelievable that a "modern" language has no shorter or clearer idiom than that convoluted boilerplate filled Ministry of Silly Walks blob. Python had filter() and then got list comprehensions from Haskell list comprehensions. PowerShell has Where-Object taking from C# LINQ .Where() which takes from SQL's WHERE. Prolog has in…

>Brian Kernighan gave a talk on the readability of code ... I am aware he's one of the Go designers

I don't think so.

Not according to Wikipedia at least. First sentence:

>Go is a statically typed, compiled high-level programming language designed at Google[12] by Robert Griesemer, Rob Pike, and Ken Thompson.[4]

https://en.m.wikipedia.org/wiki/Go_(programming_language)

Maybe you confused Brian Kernighan with Ken Thompson.

I think I have done that in the past myself. He (Ken Thompson) also worked a lot on Unix; maybe that is why the confusion.

https://en.m.wikipedia.org/wiki/Unix

Or maybe the confusion is because Kernighan was a co-author of The Go Programming Language book.

Re: Go is my hammer, and everything is a nail

#710
post #543

Earlier quoted context omitted.

Sure but that's not going to work across platforms, right? So not really an apples to apples comparison.

Even the most ardent of Go-haters have to be fair and admit it makes cross-compilation really nice. GOOS=linux GOARCH=amd64 go build && scp executable user@host:direc/tory/ Out of the box, no toolchains to manage.

Sure, it's nice in that regard.

But honestly running poetry install for python is not bad either.

Post reply on HN