Show HN: Meadow – Medical cannabis delivered to your door - <AUTHOR> https://getmeadow.com/ <comment><USER2> I was under the impression that delivery cannabis in California had to be done by a nonprofit. I remember reading a court case about this a few years ago.

(although a good business model may be to offer free cannabis delivery along with very expensive cheeseburger delivery)

<comment><USER3> Meadow appears to be yet another middleman service. If you take a look at the website, they are looking for "partners" who will do all of the actual work of holding and delivering the goods.

<comment><USER4> Hi, I'm Hua, one of the founders of Meadow.

We're building the tools for dispensaries to better manage their business and a platform that makes it easy for patients to order their medicine.

We only work with top-tier dispensaries that can deliver quality medicine and friendly service.

If you are a California medical cannabis patient, we would love to hear your feedback if you try out the service.

Thanks!

<comment><USER5> Take notes folks...the above response is subtly yet beautifully crafted.

Notice how he doesn't mention "Marijuana" anywhere. In the case where that word's use would be warranted, he uses "Cannabis" instead; a terminology more commonly used in scientific discussion of the substance.

Repeated use of "Medicine" in the description reinforces the idea that they are delivering a ~medical service~ to ~patients in need~. In fact he uses "medicine" in cases where "cannabis" or "marijuana" would be warranted. Limiting references to the actual substance, and increasing references to the intent of the substance is very powerful in shaping perception.

In the last bit, the use of the full qualification "California medical cannabis patient" gives you a higher perception of legitimacy or makes it seem more "established" than to the extent that it really is.

Choosing your messaging carefully has a huge impact on how people perceive what you do and this is one great example of that in effect.

Kudos!

<comment><USER6> While I agree with the point you're making, sort of, a large number of people do legitimately use marijuana for medicinal purposes, not just to get high.

<comment><USER5> Of course! I completely agree with you, but at the same time a large number of people also just like to get high, and there's nothing wrong with that either. In fact it's so incredibly easy to get a medical card that I'm sure a very large percentage of card holders just like to get high (again, nothing wrong with that, we should 100% legalize it imo).

Anyway, I'm just saying that when you start a service like this, it's effectively an uphill battle against public perception (for now) and I think these guys are doing public messaging the right way.

Even when you go to their website they say "cannabis based medicine" not "cannabis" or "cannabis products".

It's what they are signaling about their service and about the product through their delicate use of language that's interesting.

It's a stark contrast to real doctors who don names like "THE 420 DOCTOR" (I'm not making this up), or services that might choose names like "Speedweed".

<comment><USER7> Ditto for the actual product names. Selling a strain of cannabis with the name "Girl Scout Cookies" will do little to help earn the tolerance of anyone who might be on the fence about the legality of cannabis. I recognize getmeadow doesn't name the product, so they're limited in how they can effect this. It's something the category needs to address though.

<comment><USER8> Not to mention Green Crack and Alaskan Thunder Fuck.

Strain names are all behind closed doors where sellers aren't trying to convince anybody of anything.

<comment><USER9> This could well be a weak backdoor in the whole attempt to gain legitimacy, though, because .. after all .. if you're describing the effects of various strains in an interview of the patient, guiding them towards a preferred result .. aren't you practicing medicine in that regard? Are dispensaries allowed to do that? (I am truly ignorant.)

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> There are lots of dispensary that deliver. For example, you can find them by checking the Delivery search filter on [https://weedmaps.com](https://weedmaps.com).

Not sure what the value add is here.

</comment><comment><USER11> A few questions spring to mind:

The interface is obviously image-heavy, do you perhaps plan to offer photography services to your partners (a la AirBNB in the early days)?

Also, pricing/availability can vary significantly from week to week and dispensary to dispensary, in addition to the cycle of daily promotions many clubs employ, and other broader discounts (like those offered to patients with terminal illnesses, for instance). I'd be interested to hear how you're approaching the challenge of keeping all of that information up to date in a way that's relatively frictionless for your partners.

There are some weird complaints elsewhere in the thread, but I generally like the design. Good luck, I hope this goes well for you.

<comment><USER4> Hi Sahara,

Patients need to know the quality of the medicine that they are receiving so we really wanted to focus on the photography of the products.

You raise a great point on promotions and one that we are well aware of. Each dispensary is different on how they engage with their patients. We'll do our best to onboard our partners thoughtfully and build the tools that help them run their business.

Thanks!

</comment></comment><comment><USER12> I am mostly surprised that we have an "uber for XYZ" cropping up, as opposed to a general-purpose delivery service winning out, like postmates.

this makes me think - perhaps most of the value in the delivery service is the catalog of specific goods you want, and less so how they will actually get it to you. for example - sure postmates could deliver medical marijuana, but perhaps not the exact strain you prefer to treat your affliction.

interesting too - the delivery will probably just get easier over time, particularly if we ever figure out the rules for commercial drones. so focus on catalogs of stuff people really want (catalogs that don't already exist).

<comment><USER13> Postmates is a great delivery service, but at least in Seattle they cannot handle certain types of special deliveries, such as the delivery of alcohol or tobacco. It was explained to me as a licensing issue. For similar reasons I doubt they'd be willing or able to handle cannabis at the moment.

I could imagine this changing in the future. I heard that Postmates can deliver alcohol in California; and Amazon Fresh can deliver alcohol today in Seattle. But I suspect there would be many barriers to overcome for cannabis delivery (assuming it can be done lawfully at all).

</comment></comment><comment><USER4> Hey Everyone,

I'm Hua, one of the founders of Meadow.

If you happen to use our service, we would appreciate your feedback. We want to build a product that you love.

Feel free to reach out anytime at hua at getmeadow dot com.

Thank you :)

<comment><USER14> How do you verify the prescriptions of your potential clients?

<comment><USER15> I don't live in California, but AFAIK prescriptions aren't per order. You get a medical card via a doctor's recommendation, and then present that card to become a member of a medicinal "club" (which probably requires validation with the state that you are properly licensed). If I understand correctly, Meadow then interfaces with these clubs to provide expedited delivery to their members. Essentially, the hard verification work has already been done since only members (with medical cards) can order from the clubs Meadow delivers for.

<comment><USER16> As of a couple years ago (the last time I was there), you can actually call the club and have them verify you at the time of delivery (eg, you show your recommendation when the driver arrives, before any transaction is made).

</comment></comment></comment></comment><comment><USER17> Hi Hua,

I had a very similar idea to what you guys are currently doing. One question, how are you going to make sure the inventory count is accurate for all the dispensaries you partner with? (AFAIK, a lot of dispensaries use different POS systems)

</comment><comment><USER18> I'm curious why you went with the purple color scheme and that particular logo. The branding doesn't really come across as anything medical marijuana related but perhaps this is something you were going for.

<comment><USER19> To me it feels like they were deliberately trying to avoid using shades of green, and at least in RGB colourspace, purple/magenta (FF00FF) is basically the opposite of green (00FF00).

</comment></comment><comment><USER20> Reminds me of [http://www.prestoweed.com](http://www.prestoweed.com) \- seems like a hot industry right now!

<comment><USER21> [http://trycanary.co/](http://trycanary.co/)

[http://www.potspace.io/](http://www.potspace.io/)

[http://bakerclub.co/](http://bakerclub.co/)

<comment><USER22> [http://leafly.com](http://leafly.com) [http://weedmaps.com](http://weedmaps.com)

</comment></comment></comment><comment><USER23> In WA weed cannot be delivered, medical or otherwise.

Only licensed producers or processors can transport. On end-users under the legal limit (28g)

<comment><USER24> Well, as a WA resident, I promise you, nobody follows those rules. There are MMJ delivery companies everywhere; some even deliver recreational pot.

EDIT: recreational _

<comment><USER21> The recreational deliveries are not long for this world, unlicensed, untracked, breaking all the i502 rules. Just dealers with balls to freely advertise.

<comment><USER25> Not too different from medical pot dealers. All pot is for recreational use. The medical thing is just easing the subject into politics and law.

</comment></comment></comment></comment><comment><USER26> Similar to [https://www.eazeup.com/](https://www.eazeup.com/)

</comment><comment><USER27> I don't smoke for any reason, but great name for this.

<comment><USER4> Thanks!

We really want to bring people together and believe that Meadow embodies that.

</comment></comment><comment><USER28> sigh. we don't have anything like this in vancouver, BC. supposedly the chest thumping and shouting BC BUD now seems embarassing.

<comment><USER21> You guys have MMPR though, online ordering, credit card payment, overnight shipping. Would take that any day over dealing with cash and a delivery guy coming to my house.

<comment><USER28> this is news to me.

<comment><USER21> [http://www.leafly.com/knowledge-center/canada/the-mmpr- and-y...](http://www.leafly.com/knowledge-center/canada/the-mmpr-and-you)

<comment><USER28> yeah but unfortunately you can't get one for insomnia or just stress.</comment></comment></comment></comment></comment>


DRBD - block device which is designed to build high availability clusters - <AUTHOR> http://www.drbd.org/ <comment><USER2> I used DRBD to build a replicated PostgreSQL setup a couple of years ago: <http://people.reed.edu/~lennon/scaling.html>

It worked pretty well, but the write speed was probably about 1/4 to 1/5 that of a local database. We've sense moved to log-shipping as a replication model.

We do still use DRBD for some replicated NFS shares, and it's proven to be pretty trouble-free. (Knock on wood.)

</comment><comment><USER3> What is the advantage of "network raid-1" over raid-1? It seems to me that block replication is best left below the OS.

<comment><USER4> Some people don't want to pay for dual-controller hardware RAID, so DRBD is the software equivalent.

<comment><USER2> The description of DRBD as software RAID is a bit misleading, since in most deployment scenarios, only the "primary" node of the pair can actually write data to the replicated volume.

It's real use is in building high-availability services -- since the "mirrored" disks aren't in the same box, you can have an up-to-the-second copy of the data there. The two systems don't even have to be in the rack next to each other, which is a tough trick to pull off with normal hardware RAID.

As I said in my other comment, though, it is a lot slower than native disk writes.</comment></comment></comment>


The Myth of Multitasking - <AUTHOR> http://www.thenewatlantis.com/publications/the-myth-of-multitasking

<comment><USER2> When people say "multitasking," I think they really mean "heavy context switching." It's important to re-frame the idea because actual multitasking is /extraordinarily/ difficult. It takes years or decades to master multitasking in even one, very specific arena (e.g. playing the drum set, or understanding two conversations simultaneously).

Heavy context switching, on the other had, is more readily doable by human beings, but still highly inefficient. It would be much better if people focused on prioritizing work more effectively, and then proceeded in a serial manner. Of course, prioritizing work is not easy, especially in complex systems, but the time freed up from constant context switching would help.

</comment><comment><USER3> I do my work in the "interstices of [my] mind-wandering." That quote (see <http://tinyurl.com/454tao>) is going to stick with me for a while.

</comment><comment><USER4> Context switching has a cost.

Mood also has a cost. Task-switching may improve your mood by either switching to something non-work related every half-hour for five minutes, or just by easing the feeling of droning away into bog details.

If you really don't want to task-switch into nonwork, a long-term planning/short-term work task-switch may improve mood and productiviy.

(Full disclaimer: I am bipolar. The kind you medicate. Sometimes work brings a heavier toil because I'm depressed; sometimes I won't be able to concentrate because hypomania (enough that I take Ritalin, which calms me down))

</comment><comment><USER5> It's true, at least partly. I know from personal experience that trying to do too much at once can lead to nothing getting done at all.

Then again, there is evidence that focusing too hard can be just a strong a cause of brain blocks and burnout. Many famous discoveries were created when the discoverer wasn't thinking about the problem at all. (Eg. Elias Howe and the sewing machine)

I think that one needs to find a balance between focus and distraction and between single tasking and multitasking, preferably in favor of focus.

</comment><comment><USER6> This article, via HN, sans irony?</comment>


Fuck Off Google - <AUTHOR> https://fuckoffgoogle.de/ <comment><USER2> Companies like google are indeed out of control and creating a dystopian future. Amongst other things, Google has already unleashed bots that arbitrarily destroy livelihoods (e.g. automated account terminations, in markets where there are few, if any alternatives to Google). I have found that dealing with companies like Google is eerily similar to dealing with an authoritarian government (e.g. they don't care about normal individuals), and as such companies gain more control over society (and governments) it actually becomes a major political issue, perhaps the political issue of our time. At the beginning of the Internet age, I felt that tech could provide the path to liberation, but now I fear that it also provides a potential path to supression.

</comment><comment><USER3> It's quite interesting to see the evolution of Google reputation in the past years.

Maybe I was in a different context being a student, but 5 to 10 years ago Google had a really good reputation, they just released Android, Chromium, Golang a few of their papers triggered important tech improvement (Map Reduce, "Big Data"), and they had the reputation of being a very nice place to work with 20% of your time allocated to side projects. They did a "little" tax evasion but just like anybody else, and maybe a few questions were asked by a minority over privacy concerns. But overall things, at least from the outside, looked really good.

But starting with Prism/NSA scandal, all this has become gradaully irrelevant. Google has become just another company, with a frightening dark side because of its scale and amount of data collected. And this loss of good will and reputation is not finished yet.

<comment><USER4> Agree with how quickly they lost their reputation, but FYI: they didn't do any tax evasion that we know of because tax evasion is illegal. Companies minimizing tax burdens through legal means is called "tax avoidance".

</comment></comment><comment><USER5> Ironically, this website is generated with Hugo[1], a static site generator built with Go, a language created by Google. Jokes aside, it's good that they bring up this issue that affects their local community.

[1][https://gohugo.io](https://gohugo.io)

<comment><USER6> Google created go? or many people who worked at google and other companies? I'd be interested to know if google primarily implemented go. They did create chromium though

<comment><USER7> Yes. It's a Google project. There are a lot of contributors outside of Google, but it was invented at Google, and governance is by a Google team, and the top contributors are Google employees.

<comment><USER6> Do you have proof that all the top contributors work at google?

<comment><USER7> [https://www.openhub.net/p/go/contributors](https://www.openhub.net/p/go/contributors)

</comment></comment></comment></comment></comment><comment><USER8> That's gonna be a no from me dawg

<comment><USER9> Same. The images on a few of the pages look like classic conspiracy theory style images. How do you even describe that style? Mashed together and annotated with lines connecting other things. [https://fuckoffgoogle.de/no- tax-no-law/](https://fuckoffgoogle.de/no-tax-no-law/)

<comment><USER10> With apologies for linking to TV Tropes: [https://tvtropes.org/pmwiki/pmwiki.php/Main/StringTheory](https://tvtropes.org/pmwiki/pmwiki.php/Main/StringTheory)

</comment></comment></comment><comment><USER11> This is one of the most cyberpunk things ever

<comment><USER12> On one of the graphics they label [https://en.m.wikipedia.org/wiki/Calico_(company)](https://en.m.wikipedia.org/wiki/Calico_\(company\)) with "transhumanism = inhumanism". I'd expect most cyberpunk ideas to go the other way.

But yeah, otherwise it's pretty much anti-corp.

</comment></comment><comment><USER13> It doesn't help with the tracking but you can sometimes get away with randomizing input to google's captcha which makes it less valuable to them.

<comment><USER12> If you look at the video about Google image labeler game, they list a few abuse protections. A single answer is never going to end up as a real data point, especially if you can get lots of them from different sources to validate.

</comment></comment><comment><USER6> Founder of hcaptcha.com here. We intend to give the websites control of the data we collect, not us. I wonder why google doesn't make the same pledge for recaptcha and analytics. We are trying our best to stick to DNT style operations but with the DNT standard in flux, we had to draw our own line. Learn more on our website.

<comment><USER14> Google is an advertising company first and foremost, hence collaborating with other adtech giants to ignore Do Not Track after Microsoft decided it should be enabled by default.

<comment><USER15> DNT could have so easily been a protocol, instead its a sign that implores "Please don't feed the ducks"

</comment></comment></comment><comment><USER16> am I the only one who can't access the website? I get a "Your connection is not private" NET::ERR_CERT_AUTHORITY_INVALID

</comment><comment><USER17> A little over the top... I mean Google is bordering on Evil but this is definitely over the edge.

<comment><USER18> 1st world problem if your biggest enemy is a search engine ;).

</comment></comment><comment><USER19> Props to anyone sticking it to Google, but this site has too many conspiracy- sounding things:

>Transhumanism is a quasi-religious belief that technology is the only way to "save" humanity. A small Transhumanist elite from the Silicon Valley believes Earth's resources should be invested to merge humans and machines (Elon Musk's Neuralink builds chips to inplant in our skulls) or go to Mars. Google, through its sister-company Calico, is now one of the first funders of transhumanism.

</comment><comment><USER20> Evil In Disguise [https://www.youtube.com/watch?v=dSrPeX3mvzU](https://www.youtube.com/watch?v=dSrPeX3mvzU)</comment>


Crokage: A New Way to Search Stack Overflow - <AUTHOR> https://stackoverflow.blog/2019/08/14/crokage-a-new-way-to-search-stack-overflow/ <comment> w-m Around 2013 it was bothering me that the process of typing my question into Google, then clicking on the first result, then scrolling down to the most useful answer took so much time and interaction, to get simple answers of things I just couldn't remember. Let's say I forgot how to concatenate a list of strings in Python and wanted to find out.

So I built [http://www.stacksnippet.com/](http://www.stacksnippet.com/) back then, leveraging Google search results which work well for natural queries and retrieving the StackOverflow answers. The actual answers are listed directly on the search page in a compact format.

After dogfooding this for a while I found that it really is just not that useful. The questions that I had that could be answered in one-liners came in bursts, but the format wasn't great for answering all queries I had.

Not figuring out a good direction where to go with this I abandoned it quickly after building, but it's nice that it's still working, 5 years later (albeit without https).

<comment><USER2> Glad to see this at least orders by votes.

One of the problems StackOverflow is facing due to its age is that what was (correctly) accepted as the best answer 5 years ago isn't always the best answer today. For some questions, the better answer has more upvotes, and this reflects that.

I kind of wish StackOverflow had something like "Order by most votes in the past year" or "Order by most recent 50% of votes" or something, as it would probably be more accurate, but I get that it's complex both technically and from a UX perspective.

<comment><USER3> I wish stackoverflow would come up with a way to make an expert's votes count more. It already has a system for a vote's value to go from 0 (you can't) to 1. I want each of Jon Skeet's votes to be worth more (or more depending on knowledge domain like C#?). Maybe the top limit is a 4x multiplier?

I would like the same for hacker news e.g. if patio11 adds the 1000th comment in a thread, I want to see it. Perhaps even individually ranked: opt in to get a clintside ordering of a discussion that uses my own up and down votes to help re-rank the comments.

Stackoverflow is frustrating because experts get much the same influence as ignorants. I am forced to read every answer and comment to find the information gold (the ranking helps, but it doesn't help enough). Best answers almost invariably are written badly and don't cover corner cases (possibly it is because I usually have to find JavaScript answers, or because JavaScript is hard to write well).

</comment></comment></comment><comment><USER4> I can't ever think of a time I opened up SO to figure out the correct algorithm to use for a specific problem, for me the use case 90% of the time is "This library/module/system does not work like it supposed to and now some other abstraction is leaking"

If you could automate a way to understand and resolve all the bizarre bugs and leaky abstractions in the world of tech now that would be a service!

</comment><comment><USER5> The initial results for my search queries look pretty good. Looking forward to having StackOverflow integrate this into their API.

Would be a great workflow to explore for our app: [https://www.cacher.io](https://www.cacher.io)

<comment><USER6> Indeed there might be an interesting synergy on both concepts, Crokage and Cacher! Did you ever think about creating a collaborative space for sharing snippets and their short explanations? Or maybe a repository of well- documented snippets, where a search mechanism such as Crokage would be applicable?

</comment></comment><comment><USER7> This is going to be a great step in the right direction for early devs on stackoverflow. I really hope this cuts down on the duplicate questions which is both good for the askers and the rest of us.

<comment><USER8> Great suggestion! More features will be added in the later version for sure.

</comment></comment><comment><USER9> > This is beta version. For now, we only provide solutions for Java.</comment>


Ask HN: Which FAANG will eventually buy which? - <AUTHOR> <comment><USER2> The only potential option I see would be for Facebook to purchase Netflix, though I would I would suspect that if Netflix were to be purchased, it would be by Microsoft not Facebook.</comment>


Understanding CPU Steal Time - when should you be worried? - <AUTHOR> http://blog.scoutapp.com/articles/2013/07/25/understanding-cpu-steal-time-when-should-you-be-worried <comment><USER2> This analysis of steal time is not entirely correct.

Steal time exists to fix a problem. When a hypervisor needs to pre-empt a _running_ guest, without steal time, when the hypervisor eventually resumes that guest, as far as the guest can tell, the process that was running when the whole guest was pre-empted had run the entire time.

This means that if a guest is pre-empted, then CPU usage reporting in the guest becomes horribly wrong with some processes having much higher reported usage than they actually got. This affects fairness and can cause lots of bad things.

Steal time is simply a way to tell a guest that it was pre-empted. The guest OS can then use that information to correct its usage information and preserve fairness.

However, it is not a general indication of overcommit. When a guest idles a VCPU, that VCPU will be put on the scheduler queue. It may receive an event that would normally cause it to awaken the VCPU however if the system is overcommitted, it may take much longer for the VCPU to be woken up.

Most clouds are designed to allow multiple VCPUs per physical CPU too and there certainly is capping in place. You can still see steal time even though you are getting your full share.

Let me give an example:

1) You are capped at 50%. You run for your full 50%, go idle, the hypervisor realizes you've exhausted your slice, and doesn't schedule you until the next slice. No steal time is reported.

2) You are capped at 50%. You have a neighbor attempting to use his full time slice. Instead of getting to run for the first half of your slice with the neighbor running for the second half, the hypervisor carves up the slice into 10 slots and schedules you both in alternative slots. Both guests see 50% steal time.

You will get the same performance in both scenarios even though the steal time is reported differently.

<comment><USER3> My rule of thumb is pretty simple: if I see steal but still have an abundance of idle, I don't have a problem. If I see steal and low/no idle, I have a problem with an overcommited hypervisor.

It's derived from stress testing and production across a variety of virtualisation platforms, and it's generally proven pretty accurate.

</comment></comment><comment><USER4> Closely related to CPU Steal time is memory ballooning. If an instance is starting to require a lot of memory, and other instances are not, hypervisors (particularly vmware) will steal memory from other VMs on the same machine and give it to the misbehaving VM.

This can result in swapping on the unfortunate target VMs.

You can detect it by seeing a vmware program running using a lot of CPU (ironically no memory), and by watching your free memory percentage decrease while your programs are not actually consuming more memory.

<comment><USER5> My understanding is that memory sharing is generally not done in multi-tenant xen systems, and that this is one of the reasons why Xen is so dominant in that space.

OpenVZ, generally speaking, shares memory, but does not use ballooning; ballooning is specific to systems where each user has their own kernel.

Generally speaking, I think it's much less bad to oversubscribe CPU than memory. Among other things, if you take cpu away from a heavy user to give to a user who has not used their fair share, all the new user has to do is reload cpu cache from main memory, which is slow, but super fast compared to reloading main memory cache from disk, which is what the light user has to do when you take memory away from the heavy user.

Of course, the equation is quite different when the system is all owned by the same entity.

</comment></comment><comment><USER6> Using micro instances I've seen it go up to 99% during CPU intensive work (ex: app build). The hang ups waiting for it continue made me decide to switch the build server to an m1.small instance instead. It's idle the vast majority of the time but the extra $$ for it is totally worth it when you're running a build.

The steal % is usually zero on the m1.small instance. I just tried maxing out the cpu and watching "top" this is as high as it got:

        Cpu(s):  5.3%us, 39.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si, 55.7%st

To max out the cpu I ran the following in a separate ssh terminal while watching "top". An m1.small only has a single v-cpu so only a single running copy should be necessary.

        while :; do date > /dev/null ; done

<comment><USER7> Micro instances only provide "burst" CPU usage - if you keep above a certain threshold for long enough, it will throttle you by stealing CPU time (hence the 99%).

<comment><USER6> Yes that's exactly what happened. I originally thought our build times were short enough that it wouldn't go over the threshold but it was. It's surprisingly easy to trigger the cpu throttling on a micro instance.

Would be nice if they could/would average out the cpu usage over a longer rolling window. That'd be perfect for a use case like this (build server) where you're idle the majority of the time but want to max out cpu during the build itself. Seems like the perfect use case for a shared server.

</comment></comment></comment><comment><USER8> I've been having issues with steal time recently, but what I'm seeing isn't adequately explained by any of the articles and documentation I could find. Here is an example from one EC2 node:

      19:26:19     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
      06:04:05 PM  all   14.85    0.00    5.94    0.00    0.00    0.00   14.85    0.00   64.36

For me, when the machine was under load, %steal was almost always very close to %usr. It wasn't always the same, sometimes more and sometimes less. Can anyone explain how these numbers are related to each other?

<comment><USER4> They aren't related. Steal is the ratio of how many CPU cycles were promised to your system, but that your system didn't get. User is how much CPU (of the promised maximum) your programs are using directly (i.e. not time which is spent doing system calls (IO being the big one), which falls under the system bucket).

<comment><USER8> Then why are they the same in this case? Coincidence? (I won't believe that... but unfortunately I don't have more samples right now to demonstrate the correlation).

<comment><USER4> This is pretty old, so sorry if you don't get this, but I have been seeing something similar today:

         procs </comment></comment></comment></comment><comment>-----memory</comment><comment>---- ---swap-- -----io---- --system-- -----cpu-----
         r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
         0  0  33960  44844 147332 466588    0    0     0    63  130  198 20  2 59  1 18
         0  0  33960  44844 147340 466652    0    0     1    66  123  187 19  2 59  1 18

Etc.

I believe what's happening here is that the CPU cycles are being requested and subsequently stolen, and then since the system is still idle, they're re- requested and given, all in the same time period polled by the monitoring tool.

It's just a theory, but it makes sense (at least to me ;).

</comment><comment><USER9> When I ran into this issue in EC2, it was mitigated by leaving cpu0 relatively idle.

All apache processes were marked as taskset -c 1-7, the cpu steal and system load went down massively once that was in place.

<comment> mh- was this on an HVM instance?

</comment></comment><comment><USER10> I use Munin on my VPSs, and it shows the steal time which is nice. I don't typically see it showing up other than a 1 pixel line on RamNode. Hopefully that doesn't change under higher loads in the future.

<comment><USER11> I see the same, although the VPS has basically zero load most of the time due to what it does. (Munin host and Buildserver)

</comment></comment><comment><USER12> It's been a while since I used AWS, so pardon me if the question is silly, but:

Is it really cost-effective to track metrics like steal time, instead of using a large instance and having the host machine for yourself?

</comment><comment><USER13> Interesting article. I wonder how this works in Windows.

<comment><USER4> Still capable of occurring, but I don't know how Windows would report it (haven't run Windows in a VM in a long time).

</comment></comment><comment><USER14> This is the same as CPU Ready in VMware?</comment>


Windows is not a Microsoft Visual C/C++ Run-Time delivery channel - <AUTHOR> http://blogs.msdn.com/b/oldnewthing/archive/2014/04/11/10516280.aspx

<comment><USER2> A lot of 'real' ( _cough_ ) hackers like to look down at MS, but Raymond Chen is one of those guys I'd _hate_ to get into a technical argument with: he has experience, is extremely sharp, and very sarcastic. Those three attributes make Old New Thing my favorite MS blog even if I don't write Win32 anymore.

If anything, Windows' level of backward compatibility is a giant cautionary tale: enable poor behavior from devs, and it will proliferate. You cannot trust app devs to do the right thing, they need to be forced to; whether by gatekeepers at app stores, or OS restrictions. It is a tragedy of the commons. Whether it's inane programs inserting themselves into the systray, 'preloaders' for bloated apps (which slow startup), browser extensions, Explorer add-ons, or other garbage, app devs still seem to do a fantastic job of gunking up a Windows install.

This is why it's a bit of a blessing that webapps can't do much; because the more powerful they become, the more annoying and inane they will be.

<comment><USER3> This is why I'm against the commonly praised "Be conservative in what you send, be liberal in what you accept" principle. Being liberal in what you accept only gives you compatibility nightmares in the future. Another perfect example of this is html and is the reason why every browser has to reimplement all the bugs of internet explorer 6 in order to not "break the internet". Really, why should a browser try to correct a corrupt document with trailing tags and open attributes. Beginner developers/designers will simply think "looks good on my machine, deploy and forget" and then we are stuck supporting that kind of corruptness forever.

<comment><USER4> You must be my doppelganger, because I've been saying exactly this for some time. Internet Explorer caused so much trouble partly because it accepted so much bad HTML. It would close tags for you, even.

<comment><USER5> The automatic tag closing behaviour is even specified now.

But look at it another way: imagine browsers accepted only valid HTML and every browser had some bugs in what they consider valid. Writing a document in a way that it displays _at all_ might be a challenge already then. Add to that that not everyone is on the latest browser version (that was probably more true in the 90s as well) and you get all the current pains just with worse symptoms. I'm not really sure that's better.

<comment><USER6> I may be wrong here, but isn't implicit tag closing consequence of html deriving from sgml? mandatory tag closing is something that came with xml AFAIK

<comment><USER7> Yes, but then nobody implemented the SGML definition of HTML correctly. According to the standard, browsers should have parsed

        qux

as

        barbaz>qux

since it did not only include optional closing tags, but also short tags. (This is incidentally why several SGML-based HTML validators used to complain about "end tag for element A which is not open" in the presence of href attributes without quotes.)

</comment></comment></comment></comment></comment></comment><comment><USER8> The discussion in the comments is interesting. MinGW, the compiler for VLC, LibreOffice and most other FOSS projects on Windows does exactly what Raymond says not to do. In fact, the entire purpose of MinGW is to make GCC able to target msvcrt.dll. Developers and users love this, since they don't have to distribute and install the CRT with the program. Developers following the GPL aren't even allowed to distribute the CRT with their program, so they have to use one already present on the system.

Though Raymond is correct. The MinGW guys should probably "write and ship their own runtime library," or at least use the msvcrt from ReactOS or Wine. That should make it possible to statically link to it.

Having said that, Microsoft probably won't change their msvcrt.dll in a way that breaks MinGW software, since their users will complain that they broke VLC.

<comment><USER9> MinGW relies on dynamic linking? I'm surprised at that because when I ran a test just now, Microsoft C++ compiles _Hello World_ to an 84k executable whereas MinGW generates a 261k executable. I always assumed MinGW was doing the right thing and linking statically against (its own version of) the standard library; if not, where does the extra file size come from?

<comment><USER10> That's probably because you wrote C++ and are usimg C++ streams. Try just using printf. The binary, after stripping, will be much smaller (I think less than 20k). You can use DependencyWalker to check what DLLs you are linking to.

<comment><USER9> Ah, I was using C but I didn't realized needed to strip the binary, after doing that it comes down to 39k which is smaller than the Microsoft equivalent so you're right, it does seem to be using dynamic linking :(

<comment><USER11> For comparison, VC6 defaults give 40K (statically linked), switching to dynlink shrinks it to 16K, add a few more switches and it drops to 1.5K.

Is it possible to do that with the latest versions (i.e. linking to their CRT instead of MSVCRT.DLL), or are they incapable of doing it for some odd reason? These are the options I used:

/MD /O1 /Os /link /align:4096 /filealign:512 /merge:.rdata=.text /merge:.data=.text /section:.text,EWR

</comment></comment></comment></comment></comment><comment><USER12> 71, 80, 90, 100, 110, 120 - Did I miss any of these? - 6 different "C" runtime versions (apart from side-by-side sub-versions) for compiler that was released in span of 10 years.

It's not that I like the MSVCRT runtime. It's just that I have to target it. Any popular commercial product that has some form of plugin architecture (Autodesk for example) through DLLs would require more or less for one to compile it's own plugins with the exact version the main application was compiled.

It's a bit of strange moment - when one developer cries that OpenSSL should've not used it's own malloc implementation, and then another cries - don't expose malloc/free interface (but do say your_api_malloc, your_api_free) and this way you can target any "C" runtime.

Now these are completely two different things, but not so much. What if say OpenSSL used the "malloc" runtime - what version of MSVCRT.DLL would've they target? Does anyone really expect to target all these different versions and all these different compilers that you can't even find the free versions now through MSDN?

(Now I'm ignoring the fact that you can't easily hook malloc and replace it with "clear-zero" after alloc function, but that's just a detail).

What I'm getting is that there are too many C runtimes, hell DirectX was better!

I only wished MS actually somehow made MSVCRT.DLL the one and only DLL for "C" (C++ would be much harder, but it's doable).

<comment><USER13> Can't you distribute plugins as an archive of compiled, but unlinked .obj files and link them on import to the runtime you use?

<comment><USER12> Even if that was possible, you need a linker. Also recent versions of MSVC plug-in a pragma that contains the version number of the MSVCRT dll and once a .c/.cpp file was compiled with specific version it has this version in the .obj file, so if you try to link it with another version it'll complain. Recently they've added this for debug/release builds (NDEBUG, _DEBUG) (so you can't mix them - but I think this was done only for C++ - because of STL)

</comment></comment></comment><comment><USER14> I grew up with windows & windows dev tools and I always had a pragmatic appreciation for them, but lately I became quite bitter and cold towards Windows and Windows developers and this happened long before I started using alternatives. At one point it was very hard to avoid the feeling that something, somewhere deep in windows is rotten. With every new windows version from winXP on, I had the feeling that I'm being sold a slightly improved technological improvisation with a slightly better theme applied on it. Visual Studio and .Net framework tried hard and nearly succeeded to hide the messy roots of the problem but the stench of thousands of leaky abstractions can still be felt every time you open one of the many doors leading to Windows basement. The C/C++ foundation of windows (the shaky ABI) is only making it worse and in my opinion many major problems of modern software can be traced to unsolved problems in C/C++. I have a dream (a delusion :D) that despite the accelerating patches applied to both(coincidence?) of these technologies (C89,99,11,1X C++98,03,11,17 Win Vista,7,8,8.1,9) they will both end in the greatest "oh, f*ck it!!" in the history of software and be abandoned for something much better, which I hope will crystallize out of these ~70 years of computer science.

</comment><comment><USER15> Why can't Windows _officially_ include standard versions of this library? You know, like Windows already does with .NET versions since Vista or every other OS does with libstc++ or libc++? Forcing every C/C++ program to bundle their own MSVCRTXX.dll is pretty silly.

<comment><USER16> I must confess to statically linking my Windows binaries. It's better than making the user click through extra installers-within-installers to install the right MSVC redistributable.

It also seems to paradoxically improve load times. Shrug.

<comment><USER17> Yes, resorting to static linking is a pretty good solution for executables. Pitty about the bloat, but it works! How would static linking work with libraries? Would you get multiple heaps?

<comment><USER18> Sometimes you do get multiple heaps, but it can be made to work if one is careful not to allocate on one heap and then free on the other heap. One example is a C/C++ COM addin for Excel say - instead of freeing the Excel allocated memory directly the addin DLL invokes addRef/Release appropriately on the IUnknown interfaces to the various objects it gets handed by Excel. That can be automated a bit with ATL and CComPtr. A similar factory / smart pointer API can be made to work for any DLL that wants to maintain its own heap.

<comment><USER19> _Sometimes you do get multiple heaps, but it can be made to work if one is careful not to allocate on one heap and then free on the other heap_

Agreed, and it's sad to think how much confusion and grief would have been saved if they'd just made this a mandatory policy from day 1.

Windows developers regularly jump through an entire maze of hoops -- and make their users do the same -- just so they can call free() on a pointer they got from some random DLL, or do other goofy things that they shouldn't be allowed to do.

</comment></comment></comment></comment></comment><comment><USER9> Microsoft C++ supports static linking with the standard library, which you should be using for release builds. That way, your program will always be using the exact version of the standard library that it was tested with, and it's guaranteed not to interfere with anything else on the target system.

<comment><USER17> What can you do for the situation where you ship a library instead of an executable?

My team's product is moving to statically link libstdc++ and libgcc thanks to the runtime linking exception in GCC. It will allow us to use C++11 on old systems. We are grateful that libstdc++ is backwards compatible to GCC 3.4 (other libstdc++'s can link against us)!

I'm looking into statically linking musl libc so our product could (in theory) run on any 2.6/3.0 kernel. =)

<comment><USER20> glibc itself is not supposed to be linked statically, because it itself dlopens other shared libraries - for pam, for nsswitch, etc. These are system specific (as configured by admin), so there is no one size fits all.

You may statically link another libc, but then the users may wonder why your app does not works as it should, when they configure nsswitch for example and your app will not respect that.

</comment></comment></comment><comment><USER21> Does Linux suffer from this problem?

 _I think_ the answer is "no" because Linux distros generally recompile the world with each new major standard library version. If any C standard library gurus are reading this, feel free to chime in!

<comment><USER22> When glibc guys changed memcpy implementation which changed its undefined behavior, it broke Flash Player and Linus got pissed off. Afair they reverted the change.

[https://bugzilla.redhat.com/show_bug.cgi?id=638477#c129](https://bugzilla.redhat.com/show_bug.cgi?id=638477#c129)

<comment><USER23> IIRC, they later used symbol versioning so that only newly compiled programs get the real memcpy. Older programs get a fake memcpy which simply calls memmove, which is what Flash should have been calling instead of memcpy.

</comment></comment></comment><comment><USER17> Could symbol versioning, like ELF has, help the situation? I know that glibc has made backwards incompatible changes and they up the symbol version when they do so. I don't know if that handles changes in struct sizes though.

</comment><comment><USER11> Sorry, but I'm not going to link to a huge convoluted mess of variously versioned DLLs just to get standard C library functions. Maybe the situation is different with C++ (probably due to no real ABI standard), but the C library functions shouldn't change since they were standardised. If an application breaks because the _internals_ of a library were changed, that's none other than the applications' fault.

<comment><USER24> _" If an application breaks because the internals of a library were changed, that's none other than the applications' fault."_

I agree 100%, it's certainly the application's fault, but Microsoft has some very large corporate customers that it wants to keep happy, so in some cases it will eat the cost of cleaning up after sloppy developers.

I don't work for Microsoft, but the company I work for (we write expensive enterprise software) has a similar practice of bailing out customers who get into trouble by relying on undocumented behaviors... as long as the customer is important enough that alienating them could cost us significant future revenue. Being willing to provide support like this can differentiate you from your competitors. Not to mention that you can also charge customers extra for this higher level of support.

 _" Sorry, but I'm not going to link to a huge convoluted mess of variously versioned DLLs just to get standard C library functions."_

You don't really have to do that. If you build your application with Visual Studio 2013, you link against the version of the runtime library that it uses, and your application's installer installs the redistributable DLL for that version (if it's not already installed on the customer's machine). You don't have to deal with any other versions.

<comment><USER11> > and your application's installer installs the redistributable DLL for that > version

I don't want an installer, nor to include the redistributable which is around 2 orders of magnitude larger than the application itself! I want a single tiny binary, just download and run on any system, and that's what using MSVCRT allows.

<comment><USER25> What's wrong with an installer? An unattended installer or even a click through one is no obstacle these days.

<comment><USER11> \- I write my applications to run anywhere and not require any installation. There is a huge convenience factor in this. As a collorary, they also don't require _un_ installation since they do not "embed" themselves into the system (registry, config files, additional files elsewhere, etc.)

\- It makes for a bigger download, of code and data that would never be used again, with one extra step the user has to do before use, and also an extra step for me to build the installer too.

I can see the advantages of an installer for large applications that need to be "installed" since they modify various other things in the system, but that's not the type of applications I work with.

<comment><USER25> The problem with that is that your software is a bad citizen in the windows ecosystem. Even a one shot can be pushed out or run via an msi package with no install. And you get the benefit of being able to easy throw it out via GPO, pull dependencies like VCRT versions etc. MSI packages are pretty small as well - our current VSTO package which has about 25,000 LoC in it is only 400k.

<comment><USER11> > your software is a bad citizen in the windows ecosystem

According to MS who seem to be trying to force the idea that all software needs to be "installed" and have an overly complex installer/uninstaller. I care more about the flexibility and convenience for my users than what MS thinks (which is ultimately heading towards locking users in a walled garden, so no surprise that "just download and run a self-contained executable anywhere" is perceived as somewhat of a threat.)

> And you get the benefit of being able to easy throw it out via GPO, pull > dependencies like VCRT versions etc.

Those are not needed for what I'm doing, so they're not benefits to me. But I guess if your idea of "pretty small" is 400k, then that's not really a concern...

</comment></comment></comment></comment></comment></comment></comment><comment><USER26> "This meant not changing the size of the class (because somebody may have derived from it) and not changing the offsets of any members, and being careful which virtual methods you call" scares me.

I understand DLL technology have been around for a couple decades now and that it solved many difficult problems when introduced, but, still, this looks insanely fragile.

</comment><comment><USER27> Why does a program compiled with VS need a specific DLL anyway?

Can't VS compile FOR Windows, with only the DLLs Windows provides by default?

<comment><USER5> Sure, just don't link against the C++ runtime library and you're good. Of course, you won't have anything said runtime lib provides, then. Or link the runtime statically, as suggested in a few other posts. Your binary size will increase then, though.

<comment><USER28> Here's an article about it: [http://www.drdobbs.com/avoiding-the-visual-c- runtime-library...](http://www.drdobbs.com/avoiding-the-visual-c-runtime- library/184416623)

Without the runtime library, strictly speaking you're no longer programming C or C++, hence the surprises...</comment></comment></comment>


Show HN: A WebSite Hit Counter in Crystal and Postgres - <AUTHOR> https://github.com/will/bitfissionhitcounter <comment><AUTHOR> I found out that µBlockOrigin was blocking the old host of my hit counter, hit-counters.net, so I had to write my own. Sadly lost the 7segment display of the old one, but at least now I can get more accurate hits.

</comment><comment><USER2> Although I appreciate your efforts on writing this, I think you should have used other public hit counters out there. Having to deploy a whole Postgres database just for this seems a waste to me.</comment>


Blue Origin pressures employees to travel to rural TX to test launch New Shepard - <AUTHOR> https://www.theverge.com/2020/4/2/21198272/blue-origin-coronavirus-leaked-audio-test-launch-workers-jeff-bezos <comment><USER2> Enough, already! Get volunteers, and get it done!

All "at risk" and any scared people should be self-isolating, and the rest of us should be voluntarily holding raves and getting this civilization to "herd immunity" level by 2-3 weeks from now.

For healthy <55 year olds, the probability of catastrophic failure and death is low enough that 100m people getting sick over 2-3 weeks should be manageable.

The alternative — a _year_ of social distancing and partial quarantine — stands a good chance of seriously damaging or destroying our civilization.

Put on some big-boy pants, and lets get this done.

<comment><USER3> First off, ~12% of hospitalizations here in Canada are people under 40. It's not a laughing matter even for the young and healthy. Secondly it's causing severe damage to your body which could manifest as permanent damage, or just as having expended some of your limited capacity for self repair, leading to earlier failure in old age. Nothing is for free.

If you're deliberately getting people infected for herd immunity, you actually speed up the spread to all manner of people, including the most vulnerable. And you make the burden on the limited health system all the more acute causing additional unnecessary loss of life. Remember you need something like 50-80% of people infected to achieve herd immunity. Just doing the math on that and the burden to the medical system - it's not pretty.

I've given this some thought, but I think it's a horrible idea.

<comment><USER2> Then, we're "flattening the curve", infecting old and infirm people for 6 months, until a vaccine is ready.

That's the plan.

That's a bad plan.

<comment><USER4> There's not going to be a good plan. The good plan set sail in early January when we didn't consider SARS-CoV-2 a serious concern. So now we're choosing between flattening the curve to mitigate the overall death toll, or ignoring the moral cost and having 2.5m Americans die. I'm pretty sure where I stand on this.

And a vaccine won't be ready in 6 months. 12-18 is more like it, though we might be lucky and stumble upon a treatment to the disease itself.</comment></comment></comment></comment>


Ask HN: Do you couchsurf? - <AUTHOR>

Myself and a friend are looking to Couchsurf in Paris, so that we can attend dotJS 2013 and it made me wonder, how many of you HNers are also couch surfers? If so, what have your experiences been like? <comment><USER2> I haven't couchsurfed myself but I've hosted couchsurfers twice. The first time it was three young Russians bicycling through Finland. They stayed one night, cooked food and we chatted for a few hours. The next day I took them on a few hours sailing trip. The second time it was an Italian guy who I and a couple of friends showed around town and he then stayed the night on my boat. Both experiences were mutually positive.

</comment><comment><USER3> I used to be a host, here in Edinburgh.

But I stopped after a few crazy-guests. Not horrible experiences, but enough to make me decide I had no desire to do so again. I'd often considered surfing, but since I deleted my profile it seemed a little cheap to look for a place to crash when I wasn't reciprocating myself.

These days it seems there are several alternatives to couchsurfing.com, with a less "corporate" feel to them.

</comment><comment><USER4> I've been CouchSurfing quite a bit a few years ago, in particular when I was in Rio. Because of an unfortunate sequence of events I found myself having to hop from emergency couch to emergency couch for the first four weeks, usually staying at one place for a few days, and occasionally staying in a hostel to get some relative privacy.

Every host was nice, and even if we didn't 'click' it was still a great experience. And after four weeks of that I realized that I'd stayed in many corners of the city, knew a lot of the best places in those areas because my hosts would show me around, and felt like I'd lived there for much longer than just a month.

I can definitely recommend it as part of traveling, or even part of relocation. The occasional discomfort is offset by really getting to know a place quickly.

</comment><comment><USER5> I used to quite often until it became too commercialized and bloated in terms of community and service both, now this looks like a promising alternative - [http://www.bewelcome.org/](http://www.bewelcome.org/).

</comment><comment><USER6> Hey, I'm on couchsurfing and live in Paris, I live in a rather big apartment (for Paris standards) with 2 roommates, if you want you could stay at my place, check my profil for contact details.

</comment><comment><USER7> I've had fantastic experiences both surfing in Europe, and hosting back in Boston. Be smart, be careful, but most importantly - be prepared to meet some fantastic people.

</comment><comment><USER8> I don't Couchsurf, I prefer a proper room from AirBnB. It's almost as cheap as couchsurfing and I get more privacy and services.</comment>


How App.net Won't Change Anything - nick-anderegg http://labbook.net/2012/08/16/rant-how-app-net-wont-change-anything/

<comment><USER2> lots of words that could have simply been the last paragraph.

Of course, G+ isn't really a ghost town - it just isnt' anything like facebook. The only valid point is that app.net probably won't succeed - <AUTHOR> I disagree that it won't change anything.

I think, as someone pointed out a few days ago, that app.net will convince more startups to start thinking about charging from the get go as opposed to being free to build up critical mass.

</comment><comment> mh- "Facebook is "selling my personal information" to Walmart. Facebook is selling the privilege of having Facebook send ads to me."

think you left out a word here

</comment><comment><USER3> Incredible PR coup by the App.Net team to get people talking so much about them.</comment>


Lossless Web Navigation with Trails - <AUTHOR> https://medium.freecodecamp.org/lossless-web-navigation-with-trails-9cd48c0abb56 <comment><AUTHOR> Previous discussion:

173 points by ivank on Jan 30, 2017 | 55 comments

[https://news.ycombinator.com/item?id=13518919](https://news.ycombinator.com/item?id=13518919)

Great concept, do you see it coming?

edit: there's an update with a more detailed implementation here:

A Spacial Model for Lossless Web Navigation

[https://medium.freecodecamp.org/lossless-web-navigation- spat...](https://medium.freecodecamp.org/lossless-web-navigation-spatial- model-37f83438201d)

<comment><USER2> I've wanted something like this for a long time. Cheers!</comment></comment>


Why Game Developers Are Flocking to Sony and Fleeing From Microsoft - <AUTHOR> http://www.wired.com/gamelife/2013/04/sony-indies

<comment><USER2> It seems that Sony has picked up on one of Microsoft's big weaknesses - they're horrible at actually delivering good products. Indie developers are .much. more opinionated than AAA developers can afford to be, so when Microsoft shits on indie developers (XBLIG), they aren't hesitant to just develop for a different platform.

Compare this to Bungie (or is it 343?) who develops one of Xbox's major exclusive titles - Halo. Microsoft can make development as hard as their incompetence can offer for Bungie's developers, but in the long run the developer's opinions don't matter because management calls the shots and as long as Microsoft pays them enough to maintain Halo as an exclusive title, they don't really care.

Hobbyist/indie developers don't get in on any of those perks, and since they make their own decisions, they can choose to develop for whichever platform they please. In addition, it's nice to actually read good news about Sony for once, I hope they profit off of their investment in the indie scene.

<comment><USER3> Except MS probbably bends over backwards to grease the way for the golden egg laying Halo franchise.

</comment></comment><comment><USER4> When Jonathan Blow complained about the release criteria that Microsoft wants for any Xbox game and Xbox Live Game I was truly impressed: He wrote somewhere that the game had to be runnable for 4 days, so even the tiniest memory leak would really kill it. He also complained that the mandatory "Do not turn off console while saving" was annoying, he wanted the game to just open up with the first scene. He managed to do this by writing all save games to a temp file and renaming them...

I'm a bit torn here: It sucks how Microsoft again and again destroys something valuable they have created. It's interesting that the platform criteria and testing criteria are a pain for the developers but enforced. But it's quite impressive that at least theoretically any Xbox game is thoroughly tested!</comment>


Unity application lens "contender for worst piece of desktop shell design" - <AUTHOR> http://arstechnica.com/open-source/reviews/2011/05/riding-the-narwhal-ars-reviews-unity-in-ubuntu-1104.ars

<comment><USER2> Could we get a more descriptive title, like "Ars Technica reviews Unity in Ubuntu 11.04"?</comment>


Why Is It Taking 20 Minutes to Mine This Bitcoin Block? - <AUTHOR> http://r6.ca/blog/20180225T160548Z.html <comment><USER2> The article on the "hitchhiker's paradox" that this links to made this much more clear to me (as well as being shorter): [https://the8layers.com/2016/10/30/how-long-will-you-wait- hit...](https://the8layers.com/2016/10/30/how-long-will-you-wait-hitchhiking- on-the-road/)

<comment><USER3> This reminds me of headwinds in airplanes. You might think that on average, wind cancels out. Sometimes you have a tailwind, sometimes you have a headwind and over time it will all average out. This is not the case.

On average, wind reduces your groundspeed. The short of it is you spend more time in a headwind, so you spend more time experiencing the bad than good.

There's also the fact that even a direct crosswind slows down you ground speed (you lose some speed for correcting your course) but I don't think this compares to block chains or hitchhikers.

<comment><USER4> That's really neat, thanks!

An interesting related fact is that with equal distance traveled through headwinds and tailwinds a slower plane will be relatively more affected. From ~12% longer time with a wind speed 1/3rd plane speed down to ~1% with a wind speed 1/10th plane speed.

<comment><USER3> That's one of the reasons it's easier to navigate in a fast airplane than a slow one (another being you see more ground in the same amount of time).

</comment></comment></comment></comment><comment><USER5> I have been thinking about this as well, in another context. When I am at the tennis court, I always seem to be surrounded by players which are far above average.

This seems paradoxical, but you're more likely to meet the players which train most often, and they are also most likely to be the best tennis players.

<comment><USER6> It's also the reason why most people are less popular than their average friend is, even though they are (on average) as popular as the average person! Since popular people are on everyone's friend list, but unpopular people are only on a few friend lists, your friend list is biased toward popular people.

Mathematical explanation of why Facebook makes you depressed.

<comment><USER7> As someone that has more friends('popular'), its all a matter of effort.

I go out every weekend, I talk to everyone, I ask everyone for follow up contact info.

Yeah I get turned down probably 50% of the time, but its a numbers game. Sometimes you meet incredible people, but its taking that first step that matters.

Anyway, if you want to meet people, always go to events you are invited to, meet people. No one remembers how a conversation starts, people that are weird about communication are forgettable.

<comment><USER8> That's not what the OP is talking about. Trying re-reading his comment.

</comment></comment></comment></comment><comment><USER9> Bitcoin mining = "Guess a random number between 1 and 5"

If the network guesses too fast due to more cumulative guesses per second, the target number increases.

Interesting historical antidote, in early November of 2017 there was an event where it became more profitable to mine Bitcoin Cash. During that time about 60% of the miners left BTC Core in unison to focus on BTC Cash. Transactions for BTC Core started taking upwards two to three times as long as there wasn't enough hash power to guess the magic number in time.

Eventually the miners returned to mine BTC core and transaction times returned to normal, other than the backlog in the memory pool that built up during that period.

<comment><USER10> BCH is frequently more profitable than BTC -- the mining power constantly oscillates between the two.

Checkout fork.lol which tracks DARI, an estimate of the profitability of mining the coin, you see how the more profitable one frequently switches:

[https://fork.lol/reward/dari/btc](https://fork.lol/reward/dari/btc)

<comment><USER11> This is of course not surprising - in the long run all difficulties (for similarly hashed coins) should trend towards equalizing profitability lest they create an arbitrage opportunity. The driving factor in the grandparent's case was the short-term spike in BCH after it was listed on Coinbase.

<comment><USER9> Not entirely. There was a flaw/feature in the difficulty algo for BTC Cash that allowed miners to generate a significant quantity of blocks very rapidly.

[https://news.bitcoin.com/bitcoin-cash-hard-fork-plans- update...](https://news.bitcoin.com/bitcoin-cash-hard-fork-plans-updated-new- difficulty-adjustment-algorithm-chosen/)

</comment></comment></comment></comment><comment><AUTHOR> "Assume a hashrate and difficulty corresponding to 1 block per 10 minutes. If I uniformly randomly pick a point in time, what is the expected time between the previous block and the next block?"

[https://twitter.com/pwuille/status/967878361782652928](https://twitter.com/pwuille/status/967878361782652928)

<comment><USER12> This is like a common core math problem. Poorly worded to the point of obscuring any real math talent that could be applied in finding a "correct" result, and instead we get to debate what the question _means_.

A more interesting question, I think, is given a POW algorithm which adjusts difficultly to target a 10 minute block rate, and assuming network hash rate is constant and propagation is instant, what percentage of blocks take 20 minutes to solve? 60 minutes? And what's the odds of solving two blocks in <= 60 seconds?

<comment><USER13> Can you explain the multiple meanings you see in the question?

<comment><USER14> * What is the average time it takes to mine a block?

* If I choose a time uniformly what is the expected time it will take to mine that particular block.

The difference between them being that blocks that take a long time occupy more space on the timeline than shorter blocks and are therefore more likely to be chosen.

<comment><USER15> >What is the average time it takes to mine a block?

How do you get this question from CyrusL's original question? CyrusL explicitly specifies that it is 10 minutes per block [0], and that he is uniformly picking a point in time.

[0] Admittedly, he does not specify that it is a Poisson distribution.

</comment></comment></comment></comment></comment><comment><USER16> This is why I like block times of 2.5 minutes that Litecoin does. Rarely the block takes over 4 minutes. So even if it takes a couple of blocks, it's still within 10 minutes. Even 5 minutes a block would be better than bitcoin's 10. With bitcoin, if you put a reasonable fee, but your transaction doesn't make the next block, it can take more than an hour, which makes impractical certain transaction types like online shopping.

<comment><USER17> Most simple criticisms of why Bitcoin does things the way it does and then suggestions for simple 'improvements' such as yours (5 minute interval) tend to be naive and wrong. The 10 minute interval for Bitcoin transactions was chosen as the best tradeoff to balance pros and cons for making it shorter or longer.

Stackexchange has a good discussion on the topic:

[https://bitcoin.stackexchange.com/questions/1863/why-was- the...](https://bitcoin.stackexchange.com/questions/1863/why-was-the-target- block-time-chosen-to-be-10-minutes)

<comment><USER18> 10 minutes was Satoshi's very rough guess at what a reasonable compromise might be. He didn't have any empirical data and probably didn't give it much thought. Since then we have some real data about propagation times, e.g. [1], and most other blockchains have chosen much faster block times, like ~12s for Ethereum.

[1] [http://www.tik.ee.ethz.ch/file/49318d3f56c1d525aabf7fda78b23...](http://www.tik.ee.ethz.ch/file/49318d3f56c1d525aabf7fda78b23fc0/P2P2013_041.pdf)

<comment><USER19> Ethereum's security model is totally different: [https://eprint.iacr.org/2016/555.pdf](https://eprint.iacr.org/2016/555.pdf) If you look at bitcoin based POW intervals, 10 minutes is very close to optimal: [https://eprint.iacr.org/2015/1019.pdf](https://eprint.iacr.org/2015/1019.pdf)

<comment><USER18> According to figure 2 in your second link, a blockchain with 1.5 rounds per block (or one block every ~19 seconds, based on their round length estimate) can withstand at least 40% hash power attacks. That seems like a reasonable tradeoff to me.

If you think 40% is not good enough, okay, let's target 48%. That's still just ~6.5 rounds per block (~82 seconds per block). Bitcoin's parameter of ~47 rounds per block is clearly overkill; the authors' graphs don't even go that far out (see figure 3).

Interestingly, the first paper you linked mentions that although Ethereum was _intended_ to use single-level GHOST scoring, uncle blocks aren't actually counted toward chain difficulty, so it really has the same security model as Bitcoin. This was also confirmed by an Ethereum dev [1].

[1] [https://ethereum.stackexchange.com/a/13750](https://ethereum.stackexchange.com/a/13750)

</comment></comment></comment></comment></comment><comment><USER20> Say you have 10,000 miners, once you find a hash you can start all your miners mining the next block. Can you use the time between blocks to your advantage?

If you find the hash after say 6 minutes, you could delay broadcasting the block to the network for another minute or two, and give yourself an advantage.

Yes there's a risk another miner would find the same hash, but statistically you could estimate the optimal delay for risk vs reward.

<comment><USER21> More or less, yes. This is a known minor weakness in the protocol. See [https://arxiv.org/abs/1311.0243](https://arxiv.org/abs/1311.0243)

<comment><USER22> Interesting. Any ideas if this is indeed a realistic scenario, or if it has been addressed yet?

</comment></comment></comment><comment><USER23> A related statistical "mystery" is the miner cooperation without communication property of Proof-of-Work I describe here: [https://grisha.org/blog/2018/01/23/explaining-proof-of- work/](https://grisha.org/blog/2018/01/23/explaining-proof-of-work/) It too is rooted in that the mining problem is progress-free.

Contemplating adding the "20 minute paradox" as a section since I already explain the foundational principles in the write-up.

</comment><comment><USER24> The timing of block arrivals also greatly affects the guarantees against double spending, so this paradox may have some security implications.

Accepting transactions blindly after 5 confirmations/blocks throws away the information of the amount of time it takes to generate those blocks

[https://eprint.iacr.org/2018/040](https://eprint.iacr.org/2018/040)

</comment><comment><USER25> The Monty Hall problem for the 21st century.

Note that the dependency of the expected value on sampling method also show up in other places, like Benford's law. The expected value of the first digit of a number drawn from a uniform distribution depends on how the upper bound of that distribution is chosen.

</comment><comment><USER26> The hitchhiker's paradox is correct, taking a point and looking backward or forward will correctly give an average event 10 minutes away, but combining the events to give an average of 20 minutes is false. Two events have been chosen resulting in a conditional probability.

Put more clearly, an event happens on average 10 minutes in the past, but using the same starting point for the event in the future links the events with a dependency. We could also arbitrarily start looking forward at the instance of the event in the past, or another random point in time.

<comment><USER6> This is simply incorrect, and the (hypothetical) burden is on you to disprove the theoretical and empirical results that have been shown to prove the solution.

The conditional probability is equal to the unconditional probability, specifically because the Poisson model (which Bitcoin hashing approximates) is a model of fully independent events.

</comment></comment><comment><USER27> I wrote a quick little program to sort of prove this to myself: [https://play.golang.org/p/fITZrZgzTT7](https://play.golang.org/p/fITZrZgzTT7)

While the average difference in time between one record and the next is 10, the weighted average over the entire duration is 20.

<comment><USER27> I updated it with some comments explaining what's going on: [https://play.golang.org/p/xEnlcwBX4CN](https://play.golang.org/p/xEnlcwBX4CN)

</comment></comment><comment><USER28> Inspection paradox: [https://en.wikipedia.org/wiki/Renewal_theory#The_inspection_...](https://en.wikipedia.org/wiki/Renewal_theory#The_inspection_paradox)

</comment><comment><USER29> > Correct, that is exactly what I am saying. If you pick a random point in > time, you expect 20 minutes between the previous block and the next block on > average.

I thought this sounded funny, and I did a little simulation to see if it was correct. Given his assumptions (poisson with lambda 10), you do not get that answer. I got right around 10, which is what I would expect.

[https://gist.github.com/tvladeck/e7a164dfe70fa765b10c1af64b3...](https://gist.github.com/tvladeck/e7a164dfe70fa765b10c1af64b382b02)

<comment><USER30> You are using rpois as if it returned the time between blocks, but that's wrong. It returns a _count_ of blocks mined in a certain amount of time.

Here is a formula to calculate your cumulative_times array correctly for a 10,000 minute period (which is expected to generate 1,000 blocks but may vary of course):

        minutes = 10000
        cumulative_times <- sort(runif(rpois(1, minutes/10), 0, minutes))

See [https://en.wikipedia.org/wiki/Poisson_point_process#Simulati...](https://en.wikipedia.org/wiki/Poisson_point_process#Simulation)

With correct block times, I get ~20 minutes from your formula.

<comment><USER29> ahhh you're right

</comment></comment></comment><comment><USER31> Does this mean that the second block from a random point in time is, on average, 20 minutes away?

Anyone know what the longest wait time on a block in recent history was?

Final question -- do large mining operations network their miners so that they don't overlap their hashes. I'm thinking the overhead in doing that would probably be counter-productive given the massive problem space. But, if they were networked that then the probability would eventually go down for a long enough wait between blocks (assuming there exists some massive mining operation).

<comment><USER24> There was a 1.5 hour gap after this block:

[https://blockchain.info/block-height/152217](https://blockchain.info/block- height/152217)

<comment><USER32> I'm confused...it says the Block Reward was 50BTC but I thought that miners are only supposed to get 1 per block?

</comment></comment></comment><comment><USER33> With bitcoin (not bitcoin cash) the difficulty is adjusted every 2016 blocks. If too many blocks were mined in this period the difficulty will decrease and vice versa. This means that many blocks could be mined faster or slower in this period. Until of course the difficulty adjustment occurs again. You use what is called the nonce in the block header. Each time you do a hash of the block you increment this nonce. If your hash is under or equal to the difficulty the block is valid. The difficulty essentially means how many zeroes are in front of your hash.

What big mining operations do is to slice this nonce into appropriate ranges for each miner. So no miner is hashing with the same nonce. So miner 1 starts at nonce=0 and miner 2 on nonce=2000. The nonce range depends on how many hashes each miner can do in a ten minutes span. By doing this each miner is not doing hashing with the same nonce. That would be wasting hashing operations.

Now bitcoin cash changed the difficulty adjustment algorithm (DAA). Instead of adjusting the difficulty every 2016 blocks this is done after each block has been found. This was done to stabilize the difficulty. So miners stay mining bitcoin cash instead of switching between the most profitable chain (bitcoin or bitcoin cash). This was a problem before the new DAA was implemented for bitcoin cash.

There has been times in recent history were no new block was found for 20 minutes on bitcoin. For bitcoin cash around 2 hours. This was in November 2017. It has been 10 minutes stable ever since.

You can check this yourself on bitinfocharts.com for each blockchain under Block Time.

<comment><USER34> This article is completely independent of difficultly adjustment. The 20 minute average gap is a consequence of bitcoin mining being a Poisson process and the lack of memory property that follows.

</comment></comment><comment><USER35> Hmm if this is similar to the hitchhiker's paradoxon, then one would expect to wait 5 min for the next block by intuition, which is wrong and we have to wait 10 minutes. But i do not get why the intuition should be wrong by a factor of 4x (20 mins) instead by a factor of 2x (10 mins).

</comment><comment><USER36> This was an enjoyable read. Slightly off-topic: are there any books that approach Probability in a fun way? (i.e. that I can read on the train)

<comment><USER37> I enjoy Statistics Done Wrong [https://www.statisticsdonewrong.com](https://www.statisticsdonewrong.com)

<comment><USER36> Thanks!

</comment></comment></comment><comment><USER38> Very nice explanation for the initiated. Thanks!

</comment><comment><USER39> pdf == probability density function

</comment><comment><USER40> TLDR: Since blocks that take a long time to mine fill up more wall-clock time, if you pick an arbitrary instant of wall clock time, you're more likely to be in a "slow" block than a fast block. Specifically, you expect to wait 2x the average.

<comment><USER41> Thanks. Why can't all math teachers talk like that? I mean... I know you're clever and all, but if you were really clever you'd explain it in a way that's easy to understand.

Still, kudos to the OP. That was a great attempt to be precise.

<comment><USER30> That simple explanation is exactly wrong though! You don't expect to _wait_ 2x the average. You expect to wait 1x the average, but you also expect that when you _start_ waiting the previous block happened 1x the average time ago, and 1+1=2.

<comment><USER42> This is the best explanation of the phenomenon. Simple and actually explains why it's 2x and not 3x or 4x.

<comment><USER43> Is it actually true though? Compare these two comments buried downthread:

[https://news.ycombinator.com/item?id=16470358](https://news.ycombinator.com/item?id=16470358)

> The hitchhiker's paradox is correct, taking a point and looking backward or > forward will correctly give an average event 10 minutes away, but combining > the events to give an average of 20 minutes is false.

[https://news.ycombinator.com/item?id=16471544](https://news.ycombinator.com/item?id=16471544)

> I thought this sounded funny, and I did a little simulation to see if it was > correct. Given his assumptions (poisson with lambda 10), you do not get that > answer. I got right around 10, which is what I would expect.

<comment><USER30> Yes, it is true. I'm not sure what the first commenter is trying to say exactly. The second commenter's code was wrong, and correcting it gives the expected 20 minute average period.

</comment></comment></comment></comment></comment></comment><comment><USER44> OT: From my perspective, HN is the reference regarding tech content. The upvoted stories, the comments, the discussions are of such a high quality. It's just the best resource to stay informed and educated in tech.

Surprisingly this is not true with Blockchain topics. Upvoted Blockchain stories feel ok but not that relevant or often random. Comments, discussions are sometimes constuctive (like this one) but often anti-blockchain or of low quality.

<comment><USER45> [https://www.goodreads.com/quotes/65213-briefly-stated-the- ge...](https://www.goodreads.com/quotes/65213-briefly-stated-the-gell-mann- amnesia-effect-is-as-follows-you)

When it's in the topic of your domain expertise, you perceive HN to be incorrect, but in all other domains, to be right?

<comment><USER44> Maybe most of the tech fields covered by HN are also of my domain expertise.</comment></comment></comment>


Images solved: auto crop, auto quality, auto responsive, auto everything - <AUTHOR> http://cloudinary.com/blog/introducing_smart_cropping_intelligent_quality_selection_and_automated_responsive_images <comment><USER2> "Every image is unique in its content, and every visitor to your website has a different device, resolution, browser and network speed. It is challenging to deliver an optimal image to every user, especially when you need to scale that up to hundreds, thousands or millions of images."

This article discusses the challenges that web and mobile developers face and introduces a cloud based solution for automatic content-aware and context- aware image adaptation: automatic cropping, intelligent content-aware encoding, dynamic format selection and automatic responsive images using Client Hints.

</comment><comment><USER3> Is there a library that has similar functionality? I rather take care of image manipulation locally, it seems such a waste of bandwidth and resources to send large images just to have them cropped.

Edited to say the service itself looks awesome, I just wished it was local.

<comment><AUTHOR> If you want to do smart cropping locally, you might want to take a look at this: [https://github.com/jwagner/smartcrop.js/](https://github.com/jwagner/smartcrop.js/)

It's not as sophisticated as what we implemented for Cloudinary, but it's a good start.

</comment></comment><comment><AUTHOR> Here's an interactive demo of the auto crop feature: [https://demo.cloudinary.com/?mode=ga](https://demo.cloudinary.com/?mode=ga)

And here's an interactive demo of the auto quality feature: [https://demo.cloudinary.com/?mode=qa](https://demo.cloudinary.com/?mode=qa)

</comment><comment><USER4> Looks like [https://www.kickstarter.com/projects/njones/imageflow- respec...](https://www.kickstarter.com/projects/njones/imageflow-respect-the- pixels-a-secure-alt-to-image) spurred them into action by offering the same thing, but without the proprietary, permanent lock-in factor.</comment>


Winklevoss twins made $65 million on Facebook "copycat" settlement - <AUTHOR> http://venturebeat.com/2009/02/10/winklevoss-twins-made-65-million-on-facebook-copycat-settlement/ <comment><USER2> This appears to be the earliest, but now posted here: <http://news.ycombinator.com/item?id=475873>

Some discussion started on that posting.</comment>


Building a GSM Base Station with Parallella and UmTRX - <AUTHOR> http://www.rs-online.com/designspark/electronics/eng/blog/building-a-gsm-base-station-with-parallella-and-umtrx <comment><USER2> Ingenuous! I wonder if a LTE base station (eNodeB) could be build similarly? That would really catalyze innovation in cellular network design.

<comment><AUTHOR> Unfortunately, no. Currently there are no complete and ready to use open source eNodeB implementations. SDR hardware - UmTRX - should handle LTE. Fabrice Bellard's (closed source) LTE implementation was (preliminary) tested with UmTRX.

As for Parallella - I'm not sure. I don't know enough about it to tell if its ARM core can handle CPU load required by LTE.

<comment><USER2> There is Michael Ossmann's HackRF project: [http://greatscottgadgets.com/hackrf/](http://greatscottgadgets.com/hackrf/)

But unfortunately, there doesn't seem to be any news about when they plan to ship.</comment></comment></comment>


Show HN: iPhone App I've been building is in the store - <AUTHOR>

Hi!
I've been building this app over the course of the last year or so, and we've finally gotten it polished and cleaned up to the point where we feel pretty good about it.
The goal of this app is to replace the lists that people keep of all the places they want to go, movies they've had friends mention, and books they want to read. Our goal is to try and make those lists a lot more actionable so people will actually do these things instead of just writing them down.
Would love any feedback!
https://itunes.apple.com/us/app/onmylist/id561225528?ls=1&mt=8 <comment><USER2> I love the interface and the colors. Also a nice use of tabs on the top. Here are a few questions and comments that I have: 1\. How does one edit a list and add a picture? 2\. Can a note be smart enough to fetch a relevant picture and display it alongside? 3\. There should be an info page explaining all the buttons on the tabs. Some are obvious, but I couldn't figure out what other buttons are for.

Overall, warm colors and a fresh design to look at.

<comment><AUTHOR> No pictures yet, we're more focused on nailing the single user experience vs. trying to make it compete against the more social list type apps.

We hope to have the notes be a lot smarter in the future, but right now you'll have to actually select the item to get pictures and such.

Definitely need to make some things a bit clearer and to have a better intro.

Thanks for looking at it!

</comment></comment><comment><USER3> Did you build this with native Obj-C and UITableViews? Or did you use a platform like PhoneGap or something else to make it easier?

Just curious, because I'm always looking for easier ways to build iOS apps.

<comment><AUTHOR> Hi! It's all native, I looked briefly at some of those tools and decided I'd rather just learn objective-c.

</comment></comment><comment><USER4> Being able to import lists from other external sources would be nice, i.e. foursquare, amazon, netflix.

</comment><comment><USER5> clickable: [https://itunes.apple.com/us/app/onmylist/id561225528?ls=1...](https://itunes.apple.com/us/app/onmylist/id561225528?ls=1&mt=8)</comment>