Better HN
topnewbestaskshowjobs
Log inSign up

rollulus

2,329 karma · joined Mar 14, 2016 (10y ago) · 328 submissions

Hi.
Submissions

comment 1y ago · link · parent

I guess I won’t be adding new information to what your “experts” said as well, but hey. I love Go’s error handling. Syntactic sugar like in Rust could’ve made things a bit nicer to they eye, but apart from that: being forced to think about each error path leads in my view to better code. Compared to a fat try/catch and fingers crossed that all goes well in it.

comment 1y ago · link · parent

Disasters can be created in any language, right? Has little to do with Go.

comment 1y ago · link · parent

As shared elsewhere in this thread: https://www.youtube.com/watch?v=sXwDrcd1t-E

TL;DW: the ESP’s WiFi driver provides per incoming packet the carrier’s phase and amplitude. All ESPs are calibrated relatively to each other.

comment 1y ago · link · parent

Thanks for your comment, it made me do my homework. And apologies, I lazily viewed the first dozen rows and assumed that it was a simple high to low sort, and I was wrong. The author used https://en.m.wikipedia.org/wiki/Bayesian_average which answers my question. Cheers.

comment 1y ago · link · parent

I would rather go to a restaurant with a 4.9 rating based on 1000 reviews than to a restaurant with one with a 5 rating based on 1 review. Makes me wonder: how would that feeling translate into a ranking function though.

comment 1y ago · link · parent

Lenses.io | Senior Go (Golang) Developer | Full-Time | REMOTE (UK, Germany, Spain) | https://lenses.io

Lenses.io is seeking two experienced Senior Go Developers to play a pivotal role in reshaping our cutting-edge streaming data platforms. Join our dynamic team dedicated to improve the developer experience (DevEx) in real-time data processing.

If you are passionate about driving innovation and have a knack for Go development, this role might be the perfect fit for you. Showcase your expertise by contributing to the transformation of our product. If you are ready to embark on this exciting journey with us, share your CV via email at careers@lenses.io.

Your Responsibilities:

- Architect & Develop: Lead the redesign and enhancement of our streaming data platform utilizing Go.

- Innovate: Elevate our Kafka-based solutions to ensure optimal performance and scalability.

- Collaborate: Engage with diverse teams to shape and implement new features seamlessly.

Experience:

- Demonstrated proficiency in Go development.

- Strong track record in constructing and managing scalable data systems.

Technical Skills:

- Deep knowledge of Kafka and associated streaming technologies is advantageous.

- Familiarity with cloud platforms (AWS, GCP, Azure) and microservices architecture is valued.

comment 1y ago · link · parent

Thanks for asking. Came here to ask since I was curious about this too. I don't find any of the replies here convincing:

- List of open wifis: AFAIK, and in my experience, apps need special permissions to do anything at the wifi level. And yes, iOS location services use wifi info but it's disabled, that's the point;

- IP back to geo: then why not send the IP itself directly?

- Mozilla location services: same as above, why not send the info you send to Mozilla directly to the data harvester which can call Mozilla itself?

comment 1y ago · link · parent

Lot of gRPC hate here.

I like gRPC in terms of an API specification, because one only needs to define the “what”, whereas OpenAPI specs are about the “how”: parameter in path, query, body? I don’t care. Etc.

Plus the tooling: we ran into cases where we could only use the lowest common denominator of OpenAPI constructs to let different tech stacks communicate because of orthogonal limitations across OpenAPI codegenerators.

Plus, Buf’s gRPC linter that guarantees backwards compatibility.

Plus fewer silly discussions with REST-ish purists: “if an HTTP endpoint is idempotent should deleting the same resource twice give a 404 twice?” - dude, how’s that helping the company to make money?

Plus, easier communication of ideas and concepts between human readers of the (proto) spec.

comment 1y ago · link · parent

I'm also in NL. Ziggo's DNS server blocks it:

  $ dig annas-archive.org @89.101.251.228
  annas-archive.org. 360 IN CNAME unavailable.for.legal.reasons.
  unavailable.for.legal.reasons. 339 IN A 213.46.185.10
213.46.185.10 serves a generic page mentioning Russia Today and the Pirate Bay. Not sure which one applies here.

comment 1y ago · link · parent

For people out of the loop like me (the article doesn’t mention it): Luigi Mangione is an American man who was identified as the suspect in the killing of Brian Thompson, the CEO of UnitedHealthcare.

comment 1y ago · link · parent

Could someone explain to me why the sun-rise/set doesn’t seem as sinusoidal as I would naively expect?

comment 1y ago · link · parent

Same here. Haven’t looked into Go iterators because I couldn’t find a purpose, but trying them in our SDK for pagination was on my list. Great.

comment 1y ago · link · parent

The string representation is obviously not structured, because it's a string representation and strings are scalars. The typed representation is structured, which you can put into your structured logs as you'd like, omitting sensitive information where needed.

comment 1y ago · link · parent

This approach is so bad, I don't even know where to start. But it's all symptoms of their, sorry, incompetence. Take the loadCredentials example on top. If os.ReadFile cannot find the file, it returns an error with string representation: "open cred.json: no such file or directory". This comes straight from the std lib as it is, a great error. What does the errors.Is(err, os.ErrNotExist) do: prepend "file not found" to it, rendering: "file not found: open cred.json: no such file or directory". So this adds exactly nothing. The next if will prepend "failed to read file" to it, again, adding nothing as well. The two errors checks should be replaced by one if statement, optionally wrapping it with a context string but I cannot think of any use. Then the next step, error handling of verifyCredentials. I can only guess what it does, but assume that it returns an "username 'foo bar' cannot contain spaces" error. Does prepending "invalid credentials" help anything? Nope, so the whole if can be removed as well. No surprise your errors get clunky if you make them clunky.

I have more pressing things to do than dissect this article line by line, but let me suffice that I feel sorry for newcomers to the language that an article like this is so high on HN. Back in the days there was just Dave Cheney's material to read [1], and it was excellent. It's unfortunately outdated in certain regards (e.g. with new Is/As functionality in the errors package for inspection and the %w formatting directive in fmt.Errorf) but it's still an excellent article.

[1]: https://dave.cheney.net/2016/04/27/dont-just-check-errors-ha...

comment 1y ago · link · parent

The error to code in the http handler is the true path. It’s the only place where the context and knowledge is about semantics. In one endpoint if something is not found it can be a proper 404, if its existence is truly optional. In another endpoint the absence might very well qualify as a 500.

comment 1y ago · link · parent

Ah, a God error package that has all seeing knowledge of the domain around it. What a monstrosity.

comment 1y ago · link · parent

So one should include those names in their message to their OnlyFans “girlfriends”.

comment 1y ago · link · parent

Just curious. They have Google listed as user. Why would a company like that be interested given that they’ve already any world class db in-house along with the expertise?

comment 1y ago · link · parent

Exactly my thoughts reading the ToC. One exception would come to my mind though: Rust would seem a very reasonable language choice to me to write malware. E.g., the next Stuxnet. Low level enough, plus the language safety to help staying under the radar.

comment 2y ago · link · parent

> The fishermen were unaware of it until they were contacted by the US Coast Guard.

Can someone explain this to me? Does the US Coast Guard have a (radio) base in Norway? Do they phone them?

comment 2y ago · link · parent

> Microwaves output no power during the zero crossing of the AC line Why is this? Do microwaves by design modulate their 2.4gHz on top of 50/60Hz?

comment 2y ago · link · parent

I believe this is the HN discussion of their publication: https://news.ycombinator.com/item?id=41467503

comment 2y ago · link · parent

Nice, thanks a lot for that!

comment 2y ago · link · parent

My few tiny steps in JS world were alienating in that sense: having a brand new install of all tools, doing a “npx create-react-app” and got greeted with “congrats, your app is initialised, it has 13 vulnerable dependencies”.

comment 2y ago · link · parent

As the article also mentions: instead of checking if your program has a dependency on something that contains vulnerabilities, govulncheck checks if vulnerable code is actually reached. I find that so awesome. (And I know, someone is going to point out that hipster language foo does this too and better — it’s not the norm).

comment 2y ago · link · parent

This article merely relays what ByteDance says, so it’s nothing but PR, unrelated to journalism. No idea what it’s doing on bbc.com.

comment 2y ago · link · parent

> important to note

Why is that important? The guy surely has controversial opinions but you’re not supporting them by importing his rasteriser, is it?

comment 2y ago · link · parent

Can someone tell me what’s going on here? This very post including the comments appeared on HN two days as well. I thought I was getting crazy but Google confirms.

comment 2y ago · link · parent

I think it would be challenging to come up with a more ambiguous name.

comment 2y ago · link · parent

The remark about reflection for the Go implementation surprised me. I always treated the generated code as a black box, but occasionally saw their diffs, and assumed the byte blobs to be for clever generated marshalling. If not, what are they used for?
12345
11