UK's mass surveillance regime violated human rights law, finds ECHR - sahin-boydas https://techcrunch.com/2018/09/13/uks-mass-surveillance-regime-violated-human-rights-law-finds-echr/ <comment><AUTHOR> Interestingly the EU recently passed a copyright bill only the other day that will force many ISP's to install low-level content surveillance of their user- base due to article 13 making all intermidiatary's liable for user actions.

[https://www.ispreview.co.uk/index.php/2018/09/threat-of- inte...](https://www.ispreview.co.uk/index.php/2018/09/threat-of-internet- censorship-remains-as-eu-softens-copyright-law.html)

<comment><USER2> Is this interesting? The ECHR and European parliament are not the same organisation or people?

<comment><USER3> Well it is interesting that a new law that most people disagree with could be struck down by the courts.

</comment></comment></comment><comment><USER4> Is this the end of the case or is there some future sentencing? I find it hard to believe they weren't aware the programs violated human rights law, and I'm not sure what we're hoping a court confirming it's bad will accomplish.

<comment><USER5> Any penalties against the treaty signatories are done when the the judgment is made final, either by three months elapsing or by the Grand Chamber declining a request for referral or appeal, or ultimately by the Grand Chamber publishing a judgment (and that is by definition final). This judgment was published by the (lower) Chamber of the Court, so we likely have a while to go yet.

The important point is the judgment that the UK's domestic law is in violation of the UK's treaty obligations, but as is common with most treaties there's little in way of active enforcement (notably the ECtHR doesn't have power to directly overrule or strike down domestic law).

<comment><USER6> Exactly: The countries signing the convention agreed to its binding force but, except for fines, the ECtHR doesn't have direct to order countries. That actually foes for most judiciaries: Courts generally can only order governments to pay fines but these go back into the state budget. Few countries allow officials to be held in contempt of courts. Both, domestic courts and the ECtHR, rely on the respect for the rule of law and, at least for the ECtHR, that has mostly worked out well. Exceptions are Belarussia and Russia

<comment><USER7> It gets much worse than that in specific sections of law. It is very common, for example that for minors and mental health patients decisions work (trying to translate a french term) "without presupposition".

(this is about Belgium)

This means 2 things:

1) decisions taken by the executive power are not influenced by the court decision (famously one to keep a minor in solitary confinement for ~2 months and at one point forgetting to feed him for nearly 2 weeks, he had to drink from the toilet). The state got convicted ... and he got sent back to the same institution, never to be heard from again ("that would violate his privacy", sadly not joking). Legally, they could have prevented him from attending the trial in the first place. For "some reason" he never filed the open-and-shut case for monetary compensation that he was sure to win ... Never heard from again.

But don't worry, that decision was made "in the interest of the child" (says the organization that kept him in isolation for 2 months and didn't feed him for 2 weeks. Needless to say, the actual spokesperson at this point asked his name be kept out of the paper for that statement. The paper obliged)

2) if a defendant goes to a higher court, this does not halt execution of the decision. For example, a child services employee* takes the decision to take kids away from their environment and "place" them in an institution (meaning a child prison, but don't call it that) (note: this is mostly done WITHOUT those children having committed a crime, 75% of decisions are made because a state official has decided the parents aren't fit to be parents, though it's true that it's also done when they do)

* I wish I could say they used psychologists to make these decisions. That WAS true, not anymore. It is not anymore. At this point it's partly high schoolers (high school in Belgium has a social sciences/psychology year, an education with an incredibly bad reputation), and you're lucky to find one psychologist in the entire organization (technically there's 1 per province, but they "never look at individual cases").

Now at this point the parents aren't informed, nor is the child. Then the police turns up and takes the kid away, often in violent encounters. At some point this comes to a real judge, and let's say the youth judge decides the government was wrong to do this. What happens now ?

Nothing. The child is not returned. The current in-progress process is executed (and if that process is placement in foster care, that means the child is _never_ returned, or at least not before adulthood). It is a crime to attempt to make that happen anyway.

3) Let's say child was not taken in the first place, but the youth judge decides to place the child. The parents or the child decide to appeal the decision.

What happens next ? The child is taken away by the police and placed. It is a crime to attempt to stop this.

Similar things can happen to mental patients, even if the court decides they were wrongfully diagnosed as mental patients in the first place.

And of course, yes, politicians have been convicted of using this to imprison political opponents.

Judging by the wikipedia page, this is in fact pretty common across the world:

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

And then I'm not even mentioning the real scandals. For example, youth services couldn't "place" some children. They weren't with their parents. After a while they find them: the parents had sent them, with the grandparents, to Croatia.

Youth services runs into action. Kidnapping (not really, of course) ! They send agents there, and arrest the grandparents.

It took 2 weeks before someone asked "and the children ?". Well, they left the children behind in Croatia, and they are still in a mental institution there, in Zagreb ... 2 years old and 7 years old.

Needless to say, the person to ask this question was the mother of the children, who had to do this from behind bars (despite that she would not be convicted). It only worked because her lawyer went to the papers.

The grandparents were convicted of kidnapping. The parents were not convicted before a court for any wrongdoing (how disgusting is it that they even tried to convict them after doing that to their children ?). The state, needless to say, objected to the decision to not convict the parents, and appealed the decision, without getting a conviction, but they did imprison the parents for that period. Over 2 years behind bars for those parents, without conviction, with their children in a mental institution in Zagreb.

Needless to say, nobody in the police or youth services was even internally disciplined.

Equally needless to say, the power of these services has since been expanded and oversight reduced, as well as their budgets to hire capable people.

Incredibly offensive fact: due to the fact that youth services take so many children away from their parents, but don't actually have places to put them, they've started putting them in boarding schools. There's a tiny problem with that: those close in the weekends and during school holidays, and mostly demand those children leave. No alternatives are given to those children, so they're homeless at that point, have to sleep in the street. This has grown to be the number one complaint from these children.

If they get help at their parents or family they are punished by youth services ...

</comment></comment></comment></comment><comment><USER8> Aren't they a part of FVEY tho

</comment><comment><USER9> I have a suspicion that at least part of the drive for Brexit comes from the determination of the British security services to preserve their last little island of unaccountable Empire. There have been conflicts with ECHR over torture, "extraordinary rendition", the treatment of Republicans in Northern Ireland, and (repeatedly) over mass surveillance.

One former "M", Richard Dearlove, is an overt Brexit campaigner.

(Edit: yes I know leaving the EU does not automatically exit ECHR, but it's a prerequisite, and the same people are generally campaigning against ECJ and ECHR as well)

<comment><USER10> ECHR is not a part of the European Union, so Brexit won't take us out of it.

However, I believe that the EU requires members be signatories of the ECHR, so Brexit would make leaving it much easier.

It's well documented that Theresa May wants to leave the ECHR; somewhat alarming since both Russia and Azerbaijan, countries with comparatively poor records on human rights, are signatories.

<comment><USER11> In fact, as far as I know the only European states that are not part of ECHR and Council of Europe are the Vatican (since they're a theocracy...), Kosovo since it has limited international recognition, Kazakhstan and Belarus over human rights violations.

No European state that'd be eligible has chosen to voluntarily stay outside. Azerbaijan and Russia are the closest to being in trouble of the current members (Russias voting rights were suspended over the annexation of Crimea; Azerbaijan is implicated in corruption to step criticism over Aliyev's rule).

The "European states outside the CoE club" is not exactly one to strive for membership of, to the extent even a lot of Tory MPs in favour of Brexit are opposed to leave the ECHR; David Davis in fact threatened to rebel over it at one point.

<comment><USER12> It's surprising to find that the ECHR does not consider same-sex marriage a human right.

<comment> maze-le >> Convention for the Protection of Human Rights

>> Article 14 – Prohibition of discrimination:

>> The enjoyment of the rights and freedoms set forth in this Convention shall be secured without discrimination on any ground such as sex, race, colour, language, religion, political or other opinion, national or social origin, association with a national minority, property, birth or other status. [0]

Granted, its not about marriage, but according to the ECHR, its a human right to live free of discrimination based on sexual orientation.

[0]: [https://www.coe.int/en/web/conventions/full- list/-/conventio...](https://www.coe.int/en/web/conventions/full- list/-/conventions/rms/0900001680063765)

<comment><USER13> I don't see anything about sexual orientation, just sex which would be about being male/female (possibly transexual depending on the interpretation?).

[Edit] There is this, which seems to leave it to the nations:

>>Article 12 – Right to marry

>> Men and women of marriageable age have the right to marry and to found a family, according to the national laws governing the exercise of this right.

<comment><USER14> Discriminating against sexual orientation isn't possible without discriminating against sex. A woman is allowed to marry a man, but a man is not.

<comment><USER15> Both man and women have the right to enter marriage, which is defined in the document as the union between Man and Women (Much clearer in the french version).

<comment><USER14> People are starting to realize that this definition is incompatible with rules against gender-based discrimination.

<comment><USER16> That's only if you believe that discrimination (selection bias) is the same as discrimination (categorizing). There's no apparent failure of logic until you start confusing them (eg "starting to realize"). If some people are starting to believe that the definitions are synonymous, they are wrong and will have to deal with the issues that naturally occur when you confuse ideals with reality. Generally some population group suffers for another population group to be supplicated in an arbitrary way.

<comment><USER14> This isn't about the kind of discrimination being allowed. This is about which groups we apply protections to. Do you also think I'm mistaken that a law defining marriage as the union between two people of the same race is incompatible with a law forbidding racial discrimination in marriage rights?

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER17> Anjem Choudary is currently in the news. With the likes of him and his supporters I'm not sure I expect much else. I'd prefer it wasn't done, but even with that we still have bombs and vehicle rampages. What are the alternatives?

<comment><USER9> The key difference is between "surveil known idiots like Choudary" versus "surveil everyone then try to find terrorism by keyword match". The latter is not only unlawful and unjust but produces a huge number of false positives.

<comment><USER18> Not sure why that comment's been voted down. Ultimately it's a question - voting down a question... Anyway, I'm not convinced surveilling the high profile people is going to alert you to the people who are off the radar, ie lone wolves. There might be an association between some, but not all. Again, (I think some people struggled to read this in the previous comment), I'm not pro-mass-surveillance, I'm just not convinced that what should be a better situation would be a better situation, ie maybe an unfortunately necessary evil.</comment></comment></comment>


Expanding the Cloud: Microsoft Windows Server on Amazon EC2 - <AUTHOR> http://www.allthingsdistributed.com/2008/09/amazon_ec2_with_microsoft_wind.html

<comment><USER2> The main problem that will need to be overcome for this to get kind of traction - licensing that is generally pretty outdated or brain-dead.

Unless you have an enterprise license, Microsoft, Oracle, IBM, etc - all tend to license on a per CPU or per Core basis...

It's really annoying. Because you'll have some whizzbang J2EE app that you want to run. However, instead of popping it onto your scalable IBM WebSphere cluster, you put in a dedicated WebSphere instance. I've seen it happen and done it myself many times.

Why? Because it's CPU licensed. And the cluster has 10 CPUs that you'll 20% utilise. But it's still licensed as 10 CPUs. So it's much cheaper to license for 2 dedicated CPUs and take the operational hit (and probably environmental hit).

Cloud computing is meant to be licensed like a utility - proprietary software is going to have to catch up. Hopefully they've got the licensing situation sewn up with this.

</comment><comment><USER3> "There are many different reasons why customers have requested Windows Server; for example many customers want to run ASP.NET websites using Internet Information Server and use Microsoft SQL Server as their database. "

I guess they're moving beyond startups then. What are the licensing implications for suddenly requesting 400 instances of your Win2K8 box?

Afterthought: are the kinds of places that use Windows server (older larger corporates) likely to want cloud computing?

<comment><USER4> Licensing will end up killing proprietary operating systems chances of running the cloud. Dealing with licensing is like dealing with long distance -- people still put up with that?

</comment></comment><comment><USER5> I think this sounds pretty cool:

"In addition, several customers would like to maintain a global single Windows-based desktop environment using Microsoft Remote Desktop, and Amazon EC2 is a scalable and dependable platform on which to do so."

I could see that being a real cost saver for a lot of organizations. I wonder how tolerable the lag is with remote desktop to EC2.

</comment><comment><USER6> Interesting to note this announcement coming prior to the PDC (late October) where Microsost is expected to talk more about their cloud story. Makes me wonder if Amazon and other 3rd parties will be central to it. Also makes me wonder if there is going to be some new Windows Server licensing model that makes sense.

</comment><comment><USER7> I'm sure they have some slightly modified version of the standard SPLA agreement. Windows instances will probably cost slightly more per hour to cover the monthly license cost of whichever version someone's running.</comment>


Your users deserve better than Disqus - <AUTHOR> http://perltricks.com/article/104/2014/7/29/Your-users-deserve-better-than-Disqus <comment><USER2> Ok, sure. I don't want to use disqus. Just one question.

What alternative do I have?

I can't afford to spend a lot of money. It's pointless to develop a comment system myself when it's a problem that has already been solved. Just the spam solution alone is a monstrous task.

I'll gladly not use Disqus if you offer one reasonable alternative.

<comment><USER3> I guess Facebook comments are a popular alternative. I used to run my own Django based comment system, which used Mollom for spam control. There's probably quite a few similar spam APIs available (Mollom is free for low- traffic use). Personally I recently decided to migrate to Disqus.

</comment></comment><comment><USER4> The points the author makes about the inherit risks of tying yourself to a third party service apply beyond Disqus - I think it's reasonable to expect any such service to become more intrusive in terms of tracking and attempting to monetize your users as it becomes more popular. Although the jab at PHP is expected coming from a Perl site, it's also irrelevant.

I'm not aware of an open source solution for commenting which would be as easy to deploy as Disqus, and of course this is why such services are popular. A commenting system is in essence a fully realized CRUD application with user validation and everything, probably sitting inside of another one. I suppose you could just use Wordpress or something, though.

</comment><comment><USER5> As far as I'm concerned, for comments, you either have a form for screen name and email, or you use Disqus. Facebook comments is not a good alternative. Other alternatives do not yet have as wide adoption as I would like.

<comment><USER6> On techcrunch I've seen both disqus and facebook. Lately, I've only seen facebook. Not sure why that is...and maybe I'm wrong for thinking I've seen disqus on their system. I really wish they'd drop facebook.</comment></comment>


Are you keeping your product team focused and data driven? - <AUTHOR> http://blog.experiments.io/post/54424766279/are-you-keeping-your-product-team-focused-and-data-drive

<comment><USER2> It's hard to align Marketing, Sales and Product team around common goals.

<comment><AUTHOR> that's why I think you should have missions for each member, with a common goal for the team.

</comment></comment><comment><AUTHOR> Simple process, but efficient for me to start.</comment>


Sinking of the US Cargo Vessel El Faro: Illustrated digest [pdf] - <AUTHOR> https://www.ntsb.gov/investigations/AccidentReports/Reports/SPC1801.pdf <comment><USER2> The recent Vanity Fair story about this tragedy is absolutely riveting, even though you know exactly what is going to happen: [https://www.vanityfair.com/news/2018/04/inside-el-faro- the-w...](https://www.vanityfair.com/news/2018/04/inside-el-faro-the-worst-us- maritime-disaster-in-decades)

</comment><comment><USER3> All else aside, the UI/UX issues here are heart-wrenching. The captain preferred a graphic representation, even though it was 6 to 12 hours out of date, over a more current text-based report/forecast. On two occasions, warnings or new data arrived just a few minutes after a report/forecast was viewed. Crew members watching the Weather Channel had more current/accurate information than the captain.

I can easily see how a graphic might be preferred over text, regardless of data currency, and especially during the 95%+ times of smooth sailing, but to see how this situation turned out is troubling.

<comment><USER4> I'd like to see the actual BVS UI. Does it indicate how old the data is or just the timestamp the report was generated? This is a detail that bites lots of reports in business.

<comment><USER5> Maybe the people who develop the software don't talk to the end users, or see how they use the software. That would be a classic example of development process gone wrong. Are they, or people sufficiently near to them on the organizational chart, aware that life-or-death decisions are made on the basis of their software? (I'd certainly hope so, plotting weather data definitely qualifies).

I'm only conjecturing here; there's no reason to conclude based on the available information that there is a problem here. But it would be a pretty typical situation in an organization that believes software is something you call up a subcontractor to bolt on -- most places are still run like that, although the culture is slowly changing.

<comment><USER6> For obvious reasons can't comment too much, but it does, they did, and makes quite clear that it's not for navigational purposes.

<comment><USER5> Interesting, thanks for the tidbit of inside information :)

You'll have to pardon me for asking a stupid question, though -- what other purpose than navigation would a maritime weather report/forecast reasonably have? This seems to me at first look as a protection against liability, rather than an actual clarification of the intended usage of the product.

I guess I could imagine a use case such as operations planning, e.g. "will we likely be able to perform work on deck tomorrow?", where the stakes are lower, but I imagine the potential for misunderstanding and incorrect usage of such a service would be dangerously big.

<comment><USER6> You're welcome.

It's for optimization of future routes -- how do I get from point A to point B while keeping some weather parameters in acceptable range, burning less fuel, and getting there on schedule. And yes, trying not to drive right into a storm. Not quite for trying to maneuver out after you have already driven into one.

Of course you can also look at it and figure out of cleaning the deck is a good idea or not.

I probably shouldn't comment further, but NTSB's full report is at [https://www.ntsb.gov/investigations/AccidentReports/Reports/...](https://www.ntsb.gov/investigations/AccidentReports/Reports/MAR1701.pdf) and they did not seem to find it too confusing.

<comment><USER5> Thank you :)

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> Definitely impressed by the design work that went into this report. I'd be super curious to hear from people who design these sorts of communications. Usually we think of a well designed pamphlet for marketing purposes, but clear informative presentation here well exceeds what I've traditionally expected from a government report.

<comment><USER8> It is marketing.

1) they want all to "buy into" their proposed changes. 2) they want all to know how important their work is and why they should remain in the budget.

<comment><USER9> That level of cynicism may apply to some government departments, but agencies like the NTSB are much more grounded.

When there's a bad accident on a ship that was more-or-less following procedures, owners and captains of ships really want to know what went wrong and why, so they can avoid it themselves. This is the sort of document that captains will read and discuss with their crew, not all of whom are highly literate in English, so it needs to be accessible and clear. It seems to me that the NTSB did good work here.

</comment></comment></comment><comment><AUTHOR> Something that I'd missed in previous articles about the El Faro sinking:

> _Then, at 0554 , the captain ordered a turn to port to get the wind on the > ship's starboard side, generating a port list. A few minutes later, El Faro > lost propulsion_

\---

> _Log books indicated no more than 26 inches of oil in the sump in the months > before the accident ( a ). With this oil level, the bellmouth would not take > in air (lose suction) with an 18-degree list to starboard ( b ), but would > lose suction with an equivalent list to port ( c )._

They had other serious problems, but loosing propulsion in heavy seas is very serious indeed.

<comment><USER10> It's interesting that the low oil pressure cutoff (designed to prevent engine damage from running without lubrication) is amongst the things that ultimately doomed the vessel.

<comment><USER11> Or the engine would have died anyway from running with no oil for another hour. Considering they were in the middle of the storm and that the captain rejected giving up until the very last moment, I don't think it would have made a difference.

</comment></comment></comment><comment><USER12> I'm curious how much this is about "many small and unlikely failures leading to disaster", versus "they sailed into a big storm and were doomed". The usual narrative with complex engineering disasters is the former. I'm wondering, for example, if everything else was going well with the ship, could they have survived such a close encounter with such a big storm? Or, if the engine was kept online, would that have changed anything? It seems to me that this situation went far beyond survivability, but it's hard to tell from the NTSB report.

<comment><USER13> It seems like both... don't sail into a hurricane and there's no problem, right? But even their sailing into it was an interaction of many factors -- the captain's insistence, predicated on preferring the graphically vivid but outdated weather maps, and on disregarding the opinions of his officers, and on each of them independently failing to be sufficiently assertive (or even convinced of the danger themselves) to change his mind.

There's also the broken anemometer, but I'm tempted to discount that, because it was obvious the wind was from port, indicating (in any counter-clockwise- rotating storm, i.e. any cyclone in the northern hemisphere) you are headed right into it. Winds should have been from astern if you were trying to cross in front of it. When you're convinced of something, sometimes you can stare right at contrary evidence and disregard it. But who knows, maybe having an accurate wind reading would've jogged some brain cells.

If the engine was kept running as you say, that might have helped them, but _only_ if they had used it to turn and get the hell out of there. If the captain insists on using it to continue driving straight into a hurricane, it just makes things worse. And then of course there's all the water they took on, limiting their getaway speed so to speak. In a certain way it seems like the point of no return was the rupture of the fire water inlet. No telling what the ship could've withstood if they had secured the load better and secured the hatches better. Unfortunately all you get with this kind of hindsight is all the things that went wrong, not necessarily what would've had to go right.

</comment></comment><comment><USER14> This was an incredibly fascinating and shockingly well designed doc. Excellent work from the NTSB putting this together.

</comment><comment><USER15> Anyone know if the BVS data has a timestamp?

An excellent and very readable document, by the way.

<comment><USER16> -It does; however, the timestamp only shows when the report was compiled; it does not show when the data the report is based on were collected.

<comment><USER11> As someone who builds software that generates exportable reports, I can say this is one of the cardinal sins of data visualization. Another one is relative timestamps akin to "just now".

<comment><USER17> I know, right? [https://pasteboard.co/Hn35e51.png](https://pasteboard.co/Hn35e51.png)</comment></comment></comment></comment>


Discontinuation of Mac Support for Autodesk Alias and VRED - <AUTHOR> https://knowledge.autodesk.com/support/alias-products/troubleshooting/caas/sfdcarticles/sfdcarticles/Discontinuation-of-Mac-Support-for-Autodesk-Alias-and-VRED.html <comment><USER2> I worked at Autodesk from 2007 - 2011 and on Alias / Alias-related things for a good chunk of that. I was part of the team that ported Alias to MacOS.

Alias development started back in the late 80s and was written for (I think) SGI machines. Back then, the company was Alias (merged with Wavefront and ultimately acquired by Autodesk in 2006) and the software was called Studio. OpenGL formalized in the early 90s and Alias (the company) ported Studio to support this nascent API. That meant that Alias could run on any OS that supported OpenGL.

This was a fantastic strategic decision because it allowed Studio to port to various flavours of Irix, HP Unix, Windows, Mac OS, and even Linux. The Linux build was/is internal. It was a little janky to use as a modeller 8 hours a day, but good enough for a development workflow.

Porting to Mac OS occurred in 2008 (I think) and was a reasonably sized project. Alias renders all of its own UI in OpenGL, so in theory, it was as simple as "Get a GLContext, and render to that". Of course, there were other things to deal with:

        - Cocoa specifics like windows / events
        - Various filesystem differences
        - IPC (Alias launches a subprocess to open new files to insulate a bad .wire file from crashing the main process)
        - Performance issues caused by various aged code (e.g., still a few places using display lists).

I don't have any specifics for _why_ Autodesk invested in porting Studio to MacOS back then. Apple was on the upward trend in terms of design and market share. I can speculate Apple was demanding a Mac OS version of Alias for its own use since, as others pointed out, Apple is a pretty big Autodesk customer.

I agree with the other points made here that the decision was likely made that the ROI of maintaining the Apple port wasn't worth it. Sure was fun to write though. :)

<comment><USER3> Didn't Alias transition to Qt, like other Alias programs (Maya)?

<comment><USER2> Not to my knowledge.

Maya was porting to Qt when I worked there. Alias/Studio still used its own internal UI toolkit (Edwin) at the time.

<comment><USER3> It's amazing for how long Maya's architecture has lasted. I still remember the transition period over from PowerAnimator (9.5 I think) and TDI|Explore to Maya. I've used first beta and still remember how similar, yet different it seemed. OptiFX was still better in PA, at the time (and I can't believe that was a paid add-on, same with artisan - a daylight robbery of a price).

I always had a sweet spot for programs made on/for SGI. Something different and magical about them. As if they were from the future.

</comment></comment></comment></comment><comment><USER4> I can understand Autodesk not wanting to bother with Mac development any more. Apple's aggressive and inconsiderate moves make it a pain to even maintain existing app projects on the Mac.

<comment><USER5> Plus the lack of a pro level desktop machine (excepting the imac pro. all-in- one) isn't helping apple with power users that Autodesk users presumably are. They announced new ones are coming a year ago but still no details or a real release date.

Its a shame as the macos application packaging system makes makes for an easy way distribute and run applications.

<comment><USER6> > Plus the lack of a pro level desktop machine (excepting the imac pro. all- > in-one)

The lack of a pro-level machine... except for the pro-level machine that they do have.

<comment><USER7> They also admitted at a round table that they designed themselves into a "thermal corner" with the last Mac Pro and that they will be introducing another one in 2019.

<comment><USER8> They "learned" / "understand" / "realise" that they went into a thermal corner "FOUR" years after the product was first released.

Then they made announcement they are going to do a redesign, 4 years after it first released, and the redesign won't be coming out til 2019, 2 years after they made the redesign announcement.

A total of 6 years. That is the amount of care they have for "pro" users.

They then went to release an iMac Pro which many call it an interim solution. An iMac Pro capable of having two 250W chip cooled, Something the community has been calling for years for the iMac ( For so long everyone abandoned the hope already ) and some said was not possible due to cooling requirement. Turns out it wasn't a technical barrier, simply Apple won't make it.

And as rumours goes, it wasn't until a very large studio decide to abandoned the Mac platform due to Mac Pro, and someone who had connection with Apple SVPs and told hem about it, before they realise how much care they have given to the pro users.

Apple forgot that while it was Steve jobs bumping put new strategies and initiative that changed Apple in the long run. It was these pro users whom bleed six colours that kept Apple alive in the first place.

<comment><USER7> People have been calling for an iMac Pro type hardware "for years"? I doubt very seriously that anyone even wanted something like the iMac Pro before it was released.

 _And as rumours goes, it wasn 't until a very large studio decide to abandoned the Mac platform due to Mac Pro, and someone who had connection with Apple SVPs and told hem about it, before they realise how much care they have given to the pro users._

I doubt very seriously that _one_ studio abandoning a product line that makes less than 10% of thier revenue made Apple panic.

 _Apple forgot that while it was Steve jobs bumping put new strategies and initiative that changed Apple in the long run. It was these pro users whom bleed six colours that kept Apple alive in the first place._

Things change. The Mac is no longer at the center of Apple's universe. As far as what Steve thought that Apple's direction of the Mac should be....

"If I were running Apple, I would milk the Macintosh for all it's worth – and get busy on the next great thing. The PC wars are over. Done. Microsoft won a long time ago"

[https://www.wired.com/2011/08/money-quotes-steve-jobs- style/](https://www.wired.com/2011/08/money-quotes-steve-jobs-style/)

If you think Jobs was tied to the Mac on his return, you weren't paying attention.

<comment><USER8> >I doubt very seriously that anyone even wanted something like the iMac Pro before it was released.

Not Xeon or EEC Memory, but 150W+ CPU + 150W+ GPU combination on an iMac. iMac could have been powerful, but it never was. Not because we have invested new cooling solution to cool the CPU and GPU, because the iMac were never positioned as such. Steve Jobs wanted the Desktop to be completely silent. And it is still shipping with a HDD as default.

>I doubt very seriously that one studio abandoning a __product line __that makes less than 10% of thier revenue made Apple panic.

Not a product line, but the whole Mac Ecosystem. Try Disney telling you they are throwing Mac Pro away from their production system. And it is not even 10%, likely 1% of their revenue.

>If you think Jobs was tied to the Mac on his return, you weren't paying attention.

And the quote was from... 1996? How about a more recent quote.

"Truck" PCs weren't going to go away, Jobs predicted, but "car" tablets would find a place among a larger number of users.

"This transformation is going to make some people uneasy," Jobs said. "People from the PC world, like you and me. It's going to make us uneasy."

If you think Jobs wasn't tied to the Mac on his return, you weren't paying attention.

<comment><USER7> _Not Xeon or EEC Memory, but 150W+ CPU + 150W+ GPU combination on an iMac. iMac could have been powerful, but it never was. Not because we have invested new cooling solution to cool the CPU and GPU, because the iMac were never positioned as such. Steve Jobs wanted the Desktop to be completely silent. And it is still shipping with a HDD as default._

Before the iMac Pro, the Mac Pro was the computer for professionals. They made a major mistake with the 2013 Mac Pro. Apple never shipped good GPUs in Macs compared to Windows PCs.

 _Not a product line, but the whole Mac Ecosystem. Try Disney telling you they are throwing Mac Pro away from their production system. And it is not even 10%, likely 1% of their revenue._

If Apple's missteps were hurting Mac revenue you would see it in their quarterly revenue where they break down the amount of revenue they make on Macs. Looking at the numbers, it hasn't hurt Mac revenue. I would love to see a more compelling Mac Mini for instance, but I can't honestly say that not having updated it in 4 years has hurt Apple.

 _And the quote was from... 1996? How about a more recent quote._

Jobs told people what he would do with Apple and he mostly did just that.

\- He milked the Mac and used it as a cash cow

\- He gave up competing with Microsoft and made a deal with them.

\- He introduced iTunes, iPod, iPhone, and the iPad.

\- He even took "Computer" out of the name of the company.

\- He delayed the OS release that was suppose to come out in 2007 and moved engineers to the iPhone.

\- The only slightly industry changing thing he did with the Mac after 2001 was the MacBook Air and that was overpriced and underpowered for the first two years.

As far as being "tied" to the Mac, he didn't even use a Mac until 2001 when OS X was introduced. His primary computer was a Dell running Next.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> Unsurprising. This is one public announcement, but it's inevitable that there are many more products which will cease support for MacOS.

OpenGL is an established industry-standard graphics API. Supported on every platform of note. Drop it, and you're going to lose developers who rely on it. A vendor-specific proprietary API isn't an improvement, it's regressive. There are many products which won't be able to justify a Metal port, including one of my own. Despite its ugliness, OpenGL worked everywhere and modern OpenGL is actually pretty decent.

If Apple want to retain developers, they need to have a long, hard think about their strategy here. I'll consider supporting MacOS again, if they can cut back on proprietary stuff and support the industry-standard stuff. OpenGL 4.6 and Vulkan would be a good start.

<comment><USER10> _an established industry-standard graphics API. Supported on every platform of note._

Sorry, but this mostly wishful thinking. It is only an "industry standard" on Linux-based systems and Android. Also Nintendo Switch has support for OpenGL, but it is not the primary graphics API.

On Windows, the OpenGL driver quality story is not very rosy. A good example is WebGL. On Windows, Chrome and Firefox implement WebGL using a compatibility library (ANGLE) that maps calls to the Direct3D API. Also for QT applications it is recommended to use ANGLE on Windows. Playstation 4 has its own proprietary graphics API, Xbox uses DirectX.

<comment><USER9> I disagree. It doesn't matter a whit whether or not it's the "primary" graphics API, but rather that it's supported on a platform or not. Right now, if I use OpenGL, I can target Windows, MacOS, Linux, FreeBSD, mobile devices and others all with a single codebase. It is portable, and does work everywhere in practice.

On Windows, if you're using a GPU from e.g. AMD or nVidia, be it the gaming end or the workstation end, you will also be getting a decent OpenGL implementation. If you're using software like Alias, you're not going to skimp on the GPU. Angle only exists for poor GPUs which don't have decent OpenGL Windows drivers; for software at this level, they are an irrelevance.

WebGL is a red herring. This isn't anything to do with web browsers, and everything to do with killing support for decades of software development investment by third-party ISVs. WebGL is not competing with that, and won't anytime soon. Apple here is basically saying: we don't care about the serious, high-end side of things, and screw any developers who want to develop that type of software for Mac systems. If they did, they would reimplement the OpenGL API on top of Metal; it's not like they don't have the cash to pay for it.

As for proprietary gaming consoles, these are also irrelevant to the concerns here. This isn't really about games, or gaming engines. (Though when Apple finally drops OpenGL, most of the back catalogue of games will cease to function…) It's about the thousands of serious software packages out there which will no longer function on a Mac. The high-end CAD and design market. Engineering. Scientific and medical imaging. Etc.

That's Apple's choice. And it's my choice to drop Mac support in consequence. They are making it clear that the Mac is no longer the platform for professional software development through their woeful hardware and their poor MacOS maintenance strategy. The market will respond to that.

<comment><USER10> Can you give an example of a serious software package software that uses OpenGL and targets multiple platforms? I don't doubt you that such exist, I just don't know what to search for.

A quick look at for example high-end CAD that you mentioned, Solidworks uses OpenGL, but has as far as I can seen always been Windows only. Its also only lists FirePro and Quadro as recommended graphics cards which support my impression that only workstation-class GPUs have stable OpenGL support on Windows.

Autocad uses DirectX 11 on Windows, OpenGL for the Mac version, so they already use platform specific APIs.

Software with several decades old code bases, that started out with OpenGL, and perhaps even still uses some of it intermediate mode APIs or display lists, obviously have to continue to rely on it. But if you design a new piece of software today, wouldn't you want it to be able to use the graphics hardware to its full potential and use Vulcan/Metal/DirectX 12?

<comment><USER9> My specialism is scientific imaging, so here's a few examples off the top of my head:

VTK would be one. It's at the core of dozens of scientific and medical imaging applications, and is being used for new specialised applications all the time. This does sophisticated volume rendering of 3D images. Used by both open source applications and proprietary.

Or OpenSceneGraph, again the core of many applications, also 100% OpenGL.

Or Volocity, a commercial OpenGL volume renderer which originated on the Mac, later ported to Windows, which is all OpenGL under the hood.

There are hundreds of bespoke scientific and medical applications out there doing analysis and rendering of images. OpenGL is the fundamental underpinning of most of them. Scientists have been using OpenGL for decades. (The availability of OpenGL on the Mac was why many were able to switch.) Some vendors might use DirectX when Windows only, but these are a rarity outside commercial acquisition software due to the ubiquity of Linux and Macs in this domain. This is just the domain I know most about; there are undoubtedly many more in different domains.

The workstation class GPUs have some features the gaming ones don't, but it's often equivalent hardware with different drivers, or has some extended capabilities. Double-precision floats, etc. If you don't use these extra features, there's not much practical difference. The actual OpenGL implementations are generally stable for all cases in my experience. The main problem is vendor implementation differences in my experience, e.g. nVidia being laxer than AMD/ATI and allowing broken code to work which others would reject.

For new code, I'd like to say Vulkan, but the support isn't fully there yet. For example, Qt 5.12 has Vulkan support but it's not yet universally available, and it's disabled by default unless you compile a custom build from source. I'm currently just starting to get to grips with it for a new project, but it will be hard to deploy for the next year or so. The drivers are there for Windows and Linux, and with the MoltenVk on MacOS X it might well work well enough (I'm yet to progress far enough test this). Unless you are wanting to write multiple rendering backends, Metal and DirectX don't look too great for portable code. I'm hoping Vulkan will be the OpenGL replacement it's touted to be, but we'll see!

</comment></comment></comment></comment></comment><comment><USER11> Somewhat ironic that apparently a lot of Apple products have been designed using Alias, at least the original iMac, according to a biography of Jony Ive.

[https://books.google.com/books?id=CRZuAAAAQBAJ&pg=PT106&lpg=...](https://books.google.com/books?id=CRZuAAAAQBAJ&pg=PT106&lpg=PT106&dq=autodesk+alias+apple+computer&ots=Xprx2bJZaG&sig=CPJD7j6JY8TU6Jaeg7kcFkS59G4&q=autodesk%20alias%20apple%20computer&f=false#v=snippet&q=autodesk%20alias%20apple%20computer&f=false)

<comment><USER12> Perhaps we will see improvements to boot camp now.

<comment><USER13> Boot Camp works fine today. What improvements do you believe would be necessary to make it valuable to you?

</comment></comment></comment><comment><USER14> Can't blame them for not wanting to port to Metal.

However, I found that out from the comments on HN - because when I opened the page the article was covered by a full popup informing me that they 'care about my privacy'. And then they probably wanted me to agree to being tracked. Not sure because I instaclosed it.

<comment><USER15> Actually they make it super easy to say 'no to all tracking' which is very nice. Good for them.

<comment><USER16> Do they actually not use cookies though? Someone should look into all these consent pop ups and if they actually effect anything.

<comment><USER17> If they don't they can be sued for it (at least in the EU) so I imagine a company like Autodesk does check these things.

<comment><USER14> But... all they have to do is not track me... :)

</comment></comment></comment></comment></comment><comment><USER18> It's too bad, Metal has gotten very good. Blizzard ported the Mac versions of their games over to Metal a couple years ago and has been riding up against the edge of what's possible with Metal. As of the latest WoW update, Metal performance is ridiculously good — barely distinguishable from DX12 under Windows on the same hardware. It's amazing, I've never seen any game run this well under macOS.

This may have been achievable with OpenGL, but I have doubts. Should Apple have waited for Vulkan to be finished up before making their choice of modern graphics API in iOS + macOS? Maybe, but if they had, their Vulkan implementation wouldn't have been as mature as Metal is now and the existence of MoltenVK renders the whole thing moot anyway.

Which makes me wonder, why not consider porting Alias to Vulkan? I'm not sure that OpenGL has much of a future on any platform, now that most everything will be written for DX12, Vulkan, or Metal. At best, frozen-in-time support for it will remain in Windows and Linux for a few more years, but I don't see it being developed any further... didn't Apple just jump ahead to OpenGL's inevitable conclusion?

<comment><USER19> OpenGL AZDO is conceptually very near to Vulkan and DX12. Few years ago, I had an impression that Nvidia wanted to go this route, instead of Vulkan, if for nothing else then just to make advantage of their investment into OpenGL.

However, AZDO is unusable on macOS; the OpenGL on macOS is too limited to support it.

Khronos with OpenGL 4.6 made another step towards Vulkan: SPIR-V shaders. If Apple implemented 4.6, they could go all they way and implement Vulkan too.

Apple, while they released the Metal 1 first, it was quite limited and there were reasons why the release was iOS only. When they came with Metal 2, which could compete with Vulkan, Vulkan was out for a year already.

So basically they rushed to come with API, that would be exclusive to their platform and lock their developers in. There's no other use for Metal today.

</comment></comment><comment><USER20> Mac in future will only be used for iOS development.

<comment><USER21> iOS development could probably be moved web based. Would save everyone a lot of trouble.

<comment><USER22> That would be wonderful, now that I think of it. The only hard problem would be the simulator, which would probably have to run on bare metal, or as a virtual machine.

<comment><USER18> Personally I wouldn't want to be stuck with simulators only in development. Apple's iOS simulator is pretty good, but it has quirks not shared with real hardware and its performance isn't representative of real hardware at all.

<comment><USER23> Yeah, like not being able to emulate the MacBooks webcam. It's pretty dumb.

</comment></comment></comment></comment></comment><comment><USER24> > Prior versions of Alias (2019.0 and earlier) can continue to run on High > Sierra or earlier operating system versions.

> Alias is not supported on High Sierra due to a macOS incompatibility that > Apple does not currently plan to fix.

Wait, so is Alias supposed to work on High Sierra (which has a non-deprecated OpenGL) or not?

<comment><USER25> High Sierra 10.13.4 has changed the display API in some pretty fundamental ways. I'm down a screen because our iMacs can only drive 2 external displays now. DisplayLink, Duet and other exotic soft GPUs are broken.

I regret the day I agreed to this damn update.

</comment></comment><comment><USER26> Mojave only deprecates OpenGL, but it doesn't remove it as far as I understand. It will continue to ship with the (somewhat outdated) OpenGL version that macOS has provided for several years, no? Did they even try running their own product on the Mojave betas? Seems strange to discontinue a working product just because an API is marked "deprecated"?

<comment><USER27> I've been building and running OpenGL toy applications[0] on Mojave public betas without issue just to check on that. You just get lots of deprecation warnings at compile time that you can quench by defining _GL_SILENCE_DEPRECATION_. Excerpt:

        ./nsopengl_example.h:5:5: warning: 'NSOpenGLContext' is deprecated: first
              deprecated in macOS 10.14 - Please use Metal or MetalKit.
              [-Wdeprecated-declarations]
            NSOpenGLContext*     _openGLContext;
            ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGL.h:202:12: note:
              'NSOpenGLContext' has been explicitly marked deprecated here
        @interface NSOpenGLContext : NSObject <NSLocking>
                   ^
        nsopengl_example.m:97:9: warning: 'glVertex3f' is deprecated: first deprecated
              in macOS 10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION to
              silence these warnings) [-Wdeprecated-declarations]
                glVertex3f(  0.0,  0.6, 0.0);
                ^

Nothing is gone yet.

I suspect they'll proceed in a similar way as with OpenSSL, first deprecate, then remove headers, and keep the libs around for quite some time for legacy applications. In Mojave public beta _/ usr/lib_ still contains _libssl.0.9.7.dylib_ and _libssl.0.9.8.dylib_ , and it's been quite some time (El Capitan [1]) since you haven't been able to build against them.

The trickier part with OpenGL though is the graphic drivers. I suppose at some point in the future drivers for fresh new GPUs won't include OpenGL support. Maybe they'll include a GL-to-Metal akin to MoltenGL in that case, maybe not, or a third-party will create just that to run legacy applications. Anyway I bet it's a long road ahead and won't happen overnight.

[0]: [https://gitlab.com/lloeki/nsopengl_example](https://gitlab.com/lloeki/nsopengl_example)

[1]: [https://github.com/rbenv/ruby- build/issues/797](https://github.com/rbenv/ruby-build/issues/797)

</comment></comment><comment><USER28> That article is pretty salty, it seems they want Apply to supply them with OpenGL "or else". Either they are using an engine that doesn't allow for other low level rendering options or they simply don't want to.

<comment><USER29> It should be salty.

It's extremely arrogant to kill OpenGL and expect all app developers to rewrite their apps using Metal. The last I looked MacOS market share wasn't doing so well. And how much of that market is CAD?

Maybe they did a simple ROI calculation and determined it simply was not worth the development, but might have been if Apple would meet them half way and support OpenGL.

<comment><USER30> Total macOS marketshare is irrelevant. The vast majority of Windows home and office PCs are never going to install Alias. A better question is what's the relative marketshare in the 3D content creation and video production space? There I think you'll find Macs doing a lot better (or at least they were when Apple actually had a pro machine people wanted).

<comment><USER31> So Apple gets to decide if they want to spend resources to support that market (maintaining OpenGL) and Autodesk similarly get to decide if they want to support Macs (by porting to Metal). Looks like both have signaled that high- end CAD on Macs is not big enough to be worth their time.

This seems more damaging to Apple than to Autodesk. If Apple let these niche- but-lucrative markets wither away one by one, where does the Mac end up?

<comment><USER30> _This seems more damaging to Apple than to Autodesk._

I think that's very difficult for us to judge. Apple has access to far more data than we do. They may have decided that Autodesk's entire market is not worth their time.

Apple is a very strange company. Even though they're among the largest companies in the entire world in terms of value, they don't operate like a large company. They shift their product teams around all the time which seems to cause some products to get neglected for a really long time.

<comment><USER31> You're right, they're ludicrously successful so you have to figure they must know what they're doing.

It does seem like a strange strategy not to court these high-end markets, though.

As a developer, it often feels like Apple is ignoring me in favour of some nebulously-defined market of "designers". But here we have actual designers, industrial product designers, being similarly ignored.

<comment><USER28> It is very strange indeed. Especially with the advertisements on their website listing 'developers' and 'engineers' and 'artists'. At the same time, I know just as many users that have zero issue as ones that declare they do have issues. Ironically, none of them are migrating to other systems. Some mention 'others are even worse' and a lot simply don't care enough and like the way things work.

</comment></comment></comment></comment></comment></comment></comment><comment><USER3> TBH, the writing was on the wall since the announcement. Very reminiscent of situation with Adobe and Premiere, which spawned FCP and a decade-old grudge between the companies.

I have to ask this, even though I use OSX but have no idea, can drivers provided by third parties include openGL support for MacOS? Nvidia provides drivers for their cards regularly. Does it work like on other OS'?

</comment><comment><USER32> I left feedback on the page that it wasn't helpful. Saying, "Once Apple releases Mojave, no versions of VRED will run on that operating system due to the OpenGL deprecation" doesn't help their case, because it's just wrong. I do hope Autodesk is able to put pressure on Apple to continue to support OpenGL, but they have to get their facts straight.

</comment><comment><USER33> Engineers: we can do X and finish in two weeks, or we can take a shortcut and finish in one week, but the code will be tightly coupled to this particular quirk of OpenGL.

Manager: take the shortcut :)

... repeat this for 15 years ...

<comment><USER34> What particular quirk of OpenGL does Alias depend on?

<comment><USER35> Well, according to Apple, existing.</comment></comment></comment>


Age-induced accumulation of methylmalonic acid promotes tumour progression - <AUTHOR> https://www.nature.com/articles/s41586-020-2630-0 <comment><AUTHOR> _" The risk of cancer and associated mortality increases substantially in humans from the age of 65 years onwards. ...

For decades, this link has largely been attributed to increased exposure time to mutagens in older individuals. However, this view does not account for the established role of diet, exercise and small molecules that target the pace of metabolic ageing.

Here we show that metabolic alterations that occur with age can produce a systemic environment that favours the progression and aggressiveness of tumours."_</comment>


Show HN: A Set of Dice That Follows the Gambler's Fallacy - <AUTHOR> https://github.com/xori/gamblers-dice <comment><USER4> There's a probability model called the Pólya urn where you imagine an urns containing numbered balls (colored balls in a typical example, but to draw the comparison with dice we can say they're numbered 1-6), and every time you draw a ball of a certain color, you put back more balls according to some rule. A few probability distributions can be expressed in terms of a Pólya urn, see [https://en.wikipedia.org/wiki/P%C3%B3lya_urn_model](https://en.wikipedia.org/wiki/P%C3%B3lya_urn_model).

A fair 6-sided die would be an equal number of balls numbered 1-6 and a rule that you simply return the ball you drew. You can get a gambler's fallacy distribution by, say, adding one of every ball that you didn't draw. I read the code as a Pólya urn starting with 1 ball 1-N and doing that on each draw plus reducing the number of balls of the drawn number to 1.

Also related, in 2d space, is the idea of randomly covering the plane in points but getting a spread-out distribution, since uniformity will result in clusters. (If you're moving a small window in any direction and you haven't seen a point in a while, you're "due" to see another one, and vice versa if you just saw a point.) Mike Bostock did a very nice visualization of that here: [https://bost.ocks.org/mike/algorithms/](https://bost.ocks.org/mike/algorithms/)

<comment><AUTHOR> Thank you! Sometimes the hardest thing is knowing what to google!

<comment><USER5> I do a lot of furious googling thinking: "Oh man this has to be a thing but what could it be and how would someone describe it?... awe forget it."

Then months later by accident while looking at a completely different topic: "OMG there it is, the thing!"

<comment><USER6> Indeed. This happened to me the other day trying to find the name for a domino joiner while googling for biscuit joiners.

</comment></comment></comment></comment><comment><USER7> A great application for this is in randomizing playlists. My friends, who are also CS grads and should know better, have often complained that their MP3 players, CD carousels, etc play the same music too often claiming that the random is broken, when a song repeating in a short period of time or other songs never playing is what you would expect from a truly random selection. Using this algorithm, you'd be sure to hear all of your songs. I'm guessing most music services already do something like this.

<comment><USER8> This is also an example of users saying they want one thing (randomness) when really they want something else (variety).

<comment><USER9> Great example of finding what users really want as opposed to what they say they want.

<comment><USER10> This sounds like a giant strawman to me. Where do programmers get the idea that a mode called 'shuffle' would call for sampling with replacement? The obvious software analogy to shuffling would be re-ordering a list randomly, not randomly drawing from a list.

I think this whole shuffling meme started with Spotify's engineers misunderstanding what they were asked to do, then claiming their customers don't know what they want when they obviously delivered the wrong feature.

</comment></comment></comment></comment><comment><USER11> Interesting, and at first I was excited about the possibilities in something like D&D, where a series of bad rolls can have you feeling down. "I'm due for a critical hit any swing now..."

Players would love that! Make my hero feel more heroic! The inevitable comeback!

But then I thought about the inverse case -- you are doing really well, and now you are due for a failure. Or series of failures. That would feel awful.

We have a lot of emotions around dice rolling. I wonder if players really want from their dice. Would players prefer dice that are secretly unevenly weighted towards good rolls? Would they still want those dice if they knew they were weighted?

<comment><USER12> In some competitive games like Dota and LoL, the random distribution for critical hits is weighted so that it ramps up over time, resetting after a successful crit. ([http://dota2.gamepedia.com/Random_distribution](http://dota2.gamepedia.com/Random_distribution)) This both reduces the chance of two high rolls coming up twice in a row as well as long periods of low rolls.

It doesn't have the "you are doing really well, and now you are due for a failure" since "not a critical" isn't really that negative of an outcome.

For something like D&D, the same kind of "better-than-random" distribution just comes from adding dice. 4d6 is much more consistent than 1d21+3.

<comment><USER13> Dota was my first thought when I read the article. Good Dota players pay attention to their crits, and if they haven't had one in a few hits they adjust strategy with the expectation of higher damage, something you would never do if it was truly random.

<comment><USER14> Yeah I've definitely seen Arteezy on PA hit neutrals until he gets a few non- crits in a row, then go gank.

</comment></comment></comment></comment><comment><USER15> > I made a chatbot that rolled dice, and it was constantly criticized for > being "broken" because four 3's would come up in a row.

> These accusations would come up even though they (all being computer science > majors) know it's possible (although unlikely) for these events to happen. > They just don't trust the black box.

I am reminded of the approach that GamesByEmail.com used to address this criticism: [http://www.gamesbyemail.com/News/DiceOMatic](http://www.gamesbyemail.com/News/DiceOMatic)

<comment><USER16> > _As I promised earlier, if you donate to the site and are unhappy about the > rolls, let me know and I will pull a die out of the machine, melt it flat > and mail it to you, as an object lesson to the other dice. Tangible > revenge._

Hah! That might be the best donation "gift" I've ever heard of!

</comment></comment><comment><USER17> I had the privilege of studying probability from G-C. Rota. One of my favorite quotes from him was "Randomness is not what we expect", which he used to describe the phenomenon of people disbelieving that random data was actually random. Another great was "This will become intuitive to you, once you adjust your intuition to the facts."

<comment><USER18> A good way to show how the "Randomness is not what we expect" phenomenon manifests is the following.

Given a fair coin that outputs Heads (H) or Tails (T), which of the following sequences is more or less probable

HHTHTT or HHHHHH

Answer: Both are equally probable strings to be generated by the fair coin and each should occur once in every 64 sequences (~1.56%)

<comment><USER19> True But I would like to show you an interesting counterexample which requires changing the rules slightly. If we toss a coin _and keep tossing until one of the below sequences turn up_ then which sequence is more likely?

HHHHHH THHHHH

Answer: THHHHH. Only 1/(2^6) of the time it will be HHHHHH. The only way to get HHHHHH will be if the first 6 flips are heads. If you don't flip a head you must have got a tail which means THHHHH will always appear before HHHHHH.

<comment><USER20> I think the real issue that most people have understanding this stuff is that they don't have a clear grasp of dependent vs independent events.

We tend to use the fair coin or the fair die as a common way of talking about things, but I've found that this is problematic for a lot of people.

First off is the use of the word fair. People not from a background in statistics don't think of that word the way we do. They think of it as an attribute of the object itself. The the coin or die is 'fair' in the ethical sense of the word.

Second is the experiential understanding: 'This coin is fair and therefore should flip heads and tails with equal frequency. It's the same damn coin, and I flipped it a thousand times! Why are these crazy stats people telling me it comes up heads and tail equally often? It doesn't, dammit!'

What I've had some success with helping people understand independent trials is to get them to envision flipping 6 different coins at the same time. Then you can sort of walk them back into understanding that flipping 6 different coins once is no different from flipping the same one 6 times. The events are totally unrelated, and a past event is not a predictor of the future.

Plus, you can actually map out the math for them on the spot. .5 * .5 * .5, etc.

That's just my experience trying to explain things though. Would love some criticisms if there are better ways to go about this.

</comment></comment></comment></comment><comment><USER21> There was an old flash video game I worked on a long time ago where I did exactly this. I had a boss with two main attacks, and I didn't want it to be super predictable A/B/A/B, so I had it pick between A and B randomly, then reweight the probabilities, so if it picked A, instead of 50% A, 50% B it'd now be 25% A, 75% B. If it picked A again it'd be down to like 12.5% A, 87.5% B. If B then got chosen, it'd flip flop to 75% A, 25% B, etc. The result was it mostly went back and forth between the two, but would do some attacks 2 or 3 times in a row before switching back to the other.

You can actually play it right here and go direct to the Boss Fight if you wanted to: [http://briancable.com/clock-legends/](http://briancable.com/clock- legends/)

<comment><USER22> Hmm, but by the algorithm you describe you are MORE likely to get a "super predictable" a/b/a/b than you would with just an independently random coin flip each time. That is, strings of multiple As or Bs in a row is less likely with your algorithm, but you make it sound like that's what you wanted.

<comment><USER21> No, you misunderstand. I didn't want it to be always A,B,A,B, but I also didn't want it to be an even coin flip and risk an A,A,A,A,A,A,A or whatever (like in the play _Rosencrantz and Guildenstern are Dead_ ).

With my method, it was possible for the same move to be picked 2 or 3 times in a row, but it mostly went back and forth, so the player was definitely going to encounter both moves, but they couldn't know for absolute certain which move the next one would be (and they both needed you to kind of quickly get into different positions before getting hit).

The type of pattern you'd usually get with mine was more like A,B,B,A,A,B,A,B,A,A,A,B,B,A.

</comment></comment></comment><comment><USER23> A similar, simpler idea is sometimes used in games: you put all choices in a "bag", then draw from the bag until it's empty, then put everything back.

Tetris is the go-to example. Tetris has seven tetronimos, and in most modern implementations you're guaranteed to see them in sets of seven in random order.

[http://tetris.wikia.com/wiki/Random_Generator](http://tetris.wikia.com/wiki/Random_Generator)

This is pretty essential to make competitive play err on the side of skill rather than randomness: pro-players can anticipate and plan for this. For fun, here's a recent Tetris head-to-head speed-run from Awesome Games Done Quick, with pretty good narration about the tactics involved:

[https://www.youtube.com/watch?v=PeNB4w99FiY&t=1h21m15s](https://www.youtube.com/watch?v=PeNB4w99FiY&t=1h21m15s)

</comment><comment><USER24> Now I really want physical loaded dice which follow the gambler's fallacy! Is it too crazy of an idea?

<comment><USER25> You could just use a deck of cards with numbers on them. That's the simplest way to do "Gambler's Fallacy Dice" IRL. For example, there's a popular Catan expansion pack that replaces the dice with a deck of cards with numbers on them for just this reason, because in Catan each roll of 2D6 represents different regions of the map paying out so if a number never comes up it _never_ pays out.

<comment><USER26> The thing about rolling 2D6, is the distribution isn't even.

I'm not sure that factors into the game (have played but its been a while). Cards seem like a more controlled way to distribute the results with some randomness.

only one way to get a 12 (6+6) but 7 much more likely.. (6+1, 5+2, 4+3, 3+4, 2+5, 1+6)

as someone who played a bit of online backgammon back in the day, We always suspected the random dice rolls behaved differently in the game than playing in real life...

<comment><USER27> Catan cards take that in account.

They basically made one card for each possiblity of pair of dices, so there is a 7 card for 6+1, another for 5+2, and so on...

Playing with it is MUCH better than with dice... when I played with the dice that came with my copy with catan, the dice were clearly defective (rolls weren't just random-looking, they were WILDLY wrong, it rolled 10s 2 times the amount of 7s...), and the game was super boring, it would end with everyone having the same materials and not having others, so not even trade would fix the game, we had stuff like 10 turns in a row where noone had one particular item while the 'bank' ran out of the other items because everyone had lots of them.

<comment><USER28> In Catan can't you trade any 4 identical resources for any one other resource? It slows down resource acquisition but should eliminate the situation you describe!?

<comment><USER27> You can, but if I remember the resource noone had was bricks, that is very important...

So the game pace slowed to a crawl... Also, the funky dice never rolling bricks meant people would quickly rack up random resources, sometimes like 3 of each, so they ended with 9 cards, and would then lose to robber rolls (7).

Then of course in one game where this happened there was an asshole cousin that thought it would be hilarious to hog resources and make the game worse, he would spend his whole turn making 'negotiations' with everyone, and them cancelling them, wasting like 5 minutes every time it was his turn, and sometimes if 7 was taking long enough have 20 cards on his hand...

We don't play with that cousin anymore either.

But yeah, not having a way to build roads make the game suuuuuper slow.

</comment></comment></comment></comment></comment></comment><comment><USER29> This reminds me of Sid Meier's talk at GDC about having to game the random number system because of player's expectations:

[http://www.gdcvault.com/play/1012186/The-Psychology-of- Game-...](http://www.gdcvault.com/play/1012186/The-Psychology-of-Game-Design)

More often than not, true RNG in game design takes a back seat to fun.

<comment><USER30> Playerunknown's battlegrounds currently suffers from item spawns being "too random". You can go houses without finding a rifle then suddenly find 2-3 practically on top of each other.

They could do with learning a little from other games and making it a little less random.

Ultimately you can see it as a bug in human reasoning but we're the ones playing the game.

<comment><USER31> TBH I like the current uniformity of the item spawns. It varies the gameplay and forces you to adapt.

If every house had one pistol and one rifle it would get pretty dull. Raiding 3 houses and only getting a crossbow, bandages, and SMG magazines is frustrating but it's exciting. Just last night I got to #3 or #4 with a crossbow and a pistol.

</comment></comment></comment><comment><USER32> For board games, like "Settlers of Catan" where resources are generated based on rolls of 2d6, one could use an analog version of this with a cup containing 36 chits, of the numbers 2-12 according to the normal distribution, _without_ replacement. You would still get the randomness of ordering, but over 36 draws/turns would get a complete "average" distribution.

If that is a bug or a feature is left as an exercise for the reader.

<comment><USER33> [https://boardgamegeek.com/boardgame/20038/catan-event- cards](https://boardgamegeek.com/boardgame/20038/catan-event-cards)

</comment></comment><comment><USER34> I often use google "flip a coin"[1] for stupid things and the other day I was wondering why almost every single time it came up heads. I started to wonder if there was a browser rng problem or the code was crazy etc.

[1] [https://www.google.com/search?q=google+flip+a+coin](https://www.google.com/search?q=google+flip+a+coin)

<comment><USER35> Just tried it, and my first four flips were heads - you may be on to something... I'll keep flipping and come back with my results.

Update: Heads stayed ahead by a few for quite a while, until they tied at 45 each. It's a race to 50, my money is on tails - it's due for a comeback!

Update: Tails takes the lead, 46-47!

Update: 47-49 Tails is in position to strike!

Update: Tails wins! 48-50! (two more clicks to make a sum of 100 results in a perfect 50/50 split)

It's surprisingly fun to anthropomorphize heads vs tails, and commentating on their battle

<comment><USER36> Obligatory relevant XKCD: [https://xkcd.com/904/](https://xkcd.com/904/)

<comment><USER36> And for those who are really in to this topic, Taleb's "Fooled by Randomness" is great. There's a section on how financial traders often end up ranked like this. Somebody makes an effectively random bet, but it pays off big so they're treated as a genius. It made me see all sorts of organizations differently.

<comment><USER20> Taleb is the Deepak Chopra of Economics and Probability. What he says sounds really important, but is mostly a bunch of horseshit.

<comment><USER36> The guy spent years as a trader. I spent a few years working for traders. I think his analysis of the sociology and psychology of trading was spot on. That's the main content of this book, so I'm still comfortable recommending it even if he doesn't meet your standards elsewhere.

<comment><USER20> I think he's pretty much the definition of survivorship bias. And that he deeply misunderstands statistics in the same way that Malcolm Gladwell does.

</comment></comment></comment></comment></comment></comment></comment><comment><USER37> At first I was confused, because statistical models that aren't temporally independent are very common.

But it's very clear from the comments that having dice that aren't independent between rolls is incredibly in demand :o, and having the right words to google can be tricky.

(I feel like there's an important lesson there)

<comment><AUTHOR> This is what I found my University degree was best for. Teaching me what the name is, of the thing to Google in the future.

</comment></comment><comment><USER38> Video games, especially competitive ones, do this to limit the effect of randomness on the outcome of the game, while still keeping the sequence of random events unpredictable enough to "feel" random and preventing simple exploits.

DoTA2 uses a simple distribution based on the number of "rolls" since the last successful one - P(N) = P0 * N, where P0 is the base probability and N is the number of rolls since the last successful one[1].

It keeps both "hot" and "cold" streaks from being too much of an issue, although that doesn't stop players from cursing the RNG gods when they lose.

[1] [http://dota2.gamepedia.com/Random_distribution](http://dota2.gamepedia.com/Random_distribution)

</comment><comment><USER39> > I made a chatbot that rolled dice, and it was constantly criticized for > being "broken" because four 3's would come up in a row.

> These accusations would come up even though they (all being computer science > majors) know it's possible (although unlikely) for these events to happen. > They just don't trust the black box.

This reminds me of a talk [1] given at Game Developer's Conference (GDC) about the game Civilization, in which the Sid Meyer -- creator of said game -- spent a bit of the time talking about the difference between fairness and perceived fairness. The talk is only an hour long and worth watching.

[1]: [https://www.youtube.com/watch?v=AJ- auWfJTts](https://www.youtube.com/watch?v=AJ-auWfJTts)

<comment><USER40> When your battleship is destroyed by a peasant with a pitchfork, there's not a lot of perceived fairness...

</comment></comment><comment><USER41> This reminds me of an article discussing the perceived outcome of RNG decisions in video games. In many types of games, the system will display a percentage chance of success for a given action which allows the player to make risk assessments regarding possible choices. Unfortunately, the unmodified RNG behavior creates an unpleasant experience for the user because the unweighted random outcomes feel "unfair" when failure streaks pop-up, thus, game designers almost always introduce some type of magic cushioning to the RNG so that the user never faces too many repeated failures.

<comment><USER42> Folks who play Blizzard games call this the "Pity Timer". World of Warcraft, Hearthstone, and Overwatch all have some mechanic where your odds of getting a desireable thing go up if you've had more recent disappointments.

RNJesus is merciful.

<comment><USER43> It's also known as a mercy pull in kingdom hearts Union X, where after a few failed attempts of trying to get a high level medal they will guarantee you one on the next pull.

</comment></comment></comment><comment><USER44> I'm probably very wrong, but I still feel there is some undiscovered science when it comes to RNG and the fallacy of the maturity of chances ( Gambler's Fallacy ).

Einstein believed the universe was deterministic. Just because it appears to us that there is no correlation between independent events ( the roll of a dice ), does not mean that there isn't some underlaying variable that we are unable to measure or perceive which is affecting the outcome of the roles.

<comment><USER45> There almost certainly is but you can't collect the data. At some point quantum effects will come into play too.

Theoretically all physical processes are predictable, but in practice there is a limit.

<comment><USER46> > Theoretically all physical processes are predictable

If you count a radioactive decay event as a physical process, then this is not so.

<comment><USER45> I don't. Radioactive decay is practically the very definition of the quantum effects I mentioned.

<comment><USER47> Not counting radioactive decay as a physical process because you've chosen to define physical processes as deterministic is some intriguing mental gymnastics.

<comment><USER45> _for the purposes described in the comment_ \- I was quite clear that a certain level you get down to quantum effects.

But for the context of the physical processes the OP was talking about those effects are not significant and so I excluded them.

<comment><USER46> How about we replace the dice with Schrödinger's cat?

<comment><USER45> Then we're dealing with a very different thing and the conversation is therefore different?

<comment><USER46> > Theoretically all physical processes are predictable, but in practice there > is a limit.

So you defined away quantum effects as 'not physical', which most people would not agree with. How do feel about the _theoretical_ limits on measurement accuracy that also negate your claim?

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER48> I wonder if this could be / has been applied to loot tables in video games in order to keep the player interested in playing.

I've designed a few loot tables and the Gambler's Fallacy is a criticism I often have to deal with when people don't understand why a given item hasn't dropped despite them having killed a mob enough times to statistically warrant it.

<comment><USER49> on the other side of the coin, monster hunter players claim that the game actively avoids giving them items that they want in order to increase the (eventual) satisfaction. they call it the "desire sensor".

[http://monsterhunter.wikia.com/wiki/Monster_Hunter_Wiki:Mons...](http://monsterhunter.wikia.com/wiki/Monster_Hunter_Wiki:Monster_Hunter_Vocabulary#Desire_Sensor)

the studio has denied the existence of any such mechanism.

</comment></comment><comment><USER50> The quote at the end is meant as a joke but it's interesting how often this is true. A lot of magic tricks rely on being prepared for different outcomes, while often trying for the least likely one first. This unlikely outcome happens surprisingly often and therefore makes the effect even more unbelievably amazing.

I had a friend think of a playing card and any number (1-52). She picked the 6 of spades and the number 15 which is exactly the position where the card was located. It was only the third time I had done this trick with anybody.

Obviously, card and number picking is not uniformly random, especially when you influence their choice (e.g. "pick a large number"). But the odds of someone guessing the exact combination should still be extremely low.

A lot of what you see from David Blaine on TV is exactly this. He always has a backup plan but more often than not he doesn't need it.

</comment><comment><USER51> And then there's also the gamblers wisdom: If the dice was facing a 6 for too many times in a row, look for another game.

</comment><comment><USER52> It's always nagged me that statistical problems are scoped so small. Surely in saying there's 6 outcomes on a dice you'd obfuscated the billions of interactions between atoms and input possibilities in doing so. Thrower A and thrower B will undoubtedly throw slightly different which might actually constraint the outcomes and skew the 1 in 6 percentages?

It's similar to me to condensing 30 characters to 5 via an algorithm. You can go one direction but not the other and if your model was centered around the resulting 5 it doesn't really reflect what's actually happening which may skew the probabilities quite a bit. e.g. if the algorithm was "if first letter is not q, then first letter in output is q". If you were saying each has an equal percentage of occurring it'd be flat out wrong.

* I am not a statistician and have no idea what I'm talking about

<comment><USER20> For these kinds of exercises about fair dice and fair coins, it's a lot like the kind of jiggery-pokery that happens in Physics classes and stuff. "Under ideal circumstances . . .", "In a perfect vacuum . . .", etc.

Outside of games, for which this was explicitly created, these kinds of things are learning tools to understand distributions and dependent vs. independent events, and it also makes a separate point about assumptions.

In reality, if we were wanting to predict the outcome from a real dice- throwing event, we would either sample the results from actual people throwing dice, or we would simulate the results based on parameter inputs for exactly the types of things you are talking about.

Of course, no one really cares that much about dice, other than people who play board games with dice. :) So substitute any other stochastic method for generating an outcome that does matter, and the statistical approach will generally be the same: either sample or simulate.

Obviously there are exceptions, but that's really the basic idea.

</comment></comment><comment><USER53> I'm not a programmer but I've thought about this a lot. It'd be interesting to know if my simple solution here has something wrong with it.

My idea is based on time - if we assign each song to a 1/1000th of a second, we play the song that matches the 1000th of a second when the next song is called.

In this case, I'm referring to the 1/1000th of a second of current time of day. Depending on the song´s position in the second that I change tracks, is what song gets played.

A bit more randomness (if this is needed) could come if we use Pi - <USER2> example, we can run through a series in Pi which adds to the ID of the song. Differing track lengths then do the job of ensuring that we always wind up on a different song in the loop.

The above seems to my layman's eye to be a simpler solution, at least.

</comment><comment><USER54> This shows up a lot (predictably) in actual games, e.g. Hearthstone sells you digital cards, and the randomization specifically guarantees that the time between rare cards is capped [1].

Having unusually bad luck (e.g. opening 100 packs and not getting a single legendary card, when the average would be every ~20 packs) feels bad and probably loses Blizzard a customer, so the solution is to cut off the downside tail of the distribution.

[1] [https://www.reddit.com/r/hearthstone/comments/3z7jyh/pity_ti...](https://www.reddit.com/r/hearthstone/comments/3z7jyh/pity_timer_on_packs_opening_and_the_best_strategy/)

</comment><comment><USER55> A simpler (albeit quite deterministic) way of accomplishing this is to use an LFSR [1] or the CRC [2] of an incrementing counter. Such a sequence of values "looks random" under many measures but also has the probability that you _will_ eventually get an even distribution of values (after the period of the counter).

[1] [https://en.wikipedia.org/wiki/Linear- feedback_shift_register](https://en.wikipedia.org/wiki/Linear- feedback_shift_register)

[2] [https://en.wikipedia.org/wiki/Cyclic_redundancy_check](https://en.wikipedia.org/wiki/Cyclic_redundancy_check)

</comment><comment><USER56> How exactly does the roll() method work? Can't seem to parse the meaning of `runningSum` and `mark`.

      roll() {
        const sum = this.state.reduce((p, c) => p + c, 0)
        const r = Math.random() * sum
        let runningSum = 0
        let result = -1
        for (let i = 0; i < this.state.length; i++) {
          const mark = this.state[i]
          runningSum += mark
          if(r < runningSum && result === -1) {
            result = i
            this.state[i] = 1
          } else {
            this.state[i]++
          }
        }
        // Add 1, so the die roll is between 1 -> size of die
        return (result + 1)
      }

<comment><USER56> Ok — I think I've figured it out, but let me know if I've gotten anything wrong:

At the outset, `this.state` is initialized as an array of `1`s — [1, 1, 1, ... , 1] — the number of `1`s is based on the `size` parameter passed to the `Die` constructor. So for a 4-sided die, `this.state` would initially be `[1, 1, 1, 1]`.

`sum` is the accumulated sum of `this.state`, but it helped me to think of the `sum` variable as a number line. Continuing with the 4-sided die case, we'd have a number line of length 4 at initialization (sum of `[1, 1, 1, 1]`).

In the context of a number line, though, `this.state` can be thought of as giving the geometric positions of each possible result. `this.state[i]` simply gives the length of the valid region for a certain result. At initialization, each result of `1` to `4` of our four-sided die would have a length of 1 on the number line (again, `[1, 1, 1, 1]`).

In concrete terms, the region [0, 1) on the number line would yield a roll of `1`, the region [1, 2) would yield a roll of `2`, ... , the region [3, 4) would yield a roll of `4`.

With that in mind, we can think of `r` as choosing a random point on the number line between 0 and the end of the number line. At initialization, it simply chooses a point on [0, 4), since 4 is the length of our number line.

`runningSum` is our location on the number line. The code chooses a result here using the boolean expression `(r < runningSum)`, but it helped me to think of it in flipped terms: checking if `runningSum` is greater than or equal to `r`.

In essence, we're traversing the number line starting from 0.

Back to our four-sided die example: let's say `r`, the random point on the number line we got, was 2.5. At initialization we'd start by checking the region of the number line where `1` would be our result. Since `this.state[0]` (the length of the valid region for the result `1`) is 1, we can say that if we choose a point randomly on the number line [0, 4) and it is on the interval [0, 1), our roll is a 1.

However, 2.5 is not on [0, 1), so we add the length of the region where `1` is valid to `runningSum` (our location on the number line) so we can move on to the next region - the interval where `2` is our result. The length of this interval is stored in `this.state[1]`, and is also equal to 1 (`this.state` = `[1, 1, 1, 1]`). In terms of our number line, the valid interval is thus [1, 2). At this point, our location of the number line, `runningSum`, is 2: still less than 2.5.

Next, we'd get to the region for the result `3`, `this.state[2]`, and we'd be at [2, 3) on our number line. At this point, our `runningSum` (location on the number line) is 3, which is greater than `r` (the randomly chosen point on the number line), 2.5, and we have our result. (sidenote: the variable `result` being equal to `-1` is a sentinel value and prevents `4` also being considered a valid roll by virtue of it being greater than 2.5 as well. After this iteration, `result` is set to `2` - changed to `3` in the return statement).

The "magic" of the die comes in when traversing the number line over the non- valid regions, however. While we're traversing the number line, we're also resizing the valid regions for each result and extending the line for the next roll. If we go back to the example in the previous paragraphs with the 4-sided die, we saw that since `r` (our randomly chosen point on the number line), 2.5, was not on [0, 1), the result of our roll was not `1`. To increase the likelihood of `1` in the next roll, we increase the length of the number line and the region where `1` is our roll: `this.state` becomes `[2, 1, 1, 1]`, the valid region for a roll of `1` becomes [0, 2), and the size of the number line grows to 5 (however, this expansion of the number line does not apply to the current roll).

At the culmination of our first example above, `this.state` would be `[2, 2, 1, 2]` — we'd increase the size of the valid region for each result except for `3`, our result from the previous roll. For the next roll, we'd choose a random point on the number line between 0 and (2 + 2 + 2 + 1 = 7). In terms of probabilities, another `3` would be half as likely as a `1`, `2`, or `4`, independently.

</comment></comment><comment><USER40> On a related note, a colleague once worked at a place where they did this for on-call: Everyone has an on-call score. Every week, the person on-call had their score set to zero, and everyone else incremented by one. You could plan out the next couple of months this way, and it provided an elegant way for new hires to take their place - they start at zero, and were generally familiar enough by the time their number came around.

There were some housekeeping rules to work around the organicness of human life - if someone went on holiday they kept their score, for example - <USER3> overall it seemed to work.

</comment><comment><USER57> How do I run this code? I thikn I succesfully installed the package with npm. There were some warnings but no error. But how do I run:

> const RiggedDie = require('gamblers-dice')

> const die = new RiggedDie(20) // for a d20

> console.log(die.roll()) // 1 -> 20

> console.log(die.roll()) // keep using the same instance

Do I put it in a file? Do I copy paste it into a REPL? If so what provides that REPL?

I am always surprised when sample code providers assume I know their languages ecosystem.

UPDATE: Apparently I can use "node" as a REPL for this.

</comment><comment><USER58> This "unfair RNG" issue was big in Dota 2 (a popular video game) for a while. They ultimately implemented something similar and AFAIK now all "random" effects use it.

<comment><USER59> I googled "RNG" because I wanted to know what it meant, but was presented with an interactive widget that generated numbers.

<comment><USER60> RNG stands for Random Number Generator. It is used colloquially, in gaming, to refer to the probability of certain random events or the underlying implementation of them.

<comment><USER61> In its most personified form, the RNG transforms into RN Jesus to whom you pray for good video game luck.

</comment></comment></comment></comment><comment><USER62> Just wanna say: I _love_ this.

</comment><comment><USER63> Kudos for the "I don't get it" section.

</comment><comment><USER64> In 2010 I asked a similar question on StackOverflow for choosing the option that would have the correct answer in multiple choice tests: [https://stackoverflow.com/questions/3099153/better-random- fe...](https://stackoverflow.com/questions/3099153/better-random-feeling- integer-generator-for-short-sequences)

</comment><comment><USER65> I like to think of this as "human random". It's easier to get along with people using this type of algorithm.

</comment><comment><USER66> This will be great for game developers as many a player has complained that the RNG wasn't "fair" because they got so many fails in a row or never saw a critical hit or whatever, even though it was mathematically correctly random. Thanks, looking forward to using it!

</comment><comment><USER67> Sure, the Gambler's Fallacy has worked out poorly in the past... but doesn't that mean it's due?

</comment><comment><USER68> This reminds me of the first scene in Rosencrantz & Guildenstern Are Dead. [https://www.youtube.com/watch?v=RjOqaD5tWB0](https://www.youtube.com/watch?v=RjOqaD5tWB0)

</comment><comment><USER69> The NBA Draft Lottery is similar in spirit:

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

</comment><comment><USER70> Bingo cards (the real ones, not the theoretical ones) often have human interaction as one of the steps in their creation. This is so they appear random, distinct, without patterns, etc.

</comment><comment><USER71> A good application for this would be prevent "Starvation" when doing random rewards in a video game. For instance, if a special item is to be dropped after defeating a boss...

</comment><comment><USER72> reminds me of a very interesting demonstration from martin gardner. draw a 6x6 grid, and write a random digit in each cell, proceeding row by row. now count the number of pairs of consecutive (x, x) going horizontally versus vertically; you will almost always get doubled numbers in the columns because that's how random numbers work, but almost never in the rows, because when people are trying to generate "random" numbers by hand they avoid runs or other patterns.

</comment><comment><USER73> Random question I've always had issues resolving: if the Gambler's Fallacy is real, how can you detect loaded dice?

</comment><comment><USER74> This actually seems like it would be pretty good for applications like games or playing random songs.

</comment><comment><USER75> Can someone explain to me why there is such a large discrepancy for the different sides for math.random()? seems fairly large

<comment><AUTHOR> It's actually not that bad. The graph just emphasises the subtle differences. The worst one (a 10) was rolled 696 times extra over the expected number of 100,000 rolls. That's like 0.3% deviation.

</comment></comment><comment><USER76> I think they didn't trust your programming skills as much as the possibility of absurd sequences :D

<comment><AUTHOR> Unfortunately I think you're right.

</comment></comment><comment><USER77> "A terrible idea is born." :D I can only imagine what will be made on top of this.

</comment><comment><USER78> Finally, Spotify's shuffle algorithm can be fixed! Thank goodness you created this.

</comment><comment><USER79> Eh, I thought this was something more mathematical, like non-transitive dice ([https://en.wikipedia.org/wiki/Nontransitive_dice](https://en.wikipedia.org/wiki/Nontransitive_dice)). Apparently it's... a weighted random number generator? in node.js?

<comment><AUTHOR> Yep it's nothing fancy. But I've yet to have seen it done before.

</comment></comment><comment><USER80> Pshaw. Make real dice that do that and I'll get excited.

</comment><comment><USER81> This is actually useful for many rpg games.</comment>


Mongoose IoT Platform 1.1. Release – Open source firmware and cloud - <AUTHOR> https://blog.cesanta.com/mongoose-iot-platform-1-1-release <comment><USER2> Curious if there is a repository for the source code.

<comment><AUTHOR> Check it out on GitHub: [https://github.com/cesanta/mongoose- iot](https://github.com/cesanta/mongoose-iot)

<comment><USER2> Thanks. I could not find a link on the website.</comment></comment></comment>