Why I'm giving my company Election Day off - <AUTHOR> https://techcrunch.com/2016/09/10/why-im-giving-my-company-election-day-off/ <comment><USER2> I think elections should be held on weekends giving the maximum number of voters the opportunity to vote. This is the case in most countries anyway.

<comment><USER3> Sweden here:

We always have the election on a Sunday to maximize number of voters.

Also, voting can of course be posted ahead, and voting can be delegated to an ombudsman if you are unable to attend physically at a voting station.

We don't allow voting through any electronic devices, nor voting over the internet.

All votes are placed using anonymous envelopes. This way no one can trace who you vote for, while still securing that only one vote are placed per person (by authentication at entry at voting station, and manually checked of in a list). All vote counting is manual.

And we don't have a requirement for registration for voters. Voters are registered automatically, based on if you are allowed to vote (citizenship etc) or not.

I would not call a country a democracy if they don't make it easy for everyone to participate in the election. Having the voting take place when most people are working, or require them to register ahead for voting is not how a democracy works.

<comment><USER4> _> I would not call a country a democracy if they don't make it easy for everyone to participate in the election_

Agreed. I'd go one step further and advocate compulsory voting (at least compulsory turning up). Even for the most civic minded, it's not difficult to end up with unexpected other obligations on the day and defaulting to a "oh well, one vote wont make a difference" mindset.

Compulsory voting also forces all employers to accommodate their employees going to vote.

Growing up in Australia, I didn't realize for some time that Australia was somewhat of an anomaly in the developed world in this regard.

I'm curious if anyone has seen any research on what the impact of compulsory voting would likely be in the US with respect to the major parties.

<comment><USER5> Assuming that it is illegal to prevent someone from voting, what problem is this compulsory voting meant to solve?

It feels like totalitarianism to me. What if I feel that a certain election is a sham, and prefer not to participate? Democratic regimes should be sane enough so that people want to vote. Too many people not wanting to vote should be taken as a signal that something is seriously wrong.

<comment><USER6> >Assuming that it is illegal to prevent someone from voting, what problem is this compulsory voting meant to solve?

Apathy and laziness. Plus in the us there have been quite a few states which try to pass laws for the sole purpose of making it more difficult for certain groups, usually minorities, to vote. Making voting voting compulsory would do a lot to solve that.

>It feels like totalitarianism to me.

I'm sorry, but that's just stupid. If anything it's forced democracy and not even remotely close to totalitarianism. There are tons of things citizens are forced to do, file taxes, sign up for selective service, serve on a jury which costs jurors money if they are chosen, etc. Forcing people to go to a voting place once every 4 years is pretty light comparatively.

>What if I feel that a certain election is a sham, and prefer not to participate?

What I've heard from Australians is that a common thing there is spoiling your ballet if you don't want to vote.

>Too many people not wanting to vote should be taken as a signal that something is seriously wrong.

That I heartily agree with. I personally don't vote because I live in Illinois so my vote means nothing. That's a serious problem caused by a horribly inefficient and outdated system. Right now a vast majority of Americans have no power in elections, it always comes down to a very small number of swing states, usually less than 15. Live in 70% of the states? Well tough shit, what you want doesn't matter at all. That imo is the fundamental problem. I think if we switch from possibly the worst voting method to just a straight democratic vote, ignoring all the superior voting methods just sticking with FPTP, we would see much greater turnout.

<comment><USER7> "I personally don't vote because I live in Illinois so my vote means nothing."

So you only vote in presidential election years, and only fill out the ballot for the presidential candidate? I think you might be doing it wrong.

</comment></comment></comment></comment></comment></comment><comment><USER8> In Greece, elections are always held on Sundays.

No provision for submitting votes by any other means other than physically going to election posts(in practice, the government uses schools), entering a tiny makeshift voting booth (which in theory protects you from prying eyes and gives you privacy, but it really doesn't), selecting one paper sheet among the pack you received before entering the booth (one sheer for each political party), placing it in an envelope, sealing it, exiting the booth and dropping it into a box. It doesn't get more analogue than that. Also, there are penalties for those who do not vote - in theory you will be prosecuted, in practice, AFAIK, it rarely happens, but either way, it adds to the ridiculousness of the whole thing (of course the parties want you to vote, and they conspired to force you to vote by making it illegal not to.. This is Greece).

<comment><USER9> According to this [1] article the abstention rate is near 44% for Greek votes. It seems making it easier doesn't not necessarily make it more inclusive.

Here in the states I always vote absentee. I get my ballot, fill it out, and drop it in the mailbox. I'm not sure how they can make this process easier without it being online or making the postage free.

[1] [http://greece.greekreporter.com/2015/09/21/voter-turnout- in-...](http://greece.greekreporter.com/2015/09/21/voter-turnout-in-greek- elections-drops-to-new-historic-low-infographic/)

<comment><USER10> Here in Oregon it can be free, as there are ballot dropboxes at public libraries, along with election commission offices if you don't want pay for a stamp.

</comment></comment></comment><comment><USER11> The real question is why isn't Election Day a mandatory public holiday, for both state and private employees. Even if it was on a Sunday, employees should be required to give 3-5 hours off of work for people working that day.

Perhaps this democracy thing is not considered that important, except for lip service.

<comment><USER12> >employees should be required to give 3-5 hours off of work for people working that day

Time off from work to go vote is already legally mandated.

<comment><USER11> It should be automatic and without need to ask for it for all employees (is it?), so you don't the have the phenomenon were you're considered a "bad employee" for going to vote.

A mandated downtime during which businesses wont be open (which some special shifts for businesses that can't close, like hospitals etc) would fix that.

</comment></comment></comment><comment><USER13> Cute, but I think there's a bigger issue than just people not voting. Local races, and local issues they can have a dramatic impact, get very little news coverage. So even if you vote, you don't really know what you're voting for. Many ballot initiatives are intentionally confusing to take advantage of this. This is dangerous.

Perfect example, in Texas the Energy Commission is known as the Railroad Commission. These people have tremendous power over oil production and thus our economy... But if you are the average voter who only knows about parties and the presidency, you probably are just voting blind, or you say to yourself, "I really don't care who runs the railroad... didn't even know we still had a railroad... how quaint."

Another great example, the wording on the ballot initiative that banned Uber and Lyft from Austin -- in the exit polls many people thought they were voting to keep Uber and Lyft but in fact voted the opposite of their intent.

We need to do more to ensure that people are aware of the down ballot issues and races -- voting doesn't mean much if people aren't informed and are just selecting candidates based on who's name looks better on the page.

EDIT: Cleaned up typos. Why did I try and write on my phone? Sorry!

* Explaining Exactly What a 'Yes' and 'No' Vote on Prop 1 Means | KUT || [http://kut.org/post/explaining-exactly-what-yes-and-no-vote-...](http://kut.org/post/explaining-exactly-what-yes-and-no-vote-prop-1-means)

* Ask the Candidates: Should the Railroad Commission Change Its Name? | StateImpact Texas || [https://stateimpact.npr.org/texas/2014/02/24/ask-the-candida...](https://stateimpact.npr.org/texas/2014/02/24/ask-the-candidates-should-the-railroad-commission-change-its-name/)

</comment><comment><USER14> A nice gesture, but will the company also give the day off for local elections? Where I live, we just had an election on August 30th for a few _very local_ offices. Local elections have more of an affect on our lives than national elections.

<comment><USER15> This is so true, and I'm as guilty of it as anyone. Just look at the first sentence of the article:

> This year's U.S. presidential election is confusing for everyone.

Yeah. Presidential election. That's who you think about, right? Trump, or Hillary, or maybe Gary Johnson if you're like me.

But it's so weird: they have all this other stuff on the ballot! Senators, congresspeople, state assemblypersons, governors, county boards of supervisors, even your mayor and city council members.

And if you're in California, there are probably fifty ballot propositions to worry about too! Who has time to think about all that? It's so much easier to just think about one contest: The Big One.

So yeah, I definitely appreciate your comment. Perhaps now I have shamed myself into thinking about all the more local issues that really do have much more effect on our daily lives.

Living in Menlo Park (CA), this is very real. I look at our neighbors Palo Alto and Redwood City with all the development and activity there. Compare either of those downtowns with downtown Menlo Park and see which ones are hopping and which one ain't. The local joke is that we want to Keep Menlo Dark. It's a nice quiet downtown, where nobody has to bear the burden of running a successful restaurant or retail shop.

<comment><USER16> I (from UK) didn't think you elected a president, I thought you elected people who you think will vote for the president you want.

It's such a convoluted system; it seems so, uh, undemocratic(?).

<comment><USER17> Well, you don't elect the PM in parliamentary democracies either.

That said, the electoral college is _largely_ a formality. Much more important than the fairly remote chance an elector might vote against the will of his state is the fact that most states have winner-take-all systems, wherein you get all of the state's electors by winning a majority. Even that has only proved problematic thrice: once in 2000, once in 1888, and once in 1876. And I think there are reasonable arguments in its defense: you force candidates to have some geographical distribution of support, for example. If it was based on solely on the popular vote, you could win the election with massive majorities in a few populous states and no support elsewhere.

It's also balanced out, I think, by the fact the Presidency is, relatively speaking, not all that powerful of an office in America anyway - his most important power is "figurehead/scapegoat in a bully pulpit." Other than that he gets a veto over legislation (which Congress can override), command of the military (which is funded by Congress), and gets to appoint some top level executive offices and the judiciary - subject to Senate approval. Hypothetically Congress can also remove him from office via impeachment.

<comment><USER16> >the fact the Presidency is, relatively speaking, not all that powerful of an office [...] command of the military (which is funded by Congress), [...] //

So command of the most powerful military complex in the World. Who in your opinion is powerful then? ;o)

<comment><USER17> Being commander-in-chief is very different from being a kind of dictator of the military complex and is strictly circumscribed by law and custom.

For example, all commissioned officers are approved by the Senate, and the Posse Comitatus Act prevents the President from using the military to enforce domestic policy. Congress also has the sole authority of appropriating money to the military and they can attach whatever strings they want.

There is probably not single individual more powerful than the President, but Congress as a whole is by far the most powerful branch of government. The Presidency doesn't even compare. That said, I think what we've seen over the past several years, and will continue to see, is that dysfunctional Congresses increase the power of the Presidency.

</comment></comment></comment></comment></comment></comment><comment><USER18> Reminder that in America high voter turnout almost always favors Democrats, and the Republicans are very good at gerrymandering and taking control of state governments.

They use this power to restrict voting rather than make it easier, mainly in the name of combating voter fraud, which statistically doesn't actually occur in the first place.

<comment><USER19> I might be responding to a HN project that remixes Bernie tweets. But I'll bite.

\---

> Reminder that in America high voter turnout almost always favors Democrats

Wrong; the effect is mixed. [http://www.factcheck.org/2016/06/sanders-shaky- turnout-claim...](http://www.factcheck.org/2016/06/sanders-shaky-turnout- claim/)

> Republicans are very good at gerrymandering and taking control of state > governments

Both sides gerrymander as much as possible. But Democratic votes already naturally clump geographically in a state, causing them to say, win 90% in an urban district and loose 40% in a bunch of others. [https://www.bloomberg.com/view/articles/2014-09-08/why- democ...](https://www.bloomberg.com/view/articles/2014-09-08/why-democrats- can-t-blame-gerrymandering)

Most analyses just look at total votes and resultant state representation, while forgetting that most of the effect is a natural consequence of Democratic geopolitics, rather than some Republican superiority in gerrymandering acumen.

> They [Republicans] use this power to restrict voting rather than make it > easier

Maybe the media favors that story in the past 12 months, but that is _not_ a trend.

The Voting Rights Act had better support by Republicans than by Democrats. In fact, the Democratic majority had fillibustered the bill in the Senate until the Republican minority leader stepped in.

Remember the voting rights case where a federal court concluded there was "a systematic and deliberate attempt to reduce black political opportunity. Such an attempt is plainly unconstitutional. It replaces a system in which blacks could and did succeed, with one in which they almost certainly cannot...The inference of racial motivation is inescapable."

Whom did that case convict? The original President Clinton.

[https://www.justice.gov/sites/default/files/osg/briefs/1990/...](https://www.justice.gov/sites/default/files/osg/briefs/1990/01/01/sg900402.txt)

Both sides play these dumb games.

> voter fraud, which statistically doesn't actually occur in the first place.

Probably. While it's often repeated that there are very few "credible" cases of voter fraud, that doesn't necessarily say much.

Remember that George Bush won the presidency in 2000 by 0.009% of the Florida vote. The Democrats were sure counting the beans then.

<comment><USER20> > The Voting Rights Act had better support by Republicans than by Democrats. > In fact, the Democratic majority had fillibustered the bill in the Senate > until the Republican minority leader stepped in.

The Voting Rights Act was passed in 1965, which was before the Southern Strategy. After the Southern Strategy, the Voting Rights Act's requirement for majority-minority districts resulted in packing black voters into a fewer number of districts, which is a form of gerrymandering that benefits Republicans.

<comment><USER21> Not to mention that this in the middle of party realignment; the Democratic and Republican parties were in the middle of switching sides on the political spectrum.

<comment><USER20> That's an oversimplification. Democrats have always been the pro-labor party and Republicans have always been the pro-business party, it's just that during the Civil War, northern businesses were competing for economic and political power with southern planters (and were thus anti-slavery), hence the Republicans became the anti-slavery party. Resentments over the Civil War led a majority of southern whites to the Democratic camp up until the 1960's, when the Johnson administration went all-in on civil rights and the Republicans deployed the Southern Strategy to sweep up the southern white vote.

<comment><USER21> And the relevant effect here is that the parties essentially switched sides on social issues.

</comment></comment></comment></comment></comment></comment><comment><USER22> I recently had occasion to compile a table of general election turnout for different countries, the results may surprise you:

Austrailia 91%

Brazil 78.90%

Britain 66.4%

Canada 68.3%

Finland 70.1%

France 79.48%

Germany 71.5%

India 66.3%

Israel 72%

New Zealand 77.90%

Russia 65.25%

United States 54.9%

<comment><USER23> I think the main reason why Australia has such a high voter turnout is because it's extremely easy to vote. It is compulsory in Australia, but the fine is only $20 (~US$15). Voting always takes place on a Saturday. There are polling booths all over the place, and you can lodge your vote at any booth anywhere in the country. If you know you won't be able to make it on the day then it's quite easy to find a pre-polling station or lodge a postal vote in the few weeks prior to the election.

<comment><USER24> Brazil also have compulsory votes with fines. Fines are low but are a pain in the ass to pay. Also if you don't vote you cannot get some documents (passports, etc) and you can't take any job in the government. Voting booths are abundant and it's always holidays tho. If for some reason you can't vote you have to justify to the "voting justice"-related thingy. Usually not a big deal.

</comment></comment></comment><comment><USER25> Many states require employers to give time off to vote:

[http://www.findlaw.com/voting-rights-law.html](http://www.findlaw.com/voting- rights-law.html)

</comment><comment><USER26> I wish I could vote every day and have it count. Thankfully this is the case for many goods and services that are provided on the market. If I don't like the product I am getting or where my money is going I simply take my business elsewhere. Providers of goods and services that face market competition are encouraged on a continuous basis to be responsive to consumers or they risk going out of business.

By comparison, voting in elections feels ineffective. Monopolies, even those run by politicians elected every X years, are notoriously bad at serving the needs of consumers. Even if we could vote every day from our phones on who is in charge of a given monopoly, I still don't think it would change much.

</comment><comment><USER9> With all of the data available around the word (some having it on a weekend, some a holiday) I can't see making a change like this having an appreciable impact on voter turnout.

Besides, say what you want about the US electorate system, but it has not changed much. There are fundemantal problems related to voter turnout, and superficial changes like this really are pointless in the scheme of things.

</comment><comment><USER27> I've found it easier to either get an absentee ballot or vote by mail, and in a lot of places around here you can do early voting. haven't gone to a poll _on_ election day in a long time.

</comment><comment><USER28> In Spain we also hold elections on Sunday, but the problem comes when they happen to be in summer on a really nice sunny day. Some people can't be arsed and probably for good reason.

</comment><comment><USER29> Related discussion: [https://news.ycombinator.com/item?id=12291529](https://news.ycombinator.com/item?id=12291529)

</comment><comment><USER30> All things aside who are the candidates? The joke that Hillary and Trump are seriously being candidates got old fast.

</comment><comment><USER31> > _Interestingly, Morocco was the first country to publicly recognize the > United States as an official state with the ratification of the Moroccan- > American Treaty of Friendship in 1786. Signed by Thomas Jefferson and John > Adams, it recognized Moroccan ports as open to U.S. ships and is the > longest-standing unbroken treaty relationship in U.S. history._

Within a decade of recognising the US, Morocco was pirating their ships again, and the US had to pay huge sums to the Barbary corsairs for safe passage - leading to the creation of the US Navy and the First and Second Barbary Wars in 1801 and 1815. Maybe the treaty was never torn up and discarded, but it was broken pretty quickly.

<comment><USER32> The Barbary wars were fought against pirates whose home ports were in Libya, Tunisia and Algeria. Morocco actually gave some protection to American ships. Far as I know Morocco has always been America's friend.

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

<comment><USER33> Wikipedia lists Morocco as a belligerent in the first Barbary War; as I point out in my sibling comment, for Morocco to war against the United States does not violate the treaty.</comment></comment></comment>


Ask HN: Privacy conscious analytics? - <AUTHOR>

I want to understand how people are using my product, however privacy is a central tenet of it. How can I implement analytics without having to share users info with 3rd parties (Google etc)? <comment><USER2> Mint (<http://haveamint.com/>) is a very popular self hosted analytics package. Though depending on how strict your privacy concerns truly are you should still look into google analytics. Google doesn't allow you to store PII according to their Terms of Service. Though they do get various data, much of it would be hard for them to link back to a distinct user. With that said if privacy is still a top concern Mint is a great choice and many people even without the privacy concern are opting for it over google analytics.

</comment><comment><USER3> You'll need to deploy your own private log analytics. While there are plenty of products developed over the past decade to help you do this, the "in" approach these days is a combination of Hadoop for storage and ETL and a more traditional data warehouse for summary queries and reports. Several presenters[1] at Hadoop World 2010 covered this.

1- [http://www.cloudera.com/company/press-center/hadoop-world- ny...](http://www.cloudera.com/company/press-center/hadoop-world-nyc/agenda/)

</comment><comment><USER4> Check out <http://piwik.org/>. It's a self hosted stats package.

</comment><comment><USER5> Self-host.</comment>


Why OSS projects are treated like "products" in .NET OSS - <AUTHOR> http://dimebrain.com/post/893694502/projects-vs-products

<comment><USER2> I "own" and participate in several open source .NET projects and have definitely found this to be very true. At the same time, I've found that it varies by project depending on the intended audience of the project itself. Two examples:

One of the projects that I started is a "starter kit" to get some simple user administration screens into a new MVC web app very quickly. This seems to really appeal to newcomers to Asp.Net MVC (most likely because of the starter kit nature of it) and as such I've found that it gets treated much more like a product: lots of requests for me to add new features with VERY few people willing to actually contribute new features themselves. More people download the binaries than download & build the source. [<http://github.com/TroyGoode/MembershipStarterKit>]

On the other hand I participate in a project that is a C# version of Rails' migrations. This tends to be used by .Net developers who have either exposure to RoR or are otherwise more advanced than your run-of-the-mill drag & drop .Net SharePoint dev. We are actually seeing more contributions than support requests for this project (though it isn't in heavy use either way.) More people download & build the source than download the binaries. [<http://github.com/TroyGoode/fluentmigrator>]

That said, I suspect that this isn't _entirely_ a symptom of the .Net ecosystem - Rails or Sinatra or Gem certainly get treated as products, right?

<comment><AUTHOR> Speaking of which, I'm going to check out your MVC starter kit later today since I'm just getting started with that.

<comment><USER2> Great! Let me know if you have any questions. You can email me at firstname.lastname@example.com.

If you're feeling especially generous, any feedback you can offer in terms of tweaking the "getting started" directions to make it easier to... erm... get started would be very much appreciated.

<comment><AUTHOR> Will do!</comment></comment></comment></comment>


Turning GE Color Effects G-35 Christmas Lights into a 7x7 display with Arduino - <AUTHOR> http://blog.jgc.org/2011/11/turning-ge-color-effects-g-35-christmas.html

<comment><USER2> Here is my display.. 98 of them in a 2'x4' box controlled by a nodejs web app.

<http://www.youtube.com/watch?v=PXahEYJX9-g>

The cutting board diffuser on this 7x7 display is genius. My diffuser material cost $$.

(If anyone wants to buy 98 on the cheap. Let me know. I'm going nomadic and have no place for my creations)

<comment><USER3> That looks awesome - are you looking to get rid of the 98 lights alone, or the whole thing?

Edit: Was going to write a seperate comment to the thread but had a change of heart, so I'll add my congratulations to jgc to this comment rather than cluttering the place up. Things like this regularly make me want to start playing with Arduinos, hopefully someday my laziness / lack of time (depending on how you look at it) will ease off.

<comment><USER2> Thanks.. My laziness gets to me in finishing the projects. I do the fun part of getting it to work, then slack on the polish it needs to be complete.

Just selling the lights would be best. Shipping on the 2 foot by 4 foot panel wouldn't be worth it.

<comment><USER3> Do you have Skype rather than stretching this chain out? If so, hit me up - I'm CorinCole :)

Edit: I really don't understand up/down voters here sometimes. How can a message asking somebody to add me to Skype get voted up to 4 points??

</comment></comment></comment></comment><comment><USER4> Good job with the display, looks great.

Question: when you separated and reattached the LEDs, did you keep them in original order when reattaching? I seem to recall each LED node having a unique address, but maybe I'm misinterpreting.

<comment><AUTHOR> No, I did not keep the in the same order. In fact when the LEDs power up they are waiting for the first packet to arrive and they will use the address in that packet to set the address for that LED. Until an LED has received its first packet it will not forward packets on.

So that allows you to program the LEDs with arbitrary addresses. I make use of this to program addresses that are easy to encode for the 7x7 display (each address is six bits so I use 3 bits for X and 3 bits for Y). This is complicated by the physical snaking layout on the board. See the code sample in the blog post for how this works.

[https://github.com/jgrahamc/gece/blob/master/gece/protocol.c...](https://github.com/jgrahamc/gece/blob/master/gece/protocol.cpp)

<comment><USER4> Good to know. Was going to hack up a set of these post-Christmas, and was under the impression that order of the LEDs needed to be maintained -- as if the addresses we're hardwired.

Thanks for the post.

</comment></comment></comment><comment><USER5> I had a lot of fun playing with these sets last Christmas, and it has been my lighting of choice over the last year. Quite a fun and rewarding hack, and I'm sure the parallelism of more and more sets of these RGB LED strips will lead to greater things in the hobby world. I've seen music and entertainment productions use these strips quite effectively over the last couple of years.

</comment><comment><USER4> Another noob question about the grid. Suppose you wanted a 10x50 grid (let's not waste any LEDs!), or basically a non-square grid.

Would that difference cause considerable change elsewhere? At the code level? Or with the Arduino controller?

<comment><USER6> A non-square grid would itself not be an issue but if you want to do multiple LED strings as would be needed for a 10x50 grid the code might need to be modified to have multiple data outputs for each string. You should be able serially connect the strings but at some number you will have issues with the data/power wires, and may not get your desired refresh rate.

</comment></comment><comment><USER7> I'm very interested with that kind of projects, but I'm always wondering what to do once the hardware part (and software controller) is done. By that I mean the artistic part of it.

For example, take this sculpture: <http://vimeo.com/21904379>. I was thinking it could make for a very cool sculpture at home. Hardware-wise, it's very straightforward, but I wouldn't know what to hook it up to software-wise and how to show interesting patterns.

</comment><comment><USER8> If you could set the addresses any way you want, why the odd diagonal configuration? I'm sure it's in the write up, but I must have missed it.

Very cool stuff.

<comment><AUTHOR> Actually it's not in the write up, but it's a good question. By going with the diagonal configuration it was easier to solder the LEDs together. There's a bit more space (if the horizontal and vertical spacing is one unit then the diagonal spacing is sqrt(2) units) diagonally than vertically and since the LEDs are asymmetric (have the wired sticking out on opposite sides) this made it mechanically easiest.

Thus I 'fixed' in software a 'problem' created because of the constraints of the physical world.</comment></comment>


Author of Christian relationship guide says he has lost his faith - <AUTHOR> https://www.theguardian.com/world/2019/jul/29/author-christian-relationship-guide-joshua-harris-says-marriage-over <comment><AUTHOR> It's a harsh thing to lose your faith. You feel like the ground has been pulled away from under your feet.

Also, I'm guessing this man is about to come out as gay. I hope he finds support.</comment>


Apple is an exception to nearly every rule - <AUTHOR> https://techcrunch.com/2018/03/21/apple-is-an-exception-to-nearly-every-rule/ <comment><USER2> What this says to start-ups is identify areas where you have control then push as hard and far as you can to make yourself uniquely successful there. That is truly copying Apple.</comment>


System.Linq.Parallel Is Now Open Source - <AUTHOR> https://github.com/dotnet/corefx/tree/master/src/System.Linq.Parallel

<comment><USER2> Sorry to be "that guy", but what is System.Linq.Parallel? Can anyone provide a brief description/ list of links where to read more about it? Why is open sourcing it such a big deal?

<comment><USER3> This is actually becoming my chief complaint about submissions. It appears to me as if folks now believe that it's cool to submit links which resolve as deeply and closely as possible to subject (in this case a the subdirectory inside the project's repo) with total disregard to the fact that there is insufficient (or no) information describing why we should be interested in the link or what, if anything, we should discuss.

I'm willing to bet the submitter went through a series of links beginning with some sort of announcement that something changed to get to the link they submitted. Why do folks think that we would not also benefit from that information or that it would not help to foster more interesting discussion?

<comment><USER4> Why? Probably because the "blog spam" or "only submit the original source" comments will show up and submissions get flagged. Happens enough that I would imagine the submitter probably followed all the links in response to prior submissions.

</comment></comment></comment><comment><USER5> Hmm, I wonder why this was added:

        #if DEBUG
                        currentKey = unchecked((int)0xdeadbeef);
        #endif

[https://github.com/dotnet/corefx/blob/master/src/System.Linq...](https://github.com/dotnet/corefx/blob/master/src/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/HashRepartitionEnumerator.cs) line 110 :P

<comment><USER6> It is a magic marker [http://en.wikipedia.org/wiki/Magic_number_%28programming%29#...](http://en.wikipedia.org/wiki/Magic_number_%28programming%29#Magic_debug_values).

Both its 16-bit parts have odd values, it is an illegal address (at least on the systems it was introduced for), and it is recognizable in hex dumps. That makes it a good value for uninitialized memory.

</comment></comment><comment><USER7> would be awesome if any of the dotnet open sourcing would allow to port linq to python. i would use it in a hearbeat.

<comment><USER8> There is more than one Python for .NET AFAIK. And an awesome VS support as well: [https://pytools.codeplex.com](https://pytools.codeplex.com)

<comment><USER7> I can't use Python on .NET, I use it with numpy and the rest of the great native ecosystem. There are great ORMs, but I also really like LINQ.

<comment><USER9> I hardly do any Python nowadays, but why do you want LINQ if you already have itertools and comprehensions?

<comment><USER10> LINQ is way more than just itertools and comprehensions.

<comment><USER9> Only if you are speaking about things like LINQ2SQL, LINQ2XML and similar.

Which can be done if the right ABC are implemented.

<comment><USER8> Also LINQ Rx.

<comment><USER9> Which is just reactive programming.

<comment><USER8> ...readily available and idiomatic as part of the LINQ universe.

<comment><USER9> A simple google search gave me

[https://rxpy.codeplex.com/](https://rxpy.codeplex.com/)

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> I guess that's useful for people who are already bought in to the .NET world, but isn't LINQ encumbered by patents that pose a risk to anyone building on top of it?

<comment><USER12> No. That was/is just FSF FUD.

You have always been able to build anything on top of it without concerns about patents from the implementation. This claim was so hilarious that it is incomprehensible that anyone ever believed it.

You have also been able to reimplement .NET CLR and core libraries without fear of patent litigation (from Microsoft). They have placed the CLR and core libraries under the legal estoppel of the community promise since 2007 (IIRC), _in addition_ to publicly granting patent license to anyone creating an implementation of NET CLR and core libraries from the specifications. This latter was part of the process under which C#, .NET CLR and core libraries was standardized under ISO. A precondition for the standardization was that any necessary patents (for implementation) be offered on RAND terms (reasonable and non-discriminatory). Microsoft has always offered the patent grants free.

The _community promise_ was created in response to FUD from (among others) FSF that Microsoft would just sue anyway (despite patent grants), and with their vast army of lawyers and deep coffers they could bury in court. The community promise creates legal estoppel, whereby a case by Microsoft would be dismissed if you acted "in good faith" by relying on the promise.

Open sourcing Parallel LINQ has no bearing on the patent status of anything building on top of it. If you believe the FSF FUD, you will be ensnared in .NET technology and Microsoft will sue you out of existence if you ever become successful. If you do not believe the FUD, you can continue to take advantage of LINQ, Parallel LINQ, .NET, C#, F# etc.

<comment><USER13> No, it's not just FUD, and it doesn't just apply to LINQ either. Microsoft only promised not to sue over certain kinds of patent infringement in core libraries; that promise didn't extend to code you wrote on top of those libraries, which is unsurprising. Unfortunately they've patented a bunch of common ways of using .NET functionality, including many of the things you might use LINQ for and one of the most common idioms for using delegagtes and events. (Both of the commonly used GUI libraries - Windows.Forms and Gtk# - infringe the latter patent. So if you're running a GUI-based .NET app on anything but Windows then Microsoft can sue you if they ever decide it's to their advantage to do so.)

<comment><USER14> If Microsoft is willing to spend millions of dollars and take a huge PR hit to sue you, it's safe to assume that whatever you've built is successful/popular enough to make you very a wealthy man.

At that point, who cares?

<comment><USER15> Possibly it matters if it's not you that's sued, but you have similar usage as the company that is. Investors may or may not find that an acceptable risk if MegaCorp XYZ is currently embroiled in a large lawsuit.

For example, if your company had the same strategy as Google (and/or made some similar mistakes) with regard to circumventing Java licensing/restrictions, I could see investors or possible investors that were aware of that being somewhat spooked at certain points in the past.

</comment></comment></comment></comment></comment><comment><USER16> Can anyone knowledgeable tell us how this compares to Java's parallel streams?

<comment><USER17> LINQ/PLINQ are the obvious inspirations for Java 8s stream API. I don't know if they are exactly functionally equivalent but streams bring declarative style programming to Java iterable collections that C# has had for years.

But, don't be confused by the .NET Rx libraries which provide LINQ style methods to observable event streams and have been ported as RxJava. Personally, I think that is a better use of the term streams and find the Java 8 standard streams name confusing.

</comment></comment><comment><USER18> As far as I am concerned, all of the BCL has pretty much been 'open source' since Reflector came around in 200..2?

<comment><USER8> No, you still have to deliberately decompile it. JavaScript web sites on the other hand are always open-source (readable with a standard browser).

<comment><USER19> Having access to the source code doesn't mean it's "open source". Open source has to do with being able to reuse the code yourself, not to being able to read it.

<comment><USER8> But the server literally pushes the source to me, and I don't typically explicitly accept any agreements. Why cannot I simply use a readily available feature of my browser and take a piece of code and just use it? Especially if there is no licence agreement right in that JS file.

<comment> squeaky-clean Unlicensed code does not grant permission to use, in fact it's the exact opposite.

The server is not pushing the source to you so that you can take it and use it in your own projects. It's pushing the source because that's how the browser will run the program.

Of course you CAN take and use the code. But you MAY not.</comment></comment></comment></comment></comment>


The Case for Writing a Kernel in Rust [pdf] - <AUTHOR> http://www.cs.virginia.edu/~bjc8c/papers/levy17rustkernel.pdf <comment><USER2> Note that one of the co-authors of this paper, Amit, is the author of [https://www.tockos.org/](https://www.tockos.org/)

This paper is sort of a successor to [https://sing.stanford.edu/site/publications/levy- plos15-tock...](https://sing.stanford.edu/site/publications/levy- plos15-tock.pdf) , a previous paper on this topic. After publication, Amit solved many of the issues presented there. It was previously discussed on HN [https://news.ycombinator.com/item?id=14105884](https://news.ycombinator.com/item?id=14105884)

Some more context [https://www.reddit.com/r/rust/comments/655816/ownership_is_t...](https://www.reddit.com/r/rust/comments/655816/ownership_is_theft_experiences_building_an/dg7p2uf/)

Amit left even more context just now on /r/rust: [https://www.reddit.com/r/rust/comments/75xwib/the_case_for_w...](https://www.reddit.com/r/rust/comments/75xwib/the_case_for_writing_an_os_in_rust/do9wk3g/)

<comment><USER3> Some minor pedantry that winds me up a bit, and that I thought I'd try to correct:

> Note that one of the co-authors of this paper, Amit, is the author of > [https://www.tockos.org/](https://www.tockos.org/)

The definite article "the" precludes the existence of other authors, who (from personal experience) can get wound up by language like this.

You may have meant "author of the web site", in which case I have no opinion, but if you meant "author of the project" I'd totally use the indefinite article "an".

Also all of the work is very interesting and people should read it.

<comment><USER2> Yes, good call, thank you! I sometimes forget this distinction. You're totally correct that more people than Amit work on Tock, for sure, and I don't want to exclude their hard work.

</comment></comment></comment><comment><USER4> If you haven't already, check out Redox OS [1,2]. It's a microkernel written in Rust.

Here's a good interview with the developer [3].

[1] [https://www.reddit.com/r/Redox/](https://www.reddit.com/r/Redox/)

[2] [https://redox-os.org/](https://redox-os.org/)

[3] [https://www.youtube.com/watch?v=eH5JgMlNE8o](https://www.youtube.com/watch?v=eH5JgMlNE8o)

<comment><USER5> That's very nice. It's approaching the QNX level of microkernel.

One unusual feature of QNX is that the kernel doesn't parse strings anywhere. There's a "resource manager", but that's a process. Programs register with the resource manager for a piece of the pathname namespace ("/dev", "/fs", etc.) and then get open requests sent to them when a pathname starts with their part of the namespace. Parsing creates a large attack surface, and getting it out of the kernel is a win.

QNX tries to avoid variable-length objects in the kernel. Messages are variable length and copied by the kernel, but from one user space to another, not queued in kernel space. Most of the ways a kernel can run out of memory are avoided in QNX. If the kernel is out of resources, some system calls return errors, but the kernel doesn't crash.

If you're doing a kernel in Rust, it's helpful to think that way. Rust doesn't handle out-of-memory conditions well.

<comment><USER6> > Rust doesn't handle out-of-memory conditions well.

Do you happen to know languages that do handle out of memory conditions well? That seems like an interesting topic. If I understand how it's done in C, I wouldn't call that "well", but it does provide the mechanisms for doing it (which is more than can be said for all languages). Language level features (or coding styles in C that could be implemented at a language level elsewhere) that provide for increased and intuitive control would be interesting.

<comment><USER5> Ada is one of the few languages that takes out-of-memory conditions seriously. The exception Storage_Error is raised.

Java, C# and Microsoft's common runtime have out-of-memory exceptions, but I'm not sure how reliable they are in a limited-memory environment. They're more like "GC isn't helping much" exceptions.

</comment></comment></comment></comment><comment><USER7> This is good work. I enjoyed reading it. I wonder, though, why Muen separation kernel wasn't mentioned in related work on kernels in safe languages. It uses the SPARK language so that it's provably immune to a number of defects. The Ada compilers can also give you as little or much runtime as you want with several "profiles" available. Muen uses the "minimal, Zero-Runtime" profile. Rust improves on Ada and SPARK with the affine types giving temporal safety plus more flexible model for safe concurrency than Ravenscar. CompSci work shows one can probably do that and info-flow security with contracts but that would be extra, specialist work for Ada/SPARK versus what's built-in to Rust already. Verbose, too.

[https://muen.codelabs.ch/](https://muen.codelabs.ch/)

When I about the Rust kernels, I assumed there would be some trusted components in there which could screw them up on assurance side. Aside from full formal verification, one thing someone might want to try is writing those pieces in SPARK like Muen does. Make a direct port from any proven SPARK to Rust source. Alternatively, compile the SPARK into executable code that Rust calls with its FFI since C code can call SPARK code. Then, those untrusted portions are shown safe with one set of rules while the rest is shown safe with Rust's compiler. Optionally, convert those to an intermediate language of CompCert or CakeML compilers for certified compilation. This is how my Brute- Force Assurance model would attempt to handle each's limitations in a kernel project.

Note: Only problem with using SPARK for that is the person doing it probably has to buy a license if the Rust kernel in question isn't GPL. SPARK is only free for use with GPL code. Frama-C is another option one might use to avoid that but SPARK is stronger offering.

<comment><USER8> If you see from my discussions, many in the community (not the Rust designers) seem to be unaware, willing or not, of all the great work that came before Rust.

Rust is making a great progress infecting other languages with the idea of having affine types for resource management and concurrency is possible, just that the ergonomics still need some fine tuning.

No need to glace over the ideas of other strong type systems programming languages.

<comment><USER8> Oh well, not being a native speaker only now I realized that the last sentence is the complete opposite of what I intended to say, and the edit is button is gone now.

What I actually wanted to say, is that it would be worthwhile for the community to learn what has been done before, like the examples referred by nicksecurity.

</comment></comment></comment><comment><USER9> I tried to write a kernel in rust but reverted back to c. I just feel that it is not very nice systems language. The entire time i felt like i was fighting to manipulate the language into doing something it wasn't supposed to do.

<comment><USER10> Would you be able to go into more detail on this? An example maybe? It might be useful for someone like me who's "interested in Rust" but hasn't tried it (yet).

<comment><USER9> The amount of unsafe code necessary for low level work, the difficulty in sending a stream of bytes to an io port and the innate complexity of the language. C's philosophy is everything is a series of bits which you can manipulate at will. Rust's is the same except you have to through a huge amount of hoops first to make things "safe".

Things like converting a String to an i64 are a pain. There is large amount of boilerplate code needed.

All in all this is a personal preference. I prefer some unsafeness in c to (in my opinion) the constant inconvenience of programming in rust.

<comment><USER11> I know it's just one example, and you're reporting more of a general impression, but since you mentioned converting a String to an i64… well, in what way?

If you mean reading the bytes of the string as an i64, that's

        unsafe { *(s.as_ptr() as *const i64) }

...which is a bit more verbose than C's

        *(int64_t *) ptr

but not that verbose, especially given that there will often be more code in the unsafe block. On the other hand, in C that's often technically undefined behavior due to strict aliasing, so to get strictly conformant code you have to use memcpy. Rust has no strict aliasing.

(I wouldn't actually recommend the above Rust code, because it doesn't verify that the string's length matches i64 - but neither does C, so it's a fair comparison. More idiomatic wrappers can be found in third-party crates like byteorder or pod.)

If you mean casting the pointer to the bytes to an i64, that's

        s.as_ptr() as i64

which doesn't seem verbose. (No unsafe needed in that case.)

<comment><USER12> > to get strictly conformant [C] code you have to use memcpy couldn't you use > an union there ?

> Rust has no strict aliasing. does that mean that rust cannot optimize for > things C could ? (real quesiton I don't know rust)

<comment><USER13> > does that mean that rust cannot optimize for things C could?

Here's my best understanding of the situation. Someone who actually understands the compiler might have to correct me:

\- Pointers in _unsafe_ Rust don't do any strict aliasing optimizations, which C compilers sometimes do. The Rust memory model isn't fully specified, though, and the status quo seems to be related to not actually passing type information to LLVM. Not clear whether this will change in the future. There's some discussion of it here: [http://smallcultfollowing.com/babysteps/blog/2016/05/27/the-...](http://smallcultfollowing.com/babysteps/blog/2016/05/27/the- tootsie-pop-model-for-unsafe-code)

\- References in _safe_ Rust (the vast majority of code) have much stronger aliasing information than pointers do in C. This is one of the core features of Rust, that references that allow mutation are guaranteed not to be aliased. I think the status quo is that this information isn't passed to LLVM because of some LLVM bugs getting in the way, but that it should start working in the near future. When all of this is working, I think it should produce code that's faster than C, in the same way that Fortran sometimes does.

<comment><USER11> You're on target. Just to clarify: even references ("safe") do not need type- based alias analysis (aka "strict aliasing", which is what GCC calls the flag enabling/disabling it). All Rust references have semantics similar to C "restrict": there should never be any conflicting writes from other sources, because immutable references imply the data shouldn't change at all (nobody has a mutable reference), and mutable references are exclusive. (Types with interior mutability are an exception, but the compiler knows what types those are and special-cases them.) So the compiler can assume "no alias" most of the time with no need to care about types.

The formal specification of rules for unsafe code hasn't been written yet, because, well, it's an ambitious goal! Even the C standard is sometimes not really clear about what counts as undefined behavior; Rust wants to do better, while being more permissive, and offering a 'sanitizer' tool to verify correctness at runtime. And implement this on top of LLVM, which was written by other people, is designed for C's rules, and, like other compilers, doesn't even get those right in every case (even when the spec is clear).

For now, the effort is still fairly tentative. But I'm pretty confident that type-based aliasing analysis will never be a thing in Rust, so it will always be legal to read data through 'wrong-typed' pointers, both raw pointers and references (as long as it's valid data, alignment is right, etc.).

Actually, I'm embarrassed: my code from earlier isn't actually legal in all cases. It requires the pointer to be correctly aligned, which in the case of String it probably will be, but it's not guaranteed. Meh.

</comment></comment></comment></comment></comment></comment></comment><comment><USER14> There's another OS that used some aspects of safe code injected into the kernel: Pebble [1]

[1] [https://www.usenix.org/conference/workshop-embedded- systems/...](https://www.usenix.org/conference/workshop-embedded- systems/pebble-component-based-operating-system-embedded-applications)

</comment><comment><USER15> The easiest way forward for a rust kernel is not to start from scratch, but to port Minix3. Minix is an open source micro-kernel somewhat similar to QNX. The kernel itself is on the order of 4000 lines of code. [1] Though small, Minix has quite a long history, is super-stable and looks like a sweet spot in kernel development.

The kernel could be ported piecemeal while always being able to boot during the transition. Similar to how remacs is slowly porting emacs over to rust [2].

And on top of that, you can use the rump kernel approach to run the device drivers, TCP/IP, etc. from NetBSD. So you immediately get a fully functional OS.

[1] [http://www.minix3.org/](http://www.minix3.org/)

[2] [https://github.com/Wilfred/remacs](https://github.com/Wilfred/remacs)

</comment><comment><USER16> Let me be the contrarian to make the case for NOT writing a new kernel at all (no matter what language)

Many a year ago (1997-2000) I was working on banking and finance software. I was a part of that breed of programmers that loath cobol and wanted everything to be in an object oriented language. (C++ was the poison of choice at the time.) The was a particular evangelical group of us in this company.

With this group I found my self in a meeting with one of the old timers, business graduate, his jobs was to explain to us CS diaper babies how banking and finance actually worked when we wrote the software. (surprisingly NOT we're actually clueless about the bigger purpose of what a core banking system is fore (other than the obvious)).

After patently listening to us with the facial expression that we're all diaper babies, he asked a rather pointed question:

OK, supposed we did this, write a new system from scratch using OO programming and all the other industry standard components as of today, what _new features to the end user can you build_? Translated, when he was going to walk over to the bank to sell it, what would be his pitch?

I got the message, what new pitch would the bank get to get new customers? Or simplified, when was the last time you went in to a prospecting new bank and asked 'What programming language or paradigm is your core banking system written in?'

I don't give a shit about what language a kernel is written in, only what the system calls do. Please tell me what system call you can write in RUST that you can't write in C.

The first time the problem arose when it was necessary to translate one HW assembly to a new CPU, the people at the time took a look at the problem and asked the question. What is easier, write an assembler A to assembler B translator, or write the kernel in the most minimal language possible that then can be compiled for an infinite HW architectures. The answer was simple; C.

The answer is equally easy now. There is no system call you can implement in RUST that you can't implement in C.

Just like core banking, finance and insurance systems are still in COBOL, the OS kernels will be for the foreseeable future in C.

The case for writing a kernel in RUST should be because a need a fun hobby. The thing is that a proof of concept kernel is done when you've doen 10% of the work. The remaining 90% is just mind numbingly boring shit that you'll never complete. Even if you do, what's the end user's justification to switch?

On the issue of micro kernel vs monolithic kernel, I'll most humbly refer to Linus Torvalds previous statements.

TJ

<comment><USER6> I find it interesting that even though your story is about banking and finance software, you did not once mention safety or security. That doesn't magically make it a good idea to start from scratch, but unless you have a perfect security record, it should definitely be part of the deciding criteria. For something like the kernel, well they are still dealing with problems in C today. [1]

1: [https://www.exploit- db.com/search/?action=search&q=kernel&g-...](https://www.exploit- db.com/search/?action=search&q=kernel&g-recaptcha- response=&text=overflow&platform=16) (answer the captcha and search again)

</comment></comment><comment><USER17> Someone send this to the Google Fuchsia team.

<comment><USER8> I guess Google is somehow aware of safety.

Regarding Fuchsia, the C code is being migrated to modern C++, the TCP/IP stack and a few filesystem drivers are written in Go, and there are some other small pieces in Rust.

Brillo was to be Android native layer + C++ Frameworks, it became Android Things instead, with the ability of writing userspace drivers in Java.

ChromeOS requires disabling security to access the native layer.

On Android the NDK main goals are only for performance or accessing libraries written in C or C++ into Java.

<comment><USER18> Unfortunately even modern C++ brings none of the benefits described in the article, because it defaults to unsafe code. Most of the Rust code from the Fuchsia team is to support Rust in applications, not in any code that needs to be trusted.

<comment><USER8> When used together with another language high level language, C++ takes the role of low level _unsafe_ blocks. So there wouldn't exist too much difference with a pure Rust application full of unsafe blocks.

Which is the approach taken by Google on Android and ChromeOS.

My understanding is that Fuchsia would follow the same approach, using only Dart for applications.

Are there any examples of Rust applications in Fucshia?

<comment><USER19> You can't generally inline unsafe C++ into other languages (like, literally in the same file, or method) the way you can inline unsafe blocks into Rust.

This increased friction invariably leads to C++ folks making a lot more code unsafe than needs to be.

<comment><USER8> True, but tooling is much more relevant than the ability of inlining code.

It took me more time to make something usable with Gtk-rs, than it usually takes me to write JNI bindings on Android.

I used to complain about the way Google manages the NDK, quite easy to find if you search for them.

However, in the last couple of months I came to realize that it actually makes sense, it is their way to keep Android safe while keeping the door open to write some performance critical sections of code.

<comment><USER19> Not if your goal is security. Android is not a particularly secure operating system. The JVM is not treated as a security boundary.

<comment><USER8> Which is exactly how we got here.

If perfect security implies less productivity, security conscious people abide by "good enough" to appeal to the masses.

<comment><USER19> We were talking about the kernel. The internals of the kernel don't need to "appeal to the masses". Nor do the low-level system libraries.

You are trying to argue that C++ for system libraries plus a high-level language for apps is as secure as an all Rust app. This is empirically not true. Virtually the entire security community disagrees with you.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER20> Be prepared for issues with ABI incompatibility and all that. Rust is a low level-language, but IMO not a systems language (disclaimer: I tried rust extensively over a 2 week period, background is a blend of C, C++ and Haskell from which it draws a lot of influence).

<comment><USER21> I'm sorry. But claiming Rust is not a systems language is akin to claiming a Volvo is not a car.

If you don't consider Rust to be a systems language, then you've got a very skewed perception of what a systems language is.

You seem to be alluding to Rusts ABI potentially being an issue, and that's a fair criticism. Where a stable ABI needs to be exported, Rust supports the C FFI, like almost all other languages.

<comment><USER3> I've had a bunch of issues getting clean statements about the ABI that actually result in usable guarantees.

For example, while you are advised to put `#[repr(C)]` on types you want to have a known layout for FFI, to the best of my understanding this decoration isn't included for generic types like tuples, slices, or `Vec`. Afaiu, Rust reserves the right to change the layout of `(T1, T2)` for `#[repr(C)]` types `T1` and `T2` on a build-by-build basis, which makes a lot of the core types unsuitable for FFI.

Anyhow, that's my issue with it as a "systems" language. I can't (yet) write code that compiles down to the minimal operations I believe the computer can do, without re-inventing a non-trivial hunk of the standard library. Or, if I can, I can't find the language in the spec that ensures I won't have to fix things.

<comment><USER19> I don't believe that Rust slices and tuples have unstable ABIs. I guess that isn't documented as well as it could be, though. File an issue perhaps?

Isn't std::vector in C++ equally unspecified, though?

<comment><USER3> My understanding of the field-reordering work is that it applies to tuples. From [http://camlorn.net/posts/April%202017/rust-struct-field- reor...](http://camlorn.net/posts/April%202017/rust-struct-field- reordering.html):

> The 2000-foot version: Rust structs, enums, and tuples are now automatically > smaller in some cases. It's possible for the compiler to work with types > whose in-memory field order doesn't match that of your source code.

This would mean (again, as I understand it) that you cannot rely on the order of elements in a tuple, if for example you wanted to pass a `&[(T1,T2)]` to some other code (even other Rust code, but built separately).

Edit: serious follow up: You've been working with Servo, and I'm assuming at various moments you (pl) need to map in shared libraries that Servo wasn't built with (e.g. codecs, whatever). Do you avoid Rust types in these FFI interfaces, do you rewrap everything, or have pervasive repr(C) type analogues instead?

It might be that I'm the only person in the world trying to do Rust-to-Rust FFI, but it feels like (i) it isn't that far from being really tasteful, but (ii) it has a bunch of issues that make it seem that no one has ever tested it (e.g. default allocators being different, weak guarantees about layout).</comment></comment></comment></comment></comment>


Beginner guide on how to Advertise on Google - <AUTHOR> https://medium.com/@nicolasegosum/how-to-advertise-on-google-9aabcab5a95e <comment><USER2> Good intro, covers a lot of the important stuff. It is tough how just one of many checkboxes could end up wasting a lot of your money. I would add a section on how to decide what channel to choose. Display ads and search ads have very different uses and costs. Maybe a breakdown of how big and small brands generally make a digital marketing mix?</comment>


Free Prison Communication Platform (Nonprofit) - <AUTHOR> We are building a free prison communications platform, and would welcome your help and support.
We are in the process of obtaining 501c3 status. The entire platform will be provided to users completely free of charge. Our aim is to displace the monopolies currently dominating the prison industry—overcharging poor families who are merely seeking to maintain contact with their incarcerated loved ones.
Over 90% of incarcerated people will return to society, keeping them connected to their families reduces recidivism and benefits us all.
Link to our site: www.ameelio.com
WIRED article explaining the problem we aim to solve: https://www.wired.com/story/jpay-securus-prison-email-charging-millions/
We are looking for software developers, data scientists, and general support.
Contact: email@example.com
Thanks so much.
Ameelio Team <comment><USER2> Good luck with this project! I know this industry gouges the inmates and family. Read your FAQ, but a few questions..

* How are you going about getting your system into these prison systems when they have basic tech and still using old phone systems?

* Would your solution be another opinion, or are you looking to replace the existing system at a location?

Thanks!</comment>


List of GDPR policies and examples of emails sent - <AUTHOR> https://github.com/CompBusOnline/gdpr-policies-emails <comment><AUTHOR> I have created this from email notifications received in the past 4 weeks.

It might be helpful to a company that is unsure about the types of polices to implement and how to communicate the changes to their customers.

Please feel free to contribute to the project if you see any really good examples of the GDPR being implemented.</comment>


Status of Sails.js - <AUTHOR> https://github.com/balderdashy/sails/issues/3429 <comment><USER2> I don't use sails but I found the criticism of the project interesting because it has somewhere around 80 commits in 9 months.

I guess we are in a time where our tools are expected to significantly change frequently? It seems like I have a disconnect with this mentality as we're running products where stability (reliability as well as API stability) and solid documentation are more important than constant innovation. I like to see bug fixes or security patches addressed quickly, and perhaps a branch for the next major version. But if there's no major issues then I really don't need to see hundreds of commits happening every month on the current branch.

I don't know, perhaps sails is riddled with unfixed bugs? If not though, judging a project on the number of commits seems somewhat like judging it based on lines of code. Neither of those metrics necessarily indicate quality.

<comment><USER3> > I don't know, perhaps sails is riddled with unfixed bugs?

I wrote about a fair amount of unexpected behavior with Sails/Waterline. Some of these have since been fixed, some of them (Waterline defaults to dropping tables unless you have NODE_ENV=production in an env var) are deliberate decisions and hence not "fixable". [https://kev.inburke.com/kevin/dont-use- sails-or-waterline/](https://kev.inburke.com/kevin/dont-use-sails-or- waterline/)

There's a fair amount of other stuff I would hope to change and that we've just ripped out of our fork.

\- If count() isn't implemented in an adapter Waterline will fetch the entire table into memory to count the number of rows.

\- Sails by default creates a route for every function in a controller, which makes it easy for an attacker to bypass policies

\- blueprints routinely 500 server error based on user input

\- [https://github.com/balderdashy/waterline/issues/1248](https://github.com/balderdashy/waterline/issues/1248)

\- All SELECT queries on text fields call LOWER() before matching, so all of your indexes also have to match this

\- There's a batch insert interface but N connections are established to insert N records... if one of the inserts fails, the behavior of the other inserts is not guaranteed

After the ugly discussion at the OP's link we decided to fork Sails and Waterline and rip out all of the stuff we don't need. I wrote about that here: [https://kev.inburke.com/kevin/safely-moving-a-large- shrinkwr...](https://kev.inburke.com/kevin/safely-moving-a-large- shrinkwrapped-dependency/)

<comment><USER2> Sounds like at least a few of those are legit concerns, if not bugs.

Like I said, I don't really know much about Sails. I was just interested in the idea that ~10 commits per month would be insinuated to be an abandoned project.

<comment><USER4> If you only knew how much work needs to be done on Sails.js, you'd understand how inadequate 10 commits per month is :)

</comment></comment></comment></comment><comment><USER5> Mike wrote in here, sounds like they are just busy working on Treeline. My read: doesn't help having an ex-employee / collaborator telling everyone Sails isn't supported any more. That just seems like trolling.

[https://github.com/balderdashy/sails/issues/3429](https://github.com/balderdashy/sails/issues/3429)

> Hey Cody, thanks for sharing your concern. Apologies for the lack of > transparency from our end- it's coming from a place of limited resources, > not deliberate opacity. Like you said, we're a small team spread across a > few large projects right now; and it's part of why we've been in more of > maintenance/stability mode with Sails and Waterline over the past 9 months.

> Another thing has happened too: we've become more attuned to the full > lifecycle of development with a Sails app. The work we do outside of open- > source has always been a huge influence on Sails-- I mean, I firmly believe > the reason why the framework has helped so many other folks is that we've > always focused on solving real-world problems that we have ourselves. Now > that we are a product company (as opposed to being focused on services), our > team has become more attuned with the experience of working w/ a Sails app > over the course of months or years (as opposed to the experience of the > first 2-3 months). As you might expect, maintaining our own large-scale > production deployment has drawn our attention to issues like security and > performance more than ever before.

</comment><comment><USER6> I found SailsJs unfit for any projects that had even a moderately sized set of business rules. Partly due to Node's lack of threading and partly because SailsJs feature set was a weak or incomplete copy of 'real' frameworks which failed to meet needs once they had to offer anything more than an extremely light CRUD wrapper.

I agree with fideloper that it's better not to use NodeJs or any of that mess of an ecosystem for projects more complex than 'plumbing code'.

Saw this comment and it reminded me how Waterline ORM became a running joke at my office. Save yourself a headache and avoid these JS backend frameworks:

> I can chime in on Waterline since everyone keeps mentioning deep populate! > The PR for the polyfill is pretty much ready to go, it's a recursive query > runner that will run queries until the results are completed. This will > increase the query count in sql adapters until the adapters understand how > to interpret and build these join queries (nosql adapters don't have joins > so those will work).

Who needs N+1 select issues when we can have recursive queries baked right into the ORM! smh

<comment><USER7> Node.js is fine. I'm currently contracting for a major company which is using Node.js in production and it's been great. I've worked on Python backends at my previous startup and I can say that Node.js faster to develop with.

Linkedin also uses Node.js and they found a 50% increase in development speeds as a result after making the switch a few years ago.

<comment><USER8> 50% increase in development speed after making the switch from _what_?

I am certainly more productive in Ruby or more recently Elixir than JavaScript on either the client or server.

<comment><USER7> The reason why Node.js cuts down on development times is due to the fact that you can have the same engineers working on both the frontend and backend - Basically it puts you in a situation where you can have a single engineer own a feature's development end-to-end.

When you have a company which is split up between frontend and backend teams, this requires your engineers to coordinate their work with one another and this reduces overall productivity (you usually need a lot of back-and-forth to bring the feature to completion).

<comment><USER9> Or you know, you could just hire developers who know more than one programming language.

<comment><USER7> Yeah, but that narrows down your pool of developers a lot. There are a lot more JavaScript developers than there are JavaScript developers who also happen know RoR.

I mean, sure, someone could learn RoR on the job, but in practice, will they actually do it? In all companies I worked for where the frontend and backend languages were different, developers tended to stick to one side of the fence. Developers just don't like context switching.

<comment><USER6> In my experience any developer worth hiring can do complex frontend work (even by 2015/2016 standards) and backend work. I've never seen a "frontend only" or "backend only" developer.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> I've used sails.js for many (many) projects including gameref.io, hackjob.io, and on several internal projects at my current job. I find it ideal for prototyping and small-to-medium-sized projects. I really hope it doesn't die as I love the pipelined approach it takes.

@SignMeTheHELLUp is complaining about Waterline ORM, but I'd argue that Hibernate is worse (and it's an "industry standard"). It's just a fact of life that ANY ORM will suck because it tries to build an isomorphic API over several database abstractions.

Also, come on, entire world-class companies are based on a Node.js architecture (Uber comes to mind)[1]. If you can't write solid code in Node, you're probably just a shitty programmer.

[1] [https://www.quora.com/What-is-the-technology-stack-behind- Ub...](https://www.quora.com/What-is-the-technology-stack-behind-Uber)

<comment><USER6> > SignMeTheHELLUp is complaining about Waterline ORM, but I'd argue that > Hibernate is worse

Are you serious. Hibernate and all it's language-specific variants are actual feature-complete ORMs. Waterline falls flat as soon as you get past eager- fetching a child property. It's a toy.

I wasn't just complaining about Waterline either. Every time I had issues with Sails I had to dip into the Sails source and patch bugs out, eventually I replaced parts of Sails with libraries that actually worked. By the end of the project the only "Sails" left was the routing component...

Edit: Of the two sites you linked to, one is a splash page and the other is an aggregator that loads slowly. Neither are real-world LOB applications with complex logic underneath them.

I can write solid code on Node the same way I can on any PHP framework, but I'm experienced enough to know to look elsewhere when my requirements are complex.

<comment><USER11> > Every time I had issues with Sails I had to dip into the Sails source and > patch bugs out, eventually I replaced parts of Sails with libraries that > actually worked. By the end of the project the only "Sails" left was the > routing component...

Would love to hear more about this - if time permits, would be a great write- up.

<comment><USER10> I have a feeling it's just nonsense. There's not much to re-write to begin with. Sails.js is a thin-ish layer on top of express that uses grunt to tie everything together. Waterline is the biggest component, but it's not even technically part of Sails.js proper.

</comment></comment></comment></comment><comment><USER12> I can understand doing this from a maintainer point of view - I'll bet this gets written in a better way using the lessons learned from the first version.

Moving fast and breaking things seems par for the course in javascript land, I don't really try to keep up.

I've ended up only using NodeJS for plumbing type apps (e.g. web hook listeners calling other APIs), definitely not for full on web apps, which I've found too-easily devolve into a mess of code.

Keeping up with anything in the NodeJS community is hard - from Node/NPM itself to all the OSS projects around it. I still use it, but I do definitely make fun of how often I'm destroying the node_modules directory and npm installing "fresh" due to the weirdest errors.

<comment><USER13> You're going to love npm3 then. It installs different versions depending on the order you install them.

[https://docs.npmjs.com/how-npm-works/npm3](https://docs.npmjs.com/how-npm- works/npm3)

</comment></comment><comment><USER14> My last startup was built on top of Node.js, Sequelize and Postgres, which worked fine for us.

At my current one, we are re-implementing a ton of very detailed business logic from a PHP/Cake app, while writing comprehensive functional and browser tests. We considered Sails.js but decided the framework was immature vs. Ruby on Rails.

Rails has worked great for us, and has a ludicrously evolved ecosystem, with fantastic gems available, Stack Overflow answers, and lots of other users filing and resolving Github bugs before us (most of the time).

Rails is not as trendy as Isomorphic Javascript, but Ruby is a pleasure to develop on.

The turbulence with Sails.js makes me feel even better about our choice.

<comment><USER15> Isomorphic Javascript has very little to do with trendy and mainly a function of optimizing for mobile experience e.g. reducing latency, smaller payloads which means SPA and websockets and in real world SPA needs to support SEO, FB scraper etc. so Isomorphic is the only viable real world option.

</comment></comment><comment><USER16> Compare the new Trails JS: [https://github.com/trailsjs/trails](https://github.com/trailsjs/trails)

The Trails project is developing thanks to Travis Webb and team, and his reasons are described in the pull request.

The Trails README includes this intro:

"Trails is built and maintained by former members of the Sails.js core team, and offers an upgrade path from existing Sails applications, but it utilizes exactly zero lines of code from the original Sails project."

<comment><USER17> Yea I've noticed this too, mostly because Travis threw up a comment on multiple GH issues on my Sails library e.g. [https://github.com/waterlock/waterlock/issues/99#issuecommen...](https://github.com/waterlock/waterlock/issues/99#issuecomment-166167161)

I've looked over these issues and noticed Travis is just copy/pasting the same message stating "Sails.js is no longer actively maintained". It seems like this guy has a real vendetta against Mike (the creator of Sails) and is dead set on getting all current developers of Sails libraries to either make their library trails compatible or die. This guy really doesn't like Mike and even though he has some good points on making a new framework it seems there might also be some personal issues driving this decision.

<comment><USER4> Personal or not, our entire company is devoted to making Trails the best damn backend framework for node. We don't distract ourselves with VC-funded side projects, and we don't have a automated bot that closes everyone's issues (see: SailsBot).

Our company lives off consulting around the open-source tools we build and support. That's it.

<comment><USER18> "We don't distract ourselves with VC-funded side projects". Ouch. These 'low blows' are childish at best. IMO, I wouldn't think a YC backed + VC funded company would be a side project.

It's good that you can be passionate about what you are doing, but it's obvious there are other motivators

EDIT: sp and example motivator -> [https://twitter.com/TravisWebbUSA/status/679406525358600192](https://twitter.com/TravisWebbUSA/status/679406525358600192)

</comment></comment></comment></comment><comment><USER19> I used sails for multiple small to mid-size projects. IMO, there's nothing seriously wrong with sails. It's easily extendable and if you don't like anything (Waterline has no transaction etc), just replace it.

For beginners, you can still use sails to build apps and also take the project structure of sails as a good starting point for building node.js applications.

The only minor gripe I had with sails is that the "neglected" vibe it gives on github.

Otherwise, I will continue to use sails and also check out trailsjs on the side.

</comment><comment><USER7> That's what happens when the maintainers of a project start to put their hands in too many baskets. They are undertaking big and highly speculative projects instead of projects which address immediate community pain points.

I think Meteor did a better job in this respect. That said, Meteor's services are a bit too expensive.

<comment><USER20> It befuddles me as to why the folks at Meteor chose MongoDB. I know Mongo's marketing was superb, but the product itself is/was so shoddy.

Never mind the fact that you gotta have SQL for almost any robust enterprise app, which, in turn, is such a huge chunk of the market.

I just don't understand the hitching of the Meteor wagon to that broke-down MongoDB horse.

</comment></comment><comment><AUTHOR> I've been using sails for about 18 months, this has me pretty worried and I've experienced a lot of the issues (bugs, long delays on issues and pull requests) others have described. What other nodejs stacks (hapi + ORM?, kraken + ??, etc) do others use to create server apis without having to write a ton of boilerplate for each route / model?

<comment><USER4> Interestingly, even though the node.js community is growing quickly and has a lot of great tools, I think your options are mainly Sails.js and Meteor.

Meteor, imho, focuses much more efforts around building shiny things to convincing new developers to try it out. It has gained a reputation of being a great framework for writing hello world in 60 seconds, but not for building real business applications. Sails is a great tool, but unfortunately is dying, as evidenced by the attitude of the creators (who have moved on to work on other things), and the multiple articles on hackernews and elsewhere discussing whether it is dying. That answer, obviously, is yes.

It is for these reasons that we (several of the core Sails.js maintainers) decided to invest in building a new framework, where we could offer a Sails- like development experience using modern node.js tools and design practices. If anyone is interested in working with us, we'd be happy to talk with you: [https://github.com/trailsjs/trails](https://github.com/trailsjs/trails).

<comment><AUTHOR> Thanks, I know alpha release for trails is in the next few days, when do you expect to have a production release? I know trails is supposed to have a pack that allows you to use it with current sails codebases, how well baked do you expect that to be? Will anything in the sails codebase that goes beyond the simple controllers, models, services, config need to be refactored? For example: custom blueprints, sails hooks, code based on model definitions pulled from sails config, etc.

</comment></comment></comment><comment><USER21> Didn't the core people behind Sails essentially abandon it for the YCombinator startup Treeline.io?

Also, hasn't Treeline been in 'preview mode' for almost a year now?

<comment><USER22> I remember when I first saw the Treeline demo, I was blown away. It seemed like a great framework for striking web services together to solve problems and build great products. Over the past year, I've become weary of any frameworks that sit on top of Node. I currently run gitignore.io and I've had problems using Kraken.js due to lack of updates to the framework or incompatible dependency maintenance. If I were to go back, I would probably just use straight Express and cut out all of the frameworks. They just seem to generate just enough buzz to be functionally interesting and then they fall apart which is a terrible foundation to base any project on.

<comment><USER23> Hey Joe. Would love to better understand the problems you've been having. Mind firing off an issue to discuss?

<comment><USER22> Problems with Kraken.js? I don't use Treeline.

</comment></comment></comment></comment><comment><USER24> Currently a week or two in on a new project using Sails. Any alternatives? Originally, I was going to use just Hapi + Sequalize. Thanks

<comment><USER25> Meteor - it's webdev that doesn't suck.

<comment><USER20> It's webdev that doesn't support a properly robust db. When they finally fix that Achilles' heel, they might have a chance of lasting long-term. MongoDB is not gonna cut it.

</comment></comment></comment><comment><USER26> Are frameworks like this really a thing anymore? Okay, I have to admit I always avoided frameworks that incorporate code generators, so I don't really know.

When using Node.js I always just throw some small modules together and be done with it. It also seems to me, that newer modules encourage this behavior, for example Koa is more modular than Express.

</comment><comment><USER27> Isn't Travis the CEO of balderdash.io?

I don't get it... CEO and Founder don't seem to happy with eachother...

<comment><USER4> We've started a new company to support the development of Trails. I don't want to go into the gossip of why things fell apart with McNeil and Treeline, but suffice it to say that we are no longer involved in the development or maintenance of Sails.

Trails will be the replacement for Sails. Modern, maintained, open, and community-run.

</comment></comment><comment><USER28> "Locked to contributors" is the new tyranny.

<comment><USER4> See also: [https://twitter.com/TravisWebbUSA/status/679406525358600192](https://twitter.com/TravisWebbUSA/status/679406525358600192)

</comment></comment><comment><USER5> Little more digging... here's what I think is going on, and it's sad.

I've pieced this together based on Google searches.

Sails was started by Mike McNeil, who also started a company called Balderdash to do consulting and dev work using Sails. From what I can tell Balderdash isn't quite a "real" company in that everyone listed as working there also does other things at present ([http://i.imgur.com/dFVQawi.png](http://i.imgur.com/dFVQawi.png)). (Mike also started a product company that utilizes Sails called Treeline. Full disclosure, I've been to some of their meetups in Austin, they seemed like clever guys.)

LinkedIn paints a slightly different picture ([https://www.linkedin.com/vsearch/p?f_CC=2604050](https://www.linkedin.com/vsearch/p?f_CC=2604050)) with a few more employees listed, including listing both Mike and Travis Webb as "CEO" ([http://i.imgur.com/onnhqqO.png](http://i.imgur.com/onnhqqO.png)).

Given the size of the company, and the fact that the staff seem to be doing other things, I'd assume someone told Travis, "Hey you can be CEO, but you have to hit some metrics... and if you don't you can't be CEO any more..." And given some of the bickery on the other threads... maybe it wasn't clear or maybe those metrics weren't possible given the range of projects Mike and the other people were working on. We've all been there... Client says, "Yeah we'd like to work with you, but... Do A, B, C, and fix X, Y, Z first..." maybe Travis needed Mike's help and didn't get it. But who knows, and regardless it sounds like Travis was shown the door.

So, and you can see this in the numerous videos where Travis has been promoting Sails the last few years (just Google, he comes up for all the training / discussions around Sails), Travis really liked Sails, and had his feelings hurt because he couldn't work on the project he really liked. And in response, he's now saying, "Burn the ships, Sails is dead, everyone come with me to Trails."

Guy goes from being a huge Sails fanboy in hours and hours of videos that are posted online, to coming here 2 weeks later saying, paraphrased, "I'm going to build my own Sails... with blackjack, and hookers." This scenario sucks for everyone.

You hire a good dev, someone who knows how to get the technology side done... he offers to step up to a bigger role... but who knows, maybe he can't make sales, can't retain customers, he isn't a leader, or isn't focused on the company needs because he's only interested in being a dev... but wants the title of CE-something because he's 22 and it's an ego boost... so rather than leave with dignity, and move on to his next job going back to what he was good at, he is out to sink the people he had been working with.

That's my read. I could be totally wrong, but the drama here peeked my curiosity and after an hour of digging around that's what I came up with.

<comment><USER4> Your assessment is perfectly logical based on the information you have available, and also mostly wrong.

First, I'm not 22, and our COO ran the largest jQuery cobsulting firm (appendTo) for 5 years. Second, McNeil did not hire us, we purchased the company; McNeil has no ownership in the "new" Balderdash. Your educated guesses about hitting metrics and so forth don't apply to anything here.

Mike McNeil needs control of Sails.js because he promised it to his VC investors behind treeline. We did not know this when we entered into the acquisition of Balderdash, and that's not what we signed up for. Since we were lied to for nearly a year, we are pivoting the company and our open-source efforts toward other things. Trails is one of those things.

<comment><USER5> Not sure how Mike can kick you out if he doesn't own the company. Sounds like either he does own the company, or he's not the one who kicked you out... Anyway I'm inclined to believe the company website. If you bought the company you've got access to the site? DNS? Or a contract? Doesn't seem like that's the case given your actions trying to get people to move away from Sails.

So yeah, you saying the project is dead when you know others are still working on it, and trying to tell other people to switch with you -- seems at best shady. Getting a project rolling is hard enough without an active saboteur. Not a great way to get your own business going. Seems to me -- outsider perspective -- you should just move on and focus on your own thing. Clean breaks, right?

<comment><USER27> Having witnessed feuds between Founder and CEO before they're never a pretty sight, so thats why the future of Sails.js has been very disconcerting.

Hopefully relationships can be amended amicably and if Sails.js is truly dead in the water then hopefully Trails.js will pick up where it left off and on better footing I hope, but it will take some time and also some proper PR might of been helpful to the many Sails.js users as well as it didn't need to reach this point, also on that PR note should we expect that they can easily port over their Sails.js projects over to Trails.js?

I was hoping to re-visit Sails.js for a project but considering all that's been happening I'm not sure I should just go with something else like Python+Flask and let Trails.js mature a bit more.

<comment><USER29> I'm sorry that this debacle has negatively impacted your opinion of the framework. Other open-source maintainers had warned me in the past that this kind of thing is par for the course as any project grows, but it doesn't make it any easier to deal with when it happens to you. In the mean time, it has certainly made my family's holidays unpleasant, and disrupted the lives of the rest of our team.

I posted a few important clarifications here in the original issue: [https://github.com/balderdashy/sails/issues/3429#issuecommen...](https://github.com/balderdashy/sails/issues/3429#issuecomment-168801414)</comment></comment></comment></comment></comment>


MacBooks Are an Investment, Not a Purchase - <AUTHOR> https://medium.com/macoclock/macbooks-are-an-investment-not-a-purchase-a9d08d3d4df5 <comment><USER2> I've been using MacBooks for many years and I love them. BUT it's amazing how many problems they have compared to how expensive they are. I have a problem with a battery with my Mac now. I've had problems with screen with my last Mac. My coworker has issues with keyboard. Investment? As in penny stocks or junk bonds?

</comment><comment><USER3> Lol.

If guess that in a few years all the points won't be valid anymore.

It's not possible to upgrade components anymore in macbooks.

Also, quite frankly, I guess that the author has been just lucky. Had any component broken, they would have been out of luck (no warranty, expensive parts).

And quite frankly, for every geek that says "my macbooks had no problems" there are probably ten Normal people that had a ton of problems.

</comment><comment><USER4> My 2013 model is still going strong. I agree with the sentiment.</comment>