Game Programming Patterns: Event Queue (2014) - <AUTHOR> https://gameprogrammingpatterns.com/event-queue.html <comment><USER2> Reminds me of the excellent post about the architecture of multi-player in the original Age of Empires game:

[https://www.gamasutra.com/view/feature/131503/1500_archers_o...](https://www.gamasutra.com/view/feature/131503/1500_archers_on_a_288_network_.php)

You had high-ping 28.8k internet, and you wanted to be able to have immersive battles in a world with hundreds of units controlled by several players. There's no way you could send real-time information about the status of every object in the game. So they didn't. They made the game simulation completely deterministic and then simply shipped user input around on the network. User input was processed on a slight (couple hundred milliseconds) delay (to allow for network transmission speeds) and executed simultaneously in "game time" on everybody's machine, so the simulation stayed in perfect sync. Voila, no worrying about lag.

<comment><USER3> I recall that Supreme Commander used the same technique, a fully deterministic sim run in lockstep by all multiplayer peers. For it's era, it had very very high scale for an RTS game. (thousands of units and enormous game maps (the biggest of which took 15+ mins to send naval units across)

If I recall correctly, there was another benefit. You could save a multiplayer game by just having all peers dump the current game state to disk and resume it later. Since a big SupCom game could take HOURS this was a great feature.

However, there were 2 issues with SupCom's implementation.

1\. It wasn't perfect and sometime hours deep into a big game, you would get a "desync" error and it was unrecoverable.

2\. Everyone needed to be able to run the sim at the same speed. So the game could only progress at the speed of the slowest player's computer. And SupCom was VERY compute intensive.

<comment><USER4> I had no idea that supcom worked that way! Thanks for the insight.

Your comment brings back fond memories of playing huge supcom games at a local LAN cafe. Those were some of the best times I've had gaming.

<comment><USER3> I couldn't count the number of hours I spent playing that game with friends. Never played anything else like it!

</comment></comment></comment></comment><comment><USER5> If anyone is curious, one of the fastest multi-threaded queue implementations out there is the LMAX Disruptor.

[https://github.com/LMAX-Exchange/disruptor](https://github.com/LMAX- Exchange/disruptor)

[https://github.com/LMAX- Exchange/disruptor/wiki/Performance-...](https://github.com/LMAX- Exchange/disruptor/wiki/Performance-Results)

I've started using a variant of this in my .NET Core projects and have found the performance to be astonishing.

<comment><USER6> Jonathan Blow warns against threaded queues in game development, as normally simulating your world isn't the bottleneck (rendering is) and it will just cause a fair bit of unexpected behavior/debugging

<comment><USER7> Indeed, lot of games are actually single threaded.

<comment><USER8> In recent years there has been a trend shift away from this, at least in the AAA engines, towards a job system. This makes sense: you have a thread per core and you create jobs to "go wide" when you can. See for example Unity's Job system it's the GDC talk by Naughty Dog from a few years ago.

The big games will also prepare data for rendering in parallel (eg culling and sorting and whatnot, although much if this is also done on the GPU).

(Going by GDC talks, the rendering teardown articles and just what I see online from Unity/Unreal. I don't work in games myself)

<comment><USER7> It's true but lot of the main area don't multi-thread well like AI and physics.

<comment><USER9> I don't know why AI shouldn't thread well, assuming there is more than one actor. As long as they are operating over an immutable view of the game state, each actor should be able to plan independently and enter its commands independently. Likewise, there are probably some tricks you can do with physics. And anyway in most games interactive physics is only done for a few objects in the game world, and those objects are often not interacting with each other, at least not physically. You could cluster the objects that can affect each other and then do each of them single-threaded.

<comment><USER10> > As long as they are operating over an immutable view of the game state

That's a big issue. There is a surprising amount of back and forth between objects in a single step of gameplay/AI.

And, generally gameplay code tends to be a big mess of wild and ever-changing requirements from gameplay designers, extreme time crunch and short term (1 game then burn it) goals. Ivory tower software architecture it is not...

Clustering physics into "islands" is common practice though.

<comment><USER9> I'm not a game dev but I do know how software can become a mess. I think engines that are used by many games have a chance to push good practices here.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> One think that would make wonder is a company wide event queue.

Just imagine all the things that it would be possible to make automatic if all the events that happens inside a business environment where in a queue.

And don't even think about how it would be great if the same queue were open to outside providers.

<comment><USER12> That's called an ESB (enterprise software bus), a lot of companies have that, and there's a lot of softwares already on that space (IBM has quite a good market share there). Some companies do roll their own though, I've seen quite a few implementing ESBs on top of 0mq for instance.

My previous company was doing trading and made the outgoing orders available on the ESB. It's was quite handy since all teams could subscribe to the trade topic and do their own processing: trade checks, accounting, risk, etc.

It's a bit old school though, I mainly see old corporations with that architecture. The thing is, it ages quite badly most the time.

Fast forward 5 years, and every single team is publishing stuff on the ESB "cause it's super easy to publish and consume data from the ESB". Before you know it, you have a full team dedicated to scaling and maintaining the monster.

<comment><USER13> Do you mean that these scaling problems hapenned because ESB was misused? Or would it occur with any architecture or architectures (if different teams used different instruments) just because of sheer volume of data that needs to be processed by business logic?

May be I'm bad at phrasing this, but the point is, sometimes you have perfomance problems because you could write better code, or use better tech, or tweak requirements a little bit, or do something else a little smarted. But sometimes you have perfomance problems simply because you just do a lot of actual work.

<comment><USER12> I think these problems occurred because an ESB is too easy to over-use.

Once you have it, it's very tempting to use it for everything. But of course the more you use it, the more features it needs to have.

Let me illustrate that with a example compiling some of the patterns I have come to see at companies that overly used their ESBs:

Say Bob is working at a trading company and sets up an ESB where he publishes the daily trades of the company.

Soon, the trading desk learns about that, and decide that it's actually cool to use this for trading, they just have to listen on the ESB, and send the trades accordingly. That's the error pattern 1: making the ESB business critical.

The next day, the risk team learns about that ESB thing, and decide its very handy to perform post-trading checks by just listening to the trades flowing on the ESB. So they setup a system that listens for trades on the ESB, check that the trade is compliant with some limits, and send an other message on the ESB to let everyone know that this trade is validated. This is error pattern 2: cascading messages triggered from other messages.

The week after that, the security team learns about the ESB, and decides its very insecure to let anyone see the trades of the company, so they start implementing access control on the ESB. This is error pattern 3: now you have an overly complex layer on top of the ESB to decide who can see what and who can publish what.

Rince and repeat patterns 1, 2,and 3 for 5 years and here is the situation you end up with:

\- The ESB is not the easy and handy system it was in the beginning. Since it has become the de-facto standard for publishing information in the whole company, it has to support features for _all_ the company use cases. There is access control to publish per topic, access control to listen per topic, multiple bindings of varying quality for each technological stack/language that each team in the company is using. The company of course is not capable / prepared to maintain a software of this scope, so the ESB is crippled with bugs that nobody can fix, because, you know, the infrastructure team cannot fix their groovy scripts using the ESB cause the guy that wrote them left. And the marketing team has some interns using the excel plug-in but they don't have time to rewrite them this year. The ESB is now partly un maintained, because the company relied totally on it without having the capacity / willingness / foresight of understanding how intricate it can be to update something that everyone use.

\- The ESB is now very slow, because it was so tempting to publish anything of various interest on it that everyone did it. The problem is that the ESB is also critical for the company, so the whole flow of message is now slowly moving and overflowing, requiring endless tuning and tentatives at scaling it better. Of course 80% of the messages on the ESB are actually not listened to by anyone, but since nobody really knows who listens to the published messages, it's very tempting to just _not_ stop programs from publishing, ever, because god knows if some random team at the other end of the company might have a program reading these messages.

\- You most likely have now an IT team dedicated to maintain the ESB. They are squeezed and pressured by the business teams to keep the ESB fast and easy to stable without requiring them to recode all the crap they plugged on it. On the other end, the other IT teams are pressuring them to update the ESB to support <place your language/stack here>. Of course the ESB team has no incentive to make any improvement whatsoever to the ESB, because that would definitely crash most of the crap the less technical teams of the company plugged to it. But the ESB team is the de facto guardian of the temple of the ESB, so everyone ends up frustrated by the situation.

\---

I'm not sure I did a good job at explaining the various problems here, but basically, the one size fits all that ESBs are promoting is often not a future proof choice.

The reality is that you don't want your whole company coupled to a single system like that. Otherwise your system will be as good as the worst user of it.

<comment><USER14> FWIW, I worked at a trading firm that had a very tidy and long-lived ESB that I found to be a joy to work with.

-but-

My experience there 100% confirms what you say about it not being something that scales well.

It was a relatively modestly sized firm by headcount, as trading firms go, and there was a corporate culture of absolutely intense inter-team and inter- departmental communication. One absolutely would not dream of subscribing to an event stream without first talking to the team that maintained the program that published it. Any changes to the event stream - both the grotty little details about what was being published and how, and the grotty little details about what was being consumed and how - would be preceded by a discussion among all the people who were working with it, to make sure that everyone involved continued to have a complete picture of the interactions involving it.

That level of communication, which I do believe was essential to the bus's long term success, just wouldn't scale to a large company. Nor could it have been maintained at a company that had a more relaxed attitude in general. Nor could it have been maintained at a company where programmers are allowed to believe that most of their time at the office can be spent with hands on a keyboard.

<comment><USER15> > _That level of communication, which I do believe was essential to the bus 's > long term success, just wouldn't scale to a large company_

What _would_ though? An ESB could be a way to enforce a standard and slow down gung-ho devs & teams using ad hoc solutions for every problem. But say an ESB is not the solution -- what is? As the company grows, overhead and friction become more important. I'm not sure "every piece connecting to every other piece in whatever way" would help with scale, rather than compounding the problem...

<comment><USER14> IMO, there is no software solution, because it's not a software problem, it's a social problem.

As far as specific things to try go, domain-driven design is my personal favorite off-the-shelf mental framework for dealing with these sorts of things. Especially the concept of _bounded_ contexts. Embrace Conway's Law; recognize it's not a criticism, per se, it's also a scaling strategy.

<comment><USER15> Fair enough. I agree partially: it's a social problem. Thing is, _software engineering_ deals with social problems too: those related to development.

I've never seen DDD successfully used in any company I've worked in, but that's probably a shortcoming of my own experience. (Likewise, I've never seen TDD or Agile or lots of things people often mention in their blogs successfully used. Again, this is probably my own problem!).

addendum: to be fair I've never seen a completely working ESB either. Always a plan to build or deploy one, never the finished thing ;)

<comment><USER14> I doubt it's your own problem. The thing about methodologies like DDD and Agile is that they're not just a development practice. They're also (in my opinion much more importantly) frameworks for how the entire company interacts with the dev team.

I see them fail more often than not, too, and one thing that's consistent about every failed implementation I've witnessed first-hand is that non- developers who are involved in or influence product development weren't engaged with, bought into, or properly trained in the framework.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment> Const-me Good article.

I'd like to add that similar queues are widely used in all multimedia, not just games.

This library [https://github.com/Const- me/Vrmac/tree/master/VrmacVideo](https://github.com/Const- me/Vrmac/tree/master/VrmacVideo) uses queues to coordinate 3 threads, one decoding video by pumping V4L2 kernel queues, another one decoding audio and playing it with ALSA, and the main thread rendering frames with GLES. Two of my queues are thin wrappers around mq_send / mq_receive Linux APIs.

<comment><USER16> This is why I love game programming. You think that's what you're learning and then find out the same techniques are useful all over.

</comment></comment><comment><USER17> not to be overly pendantic but events and messages mean pretty different things and have different applications. Same thing with queues and buses.

I suspect the author knows more about this than me but plays a little fast and loose in their explanations. I feel it's important to have disipline in our vocabulary so that people learning the material can participate in more advanced discussions as they grow.

That said, I really appreciate the overall content and using the context of games for broadly applicable concepts is a great way to promote them (and funny as generally commercial games have some of the loosest "structure" of any code I've seen).

<comment><USER18> _not to be overly pendantic but events and messages mean pretty different things and have different applications. Same thing with queues and buses._

I agree with what you say. But I'd add the suggestion that this depends on the context to some extent. For example, in the world of hardware and electrical circuits, a "bus" and a "queue" have almost no connection at all. But in the world of enterprise software, an "enterprise service bus" is often thought of as basically "a bunch of queues and a message router". Of course that's imprecise as well, since it ignores orchestration... which just goes to show even more how fuzzy some of these terms are in practice.

 _I feel it 's important to have disipline in our vocabulary so that people learning the material can participate in more advanced discussions as they grow._

I generally agree, but I think this may be a case where "that ship has sailed." :-(

</comment></comment><comment><USER19> An aggregate of the previous posts:

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

This gets posted very often.

...it has some interesting content, to be fair, but I think there not much left to rehash again.

It hasn't changed since 2014.

<comment><USER18> _It hasn't changed since 2014._

I'm pretty sure there are a lot of HN users today who weren't here in 2014.

<comment><USER19> ffs. Read the link before you post. Posted in 2014, 2014, 2014, 2014, 2013, 2017, 2018, 2019, 2020.

\--> [https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...](https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=gameprogrammingpatterns.com&sort=byDate&type=story)

Some kind of link from this gets posted every 2-3 months or so, since it came out. I appreciate you haven't seen it before... but.... this gets posted _a lot_ here.

The previous (635 point) thread was literally 3 months ago ([https://news.ycombinator.com/item?id=23203699](https://news.ycombinator.com/item?id=23203699)).

<comment><USER20> Well, I've missed it. There are times I read HN on daily basis and times when I skip for weeks or even months, so I appreciate the reposting. Especially because it is an interesting read.

There are a lot of articles being posted and so even if there were a feature "here is what you missed" I would not have used it :)

</comment></comment></comment></comment><comment><USER21> on a related topic, I have often wondered if studying Discrete System/Event Simulation help with game design and implementation?

Does DES have some deep magical tricks or it is just plain commensense type of discipline?

</comment><comment><USER22> Overall this is a great description of queues and why they are used.

</comment><comment><USER23> Anybody using the Actor Model for games these days?</comment>


All about Two-Phase Locking and a little bit MVCC - <AUTHOR> http://www.cubrid.org/blog/cubrid-life/all-about-two-phase-locking-and-a-little-bit-mvcc/#.UMbtXmXG1R8.hackernews <comment><USER2> This was a pretty good presentation of two-phase locking, but I would have liked a discussion of the pros and cons of each approach.</comment>


Show HN: Better Technical Interviews - <AUTHOR> https://interviewsy.com/

<comment><AUTHOR> Decided to open up my side project I spent the last few months on for free. If it gets to expensive too host I might look at charging but otherwise, enjoy. And please use the contact link to send any feedback or feature requests. Thanks.</comment>


Support for gun control in America at a 50 year low. Are video games the cause? - <AUTHOR>

I just read this article http://www.politico.com/news/stories/1011/66874.html
In 1959 60% of people supported a handgun ban. Now only 26% are in favor.
Who else thinks this is because those of us who grew up playing video games are more comfortable with guns?
A bit of anecdotal evidence--Many of my otherwise very liberal friends own guns or are comfortable with them because they were exposed to them in call of duty, not by their parents. <comment><USER2> Without reading the article, if you pick those two data points (1959 and "today") two very big things happened:

A big violent crime increase (if for no other reason than the baby boom) plus the perception of it and a breakdown of the criminal justice system in the '60s and '70s. Back in the '50s "juvenile delinquency" was the big issue and we did have some tools that tried to deal with it, but those were largely discarded, plus they don't apply beyond age 18 or so. ADDED: Also note the deinstitutionalization of the dangerously insane which started in the '60s and '70s, they're now dumped on the streets or into jails and prisons.

A national sweep of "shall issue" concealed carry licensing regimes started by Florida in 1987 such that we went from 10% of the population being able to carry concealed to 65% today (not sure if that includes Wisconsin, which flips from no issue to shall issue November 1st). And of course every prediction of the gun grabbers that this would result in a bloodbath not coming to pass.

Plus the baby boomers graying; my SW Missouri concealed carry class was overwhelmingly early middle aged on up. As you get older, the reality and perception of your ability to defend yourself and your loved ones without a gun (America's martial art, after all) goes down. Heck, if you're like me you, growing up with guns and hunting, you didn't buy them once you were on your own until you had someone else to protect.

Many have commented on video games having an effect and I believe it, but I think the numbers of people influenced by them are too small as of yet to have had this great a change in _revealed_ public opinion (I don't entirely trust any survey that asks questions about guns and I'll note that outside of the recent meaningless SF handgun ban vote (because California has preemption) no referendum on banning handguns has _ever_ passed in the US, not even in Massachusetts in the '70s).

We (in the gun community) believe video game fans are an ever increasing important part of "Gun Culture 2.0" and they fit right in with its emphasis on self-defense and the many newer shooting sports that are both oriented towards that and that are for most people more fun than punching holes in paper. For example, "three gun" competitions, rifle/carbine, shotgun and handgun. (In the hunting area, metallic silhouette shooting <http://en.wikipedia.org/wiki/Metallic_silhouette_shooting> is another example (although I suspect that's fun for just about any non-vegetarian :-), and of course wing shooters have had clay pigeons to shoot at for a very long time.)

<comment><AUTHOR> According to the article. "The trend did not appear to be related to...any major shifts in American attitudes towards crime, fear of time, or reports of being victimized, reports Gallup."

I thought that at first as well, however.

<comment><USER2> Well, a good part of it could be a reversal to the American norm; American gun control has gone through these phases, only the first of which could be considered legitimate:

Pre-Civil War suppression of dueling.

Post-Civil War suppression of freedmen, despite the 14th Amendment.

Starting around the turn of the last century, measures against recent immigrants (in the case of NYC, one set of older immigrants (the Irish) against others (principally the Italians), hence the patrimony of the _Sullivan_ Law).

Following that, crime was the excuse (the Roaring '20s and Prohibition) and all but the elite were the target, and this just continued to increase.

With the exception of a counter-reaction to the Black Power movement and the related big riots of the '60s. Keeping inexpensive guns out of the hands of blacks was an explicit goal in this period.

Followed by more of the middle of the century stuff peaking with the Clinton "assault weapons" "ban" that finally started causing tremendous political damage, culminating in Gore's loss in 2000 (not the only reason of course, but one of several that if not for any of them he would have won).

Since them, at the national level outside of safe seats (Schumer, DiFi (well, maybe not in 2012)) gun control has become another 3rd rail of American politics.

And the gun culture's counter-revolution has been quite successful, among other things re-norming the ownership of guns. And these video games haven't hurt one bit.

One thing I didn't mention but that might be relevant is the sharp decline in trust of our ruling class, who's fruits were are enjoying at large scale in the Great Recession and that otherwise rather resemble this bit from the Deceleration of Independence: " _He has erected a Multitude of new Offices, and sent hither Swarms of Officers to harass our People, and eat out their Substance._ "

But it's not so much that as the shear ineptness of our ruling class. No one with a clue (often requiring some time in the real world) and the courage to face the facts is confident that this ruling class is a good steward of the nation's future, that we can trust them to take care of us. We're pretty much on our own until (ideally) we have a Pareto circulation of elites, and much can go wrong until then and after then.

I could go on but I think you get the idea. What I'm expressing should get a hearing from people who are attracted to a site that's dedicated to people not working for the man....

<comment><AUTHOR> That was a Very interesting brief history of gun control. I've always been hostile to gun control, because I believe in the gun's ability to act as an equalizer--I believe it was a prerequisite for a modern, large scale, egalitarian society (well _more_ egalitarian society anyway). Any recommended reading on the history of gun control?

I'd also like to see a study on gun control support in other countries from the same time period.

<comment><USER2> For the former, I need to look around, I've been fighting it since the early- mid '70s, not long after sugar price supports destroyed the moonshine industry and the BATF was in danger of being downsized because their Revenuers were out of a job. But they had this shiny new Gun Control Act (GCA) of 1968 which _completely_ changed the legal regime for gun sales and they preceded to use and abuse it heavily.

For the latter, this book is supposed to be good, probably the best in breadth, I've read quite a bit of the author's words and he's honest and very good, and the used price is right: [http://www.amazon.com/Samurai-Mountie- Cowboy-David-Kopel/dp/...](http://www.amazon.com/Samurai-Mountie-Cowboy-David- Kopel/dp/0879757566/)

I have to run right now, I'll see what I can come up with later (you might want to add your email address to your "about" entry to make it easier to contact you).

And your point about "a modern, large scale, egalitarian society" is spot on: "God created men, and Samuel Colt made the equal" is the old saw. Adjust as desired, e.g. the feminist version is "created men and women"....

<comment><AUTHOR> Thank you very much for the recommendations. I'll have some time to read in a month or so. I'm taking the Stanford A.I., machine learning, and database classes at the moment so they are monopolizing all my free time.

I've also taken your advice and added my email to the about section.

</comment></comment></comment></comment></comment></comment><comment><USER3> Some other plausible explanations:

Gun control is often motivated by racism; as our society has become more tolerant, racism has lessened, and so has gun control.

It's become obvious that gun control doesn't work. The cities and states with the toughest gun control laws have the worst crime. One might expect that, short-term (e.g., cities with bad crime would enact gun control laws) but over decades, if cities like Chicago, New York City, and Washington DC where handgun ownership is effectively impossible haven't see giant decreases in crime as a result of their gun bans .. the only reasonable conclusion is that the ban isn't working, and is either totally ineffective or is causing only bad side effects.

Over the past 20 years, concealed carry of handguns has become politically and socially uncontroversial - "shall-issue" concealed carry permits (which work like drivers' licenses - if you are of age, pass a test and undergo instruction, and don't have a criminal history, you're good) are now the law in approximately 40 of 50 states, and we haven't seen the streets run red with blood. Ordinary people are legally carrying guns when they want to and we haven't fallen into some Mad Max world of road warfare. Because people now, themselves, own and carry a handgun - or know someone normal and sane who does - the overinflated scare stories of the gun ban lobby have been revealed as the products of fevered (or racist) imagination and hence rejected.

<comment><USER2> Agreed; the first point is sometimes called the "Don't Scare White People" principle and as far as I can tell the bulk of US gun control has been racist. See elsewhere in this discussion for a good starting essay on the subject.

Although I'd say that concealed carry is still pretty controversial, e.g. watch the progress of the national reciprocity bill (I believe based on the "full faith and credit" section of Article IV of the Constitution) that just exited the House Judiciary Committee on a party line vote.

</comment></comment><comment><USER4> Perhaps the erosion of our other freedoms has made us vlue the ones we have left?

<comment><USER2> Indeed; here are some related items about that:

9/11, both the attack and the perceived overreaction (or at least the security theater part of it) did result in many people changing their minds about self- defense and so on. The Katrina gun confiscations, some caught on video, also had an impact. For that matter, as more and more excesses of the police get caught on video ... you'll note that in the US Google got a lot of takedown requires for those and refused ... well, those don't make people feel more secure.

Take your pick of the Great Recession and/or the election of Obama, who's history _prior_ to 2008 was relentlessly anti-gun except for HR 5441 in 2007, that both outlawed Katrina style confiscations and critically provided a private right of action against those violating it. Non-hunting gun and ammo sales went way up _and are still higher than before then_ , even after we've seen that Obama in action is no more anti-gun than George W. Bush. (Note that "W", like Obama, was in favor of a renewal of the "assault weapons" ban, which lapsed while he was in office, and again, no blood in the streets.)

The fact that despite these hard times people are still, 3 years later, buying more guns and ammo is pretty amazing.

I'll close with two factoids:

The last time I checked we buy 9 _billion_ rounds of ammo per year.

Economically, the shooting sports are bigger than golf.</comment></comment>


Ask HN: What are you working on and why is it cool? - <AUTHOR> I'm working on Sametab.com – A chrome extension to share company announcements in your coworkers' New Tab.<p>It's cool because it's a simple way to share instantly important knowledge with your team and maintain a goal-oriented mindset. <comment><USER2> A parser for orgmode. I'm tired of everyone else's opinionated way of doing it. So now I'm going do it my own opinionated way.</comment>


GitHub uses Datasette to publish an SQL-enabled interface of Covid-19 data - <AUTHOR> https://covid-repo-data.herokuapp.com/covid_sql/latest_data <comment><AUTHOR> For people who don't know what Datasette[0][1] is, it's a tool for exploring and publishing data, based on SQLite.

From the README:

> Datasette helps people take data of any shape or size and publish that as an > interactive, explorable website and accompanying API. Datasette is aimed at > data journalists, museum curators, archivists, local governments and anyone > else who has data that they wish to share with the world.

[0] [https://github.com/simonw/datasette](https://github.com/simonw/datasette)

[1] [http://datasette.readthedocs.io/](http://datasette.readthedocs.io/)

<comment><USER2> I think it was also a brand of computer - specific cassette tapes for cassette storage. I was briefly confused at why such retro storage was chosen.

<comment><USER3> It was the name of the cassette player for the Commodore 64.

[https://en.wikipedia.org/wiki/Commodore_Datasette](https://en.wikipedia.org/wiki/Commodore_Datasette)</comment></comment></comment>


If You Use Comcast DNS Servers, You Cannot Read This (try with www.) - <AUTHOR> http://diegobasch.com/if-you-use-comcast-dns-servers-you-cannot-rea

<comment><USER2> _> I believe that OS makers should give people an option to choose among several DNS servers during the installation process, and explain why._

And most people won't have any idea which is the correct answer, will pick one at random or pick the default, and then spend the rest of the install process worrying that they picked the wrong answer. Why would any OS maker want to inflict that on their users?

<comment><AUTHOR> You already pick a ton of defaults when installing an OS (English keyboard, whatever). Same as when downloading something from a random mirror. People don't think twice about these things.

<comment><USER3> My mother has never once downloaded anything from a mirror.

On the other hand, she has also never installed an operating system.

Perhaps there should be an "advanced" step during install, which would be skipped by default.

</comment></comment></comment><comment><USER4> Cloudflare's DNS editor warns with this when CNAME'ing a bare domain:

        Root domain CNAME records are not allowed by the DNS specification.
        Older recursors and mail programs may not follow this CNAME.
        You may want to change this record to an A record if you plan to
        use it as a MX or SRV target.

<comment><USER5> I fell into this problem a while back with the domain I use for my mail. Everything was set up nicely in Namecheap's DNS so that the MX records were pointing at GMail and the root CNAME was pointing at my webhost. After a couple days not getting mail, I figured out what the problem was.

Oddly enough, unlike the article, Comcast's DNS was working fine with my domain fine on the root CNAME.

Most services like Heroku or Google's AppEngine (where you set up a CNAME for your domain rather than an A record) recommend that you have your DNS provider to a redirect to the "www." version. Namecheap's DNS will do this (a lot of providers offer redirects in their DNS system which isn't really DNS, but is a simple value-add for them to provide).

<comment><USER6> [http://support.google.com/a/bin/answer.py?hl=en&answer=2...](http://support.google.com/a/bin/answer.py?hl=en&answer=2518373)

You don't have to use a DNS provider to do redirection with AppEngine.

</comment></comment></comment><comment><USER7> You can't do CNAME with the root domain record. That is all.

<comment><AUTHOR> <http://pzxc.com/cname-on-domain-root-does-work> begs to differ.

<comment><USER7> The _reality_ begs to agree.

<comment><AUTHOR> Yeah, I give up. I just changed it.

</comment></comment></comment></comment><comment><USER8> You're right that using an A record isn't great because your hosting provider loses the flexibility of being able to change IP addresses. This article explains it really well: [https://devcenter.heroku.com/articles/avoiding- naked-domains...](https://devcenter.heroku.com/articles/avoiding-naked- domains-dns-arecords)

My solution is to use CloudFlare for my DNS (it's free, why not?) and use their "page rules" feature to do a 301 (permanent) redirect from domain.com/* to www.domain.com/$1.

You can see what happens if you run `curl -I maxmasnick.com`.

dnsimple.com (another DNS provider) also lets you add a "URL" record, which also is a 301 redirect.

One should be careful with 301 redirects because the are cached locally and quite thus permanent (see: [http://www.jacquesmattheij.com/301+redirects+-+a+dangerous+o...](http://www.jacquesmattheij.com/301+redirects+-+a+dangerous+one+way+street)). But in this case I think this is what you want.

</comment><comment><USER9> Why naturally jump to the conclusion that Comcast (Who, while many will criticize, probably know vaguely what they're doing) is broken before researching /why/ it wasn't working? DNS isn't the most simple thing in the world, and things like this can catch a lot of people out, particularly if your DNS host doesn't tell you root level CNAMEs are not recommended, but automatically assuming someone else must be doing something wrong, just because you think it should be working, is frankly stupid. It's the sort of thing I'd expect from TheDailyWTF or /r/talesfromtechsupport, not a reader of Hacker News.

<comment><AUTHOR> I did research, what you're seeing is part of the research process :)

</comment></comment><comment><USER10> Appreciate the discussion here. You all may have just solved an occasional and annoying issue on my website. I'm a Dev at www.theblaze.com and we've had varied reports over the past little while that the site is inaccessible on Comcast. I use Comcast as well at home and I've noticed intermittent failures. My first thought was DNSSEC errors like those that took NASA down a few months back, but we don't use DNSSEC at all.

Just checked, and our root record is indeed CNAME'd.

One question though. Is there a single source to reference for the discussion I'm starting with our host?

</comment><comment><USER11> _DNS in its current form is broken as well. It wasn't designed to be used by the current internet. Furthermore, a particular ISP can decide to use its DNS servers as a mechanism for censorship._

I think this is a little naive. Let's say you want to fix this, what could you do? Well, you could sign the responses; that would prevent hijacking, but it wouldn't stop the ISP from returning SERVFAIL, since the server could _really_ be unavailable.

Well, then you could use another DNS server, and encrypt the queries so that the ISP has no idea what's being queried (and therefore can't do selective censoring). But now you've replaced one single point of censorship for another.

You could then send queries to multiple DNS servers simultaneously, so that no single server can censor.

Now think of all the latency added by that system, and which is useless because the ISP can wait for the DNS to resolve and then drop the HTTP request to that host.

You could make the ISP a dumb pipe by using a VPN, but now you've gone back to replacing an evil for another.

Eventually, to really fix the problem you'd need a Tor like system with anonymity, dynamic routing and hash-based addresses, but that's extremely inefficient and complete overblown for vast, vast majority of cases unless you're in a dictatorship.

<comment><USER12> >You could then send queries to multiple DNS servers simultaneously, so that no single server can censor.

>Now think of all the latency added by that system

If you send the requests at the same time, the latency should be the same as querying the slowest of the DNS servers individually (or the nth fastest server, where n is the number required to establish a quorum, if you don't require results from all the servers).</comment></comment>


Ekam Build System - <AUTHOR> https://github.com/sandstorm-io/ekam <comment><USER2> Anyone interested in build systems should have a look at Redo (implementation here: [https://github.com/apenwarr/redo](https://github.com/apenwarr/redo) )

</comment><comment><USER3> Ah, build tools... I dream of a day when they are not needed anymore... they are supposed to be the "dynamic part" of statically typed language, but even dynamically typed ones somehow manage to need them (nodejs...)

If there is a problem to solve in development it's definitely that one...

<comment><USER4> nix is starting to replace all my build tools, building c code is as easy as putting together a small nix file like this: [https://github.com/jb55/polyadvent/blob/master/default.nix](https://github.com/jb55/polyadvent/blob/master/default.nix)

The nixpkgs community is then responsible for making sure that the build compiles on all platforms. It's not just for C code either, nix files can be used to declare any kind of dependency. It's a full blown declarative, functional, domain specific programming language for packages. So your project can depend on haskell or python code and everything just works.

There's a heavy linux focus right now but there's a whole group of people making the packages work nicely on osx and cygwin. Check it out: [http://nixos.org/nix/](http://nixos.org/nix/)

<comment><USER5> But it still looks like you have a Makefile (although a rather simple one). Are you relying on nix to install the "build-depends" for your app?

<comment><USER4> Yup, it works in conjunction with other build tools. nix knows how to build make projects, cmake projects, cabal, etc. This is what allows you to depend on pretty much anything. Then I just use nix-build and it will build all the dependencies in a virtual environment and symlink the result when its finished.

<comment><USER5> So a bit like virtualenv + pip for anything. That sounds fun.

<comment><USER6> Except it also handles system dependencies as well.

</comment></comment></comment></comment></comment></comment><comment><USER7> At first I thought "a build system which automatically figures out what to build and how to build it purely based on the source code" included figuring out library dependencies. It looks like I was wrong though and you still have to set linker and compiler flags yourself. I think actually understanding your dependencies (minimum versions, different build configurations and all) and handling them in a unified manner without too much special casing for the peculiarities. CMake already does this quite well, but there is still lots of room for improvement.

<comment><USER8> It's something that someday will come with clang modules support: [http://clang.llvm.org/docs/Modules.html#includes-as- imports](http://clang.llvm.org/docs/Modules.html#includes-as-imports)

With proper caching it could make local build systems obsolete for many purposes. Maybe it would be easier then to delegate module building in style similar to distcc, but less fragile.

<comment><USER7> I'm not intending to put you, your enthusiasm, or the people behind Modules down: I've been hearing that story since C++11 was still called C++0x (this might be an exaggeration) but I don't see anything happening in terms of standardization. And as long as modules are not standardized they are not going to see widespread adoption in C++ and certainly not in the open source community.

Because I like to walk down the memory lane I've looked at my HN comments regarding modules. Here is one from exactly one year ago [1], 855 days ago [2], 1100 days ago.

[1]: [https://news.ycombinator.com/item?id=7491149](https://news.ycombinator.com/item?id=7491149) [2]: [https://news.ycombinator.com/item?id=4836499](https://news.ycombinator.com/item?id=4836499) [3]: [https://news.ycombinator.com/item?id=3613636](https://news.ycombinator.com/item?id=3613636)

</comment></comment></comment><comment><USER9> Exactly what problem is this solving? Do C/C++ programmers really have trouble specifying their dependencies? I'm all for less "accidental" work for programmers, but I just can't imagine this tool ever solving a problem that I have ever had.

<comment><USER10> It's automating a task that most of us consider to be tedious busy-work.

Though to be honest, the most valuable feature turned out to be continuous building (in which Ekam will watch (via inotify) the source code for changes, immediately rebuild the affected targets, and communicate errors back to my editor). Instant feedback from my compiler simply makes me more productive. Other build systems could easily implement this too, and a few have, but somehow most build systems still require you to manually invoke a shell command.

Honestly, it would be really great to see some sort of inotify-based continuous building added to gmake (thought don't forget that you also need to get the error log back into your editor for it to be really useful).

(You may be tempted to suggest `while true; do make; done`, but in practice this has all sorts of performance and usability problems.)

</comment></comment><comment><USER11> Tup[0] does similar tricks to trap what files the compiler reads to automatically determine dependencies. Not as magic as Ekam though.

[0] [http://gittup.org/tup/](http://gittup.org/tup/)

<comment><USER12> Tup also relies on FUSE. Do you know if Ekam does as well?

<comment><USER10> Ekam uses LD_PRELOAD to intercept system calls. I considered FUSE but it would have involved considerably more overhead and synchronization issues.

\- The LD_PRELOAD trick simply rewrites filenames on open() and similar calls, allowing subsequent I/O to happen directly. FUSE unfortunately requires going through the userspace FUSE server for every read or write operation.

\- FUSE would require either mounting a new FS on-the-fly for each build step (probably inefficient) or using a pool of FUSEs where each one is reused for multiple commands (requires carefully making sure all state is purged in between).

\- Something would have to be done to ensure that no other process on the system (say, a backup or indexing daemon) accidentally wanders into the Ekam FUSE mounts, performing I/O that Ekam interprets as coming from the build step. Mount namespaces could solve this, but assuming you don't want to run Ekam as root, this would require user namespaces, and currently there's no way to mount FUSE devices inside a user namespace.

LD_PRELOAD is not without its own share of problems, though. On Linux, you cannot override intra-library calls, so it's not enough to just override the syscall wrappers, you must also override all libc calls that take paths (e.g. fopen()). Also, some people don't use the libc syscall wrappers, preferring syscall(2) or even raw assembly code (especially true of languages that don't like calling into C), which can't be intercepted by LD_PRELOAD. Oh yes, and statically-linked programs are a problem. (Luckily I haven't run into these problems in anything I actually wanted to run as a build tool.)

If I were rewriting Ekam today, I'd probably use seccomp to raise SIGSYS on actual system calls, and use LD_PRELOAD only to install a SIGSYS handler. This should be cleaner and work for a wider range of programs, though it would be totally Linux-specific. (Currently Ekam only runs on Linux, but its strategy has been shown to work at least on FreeBSD and OSX in the past.)

<comment><USER12> Thanks for taking the time to clarify. FUSE was actually a big drawback of tup and especially on the OS X platform, so, I'm definitely gonna look into Ekam!

</comment></comment></comment></comment><comment><USER13> Here's a much better idea: write your makefiles in your favorite (functional/scripting) language (no special syntax required). While making, memoize calls and data-dependencies, and use ptrace to record dependencies on files. When re-making, use this recorded information to redo as little as possible.

</comment><comment><USER14> c/c++ needs this</comment>


Ask HN: After iOS 11 problems with battery. I am alone? - <AUTHOR> After updating to iOS 11 on my iPhone 7 ( <7 months old), I had several issues with my battery life.
Initially the phone would act very weird and would turn off whenever below 20%. This was (partially) fixed by updating to 11.1.1 but the phone now would act erratically. The battery would suddenly drop several % points (like from 30% to 21%, in a matter of minutes).
I have interrogated both online Apple support and have also gone through an intensive (1h) session with one of their geniuses. However, apart from having me walk away with all my settings disabled (no background activities, no location updates for any app, no automatic background intensity, ...) they have done nothing else. The battery is still acting erratically, and they claim it is still in their GREEN zone. So not much from them.
I don't think it is normal to pay a phone that much (I got mine for >£650) and then having to disable all its features to still have it not working.
So I am asking, is there someone who shares the pain or am I alone in this? Is there a "bug" in their iOS 11.x.x that I am not aware of (and probably neither they)? <comment><USER2> My iPhone 6 is doing pretty much the same thing, though when it turns off doesn't seem to tied to any particular percentage. A few days ago I made a call and pulled the charging cord out to chat. I walked outside, and 20 minutes later the phone was dead, from 100% when I walked out. I put it back on the charger and checked about 5 minutes later and it said it was at around 65%.

<comment><AUTHOR> If you haven't seen an Apple genius you should probably. I got mine replaced now as my iPhone 7 continued to show signs of erratic battery behaviour after any SW attempt at fixing it.

Apple customer service has been quite useful, however it has taken me lots of time and effort while I was effectively trying to 'debug' the issue for them.

In addition, the tools that Apple has to check the battery is very vague.

When my phone was tested it had a Green/Red/Yellow chart with no axis whatsoever with a dot showing the status of my battery (Green borderline with Yellow). We have tried the phone of my GF, a 2 yrs old iPhone 5S which has __completely __random battery behaviour. In this case the graph showed only the Yellow square but with no indication of where the battery was in terms of battery life.

Now considering what to do with the iPhone as I am now a bit disappointed by how this (very) high end phone behaved.</comment></comment>


Something Wicked This Way .coms: this sure seems like a big hole in the web - <AUTHOR> Here's the TL;DR of an earlier post: I accidentally mistyped a domain name configuration value while updating a website and found what I feel is a phishing op. If you take any .com domain, and add a second.com to the end (I do NOT recommend actually trying this unless you know what you are doing) you will see what appears to be a typo phishing operation.<p>My question: is this well known? Because I've never seen it written up before when I peruse web security stuff.  For the full write-up of my experience and an associated screenshot check out: http://www.oldirtyhacker.com/something-wicked-this-way-coms <comment><USER2> It is well-known. uBlock blocks anything ending in ".com.com" by default. It's on most badware block lists.

It's not a hole in the web any more than people accidentally typing "fcaebook.com" is a hole in the web. It's just someone exploiting user error, not unlike domain squatting. If you hit "CTRL+ENTER" in most browsers' address bars, they used to blindly append ".com" onto the domain name. If you typed "facebook.com" and then hit CTRL+ENTER, you'd get to facebook.com.com. As far as I know, all browsers have fixed that.

This isn't actually phishing (as far as I know) because it's not trying to trick you into thinking you've gone to the correct website. It's just a malware distribution page.

I believe OpenDNS also blocks this, for the record.

<comment><AUTHOR> One of the (many different) pages I received wanted me to call a toll-free number (screenshot in URL, and which looks like a real Facebook page) for help in overcoming my 'facebook compromise'. I feel quite certain that if I had dialed that number they would have tried to get facebook login info, perhaps a credit card to pay for their 'service', etc.

My characterization of it being a 'hole' was more on the order of 'how could a typo-squat on such a valuable domain name be allowed to continue?'

</comment></comment><comment><USER3> uBlock's Badware list blocks it, and via its documentation page I found these two links:

[https://isc.sans.edu/diary/.COM.COM+Used+For+Malicious+Typo+...](https://isc.sans.edu/diary/.COM.COM+Used+For+Malicious+Typo+Squatting/20019)

[https://www.whitehatsec.com/blog/why-com-com-should-scare- yo...](https://www.whitehatsec.com/blog/why-com-com-should-scare-you/)

Seems like this has been going on for a while...

<comment><AUTHOR> Thanks! I figured it was related to the domain com.com, but still shocked that such a prominent domain name could be running such an obviously damaging ploy.</comment></comment>


Foxconn Is Reconsidering Plan for Manufacturing in Wisconsin - <AUTHOR> https://www.nytimes.com/2019/01/30/business/foxconn-wisconsin-manufacturing.html <comment><USER2> I have freely admitted for a while now that Wisconsin is a fairly corrupt place. (And WEDC, the guys who came up with this, has been among the organizations I've pointed out the most.) That said, the more this Foxconn thing goes on, the more I realize how much we've been screwed over in Wisconsin by Walker and his cronies.

The Foxconn thing never even _sounded_ right from the outset. Four to five billion? To manufacture LCDs?

I mean, I know I'm a bit more technically inclined than most people in Wisconsin, but didn't anyone stop and think for a second, "Hmmm... Wait? Isn't the future supposed to be OLED? This doesn't make any business sense for them????"

Now these Foxconn guys come back with a story about "R&D"??????

I'm just saying, isn't their entire _business model_ manufacturing _other people 's_ R&D? So the best you'd get is R&D to enhance their manufacturing processes maybe? Throw in a small chance at some business process R&D???? (I know, it's a stretch, but I'm trying to be generous.)

Now again, I realize I'm a bit more technically inclined than most Wisconsinites, but does anyone else find it more reasonable to do that sort of R&D in places closer to your actual manufacturing? Even suspending that disbelief for a moment, you have to ask yourself why you'd need 13,000 people to do that? You don't. You'd just never do that if you owned Foxconn.

This whole story just doesn't add up. Even from the start, it never did. How could Walker and his cronies have ever fallen for any of this?

<comment><USER3> As someone who grew up in rural Wisconsin, I can tell you that there has always been a streak of anti-intellectualism, but the past few years it has transformed into something even _worse_.

The suspension of critical thinking that comes from ingesting information, sourced from anything tagged as "Republican", has left the Wisconsin people vulnerable to being taken advantage of.

I speak from experience and discussions with people I had last summer. For example, some didn't believe me when I told them that Foxconn had to put suicide nets around some of their factories. They believed Foxcon is this shining star of a company come to save them, because that was what they were told by Republican leaders.

<comment><USER4> I also grew up in rural Wisconsin, but lived in Madison for several years as well, and I've seen the other side of that coin too. There's plenty of snobby progressives who live in their blue bubble, often working for the state gov't or university, and assume they know what's best for the hicks in the rest of the state. The /r/wisconsin subreddit is full of the type.

The tribalism from both ends is definitely disheartening.

<comment><USER5> The fact that you label the two sides as "hicks" and "snobby progressives" only hurts your stance.

I think we can agree that both sides don't typically listen to each other, and if we're all using language like that then we never will.

Why should I debate you on medicare subsidies, e.g. if you've labeled me a "snobby progressive" and then have taken the victim role to boot?

<comment><USER6> I think the poster was using deliberately provocative words to call attention to the emotional angle of the debate, not making those judgements themselves.

<comment><USER5> Except that it was awfully one-sided and appeared to be labeling actual people directly (those in r/wisconsin)

<comment><USER4> It was one-sided because I was replying to a comment calling rural Wisconsinites easily-misled Republican voting robots. It was an attempt to show balance in the other side's perspective.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> This is a fantastic Podcast on the situation and what went down in Wisconsin. The NDA Foxconn made council members sign to where the council couldn't even talk to their citizens about it will really rub you the wrong way;

[https://www.gimletmedia.com/reply-all/132-negative-mount- ple...](https://www.gimletmedia.com/reply-all/132-negative-mount- pleasant#episode-player)

<comment><USER8> The 2 things that will make your blood boil is when the city counsel couldn't get some residents to sell their property b/c they had nowhere to go, they declared it blighted/contaminated and forced eviction into actual blighted homes.

The second is the town took on a massive loan to buy all the land it needed, it will now default. The state of WI backed the town in the loan and will now have to pay out for this nonsense.

<comment><USER9> This is an inherent problem with city governments. I don't know how rural Wisconsin city councils work but I know for damn sure Berkeley's city council would be completely out of their depth negotiating a multi billion dollar deal with the likes of a Foxconn.

<comment><USER10> It wasn't a rural city council that made this deal. It was Gov. Scott Walker. The executive for the entire state.

</comment></comment></comment></comment><comment><USER11> See this news release by Mount Pleasant:

"...The local development agreement stipulates that, if, for any reason, Foxconn's investment on the campus falls short, the company remains obligated to support a minimum valuation for the project of $1.4 billion, which will more than pay for all public improvements and development costs for the project."

[https://www.mtpleasantwi.gov/CivicAlerts.aspx?AID=219](https://www.mtpleasantwi.gov/CivicAlerts.aspx?AID=219)

<comment><USER12> Is there a timeframe on this obligation?

And if the project is cancelled, it'd be logical that Foxconn will be limited to costs _incurred to date_. It's not like 1.4B is an open unconditional check.

</comment></comment><comment><USER13> I will never get over how "reporting" seems to amount to publishing a bunch of quotes by people without assessing their credibility. Why give Wisconsin Republicans, noted bad actors, a free mouthpiece in this article at all, let alone without context for whether their comments about "economic uncertainty" under the Dem governor hold any water?

<comment><USER14> Alternatively, the reporter is giving those Republicans rope to hang themselves. It all depends on how many people in the audience are capable of recognizing the bullsh*t for what it is.

And don't forget, that number might be small today but could grow much larger down the road. One aspect of reporting is creating a record. Without a record there can be no accountability. One function of a newspaper article is to provide context for quotations, and in particular a timestamp.

<comment><USER13> yes, but that can all be accomplished while also contextualizing their comments with the facts of the situation.

</comment></comment></comment><comment><USER15> So a lot of people seem to be saying something along the lines of "Wisconsin spent 4+ billion and now they're getting nothing in return."

But WI didn't write a 4 billion dollar check or anything. It was a promise of tax credits. If it turns out that Foxconn basically doesn't do anything in WI, then they won't make any money there so they won't owe any taxes so they won't use any of the credits.

So the whole thing becomes a much ado about nothing sort of situation (aside, I suppose, from the big waste of time spent negotiating everything).

Is this basically right, or am I misunderstanding something?

<comment><USER16> You're correct but don't let anything get in the way of ycombinator users blaming evil large corporations for problems. Most of the top posts appear to have not even read the article that was posted.

The reason things have changed is because of knock-on effects from Huawei, IMO. Foxconn would be in a very similar situation if they had proceeded.

<comment> shaki-dora I'm as willing to blame anything on big corporation as a Marxist flying United. But in this case I strongly feel responsibility lies with the state government, which should never have maneuvers itself into a position where it could be harmed in such a way. That's what contracts are for, after all.

HN was also harshly critical of Amazon's HQ2 search/reality show and the willingness to subsidies successfull corporate giants with race-to-the-bottom tax incentives.

</comment></comment></comment><comment><USER17> They got their $4billion handout from Scott Walker and are predictably walking back on it.

Corruption from the so-called party of "fiscal responsibility"

<comment><USER2> Actually, they didn't get it yet.

That said, yes, there are already millions in "sunk costs" that have already been borne by the people of Wisconsin. But at a time like this, it's probably best not to let the "Sunk Cost Fallacy" get the better of you.

<comment><USER18> They _finally_ finished construction on the I-94/I-41 upgrade (also accommodating a new Amazon warehouse near Kenosha) a couple of years back, and this Foxconn agreement meant having to tear it all up again and redo it even wider than before. It's (IMO) unsafe to drive through in the Winter time.

It's a perpetual mess in Southeast Wisconsin. The problems extend far further than just the economics of the deal, into perpetual construction, shady eminent domain and reclassification of generational farms as "blighted", etc. It's criminal how much this one "deal" cost the area.

<comment><USER2> Don't misunderstand me, I'm a Wisconsinite as well. So I'm incensed by this whole cluster-F. I was just pointing out that while we have spent millions on construction and royally screwed over a lot of farmers and people in southeastern WI, we haven't actually handed over any money to Foxconn yet. So we may be best advised to take our losses, which I concede are considerable, and leave the table so to speak.

I'm just trying to be rational.

<comment><USER18> It's definitely not a knock on you or your position; it's more a knock on these sorts of politically-motivated, but empty, sweetheart deals. Walker's a particularly efficient trigger when the subject comes up.

Also, I'm just a bit bitter as someone who travels back to my hometown area (the Fox Valley) often from Chicago and it's never the same thing twice. ;)

<comment><USER19> I'm not so much bitter as filled with pity, to see all the effort Kenosha went to to try to recover from the loss of AMC, and then the remaining Chrysler factory jobs. But the downtown streetcar from nowhere to nowhere takes the prize for worst idea. The only way for it to be sadder is if it were an elevated monorail.

The reason people stay is that nowhere better wants them to come. And they can at least scrape some value out of the traffic between Chicago and Milwaukee, and from the far-flung commuters, and Chicagoans looking for a cheaper place to tie up their weekender sailboats during the summer.

13000 jobs would have been a real boon for the area, if they were ever real. But the Rust Belt is rusting, and states and communities are competing against one another to be the last spots of steel left, when everything else around is grimy red holes. Kenoshans will vote for anyone that promises more jobs or better jobs, no matter how transparently false the story may be. Their dads built cars, and now they're stuck cleaning the go-karts at Action Territory, or waiting tables, or commuting for an hour or more each way. So the one who tells them the most comforting lie wins.

I think it's probably the exact same story in Janesville, after the GM plant is finally closed for good, with no backsies. In another 10 years, someone will promise them a big manufacturing plant there, and the voters will fall for the exact same trick, all over again.

</comment></comment></comment></comment></comment></comment><comment><USER20> There was a good Reply All podcast episode about this story in early December: [https://www.gimletmedia.com/reply-all/132-negative-mount- ple...](https://www.gimletmedia.com/reply-all/132-negative-mount-pleasant)

The inevitably was sadly clear to all but those who had the power to make it happen.

<comment><USER21> Also worth listening is a follow-up with the reporter (Sruthi Pinnamaneni) on The Verge podcast:

[https://www.theverge.com/2018/12/11/18136020/foxconn- wiscons...](https://www.theverge.com/2018/12/11/18136020/foxconn-wisconsin- deal-reply-all-vergecast-interview-sruthi-pinnamaneni)

</comment></comment><comment><USER22> This whole sordid affair is so reminiscent of how wealthy sports team owners play cities against one another to see which of them is willing to finance the most of their billion dollar wet dreams. Las Vegas, I'm looking at you! And Phoenix, you're next. Seattle, well, it's too late. You've already be scammed. Invariably, its a classic case of socializing the costs and privatizing the profits.

<comment><USER23> As someone who lives in Phoenix, I'm pretty certain it's too late for us as well...

</comment></comment><comment><USER24> Corruption started its latest incarnation in Wisconsin with Tommy Thompson. Approved the state lottery which led to casinos ( Chicago mafia controlled). Now, almost every month their is a fiduciary in some county or city government that gets caught with their hands in the till because of their casino losses. As for Foxconn... I keep saying this. We have almost all of the tech you need here in Wisconsin (or the upper midwest) for making our own lcd industry. 3M in Menomone Wi makes the Vikuity backlight material. We have pc board manufacturing (TTMI) in Chippewa Falls. Lots of electronic design talent at companies like Cray and HPE. So. Get in line and order the LCD production equipment from Nikon in Japan and start making some. What exactly do you need a contract manufacturer like Foxconn for?

</comment><comment><USER25> The numbers here are staggering. The state of Wisconsin under Scott Walker subsidized this project at a rate of $14,000-$19,000 per citizen, not including the environmental and infrastructural impacts.

I wonder how much economic stimulus to existing businesses would be created by dropping $15k into everyone's pocket.

<comment><USER26> Giving a tax break to get a company to move to your state doesn't cost you anything if not offering it means you get no new jobs.

<comment><USER27> Basic game theory: you should always defect, because you're always better off. Yet the ideal outcome happens when nobody defects.

This is why the states should agree (or the Feds somehow impose restrictions) not to make these sorts of deals.

<comment><USER26> So what's the incentive for governments to become more efficient, need less tax money and attract more business?

I like the fact that states can choose to compete for companies.

<comment><USER27> I'm not proposing to ban lower taxes, just company-specific deals like these. A state wants to have a more friendly business environment to attract companies? Great! Just don't negotiate tax breaks for a single factory.

</comment></comment></comment></comment></comment><comment><USER28> How many people here actually realize Foxconn is not a company from China, but from Taiwan?!!

<comment><USER29> "Taiwan, officially the Republic of China"...[0]

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

</comment></comment><comment><USER30> I'm glad political posts are rarely brought up here, because this place can be every bit as insufferable as reddit.

</comment><comment><USER31> "new realities" = -60F wind chill

<comment><USER32> Yeah lol I can imagine the Taiwanese execs used to a tropical climate getting off the plane thinking WTF.

</comment></comment><comment><USER33> Well, a lot of people had said this plant was a bad deal for Wisconsin when it was announced. So they can now rejoice.

</comment><comment><USER34> Not reconsidering anymore, Foxconn will be building Gen 6 LCD plant.

Feb 1st, 2019 \--- " Foxconn Technology Group said Friday it will indeed build a liquid crystal display manufacturing plant in Wisconsin, following talks between President Donald Trump and company CEO and Chairman Terry Gou.

The Taiwan-based electronics manufacturer said it will move forward with construction of a so-called Generation 6 factory, or "fab," which typically produces screens for cellphones, tablets and small televisions. "

\---

[https://eu.jsonline.com/story/money/business/2019/02/01/foxc...](https://eu.jsonline.com/story/money/business/2019/02/01/foxconn- now-says-indeed-build-lcd-factory-wisconsin/2744111002/)

</comment><comment><USER35> Conned by the Fox.

</comment><comment><USER36> I wonder if this is Foxconn's way of signaling to Trump that Foxconn wants the Wisconsin factory to be exempted from paying the new tariffs on imports of Chinese parts.

</comment><comment><USER37> Crony capitalism, the Republicans here were awful. I hope others learn from the mistakes

<comment><USER38> Now now, this is plain ole capitalism.</comment></comment>


The scary math behind Web 2.0 - <AUTHOR> http://news.com.com/8301-10784_3-9710510-7.html?tag=nefd.aof <comment><USER2> Ok, so we won't be trading Justin.tv on the NASDAQ... did anyone really expect to?

I think we should be more focused on profitability - not IPOs. Honestly, the chances of any of us creating an IPO-worthy company are pretty slim. But, as long as we create profitable companies, then we're set. And you don't need 1B page views / month to be profitable.

If you're generating cash, there's no pressure to find an exit strategy. And if you do want out, there will ALWAYS be investors willing to buy you.

</comment><comment><USER3> I spoke on this topic at the Web 2.0 expo on Wednesday and have blogged on it in the past.

presentation available here:

<http://lsvp.wordpress.com/2007/04/19/presentation-at-web-20-today-show-me- the-money/>

</comment><comment><USER4> The result presented in this article is fascinating.

If you're going to support your business through pure advertising, you need 1B hits/month to make $5M/month. Clearly there's a linear relationship.

This is an interesting fact.

<comment><USER4> 1B views=5M$ is an approximation to first order. I'm sure I could be convinced the CPM is off by a factor of 5. However, there's got to be a fairly hard minimum sales/month for an IPO: I didn't know it was $60M/year.

If your goal is to form a business that will make the founders rich, it's good to have some numbers floating around in your head. Maybe I was the only one, but I didn't have these numbers in my head, and I felt they were educational :)</comment></comment>


Developers, Why Don't You Work For B2B Startups? - <AUTHOR> http://www.mythoughts.io/articles/developers-why-dont-you-work-for-b2b-startups/

<comment><USER2> A lot of the trouble is the way B2B products are sold.

Consumer products are bought by the people who use them, so the quality of the product, as experienced by the end user, sells the product.

B2B products are usually bought by somebody other than the user and making the sale is a matter of meeting a checklist of imagined requirements, endurance of an interminable sales process, politics, etc.

In B2C there is some possibility you can do a job you're proud of, but in B2B the nature of the sales process precludes that.

<comment><AUTHOR> You're not wrong, but this is changing fast! If you meet the checklist (yes you have to!) and have a great product then you can be very successful.

Also with SaaS adoption it's easier for enterprise to change and for you to sale... So you'd better have a good solution than an average/bad one and frankly it's not that hard when you see the current software used!</comment></comment>


Possibility of explosion at Arkema chemical plant near Houston - <AUTHOR> http://www.arkema-americas.com/en/social-responsibility/incident-page-2/ <comment><USER2> Headline doesn't provide any context, this is a chemical plant near Houston that makes organic peroxides. With 6 feet of flooding and loss of power it's probably going to blow up.

News outlets have more info: [http://abcnews.go.com/US/risk-chemical-plant- explosion-houst...](http://abcnews.go.com/US/risk-chemical-plant-explosion- houston-prompts-evacuation-harvey/story?id=49521170)

Anyone in a 1.5 mile radius has been instructed to evacuate.

<comment><USER3> The blast zone of Hiroshima was less than 1.5 miles. What on earth were they storing there?

<comment><USER4> Powerful oxidizers. The PEPCON disaster in 1988 was a different oxidizer, ammonium perchlorate: [https://en.wikipedia.org/wiki/PEPCON_disaster](https://en.wikipedia.org/wiki/PEPCON_disaster)

Derek Lowe has a good post on some very strong peroxides: [http://blogs.sciencemag.org/pipeline/archives/2014/10/10/thi...](http://blogs.sciencemag.org/pipeline/archives/2014/10/10/things_i_wont_work_with_peroxide_peroxides)

Of course quantity matters. But messing about with strong oxidizers is scary. The article doesn't say which organic peroxide it is, and that matters a lot too.

Edit: Given the list of products made at the site[1] (PVC, acrylic paints, etc) it might be MEKP[1]. That's quite a strong explosive.

[1] [https://web.archive.org/web/20170830090410/http://www.arkema...](https://web.archive.org/web/20170830090410/http://www.arkema- americas.com/en/arkema-americas/united-states/crosby-tx/) [2] [https://en.wikipedia.org/wiki/Methyl_ethyl_ketone_peroxide](https://en.wikipedia.org/wiki/Methyl_ethyl_ketone_peroxide)

<comment><USER5> Uf, ammonium perchlorate is literally rocket fuel, they use it in the SRBs and for a lot of amateur rocketry.

<comment><USER6> It's not rocket fuel itself, it's an oxidizer. Storing it in aluminum bins as PEPCON did strikes me as quite risky, since aluminum powder with such an oxidizer would make a good solid rocket fuel or explosive. As a kid, friends and I used to make our own fireworks with ammonium nitrate fertilizer. These days if you buy much of that and aren't a farmer you'll likely get a visit from serious men in dark suits.

</comment></comment></comment></comment></comment><comment><USER7> On 9/21/01 (yes, 10 days after), there were a big chemical incident in Toulouse, France (one of Airbus Headquarter).

The AZF plant exploded [0], blasting windows on thousand meters radius, killing directly 17 persons and wounded thousands.

I was at the other side of the town (not as big as Houston) and wall trembled. A friend of mine who lived about 50 miles away had her windows vibrate.

It was a terrible thing. But less than half a miles were the SNPE (National Powder and Explosive Company) and it could have turned in a major blast with thousand of death by the explosion and leak of mustard gas that were also stocked there.

The question was, and still is in my opinion : why on earth do you build chemicals plant that have a risk to explode near habitations ?!! (Or in reverse why authorize building habitations near Seveso 2 plant ?)

[0] [http://edition.cnn.com/2001/WORLD/europe/09/21/france.explos...](http://edition.cnn.com/2001/WORLD/europe/09/21/france.explosion/index.html)

<comment><USER8> Makes you wonder how terrorist proof those places are and what could be accomplished with a drone and a small bomb.

<comment><USER7> Since it was ten days after 9/11, there are a lot of terrorist theory for that explosion.

Some even said that they saw a missile fired from a tower nearby.

<comment><USER9> The thing with terrorists is that they tend to announce it when they do something, otherwise it's a bit pointless.

</comment></comment></comment></comment><comment><USER10> The article is now back up and updated:

> The most likely outcome is that, anytime between now and the next few days, > the low-temperature peroxide in unrefrigerated trailers will degrade and > catch fire.

> Any fire will probably resemble a large gasoline fire. The fire will be > explosive and intense. Smoke will be released into the atmosphere and > dissipate.

It's not clear to me if an explosion is expected or just for it to "catch fire".

<comment><USER11> It sounds like it's in a container, so it will likely explode when it burns. I wonder if they have some kind of pressure release system for those.

</comment></comment><comment><USER12> Looking up "organic peroxide explosion" on YouTube was enough to make me very glad I'm on the other side of the city from this place...

</comment><comment><USER13> The information sheet now names the brand of the organic peroxides: Luperox - peroxyketal, and its (M)SDS.

 _Chemical Name_

Peroxide, (3,3,5- trimethylcyclohexylidene)bis[(1,1- dimethylethyl)

Cyclohexanone, 3,3,5-trimethyl-

Hydroperoxide, 1,1-dimethylethyl

Source: [http://www.quickfds.com/out/18141%2D37780%2D19064%2D019606.p...](http://www.quickfds.com/out/18141%2D37780%2D19064%2D019606.pdf)

</comment><comment><USER14> Rachel Maddow has been reporting on this last night and again tonight. More info here: [http://www.msnbc.com/rachel-maddow/watch/harvey-damaged- arke...](http://www.msnbc.com/rachel-maddow/watch/harvey-damaged-arkema- chemical-plant-explosion-expected-1036436548001)

<comment><USER15> Is Rachel Maddow considered relatively 'normal' within the news landscape of the US? I'm just kind of taken aback by how gleefully dramatic she is, and how relatively little information she produces with so many words.

</comment></comment><comment><USER10> I wonder if folks from companies like Boston Dynamics have thought of amphibious robots for situations like these

</comment><comment><USER16> I presume that Arkema carries insurance for accidents. I wonder if rates in flood-prone areas are increasing.

<comment><USER17> They are. [https://www.nytimes.com/2017/04/18/magazine/when-rising- seas...](https://www.nytimes.com/2017/04/18/magazine/when-rising-seas- transform-risk-into-certainty.html)

<comment><USER16> Well, I know that residential rates are increasing. But I was wondering about rates for chemical plants and such.

<comment><USER17> I can't imagine that commercial rates would stay the same if residential ones are rising.

<comment><USER16> It would make sense.

</comment></comment></comment></comment></comment><comment><AUTHOR> Archived post:

[http://web.archive.org/web/20170830230931/http://www.arkema-...](http://web.archive.org/web/20170830230931/http://www.arkema- americas.com/en/social-responsibility/incident-news/)

</comment><comment><USER18> I am not making light of the situation AT ALL - but it's sort of weirdly ironic that the link goes to a 404 page in their "Social Responsibility" section.

</comment><comment><USER19> Their post on the incident has apparently moved to

[http://www.arkema-americas.com/en/social- responsibility/inci...](http://www.arkema-americas.com/en/social- responsibility/incident-page-2/)

Maybe the link should be updated to point there.

</comment><comment><USER20> 404, but archive.org got it:

[https://web.archive.org/web/20170830230931/http://www.arkema...](https://web.archive.org/web/20170830230931/http://www.arkema- americas.com/en/social-responsibility/incident-news/)

<comment><USER21> Dupe, please delete.</comment></comment>


The best text editor in your browser for writing. Auto-saves. Chrome fades away - <AUTHOR> http://www.quietwrite.com/?e

<comment><USER2> The first thing that happened when I started typing was a big pop up balloon appearing at the top of the screen telling me to follow them on Twitter and requiring me to click a small cross in order to close it. I'm confused, how is this in line with "focus on writing" and "chrome fades away"? It seems like there are some conflicting priorities here.

I also find the crossfading chrome to be jarring, but that might just be me.

<comment><USER3> I wish that they would simplify it and remove the social media prompts.

</comment></comment><comment><USER4> This website seems to pop-up on hacker news each week. I've got nothing against it but I'd suggest saying the difference between last time..?! If I remember well, it was way more minimalistic before. I find "The best text editor" to be a bit "strong" as google doc is clearly better and I don't really see why quietwrite would be better..?

</comment><comment><USER5> For those that are overwhelmed by the features of google docs, just open gmail, hit compose and start typing. Your message will get auto-saved as a draft. I've been using this as my "minimalist text editor" for a while now.

</comment><comment><USER6> I'd say Google Docs is better. It auto-saves too.

</comment><comment><USER7> Is it just me or have there been a lot of "check out how minimalistic ally I can implement a text editor on the web that saves" lately? Personally not seeing too much value here, though the design direction is nice.

<comment><USER8> The obsession with minimalism at the expense of features is some kind of illness.

Simple to use is good. But making something simple to use by removing useful features is pretty dumb.

</comment></comment><comment><USER9> Breaks my back button.

And I'll join in the chorus of "what's the point?".

</comment><comment><USER10> I like it a lot! I use Omniwriter on my Mac, but there are lots of computers I need to work on that aren't Macs and where I can't install desktop software.

@richcollins there are tons of good minimalist writing apps out there, but they are all downloads - this solves the problem where you aren't at your main computer but need to write...

@nametoremember are you serious? Google Docs has many great features, but for the simple task of writing it is actually pretty clunky and definitely NOT minimalistic.

</comment><comment><USER11> Still a lot that they could remove. Check out <http://bywordapp.com/> for a simpler distraction free editor

</comment><comment><USER12> This seems to be a competition against pen and paper. Barrier to entry here is so low, and other alternatives like Google Docs or Evernote will probably blow this away. Is this a feature or a product? <http://venturehacks.com/articles/feature-product>

</comment><comment><USER13> Why would i use something like this? If i want to write something quietly, i can just write it in MS Word.

</comment><comment><USER14> Don't want to toot my own horn, but this is very similar to something I wrote a while ago and released on GitHub. For those who want to run their own copy see <https://github.com/boyter/BATF>

</comment><comment><USER15> I am wondering if too much obsession with minimalism and claiming that "google docs features distracts me" are minor symptoms of some mental disorder (like form of autism or something)?

<comment><USER16> Different people have different preferences. This has always been the case, and is equally true for user interfaces. I don't see why you have to drag autism into this.

</comment></comment><comment><USER17> looks similar to <http://pen.io/zen> \- but quietwrite does have more features</comment>