Live data from Hacker News

Learning Golang – From Zero to Hero

milapneupane.com.np

71–76 of 76 posts

Re: Learning Golang – From Zero to Hero

#71
post #53

Earlier quoted context omitted.

>This is like saying "skip the car, take a rocket ship." That's exactly what it is like saying. Sure, some people might not want a rocket ship. That's fine. But that is the logic behind "skip go, take rust".

I think the main takeaway for me from watching the YC Startup School videos was that doing a unicorn-scale startup vs a small business initially takes about the same effort for the founders. So, why would you choose the latter then?

Why would I choose a small business over a unicorn-scale startup? Can you explain why this question is relevant?

Re: Learning Golang – From Zero to Hero

#72
post #64

Earlier quoted context omitted.

I (and seemingly other people) consider https://www.techempower.com/benchmarks to be a good set of performance benchmarks for use cases many people around here would be facing. I guess they haven't been updated in nearing a year though. Go does reasonably well but apparently gets beat by Java. More generally. I like the idea of community driven benchmarks where each community tries to make representative, performant…

These are newer results[1] golang ranks 108 and 121 in the plaintext and JSON benchmarks, which is quite abysmal. [1] https://www.techempower.com/benchmarks/#section=test&runid=b...

The page you link to [1] shows Go at 9th for Plaintext (87.9% of the leader), 21st for JSON (96.8% of the leader). Which is still not ideal, but is a long way from abysmal.

[1] https://www.techempower.com/benchmarks/#section=test&runid=b...

Re: Learning Golang – From Zero to Hero

#73
post #33
post #28

Earlier quoted context omitted.

(edit: exactly what sagi said, only more long-winded) : Removing an item from a list (that is actually performant enough that you'd want to use it) in Java is also a copy though, unless you're removing the last element. Underneath the hood, there's a copy. Same deal with insert. Given the number of times I've seen insert or remove used where it really, really shouldn't, I'm not so sure the lack of insert/remove is a…

> Given the number of times I've seen insert or remove used where it really, really shouldn't, I'm not so sure the lack of insert/remove is a bad thing. Heavy reliance on such, as if they were free, is a very scripting-language thing. They hide all the grossness of such operations at the cost of significant memory bloat and inefficiency with simple, known-size structures (in order to make the more dynamic style run s…

> Making string manipulation

Heyyy another thing (and certainly I've done this myself) used incorrectly in such a way that it is extremely expensive. Specifically, concatenating log strings inside a large loop in some handler, and then not actually using those log strings because the production server didn't log down that low - but still incurring the cpu cost of the string concatenation.

Re: Learning Golang – From Zero to Hero

#74
post #72
post #64

Earlier quoted context omitted.

These are newer results[1] golang ranks 108 and 121 in the plaintext and JSON benchmarks, which is quite abysmal. [1] https://www.techempower.com/benchmarks/#section=test&runid=b...

The page you link to [1] shows Go at 9th for Plaintext (87.9% of the leader), 21st for JSON (96.8% of the leader). Which is still not ideal, but is a long way from abysmal. [1] https://www.techempower.com/benchmarks/#section=test&runid=b...

Those are using "fasthttp"[1], which one should be very cautious when using[2], as it is not standard and resorts to hacks to implement.

[1] https://github.com/valyala/fasthttp

[2] https://docs.google.com/presentation/d/e/2PACX-1vTxoBN41dYFB...

Re: Learning Golang – From Zero to Hero

#75
post #71

Earlier quoted context omitted.

I think the main takeaway for me from watching the YC Startup School videos was that doing a unicorn-scale startup vs a small business initially takes about the same effort for the founders. So, why would you choose the latter then?

Why would I choose a small business over a unicorn-scale startup? Can you explain why this question is relevant?

Developer investing his/her time into learning a more limited programming language is like a founder investing his/her time into a limited upside opportunity.

The initial time investment is roughly the same, the expected upside is very different.

Off-course there are lots of people who are using GoLang (similarly to JS) without learning it properly first, but in the long time it will bite them. In order to truly master any programming language ecosystem one need to invest at least half a year anyways, be it GoLang or Rust.

Similarly some people rushing to start startups without learning entrepreneurship first and/or bothering to research the problem domain and their competition.

Re: Learning Golang – From Zero to Hero

#76
post #38

> With a buffered channel, the receiver will not get the message until the buffer is full. This is wrong. https://golang.org/doc/effective_go.html#channels > Receivers always block until there is data to receive. If the channel is unbuffered, the sender blocks until the receiver has received the value. If the channel has a buffer, the sender blocks only until the value has been copied to the buffer; if the buffer is…

The statement was misleading. Thanks!, it has been corrected.
Post reply on HN