HNHacker News
TopNewBestAskShowJobs

shabbyrobe

640 karma · joined August 15, 2012

submissionscomments
shabbyrobe··on Do Developers Understand IEEE Floating Point? [pdf]
Wow, I'd love to hear more about this.
shabbyrobe··on SQLite as an Application File Format (2014)
I've always been curious about the characters in ASCII for this, but I've never seen them used in the wild. Stuff like "Group Separator" (0x1D), "Record Separator" (0x1E) or "Unit Separator" (0x1F)

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?

shabbyrobe··on A EULA in FOSS clothing?
> Embed our open source

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.

shabbyrobe··on Just tell me how to use Go Modules
That's a really good point actually, I hadn't thought directly about this before. I've just evolved a position on it without articulating it directly: I almost never include them in my public APIs, almost never see them in the better APIs, and tend to count it as a strike against a package if I see that they're used without strong justification.

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.

shabbyrobe··on Just tell me how to use Go Modules
> Why am I writing all this ceremony (comparatively little compared to other languages, but ceremony nonetheless) when the new, better way is coming?

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.
shabbyrobe··on Open Source is Not About You
> Even though you have no "obligation" to solve these problems that you have created for other people...

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...

shabbyrobe··on Vue 3.0 Updates [slides]
What power does React offer you that Vue can't? It'd be quite interesting to hear your take on it.
shabbyrobe··on Proposal: Go 2 transition
The 5 -> 7 transition was great from the point of view of someone writing PHP, but it was significantly more painful for extension writers. The only way I could update my stuff was with many hours of careful spelunking through the PHP source looking for examples of the new APIs, then many more hours of fun with valgrind working out all of the ZVAL indirection and zend_parse_parameters changes I'd missed.

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.

shabbyrobe··on Opus 1.3 Released
Anecdata alert!

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!

shabbyrobe··on Firefox removes core product support for RSS/Atom feeds
How do you get 100 different IPs trivially and cheaply? I suppose we might have different definitions of cheap; 100 EC2 t3.nanos would be a bit out of my price range, but that might be small change for the next person.
shabbyrobe··on Arguing against using protobuffers
Oneofs, at least with gogoproto, are quite unpleasant to work with. There's a separate intermediate type generated for each member of a oneof field. With the following message:

    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.
shabbyrobe··on Go team adding a Go language server to core
I'm not sure I fully understand the provenance of the code here, but I could just be being a bit thick. The files in the change request show the copyright as "2018 The Go Authors", but some of the commentary hints that this is code donated from the Sourcegraph implementation. If this is the case, does that mean Sourcegraph has transferred the copyright to the Go authors?
shabbyrobe··on Firefox about:config privacy settings
toolkit.telemetry.cachedClientID will be repopulated by Firefox even after you clear it. I have just locked the preference [1], hopefully this stops it.

[1]: http://kb.mozillazine.org/Locking_preferences

shabbyrobe··on New active fork of Grumpy, a Go-based python2 runtime
This project got a lot of attention when it was first released, but then the original repo went dark. Some community members have decided to take up the mantle and have issued a rallying cry. The new repo is https://github.com/grumpyhome/grumpy.

Some more discussion on the original repo: https://github.com/google/grumpy/issues/406#issuecomment-402...

shabbyrobe··on A browser extension to make Medium more readable
Unobstruct is awesome!

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.

shabbyrobe··on Go 1.11 Beta 1 is released
Thanks for pointing that out, I've been trying very hard to keep up but somehow missed that detail. Perhaps it should be in the release notes!
shabbyrobe··on Go 1.11 Beta 1 is released
Ok, ninja edit, this whole comment was based on a misunderstanding and adds no value to the discussion. I've been corrected below, the rest does not need to be preserved. Downvote it to the bottom for me please; I can't seem to delete it.
shabbyrobe··on Go-benchmark: Golang benchmarks used for optimizing code
Yep! 1024. Good eye! Some tests, like the atomic ones, use an even larger constant (which explains the crazy 355971 nsec/op result for an atomic increment):

    BenchMarkSize     = 1 << 10 // 1024
    BenchMarkSizeLong = BenchMarkSize << 5
shabbyrobe··on Eight hours a night isn’t enough, according to a leading sleep scientist
I wonder if there are any studies of the effect on the quality and quantity of people's sleep and their general wellbeing since this recent surge of "sleep shaming" in the press started.

It's always the same thing: "You are not sleeping in exactly this way and you should feel bad." Nope, sorry. I don't.

shabbyrobe··on What is code
This song popped straight into my head too!

Before the humourless downvote-brigade gets you, here is the song for those unfamiliar: https://www.youtube.com/watch?v=K5G1FmU-ldg

shabbyrobe··on TypeScript 2.9 is now available
PHP cops a lot of heat - some deserved, but mostly not - largely based on limitations of previous versions, cosmetic issues like the crummy naming and argument ordering in the stdlib, and good old fashioned out-grouping, but it has had optional graduated type safety for many, many years. Moving from PHP to Node felt like a major step backwards in the sheer number of unit tests and argument sanitisation junk I used to not need to write.

I'm so grateful for TypeScript, it's the hero JavaScript desperately needed.

shabbyrobe··on Revive – Fast, configurable, extensible linter for Go
That's your anecdata though, mine's very very different indeed. Many of the places I've worked have either actively fought attempts to get some consistency in place, or have lapsed into total anarchy, even in some cases with edit wars showing up in the Git history. It's horrible, and I'm glad you've been able to avoid it. Go's way is better - those things just can't happen.

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.

shabbyrobe··on Revive – Fast, configurable, extensible linter for Go
Couldn't agree more. The Go toolchain has been the ultimate bikeshed destroyer.

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.

shabbyrobe··on How to start a Go project in 2018
And in an astonishing piece of timing, the author of dep has posted an analysis of vgo: https://news.ycombinator.com/item?id=17063724
shabbyrobe··on How to start a Go project in 2018
Go in general seems to be powered by a general principle of "Was it invented here?", which undoubtedly stems from its plan9 roots as an upstart reinvention of Unix. The software community tends to treat the "not invented here" phenomenon as detrimental but I think in the case of Go, the willingness of the team to reject the status quo has been a significant contributor to its success and utility.

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.

shabbyrobe··on Ubuntu 18.04: Unity is gone, Gnome is back, and Ubuntu has never been better
> Ubuntu has done a bit of tweaking so that you can actually put launchers, folders, and files on your desktop, which should be welcome news for many Ubuntu users. How long that will last is an open question, though, since GNOME just completely removed the code that made it possible for Canonical to enable this feature.

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.
shabbyrobe··on Using the Web for a Day with JavaScript Turned Off
I've just realised I wasn't very clear about the way they complement each other - uMatrix is a lot more more configurable and a lot more fine-grained, but at the cost of taking some time to master. I believe the investment of time was worth it. I use uBlock for set-and-forget coarse control and for the excellent filter lists, then use uMatrix for customisations.
shabbyrobe··on Using the Web for a Day with JavaScript Turned Off
Yeah I agree it is really fiddly. I totally understand why people say "to hell with it". I only really put up with it in the first place because I was trapped with a woefully underpowered computer for a lot longer than I should've been. But I found the fiddling got easier and easier with time. I've stuck with it for over 2 years now and it's really just not something I notice any more.

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."

shabbyrobe··on Using the Web for a Day with JavaScript Turned Off
They complement each other. I use them both. uBlock origin has my back for those rare times where I get the shits and just disable uMatrix entirely for a particular site.

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.

shabbyrobe··on Using the Web for a Day with JavaScript Turned Off
If you're serious about giving this a whirl, uMatrix is even better for fine-grained control. I disable everything except first-party images and CSS by default and it's like a whole new internet.

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!

← PreviousPage 2 of 6Next →