What can defend against off-the-shelf drone weapons? - <AUTHOR> https://www.dw.com/en/what-can-defend-against-off-the-shelf-drone-weapons/a-44970742 <comment><USER3> s/drone/guerilla tactics/ and the answer, speaking as a veteran, is nothing.

I expect to get downvoted for this, but after a tour in Iraq I firmly believe theres no weapon or countermeasure thats going to be unilaterally effective at arresting the concept of guerilla warfare and terrorism except negotiation. Otherwise, you end up dividing your city into red and green zones, and pretty soon even if a terrorist attack hasnt happened in a few months, terrorism is pretty successful in making peoples lives outright miserable. smoking kills more americans than terrorism in 2017, but we still have to take our shoes off at the airport.

People just want equality, some measure of freedom, liberty, and prosperity. Show up with tanks, rig an election in favor of your candidate, and disenfranchise an entire segment of the population like we did in Iraq, and you will find people will adopt all sorts of creative and clever methods to not only sabotage your mission, but actively eliminate your high value targets youve come to rely upon for 'nation building' or whatever geopolitical pursuit du-jour is popular.

In Iraq, we called it "winning hearts and minds." doing things to fix problems like providing clean water or just a few meals made incredible progress in crushing the enemies ability to recruit anyone more sophisticated than an angry goat herder. And he quit being angry once we fixed the sidewalk to the mosque.

In maduros case, he is reviled by a sizeable _majority_ of his population. he openly ignores major problems like starvation, he engages his people with violent tactics, and he disregards basic human rights and living conditions. Nothing, no technology on this earth, will keep you safe if your people turn on you. There is no police or military force that can endure sustained guerilla terrorist tactics indefinitely. Not even the US Military.

<comment><USER4> > _Show up with tanks, rig an election in favor of your candidate, and > disenfranchise an entire segment of the population..._

I protested the Iraq invasion in 2003 but this is a revisionist and historically inaccurate version of why it failed so spectacularly.

The U.S. didn't occupy a functional country and then destroy it. The outbreak of mass murder and tit-for-tat violence wasn't motivated by political grievances against U.S. policy. The U.S. removed a dictator that was keeping the lid on religious sectarian infighting. It erupted immediately into a civil war and that was further inflamed by third parties.

 _" The fall of Baghdad saw the outbreak of regional, sectarian violence throughout the country, as Iraqi tribes and cities began to fight each other over old grudges. The Iraqi cities of Al-Kut and Nasiriyah launched attacks on each other immediately following the fall of Baghdad to establish dominance in the new country, and the U.S.-led Coalition quickly found themselves embroiled in a potential civil war. U.S.-led Coalition forces ordered the cities to cease hostilities immediately, explaining that Baghdad would remain the capital of the new Iraqi government. Nasiriyah responded favorably and quickly backed down; however, Al-Kut placed snipers on the main roadways into town, with orders that invading forces were not to enter the city. After several minor skirmishes, the snipers were removed, but tensions and violence between regional, city, tribal, and familial groups continued."_

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

<comment><USER5> > _The U.S. didn 't occupy a functional country and then destroy it._

But they _did_ disband the Iraqi army and the whole Iraqi state!

> _" The fall of Baghdad saw the outbreak of regional, sectarian violence > throughout the country, as Iraqi tribes and cities began to fight each other > over old grudges."_

These are things the Iraqi Army and Police could have kept under control, had they existed. Instead, unemployed soldiers made up much of the sectarian fighting forces.

A country without a state devolving into anarchy shouldn't be that surprising. But to the US, it apparently was!

<comment><USER6> It wasn't surprising to the US. That was the whole point. To destroy the Iraqi oil industry.

<comment><USER7> Why would the US, the country dependent on oil prices being low, would want to destroy the oil industry of a major producer?

<comment><USER8> Depends on who you ask. There is a somewhat popular conspiracy theory out there [0] that claims Saddam (just like Gaddafi) got "removed" for selling oil in Euros instead of Dollars [1], which would have hurt the petrodollar in the long term.

[0] [https://www.quora.com/If-Saddam-Hussein-and-Gaddafi-were- ous...](https://www.quora.com/If-Saddam-Hussein-and-Gaddafi-were-ousted-from- power-for-attempting-to-sell-oil-in-euros-gold-instead-of-US-dollars-why-is- Maduro-still-in-power-if-he-recently-announced-that-Venezuela-will-sell-its- oil-in-Yuan)

[1] [http://edition.cnn.com/2000/WORLD/meast/10/30/iraq.un.euro.r...](http://edition.cnn.com/2000/WORLD/meast/10/30/iraq.un.euro.reut/)

<comment><USER6> Yes, that and what I said in another subthread.

Also, Sadam had outlived his utility.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> I think there's a dangerous combination represented by the FPS Russia video with the drone-mounted gun. But instead of going for automatic fire, mount something like a TrackingPoint computerized rifle instead. This combination could be made even more dangerous by emphasizing low noise and observability, perhaps by using ducted propellers and fixed wings. If such a drone were inaudbile from 3000 feet, it could amount to an undetectable assassination machine, requiring rich and powerful people to have a 24/7 team of anti-drone specialists.

[https://arstechnica.com/gadgets/2013/01/17000-linux- powered-...](https://arstechnica.com/gadgets/2013/01/17000-linux-powered- rifle-brings-auto-aim-to-the-real-world/)

EDIT: Before you accuse me of making up fantasy weapons, you'd best read the above link, and the one below. Computer aimed firearms that perform at "sniper in a box" levels actually do exist.

[https://arstechnica.com/gadgets/2015/01/trackingpoint- shows-...](https://arstechnica.com/gadgets/2015/01/trackingpoint-shows-off- the-mile-maker-a-smart-rifle-with-1800-yard-range/)

<comment><USER10> With a drone, what's the point being 1000m away ? You can put a few grams of explosive on a $30 nano-drone and detonate it right on the chest/head of your target. The "Slaughterbots"[1] video gives a good idea of what it could look like.

[1] [https://www.youtube.com/watch?time_continue=191&v=9CO6M2HsoI...](https://www.youtube.com/watch?time_continue=191&v=9CO6M2HsoIA)

<comment><USER11> Cause drones can be jammed/blinded up close. It's much harder to defend from a bullet fired from a kilometer away.

<comment><USER12> Is it possible to jam the drones and not also end up jamming your own communications?

<comment><USER13> Yes. In its simplest form, radio jamming is just tramsmitting junk on the same frequency as the target. If you want to jam a couple kids using channel 10 on their FRS radios, all you need to do is put your own radio on that channel, ducttape down the push to talk button, and stick it in front of a laptop playing a 10 hour rick-roll video. Jamming RC aircraft, or GPS, or any other radio service is more or less the same in practice. The only difference is the type of transmitter you need to emit the jamming signal.

Radio jamming can be as broadband or narrow band as you desire. The narrower the band you target, the less power you need. The catch is, 1) you need to know what frequency you are trying to jam, and 2) this is not at all legal, so it would probably only fly in the middle of a warzone.

</comment></comment></comment></comment></comment><comment><USER14> The drone with a machine gun is an ad for that years new CoD and is fake. That the article didn't acknowledge it shows they don't do their own research or are trying to mislead the reader.

[https://www.themarysue.com/fake-cod- quadrotor/](https://www.themarysue.com/fake-cod-quadrotor/)

Edit: spelling

<comment><USER15> But I don't think they claim that it was real?

"Whether reality or simply show, these examples make it clear that a good defense against drones is vital for both bodyguards and military in the field."

</comment></comment><comment><USER16> A number of things.

1) blocking GPS. 2) Electronic noise (mostly the same as blocking GPS, but needs lots more power) 3) thin nets. (bonus points for barrage balloons) 4) shotguns 5) flak (air burst anti-air shells 6) rain

Off the shelf quadcopters are fragile and not designed to cope with hostile flight. Loose a motor and your falling out of the sky.

Loose a GPS track and you'll either hover, or descend. This could be hacked to rely on dead reckoning, but that's inherently inaccurate. the sensors are designed to tell you what way up you are, how fast you are deviating from desired angle, they rarely have odometers.

A small > 250watt narrow band transmitter, Something with harmonics for 2.4gigs, or just a modified microwave magnetron with a decent directional antenna will destroy most hardware.

A thin fishing net is thin, light, cheap and almost invisible. The hardest part is keeping it in the correct place.

<comment><USER17> Before GPS, cruise missiles used photographs of the terrain they expected to navigate and a camera. The photos were state secrets back then; today they're easily accessible for the entire planet. Miniature computers are also far more power and more capable of the processing needed for navigating using photos and a camera. It'd take some R&D to develop, but it's certainly possible.

Also, "falling out of the sky" can still be an effective weapon if you plan for it.

<comment><USER18> While certainly possible, it would take the pool of people able to build it down at least an order of magnitude. I can say so with the experience of a guy who build drones and also tried working with some vision stuff for drone indoor positioning. It simply is far harder to do. GPS guidance you can do it in an slow evening.

Most of the measures intended to stop access to explosives, weapons and generally dangerous things are not able to do so 100% but simply make the cost of that access high enough MOST malevolent actors will simply not afford it.

</comment></comment></comment><comment><USER19> Honestly, I think underground, subterrainian cities are quite possibly the only silver bullet answer, as a correction for some of the emerging technology we'll be forced to confront, if things get out of control with everything laid out in the open.

There's this view, held by some, that with the atomic bomb, the cat's out of the bag, and the escalation of weaponry hit the ceiling in terms of organized conflict. But that there's also a non-linear side effect.

The outlook of this view holds that, if we indeed smacked into the ceiling, harnessing the same natural power that fuels the sun's daily dose of daylight, well, there's a whole vacuum of optional behavior between a floor of sharpened wooden sticks or hurled rocks, and a maliciously used hydrogen bomb, and all of human creativity to imagine interesting ways to negotiate that gradient between a single hostile neolithic ape, and nuclear age, mutually assured ICBM psychosis.

So maybe we got only a foot off the ground with primitive biological sabotage, or fumigated battle trenches dug into former farm fields, before we catapulted into the upper limit with the idea of multiple re-entry vehicles delivered in waves, to target thousands of cities simultaneously.

And what was the idea for how to cope with all your favorite cities being instantaneously incinerated?

That's right. Cave networks underneath mountain ranges. Going full dwarven on the problem.

So, the bonus side effect of going full AD&D dwarf character class, is that it also models well for self contained space stations.

Maybe closing the door to the biosphere, whilst certainly a tragedy of the commons it may be, possibly opens a window to outer space?

<comment><USER20> > _And what was the idea for how to cope with all your favorite cities being > instantaneously incinerated?_

> _That 's right. Cave networks underneath mountain ranges. Going full dwarven > on the problem._

I've played Dwarf Fortress, and I know how those games typically end. I think we have enough !!FUN!! on the surface.

</comment></comment><comment><USER21> The economy does. There are no off the shelf drone weapons. To develop them would require moderately skilled professionals. Moderately skill professionals in good economies do not engage in guerrilla weapon production because they have better ways of making money without the criminal liabilities.

<comment><USER22> Professional, singular. All it really takes is _one_ person with an ideological axe to grind and a moderate amount of skill, and you have instructions that others can use to turn off-the-shelf components into weapons.

It's happened before. P.A. Luty wanted to make a point about British gun control laws, so he built a submachine gun out of ordinary hardware store parts and wrote a book ("Expedient Homemade Firearms") containing detailed instructions. He got jailed over making these weapons, of course, but the point stands.

<comment><USER23> And that's why Britain is _overrun_ with submachine guns to this very day!

<comment><USER22> Mexico and Latin America are the main place these sorts of weapons show up, and there was a noticeable uptick in these types of firearms after the book was published. Most people aren't willing to flout the law and build submachine guns, but once the knowledge is out there it's a thing that outlaws can and will do.

<comment><USER24> Which is nice because then you get a super easy way to arrest them. It's much easier to arrest a gang member for having a weapon than catching them on the act. It is very common in Europe.

</comment></comment></comment></comment></comment><comment><USER25> In the end there's really no good way to electronically block against a drone. Someone could preposition some infrared lasers pointed along the expected flight path and the drone could use those to perfectly navigate to the target. Or a single laser that tracked the drone by scanning the sky and the drone acknowledging when the laser was pointed at it. Or I'm sure a dozen other schemes. Someone willing to spend a year tinkering could come up with a drone that is only stoppable by directly disabling it.

</comment><comment><USER26> Many will not like this, but: off-the-shelf shotguns in the hands of competent shooters, among other things.

<comment><USER27> Check: Tom the dancing bug - Goodguy with a Gun

</comment></comment><comment><USER28> Actually, simple off-the-shelf weapons are extremely effective against drones. A 12ga loaded with #9 pellets can easily defeat any off-the-shelf drone. And to boot, the pellets fall harmlessly back to the Earth if fired into the air.

<comment><USER29> but can it defeat a dozen of them at once? a hundred?

the big shift that drones represent is replacing trained soldiers with direct industrial output. the future is swarms.

<comment><USER28> "off the shelf" vs "off the shelf"

</comment></comment></comment><comment><USER30> The fact that most people value their freedom and are not looking to commit crimes. There are many many things that could be done, but if done mean essentially destroying your life. Most people don't want to destroy their lives.

<comment><USER31> One griefer with a website that offers exploding drone swarms to a given target? 'Most people' isn't everybody, and it only takes one. And the website could be anonymous (bitcoin anyone?)

<comment><USER32> It's a problem of scale. Say 0.0001% (number pulled from my rear pocket for illustration purposes) of the population want to engage in 'recreational terrorism' or 'orc-work'. If you have a population in the hundreds of thousands or low millions, there just aren't enough of them to have any direct impact on the big picture. But once you get the population high enough, once the _absolute number_ of evil idiots is high enough to cause real systemic damage, even though they are a tiny percentage of the whole.

<comment><USER31> One tiny group of people hijacked 3 planes, and we're suffering the fallout decades later.

</comment></comment></comment></comment><comment><USER33> I make a kidding-not-kidding joke about skill with bolas making a resurgence as a counter to drone harassment.

</comment><comment><USER34> Something like this: [https://en.m.wikipedia.org/wiki/Krasukha_(electronic_warfare...](https://en.m.wikipedia.org/wiki/Krasukha_\(electronic_warfare_system\))

and something like this: [https://en.m.wikipedia.org/wiki/Pantsir_missile_system](https://en.m.wikipedia.org/wiki/Pantsir_missile_system)

(Not familiar with the western equivalents but the idea is the same.)

A small drone does not have the ability to carry the shielding required to protect itself from interference, which can include jamming GPS and even taking over controls of the drone to capture it.

A larger drone is easy target for AA systems.

<comment><USER35> Those failed to protect Russian base in Syria even against low-quality homemade drones.

<comment><USER34> They have not failed - not sure where you get your information from. Maybe you are confusing with the mortar attack earlier this year?

From earlier this year with pictures: [https://www.independent.co.uk/news/world/middle- east/russia-...](https://www.independent.co.uk/news/world/middle-east/russia- military-bases-drones-syria-armed-attacks-tartus-uavs-latakia-a8151066.html)

There were several attacks repelled in the last month also but I only have Russian language sources (maybe South Front will have some more details in English - coverage of Syria in Western media has been pretty sparse in the last months with all the government successes in Daraa).

</comment></comment></comment><comment><USER36> I would imagine that defensive sensor drones would be the first priority. You really need to detect enemy drones and having a swarm of sensor drones able to follow potential targets would be really good. Radar and microphones are going to be interesting when applied to drone detection.

Once the target is detected, a rather large cheap swarm deployed on the attack vector to block projectiles and intercept the enemy drone would probably make the most sense. The drones can absorb the hits and blow up when they reach their targets.

ECM-based solutions do seem to have problems with also taking out the good guys equipment and capabilities.

</comment><comment><USER37> The answers I read here are classic over engineering. Sometimes the simplest answer is the best answer, and you don't need to build a complex system. That is to say the same methods that are used to defend against a gun, either another gun to disarm the assailant (be it a person or drone) body armour. Killing the GPS, etc. are all good methods too, don't get me wrong, it's just that they may be more Factory.getFactory().getFactory().getInstance()... type of solutions. Initially just the same methods should work.

</comment><comment><USER38> Anything that blocks radio control or GPS.

The same things that defend against off-the-shelf radio airplane weapons - <USER2> risk that has spanned decades. A couple of dozen dollars and some foam core creates an equivalent risk (or greater, since it has a longer range due to being more efficient than multirotors).

<comment><USER39> > Anything that blocks radio control or GPS.

Don't they have inertial navigation if they can't get a GPS signal, and pre- programmed routes that don't need radio control.

<comment><USER16> They give you what direction is up, but not really where you are and how fast you are going.

You need odometry for that. There are opticalflow modules that will allow you to do that, but they cost power.

<comment><USER40> Power draw by a SoC like Nvidia tx2 (can probably do it with a cheaper chip too) for camera based navigation without GPS is not a big issue, the motors are far more power hungry

<comment><USER38> Practically speaking though, a mortar would be cheaper, simpler, and more deadly. Same(ish) range, high rate of fire, designed to be anti-personnel, provides plenty of time to vacate the area after initiating a bombardment.

Bringing tech into the equation doesn't add much when you're talking about a payload in the single-digit pounds region.

</comment></comment></comment></comment></comment><comment><USER41> Actual security by design. Hold events with high-value targets //indoors// with no open roofed areas near by.

This might mean throwing a net over the inner alcove or erecting a temporary tent to block the outside facing windows.

</comment><comment><USER42> A tactical nuke that emits a strong EMP.

<comment><USER43> Underkill

</comment></comment><comment><USER44> Since nobody's mentioned them yet: Net guns.

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

</comment><comment><USER45> NULL pointers

<comment><USER46> and after this decade:

        undefined is not a function

</comment></comment><comment><USER47> I imagine a scaled-down version of the U.S. Army's C-RAM, or Israel's Trophy system, could work quite well for VIPs. Some drones can be VERY fast (think hobby-sized jet engine fast), so you'd need active radar and full automation to stand any kind of a chance.

Perhaps you'd use shotgun shells loaded with rock salt, so any overshoot into a crowd would be less-than-lethal.

</comment><comment><USER4> The answer is obvious: anti-drone drones. Military units and major political figures will need to have swarms of anti-drone drones patrolling their vicinity.

Things like auto-targeting lasers might work too, but the way the way to fight technology is with better technology.

</comment><comment><USER48> When we are talking about one-off drone attacks, sure there are counter- measures. if we are talking about WW3 and China's capability to produce millions of autonomous, AI driven drones per day? No, there is no effective counter measure.

</comment><comment><USER49> Other drones, obviously.

Whoever has more money to purchase and deploy drones wins. Same as it's always been.

</comment><comment><USER50> Shotgun with birdshot.

</comment><comment><USER51> Serious question: why is it hard to make small, anti-drone missiles? I assume it needs to only be within X distance of target and detonate to disable a drone.

<comment><USER52> Automated missiles at every public building, gathering, and billionaire's motorcade? What could _possibly_ go wrong?

</comment></comment><comment><USER53> If you haven't read Daniel Suarez's science fiction novel "Kill Decision", now is the time

</comment><comment><USER54> Directed energy with automated tracking.

<comment><USER55> Also probably the same machines that are installed for crowd control already a lot of military installations (microwave emitters) can do this already.

</comment></comment><comment><USER56> Explosives are heavy. Are drones a realistic delivery vehicle?

<comment><USER22> The US military's current hand grenade - the M67 - weighs 400 grams, has a kill radius of 5 meters, and a casualty radius of 15 meters. The DJI Inspire 2, chosen at random, can carry 790 grams.

Yes. It doesn't take that much explosive to kill someone.

<comment><USER57> It can likely carry nearly 3-4 times that but you'll burn out your engines, but on a short one way trip that is not a concern.

A claymore mine can be fitted to the bottom of most drones it's much more effective and it's electrically triggered.

</comment></comment></comment><comment><USER58> More off the shelf drones? Seriously.

</comment><comment><USER59> concealing your location is probably the best defense

</comment><comment><USER60> Nothing.</comment>


Sweden is deporting entrepreneur for lowering his own salary - <AUTHOR> https://www.thelocal.se/20180202/sweden-is-deporting-this-entrepreneur-for-lowering-his-own-salary <comment><USER2> This happens over and over again in Sweden: skilled worker immigrants get deported over small technicalities, that is often not even their own fault. There have been many examples of this affecting highly skilled engineers in some of Swedens famous (and not famous) tech startups.

What I find disturbing is that immigrant criminals, who haven't contributed to society at all, often do not get sentenced to deportation. So we have the situation that people who are a benefit to the Swedish society get deported, but the criminals get to stay.

<comment><USER3> In the US, if you're perfectly productive, legal, highly qualified and well- behaved member of society on H1B from China or India it might still take you 10-15 years to become a resident, so the situation isn't totally rosy here either. And you certainly won't have the right to work on your own idea while you're on that visa, so that's a long time to wait before you can even get started.

Probably explains why so many people will try to game the system and claim to belong to the O-1 category.

<comment><USER4> O-1 stands for...?

<comment><USER3> [https://www.uscis.gov/working-united-states/temporary- worker...](https://www.uscis.gov/working-united-states/temporary- workers/o-1-visa-individuals-extraordinary-ability-or-achievement)

</comment></comment></comment></comment><comment><USER5> I'm not a Nazi, but rules are rules. If you are intent on immigrating to a country, then it is your duty to read and understand that country's laws. I can't visit Singapore and then claim ignorance if I get fined for spitting.

E.g the guy could have googled "sweden work permit," clicked on the first result, then through to the FAQ:

What is the requirement regarding wages?

To be granted a work permit, you must be offered a wage that is at the level of a Swedish collective agreement or what is normal for the profession or industry. You must also work to such an extent that your wages amount to at least SEK 13,000 a month before tax.

[https://www.migrationsverket.se/English/Private- individuals/...](https://www.migrationsverket.se/English/Private- individuals/Working-in-Sweden/Frequently-asked-questions.html)

<comment><USER6> It's easier to get it wrong than you might think. Sweden doesn't publish a specific "rules for work visas" document. That website is it, and it is not all inclusive. The only way to know all the rules of the visa are to read the actual laws (in Swedish, and in Swedish "legalese", so good luck to foreigners... the people who would need to know), and to read all of the relevant case law around it. On your first days in a country, you probably aren't perusing the rulings of their high courts.

In this guy's case, there is very relevant case law. Before March 2015 Migrationsverket applied the rules based on the average of your work visa period, 2 years. They would take your last 2 year's salary, divide by 24, and see if it's over 13,000 kr per month. After March 2015, following new case law, they started looking at each month individually and deporting if any specific month violated the rules.

Depending on when he did this, it is possible that if he asked a migration attorney for guidance they would have approved, and they would have been correct. The rules retroactively changed that year. It still would be just as likely to make the wrong decision after the court ruling, since migration court rulings aren't a particularly big topic of conversation for most people. Nobody really learned about it until deportations started skyrocketing in 2016.

I wrote a bit about the topic here: [http://dontdeportthedog.com/wp- content/uploads/2016/11/Failu...](http://dontdeportthedog.com/wp- content/uploads/2016/11/Failure-of-the-work-visa-policies-in-Sweden.pdf)

<comment><USER5> There is also a pretty visible "Contact us" link with phone numbers and email addresses: [https://www.migrationsverket.se/English/Contact- us.html](https://www.migrationsverket.se/English/Contact-us.html) So I can not feel sorry for him because he should have known. Had he been given incorrect information, it would have been a different matter. I also believe that the Swedish rules for work permits for immigrants are among the simplest, most transparent and least arbitrary in the world. But you know more than me about that.

<comment><USER6> Hah, I just noticed that you consult to a tjänstepension company!

My experience with MV on the phone is that they won't answer any specific questions about the rules. According to some migration attorneys I spoke with, many of the rules are undefined and they make them up as they go. Did you see the one about the guy who was deported for not taking _unpaid_ vacation? Try to find _that_ requirement on lagen.nu ;)

Everywhere I've worked and everywhere I've interviewed with in the last 2 years has had employees get deported. In all cases, they (the companies) claim that the information that they got from the big HR consultancies and from Migrationsverket was faulty, and they're paying the price now. I'm not saying that it's okay to break the rules, but I will say that if breaking them accidentally is so common, something is wrong with the system.

Every job offer I've ever received in Sweden (5) has been illegal on the first pass, violating various requirements of work visas. Violations are typically things like tjänstepension not starting until after the 6 month trial period. The most common is that the job ad was only posted on LinkedIn and Indeed, but not on Arbetsförmedlingen.

Two of my friends got hit because their employer insurance plans didn't become "active" until their second day at work. You know, those plans that your employer takes out on your behalf and you can't even see if they exist, let alone when they started? So it goes.

In 2014 I would have agreed strongly with "among the simplest, most transparent and least arbitrary in the world", but in 2018 I would add the caveat "but worse than most of Europe."

<comment><USER4> tjänstepension - is that some kind of social security?

<comment><USER6> Yes, it's an employer-paid pension that is very similar to the U.S. 401(K). Depending on how you slice it, Swedish pensions are divided into 3 or 4 layers:

1) Income pension - equivalent to U.S. social security. Taken out of everyone's taxes, and you have no control over it.

2) Premium pension - it's considered part of Income pension (1), but when you earn above some amount it goes into this bucket and you can tell the government a bit about how you want it to be invested.

3) Occupational pension (tjänstepension) - An "optional" employer-paid pension that you have some direct control over. Depending on the management company, you can either choose between a few fixed investment schemes, or you can have full control over it and invest in stocks/mutual funds. It is "optional", but mandated by the unions, so not really optional.

4) Private pension - your own personal account, like an IRA

There were a bunch of deportations over tjänstepension problems. Companies that were not in unions paid employees that were not in unions and didn't offer the same tjänstepension as the union agreement. Migrationsverket decided (also in 2015) that the exact terms of the union agreements are required for all non-EU citizens, even if they aren't involved with the unions. (If you are Swedish or from the EU, there is no legal requirement.)

I got in trouble because the union requires a 4.5% tjänstepension contribution from your employer. My employer paid 8% to mine, but it was structured in a different way... which we later found out was unacceptable.

</comment></comment></comment></comment></comment></comment><comment><USER7> I was in a similar position as this entrepreneur. I had the company I created sponsored my own employment visa in Hong Kong. I often took less salary than my employment contract that was provided with the visa application specified because that's what happens sometimes with bootstrapped businesses.

Luckily for me, the Hong Kong government isn't the Swedish government, and didn't give me a hard time when renewing my visa.

It will be Sweden's loss if they deport this entrepreneur.

</comment><comment><AUTHOR> The law is in place to prevent foreign workers from being exploited. That they voluntarily reduce their own salary is not relevant to the implementation (as they could have been pressured to reduce it). Still, the outcome is absurd.

I wonder if it is because of the inherent rigidness of civil law? would a common law system solve this better?

<comment><USER8> Maybe if he'd sought an "entrepreneur" visa, not an employee visa?

</comment></comment><comment><USER9> There's a lot of things I like about Sweden, but reading things like this make me cringe a bit. Hopefully his lawyer keeps the deportation off.

</comment><comment><USER10> Why would he get a collective employment agreement in the first place?

Assuming there is an angle the thelocal.se is trying to hide.

<comment><USER11> The collective agreement is binding to every employer and employee in the field - you can think of it as a per-field minimum wage law.

<comment><USER12> This is incorrect. There are many tech companies in Sweden that haven't signed a collective agreement. However, "to obtain a work permit you must [...] have been offered terms of employment that are on par with those set by Swedish collective agreements or which are customary within the occupation or industry" [0]

[0]: [https://www.migrationsverket.se/English/Private- individuals/...](https://www.migrationsverket.se/English/Private- individuals/Working-in-Sweden/Employed/Work-permit-requirements.html)

</comment></comment></comment><comment><USER8> Tl;dr: Immigrant employee of a company has salary reduced below the amount[1] specified in his visa; the government refuses to extend his visa even though he says, "It's ok! Really!"

[1] Presumably set high enough that foreign workers don't drive down the wages of locals.

</comment><comment><USER13> There are also cases of immigrants being deported for taking a second job to pay the bills because the law for a worker's visa says that it applies to "a job" as in singular [0]. The same applies if you quit a lousy job and find a new one [1].

I suspect it's game theory; the public reacts more negatively to allowing immigrants the right to stay since it means they get access to integration programs while the public might get mad over an incident like this but not the overall trend of being overly rigid. The choice becomes pretty easy politically.

[0] [http://viralt.aftonbladet.se/sheikh-29-ska-utvisas-fran- sver...](http://viralt.aftonbladet.se/sheikh-29-ska-utvisas-fran-sverige-for- att-han-haft-for-manga-jobb/) [1] [https://digital.di.se/artikel/han-fick- jobb-som-utvecklare--...](https://digital.di.se/artikel/han-fick-jobb-som- utvecklare--blir-utvisad)</comment>


How Ajit Pai's Plan Threatens Small-Town America - <AUTHOR> https://backchannel.com/how-ajit-pais-plan-threatens-small-town-america-c63fbd535160?source=rss----d16afa0ae7c---4 <comment><USER2> A free and open internet, threatens only those who do not support free and open speech.

I cannot conceive of any other tiered relationship between international interests and the sovereign interests of citizens

We placed these rules upon our infrastructure, not as a limit to power, but as a safeguard to freedom

Down with the bloody big head!</comment>


Literate CoffeeScript - <AUTHOR> http://coffeescript.org/#literate <comment><USER2> I'm pretty excited to see some of the first programs that folks might write with this -- I've got one of my own, a little 400 LOC (half of which is comments) static blogging engine that's currently powering <http://ashkenas.com>.

Part of the idea is that, because first and foremost you're writing a document describing what you're doing, and then filling the the implementation in the gaps ... you end up structuring the program differently than if you started out with the code was at the top level, as usual. For me, it was a fun process -- start with an outline, expand that into paragraphs below, then indent four spaces and implement each paragraph...

I'll share the full bit when I make it out of the woods next week, but for now, here's a sneak peek of a rough draft to give a flavor: <http://cl.ly/N8Kx>

_Edit_ : If anyone wants a copy of the hybrid Markdown/CoffeeScript syntax highlighter (for TextMate or Sublime Text), it's available here in the "Syntaxes" folder. <https://github.com/jashkenas/coffee-script-tmbundle> 10,000 bonus points if you port it over to Pygments and send a pull request to GitHub ;)

<comment><USER3> Beyond any educational benefit, what do you see as the advantages of programming in this way?

I and most of the programmers I socialise with tend to see comments as a bad smell; they're fine every now and then but if there are more than a few of them, something is wrong.

How do you prevent the comments from becoming lies? By which I mean, how can you ensure that people updates the comments in accordance with changes to the code that occur over time.

Also what impact do you think this approach might have on the way people write the code itself; naming variables and arguments, decomposing functions into smaller units and so on?

<comment><USER2>
        > Beyond any educational benefit, what do you see as the
        > advantages of programming in this way?

For me (and I'm just getting started here, I've only been playing around with this in earnest in the context of the little blog engine, and there are certainly many different ways of going about it), it makes the process of exploratory coding feel very different. Instead of thinking up a series of classes or functions that might solve the problem, and starting to write them -- I instead start by outlining (literally) what I want the program to do, and then describe the functionality in paragraphs, and then implement those paragraphs.

When the paragraphs have code below them that does what they say they do, the thing works. When I end up coding myself into a corner, I rewrite the paragraph and change the code. It's really a very different process than usual. It's also definitely more work than just doing code and omitting comments -- it takes a bit of elbow grease to prevent the comments from becoming lies ... but it's the same type of work as preventing bits of your codebase from becoming dead code.

For me, it seems to make me organize code into smaller functions grouped together into sections, use less classes, and care more about putting things in the place where you're talking about them, and less about putting similar things together in one block of code. For example, I started to require things close to the paragraph where I first mention them, instead of putting all requires at the top of the file. At least, that's how it feels so far.

<comment><USER4> I'm glad to know I'm not the only person who works this way. My source files often have a paragraph or two at the top that explains my intentions for that class/module as well as explains the usage of my domain language. I never see this in other people's code though.

I agree with people who say that the code itself should read very clearly, but the fact is that even when writing an article or paper you have to disambiguate your own writing, clarify your usage of terms and present some context up front. Otherwise people can take away a very mistaken impression of your text, and it is certainly no less true for code.

</comment></comment></comment></comment><comment><USER5> Should the order of documentation be same as order of code? For e.g. if I would like to start with explaining the main function at the bottom of the code, can this support that?

If it does not it cannot be, strictly speaking, called Literate Programming: [http://en.wikipedia.org/wiki/Literate_programming#Misconcept...](http://en.wikipedia.org/wiki/Literate_programming#Misconceptions)

<comment><USER2> Ah, that old canard ;)

Modern programming languages (and JavaScript especially so) support defining your functions, creating your classes, and wiring things together, in any order you see fit. These days, TANGLE'ing and WEAVE'ing together a source file into a new line ordering, just to make a compiler happy, is unnecessary, and more trouble than it's worth. Just do:

        ... bulk of the file goes here ...

            main = ->
              run program

<comment><USER6> Well, there's more than one way to write literature, and there's more than one way to approach literate programs. So while I agree that you can do most of what you want with a more simplified approach, I don't think that Knuth's approach was just there to escape from Pascal's declaration syntax.

Out-of-order code can be quite useful if the literate document is the _narrative_ of the code, how you derive your algorithms and create your functions. The final untangled code is devoid of this, and presents a more conventional structure. One example would be some global variables (or configuration hash, if that statement made you faint a bit). In the end, you probably would want at least one view of the code where this is collected in one spot, even if the programming language would theoretically allow you to declare it bit by bit all over the place.

On the other hand, this style doesn't lend itself that well to a constantly revised code base, as that would mean reading a narrative all over again.

</comment></comment></comment><comment><USER7> First, it looks great. It seems like such a trivial difference not to have #'s or /* __/ or whatnot... but somehow it does make all the difference. Almost like the code is meant to be read by people instead of computers (which is what the priority almost always should be).

And second, the example [1] is a great model of _good_ commenting practice -- explaining the why's, the workings, clarifying special cases. Especially with languages as concise and powerful as CoffeeScript, having as many lines of comments as lines of code, is a great balance.

It seems like such a trivial idea, comments to the left, code indented, but it's one of the best ideas I've seen pop up in a long time -- especially because it heavily nudges you to treat comments as an integral part of the file, not just an extra, and to treat the file, from the beginning, as something for others to read. Bravo!

[1] <http://cl.ly/LxEu>

</comment><comment><USER8> <http://en.wikipedia.org/wiki/Literate_programming> for some background on literate programming. TeX is written in such a style.

</comment><comment><USER9> I'm interested to see where this goes, but one of the problems with literate programming is that it means that in addition to being a good programmer you also need to be a good writer. In other words, if you are a good programmer and a bad writer you are going to produce net bad work since your writing will confuse people who might otherwise have understood the code on its own, and if you are a good writer and a bad programmer there is a chance this will make it harder for others to realize your implementation sucks since it may be dressed in the most brillant, clear prose possible. (Of course one can make the argument that brilliant clear prose is a sign of brilliant clear thinking and hence code, but I am not so sure.) It also opens up the door for an entirely new dimension in code reviews. Imagine your resident grammar nazi jumping into code reviews now to perform edits to paragraphs upon paragraphs of comments. (This is probably the same person who agonizes over class names, so maybe you're already used to this :))

I've found that there seems to be a decent correlation with writing skills and programming skills, but that's far from a fact and I've worked with people in every spot in the 2x2 skills matrix.

<comment><USER2>
        > This is probably the same person who agonizes over
        > class names, so maybe you're already used to this

Bingo. I think that for programming languages where clarity is already a common virtue (think, Ruby, Python, Clojure) -- folks already need to be writing clearly when they program: making the code clear to read, naming variables and functions very well, doing logical ordering of sections of code etc. That's already about halfway towards what you would do if you were accompanying the code with a bit of essay. I think the two worlds aren't as far apart as one might think.

</comment></comment><comment><USER10> Don't update now!

I just updated it to checkout .litcoffee compilation and it worked out okay. But suddenly, all my express.js apps stopped working due to the exception from its connect module. I downgraded coffee to the previous version and all things turned fine again. It seems the package needs fixes. I like most parts of node except these surprising interconnections.

<comment><USER11> Try diffing the compiled source for 1.4 and 1.5.

<comment><USER12> rofl

</comment></comment></comment><comment><USER13> "you can write it as a Markdown document — a document that also happens to be executable CoffeeScript code"

Am I missing something or is that line literally the only explanation/documentation given as to what is literate CoffeeScript and how to use it? Must admit I have no idea how to use it now.

<comment><USER14> The next sentence includes links to bits of the compiler in literate CoffeeScript. <https://gist.github.com/jashkenas/3fc3c1a8b1009c00d9df>

It's writing a Markdown document, where the code blocks, indented 4 spaces, are executed. And the rest of the document is essentially nicely-formatted comments in the form of Markdown.

<comment><USER15> Thanks for explaining.

</comment></comment></comment><comment><USER16> Literate programming - why have terse comments when you can have a verbose and rambling narrative? I actually tried reading the TeX source code, and it was damn near impossible.

<comment><USER17> I mostly agree. For 95% of code, it's simply a waste of time to try to "document" it like this. For the handful of situations where elaborate documentation wants to be stored with code (which basically means "automatic reference doc generation from API definitions") we have tools like Doxygen already that work well.

But there does remain that tiny subset of code that is so complicated that it can only be explained in prose. This includes things like, say, DCT implementations, tight SIMD assembly, complicated threadsafety architectures, oddball parser context dependency rules, etc... I can see wanting to read this stuff in a "literate" environment.

But... is _anything_ you might use Coffeescript for going to contain code like that? I can't think of any good candidates offhand, beyond (perhaps) the coffeescript compiler itself...

</comment></comment><comment><USER18> It's a cool idea, but I am struggling to understand why this is better than say BDD; which not only effectively documents what your code does but also verifies it does what it says it should do.

<comment><USER19> That was my though too. Are there any languages that let you write specs inline with the functions/classes that they test? _That_ would be cool.

Edit: Having thought about it for a second, this could easily be done in most languages (with some preprocessing to strip out for deployment. Super easy in C-based languages). Not a convention I see anyone follow, though.

<comment><USER20> i'm working on a project that does this with doc comments. Basically you add a doc block like this:

        ###
        @it should return true
          expect(foo()).to.be.true
        ###
        foo = -> true

and the preprocessor extracts the test from the comment and associates it with the foo declaration.

</comment></comment></comment><comment><USER21> It just needs the ability to include source blocks in other source blocks and a way to tell the "compiler," how to organize the output files...

For that I just use babel in org-mode... but you have to be an emacs person for that. I'm sure there are other literate systems (like the original: <http://www-cs-faculty.stanford.edu/~uno/cweb.html>)

</comment><comment><USER22> has anyone figured out what the syntax for

      You can now loop over an array backwards,
      without having to manually deal with the indexes.

is?

<comment><USER2> Sorry, I should add that to the changelog. It's just like looping over a range downwards (or by arbitrary increments).

        for item in list by -1

<comment><USER23> Very nice! I've wanted this for a long time.

</comment></comment></comment><comment><USER24> I'm not sure if I agree with making comments a first-class citizen in a programming language.

Good code documents itself and should be first-class. Comments should be there to clarify certain decisions that you've made while writing code.

Handing out citizenship to the comments just clutters the code flow and will stimulate bad commenting behaviour.

I really don't see any pros for 'executable' markdown at the moment, apart from being cool.

</comment><comment><USER25> Is anyone planning on some sort of support for .litcoffee in docco? It'd be awesome if docco could compile the markdown documents into HTML files and keep that swell dropdown navigation in the top right hand corner available. Generating docs as I was in my earlier projects seems to be the only gap. Otherwise I'm using litcoffee on a current client project and really loving it!

</comment><comment><USER26> I remember getting quite interested in literate programming back in the early nineties, but I've barely heard anything about it since then.

Has anyone (apart from Knuth) used LP for any real work of significant size? What was the justification of doing the, presumably substantial, work to add literate programming to coffescript?

</comment><comment><USER27> I'm cofused by what "executable" means in this context with markdown. Is this some kind of documentation support for coffeescript?

or is the code executable in the blocks in the markdown script and literate mode is a way to invoke "documentation" basically if the file is a .litcoffee document instead of a .coffee document?

<comment><USER2> If the file extension is ".litcoffee", it means that you're writing a Markdown document, where the embedded bits of indented code are the executable part of the program.

Basically, it just inverts the usual power relationship in a piece of source code, where the code is primary and aligned along the left edge, and the comments are set off in little fenced blocks. Now the comments are primary, and the code is indented in little blocks -- but it's still the same executable piece of source code.

The neat bit is when you have it all working properly in a text editor, your prose being highlighted as Markdown, and your code being highlighted as CoffeeScript.

<comment><USER28> After reading the docs and comments, this was the comment/explanation that made the light-bulb click.

</comment></comment></comment><comment><USER29> Very interesting idea, great for creating architecture outline, generating documentation and understanding code.

</comment><comment><USER30> Interesting development with the literate programming. Certainly a bold move. Kudos for trying some new!

<comment><USER31> I had to hand all my functional programming homework in in literate style in 1992 so 'New' is relative :-)

<comment><USER32> New to web development

</comment></comment></comment><comment><USER33> Could you please state the reasons for this change: 'cannot return a value from a constructor'. Besides breaking working code, this feels more like an added restriction than an added feature. I'd love to know why this is in 1.5. Thanks!

<comment><USER2> It _is_ a restriction, and I'm a bit torn about it.

Apart from fixing bugs where you'd use a CoffeeScript `class` to extend from a native object, returning "other" values from a constructor is a bad idea because it makes your code lie.

        widget = new Widget

In CoffeeScript 1.5+, unless you go to great lengths to get around it, that's always going to return a new Widget -- in JavaScript, that could return a Dongle, an old and already used Widget, or anything else (that's not a primitive). If you want a function that maybe returns a new Widget, and maybe an old one, just use a normal function, not a constructor:

        widget = Widget.lookup()

</comment></comment><comment><USER34> Ruby's had something like this for awhile --a test framework called [QED](<http://rubyworks.github.com/qed>). Made for testing, but technically it could be used for anything.

</comment><comment><USER35> I love that executable markdown style. I created a project some time ago that does just that. For the records, here it is: <https://github.com/mikaa123/lilp>

</comment><comment><USER36> Cool idea to use Markdown's code snippet feature for literate programming :)

I guess you could do this in any language by incorporating something like the following into your project's makefile:

      sed '/^\t/!d; s/^\t//'

</comment><comment><USER37> This is cool. IMO, most comments are pretty superfluous, but I think this would be awesome for setting up visual groupings of related code sections.

</comment><comment><USER38> Oh.

I was really hoping 'literate' meant you could read the _code_.

</comment><comment><USER39> I can see this being useful for writing tutorials or even a book. So many ideas for educational material swirling around in my head.

</comment><comment><USER40> I'm not sure this is a good direction.

We all want better documentation, but the problem with comments is that they can _lie_.

<comment><USER41> Commenting is still not required, AFAICT.

Are you positing that better formatting encourages worse comments/documentation? I'm of the opinion that their presentation is independent of their quality.

<comment><USER40> I fear that _emphasis_ of documentation, to this extent, encourages us to read comments first and foremost, rather than the code.

I realize that the emphasis could be perceived the other way around (on the code, rather than the comments), but the author's intention seems to be the other way around.

</comment></comment></comment><comment><USER42> Which editor is this in the screenshot?

<comment><USER43> Sublime Text 2 with the Soda dark theme.

Edit: Link to Soda theme on Github: <https://github.com/buymeasoda/soda-theme>

<comment><USER15> Do you also happen to know which colour scheme that is?

<comment><USER2> Brilliance Black (42), a Halloween edition from several years back.

<comment><USER15> Thanks.

I can't seem to be able to find a version that looks like the screenshot though. Maybe you have a link? That would be great!

</comment></comment></comment></comment></comment><comment><USER44> This is brilliant. love it.

</comment><comment><USER45> Shouldn't they be working on the goddamn Source Map support instead of literate gimmicks?

<comment><USER2> A bit of that is in this release as well, thanks to Jason Walton. [https://github.com/jashkenas/coffee- script/blob/master/src/g...](https://github.com/jashkenas/coffee- script/blob/master/src/grammar.coffee#L43-L56)

Source location information is now preserved through the parse, although it's not yet being emitted as a source map just yet. If you want to use CoffeeScript source maps today, feel free to use the Redux compiler, which does them just fine. Michael also has some other tools to make source maps even more convenient: <https://github.com/michaelficarra/commonjs-everywhere>

That said, I don't personally care for source maps all that much, placing a higher priority on generating readable and straightforward JavaScript output. Things like Literate CoffeeScript rank higher on the priority list.

<comment><USER45> Thanks for the response (well, given my tone).

But I think this literate thing never caught on for a reason. And I'd say the reason is marginal returns (over comments and clean code) and too much fuss.

As for the "entitlement", it's because people have been saying source maps would came to CS for 2 years now, and I've seen nothing related yet (even the crowd-funded project is not there).

</comment></comment></comment><comment><USER46> So when does coffee-script becomes independent from javascript and gets its own CS->machine code compiler ?

<comment><USER47> I would guess when Javascript dies. So, never.

</comment></comment><comment><USER48> Cool, imperative code diluted with some poetry looks much better.

</comment><comment><USER49> This won't be a popular comment, but I have to admit I never really liked CoffeeScript. I've tried to like it, and it does seem more concise, but what's the point, it always seems clearer (to me) what something written in vanilla javascript is doing. I don't know, I guess I haven't done enough Python.

<comment><USER50> It won't be a popular comment because it's not germane to the conversation at hand.

<comment><USER49> We have all sorts of discussions here on HN that derail a bit from the topic of the main article linked, e.g. discussing smart TVs in a thread about webOS; I don't see how this is negative as long as there is still connection.

<comment><USER51> This isn't negative so much as irrelevant; CoffeeScript has been around long enough that we've had most of the discussion around what people like and don't like about it. If you don't like it, that's fine, but there's not a lot to talk about.</comment></comment></comment></comment>


Reading Lamport, again  - <AUTHOR> https://blogs.janestreet.com/reading-lamport-again/? <comment><USER2> Jane Street is one of the few companies which are betting heavily on OCaml, it makes sense to go all functional in the high frequency trading world I guess. It's purportedly been C/C++ for most of that industry, probably not the best toolset for keeping error rates low in a complex environment. Fascinating to read how far beyond language decisions they need to think to shield themselves against outages (and competitors?).

I did a little bit of experimentation with OCaml by playing with bitcoin exchange APIs during the China boom some months ago, but I unfortunately didn't push further to a point where I'd be using Jane Street's open source libraries. It still was very interesting and IMHO totally worth it if not just for the functional programming practice.

Relevant video on how OCaml gets used at Jane Street:

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

</comment><comment><USER3> I've noticed that recent google infrastructure puts medium-to-strict requirements on timeservers. Does that mean that the idea of causality and vector clocks has been abandoned partly or wholly for a greater reliance on absolute synchronicity?

<comment><USER4> I recently reread the Lamport paper discussed in the article, and the Google Spanner paper, to draw comparisons about the relationship between time, consistency and throughput from those two perspectives. The Lamport paper does dedicate its last real section to physical clocks which need to sync with one another, and which must advance at close to the same rate in order to maintain consistency -- but he doesn't constrain them to be close to any "absolute" correct time, which is what the Spanner / TrueTime system heavily relies on.

My tentative conclusion was that the giant difference between 1978 when the Lamport clocks paper was published, and 2012, is access to GPS. The fact that we get to take advantage of a DoD-built fleet of dozens of satellites that are constantly broadcasting extremely accurate times is pretty extravagant. Google can build systems today that rely on clocks in data-centers thousands of miles apart both being very close to "absolute" time, with explicit, conservative bounds on their error, in part through heavy use of GPS clocks. But for most of us that don't have an elaborate system of fancy clocks in our data-centers, Lamport's approach of having machines update one another's clocks (be they logical or physical) as they exchange messages is still a lot more relevant.

<comment><USER5> I wonder if this means that an evil entity could cause massive data loss by broadcasting fake GPS clock information, which would mess around with the decisions that these databases make regarding consistency. That would be terrifying.

<comment><USER4> The spanner paper doesn't discuss this in detail, but they have atomic clocks in addition to GPS clocks in large part because GPS clocks can fail or be expoited in this way and atomic clocks cannot.

</comment></comment></comment></comment><comment><USER6> "It's not terribly surprising that if causality is baked into your specification, then you're going to have to use causality as part of your implementation." I dont understand this statement. Causality is the base of the ordering specification, that's correct to say as "baked into your specification". What does "use causality as part of your implementation."? The paper does not use causality to implement causality, it uses causality to implement mutex. Any contradiction here?

</comment><comment><USER7> I don't see causality as defined in this context as needing any extra "motivation". It's pretty clear that if an agent tries to do A and then B, your system probably should not first execute B and then A. Imagine if the instructions in one of your program threads were not guaranteed to be executed in order. You would never be able to write code that does anything meaningful that way.

<comment><USER8> > Imagine if the instructions in one of your program threads were not > guaranteed to be executed in order.

Modern CPUs do not process instructions in the same order they are stored in memory. Out-of-order CPUs rely on the implicit order created by the dependency between instructions and operands.

As in the Lamport paper, the order in which the instruction are performed is meant to preserve the order in which the effects are produced instead of the order in which the commands are given.

</comment></comment><comment><USER9> Interesting stuff. I'm working on a system that we _think_ will use version vectors. There are some other ideas like Interval Tree Clocks out there, but they look more difficult to translate into something that can reside in an SQL database. For that matter, it's been a tough challenge trying to translate some of these ideas into something that can work in practice, over HTTP, be sort of transactional in its behavior, and be able to work with single records at a time, rather than trying to transfer everything at once.

</comment><comment><USER10> I think the author misunderstands. The spec is for a mutex, and it's written in an informal language, where the implementation fulfills a more formally expressed spec.</comment>


Why I'm not on the Julia bandwagon (yet) (2012) - <AUTHOR> http://wesmckinney.com/blog/?p=475 <comment><USER2> Julia has a lot of rough edges. For example, the dataframe support is primitive. Type issues show up all over the place; for example, if you extract a column from a dataframe, then combine it with other columns via [], it sometimes fails if the column you extracted is first and succeeds otherwise. Saving matrices is still really primitive; nowhere near as good as R or matlab. In julia, you still have to remember what you put in the file and how big it is.

Nonetheless, julia is _awesome_ and if you haven't tried it you're missing out. It's pleasant to work in in a way that numpy + python isn't. It's a higher performance R, one which has a hope of scaling to the sizes of data I want to use. You can almost always write in matrix notation then decay to loops if necessary.

a toy irls implementation looks like:

       sigma = function(X)
          1/(1 + exp(-X*beta))
       end

       beta = zeros( size(X,2) );
       max_iter = 50
       iter = 0
       converged = false
       while iter < max_iter && ~converged
         s = sigma(X);
         cost = sum(Y .* log(s) + (1 - Y).*log(1 - s));
         grad = X' * (s - Y);
         H = X' * diagm( s .* (1-s) ) * X;
         d = H\-grad;
         # print([beta d])
         beta_new = beta + d;
         delta = norm(beta_new - beta);
         beta = beta_new;  # NB: exact hessian so no line search
         @printf("iter: %d; beta delta %f log like %f\n", iter, delta, cost)
         iter += 1
         if delta < 1e-4 converged = true end
       end

       beta

If you haven't tried it and you're an R or numpy user, you should give it a try immediately. Lots of people seems to use ipython or ipython in the browser to efficiently use the repl with code. I prefer tmux with 2 windows; vim in the left, julia in the right, and vim-slime to move code over.

</comment><comment><USER3> FWIW, running Wes' code with a fresh pull of Julia today shows some improvement in the pure-Julia benchmarks at least:

        Array operations took 79.55683398 ms
        inner took 23.88444026 ms

        BLAS took 48.182116560000004ms

Obviously its possible that this is just due to differences between our machines; just figured I'd throw it out there.

</comment><comment><USER4> In most cases I've come across (signals processing) a trivial Python (NumPy) implementation was much faster than a trivial Julia implementation, because of the vector syntax. This, IMHO, is the Achilles heel of the Julia language.

Generally speaking, any language for numerical computing _must_ feature vector syntax. Most numerical algorithms work on arrays (vectors, matrices, and so on) and can be easily translated into a language which supports vector notation: MATLAB, Fortran, and Python (NumPy).

Asking people, in 2013, to explicitly write loops in numerical code is a definite step backwards.

<comment><USER5> Is there any thing in particular that Julia is missing here?

[http://docs.julialang.org/en/release-0.2/manual/arrays/#vect...](http://docs.julialang.org/en/release-0.2/manual/arrays/#vectorized- operators-and-functions)

[http://docs.julialang.org/en/release-0.2/manual/linear- algeb...](http://docs.julialang.org/en/release-0.2/manual/linear- algebra/#elementary-operations)

My understanding was that Julia gives you the option to write loops explicitly but it doesn't stop you using vector and matrix operations when appropriate, so I'm curious if there are any particular operations that its array implementation are missing?

<comment><USER6> I think this comment is referencing the fact that as of right now, slicing a julia array creates a copy and not a lightweight "view" of the sliced data. This makes vectorized operations on slices of arrays sometimes faster in numpy than in julia. See [https://github.com/JuliaLang/julia/issues/3701](https://github.com/JuliaLang/julia/issues/3701).

<comment><USER7> Note that you already can make view slices, it just isn't the default. As per the issue you linked to, the default will change to views in version 0.3.

</comment></comment></comment></comment><comment><USER8> No matter which language you use, you will not beat Intel MKL because that code is optimized by Intel specifically for each architecture. Precisely because automatic optimization by compilers is not good enough. These comparisons are completely irrelevant. Incidentally, this also shows why pursuing the goal of a "fast" numerical computing language is a waste of time: the speed derives from using the appropriate hardware vendor libraries, not from the language runtime.

<comment><USER9> I'm confused: Matlab uses MKL, Armadillo can be configured to work with MKL if you have it, and Julia supports MKL, and NumPy too. So if everything uses the same hardware vendor libraries, I'm not sure if that's where your actual speedup will come from. Also, MKL syntax itself is not particularly fun compared with Matlab/NumPy/Julia/etc.

<comment><USER8> Once your language allows you to use MKL and its equivalents, your code will use every arithmetic unit of the CPU in almost every cycle and therefore performance-wise there is no difference which language it is. So it's all down to which language offers you better library support and nicer syntax.

<comment><USER9> Hmm. If it we're true that speed is independent from language once mkl is installed, wouldn't you expect there to be no observed performance differences? And yet there are large measurable ones for reasonable tasks even with mkl.

</comment></comment></comment></comment><comment><USER10> This feels almost like a parody to [http://calculist.org/blog/2013/11/27/on- on-asm-js/](http://calculist.org/blog/2013/11/27/on-on-asm-js/)

<comment><USER11> seems odd to parady a starry eyed wishful thinking post with a negative pessimistic post.

Are you referring to this article? [http://acko.net/blog/on- asmjs/](http://acko.net/blog/on-asmjs/) Because this article is awesome</comment></comment>


How flowers conquered the world (2014) - <AUTHOR> http://www.bbc.com/earth/story/20141017-how-flowers-conquered-the-world <comment><USER2> Headline not clickbaity enough. I would have gone with "Does Charles Darwin's 'abominable mystery' disprove evolution?"

I guess we still don't really know what angiosperm evolution happened so fast. You know, fast as in millions of years-fast.</comment>


Google releases its own Javascript Lint tool  - <AUTHOR> http://closuretools.blogspot.com/2010/08/introducing-closure-linter.html

<comment><USER2> Here's a couple of lines to let you use this with :make (on a single file) and the QuickFix window in Vim:

        au BufNewFile,BufRead *.js set makeprg=gjslint\ %
        au BufNewFile,BufRead *.js set errorformat=%-P-----\ FILE\ \ :\ \ %f\ -----,Line\ %l\\,\ E:%n:\ %m,%-Q,%-GFound\ %s,%-GSome\ %s,%-Gfixjsstyle%s,%-Gscript\ can\ %s,%-G

If any experts in Vim's makeprg/errorformat want to clean this up, that would be awesome. I just hacked it together and it seems to work well enough.

</comment><comment><USER3> The installation instructions tell you to run "easy_install [http://closure- linter.googlecode.com/files/closure_linter-la...](http://closure- linter.googlecode.com/files/closure_linter-latest.tar.gz). All well and good, but install instructions that don't reference specific version numbers freak me out. I might have gotten a little too much reproducibility religion, with all that that entails, but it seems better than being so cavalier when setting up environments.

<comment><USER4> I'm not sure what easy_install does exactly, but I guess you could replace latest with a version number. On <http://code.google.com/p/closure- linter/downloads/> there's a 2.2.1 there, so instead of using "latest", you could use "2.2.1". If you care enough about this, then you probably could do some digging. Having a "latest" means they don't have to update the instructions every release, and for most people this will Just Work.

<comment><USER5> easy_install is yet another single-language package manager. It doesn't interop with the legitimate OS package manager's database of installed dependencies, and your admins probably have very little experience with it. Best to run it on one sacrificial box and then turn whatever it leaves behind into a real RPM package (or whatever your platform wants).

<comment><USER3> You can set things up so that easy_install installs into a special root. And you nearly always should.

The closest to an exception I can come up with is when you rely on image-based installs instead of package-by-package upgrades. And even then I can't manage to convince myself.

No exceptions at all for individual developers' machines.

</comment></comment></comment></comment><comment><USER6> Does anyone know how this would differ from jslint? I couldn't find anything immediately obvious.

<comment><USER3> It gives you a different set of ridiculous warnings about things that have nothing to do with your code's correctness.

Ha ha, only serious

But for real there are many warnings that pretty plainly seem to be about enforcing somebody's preferences -- gjslint wants you to write "function()" but jslint wants you to write "function ()", for example. Enforcing conventions is good, but I'm pretty sure it's orthogonal to flagging real, common problems (in javascript land, things such missing "var" or ";")

Using both and suppressing the stupid warnings doesn't seem like a bad idea, if you can take the time to get it right.

<comment><USER7> In the example they gave, they had 9 errors. 1 was something that leads to browser incompatibility. (Trailing comma at the end of the array. IE doesn't implement the spec, Firefox does.) 1 was something that often points to logic errors. (Inconsistent indentation.) And the other 7 were someone's idea of correct style.

That said, I suspect that this lint tool will catch some issues where technically correct code can make <http://code.google.com/closure/compiler/> unhappy. If you're using the Closure library, that's kind of the whole point.

</comment></comment></comment><comment><USER8> I was hoping I could run this realtime in vim, but it appears too slow on a 1000 line JS file.

</comment><comment><USER9> Ouch, they shipped with a broken fixjsstyle command: [http://groups.google.com/group/closure-linter- discuss/browse...](http://groups.google.com/group/closure-linter- discuss/browse_thread/thread/30fa86792d11b208) Luckily it didn't break my jsfile, but that's kind of clumsy.

<comment><USER10> After fixing that, I ran into an even more surprising error which someone had already reported - turns out a simple JavaScript closure chokes it:

(function() {})();

<http://code.google.com/p/closure-linter/issues/detail?id=3>

<comment><USER11> I remember running into this issue with their minifier at some point as well.

</comment></comment></comment><comment><USER12> It fails on file I have thrown at it with some complexity other than jquery.</comment>


Mythryl programming language author is dying - <AUTHOR> http://mythryl.org/pipermail/mythryl/2015-October/000932.html <comment><USER2> We (I include myself here) can learn so much from this post.

First, let my convey my deep sympathy to Jeffrey for going through this now - a roller coaster of hope and fear as death approaches. I have some experience of it myself.

The first thing that strikes me, is why do we (I guess I really mean here, I) undertake these huge projects? What are our underlying motivations, and do they make sense? When death overtakes us, will they still have value to us? Will we look back on them as time well spent? I know I like to dream that my projects will be a success, that they will be recognised - that one day perhaps _I_ will be recognised? But recognised for what, and to what end? As a long time python programmer I used to use some of PJ Eby's work such as python eggs, now he is a kind of 'thinking' consultant. Reading his early blog posts on how to think he is constantly questioning his motivations. I sense in them the snake eating its own tail, because in the absence of a fundamentally recognised base motivation for all that we do, his quest is doomed. Myself as a thoughtful muslim, I consciously strive to overcome my inbuilt motivations and instead focus on 'the good' \- I recognise the problem of knowing where the desire to do good comes from, but at least I feel I have a general intellectual framework to build on without disappearing down my own navel. I value the background force in my life that pushes me to do good (sure, even though I ignore it far too often), before that last day arrives and it's too late.

Secondly, whatever grand scheme we work on for our own edification, and for whatever reasons, the recognition it will receive is only partly dependent on the quality and utility of the work in question. Other factors such as marketing and simply being in the right place at the right time come into play, probably with much greater effect. As an experienced developer that knowledge, perhaps regretfully, functions as a huge source of 'stop' energy - I don't have the naivety any more to think that I can easily complete the very difficult.

Thirdly, reading more of the detail of the work he has done on Mythryl and his future plans for it, the project seems to be one of fighting the good fight of what he believes is the right way to code applications. However, the flavour that is presented to me smacks of a previous generation (my generation) and doesn't feel as if it is paying attention to the current tide - to mobile apps for instance. As someone who loves to do it the right way himself and ignore the naysayers I see the temptation - but I ask myself, if it ends up unused as a consequence, what is the point?

As for Jeffrey himself, I sense disappointment - of course, it's right and natural. I'm at a crossroads myself in life, I hope to learn a lesson from what Jeffrey is telling us.</comment>


James Cameron reaches the deepest point on Earth - <AUTHOR> http://www.extremetech.com/extreme/123645-james-cameron-reaches-the-deepest-point-on-earth

<comment><USER2> Why is this not higher rated? An innovative piece of tech which changes the game and creates a giant leap in human achievement is what we're all about here.

</comment><comment><USER3> Imagining sitting in that little, cramped sphere 7 miles down is pretty spooky. Each little noise and bump must cause some chills.</comment>


Deep Work Hours v0.5 Beta - <AUTHOR> https://deepworkhours.com/ <comment><USER2> I like this, but I sometimes tackle issues where I can't abruptly stop working without losing the context of what I was doing.

It would be nice if there was a overtime button so I can get to a good stopping point.

<comment><AUTHOR> That's a very good idea. Thanks!

<comment><USER2> Thanks, though. I've been using it for a few days and it works great. Really helpful.</comment></comment></comment>


Major Internet Outage? - <AUTHOR>

Is there a major Internet outage happening right now? <comment><USER2> <http://internetpulse.net/> is a little more reliable - provided by Keynote.

If you look at internettrafficreport, notice that many of their collectors haven't received responses in over a week, though, there is evidence of something happening.

Looking at our graphs, I do see some indication of a problem, but, mostly prefixes that disappeared - i.e. had no path to them as I am not seeing an increase in traffic on one provider where I'm seeing a loss on another.

</comment><comment><AUTHOR> Welp, <http://www.internettrafficreport.com/namerica.htm> looks pretty bad. We're in New Hampshire and there are many servers we can't seem to which we can't seem to connect. We have confirmed with downforeveryone that several sites are down (including, for example, tropo.com and slashrootcafe.com).

</comment><comment><USER3> No. My Internet is working fine.</comment>


20 Funny Commands of Linux or Linux is Fun in Terminal - <AUTHOR> http://www.tecmint.com/20-funny-commands-of-linux-or-linux-is-fun-in-terminal/ <comment><USER2> Another one that I like:

`echo "main(i){for(i=0;;i++)putchar(((i*(i>>8|i>>9)&46&i>>8))^(i&i>>13|i>>6));}" | gcc -x c - && ./a.out | aplay`</comment>


The last perambulation of an ancient arthropod - <AUTHOR> http://whyevolutionistrue.wordpress.com/2012/09/08/the-last-perambulation-of-an-ancient-arthropod/

<comment><USER2> The description of the poor little critter slowly dieing as it tried to find breathable water made me really angry at the universe. Death is such a horrible thing.

Maybe I shouldn't feel empathy for a nonsentient bug, but similar things happen to thousands of humans every day...

We shall have to work faster.

<comment><USER3> If you think that's bad, imagine my despair when realizing that things like the CIA torturing someone through sensory deprivation for 1000 days (this actually happened in the 60s) is an irrevocable component of our universe because that's how the atoms go. Such thoughts made me sink into a nearly irreversible suicidal existential depression! This place is rough.

<comment><USER4> Sesame seeds, ice-cream and the colour cyan exists. It's not all bad.</comment></comment></comment>


Timeline of the surrender of Axis forces at the end of World War II - <AUTHOR> https://en.wikipedia.org/wiki/Timeline_of_the_surrender_of_Axis_forces_at_the_end_of_World_War_II <comment><USER2> Obergruppenführer Wolff was one of those smart enough, with a substantial enough command (Army Group C), to flip.

Compare [https://news.ycombinator.com/item?id=23401308](https://news.ycombinator.com/item?id=23401308)</comment>


Vube: 14.5M uniques in USA? #71 site in the world? Stats manipulation? - <AUTHOR>

I check the Alexa top sites index once in a while to discover newly booming sites. Yesterday I came across Vube.com, which is presently listed on Alexa as the #133 site in the US, and #71 site in the world. Surprising, since I'd never heard of them. Compete states 14.5MM monthly users in the USA.
Vube is a song cover contest site which lists videos, allows users to vote, and awards prizes to the winners.
Video view counts shown are through the roof (millions), even for videos that were posted 2 years ago on youtube (e.g. Thinkin Bout You - Frank Ocean Cover by Emmalyn, 10.8mm on vube in 4 months, nearly 3MM on youtube in 2 years)
Looking at the Alexa upstream sites [1], I see 10% of their traffic stems from adcash.com and various other advertising-related sites are represented in that list as well.
Is it really so easy to manipulate these stats? Did I miss a popular trend?
[1] http://www.alexa.com/siteinfo/vube.com <comment><USER2> I see pop up ads from Vube for some sites. I think that is why their visits are being inflated.

Also it seems like a lot of browsers are getting infected with virus that opens up Vube: [http://malwaretips.com/blogs/remove-vube- virus/](http://malwaretips.com/blogs/remove-vube-virus/)

<comment><AUTHOR> Ah, that explains. Since posting the question I found similar comments online ( e.g. [http://www.webutation.net/go/review/vube.com](http://www.webutation.net/go/review/vube.com) and [http://answers.yahoo.com/question/index?qid=20130729083625AA...](http://answers.yahoo.com/question/index?qid=20130729083625AAl14OB) fourth answer)

Still amazed that one can manipulate stats that much.

</comment></comment><comment><USER3> They popup ads on some popular bit torrent sites that are named for political parties in Europe. ;)

That might explain the hidden stats.

</comment><comment><USER4> Views are inflated because those videos pop under and start playing in the background.</comment>