Recent submissions

Comment · 2 years ago
Try "Best served cold" by Joe Abercrombie. Followed by The Heroes. And to avoid minor spoilers, read the First Law trilogy first. All good books are great, The heroes is probably the best!
Comment · 10 years ago
you are replying to the original poster.
Comment · 10 years ago
Comment · 10 years ago
It is specified - a struct tag is just a string literal after a struct field. See https://golang.org/ref/spec#String_literals

If you use backticks, the tag must not contain another backtick. On anything but a struct tag, you could get by by concatenating literals, but that's not allowed for struct tags: https://golang.org/ref/spec#Tag You could use double quotes instead of backticks, but that leads to a dark corner of escaping hell and an utterly unreadable mess.

Thankfully, the language strongly nudges you to very, very simplistic and light uses of struct tags.

Comment · 11 years ago
Superfish is a root certificate installed by crapware in the preinstalled windows version. It can be uninstalled or removed by a fresh OS install. I guess someone replacing hardware components in a notebook doesn't keep the preinstalled OS for long.
Comment · 11 years ago
It's a non-classical example of arbitrage.
Comment · 11 years ago
I use "var undef;" at the top of a function and never set it to a value. Comparison with === is the same as with undefined. And it's nice for minification.
Comment · 11 years ago
And what about signal jamming or drones being shot down? Not only for package theft, also to strip or steal the drones themselves? I'm really curious how robust this delivery method is against external manipulation and general human misbehavior. Or say there's a defect - some structural damage - and a drone crashes or loses its 10 kg package into a front screen of a car driving on the interstate. Honestly, I don't see a way this could work. Not because delivery by drone in densely populated areas is economically and technically unsound. Because of... other stuff.
Comment · 11 years ago
you have missed

mkdir -p ~/.config/git

Comment · 12 years ago
You should use switch v := i.(type) so you can access v as the type in a case.
Comment · 12 years ago
Comment · 12 years ago
My Java is getting rusty... I read about this sometime somewhere but forgot it, thanks! I should have picked something like "String getText()", then.
Comment · 12 years ago
Because of the implicit thing! The api designer doesn't have to write the interface, you can do it yourself. As long as naming conventions are kept to and the signature matches, you can apply this anywhere.

Imagine a close() interface in Java. There isn't one - but having a try {...} finally { x.close(); } can be very useful sometimes. But having interface graphs made of granular interfaces makes everything slow and causes a lot of complexity when you try to think about your type hierarchy. That's why interfaces always just grow and you can't use them any longer because other classes only implement part of the api. Something usable for all of awt, swing, file handling, random foreign libraries? Unthinkable. Also, adding something in a later release (like CharSequence in 1.4) can have a wide ranging impact and requires you to change a lot of code.

In Go, you just add an interface from the union set of multiple structs api - and you can use it. No matter who wrote those structs. The value is enormous. Think of it as something like dependency injection at compile time.

Comment · 12 years ago
There's a great video treating imperial measurement units. I instantly fell in love with it: http://www.youtube.com/watch?v=r7x-RGfd0Yk

I landed there after watching one on paper sizes on the same channel. Also pretty much worth it!

Comment · 12 years ago
I really doubt that, where does it say so? AFAIK, he supported the TweetNaCl in C. That does not mean anything concerning this port.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton