News for hackers. Stuff that matters.
Re:Show HN: A new stdlib for Golang focusing on platform nat... by stefanos82 on Tuesday October 03, 2023 @02:23AM (#37748528)
Goroutines was the selling point for me until they decided to introduce telemetry in their toolchain; that was what forced me to stop using Golang as a whole.

About GC, I would say: if you implement C++'s RAII mechanism to replace garbage collection, then I believe this project will have a bright future.

My final question is the following: how `pcz` compares to V language, from a syntax's perspective [1]?

[1] https://github.com/vlang/v

Re:Show HN: A new stdlib for Golang focusing on platform nat... by fsociety on Tuesday October 03, 2023 @02:36AM (#37748595)
Sounds like go routines was not a selling point if telemetry tipped you over then.
[dead]
Re:Show HN: A new stdlib for Golang focusing on platform nat... by stefanos82 on Tuesday October 03, 2023 @03:20AM (#37748829)
Thank you for your kind words, even though I never called you names, whoever you are.

You have your personal believes and ethics, I have mine; please show some respect and understanding.

Re:Show HN: A new stdlib for Golang focusing on platform nat... by im_dario on Tuesday October 03, 2023 @02:45AM (#37748647)
Telemetry is opt-in [0], it shouldn't be a concern.

[0] https://research.swtch.com/telemetry-opt-in

Re:Show HN: A new stdlib for Golang focusing on platform nat... by fweimer on Tuesday October 03, 2023 @03:26AM (#37748871)
GOPROXY is enabled by default. “Since Go 1.13, the go command by default downloads and authenticates modules using the Go module mirror and Go checksum database.” https://proxy.golang.org/
Re:Show HN: A new stdlib for Golang focusing on platform nat... by eddythompson80 on Tuesday October 03, 2023 @03:58AM (#37749088)
Only if you’re not vendoring your dependencies, afaik.
Re:Show HN: A new stdlib for Golang focusing on platform nat... by dolmen on Tuesday October 03, 2023 @09:19AM (#37751451)
So you might just need an anonymizing relay to the Google proxy.

The GOPROXY protocol is quite small to allow to implement such a relay: https://go.dev/ref/mod#goproxy-protocol

Re:Show HN: A new stdlib for Golang focusing on platform nat... by dolmen on Tuesday October 03, 2023 @09:40AM (#37751785)
Also using a generic http_proxy that does the relay you need might just be enough as many solutions exist in that space.

https://stackoverflow.com/questions/10383299/how-do-i-config...

Re:Show HN: A new stdlib for Golang focusing on platform nat... by hknmtt on Tuesday October 03, 2023 @03:11AM (#37748783)
its mere existence is a concern. people are so dumb when they ignore these things. whenever there already is something, it can only go further.
Re:Show HN: A new stdlib for Golang focusing on platform nat... by eddythompson80 on Tuesday October 03, 2023 @03:56AM (#37749059)
Debian, for example, has an opt-in telemetry. Would you apply that to Debian?
Re:Show HN: A new stdlib for Golang focusing on platform nat... by hknmtt on Tuesday October 03, 2023 @07:32AM (#37750443)
Yes, I 100% would. To any software. The only positive in this case is that Debian is not run by the freaking Google - the overlord of all information on the internet with backdoors for all three letter agencies in USA, despite what Go authors will want you to believe.
Re:Show HN: A new stdlib for Golang focusing on platform nat... by Leotard6963 on Tuesday October 03, 2023 @03:09AM (#37748770)
re: telemetry

We don't like it as well, just do not enable it :^

re: RAII

It is not possible to add RAII support without updating the compiler to call specific methods automatically, so currently it is not an option (as we are using unmodified official toolchain).

But the `g` register defined in Go is of great value, and we are making use of it to provide custom goroutine support, which means you can have custom allocator and scheduler for specific goroutines, so that you can have some of them with GC enabled and others not.

re: compare to V

pcz is a stdlib (plus a cli tool to build), not a new language, you still write Go code but in a slightly different style.

Re:Show HN: A new stdlib for Golang focusing on platform nat... by dolmen on Tuesday October 03, 2023 @09:27AM (#37751584)
What is that `g` register that you are talking about. It seems to be a reference to some internals of the Go. Do you have some references to some existing documentation about this thing?
Re:Show HN: A new stdlib for Golang focusing on platform nat... by Leotard6963 on Tuesday October 03, 2023 @10:25AM (#37752420)
I'm afraid there is no such resource, but you may find cmd/compile/abi-internal.md[1] helpful

And in brief introduction, the `g` register is a non-scratch register, and is preserved by the go compiler, it stores the poitner to current goroutine (type `g` in the official runtime, a structure serves the similar purpose of TCB), and since all general purpose registers are thread local, the goroutine may enjoy some thread-local features without any thread-local requirements to the running environment.

[1]: https://github.com/golang/go/blob/master/src/cmd/compile/abi...

Re:Show HN: A new stdlib for Golang focusing on platform nat... by arendtio on Tuesday October 03, 2023 @04:18AM (#37749214)
What bothers me: Since a while the documentation links to cs.opensource.google with the typical google flavor. Some years ago, you could simply click on some function in the documentation and view the source code. When I do this now, I find myself on a permission denied page. Just a random example:

Permission denied.

Please contact the administrator.

https://cs.opensource.google/go/go/+/go1.21.1:src/strings/cl...

I don't know what causes this, but is seems to be related to my Firefox, because in Chromium I can see that page. I just wonder, what on earth makes it so hard to serve a documentation in a way that is available to all browsers.

Re:Show HN: A new stdlib for Golang focusing on platform nat... by elygre on Tuesday October 03, 2023 @04:27AM (#37749275)
For a counterpoint: I can see that page in Firefox. Probably related to some setting on your computer.
Re:Show HN: A new stdlib for Golang focusing on platform nat... by arendtio on Tuesday October 03, 2023 @03:37PM (#37756522)
Are logged in to some google account?
Re:Show HN: A new stdlib for Golang focusing on platform nat... by dharmit on Tuesday October 03, 2023 @06:59AM (#37750197)
I have faced the same problem numerous times. Sometimes the cs.opensource.google links work, sometimes they don't. I haven't yet bothered to try and understand why that's the case.

Why can't they use the github.com/golang/go link instead? (no pun, genuinely wondering)

Re:Show HN: A new stdlib for Golang focusing on platform nat... by dolmen on Tuesday October 03, 2023 @09:24AM (#37751523)
1. github.com/golang.go is just a mirror. The main Git repo is available via https://go.googlesource.com/go

2. GitHub.com is Microsoft infrastructure. cs.opensource.google is Google infrastructure.

I still wonder why there is both cs.opensource.google and go.googlesource.com.

Re:Show HN: A new stdlib for Golang focusing on platform nat... by demi56 on Tuesday October 03, 2023 @09:25AM (#37751531)
Because GitHub is a mirror not the actual repo, I think I was around 2015 when Go was gaining massive attraction they had to use GitHub for issues also, still you can’t change the fact that more than 70% of commits is from google
Re:Show HN: A new stdlib for Golang focusing on platform nat... by saclark11 on Tuesday October 03, 2023 @09:06AM (#37751323)
Do you have any privacy/ad-blocking extensions installed? I used to have the same issue and realized it was due to the DuckDuckGo Privacy Essentials extension. When I turn that extension's protections off for cs.opensource.google then it works.
Re:Show HN: A new stdlib for Golang focusing on platform nat... by rakoo on Tuesday October 03, 2023 @09:40AM (#37751780)
It's source code. If we can't read it without privacy extensions, it doesn't work.
Re:Show HN: A new stdlib for Golang focusing on platform nat... by dolmen on Tuesday October 03, 2023 @09:44AM (#37751854)
Even more: as reading on a machine that has the Go toolchain installed, this is source code that is already available on the local filesystem.
Re:Show HN: A new stdlib for Golang focusing on platform nat... by d-z-m on Tuesday October 03, 2023 @11:21AM (#37753109)
> If we can't read it without privacy extensions, it doesn't work.

What doesn't work?

Re:Show HN: A new stdlib for Golang focusing on platform nat... by rakoo on Tuesday October 03, 2023 @02:00PM (#37755361)
Reading source code.
Re:Show HN: A new stdlib for Golang focusing on platform nat... by duskwuff on Tuesday October 03, 2023 @03:23PM (#37756337)
The same source code is also part of the Go distribution ($GOROOT/src). The Google source browser isn't the only place it's available.
Re:Show HN: A new stdlib for Golang focusing on platform nat... by arendtio on Tuesday October 03, 2023 @03:35PM (#37756494)
Yes, you can find the documentation in other places and that is what I usually do, but it sucks because this is the official documentation of the programming language.

Having those links to quickly take a look at the implementation is what made this documentation so good.

Re:Show HN: A new stdlib for Golang focusing on platform nat... by rakoo on Tuesday October 03, 2023 @06:42PM (#37758583)
1. I'm not always on a computer that has the go distribution

2. In that case, why allow reading the code un the browser ?

Re:Show HN: A new stdlib for Golang focusing on platform nat... by arendtio on Tuesday October 03, 2023 @03:32PM (#37756453)
Well, yes I do use uBlock Origin as well as DuckDuckGo Privacy Essentials, but for that page I turned them off months ago. It still doesn't work :-/
Re:Show HN: A new stdlib for Golang focusing on platform nat... by harbage on Thursday October 05, 2023 @01:57PM (#37781774)
Hey, DDG engineer here. Sorry about the issue, that’s super annoying. I want to get this fixed, but I’m having trouble reproducing the issue - navigating to the link in the parent comment seems to work as expected for me. Any chance you’d be willing to provide a few repro steps so I can track down what’s going on? Namely: - which browser you’re using and version - extension version - when it’s happening. Does it only happen when you click a link from another site?

Thanks so much for your time, and for sharing the issue.

Re:Show HN: A new stdlib for Golang focusing on platform nat... by saclark11 on Friday October 06, 2023 @08:32AM (#37789873)
Well, turns out I'm no longer able to reproduce the issue either. I just turned DDG Privacy Essentials back on for https://cs.opensource.google and I was able to view the site just fine.

Back when it was happening (maybe ~1 year ago?), I was using the latest versions of Firefox and DDG Privacy Essentials and it ocurred even if I went directly to https://cs.opensource.google. I had confirmed back then that when I turned DDG Privacy Essentials on I got "Permission denied", but with it off I was able to view the page.

I'm on the latest verisons of Firefox and DDG Privacy Essentials now. Seems it is no longer an issue in the latest version(s).

Re:Show HN: A new stdlib for Golang focusing on platform nat... by harbage on Friday October 06, 2023 @12:56PM (#37793189)
Thanks for following up! Appreciate it. We’ve been investing quite a bit of effort over the past few months into tracking down and understanding issues like this that are caused by our various privacy protections, so it’s nice to hear that things are improving.