Show HN: Faster UTF-8 validator - <AUTHOR> https://github.com/zwegner/faster-utf8-validator <comment><USER2> Hi! I took a shot at vectorized UTF-8 validation in 2012. I just put this faster validator, and Daniel Lemire's code, into my test harness at [https://github.com/andrewffff/utf8fuzz/tree/2019_compare](https://github.com/andrewffff/utf8fuzz/tree/2019_compare)

On an i7-7800X (clang 6.0.0-1ubuntu2, WSL, don't trust my numbers) my benchmarks showed about the same relationship between SSE4, AVX2 and Lemire's code, as your benchmarks did. My own attempt is about half as fast. [https://raw.githubusercontent.com/andrewffff/utf8fuzz/2019_c...](https://raw.githubusercontent.com/andrewffff/utf8fuzz/2019_compare/rough- benchmark.png)

A few examples of invalid UTF-8 from Markus Kuhn's suite pass this validator right now, specifically 4.1.3, 4.2.3 and 4.3.3. My randomized tests, which compare the results from different validators, also fail a small percentage of the time, I'd guess for the same reason. [https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt](https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt)

I'm really interested in the different approaches taken here. Fortunately both Daniel and you've communicated what you were doing, I think it's going to take longer for me to re-comprehend my own approach!

Thanks for sharing this.

<comment><AUTHOR> Oh wow, that is most definitely a bug. Thank you very much for reporting that, before this spreads too much. How embarrassing... I was in a bit of a rush to stick this up on HN before the weekend, as otherwise I'd probably never get around to it. Evidently I got a bit sloppy making the error table.

Luckily, that's a very easy bug to fix--it was just caused by a mistake constructing the error tables. The only annoying part is having to renumber the error bits and write the tables again by hand :)

Thanks too for benchmarking! I see you tried out make.py, but it didn't work? I should probably add a Makefile for people that don't want to deal with yet another random build system...

</comment></comment><comment><USER3> Good stuff.

The key to a solid claim, especially for something as bold as "fastest in the world", is a complete specification of the inputs to the benchmark.

You mention random ASCII bytes and "random UTF-8 bytes". The former is definitely an really important case but also the least interesting. I can write on a napkin a UTF-8-but-is-actually-ASCII decoder that approaches 256 bytes a cycle cached (with a fallback routine when the ASCII assumption fails).

So then what about the random UTF-8 bytes. What does it mean? Do you generate random bytes and then exclude invalid sequences? Do you generate a uniform random codepoint in the 21-bit codepoint space and then concert it to utf-8?

At a minimum it would good to see a benchmark with random distributions that approximate common languages.

The true fastest decoders on such realistic data will be adaptive and more complicated than yours.

<comment><AUTHOR> Well, to be fair, my claim was that it was the fastest in the world _that I 'm aware of_, which is a much weaker statement. :)

The random UTF-8 in the benchmark was generated from the code in Daniel Lemire's fastvalidate-utf-8 repository, specifically this code: [https://github.com/lemire/fastvalidate- utf-8/blob/ed53c0c64b...](https://github.com/lemire/fastvalidate- utf-8/blob/ed53c0c64b3e5ef767eeea8f8f1c205f75c377af/benchmarks/benchmark.c#L93-L141)

Looking closer at it, I think that the distribution of random UTF-8 is not as uniform as it should be: it generates one byte first, and then generates continuation bytes depending on the value of that byte. Which means that half the code points will just be ASCII.

But I think this doesn't matter very much for benchmarking, at least for the mostly-branchless SIMD algorithms like mine. For each vector of input bytes, there's three branches that can get taken: the early exit for ASCII-only, and two branches that exit the loop due to validation failures, which don't really matter for benchmarking. Even though the distribution of code points will be roughly half ASCII, for a 32-byte AVX2 vector, the probability of a pure ASCII vector is something less than 2^-32 (since non-ASCII initial bytes translate into more than one byte of output, and the probability of 32 ASCII _code points_ in a row is 2^-32, the probability of 32 _bytes_ in a row is less, by an amount I'd rather not try to calculate). So for this particular benchmark, random UTF-8 should be roughly equivalent to "no ASCII". To verify, I disabled generating ASCII in the linked code, and the numbers came out pretty much identical. If anything, _even more_ ASCII bytes would be a more interesting test, since that would make the quick-ASCII branch less predictable. If you know of any good UTF-8 corpora for common use cases, I'd be happy to benchmark them.

Given that different sets of "random UTF-8 bytes" generated with this method will virtually always follow the same path, the exact distribution doesn't really matter when measuring cycles/byte. Input that is purely 2-byte code points will be faster in terms of cycles/code point than purely 4-byte input, but that's mostly a property of UTF-8 being variable length.

I doubt there's much speed to be gained by adding any sort of adaptive behavior beyond the ASCII check. Generally these days you want as few branches as you can manage, and this algorithm has only one that matters.

<comment><USER3> > So for this particular benchmark, random UTF-8 should be roughly equivalent > to "no ASCII". To verify, I disabled generating ASCII in the linked code, > and the numbers came out pretty much identical. If anything, even more ASCII > bytes would be a more interesting test, since that would make the quick- > ASCII branch less predictable. If you know of any good UTF-8 corpora for > common use cases, I'd be happy to benchmark them.

Indeed, this is a good example of a problem with random bechmarks: no text really has the behavior of uniform random with 50% ASCII but no character-to- character correlation. In the real world you often expect bursts of ASCII, e.g., where a title is written in ASCII or where you have say structured data like HTML, ASCII, JSON, etc which often have lots of ASCII data mixed in with meant-for-human strings which may be non-ASCII, but it's very bursty.

As you point out, for your algorithm, 50% ASCII but no burstiness basically means every vector takes the non-ASCII path, which is actually "good" compared to say 50% of vectors taking the ASCII shortcut (which would slow things down due to BP failures) - so a lot of the interesting design space is ignored (e.g., I think the ideal algorithm will choose between strategies in a branch- predictor aware fashion).

> this doesn't matter very much for benchmarking, at least for the mostly- > branchless SIMD algorithms like mine

Right - but of course it matters a lot for existing algorithms (which tend to be branchy), which can come out looking much worse or much better depending on the distributions (not that I think any will be able to pass a good vectorized approach). Also, as above, the early-out for ASCII _will_ matter for a lot of practical inputs, but neither benchmark stresses it.

> I doubt there's much speed to be gained by adding any sort of adaptive > behavior beyond the ASCII check. Generally these days you want as few > branches as you can manage, and this algorithm has only one that matters.

Right, well the ASCII one is a big one. I haven't looked at the details of your algorithm, but could the core loop be faster if say it never saw any 4-byte sequences, or certain other uncommon things? Then an adaptive approach would use an optimized kernel for that scenario if it was encountered for a while.

"Adaptive" doesn't really mean more branches - just that you occasionally might switch to a different kernel based on the observed data. This shouldn't add many branches compared to e.g., the existing loop and failure branches, and evidently you have to do it in a branch-predictor aware way (e.g., you need some type of hysteresis in mode switches so you don't switch too often). Sometimes you can build the adaptivity into the existing branches, e.g., maybe you are taking a branch anyways (e.g., when you find non-ASCII text) and you can build the adaptive "state machine" directly into the code via duplication of code, w/o needing any explicit data counting the number of failures (effectively, the IP holds extra information recording something about the path you took to reach the current location).

<comment><AUTHOR> Ah, thanks for the reply. I understand you better now, and for the most part I agree. Taking out the early exit for ASCII can speed up the frequently- changing case to avoid the misprediction penalty, as long as sufficiently many chunks of input need to take the long validation path.

Thinking about this more, I think there's at least one way that an adaptive approach might be beneficial without too much extra complexity: keeping two copies of the main kernel for ASCII-checking and non-ASCII checking. It should be pretty cheap to add a counter that is incremented or decremented based on the ASCII-only mask, and split the outer loop into N-byte chunks, with a branch for each chunk determining whether we should take the branchless path or not.

> Right, well the ASCII one is a big one. I haven't looked at the details of > your algorithm, but could the core loop be faster if say it never saw any > 4-byte sequences, or certain other uncommon things? Then an adaptive > approach would use an optimized kernel for that scenario if it was > encountered for a while.

I started out thinking this wouldn't really work, but I think there might be some potential here. My initial problem was that even if some work could be saved if there weren't 4 byte sequences, we still need to detect them every time. But, because my algorithm uses lookup tables for error flags which have some free bits, and because the 4 byte sequences can be detected in the same indices that are used for these lookups, we can set another error bit that means "take the 4-byte slow path". Then, when some input fails validation, we only do the work there to check whether it's really a failure. This gets complicated, though: first off, the check for the proper number of continuation bytes is before the table lookup, so we'd need to put some logic in there. Secondly, this lookup table gets validation failures one byte later in the stream than the initial byte. So in the case that the 4-byte sequence starts on the last byte of a vector, we'd need to have special handling.

It'd probably be a good idea to also have some hysteresis in this approach too... So overall, I think there might be some nice gains from adaptive behavior. There are two big concerns that make me skeptical, though: code size/I$ pressure, and code complexity. While code size wouldn't be much of an issue in microbenchmarks, in real applications it matters a lot more--I don't want the size overhead to get too big. Right now the full validation algorithm is about 600 bytes of code for AVX2, I'd rather not make that explode by a large factor by adding several specializations. And I'm already reaching the limits of what little generic programming can be done in the C preprocessor... This sort of specialization is really better done with C++ templates (or maybe Rust or something). I had wanted to keep this a pure-C library, but maybe C++ might be better.

Hope some of that makes sense... I'm mostly thinking out loud here. In any case, you've given me a lot to think about, so thanks very much!

<comment><USER3> Thanks for the reply. I put some more thoughts on github.

</comment></comment></comment></comment></comment><comment><USER4> Pretty nice. Always nice to see better optimized commonly required algorithms. If this is really faster than previous implementations (no reason to doubt, but don't have time to validate right now), this might save megawatts of power world wide. (Disclaimer: Would need to actually check with power measurement tools, but generally faster consumes less power.)

A small nitpick: not sure whether those macros bought anything, I guess the optimizer could inline function calls to intrinsic wrappers just fine as well?

<comment><USER5> _...this might save megawatts of power world wide..._

Since when saved megawatts bothered programmers? If that was the case we would see far smaller usage of scripting languages and electron apps.

<comment><USER6> It takes effort to not use electron. It doesn't take effort to have your library update its dependencies to use a faster utf-8 validator

<comment> F-0X > It takes effort to not use electron.

Why do you believe this? I don't think it is quite that ubiquitous.

<comment><USER7> Let's say I want to build a cross-platform app. I could use Electron (it's somewhat of a known quantity), or I could start doing some research into what else is available, and then evaluate the various offerings - not only to ensure they do what I need, but to also ensure that they use less power/resources than Electron. The effort here is (at least some kind of) unavoidable up-front cost/time.

To switch existing code to use some particular UTF-8 decoding library should be as simple as changing some imports, and perhaps some other (search/replace) code tweaks or implementing a quick shim/adapter. If it doesn't work out, rollback or abandon the branch. On most codebases, even larger ones, this whole process is probably an easier thing to do, requiring less effort than finding a decent (and more power efficient) alternative to Electron — seems to be the GP's gist. And personally I'd agree.

<comment><USER5> _" Let's say I want to build a cross-platform app. I could use Electron (it's somewhat of a known quantity), or I could start doing some research into what else is available, and then evaluate the various offerings - not only to ensure they do what I need, but to also ensure that they use less power/resources than Electron. The effort here is (at least some kind of) unavoidable up-front cost/time."_

Yup that's right. Any sign of inconvenience and efficiency be damned. Why do we even bother trying to fix environment. This cost money and inconveniences so many people.

Also it depends on your background. I have no problem doing without Electron. I would have to apply your exact logic to even look at it.

<comment><USER8> You are clearly someone seeing in black and white. There's shade of grays too, you know?

> Any sign of inconvenience and efficiency be damned.

Nope, not any signs... just that if you can build more with less time, in exchange of a bit of CPU efficiency, it's not so bad.

> Why do we even bother trying to fix environment.

For the future. You see, my program using a bit more RAM or CPU won't change much. Not eating that meat, that will change quite a bit, thus that's one of the things I do.

A software can allow people to be many orders in magnitudes more efficient, if I can build more of them, it allows even more people to be a few orders of magnitude more efficient. The power usage afterward, fit in the error margin quite well.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> I'm not sure if the compiler is smart enough to do it for you, but you might be able to squeak a bit more performance by precomputing a partial sum (data + V_LEN - 1) outside the loop for this statement:

> v_load(data + offset + V_LEN - 1);

Other than that, this is incredibly clean code and I doubt you can get much more performance without dropping into assembly. I wish my coworkers made code this well documented :/

<comment><AUTHOR> At least my compiler (LLVM 10) is smart enough to know that "data" isn't modified, and thus fold the addresses of the two vector loads inside the main loop into single instructions:

        1a0: c5 fe 6f 6c 31 ff     vmovdqu ymm5,YMMWORD PTR [rcx+rsi*1-0x1]
        1a6: c5 fe 6f 24 31        vmovdqu ymm4,YMMWORD PTR [rcx+rsi*1]

I'd expect most modern compilers to get this right with optimizations on, but if somebody finds one that doesn't, I'd like to know. In general, I read through the disassembly a decent amount when developing this. That's how I noticed the "req += (vmask2_t)set << n;" (instead of |=) trick, which gets compiled to one lea instruction. The disassembly got a little bit hairy when I added the code to handle trailing bytes, though...

Thanks for the kind words, though! It warms my heart :)

</comment></comment><comment><USER10> how does this differ from here: [https://github.com/lemire/simdjson/pull/365](https://github.com/lemire/simdjson/pull/365)

<comment><AUTHOR> Oh interesting, I hadn't seen that. It looks like it uses the same idea of shuffle-lookups on the first three nibbles. That's a fairly large patch though, I don't think I've fully grokked it. At the very least, my code differs from that in that mine does less byte stream shifting, instead doing shifts in the scalar domain. Their code also needs to deal with quotes, escaping, etc. due to being part of a JSON validator.

</comment></comment><comment><USER11> I like the way you write and comment your C code. Very nicely written.

Except all those spaces between the # and "define", no sir I don't like that :)

<comment><AUTHOR> Well how else are you supposed to nest your preprocessor macros? :P

Thanks though! I like taking the time to make my code as clean as I can. Glad others appreciate it!

<comment><USER12> I have used the same "indendation" in the past. Because there are always review comments that his would be weird/confusing/unconventional I have given up on using it :(

<comment><USER13> It used to be the only valid way to indent macros. It has the advantage that macro lines always get highlighted in column-1 and stand out more from regular structured code.

</comment></comment></comment></comment><comment><USER14> Sorry if this is slightly off topic but a great time to revisit this great primer on Unicode [0] by Joel Spolsky.

[0] [https://www.joelonsoftware.com/2003/10/08/the-absolute- minim...](https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum- every-software-developer-absolutely-positively-must-know-about-unicode-and- character-sets-no-excuses/)

<comment><USER15> Also:

[https://utf8everywhere.org/](https://utf8everywhere.org/)

</comment></comment><comment><USER16> I wonder if the authors plan to get this merged into commonly used implementations of UTF-8 validators so that folks can benefit from their work.

Anyone have any ideas about which open source codebases UTF-8 validators exist in?

<comment><USER17> There's not as big a niche as you might think. A lot of the software that needs valid UTF-8 don't validate upfront, but do it as part of a parsing process. An example would be something like an XML or JSON parser.

For more mundane uses like opening a big text file, you often want to tolerate invalid bytes and show a replacement character. You could use the technique, but you'd have to modify it to work for that usage.

<comment><AUTHOR> In case anyone sees this: I initially agreed with you, thinking that pure UTF-8 validation is a bit more of a niche than might be expected. But if I'm not mistaken, I think at least for JSON validation, the UTF-8 validation can happen completely independently of the parsing. I don't think any control characters (braces, commas, quotes, escapes, etc) will change the validity of the UTF, or vice versa. So it might be beneficial (both for speed and security, as the sibling comment notes) to validate chunks of input as UTF-8, then pass them off to the parser, which now doesn't need to deal with validation.

Maybe this could be applied to XML, but that's quite a behemoth of a standard --I really wouldn't be surprised if there was a way to switch encodings mid- stream. I have no idea though...

<comment><USER17> Sure, you can validate and then parse the JSON, but parsing it is also effectively validating it as UTF-8, except for the string values in the JSON, so it's heavily going to be duplicated effort. And unfortunately, the strings can contain things like invalid surrogate pairs by using unicode escapes, so you may want to validate after escaping.

You can't normally blindly parse XML as UTF-8. The encoding has rules for detecting the character set.

</comment></comment></comment></comment><comment><USER18> Do the instructions you use cause downclocking on Intel CPUs?

<comment><USER3> No, because non-"FMA unit" (mostly SIMD FP) AVX2 instructions don't cause license-based downclocking on recent Intel CPUs.

To get downclocking to L1 license (the middle speed tier), you need to use either FMA unit AVX/AVX2 insructions or any AVX-512 instructions. This algo doesn't use any of this, staying in the integer domain.

Here's a longer description:

[https://stackoverflow.com/a/56861355](https://stackoverflow.com/a/56861355)

Of course this doesn't address say power or temperature based throttling which might be more likely to occur when wide SIMD is used, but it's not possible to give a precise answer there, other than many low or moderate core count setups won't see this kind of throttling outside of extreme use cases.

<comment><AUTHOR> Thanks for the link, that's a good post! I hadn't investigated the throttling issues much in the past, not owning an AVX-512 machine, but that's much more precise than the standard "don't use AVX-512" meme that's repeated all over the place. Bookmarked!</comment></comment></comment>


How big cats hunt zebras and impalas, and how these prey flee their predators - <AUTHOR> https://www.nytimes.com/2018/01/24/science/cheetahs-lions-zebras-impalas.html <comment><USER2> I was lucky enough to visit a private game reserve in South Africa for a few days. One of the things I saw was a pregnant ex-Zebra being eaten by lions (including the fetus that was dragged to the shade under a bush by other Lions). The guide explained that what likely happened is that the lions tried to separate the pregnant zebra from the herd and make her go down slope. The added weight of the fetus makes maneuvering down slope harder, especially when trying to make tight turns, giving the lion the edge. It was fascinating (although a bit gruesome) to see animal behavior in action that way.

<comment><USER3> I always wonder for the herbivores why does "the saving your own kind" instinct not kick in more often. A lion is more powerful than a zebra but there are cases like a herd of bison running away from wolves who are trying to isolate youngsters. If they stay put and don't blink the wolves have no chance. A recent documentary episode I saw (I think in frozen planet or the hunt) had an extreme case of a pack of wolves trying to bring down a juvenile bison and an adult just running through the struggling juvenile, bringing it down and making it easy for the wolves.

<comment><USER4> r/K selection theory has been subsumed by more advanced theories over the last few decades, but many of its themes are still applicable and it provides a simple way to think about some general reproduction strategies. Herbivores fundamentally have far more energy availability, because they're a level closer to the primary input of the sun (Sun -> plants -> herbivore, energy for useful work lost at every conversion step), and in turn many of them follow a more r-selection strategy where they have lots of offspring with lower investment in each individual one, and huge populations of which significant numbers die young (from predation, accidents, starvation, disease, etc) but enough survive through quantity. Conversely this can actually make healthy adults more valuable then any single young one, since they represent a success that can and will breed many many more times.

In contrast big predators sink a lot more energy and time into each individual juvenile, and have far fewer of them. You'll notice that with many highly mobile herbivores juveniles come out and are ready to walk and begin moving with their parents/the herd in very short order without an extended period of total helplessness.

Herds do have to keep moving to find new food supplies, so staying in place indefinitely is not an option. They generally are much faster in a straight line then most predators too, so they can in fact outrun them (and in turn predators are forced to deploy tactics, go after ones with restricted mobility which takes more function to recognize, and so forth). These various pushes and pulls on selection have resulted in the successful strategies we see each species deploy. The emergent effects of life really is incredible as trite as it may sound to say it. Such incredible complexity driven by basics that are pretty straight forward.

<comment><USER3> That seems to make a lot of sense. Good write-up, thank you!

</comment></comment></comment></comment><comment><USER5> If anyone else found that unsatisfying, here is a recent book that does a better job of telling the story of tracking animals:

[http://wheretheanimalsgo.com/baboons/](http://wheretheanimalsgo.com/baboons/)

[https://www.amazon.co.uk/gp/product/1846148812](https://www.amazon.co.uk/gp/product/1846148812)

More generally when it comes to tracking animals...

What I want to see is facial recognition for animals, so that some one-way hash resolves to a name, so anyone who pointed their phone at a particular bird would reliably get the name determined by the facial recognition hash, so it could be consistently a 'Trevor' for instance. Of course 'Trevor' could be tagged in photos in this bold new future of 'facial recognition for birds' so it might be possible to find him in lots of different social media posts with different people and in different locations.

By default 'Trevor' would have a shadow Facebook profile complete with shadow profile links to his other half, mum and the rest of the flock.

More seriously, I do wonder at applications for this alt-coin circus that has come along and whether a large database of every living creature on the planet could be magically possible using these magic blockchain technologies.

So, very much tongue in cheek, when it comes to implementing 'facial recognition for birds, hamsters and many tens of thousands of species', how would the 'ICO' work out?

I am sure this could all be easily done and coded up by next Friday by a teenager if it was based on blockchain technologies with coins being mined by adding new animals to the distributed database photographically. To lure ICO bitcoin-bores in this magic database would be super fast because it would be modelled on DNA and therefore compact, albeit forked on a per-species basis so fish coins could be traded for apex primate coins but not necessarily vice- versa. All of this blockchain could solve the hard problem of digital rights management, so if 'Trevor' appeared in the back of one of your selfie pictures then the micro-payment for that would pay out with 'Trevor' getting his share of Instagram likes.

</comment><comment><USER6> You have to watch the SafariLive Channel on Youtube. They are live everyday and they dont shy away from the hunt. amazing stuff.

</comment><comment><USER7> I think, it would be much better if they provide visualization or even video.

</comment><comment><USER8> TL; DR:

> Though cheetahs and impalas were universally more athletic than lions and > zebras, both cheetahs and lions had a similar advantage over their prey — > they were 38 percent faster, 37 percent better at accelerating, 72 percent > better at decelerating and their muscles were 20 percent more powerful.

> [...] impalas and zebras were typically moving at only half their maximum > speed. [...] The model showed that impalas and zebras have the best chance > of making a getaway if they run at moderate speeds, because that leaves more > options for maneuvering away at the last second

<comment><USER9> > _Though cheetahs and impalas were universally more athletic than lions and > zebras_

Wait, what? Did they mean that _cheetahs and lions were more athletic than implalas and zebras_?

<comment><USER10> No, I think they mean they meant exactly what they wrote. Impalas are too fast for lions to hunt (normally). Single cheetahs are too small to take down a zebra (normally).

<comment><USER11> Impalas and zebras must be more athletic because they have to scape the cheetahs and lions 100% of the time. If you scape only 99% of the time you are dead.

Also, the predator is happy to catch any of the preys, they can pick a tired/old/sick/unlucky one. So if 99% of the prey scape, they are probably happy.

<comment><USER12> You don't need to be faster than the predator, you need to be faster than other members of the herd.

<comment><USER13> Reminds me of the Billy Connolly joke about the two camera men filming a lion. The lion sees the two camera men and proceeds to chase after them. One camera man stops and puts on a pair of running shoes. His colleague tells him "You will never outrun the lion in those". He replied, "I don't need to outrun the lion, I just need to outrun you!!".

</comment></comment></comment></comment></comment></comment><comment><USER9> Please use the orignal title.

</comment><comment><USER14> Thats how i play basketball, i do not go 100% all time as then defence can easy predict my motion, instead i go half speed and burst in speed when needed.</comment>


Does a free swap turn a stack into a traditional register set? (2005) - <AUTHOR> http://cr.yp.to/qhasm/20050210-fxch.txt <comment><USER2> "I suggest compiler writers stop viewing the x86 stack as a twisted version of a traditional 8-register set."

What if compiler writers will not fix the problem?

Write own register allocator: [http://cr.yp.to/qhasm.html](http://cr.yp.to/qhasm.html)

Bonus: allow use of a "portable assembly language" to generate assembly, being respectful of the fact that _users might not all be using computers with the same CPU architecture._

This could be like assembler with C-like operators and structure.

In addtion to facilitating portability it might also make writing in assembler a little easier.

Reminds me of Bell Labs' LIL: [http://www.ultimate.com/phil/lil/tut.html](http://www.ultimate.com/phil/lil/tut.html)

</comment><comment><USER3> So, what's the follow up a dozen years later? Do clang or gcc treat the floating point stack as a stack?

Is x86-64 completely different?

<comment><USER4> x86-64 replaced the stack with registers. So this article, while interesting, is not of much practical use anymore.</comment></comment>


Ask HN: Getting started with Mac for Linux users - <AUTHOR> What are some good resources for a Linux user (moderately advanced) switching to Mac?
Things I am looking for : keyboard shortcuts, package management, getting a Linux-like dev environment for open-source development, apps like Spectacle, some basic window management.
All the articles I've found so far are great for existing Mac users trying to pick up a new trick or two, but none well-organized enough for a newbie to follow as a step-by-step guide. <comment><USER2> I'm just not needed guide like this – all tools familiar to me, shortcuts almost same – just replace ctrl with command :)</comment>


Ask HN: What are some product management communities online? - <AUTHOR> I am a frontend developer/bootstrapping founder, and I am interested in learning about and becoming a Product Manager.
Where can I virtually hang out to learn more about Product Management?
If there is any PM reading this, I would love to be some sort of apprentice (as a volunteer - I just moved to the US and will get my work permit to work here in two months). <comment><USER2> Reddit & Slack have multiple, active PM communities. There's no one "master" source of information, so bookmark several of them. Pragmatic is probably the best known of several companies that offer training & certifications. I also have a directory of ~300 PM bookmarks on my personal page, organized by topic: bjpcjp.github.io/prodmgmt.

Finally: google "product camp" for events in your city.

</comment><comment><USER3> start here, kinda high level but their are building a community around it => [https://www.producthunt.com/@villaumbrosia/made](https://www.producthunt.com/@villaumbrosia/made)</comment>


Ask HN: How many emails do you receive per day? - <AUTHOR> On average, how many emails (either directly, via CC, system alert, etc.) do you receive at work per day? <comment><USER2> 1-3 direct emails requiring reading comprehension and reply.

5 or so calendar invites.

200-500 automated updates from issue tracker, CI system, et al. Auto-filed and processed in batches when time avails. A few dozen will include comments, which can be treated as regular emails in that they require reading and typically response. The rest get skimmed over or need a click or two to move through workflow.

A dozen or so error report emails. Most reflecting iTunes API timeouts. Perhaps 1-3 genuine error cases.

2 dozen support requests from customers (BCC). Skimmed just to keep an eye out for recurring bugs and UX issues. Typically 1-2 of these per week have to be rescued from the spam filter.

1-2 dozen sample transactional emails from staging environment. Auto filed in case needed for future reference; otherwise ignored.

3-10 (depending on day of week) automated updates with metrics from SaaS vendors. Glanced at in passing during morning inbox clear-out.

3-5 marketing emails from own company. Auto-filed and ignored.

0-2 spams from recruiters (either side of the table). Typically skimmed and deleted.

4 daily newsletters my boss signed up for with the engineering team's group distribution list even though they're not relevant to anyone else and he won't let us unsubscribe from them. (Desktop mail client has long since been trained to recognize these as spam.)

0 true spam messages except about once a year when someone comes up with a successful new attack against Google's filters and it goes up to a half dozen per day (most recently in late January 2018) for a week or two and then drops straight back to zero.

</comment><comment><USER3> 10,000 (mostly SPAM) delivery attempts per day, since I used to run an early UK ISP and was on the very first SPAMmer lists...

~100/d make it to my mail client, of which most are SPAM still.

Maybe between 10 and 30 real emails per day, ie 'ham'.

Rgds

Damon

</comment><comment><USER4> ~110</comment>


Menace: The Machine Educable Noughts And Crosses Engine - <AUTHOR> http://chalkdustmagazine.com/features/menace-machine-educable-noughts-crosses-engine/ <comment><USER2> As far as low-tech tic-tac-toe "AIs" go, this XKCD map is my favorite:

[https://xkcd.com/832/](https://xkcd.com/832/)

</comment><comment><USER3> I too built one of these in my youth (when I was 8 or so); I found it a pleasant inspiration and inspired me trying to do it for checkers (which, needless to say, had too many states, and failed). Are there other such mechanical examples of machine learning with which to inspire young people?

</comment><comment><USER4> I wonder if it's possible for two instances of Menace to get into a local optimum that is different from the global optimum strategy.</comment>


Azure Functions (Microsoft's Version of AWS Lambda) - <AUTHOR> https://azure.microsoft.com/en-us/documentation/articles/functions-create-first-azure-function/ <comment><USER2> Interesting! Can those return arbitrary data of whatever mime? What storage and authentication options are available?

</comment><comment><USER3> This looks to be node only. Does this do anything AWS lambda doesn't?</comment>


Covering the whole country with Google Fiber could cost $140 billion - <AUTHOR> http://bgr.com/2012/12/07/google-fiber-nationwide-build-out-estimate/

<comment><USER3> There wouldn't be a serious problem raising $140b from financial markets if doing gigabit-to-the-home were profitable. We basically did an equivalent level of build for CATV 1980-1995, and for cellular 1985-now (still upgrading and adding sites). The question is financial return and how long you can depreciate the asset.

I'm curious what the breakdown is between rural areas (where, presumably, construction costs per mile are far cheaper), suburban areas, and rural areas (where you can hit a lot of people per building, but costs to shut down a road are higher, and where there are few options for routing.)

It's depressing how hard it is to get 1Gbps into random buildings even in Silicon Valley. Technology has made 100M fairly feasible in most offices, at least (you can do channel-bonding on an old T1 circuit to get 100M, even without fiber!), for <$3k/mo. It's still hit or miss if you're on-network for municipal fiber (in PA), the alternative fiber providers (like IP Networks in SF), etc.

<comment><USER4> Given the actual average cost for bandwidth is less than a dime per gigabyte, working out to less than $50 per month per household, I'd say it's extremely profitable. [1]

The only reason no one is pursuing it is because the incumbent providers have lobbied tirelessly to create the notion that no one can afford to deploy new fiber, which is clearly false.

If we were to convince regulators to push hard on telcos and recover the rural broadband tax, we'd have probably nearly half a trillion dollars to pay for it. [2]

[1] [http://blogs.howstuffworks.com/2011/04/07/what-does-a- gigaby...](http://blogs.howstuffworks.com/2011/04/07/what-does-a-gigabyte-of- internet-service-really-cost-a-look-at-the-worst-case-scenario/)

[2] <http://www.newnetworks.com/BroadbandScandalIntro.htm>

</comment></comment><comment><USER5> What's the information value of this article? Hmm, it's "bad news for those of us who would love to see Google (GOOG) expand its fiber network out to the entire country".

Did Google ever mention they're shooting for 100% of the country in the near term? They did not. Are they likely to follow traditional ISP model and launch market by market? Yeah, from what we've seen that seems like a reasonable assumption. Is Google likely to borrow $140,000,000,000 to blanket the entire country? Past experience says probably not.

</comment><comment><USER6> Australia is in the midst of doing pretty much exactly this. Called the NBN. One of the main political parties who are in their second term started it, and hopefully they get a third term so they can finish it. The other Political Party has said that if they get in they will stop the rollout. It's been budgeted at approx $40 billion+ to do.

Hopefully it will complete as at the moment we dont have any data guarantee's for the last mile. In fact if you can get a dial tone on the 100 year old copper, thats good enough for the old telco(which was privatised about 10 - <USER2> years ago).

My opinion (and its different in australia due to our different views on private vs public investment, market size, country size, population etc) is that most large infrastructure just cant/wont be built by private investment, because it just isnt profitable. Diving into it I would say that most power plants, telecommunication, water infrastructure, roads etc are mostly funded by the government even if that is through tax breaks etc. So if the citizens want infrastructure the govt needs to pony up the cash.

It also hasnt been lost on a lot of people here, that we sold off our government owned telco 10-15 years ago, only to create a new one not to long after. Ahh The cycles of govt.

</comment><comment><USER7> And apparently the US taxpayers already paid for it once, and didn't get the fiber they were promised.

'The $200 Billion Rip-Off: Our broadband future was stolen':

[http://www.pbs.org/cringely/pulpit/2007/pulpit_20070810_0026...](http://www.pbs.org/cringely/pulpit/2007/pulpit_20070810_002683.html)

</comment><comment><USER8> I don't see how that's "cold water" - yes, covering the entire continental USA with _anything_ is very expensive. They don't have to buy the whole thing at once now, do they?

<comment><USER9> I don't think Google wants to build this at all. They just want to put some pressure on Comcast, TW and the likes to offer higher speeds and without any caps. Google wants to bypass Windows and go straight to the cloud, but one needs high speed internet.

Cable companies are deep in debt for a reason. I just don't see Google hiring 80,000 people are whatever it takes and hope it just works financially.

</comment></comment><comment><USER10> They'll need to make money in Kansas or something like that. Then they'll have more money to roll out and expand in other areas. It may take years, unless google sparked competition that others ISPs start to upgrade their fiber too.

<comment><USER11> Kansas City is (largely) in Missouri.

Additionally it's not clear that Google sees the KC experiment as anything other than an experiment. Money is not the only rubric by which Google Fiber's success should be measured.

Just having the data on what running Google Fiber took would be super useful and interesting (and in the event that it does fail, I hope that info makes it out into the wild).

</comment></comment><comment><USER12> I wonder if Goldman's estimate includes the cost of permits or not. One thing that bothers me about deploying fiber in the easiest city first is that it's not representative of the political environment in 90% of the US.

<comment><USER4> Given the response to Google's call for selection just from municipalities, I'd say the political environment is extremely favorable. Several cities have shown a willingness to rush through new ordinances to make it possible to issue permits quickly.

It's only the pressure from incumbent cable and telco operators that has held back municipal fiber deployment across most of the country. Once that pressure is pushed aside, cities are willing to move very quickly.

</comment></comment><comment><USER13> A paragraph for an article, really? Journalism is in a sad state...

</comment><comment><USER14> = 0.1 quantitative easements, and will provide 1000x more boost to the economy.. What are we waiting for?

</comment><comment><USER15> Well, that's almost exactly 1,000 usd per home. Spread that over three years, and I am _already_ paying that for Sky Tv (I really have to dump it)

Sounds like a win all round.

<http://quickfacts.census.gov/qfd/states/00000.html>

</comment><comment><USER16> Rome wasn't built in a day...

</comment><comment><USER17> BGR blogspam at it's worst.</comment>


Ask HN: Is there a simple analytics tool? - <AUTHOR>

<comment><USER2> I use analog for server log analysis.

I use my hosts file to black hole the web bugs that analytics servers serve.

</comment><comment><USER3> for what ?</comment>


A Hydrogen Bomb by any other name - <AUTHOR> http://www.newyorker.com/tech/elements/a-hydrogen-bomb-by-any-other-name <comment><USER2> It would have been nice if this article had some diagrams of the respective bomb designs. I was having trouble trying to piece together where components were and had to do a few Google Image searches to follow along.

<comment><USER3> [http://www.nuclearweaponarchive.org/](http://www.nuclearweaponarchive.org/) has quite a bit of detail, especially about fusion-boosted weapons and Tellar- Ulam weapons.

</comment></comment><comment><USER4> I have to wonder whether China is involved in any way here. Would they be able to use North Korea as a cover to test their weapons?

<comment><USER5> It seems suspicious when a D student aces a big test.

It would be outright ludicrous for China to imagine that they could use North Korea to test advanced weaponry without anyone tracing it back to them.

<comment><USER6> Besides China, there are other sources North Korea can have used to aquiver this technology. Both North Korea, Libya, Iran and China did get help developing nuclear technology from a network set up by Abdul Qadeer Khan, a Pakistani nuclear physicist often regarded as the fonder of the Pakistani nuclear enrichment program.

He again acquired the technology in Europe when working for Urenco, a nuclear fuel company.

The whole Q.A Khan affair is quit a fascinating story actually.

Some more information on [http://world.time.com/2011/07/07/a-q-khans- revelations-did-p...](http://world.time.com/2011/07/07/a-q-khans-revelations- did-pakistans-army-sell-nukes-to-north-korea/) and [https://en.m.wikipedia.org/wiki/Abdul_Qadeer_Khan](https://en.m.wikipedia.org/wiki/Abdul_Qadeer_Khan)

I did also see a very good documentary about this, but I can not find it online right now.

Edit: Here is the BBC documentary about Khans dealings in nuclear secrets: [http://www.unewstv.com/6821/bbc-documentary-on-dr-abdul- qade...](http://www.unewstv.com/6821/bbc-documentary-on-dr-abdul-qadeer-khan- pakistan-nuclear-secrets) . Stranger then fiction, it has a plot like a top thriller movie.

<comment><USER7> I wouldn't be surprised if the nuclear physicist in The Dictator was based on Khan. He sounds like he's proud of his work and I admire that, moral judgements on nuclear weapons aside.

</comment></comment></comment></comment><comment><USER8> Interesting how one can write an article about thermonuclear bombs and calls them hydrogen bombs all along.

<comment><USER9> You can't really complain when a article in the non-specialist press uses popular rather than specialist terminology. "Hydrogen bomb" is a term that's been bandied about for about as long as nuclear bombs have existed and the article properly points out that there isn't actually any clear definition of the term so I don't think we have anything to complain about.

<comment> rm_-rf_slash The New Yorker has many luxuries, but not that which lets them be ignorant. There's an old saying about the New Yorker's fact checking, that if they were to do a story about the Empire State Building, the first thing they would do is dispatch someone to see if it were still standing.

All it takes is just enough ignorant simplicity and a dash of sensationalism to go from New Yorker to New York Post.

<comment><USER10> There's nothing ignorant about using the term "hydrogen bomb." It's a perfectly acceptable and relatively common term used to describe what they're using it to describe.

The only thing that's ignorant here is commenters insisting that "hydrogen bomb" is somehow wrong.

<comment> rm_-rf_slash I understand that, I merely intended to demonstrate that ignorant simplicity is not a preferred quality of the New Yorker among its readers.

<comment><USER10> Why is that a point worth making in reply to a comment that is merely defending simplicity, not ignorant simplicity?

<comment> rm_-rf_slash To separate the criticisms regarding simplicity generally and the nomenclature specifically. I was downvoted for what I said and I need imaginary internet points to feel like my life has meaning.

<comment><USER11> From what I can tell, you were downvoted because you either didn't read and understand the article, or you didn't understand the context in which it was written.

1\. N. Korea claims it has a "Hydrogen Bomb".

2\. The U.S. and others respond skeptically.

3\. The New Yorker points out that the U.S. has made this response before (earlier in the cold war) and that the term itself has some ambiguity because of the different types of weapons that could have a fusion based element. Readers learn more about cold war history and the differences in different types of atomic weapons.

4\. You make a snide comment that doesn't seem to register the entire context of all this, and get downvoted.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER12> No mention of Tsar bomba in the article about history of nuclear bombs?

[https://en.m.wikipedia.org/wiki/Tsar_Bomba](https://en.m.wikipedia.org/wiki/Tsar_Bomba)

<comment><AUTHOR> There was no argument about nomenclature by then - at that point the Soviets were well understood to have Teller-Ulam style devices (as the article says, the Soviets built their first one in '55).

</comment></comment><comment><USER13> Who the hell cares if it is just a "regular" a-bomb instead of an h-bomb.

Can you imagine if it was Iran with "just" a regular a-bomb?

Millions of people in North Korea are starving, eating bark off trees and are horribly repressed. Their nutrition is so bad their children grow far shorter than than their southern counterparts.

It's one of the worst abuses of a human population in the world that is completely documented - yet the world shrugs and says "what can we do?"

Imagine if they had oil and how fast we'd invade before they even had their first scientist write the first formulas for nuclear power.

Imagine if they were next to Israel, how fast we'd sell them the jets and bombs to take out the reactors while they were being built.

But nope, we don't give a damn.

<comment><USER14> > Imagine if they had oil and how fast we'd invade before they even had their > first scientist write the first formulas for nuclear power.

> Imagine if they were next to Israel, how fast we'd sell them the jets and > bombs to take out the reactors while they were being built.

> But nope, we don't give a damn.

This is not even remotely true. The reason nobody invades North Korea is because the DPRK holds millions of people hostage. I'm not just talking about their own citizens. Any invasion of North Korea would certainly result in the artillery bombardment of Seoul. It would likely also result in a nuclear exchange. The death toll would be higher than any conflict since WWII.

The US definitely gives a damn. It gives food to North Korea and military aid to South Korea. I'm sure US officials would love for the Kim regime to fall, but there's simply no way to make that happen without risking millions of innocent lives.

<comment><USER10> Also, North Korea is under the protection of China. Partly because they're allies (sorta), and partly because China just doesn't want people messing around near it. One might recall the _last_ time we tried to take over North Korea. Once we got close enough to the Chinese border to make them uncomfortable, a million or so Chinese troops poured over and made life somewhat difficult for the US and their allies.

And that was 1950s China, fresh out of a massive civil war and struggling to get by. 2016 China is far more powerful.

If you want to complain about how nobody does anything about North Korea, look at who's protecting them to see why that is.

<comment><USER15> China likely also doesn't want the resulting 25 million refugees heading in their direction.</comment></comment></comment></comment>


Tech Toys That Can Make the Video Screen Passé - <AUTHOR> http://www.nytimes.com/2014/11/27/business/tech-toys-that-can-make-the-video-screen-passe.html

<comment><USER2> nowadays i go to toys-r-us. there are general lack of thinking of how kids perceive and interact with toys. my two years old son really like turning knob. I have midi panel at home and thinking to transform it into play toy where he can tap and turn to create some generative contents

</comment><comment><USER3> [https://backyardbrains.com](https://backyardbrains.com)</comment>


Shopify Merchants Can Now Accept Bitcoin - <AUTHOR> http://www.shopify.com/blog/10446157-shopify-merchants-can-now-accept-bitcoin <comment><USER2> Very exciting.

I think they could further enhance merchant adoption by rewriting with an even more laser beam focus on the "benfits" vs. the "features"

Eg eliminate the top paragraph entirely and rework their current bullets to something as simple as:

\- - - -

Start accepting Bitcoin today and you'll:

a) Get paid your full retail price in your local currency (or in Bitcoins if you prefer) settled daily.

b) Pay less than half the fees of a normal credit card transaction (about 1%).

c) Never receive another charge back.

Click here to add Bitcoin to your store right now.

\- - - -

The wording isn't perfect ( particularly bullet (a) ) but you get the point.

The "positioning" of Bitcoin as a currency is hard to understand for most merchants and ALWAYS leads to questions about volatility etc.

So in the spirit of "Don't make me think" anybody building Bitcoin as a service startups should work hard on messaging.

</comment><comment><USER3> Shopify rules. It seems like every week, they roll out another cool new feature. Shopify Payments and POS got a lot of attention here, but another excellent recent feature is gift cards! Gift cards are SO nice to be able to sell during the holidays.

I also have a fraud-screening app that is tightly integrated with Shopify: [https://www.merchantprotector.net/](https://www.merchantprotector.net/)

<comment><USER4> I looked at it, but gave up after I couldn't find pricing information. I don't want to sign up for a free trial before I know the pricing breakdown.

<comment><USER3> Totally understandable - pricing is not 100% certain yet, so I'm not really featuring it. I'll make a note to add it more prominently once I make up my mind a bit better!

</comment></comment></comment><comment><USER5> > You can choose to receive your payments in Bitcoins (paid into your Bitcoin > wallet) or paid in your local currency directly into your bank account every > business day.

If you choose to receive local currency, what rate do you receive? Are you guaranteed a rate? Does it fluctuate daily (and as a result, can you quote prices so that they change daily as well?) and do you know the rate in advance?

<comment><USER6> [https://bitpay.com/bitcoin-exchange-rates](https://bitpay.com/bitcoin- exchange-rates)

<comment><USER5> Yes, they note that they use bitpay on the website:

> Our new Bitcoin integration is available through BitPay and can be used > alongside other payment services, like Shopify Payments and PayPal.

But they don't mention whether there are any service fees added by Shopify

<comment><USER7> We treat Bitpay transactions the same as any other in terms of fees/pricing. There's a 1% or 2% transaction fee on plans with lower monthly fees, but those are waived if you use Shopify Payments for credit card acceptance (even on Bitpay transactions).

A better breakdown can be found here: [http://www.shopify.com/pricing](http://www.shopify.com/pricing)

<comment><USER5> That would be something useful to note on the website

</comment></comment></comment></comment></comment><comment><USER8> We were looking at adding Bitcoin to our startup but worried about the volatility. What if all our customers paid in Bitcoin and it crashed?

The reverse is also true - we might gain upside if the price continues to Skyrocket - but how do you protect yourself from this?

<comment><USER9> Bitpay immediately converts your Bitcoin payments to USD. Customers pay with BTC, but you receive USD.

<comment><USER10> Well, assuming Bitpay can afford to meet the USD payments. Behind the scenes they can't actually convert Bitcoin to USD instantly, so they're basically eating any change in the Bitcoin-USD rate between the transaction happening and them cashing out. If there's a big enough crash or they receive so many payments that the market cannot absorb the Bitcoin sales, they could easily find themselves unable to meet their obligations. (Things actually looked a bit hairy when BFL used them for payments just because of the sheer amount of Bitcoin they had to convert in a short period.)

<comment><USER11> > Behind the scenes they can't actually convert Bitcoin to USD instantly

What if they have an agreement with one or more exchanges, and complete the transaction by satisfying the current highest bids?

</comment></comment></comment></comment><comment><USER12> So if someone is running conversion tracking at checkout for analytics etc... what currency gets reported? The post says:

"You can choose to receive your payments in Bitcoins (paid into your Bitcoin wallet) or paid in your local currency directly into your bank account every business day."

If your shop currency is set to GBP but someone pays in BTC, what gets populated if using {{ shop.currency }} and {{ total_price }} for example?

<comment><USER13> I believe the interface to bitpay works with USD, so you will see USD here whether or not you keep the bitpay funds in BTC or autoconvert to USD.

</comment></comment><comment><USER14> This is very interesting. Half of my customers are international and accepting Bitcoin might increase that number.

Definitely going to check this out.

</comment><comment><USER15> Pretty cool but I wish either that they had integrated with coinbase instead of bitpay, or that bitpay would hurry up and approve or deny my 3 week old application.

</comment><comment><USER16> Awesome now people can spend their bitcoin!!!! Good luck finding that kind of people.

</comment><comment><USER17> It took over 3 years for Shopify to develop gift cards...and how long for Bitcoin?

</comment><comment><USER18> Is there a way to do recurring payments with Bitcoin yet?

<comment><USER19> You can set up recurring payments on Coinbase.</comment></comment>


You Can Now Go to College for Free in Germany, No Matter Where You're From - <AUTHOR> http://www.businessinsider.com/germany-free-college-2014-10

<comment><USER2> Interesting, but the headline is inaccurate. There's no such thing as 'free college' (or any free good or service, really). Better would be:

"German taxpayers will cover your college bill, no matter where you're from."

<comment><USER3> Headline is correct. Definition of "for free" according to MW: "at no charge".

Examples given are:

* They're giving out free tickets to the show.

* The school newsletter is free.

Neither of those examples support the idea, that services or goods cannot be free. I have the feeling that trying to limit the meaning of "free" is heavily tied to a specific political agenda.

<comment><USER2> > I have the feeling that trying to limit the meaning of "free" is heavily > tied to a specific political agenda.

As is describing taxpayer-funded education as 'free'.</comment></comment></comment>


Spooky Fizz Buzz - <AUTHOR> http://quaxio.com/spooky_fizz_buzz <comment><AUTHOR> If you are wondering what this is, it's a fizz buzz where the code simply prints incrementing numbers and _something_ is taking care of rendering fizz and buzz. I won't spoil the what is the _something_ , but you should be able to figure it out.</comment>


Machine Learning Scale 2017 recap - <AUTHOR> https://code.facebook.com/posts/1692857177682119/machine-learning-scale-2017-recap/ <comment><USER2> >Detecting place visits at scale: Jan and Danielle offer a deep dive into a system capable of interpreting location signals coming from mobile devices at scale.

It's weird to see people proud of things that so seriously bother other people. Tracking everyone they can 24/7 is seriously creepy.

<comment><USER3> It's almost as if different people have different views and value systems and HN is a bubble... Nah, that can't be it...

<comment><USER4> It's not just this site.

</comment></comment></comment><comment><USER5> Hey, doesn't "detecting place visit at scale" answer some of the comment question seen previously on HN? I remember someone saying they visited a bar and talked to someone and that someone was "recommended friend". And this video talks about asynchronous detection of your location. It detects you're both in the same bar for a period of time and that somehow contributes to you being recommended as friends? I might be chaining too many "if" and "maybe" here though. But the video is talking about this stuff at around 31 mins.

Edit: 14 mins in or 31 mins remaining, sorry.

</comment><comment><USER6> This facebook engineer is using words like "Human Impact" and "Democratization" like facebook is an integral part of human life globally, crucial to their survival. I would tell this guy to sit the hell down you work on a boring social network that mostly old people use to perpetuate their ignoramist memes.

Next the engineer from internet explorer on topic how IE is saving the world.

<comment><USER7> Facebook is an integral part of human life globally whether you like it or not.

<comment><USER8> I don't agree. I live in the world biggest facebook user city, but I find that facebook is all of their life. If VR technology was settled before, I couldn't imagine how they live.

Oh, I have moved out of that city to a peaceful city for about 3 years now.

<comment><USER7> I don't understand how your comment is disagreeing.

<comment><USER8> Ha! Sorry, you don't get my joke. It's not "part" but "all"!</comment></comment></comment></comment></comment>


Ask HN: Best piece of advice you have ever received from a book or person? - <AUTHOR> <comment><USER2> "Make it look like something you did, not something that just happened." \- My father talking about lining up wallpaper seamlessly.

"It's only as awkward as you make it." \- My good friend talking about possible awkward scenarios involving the opposite sex.

</comment><comment><USER3> I'm not sure where I heard/read it but I try to live by it everyday.

"Those who resent success will never achieve it."

</comment><comment><USER4> Not sure it's the best I ever received, but it's the one that comes to mind. From my dad: "When asking someone out, don't ask 'what are you doing this weekend?' It's none of your business what they're doing. Ask 'can I take you to dinner this weekend?'"

She was _looking_ for an excuse to say no. Thanks to my dad's advice, I didn't give her one. So she let me take her out. That led to the next 30 years...

Thanks, dad.

(For those who are really soured on marriage: No, that wasn't sarcasm. I am genuinely thankful for the advice, and for where it led me.)

</comment><comment><USER5> My engineer neighbor picking weeds in his yard while sitting on a low beach chair, "I just work on the areas I can reach, then move to where there's more to be done". It took me a few years to understand how powerful that is as a strategy for completing big tasks.</comment>


Ask HN: Why don't I believe blockchain will change the world? - <AUTHOR> I've been watching all the buzz surrounding blockchain and cryptocurrencies over the last few months. I can't say that I understand all the technical details of blockchain (why POW, how/why miners, how a 51% attack works, etc).  But I think I'm a reasonably intelligent person and I have been reading about the merits and use cases.
The problem I have is that after reading and thinking about it, I'm mostly in agreement with this article: https://hackernoon.com/ten-years-in-nobody-has-come-up-with-a-use-case-for-blockchain-ee98c180100.  I think it's a neat idea and does have some use cases (especially for illicit transactions), but nothing like the hype that is surrounding it.
It seems that everywhere I'm looking, people are talking about how blockchain is going to change the world and people are starting ICO's left and right.  The problem is that most of the applications I see don't really seem like they need blockchain and have some built-in speculation component.  I feel like it's the current solution to a lack of effective business model.
I also have technical doubts.  Example a 51% attack - While this maybe hard with Bitcoin because of the network size and age, I don't know about the other currencies/tokens.  I'm also not clear how the coming wave of quantum computers will affect this technology.
But I keep seeing the articles coming - how blockchain is going to change everything - and my doubts are eating at me.  How can I be so blind? It seems like everyone sees this truth except me (and the the guy that wrote that article and Warren Buffet).
Can the HN community point me to some articles or explain it to me so I can see the light?  Does anyone else here have this problem? <comment><USER3> I would suggest you take a step back and think about PayPal. Do you think PayPal changed the world?

What PayPal did was reduce the "friction" of online transactions. Suddenly you no longer needed a merchant account at a bank to accept credit cards online. That was huge, right?

Similarly, a blockchain (Bitcoin's, as the premiere example) allows you to sidestep the credit card companies and banks entirely. This reduces the "friction" even more. Now, all you need is a string of alphanumeric characters, no account, no verifiable identity.

PayPal was a first step in the direction of reducing online transaction friction, blockchains are a second step.

<comment><USER4> who will mange the per use-case blockchains (the distributed ledger for a given use-case)? I like decentralization... more power-to-all...but the reality is eventually there will be power-brokers (for example, miners in bitcoins or exchanges like coinbase) who has deep pockets to manage and scale these blockchains.... there will always be ripples and ethereums built blockchains which mostly maintained by single player... but then how is it any different than now... what am I missing?

<comment><USER3> I think what you're missing is that the blockchains depend on network effects to function. They scale naturally with adoption, being decentralized. Facebook does not scale naturally with adoption, because it depends on its own private funds to purchase more servers and bandwidth to handle the scaling, whereas decentralized technologies do scale easily because each player pays for their own equipment.

So, no, they (blockchains) won't be "maintained by a single player". The code may be centrally maintained, but not the network, and it is the network that holds the value. The crowd is fickle, and bitcoin could turn to nothing tomorrow based on the whim of the crowd. Still, the internet has this same quality, and it's still going strong. It (the internet) is simply _too_ useful to be discarded. It remains to be seen if bitcoin is that useful as well.

<comment><USER4> When I buy/sell bitcoin on Coinbase, am I considered part of network? Yes the transaction will be part of the blockchain but I am not participating directly rather using proxy (in this case, coinbase for it). This is what I meant by powerbroker.

Second, to my scaling point, In order to be a part of a network one has to maintain a complete blockchain on local server/computer. This is something just not scalable in practice for 99% of people or the use-case... so regardless of the intent there will be an emergence of powerbrokers....

So using the internet analogy, yes internet is decentralized but who owns the backbone (att and few major players) will be the case for blockchain.

</comment></comment></comment></comment><comment><USER5> I view BTC/cryptocurrencies made possible by blockchain as the modern electronic alternative to gold and silver as a store of value. Free from (for the most part) manipulations from the Central Banks. I think the excitement (at least for me) was knowing that we now have a technology that can lead to honest money. Satoshi Nakamoto's initial inspiration for blockchain sprang from this idea after the banking crisis.

Also, I recommend Mike Maloney's series "The Hidden Secrets of Money" which I think does an excellent job of explaining the fractional reserve banking and possible currency crisis.

</comment><comment><USER6> Don't focus on the noise, %99 of the ICO's are scams. Same goes for a bunch of alt-coins. There is a difference between changing the world and improving the world. Bitcoin is already changing the world, anything else is just about enabling blockchain technology to decentralize responsibilities. Like enabling AI to reduce human effort. In other words, it is just another buzz word that attracts a lot of investors (at the moment).

Welcome to the tech world.

</comment><comment><USER7> It's staring you right in the face: blockchain is the perfect tool for speculation.

</comment><comment><USER8> I'm a blockchain skeptic, but I do think there are _some_ valid use cases. A great example was the Greek banking crisis a few years back. Bitcoin skyrocketed because with the banking system shut down, it became the most practical way to transfer money.

There are only a few limited cases when banking would be shut down and internet access would still be functioning and useful, so bitcoin may not be a good alternative very often, but at least until the collapse is complete, it will probably be a valuable asset. :)

Bitcoin is in fact among the worst of them when it comes to practicality. Litecoin's fast blocks are much better.

For the most part, though, I think you're right that bitcoin/blockchain is massively overhyped and not useful outside of a small niche, and that its technical limitations and vulnerabilities are massively underplayed.

</comment><comment><USER9> I think there's a lot of noise in the ecosystem that masks a lot of the exciting stuff going on.

I heard about a blockchaim based system that trades energy credits/power via solar panels between neighbors. Maybe in most places a centralized system takes care of this, but surely there are areas where no one bothered to cover it. Imo that's pretty cool, and even in urban areas it's more efficient for the neighbors.

</comment><comment><USER10> A global currency is big. A global economy is big. For citizens of poor and cut-off countries - it's huge. Which is why I think the SV has largely missed it. ICOs are big with Eastern Europeans for the same reason hacking was (hint: it's not the criminality).

The 51% attack is largely a boogeyman. Cryptos have no intrinsic value - <USER2> the 51% attacker gets too blatant the underlying crypto is going to crash.

Sure, you can have an attacker that isn't super-greedy - it's okay. We put up with insignificant manipulations in our current financial systems already.

As for quantum computers (or the romantic version thereof), well, they're going to affect many many many many technologies. It'd be a nuclear event.

<comment><USER11> "For citizens of poor and cut-off countries - it's huge"

Can you explain this? How is a citizen of a poor country that doesn't have a personal computer, probably not even a smart phone, going to be able to do anything with a global currency like a cryptocurrency?

<comment><USER10> Citizens of poor countries, not necessarily very very poor people themselves[0]. Almost any country has a not-insignificant middle/upper-class that would love to compete on a level playing field with the world.

Which is most obvious with Internet entrepreneurs living in countries without good access to the US/West. Hence the Eastern European example.

[0] I do think you're underestimating smartphone ownership though

</comment></comment></comment><comment><USER12> I have an use case: Monero -> Currency for illegal activities where you can't be tracked.

From the perspective of a criminal, the only problem lies in the exchange side of the chain.

</comment><comment><USER13> Ripple's cryptocurrency XRP solves a real world problem and they have real world customers already using it. I'm not saying it's going to change the world in some grand sense but it's quite possible Ripple's XRP will speed up the time it takes for banks to settle balances. No more waiting 3-5 business days for cash to hit your account. The money would show up almost instantly (3-4 seconds) because XRP + bank adoption enables instant transfer of value.

</comment><comment><USER14> Cryptocurrencies are extremely slow, have high fees and are destructive to the environment. They also eliminate many consumer protections in place for both banking and investing, leading many to financial ruin and suicide.</comment>