640 karma · joined August 15, 2012
Is there a reason why nobody uses these? Did someone work out back in the 90s they were pure evil and we've just never used them since?
I thought the FAQ said you wouldn't refer to it as such:
> Because of this, we will not refer to the Confluent Community License or any code released under it as open source.
I find there's a lot you have to do manually to handle them correctly and it's easy to miss details. I think they're best cordoned off behind isolated, encapsulated parts of a channel-free public interface.
To walk back a tiny bit from my earlier "80%" claim, I reckon channels are probably more like 50% complete. The existence of "context.Context", itself very much half-baked, is a symptom of that.
You have to think long and hard about cancellation and blocking every time you interact with them (even if you decide you don't ultimately need to), and the results, once you've (hopefully) handled all the corner cases can degenerate into a tangled mess that's hard to reason about, harder to test, and impossible to change. I like to call this kind of code "channel soup".
I'd be interested to see proposals for what the 80% version of channels would look like. What we have now is a great start, but it's not great yet.
Whether or not the new way will be better is far from assured.
I'm outing myself as a bit of a "get off my lawn" greybeard here, but as long as such a large swathe of the industry remains trapped in a permanent state of convulsion where everyone competes to build the next monument to their own cleverness, the unprecedented consistency, clarity and productivity that vanilla Go 1 provides will remain under-appreciated.
There's an awful lot of sound and fury over generics and error handling. I sincerely hope that if and when something is done about it, it isn't done in a way that gives anyone a license to be clever.
> "use channels, share memory by communicating"
They walked back a bit from this, thankfully, and I'm seeing less and less nasty "channels for the sake of it" code these days as a result. The party line seems to be closer to "channels are good and bad, mutexes are good and bad, favour whichever is goodest" nowadays, and the larger projects I've worked on have typically been about 50/50 [1]
[1]: https://github.com/golang/go/wiki/MutexOrChannel
Whenever I think something is missing, I find it helpful to remind myself that Go is kind of the ultimate "80%" experience. Absolutely everything is 80% complete, from the language, to the tools, to the stdlib, it's performance relative to vanilla C... everywhere. 80%. I also think this is the secret of its success.Publishers of open source code don't create problems for other people. People who accept that code into their projects assume those problems for themselves.
If an open source package has bugs in the forest and nobody is around to install it...
I'm fine with the burden of the upgrade being transferred to users of the C API - that seemed like a very astute trade to me - but the process could've been made a lot easier with a proper upgrade guide rather than a few hasty, incomplete notes in the wiki.
The new Opus encoder is incredible. We used the beta of 1.3 in a bandwidth constrained environment recently and found that in our testing (and for our very specific set of audio, YMMV, past performance not indicative of future blah blah blah), nobody could reliably distinguish between an AAC at 128kbps and an Opus file at 64kbps. If we tried really hard, we thought we could identify some extra aliasing in the top end, but this was not practically relevant and never picked up by our user testing. The audio in question was a mixture of speech and quiet music; of course the different encoders were easily identified when using regular high-density pop music!
The files were fully supported by every Android device we had available for testing.
Very impressive work, thank you Xiph!
message Foo {
oneof bar {
Baz baz = 1;
Qux qux = 2;
}
}
You'll have the types Foo, Baz and Qux like you'd expect, but you also get Foo_Baz, which does nothing but wrap the Baz for use with the Foo.bar property, and Foo_Qux, which does the same thing but for Qux instead of Baz. To make matters worse, the types all implement an interface which is declared but not exported. Stringing the whole thing together to assign to a oneof looks like this: foo := &rpc.Foo{Bar: &rpc.Foo_Baz{Baz: &rpc.Baz{}}}
That example makes it look better than it really is; in practice, you'll probably have more properties and longer names.Some more discussion on the original repo: https://github.com/google/grumpy/issues/406#issuecomment-402...
On the desktop, Unstick for Firefox gives you a little nuke icon that gets rid of any dickbars anywhere you happen to find them: https://addons.mozilla.org/en-US/firefox/addon/unstickall/
That, plus uBlock Origin's "right click, block element" feature for things I visit regularly, gives me a significantly better Internet experience than I'd otherwise be stuck having.
BenchMarkSize = 1 << 10 // 1024
BenchMarkSizeLong = BenchMarkSize << 5It's always the same thing: "You are not sleeping in exactly this way and you should feel bad." Nope, sorry. I don't.
Before the humourless downvote-brigade gets you, here is the song for those unfamiliar: https://www.youtube.com/watch?v=K5G1FmU-ldg
I'm so grateful for TypeScript, it's the hero JavaScript desperately needed.
There's a network effect too. Sooner or later you'll start to notice that not only does all your organisation's code look consistent, dependencies you pull in look extremely consistent too, as if other organisations were following the same interpretation of the Golden Rule yours is following.
This has enormous benefits when you're assessing the quality of a dependency because once again, you get to walk straight past the same thousand pointless and distracting arguments you got to walk past internally (well, not you of course, but those of us who have been stuck having them!) and get right to the meat of the quality of the code you're assessing for inclusion. "Are the idioms sensible? Are the errors being propagated correctly? Is the public API neat and tidy?" That stuff, the real stuff, is all visible much more quickly when you're not rage-twitching because some other developer from some other team on the other side of the world likes to put the curly brace on a new line at the same indent level as the function body.
I had never experienced this unique benefit with any language ecosystem I worked with before Go and I'm loath to leave it behind. I'm incredibly heartened to see tools like Prettier and Black making strides in the Javascript and Python communities respectively.
I've always been fond of the Golden Rule for code style: "All code in your project should look as if it was written by one and only one person". The Go toolchain starts you a long way down that road out of the box, with no option to even try to reignite the indent wars, or to slaughter more goats at the altar of the One True Brace. Instead, you get to focus entirely on how that rule applies to language idioms straight away, which is far more meaningful than the colour of the bikeshed or the number of spaces around an operator.
Adding linters is cool, but taking them away directly compromises that property, which I now consider far too valuable to lose.
But for all the good this attitude brings (and I would definitely regard it as a net benefit) there have been some pretty huge missteps too, and the Go team's prioritisation of things like type aliases or the half-finished plugin architecture over those missteps leads many to ask reasonable questions about how those priorities are decided.
GOPATH is a long-acknowledged mistake and a lot of community effort and consensus-building work has gone into finding a solution. vgo was a bit of an ambush and has left a lot of people confused and bewildered, especially after a huge amount of community goodwill and momentum was built up around dep. That was a price Russ Cox decided to pay with vgo, which was his prerogative. Now we just need to wait and see whether it was worth it, which will take some time.
I was curious about this and went spelunking for more information.
https://community.ubuntu.com/t/files-nautilus-v3-28-will-lose-the-desktop-icons-capability/3115/1
https://gitlab.gnome.org/GNOME/nautilus/merge_requests/46
https://irclogs.ubuntu.com/2018/01/09/%23ubuntu-desktop.html#t14:46
https://csorianognome.wordpress.com/2017/12/21/nautilus-desktop-plans/
I understand the need to remove cruft that blocks progress, but the Desktop filesystem metaphor is used by almost every single computer user I have ever seen. It seems wilfully destructive to remove something that is depended on by so many without making sure there's a replacement in place first.Actually, when I get stuck on a different computer and I'm forced to use the same terrible internet everyone else has to use these days, I catch myself clicking around where my uMatrix icon would normally be and it takes me a few seconds of dawning horror to realise that I've totally lost control of my experience.
"No thank you, the latest celebrity diet fad isn't really my cup of tea." "What? Where is this autoplaying video hiding?? Must be under one of these neo-popup JS disasters." "No, I'm not interested in 17 ways that my imperfect sleep is going to kill me right this instant." "NO I don't want to download Bonzi Buddy."
Decentraleyes is also worth a look if privacy concerns form a part of your aversion to the blizzard of garbage your browser spews forth at you. It contains in-browser hosted copies of all that CDN JS junk, so if you have to turn on JS for some shared copy of jQuery that Decentraleyes happens to have bundled, you don't hit the network at all.
There's a bit of a dance you have to get used to when things don't work, but I've got it into muscle memory now so I don't even think about it. I tend to click around in there enabling the first few obvious things for about 3 seconds, which works 95% of the time, and for the the remaining 5% the URL gets copy-pasted into Chromium.
Wait, what are all these floating obstructions? I thought I disabled all JS... hang on, you mean CSS is now full of animations and distractions too? https://addons.mozilla.org/en-US/firefox/addon/unstickall/ and https://github.com/gagarine/no-transition.
What's that? Sticky sidebar full of chum? No problem - uBlock Origin's "right click, block element" to the rescue.
The internet doesn't have to be shit any more!