Better HN
topnewbestaskshowjobs
Log inSign up

ece

939 karma · joined Aug 1, 2017 (9y ago) · 968 submissions

Living somewhere between eecs and cecs.
Submissions

comment 9y ago · link · parent

It can only never happen if you use a lock correctly. In separate threads, this can absolutely happen in imperative programming. As a reader-writer or dining philosopher problem will show, two actors can try to do the same thing at the same time unless you EXPLICITLY stop them by using locks.

In FP, you will have an immutable variable for state instead of a mutable variable wrapped in a lock. You will be passing a whole new immutable state variable to a pure side effect free function every time, and won't have to worry about getting a lock and releasing it explicitly (these would be side effects). As long as the state is immutable and synced across threads, actors in any thread can just plot their next actions using that state.

In imperative programming, like I said, you'll have to explicitly get and release locks to make sure two actors don't occupy the same spot.

So, if you use atomic immutable variables with pure functions, and the logic in your actors can be conflict free, you can have horizontal scalability across as many cores as you want pretty easily. If your actors cannot be conflict free, you will need to wrap a lock of your choice in a monad and use that, but you will still have gained better debugging, testing and maintainability by using FP.

Now if only every zero-cost OO abstraction had a straight forward FP alternative that was also zero-cost, we'd all be doing FP as of yesterday.

comment 9y ago · link · parent

I think the crux of his point is really between constantly having to update state in a mutable way (with a decent probability of starvation and possibly deadlock) vs. pure functions, immutability and the async FP architecture he talked about. The advantage of the later is it brings maintainable code, and this stays true throughout the life of the code.

Off course, you'll have to hire or train FPers as he mentions.

comment 9y ago · link · parent

But one actor can always read the state of the other actor, and modify their actions accordingly. The state of each actor is immutable, so each action taken based on the state is sure to be conflict free. As opposed to imperative programming, were each actors position might not get updated correctly or in time until too late. Deadlock and starvation don't happen when you have pure functions with no side effects and immutable state like they do in non-FP languages.

Timing is harder to get right when everything is async, but if your game design is good, you just need to better implement it to get it right frame by frame. He also talks about having monads to handle things like this.

comment 9y ago · link · parent

This is the wrong question to be asking, antifa and blackboc by definition only show up at fascist and racist rallies.

This is what this statement is about: https://www.nytimes.com/2017/08/17/nyregion/aclu-free-speech...

comment 9y ago · link · parent

He talked about a whole FP-powered architecture to solve this.

comment 9y ago · link · parent

I wonder about the present state of the functional projects he talks about and is currently working on. A bit old, but good video talking about FP and static typing from a veteran perspective.

Would like to see a conversation between Sid Meier and Carmack, the modern Civ engines seem to have made some strides in stability methinks.

comment 9y ago · link · parent

Context: So the ACLU of VA filed against having the rally moved to a park away from downtown Charlottesville, and the Judge agreed going against the City. Yeah, this probably wasn't the best call in retrospect. Something other ACLU chapters can correct.

https://acluva.org/20108/aclu-of-virginia-response-to-govern...

https://www.nytimes.com/2017/08/17/opinion/aclu-first-amendm...

https://www.aclu.org/blog/free-speech/equality-justice-and-f...

comment 9y ago · link · parent

Or they are just making their position clear: https://en.wikipedia.org/wiki/Imminent_lawless_action

Trump is being sued for inciting violence as well: http://www.slate.com/articles/news_and_politics/jurisprudenc...

Inciting violence should be a clear line, and I'm glad the ACLU of California is making it clear that it is. As far as past cases go, this doesn't seem to be contradictory or different, but I don't know if it is.

comment 9y ago · link · parent

I also want to mention there were probably specific reasons why the vote was so close in these states. Namely lead in the water in Flint MI, and Scott Walker ending collective bargaining in WI. PA vote is probably most reflective of the decline of unionization. https://www.nytimes.com/2016/01/17/opinion/campaign-stops/th...

These issues probably affected presidential democratic turnout in these states as much as any other issue affecting the statewide or national campaigns. Also, millennial turnout was down from 2012 according to exit polls. Not sure how much to believe exit polls. Total turnout was up by little in MI and PA in 2016 compared to 2012, and it was down in WI.

https://www.nytimes.com/interactive/2016/11/08/us/politics/e...

https://en.wikipedia.org/wiki/United_States_presidential_ele...

https://en.wikipedia.org/wiki/United_States_presidential_ele...

comment 9y ago · link · parent

Here are the results for MI, PA, and WI: https://www.nytimes.com/elections/results/michigan https://www.nytimes.com/elections/results/wisconsin https://www.nytimes.com/elections/results/pennsylvania

In all three cases, the difference between Hillary and Trump was less than what the 3rd party candidates got and what Jill Stein alone got. Given what I've said before, and what happened in 2000 in FL, trying to convince people of actually voting for their 2nd preference (Hillary) or vote trading in such states makes almost as much sense as blaming the Clinton campaign itself (definitely deserves the most blame), Russia, and any number of other reasons why Hillary lost.

It's a part of the puzzle, again, given that this is the 2nd time this happened.

comment 9y ago · link · parent

I am not sure how to help with your perceptions of campaigns and candidates, but their likely policies and cabinet appointments were there for anyone to see. Trump institutionalizing xenophobia is a degree of difference that is hard for me to see past.

comment 9y ago · link · parent

Yes by definition, and I did define it as a presidential election flipping because of 3rd party voters in a handful of swing states.

You're ignoring that Trump on the ballot meant any Libertarian was going to get a bump. Any other republican, and their winning margin would've been bigger, or Hillary would've won and we wouldn't be having this conversation.

It shouldn't have been close, but the last few elections have been, with the popular vote winner losing the electoral college twice and Kerry coming within ~30 EVs. Do you have a solution for divided media, inequality, climate change, and citizens united, that is simpler than vote trading or making people realize voting for their 2nd preference might just be worth it to hack the electoral college? I'd love to hear it.

comment 9y ago · link · parent

By definition they helped Trump more in WI, MI and PA. Where MI, PA, and WI would have put Clinton over 270. Have there been any cases where Republicans would have won the presidency but 3rd parties were spoilers in a handful of states? I don't think so. Maybe in 1960.

Percentage increase is less relevant with Trump on the ballot, compared with the raw votes that swung the electoral college.

I am not saying don't vote for 3rd parties. I am saying if you're in a non-safe state for your 2nd preference, do vote trading with someone in a safe state or vote for your 2nd preference who has a better chance of winning. If you vote trade, your 3rd party candidate will still get the same percentage of votes nationwide, and your 2nd preference will actually win.

The combination of mass incarceration, the racist electoral college as it is, and the the demographics of the country make it seem likely that some pragmatic and tactical voting in non-safe states will go a long way for Democrats, at least that seems to be the lesson from the past two decades. Hacking the electoral college anyone?

comment 9y ago · link · parent

States handing out their electors according to vote would make the system non-racist.

comment 9y ago · link · parent

This is the very definition of idealism and being naive about how much your vote matters, when you should give a thought to your 2nd preference and be pragmatic if you are in a non-safe state for your 2nd preference. Do vote trading with someone in a safe state, and your candidate will still get the same percentage of nationwide votes, and your 2nd preference will win.

Again, I am not saying that don't vote for 3rd party candidates anywhere.

There is no equivalence between Trump and Hillary, and if Voting for Hillary in a non-safe or safe state would have been a wasted vote, pity the 65 million who voted for her.

comment 9y ago · link · parent

It mostly is if you lookup the definition of spoiler. Gary Johnson and Independent voters did also receive more votes than the difference between Trump and Hillary in MI, PA, and WI.

comment 9y ago · link · parent

It's purpose was to have electors cast nationwide votes before mass transportation existed. In it's current form, it is completely a left over from a racist past.

http://www.salon.com/2016/12/15/the-electoral-college-born-o...

Also, if a democratic candidate is your 2nd preference, and you're in a non-safe state, and you don't trust vote trading, you should most likely not vote for a spoiler candidate, and vote for your 2nd preference democratic candidate. If a democrat isn't your 2nd preference, go ahead, do what you want.

The mechanics of the electoral college make this much pragmatism and tactical voting necessary for any American voter I'm afraid.

comment 9y ago · link · parent

People should be vote trading if they're in a non safe state. https://www.nytimes.com/2016/09/16/opinion/anti-trump-republ...

No excuse to not do it until the electoral college is abolished.

comment 9y ago · link · parent

I'm not shaming the fact that they voted, I'm shaming who they voted for. You aren't a responsible voter if you're not up to accepting responsibility for your vote. If you voted for Trump, hope he's making you happy. If you voted for Jill Stein or Ralph Nader in 2016 or 2000 in WI, MI, PA, or FL, you are very much responsible for Bush and Trump respectively in the electoral and government system we have since your candidate was a spoiler.

These 3rd party voters could have abstained or voted for another 3rd party or went Republican, but they didn't. They could have traded their vote to someone in a safe state (https://www.nytimes.com/2016/09/16/opinion/anti-trump-republ...), if Hillary was their 2nd preference. If not, go ahead, vote for 3rd party candidate who could be a spoiler and has no chance of winning.

comment 9y ago · link · parent

Seriously, downvoted for pointing out legitimate fact and reference to pragmatism?

comment 9y ago · link · parent

Trump won because in MI, PA, and WI, Jill Stein received more votes than the difference between Trump and Hillary.

3rd party candidates in FL in 2000 and MI, PA, and WI in 2016 were the spoilers for the whole nation. Don't be an idealistic, naive American voter, be a pragmatic voter!

Yes I know the electoral college is racist, and we need to abolish it.

comment 9y ago · link · parent

So, as a motive, one possibility could be the DNC orchestrated the DNC leaks to blunt the effect of trickling podesta/wikileaks emails if it was somehow an insider. Why become the news during a campaign where every moment Trump spoke his poll numbers went down? And show their own favoritism? It doesn't seem plausible. This could all be more Russian disinformation. As far as the podesta/wikileaks emails go:

1) Russia's history when it comes to election meddling and spreading dis-information speaks for itself, yes the US does it too, but the Russia is on another level (Every eastern European country has been a public target from the same groups).

2) Russia had a lot more to fear from Hillary than Trump. The sanctions and military ratcheting would likely be more in force than it is now under Trump and a dysfunctional congress. Hillary was a known hawk on Russia, compared with Manafort/Flynn on Russia.

3) Putin himself said "some patriotic Russians might have done stuff" like sending phishing emails.

When Russia faced the lemon of a Hillary administration, they made lemonade. Arguably, it wasn't that hard and paid for itself. We as the voting public knew most of this before the election, including partly about Trump's intent of collusion and possibly collusion, and voted the way we did anyway.

Assange is kind of irrelevant, he has always had his own motives, and it's pretty clearly being anti-US. Offering Damore a job with wikileaks, really?

comment 9y ago · link · parent

non-mobile link: https://www.nytimes.com/2017/08/12/opinion/sunday/google-tec...

comment 9y ago · link · parent

This is the point, the amount of money used for this acquisition could have been used to bring the Model 3 to market quicker and make batteries in Reno quicker, not to mention any unforeseen problems with production, scaling, and recalls go away that much quicker too.

Which is the bigger market? Solar or cars? They might both be similar sized, but demand for solar sure would have been helped by having the Model 3 on the road. Hope the acquisition doesn't hold Tesla back, like most of the market thought at the time.

comment 9y ago · link · parent

Do you have any better studies to cite for what you're saying? Because if you don't you shouldn't be saying what you're saying.

comment 9y ago · link · parent

Against code of conduct is a pretty clear case. More companies should take this hard line with their employees, and I'm surprised this didn't happen 2 days ago.
1
2930313233