HNHacker News
TopNewBestAskShowJobs

kaveh_h

228 karma · joined March 21, 2016

submissionscomments
kaveh_h··on V8 adds support for top-level await
If the balance is handled in a remote server or location then you should have a remote deduct method which handles the operation in an atomic idempotent manner.

If you are handling data locally e.g in a file then you would ideally rely on OS write lock and only store the deltas and never change state. You could then calculate the balance from the log of deductions and insertions.

FYI this problem has not anything to do with async or JS.

kaveh_h··on How is it like to be a dev in Iran
Your points are not objective and judging Iran harsher than all other actors in the region.

First and foremost you conflate Hezbollah, Alewites and Iraqi shias and shias generally with Iranians. This is disponest and therefor your claim Iran colonizing and taken over oil Fields is not true. They are doing same thing as US and Saudi is doing for their allies in the region, supporting them.

Using your terms Saudis have colonized Bahrain and Yemen together with UAE. They have supported a military dictatorship in Sudan and also bad actors in Somalia. They have tried to ”colonize” Qatar but failed. Israel is basically an apartheid state that is destroying the life of all Palestinians.

Iran supporting other entities which are lobbying missiles into Israel and Saudi Arabia is perhaps true. Yet it was Saudis and to some extent US who supported Saddam during Iran-Iraq war. A war where Iraq fired lots of missiles on top of Iran and even used chemical weapons against Iran. You conviently forgot about this war.

No matter how justified US is maximum pressure won’t work if your are emboldening your enemy and treating your own allies like shit (see any European nations lining up to support US?).

The only country that sanctions worked against was South Africa, but in that case it was against an apartheid state that was highly impopular both Inside and outside the country.

kaveh_h··on How is it like to be a dev in Iran
Some down voters, but no counter arguments?

So you all basically think sanctions are going to work and the hardliners are going to cave in and agree to a new deal and not try to crush dissent?

Have you seen state of Venezuela? US threatened to go in and supported an opposition. And the result is failure and real tragedy for the people. Now they are blaiming Cuba.

You don’t need a majority to create a revolution that succeds. You need an enemy which is lacking morale and the means. The Iranian regime supporters now have morale (US dropping out of deal, and allies which can’t stop US influence) and they obviously have weapons to crush the resistance which have none.

kaveh_h··on How is it like to be a dev in Iran
”And last I checked -- I have relatives in Iran -- no one is "starving".”

You basically shared anecdotal evidence from your relatives. Which means you’re cherry-picking and opening yourself up for critique of that comment.

Grow a thicker skin. Tashakor.

kaveh_h··on How is it like to be a dev in Iran
AIPAC has influence because politicians wants perception of an ally to ”defend” and so have better support for their policies. This is not about real genuine support for Israel.
kaveh_h··on How is it like to be a dev in Iran
No deal will be made unless perhaps if Trump wins a second term. One year with sanctions is not something new. As long as Iran have it’s energy supply secured.
kaveh_h··on How is it like to be a dev in Iran
Your relatives are not entirely honest with you. Of course they might not be starving and people might have enough food, but they are having less access to medicines and other necessities.
kaveh_h··on How is it like to be a dev in Iran
And play the game the US government wants them to play?

US is creating the situation were enough conservative Iranian (their are enough) are going to support their government just because sanctions and muslim ban exists.

kaveh_h··on Free Wolfram Engine for Developers
He should open source the Core language and then license all the extra functionality in paid for libraries. That would at least make it more possible to opt out the paid for functions or if you would like to have it opt in later.
kaveh_h··on Congress Is About to Ban the US Government from Offering Free Online Tax Filing
In Sweden too it’s super easy.
kaveh_h··on Congress Is About to Ban the US Government from Offering Free Online Tax Filing
We’ve had great digital government services In Sweden for years. I did my taxes yesterday in 3 minutes from my laptop, digitally signed and submitted.
kaveh_h··on Facebook are 'morally bankrupt liars' says New Zealand's privacy commissioner
Also in the era of deep fakes, the ability of free, live and broad distribution is even more fuel to the fire.
kaveh_h··on Facebook are 'morally bankrupt liars' says New Zealand's privacy commissioner
Is it a necessary to have a ability to live stream of police brutaility? Would a delay of lets say 1/2 day and distribution after moderation or by regular media be that bad? As long as you can record a video and store it live on cloud storage hindering cops from destroying video. That should be enough of a deterrent for officers to avoid police brutality.
kaveh_h··on Facebook are 'morally bankrupt liars' says New Zealand's privacy commissioner
It’s not the same thing at all, Facebook is a social media platform that enables distribution of material to a broad public. Terrorists clearly use social media hopping it will reach as many as possible. Remove the non-moderated access to distribution to a broad public and the incentive is lowered.
kaveh_h··on Facebook are 'morally bankrupt liars' says New Zealand's privacy commissioner
I call bullshit on Zuckerbergs claim as birthday parties and group hangs streams are primarily with people you have direct relationship status with on Facebook and thus can be distingishued when distributed to users by Facebook as non-related users can have a delay added for review. This would at least greatly reduce the spread of said material to limited groups and if individuals within that groups choose to resubmit it to increase it’s reach a bit, they could be sued for actively and knowingly spreading illegal and harmful material.

Either Zuckerberg don’t want to move a finger, or he simply want regulators to regulate Facebook and other social media to create a higher barrier of entry into the social media market.

kaveh_h··on Correctness – A paradigm for sustainable software development
I started learning to write Haskell a while ago. My current reflection is while it’s easy to start learning to write simple code and correct code it a much larger step to actually be able to write performant code that is generic. Performant idiomatic Haskell requires a good enough understanding of the functional paradigm.
kaveh_h··on Boeing CEO Dennis Muilenburg Addresses the Ethiopian Airlines Flight 302 Report
The difference between Wolkswagen and Boeing is the latter is an american company and hence is probably not going to face billion of dollars of damage from american authorities and current administration. Probably no jail time either.
kaveh_h··on Boeing CEO Dennis Muilenburg Addresses the Ethiopian Airlines Flight 302 Report
Don’t put the blame squarely on Boeing.

It’s clear FAA lacks the expertise to regulate this kind safety issues. It’s not easy for them to have it either since the innovators are always a step ahead but it’s clear they need to shape up.

I don’t have any knowledge of the process for verification of new airplane models, but one thought as software developer would perhaps be for FAA to become more digital in their efforts. Require from manufacturers (At least for bigger models) a digital virtual model of the entire airplane that will be used for simulated tests. You could for instance test faulty signaling sensors but also the whole subseqqunt chain of events taking into account pilot actions (or lack of).

It should be a routine to replay a simulation with data from previous crashes. In this particular instance perhaps FAA would have understood the reasons of the first crash and been able to stopped the second crash from ever happening.

You could even develop methods that can generate data to be able to predict hidden issues with an existing design without a real crash ever happening.

kaveh_h··on Lambda School (YC S17) now pays eligible students $2k/month
Awesome, and kudos for having real skin in the game. Hopefully it will be well executed and rewardful for everyone involved.
kaveh_h··on Pigeon Towers: A Low-Tech Alternative to Synthetic Fertilizers
Composts need worms and other type of insects that compose the waste plants. It could be a slower process in certain part of the world if these insects are not plenty as a result of dry climate.

Besides the production output is probably far higher than what the pigeon consumption (not a penny for a dollar as you suggest), otherwise why would these people bother for thousands of years.

kaveh_h··on AlphaStar: Mastering the Real-Time Strategy Game StarCraft II
For real life applications, parsing the ”scene” would have impact as it could only convey imperfect information retained. In the game of starcraft the information is perfect when fog of war have been removed this together with unlimited attention (camera viewport) helps action potential and macro planning. No player is ever going to be able to consider precise strategy on the whole map perfectly in their mind. If deepmind wanted to mimic human limitations perfectly they would have to provide imperfect information for AlphaStar, e.g when providing information of locations of objects sample a random variable from a probability distribution which represent the location imperfectly and making that distribution bigger the longer the attention of the A.I wanders from the object both spatialy and temporal. Of course the usefulness of having these limitations is purely to model maximum theoretical human mental capacity and it’s use case could be to help explore strategies that work for actual humans.
kaveh_h··on SF restaurants are suffocating
That’s ridicilous. The system has clearly been setup to fraud the majority who needs welfare and is a political virtue signaling. I bet the mean salary was right in the Middle of the ”cliff” (around 55k$) when this was decided to ensure very few would get the benifit and cost on government would be minimal.

The logical policy would perhaps be to equalize income to a certain treshold depending on available funds and budget on a particular year. This would also make investments in transits and housing more stable for everyone involved, simplyfing business decisions and quite possibly increase long term profitability.

kaveh_h··on Talent Is Everywhere, Opportunity Is Not
The teachers or other sets of people who recognize talent must in themselves have a certain ability or “talent” for spotting talents in others. So if talent was abundantly everywhere why aren’t there enough of these talented teachers/mentors/parents who can nudge all the other talents so they can reach their potential?

The answer could be that talent is not well distributed over life time. For instance it would be safe to assume the bulk of the best teachers/mentors do not voluntarily work in places which pay them bad wages (usually poor areas) and so often opt to move to richer areas. And thus many of those talented kids from rural places grow up with much less chance of getting noticed and more importantly good “nudges” as a result.

If this is true and if society wanted to maximize utliziation of talent there’s perhaps no clear simple way, but a strategy might be to artificially redistribute this kind of talent for instance by giving poorer areas more funding for education.

kaveh_h··on The Wavefunction Collapse Algorithm Explained
Yes, but in this case the algorithm would need to figure out the constraints from preexisting examples and so would you not need to program complex constraints rules with probabilities by hand?
kaveh_h··on Slack closes account of an Iranian user living in Canada
Tor, bittorrent, bitcoin and other decentrialized open source software are great examples. No government can control what no one controls.
kaveh_h··on Canada has arrested Huawei’s global chief financial officer in Vancouver
Aha you think the American people has the facts and experience enough to be able to make good judgements in foreign policy and even that YOU actually now what their voice is and can represent them completely?

What you now is the same as everyone else what’s being sold in the media (even social media). There are lots of hacks like Thomas Friedman being given lots of page space in papers such as NYT to even spread propaganda for powerful interests. In aggregation these hacks represents alignments of powers which even a president cannot surmount in the long term. Obama of course understood this but didn’t give up on what he thought was right, and now Trump does not care about was is right instead he simply surf the waves of narratives spewed by the conservative/alt-right to both winning the presidency and keeping his hold on power and enrich himself in the process, while he claims he’s being backstabbed by the deep state. But it’s clear his bet on the wrong horse is becoming a hazard as more Republicans in Senate are realizing this and changing course to avoid the risk of complete collapse of their party and American morals.

I guess another Vietnam has to happen so that the American people will again learn the real news, but given the assymetry in military power and outsourcing of it to allies like SA I’m not sure if they will learn this time.

kaveh_h··on Canada has arrested Huawei’s global chief financial officer in Vancouver
Sure it’s a different story. Because it explains everything. How come one country is sanctioned while the other is treated like good friends. This is not a new trend with Yemen and Khashoggi affair either. Saudi Arabia has spread it’s ideology both to Pakistan, Afghanistan, South Asia and also in parts of Africa. That ideology is behind groups such as Al-quaida, Al-shahab, ISIS, Taliban who knows who else. This started in the 80s. Yet because they were allied with US they were treated like friends. Reagan even took a couple of pictures with some of them.

But history and context does not suit a soldier who is only looking at the “facts” given by his superior.

kaveh_h··on Canada has arrested Huawei’s global chief financial officer in Vancouver
And you think it’s just of US to sell weapons to a authoritarian murderous regime like SA? Previously Saddam in Iraq? And also the Afghan fundamentalists during Russian and Afghanistan war? Eventually US went to war with both Iraq and Afghanistan with the same leadership they supported earlier.

The Shia militias your talking about is no better nor worse than the kind of people both US and SA and other gulf countries have supported in the region. You think ISIS could have existed without certain external help in the ME?

The question is not if Iran is bad they clearly are, but they are not worse than the rest of the regional powers also not worse compared to US given it’s track record in both supporting totalitarian leaders and fundamentalists.

kaveh_h··on Canada has arrested Huawei’s global chief financial officer in Vancouver
In any case a US president could always make up a story why the other party has violated a treaty if there’s enough interests which are aligned.

Remember Iraq WMDs?

kaveh_h··on Canada has arrested Huawei’s global chief financial officer in Vancouver
Well said, US bias towards Saudi Arabia while both SA and Iran have totalitarian regimes which misbehave in the region shows they are primarily interested in having influence in the region. SA is the one deemed best suited and most willing to at least publicly show support for US foreign policy. Unfortunately affiliation with SA will wreck havoc with any diplomatic mission of US in the region for the future. Russia and China will gain more influence going forward as they don’t have so much moral baggage in the region.
← PreviousPage 3 of 4Next →