The electric car has dropped out of favor in Denmark - <AUTHOR> https://www.bloomberg.com/news/articles/2017-06-02/denmark-is-killing-tesla-and-other-electric-cars <comment><USER2> Tesla is a pretty expensive car, so when the buyers no longer got a discount on the purchase of an electric car less people could afford them.

The Electric cars aren't selling because only a few people can afford spending $110.000 car, more than a house in some parts of the country. Even when the subsidy was in place most of the buyers were relatively wealthy people.

You can question the Danish taxation of cars if you want, but what's killing Tesla and others is the high price. The best selling car in Denmark in 2016 was the Peugeot 208 at $20.000. If electric cars are to take of they need to hit the $20.000 - $40.000 price range.

Tesla is a luxury which sold well among the well of segment of the population, when they were given a discount on the taxes, by the government.

<comment><USER3> Also, giving tax breaks on luxury cars means shiftig wealth from the poor to the rich.

<comment><USER4> The tax on cars is largely for environmental/societal reasons. Pollution is an expensive, damaging externality for society largely caused by cars; the infrastructure for a car culture is VERY expensive to maintain; car-dependent cities are less attractive to live in.

A single-digit sales tax or registration fee does not cover these costs to society caused by car owners. Therefore, these costs must be covered by the general fund: from income, payroll, and business taxes. These all apply equally whether or not you own a car, so if you don't buy a car, you're still paying for the environmental cost of having one but not getting the benefits.

Denmark has done a smart thing by placing high taxes on cars. Reasonable taxation policy helps make this decision more rational. The flat tax usually makes sense because cheap cars are likely to be low-powered sub-compacts, which have a smaller impact, while expensive luxury cars are more likely to be high-powered, heavy, large vehicles.

But EVs (and hybrids, to a lesser extent) break this model. They are expensive, but environmentally friendly. It makes sense to encourage their adoption through tax breaks. That is not a shift of wealth from the poor to the rich, it's an intelligent exception in a model intended to shift costs away from all of society to the source of those costs.

<comment><USER5> > But EVs (and hybrids, to a lesser extent) break this model. They are > expensive, but environmentally friendly.

Not quite. EVs reduce direct pollution, but there are still a lot of negative externalities. There are obvious ones relating to the manufacture and also to then still requiring energy.

But car culture itself has all sorts of issues, no matter the drive train: it encourages bad urbanism and sprawl (with large environmental impact), encourages inefficient land use via extensive parking, it taxes the infrastructure, it encourages bad health, and also some direct accidents.

<comment><USER6> Why the downvotes? Building and maintaining big roads, bridges, parking spaces has a huge social and environmental impact compared to increasing public transportation.

<comment><USER7> Public transportation is preferable to cars, but let us not paint electric cars as having any more negative externalities than their internal combustion brethren.

(The steel/aluminum/plastics of a car's exterior/interior/chassis are shared by cars regardless of drive train and still the overall impact of those materials dwarfs the environmental impact of battery technologies.)

<comment><USER5> > let us not paint electric cars as having any more negative externalities > than their internal combustion brethren.

I wrote:

> EVs reduce direct pollution, but there are still a lot of negative > externalities.

<comment><USER7> Sorry, I wasn't specifically directing that comment at you. There are a lot of people that will read what you wrote and assume you mean there are more negative externalities than the equivalent internal combustion car. Certainly you see that sort of talk/mythology a lot lately. I read your comment that way at first, but realized that was not what you had meant, but I can certainly see people downvoting it for assuming that is what you meant.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> The stats are a bit misleading. Of course the sales for Jan 2017 will be low if it was known beforehand that Q4 2016 would be the last moment that electric cars were not fully taxed. Everyone who was planning to purchase an electric car would make sure to buy it in Q4 2016 and not in Q1 2017.

This doesn't tell much about the future of electric cars sales in Denmark; after a while the sales will recover again and only then we will know if they have dropped comparing to the earlier numbers or not.

<comment><USER9> I can confirm. I work with some Danes, one of whom bought a Tesla under this regime. There was a mad scramble to purchase Teslas before Q1 2017, which also shifts the numbers even more as people who weren't planning to buy before 2017 were incentivized to do so.

</comment></comment><comment><USER10> In one form or another, this is something electric car companies need to build into their expectations.

Petrol taxes (exempt by default), sales taxes, road taxes & such add up to a sizeable tax revenue source. In many places they are linked to road/transport budgets. The tax breaks that electrics have been getting were implemented when the segment was so small that it didn't matter. Once electrics reach double- digit market share, they are probably unsustainable. They will probably need to find a replacement for petrol tax too.

Rebranding these as "externality taxes" is well & good, but it doesn't change the fact that government departments need the revenue, externalites or not. Countries can easily afford to "subsidize" electric to get from 0.4% adoption to 4%, but 40% is almost out of the question.

Then there's the regressive tax problem. Yuppies in Copenhagen will be driving tax free Tesla 3s while single mothers pay thousands to drive a Peugeot 206. Many countries implement new-car promoting policies (eg emission tax) of all sorts which are regressive. I doubt this will kill subsidies in itself, but combined with budget holes...

TLDR - Tax breaks are for infant industries. Tesla is launching a mass market car. This is no longer an infant industry.

<comment><USER11> > Once electrics reach double-digit market share, they are probably > unsustainable. They will probably need to find a replacement for petrol tax > too.

I agree. What form would such a tax take? You could tax tires, which is stupid because it encourages people to buy less safe long-life tires, or you could roll it into property tax, or a VAT, or grocery tax, etc. Even a part of a sales tax could make sense, since logistics for the supplier is included in the cost of the product anyway. Logistical infrastructure tax makes sense.

What is best practice here?

<comment><USER10> Well…. the drop-in replacement for petrol tax would really be a per-km tax. Not the easiest to implement, but not impossible either.

<comment><USER12> I would think it would be a kWh tax...since actual mileage for an EV would vary based on local geography/traffic/weather etc in a similar fashion to MPG for ICE.

</comment></comment></comment></comment><comment><USER13> I live in Denmark. I still see a rapidly growing number of electric cars on the streets. It is just smaller, less expensive electrical cars that take over (Renault Zoe, WV e-UP, Nissan Leaf). I would venture to guess that Danes don't want to spend more than X kroner on a new car. And the Tesla price point broke that limit when the tax discount was removed.

Pronouncing the electric car uncompetitive over this is an exaggeration.

<comment><USER14> The article doesn't say it lacks competition.

The decline in growth is entirely the result of the huge import tax:

> electric car dealers were for a long time spared the jaw-dropping import tax > of 180 percent that Denmark applies on vehicles fueled by a traditional > combustion engine.

This article is only looking at growth rates, not total sales by cost or by market position, so it wouldn't be a useful comparative metric anyway.

If anything, what it indicates is that they'd sell 10x more cars (both electric/gas) if it wasn't for the tax.

\- 2600 sold in 2015 w/ 0% import tax

\- 200 sold in 2016 w/ 180% import tax

</comment></comment><comment><USER15> One thing that is worth mentioning: Denmark is one of the very few countries (two if I'm not mistaken) that takes cycling seriously. They also have good public transport compared to many other countries.

If your goal is to reduce car traffic overall then not subsidizing EV is more understandable.

<comment><USER14> > Denmark is one of the very few countries (two if I'm not mistaken) that > takes cycling seriously

Considering the cars have a 180% import tax, a big percentage of the population couldn't afford a car even if they wanted to. So I'd hope they take it seriously.

> They also have good public transport compared to many other countries.

Given that this portion wouldn't have a way to get around without it, this seems like an absolute necessity which isn't necessarily the case in other cities. Poor people need to get to work somehow and reach shopping centers and family/friends outside of walking/biking distance.

That said I'm fully in support buses/trains and biking. I bike everywhere and live in a city but still own a cheap car, which I still get a great amount of value out of and find indispensable. It is also important for my partners work who occasionally needs to drive to surrounding areas.

<comment><USER16> I'm a dane and I never owned a car while I lived in Denmark. HOWEVER, there is a tendency to forget that not everyone lives in high density cities (where public transport is decent). In more suburban area, public transport is hopeless. You _have_ to have a car. Thus people drive, but they drive old cars. The 180% tax doesn't hurt people equally.

</comment></comment></comment><comment><USER17> Here in Michigan our Republican government has instituted a regressive increase on EV license plate registration/renewal fees. The excuse is that EV owners don't pay the tax on fuel that petrol car owners do, but we still put wear on the road and therefore must pay the price. It's a load of crap though. Michigan's famously bad roads are not due to the very few EVs driving on them. It's semi trucks which are permitted to weigh far beyond what the road was engineered to handle. (Michigan has effectively no regulation of truck weight so the trucking companies overload their hauls and destroy our roads.)

</comment><comment><USER18> We need electric self driving busses or similar, capable of moving large amounts of people frequently without the parking and other traffic related stress.

<comment><USER19> Electric busses self driving or not would not do you good in places where public transportation does not exist currently.

Busses with drivers electric or not are easy to implement and we have them today, but many places still lack good (or even acceptable) public transportation links for many reasons including lack of investment, high car ownership rates or as far as cities lack of urban planning, especially for older cities that were not had to be rebuilt after WW2.

Driverless busses would not really make a difference for any and many more root causes. They will reduce the cost of operating already existing bus networks with good traversability and optimized bus routes, they would not however magically help you to setup public transport where there has been none, in fact it might be more expensive to go driverless from the get go.

<comment><USER20> This only holds if you think driverless buses are simply a standard scheduled bus service with no human driver. But I can already imagine on-demand or dynamic bus dispatch/routing that could be an order of magnitude improvement in mass transit service level to some communities.

<comment><USER19> That isn't a bus, that is car hire. Busses and other public transport work well because you have a route which makes it predictable people know when and where they can get onto a bus, and where they can get off and how long the ride will take. There is no point of using 50+ people bus as an Uber.

A small car service would be better for that, it's also the reason why taxis do not use larger vehicles unless you book a special ride upfront.

Even with ride sharing it's often more efficient to have point to point transport when you are not using a route, or at best have only 1-2 stops on the way; in such case a bus is unnecessarily wasteful.

But yet again this isn't anything that cannot be done now without a driverless bus, you have GPS nothing stops public transport companies from implementing dynamic routes now the driver isn't the problem.

Most bus lines do have "dynamic" dispatching already BTW, peak hours tend to have more busses on a given route than off-peak hours, what you are suggesting is to have dynamic routes, which is basically Uber.

<comment><USER21> If you put 20 people on that "car", it's a bus.

Small buses can adjust their route to get you reasonably quick point to point transport while still being collective transportation. I do agree that is something that could be done today, if only governments let people do it. No need for self driving buses.

<comment><USER19> There are plenty of places that allow for small (van sized) private bus/shuttles to operate, they however do not seem want to go that route and usually either shadow existing bus route or have their own routes where buses do not usually go (and usually a mix of both).

The problem is that when you turn busses into cars for hire you end up in a situation where you'll get a lot of people pissed all the time.

Ride sharing with even 5 people that are not bound to the same destination is a nightmare.

Think about what happen when you have a bus with 18 people that is diverted because someone called it and then cancels it?

How do you plan stops? Uber can stop nearly anywhere a bus usually needs bus stop not just to not block traffic but because people need to be able to safely get on and off the bus which is much harder to do than with a car as a bus blocks the view much more than a smaller sedan.

Sorry; I'll buy a Tesla that works for Uber while you are at work all day long, I will not buy ridesharing with on-demand hailing and bespoke routes and destinations with 20 people on board.

The best thing you can do get working is a fixed route without fixed stops, and this works today it's called hop-on-hop-off busses and it works in many places including London.

<comment><USER20> This really sounds like a galloping case of "I can't imagine how it can work, so it can't work".

<comment><USER19> No that is we have models that work and models that do not.

<comment><USER20> Sure. Neither are bounded sets.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER22> Taxing the purchase of a car seems non-sensical to me. It is not, so much, the ownership that is the problem, but the use of the car that creates congestion and health issues.

Tax fuel and bring in road pricing.

<comment><USER23> You can't selectively tax certain goods without creating a market failure.

E.g. if the purchase of cars isn't taxed I'll just import €10,000 of audio equipment by buying an old beater, then ripping out and selling the sound system and selling the car for scrap, while making a big profit because I'll be competing with local sellers that have to pay import tax on sound systems.

<comment><USER24> This happens with cargo vans in the US, which are imported as passenger vans before being converted, to avoid a 25% tarrif on the import of cargo vans.

[http://blog.caranddriver.com/feds-watching-fords-run- around-...](http://blog.caranddriver.com/feds-watching-fords-run-around-on- chicken-tax-riles-customs-officials/)

However I'd challenge that this is a market failure - this is an example of the failure of a rules-based approach to regulation.

In countries which take a principles-based approach to regulation then the substance of the transation is considered as well as the form.

So this kind of nit-picking to circumnavigate the rules wouldn't have been allowed.

<comment><USER23> What would you call it then? Market failures can also be created by ineffective regulation, as is the case in my example.

Considering the substance of the transaction isn't a viable strategy, it might be possible at larger scales as in your Ford example, but individuals can and will find clever ways around tariffs that are impossible for the authorities to keep up with.

As an example, I lived in a European country where import tolls on bicycles were much higher than the import fees on spare parts, so if the price of shipping was low enough you could simply ask the seller to send over a bike in multiple packages marked as spare parts to evade the import fees.

How are you going to detect cases like that with perfect accuracy? You'd need some massive tracking system to figure out who bought what, and even then it could be trivially evaded by me and a friend buying 1/2 of two bikes each as spare parts and combining them after they've been imported.

</comment></comment></comment></comment><comment><USER25> 180% import tax?! I'm not sure how that's possible. Are they sure it's not 18%? Cars are an international market, aren't they? Aren't they bound by rules from the WTO and the EU?

With that kind of import tax, I can imagine people can only afford to buy EU- manufactured cars. I hope Tesla hurries up with that European factory.

<comment><USER26> Taxes are high in Denmark, but this isn't _import_ tax, which seems to be something that is getting a lot of attention in the US at the moment. It applies to _all_ cars, but electric used to be exempt.

The tax is for "registration" when you purchase a car, and I think its primary (official) purpose is to limit the use of cars and pollution, as well as being aligned with the Scandinavian socialistic mind set -- If you can afford a luxury item such as an expensive car, you are also likely to be able to contribute more to society.

Obviously, people buy cheaper and smaller cars than in the US, so owning 1-2 cars is still quite common despite the high tax rate if you live outside the city centers and need a car.

Some countries have very high taxes on cars -- I think Singapore's is just as high if not worse.

<comment><USER27> A note regarding the "Scandinavian socialistic mind set"; Sweden doesn't have a tax like that and buying a car there is taxed comparably to Germany (with a car price at ~ -2% compared to the EU average).

<comment><USER25> Sweden is huge and very sparsely populated, though. I can imagine reducing car use would severely limit people's mobility.

It's also noteworthy that Sweden has two major car brands: Volvo and Saab (does Saab still exist?). That's quite a lot for a country of 10 million people.

</comment></comment></comment></comment><comment><USER28> So basically if the government of the country doesn't pay a huge part of the car (in cash or in tax deduction, or both depending of the country), the so called electric vehicle boom is not really happening.

It's sad. But expected.

</comment><comment><USER29>
       Price really matters.

EV in generally are still costing consumers a whole lot more than the traditional internal combustion engine vehicles. And we've seen that similar EV sales drop due to subsidy running out last year in Atlanta as well.[1]

[1] [https://www.marketplace.org/2016/01/08/world/georgia-ev- sale...](https://www.marketplace.org/2016/01/08/world/georgia-ev-sales- sputter-without-tax-break)

</comment><comment><USER30> The car company that is going to win the most market share in the next 10 years is the one with the best self-driving system.

I don't know a lot of details about the technology, but Tesla seems to understand this, so this article seems to be about a small bump in the electronic car market in one smallish country.

I just can't see how people don't just share cars once the auto-pilot is developed enough to drive itself, right?

</comment><comment><USER31> Denmark has the most expensive electricity in Europe.

<comment><USER32> Before someone jumps to conclusions: after taxes.

Tax and VAT is around 70% of the price paid per kWh for ordinary consumers.

</comment></comment><comment><USER33> If any HN users are interested in car prices in Norway this is where you can see prices for new, used and leasing. This is the go-to (essentially only) marketplace for cars here : [https://www.finn.no/car/used/search.html?filters=](https://www.finn.no/car/used/search.html?filters=)

<comment><USER9> Slightly off-topic, but is the name "finn" for the Norwegian site intentional?

<comment><USER34> It's the same word as "find", but yeah, a bit funny.

</comment></comment></comment><comment> iso-8859-1 A nuclear-powered truck with a RBMK-type (think Davy Crockett) reactor (with the right economics of scale) might be so cheap to make, it would be more competitive than a gas-powered truck over its entire lifespan. But it wouldn't be environmental. Can't I make the same argument regarding gas/diesel cars?

<comment><USER35> Why would it not be environmental?

<comment><USER36> Disposing of nuclear waste is not trivial.

</comment></comment></comment><comment><USER37> We won't really know this for a few years. The phasing out of the tax break was announced well ahead of time, so most people just made sure to buy one before it kicked in.

When Model 3 has been out for a year and people have gotten used to the new price points we can revisit the question.

</comment><comment><USER38> I am skeptical that a 180% tax on fuel-powered cars is good policy, however I can see the point given that Denmark is extremely concerned about the environment.

That said, I think that the same bracket on electric cars is a truly draconian measure.

<comment><USER39> Cars cause other problems beside pollution (not that electric cars are pollution free). An over reliance on cars leads to sprawl, sprawl reduces quality of life. Accidents costs lives.

<comment><USER40> _An over reliance on cars leads to sprawl, sprawl reduces quality of life_

It must be so nice to have the wisdom needed to prescribe everyone else's lifestyle.

<comment><USER41> I'm not an expert on sprawl and QoL, but I'm pretty sure sprawl makes it harder to design effective public transportation (among other things). Likewise, the unavailability of effective public transit places a heavy reliance on personal transportation (i.e. cars), and by and large means long commutes in said car. Long daily commutes in a car don't sound very desirable, and probably do negatively impact QoL.

<comment><USER40> _...probably do negatively impact QoL._

With all due respect, there are about 5,999,999,998 people on Earth who didn't ask you _or_ the grandparent poster.

<comment><USER25> Should people only voice their opinion after the people of the world have had a vote on whether they're interested in it? Because I don't remember voting on your opinion either.

<comment><USER40> I'm not seeing opinions being voiced in this thread. I'm seeing them stated as objective facts.

You're entitled to your opinions, and maybe you're even entitled to your own facts in this remarkable age in which we find ourselves living. But either way, when you presume to speak for others, you should expect to be called out for it. "Quality of life" is a pretty subjective thing

<comment><USER25> > "Quality of life" is a pretty subjective thing

It absolutely is, but that doesn't mean you can't know anything about it. You can research subjective things by asking people how they feel about their quality of life. How happy they are. It turns out that in general, people with long commutes in areas dominated by cars are less happy than people who bicycle to work.

<comment><USER40> _It turns out that in general, people with long commutes in areas dominated by cars are less happy than people who bicycle to work._

Hmm. Maybe you're right. That sounds _entirely_ free from the possible influence of any additional factors.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER42> Well, this tells us the price point electric cars have to hit to be viable.

</comment><comment><USER43> We need electric busses, not cars.</comment>


Vim Git Gutter - <AUTHOR> https://github.com/airblade/vim-gitgutter <comment><USER2> Obligatory Emacs version: <https://github.com/syohex/emacs-git-gutter>

<comment><USER3> Ok, as a challenge, I'm gonna try make a Conception version, brb.

<comment><USER3> All right, I think I'll stop here. Parsing the -U0 ranges in raw C++ is gonna be too much wasted effort. I'll finish this another time, likely after switching to Go.

But I was able to get a rough prototype running.

Screenshot: [https://dl.dropbox.com/u/8554242/dmitri/projects/Conception/...](https://dl.dropbox.com/u/8554242/dmitri/projects/Conception/images/minor- milestones/2013-03-05_2016%20Git%20Gutter%20Quick%20Prototype.png)

<comment><USER4> Why are you using C++?

<comment><USER3> For historical reasons, mainly. If I were starting from scratch today, I wouldn't pick it. I'm in the process of making a change to golang, but I want to use the existing project to develop the next-gen version. There's only a few more things I need to add to make it viable for working on a large-scale project.

I started the project a year ago. I wanted to have the power and flexibility to achieve anything, and use OpenGL for graphics so there'd be no restrictions as to what can be put on screen. Plus I've been using C++ for many years before for making indie games.

Back then, I was even more motivated to work on it because I felt C++ itself badly needed a more efficient way or writing it. I really dislike the manual duplication it forces you to create and maintain as you change things (e.g. cpp and header files). But even with a more script-like high level language like Go, I feel there is a lot of potential to innovate past a basic text editor. I'm gonna find out.

</comment></comment></comment></comment></comment><comment><USER5> Sublime Text Version <https://github.com/jisaacks/GitGutter>

<comment><USER6> Not to take away from the post, anyone else feeling a bit of Vim overload in the past few days? I'm pretty much Vim'ed out with all the Vim related postings.

<comment><USER7> I don't really understand what you mean. People submit vim-related content, which then gets upvoted and brought to everyone's attention on Hacker News.

It might just be that it actually reflects people's interests. Given how established vim and emacs are, I have to say I'm not surprised, they remain extremely versatile and complete developing environments to this day.

<comment><USER6> I actually use Vim. I don't have any issues with it. I do agree with you that it's a great tool.

Just pointing out that lately there has been a lot of Vim related posts that are being up-voted. Maybe that's been the case for a while, and I am just noticing it.

Anyway, my comment was meant more as a light humour rather than critical.

</comment></comment></comment></comment><comment><USER8> This is really nice, but I wish the background color of the gutter would automatically match the rest of my background. The gray band [1] is pretty unappealing IMO.

Also noteworthy is that that the gutter only updates when the file is saved.

[1] Screenshot: <http://imgur.com/TIGKVRS>

<comment><USER9> You can achieve that manually with `highlight clear SignColumn` in your colour scheme or ~/.vimrc.

I'll (I'm the author) probably make this the default because it seems quite a common wish.

<comment><USER10> I've added it at the bottom of ~/.vimrc, but for some reason it doesn't work until I explicitly type `highlight clear SignColumn` while editing a document. Any ideas why this could be happening?

Great plugin by the way, super handy.

<comment><USER11> I had the same problem, I did:

au VimEnter * highlight clear SignColumn

<comment><USER10> Works like a charm, thanks :)

</comment></comment></comment></comment></comment><comment><USER12> I've also got a similar plugin <https://bitbucket.org/sirpengi/iwilldiffer> that works with hg as well as git. Mine uses python though, nice to see an implementation that's all in viml. Neither of our plugins are async though (so vim ui will block while the diff is running), which is the biggest hurdle I want to cross.

<comment><USER9> As far as I know Vim is single-threaded; you can't run operations asynchronously.

<comment><USER12> Yes, but there is a way to work around that with a ton of hacks (by spawning a separate process, and polling CursorHold events). See <https://github.com/troydm/shellasync.vim> and a bunch of linting plugins do this too (but I can't remember them off the top of my head).

<comment><USER13> Or you could, e.g., use the Lua scripting extension, load one of the native threading libraries for Lua (Lua Lanes, for example) and fire away a few background tasks. Whatever actions the background tasks need to perform with the buffers you'd have to serialize, but that shouldn't be all that difficult.

<comment><USER12> So long as any plugin script is running, vim will block waiting for it. And if you fire off a background process and exit from your main script, any reference to the vim environment within your child process becomes useless, so you can't modify anything in vim from within there anymore. I'm not entirely familiar with the lua scripting extension, but this was my experience attempting the same thing in python. I mean, at the end of it, vim is single threaded, and after your primary script exits its state is being used elsewhere - if you _could_ modify it from your child process that'd be major cause for crashage.

That and who has lua on their system (I mean, i do for Love but that's irrelevant) or wants to install it just to use a git/hg plugin?

<comment><USER13> You'd have to implement a message queue, of course. As for the second part, who hasn't? Many applications are using Lua as we speak.

</comment></comment></comment></comment></comment></comment><comment><USER14> Eclipse pretty much does this out of the box. I guess so do IntelliJ and Visual Studio. You can also display the name of the last person to change a line in the same position (ie. svn/git blame), which is very useful to quickly find out who to talk to regarding a section of a file. The commit message is displayed on mouseover.

<comment><USER15> Yes, IntelliJ handles this pretty nicely. For modified lines, you can mouse over to see what you changed. For all changes, you can click a context menu to revert any given change. (Of course, that does require touching a mouse... though I believe you can set up a key mapping for it.)

<comment><USER16> Shift+F10 opens the right click menu in most contexts.

<comment><USER17> And before anyone asks, you can easily access the menu contents with the keyboard.

</comment></comment></comment></comment><comment><USER18> It'd be perfect if the signs changed in real-time without the need to save first. Awesome work though. Thanks Andy.

<comment><USER19> That's a lot of "git diff" calls!

<comment><USER20> In the Sublime version, one of the things I did to avoid that is it doesn't call `git diff` if it has been less then 5 seconds since the last `git diff`.

</comment></comment></comment><comment><USER21> Is there any way to make it so that the gutter is always present? There's a bit of a noticeable jump to include it when I save a file, it's sort of annoying me.

I tried

      let g:gitgutter_enabled = 1

but that does seem to work.

I'll have a poke through the source.

<comment><USER12> probably not, the way vim works if there are no more signs attached to a document the gutter goes away. This isn't plugin related, it's just a manner of how vim works.

Although I suppose you can work around this by displaying a fake sign (color match gutter background?), but that has its downsides (depending on colorscheme, the sign can show up. and vim doesn't support whitespace characters for signs, at least not from what I can see).

<comment><USER21> Yeah, I just noticed that now.

It seems to just grep through the diff itself, so adding a fake sign would be a pain and, as you mentioned, probably not display correctly anyway.

I'm sure my eyes will adjust :).

<comment><USER3> Why can't you change it if you want to?

</comment></comment></comment></comment><comment><USER20> Ugh, someone submitted the original _Sublime version_ to hackers news 2 months go <http://news.ycombinator.com/item?id=5027308> and it got no love.

It just makes sense that someone would port it and become the #1 story.

<comment><USER12> Maybe because there are more vim users than sublime users on hn? FWIW i did see that story on front-page of hn and it's what prompted me to immediately write my vim-port. I finished it like a few days after that.

</comment></comment><comment><USER22> An aside question; what's the deal with "pathogen"?

I've been using the "/bin/cp" command for years installing vim plugins and it's worked remarkably well; requiring just about 1 invocation on average...

What problem does that thing solve?

<comment><USER23> I have 5 separate computers that I run vim on. Manually installing and updating is a huge pain. I keep my .vimrc in git to keep them all synchronized.

<comment><USER24> I use Vundle to take this a step further

<https://github.com/gmarik/vundle>

<comment><USER25> Fantastic plugin.

:BundleUpdate when you've got 20 plugins homes across Github and vim.org is a huge timesaver.

</comment></comment></comment></comment><comment><USER26> Seems to add noticeable latency (1+ seconds) to my save, each time. Vim is unresponsive during this time

Is this expected? I save quite frequently, it's an unconscious reflex at this point.

<comment><USER12> Yes, the plugin runs the diff command when a document is saved/loaded. See the discussion here: <http://news.ycombinator.com/item?id=5326654>

<comment><USER26> Figured as much. I would argue for/request forking that "git diff" command and only processing its output in the VIM process, but for the moment I'll stick with my trusty ",gd" command:

      map <leader>gd :!cd %:p:h && GIT_PAGER='' git diff HEAD -- %:t<CR><CR>

</comment></comment></comment><comment><USER27> This works really quite well - great work, airblade! For reference, this is what I placed in my vimrc to get things how I like them:

      highlight clear signcolumn
      let g:gitgutter_enabled = 0
      nmap <leader>gu :GitGutterToggle<CR>

I prefer my buffers to start with it disabled by default and toggle as needed.

</comment><comment><USER28> I'm really impressed with this -- I would love to see this see functionality for other VCSes (subversion, etc) so that I could use it with my non-git projects. The vimscript looks pretty clean -- maybe I have a new weekend project ahead of me.

edit: just a quick hack for a "vim svn gutter": <https://github.com/prg318/vim-gitgutter>

The code is really clean and it would be fairly trivial to adopt this for use with any other VCS. Open source yay!

<comment><USER29> svndiff (<http://www.vim.org/scripts/script.php?script_id=1881>) works with SVN, Git and others.

Both sign-diff (<http://www.vim.org/scripts/script.php?script_id=2712>) and changesPlugin (<http://www.vim.org/scripts/script.php?script_id=3052>) are VCS-agnostic: they show differences between the saved state and the current state.

<comment><USER28> Thank you! I wasn't aware that these plugins existed already. While I was getting excited to get my "vim -D" on to get the script in the OP to work with svn, I might just work one of these plugins into my workflow.

Thanks!

<comment><USER29> Here is an idea to keep your forking mojo going: "improve" the looks of svndiff to match the looks of git-gutter.

</comment></comment></comment></comment><comment><USER30> Any way to bind "toggle the gutter" so I can press my "set nonumber" button and have it toggle the gutter as well? [edit] Apparently I didn't read down far enough! This functionality exists already through the plugin. This works for me: nnoremap <F2> :set nonumber! <bar> ToggleGitGutter<CR>

</comment><comment><USER31> vim-patchreview is a bit different, but also of interest: <https://github.com/vim-scripts/patchreview.vim>

I find it really useful in particular for working with Mercurial patch queues. I have a command in my .vimrc that will run ReversePatchReview on the topmost patch in my patch queue. It pops up a diff tab for each file that has changed. I can easily use "[c" and "]c" to jump between changes within each file.

This setup makes it incredibly easy to review the changes a patch makes, and it's so convenient that I often write quite a bit of my code inside these diff views. I don't think I could live without vim-patchreview when working with Mercurial.

</comment><comment><USER32> If you like gitgutter and you are a fan of textobj plugins you might also find this useful:

<https://github.com/gilligan/textobj-gitgutter>

</comment><comment><USER33> This looks amazing. Nice work! Does it always diff with the last commit?

<comment><USER9> It diffs your working tree with the index (i.e. what a plain git-diff does). I plan to make it easy to `git-diff --cached` too.

</comment></comment><comment><USER34> There is another implementation, it's a bit faster and well documented :)

And there is more customisable as well

<https://github.com/mhinz/vim-signify>

</comment><comment><USER35> Very cool. Pointed me at the Sublime Text version and I love it.

<comment><USER36> <https://github.com/jisaacks/GitGutter>

</comment></comment><comment><USER37> Awesome work! Cheers airblade. One nitpicky thing though, why do you use "_" and not "-" for removed lines? Can't see why you wouldn't want it vertically centered!

<comment><USER38> Removed lines happen _between_ existing lines, so using an underscore makes it look like that.

Compare:

        25  - def foo():
        26       baz()

With:

        25  _ def foo():
        26       baz()

(Where there used to be a bar() call before baz().) The first version makes it look like the `def foo():` was somehow removed.

<comment><USER37> Valid point! Can't believe it didn't occur to me ;)

</comment></comment></comment><comment><USER39> I would love something like this for TextMate 2.

</comment><comment><USER40> For what it's worth, I installed this in my VIM, switching between files took about 4 seconds instead of 1, so I uninstalled it.

</comment><comment><USER41> Great stuff, I was using svndiff before this but it was more of a miss than a hit, this seems to work nicely so far.

<comment><USER42> It works fine, but I am unsure of what advantage it has over svndiff, which also works fine.

<comment><USER41> Well, in my case svndiff never worked fine, it would showbad diffs 9/10 of the times, but maybe it was just a misconfiguration on my part.

</comment></comment></comment><comment><USER43> Brilliant, I have been meaning to build this exact same plugin for a while already, thanks a lot for doing this!

</comment><comment><USER44> Nice! This is one of the things I got used to in RubyMine that I've missed in vim.

</comment><comment><USER45> Edge case: after deleting the first line, no gutter shows op

</comment><comment><USER46> often do a "git add -p" and commit different aspects works for me.

</comment><comment><USER47> I honestly like vim fugitive because of it's awesome power. I just type ,gd to see a diff in a split. I probably don't want to scan the gutter for files i've changed, and fugitive diff folds all non-changed lines

also, who the hell sets their font size that small? (screenshot in the readme). that's a sociopathically small font size. I will never trust you airblade. never.

<comment><USER48> I use both. If I need a full diff, fugitive is great. Sometimes I just want to scan to see what lines I changed in a a file. In other words, it is impractical to use this plugin to find out what _files_ you've changed. It is great for finding out what lines in whatever file you've opened have changed.

<comment><USER47> fugitive split diff shows you what lines you've changed. stop using both.

<comment><USER48> No. You you do your thing. I'll do this. I don't want to have to run another command to see what lines have changed in my file. I want small, non-intrusive icons in the gutter without doing a damned thing.

</comment></comment></comment></comment><comment><USER47> I honestly prefer vim fugitive's diff function, as it splits with highlighted lines.

<comment><USER49> Sure, but there's a difference between some nice lil gutter glyphs in the background and a deliberate ':Gdiff' command.

In other words, why not both?</comment></comment>


Sharp 80: TRS-80 Model III Emulator for Windows - <AUTHOR> http://www.sharp80.com/index.php <comment><USER2> Neat and well done. Also nice to see how an emulator can be written in C#/.NET.

The "Sharp 80" name might be a tad confusing for those of us who fondly remember the Sharp MZ80:

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

</comment><comment><USER3> This brings back very fond memories of high school. I think we have about 4 of these for a school of several hundred students. We would make a booking and stay back after school to write our programs in BASIC and assembly. Thank you to the developers, you made my day.

The model before this (was it the version II?) had a terrible keybounce problem - it was almost usable.

Later we were lucky enough to get a Compucolor II. I still have the manual from 1979 here on my bookshelf.

</comment><comment><USER4> Learned Pascal on one. Good times. Good times.

</comment><comment><USER5> Oh, this could be really good! I've played with a couple emulators that had some proprietary restrictions, but still worked well for my needs. A good one free and clear would be really nice!

<comment><USER6> Here's one I wrote in Go, though I just noticed I never bothered putting on a license. Let me know if you want me to. [https://github.com/lkesteloot/trs80](https://github.com/lkesteloot/trs80)

<comment><USER7> Why ask? If you don't mind how it's used, just make it MIT, 2- or 3-Clause BSD, or Apache 2.0

</comment></comment></comment><comment><USER8> This is cool. My dad threw away our TRS-80 when I was in high school, and I miss it. It was the one with the integrated monitor, I don't remember what model it was. My first computer.

<comment><USER9> The first in that line with an integrated monitor was a Model III. It was gray and smooth. The Model 4 looked practically identical but was white and textured.

I had both a III and a 4.

<comment><USER8> Mine was the gray one, and model III rings a bell.

</comment></comment></comment><comment><USER10> Are there any available C compilers for these?

<comment><USER11> These were not normally programmed in C but in Assembler or basic. You might be able to find Misosys if you search hard enough, it's multi-pass iirc and works but you won't be getting a whole lot of work done in a day.

</comment></comment><comment><USER12> You should write up how and why you did this.

</comment><comment><USER13> I get an error about the Direct X driver, then an unhandled exception dialog:

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

 __ __ __ __ __ __ __Exception Text __ __ __ __ __ __ __System.NullReferenceException: Object reference not set to an instance of an object. at Sharp80.SoundX. <Dispose>d__57.MoveNext() \--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)

 __ __ __ __ __ __ __Loaded Assemblies __ __ __ __ __ __ __mscorlib Assembly Version: 188.8.131.52 Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE CodeBase: file: ///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- Sharp80 Assembly Version: 22.214.171.124 Win32 Version: 220.127.116.11 CodeBase: file:///C:/Program%20Files%20(x86)/Sharp80/sharp80.exe \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.Windows.Forms Assembly Version: 18.104.22.168 Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_22.214.171.124__b77a5c561934e089/System.Windows.Forms.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System Assembly Version: 220.127.116.11 Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_126.96.36.199__b77a5c561934e089/System.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.Drawing Assembly Version: 126.96.36.199 Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_126.96.36.199__b03f5f7f11d50a3a/System.Drawing.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- SharpDX Assembly Version: 184.108.40.206 Win32 Version: 3.1.0 CodeBase: file:///C:/Program%20Files%20(x86)/Sharp80/SharpDX.DLL \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.Runtime Assembly Version: 220.127.116.11 Win32 Version: 4.6.1087.0 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime/v4.0_22.214.171.124__b03f5f7f11d50a3a/System.Runtime.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- SharpDX.DXGI Assembly Version: 126.96.36.199 Win32 Version: 3.1.0 CodeBase: file:///C:/Program%20Files%20(x86)/Sharp80/SharpDX.DXGI.DLL \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- SharpDX.Direct2D1 Assembly Version: 184.108.40.206 Win32 Version: 3.1.0 CodeBase: file:///C:/Program%20Files%20(x86)/Sharp80/SharpDX.Direct2D1.DLL \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- SharpDX.DirectInput Assembly Version: 188.8.131.52 Win32 Version: 3.1.0 CodeBase: file:///C:/Program%20Files%20(x86)/Sharp80/SharpDX.DirectInput.DLL \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.Threading Assembly Version: 220.127.116.11 Win32 Version: 4.6.1087.0 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Threading/v4.0_184.108.40.206__b03f5f7f11d50a3a/System.Threading.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.Collections Assembly Version: 220.127.116.11 Win32 Version: 4.6.1087.0 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Collections/v4.0_188.8.131.52__b03f5f7f11d50a3a/System.Collections.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.Reflection Assembly Version: 126.96.36.199 Win32 Version: 4.6.1087.0 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Reflection/v4.0_184.108.40.206__b03f5f7f11d50a3a/System.Reflection.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.Configuration Assembly Version: 126.96.36.199 Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_22.214.171.124__b03f5f7f11d50a3a/System.Configuration.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.Core Assembly Version: 184.108.40.206 Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_184.108.40.206__b77a5c561934e089/System.Core.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.Xml Assembly Version: 188.8.131.52 Win32 Version: 4.6.1087.0 built by: NETFXREL4STAGE CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_220.127.116.11__b77a5c561934e089/System.Xml.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- SharpDX.Direct3D10 Assembly Version: 22.214.171.124 Win32 Version: 3.1.0 CodeBase: file:///C:/Program%20Files%20(x86)/Sharp80/SharpDX.Direct3D10.DLL \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- SharpDX.Mathematics Assembly Version: 188.8.131.52 Win32 Version: 3.1.0 CodeBase: file:///C:/Program%20Files%20(x86)/Sharp80/SharpDX.Mathematics.DLL \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.Runtime.InteropServices Assembly Version: 184.108.40.206 Win32 Version: 4.6.1087.0 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.InteropServices/v4.0_18.104.22.168__b03f5f7f11d50a3a/System.Runtime.InteropServices.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.IO Assembly Version: 22.214.171.124 Win32 Version: 4.6.1087.0 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.IO/v4.0_126.96.36.199__b03f5f7f11d50a3a/System.IO.dll \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- System.ValueTuple Assembly Version: 22.214.171.124 Win32 Version: 4.6.24705.01 CodeBase: file:///C:/Program%20Files%20(x86)/Sharp80/System.ValueTuple.DLL \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>---- SharpDX.XAudio2 Assembly Version: 220.127.116.11 Win32 Version: 3.1.0 CodeBase: file:///C:/Program%20Files%20(x86)/Sharp80/SharpDX.XAudio2.DLL \</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>----

 __ __ __ __ __ __ __JIT Debugging __ __ __ __ __ __ __To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

<configuration> <system.windows.forms jitDebugging="true" /> </configuration>

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

So... needs work : ) It does seem to run after that, though.

I'll try it at home on a different PC.

I am trying to run the DirectX installer. That seems like a really old installer -- 2010. I'll see if that fixes the startup error though.

My first computer was a Model I with 4K and Level 1 BASIC. I'd love to get this working. I'd love it more if I could make it emulate a Model 1 with Level 1 BASIC so my kids could try working through the original TRS-80 BASIC programming book like I did in 1977.

I have tried some other emulators recently and had no luck.

<comment><USER14> There's a github link on the website.

<comment><USER13> Thank you. I don't use HN that much and it seemed like the developer was asking for feedback in this forum.</comment></comment></comment>


Entrepreneurship and the Fallacy of Work-Life Balance - <AUTHOR> http://andrewdumont.me/the-work-life-balance-fallacy <comment><USER2> I'm sorry but I will never believe work-life balance is a fallacy as an entrepreneur. It really depends on the situation around the entrepreneur. If one wants a balance, one will find it.</comment>


Low Sunlight Exposure in Pregnancy Linked to Risk of Learning Disabilities - <AUTHOR> https://www.technologynetworks.com/neuroscience/news/low-sunlight-exposure-in-pregnancy-linked-with-higher-risk-of-learning-disabilities-321159 <comment><USER2> Theoretically this could mean that children born in nudist colonies would have a reduced risk of learning disabilities, which would be amenable to statistical analysis.</comment>


Camelcamelcamel is livetweeting a physical datacenter move - <AUTHOR> http://camelcamelcamel.com/ <comment><AUTHOR> I wonder what kind of bandwidth they're getting with their car (suv?) full of servers. More seriously, though, wouldn't something like camelcamelcamel be a perfect candidate for AWS or something similar, thereby preventing headaches like physically toting servers hundreds of miles?

<comment><USER2> Last I checked, just one AWS database instance would cost us $20k+/year if we pre-paid for a reserved instance, and that doesn't include all the usage-based fees (storage, iops).

And it's only a headache if you dislike spending two days in the car / colo / car / colo.

</comment></comment><comment><USER2> We did indeed live tweet it. Just wanted to keep our users aware of our movements, and avoid the "camel has died forever" fears.</comment>


Postgres Autovacuum is Not the Enemy - <AUTHOR> https://www.citusdata.com/blog/2016/11/04/autovacuum-not-the-enemy/ <comment><USER2> The actual title of the article is "Postgres Autovacuum is Not the Enemy". The word "Postgres" is a critical element here and should not be left off.

<comment><USER3> Yeah, I came up with some pretty dark stuff trying to imagine what an "autovacuum" was.

<comment><USER4> I thought someone was finally sticking up for Roombas.

</comment></comment></comment><comment><USER5> The main problem here is that autovacuum threshold is something like c + m * nrows, and in large configurations you could have all sorts of table sizes.

How much change is a lot? 1% of the table + 50 rows (for small tables)? I would argue that sometimes is better to use a fixed threshold, e.g. c = 1000, m=0

All these approaches are hit or miss and are different per configuration. What I found useful is to choose the best parameters you can think of without forcing autovacuum to run everytime, and have an external job run vacuum manually to cleanup whatever got missed... eventually you can figure out the right configuration.

<comment><USER6> I think the idea for this is either tune it for your problem cases, or if it's an issue at your scale, divide and conqueror your use case (small tables in one physical DB, large tables in another).

</comment></comment><comment><USER7> I find the recommendation to leave the cost limit alone strange. The problem is this is a global limit, shared by all autovacuum workers. The default (200) means all workers combined should not do more than 8 MB/s reads or 4 MB/s writes, which on current hardware are rather low limits. Increasing the number of workers is good, but the total autovacuum throughput does not change - there will be more workers but they'll go slower.

Also a note regarding the delay - the resolution really depends on hardware. Some timers have only 10ms resolution, for example.

<comment><USER8> Interesting.

Are you sure that the limit is shared by all workers?

> When the accumulated cost reaches a limit (specified by vacuum_cost_limit), > the process performing the operation will sleep for a short period of time, > as specified by vacuum_cost_delay. Then it will reset the counter and > continue execution.

\-- [https://www.postgresql.org/docs/9.6/static/runtime-config- re...](https://www.postgresql.org/docs/9.6/static/runtime-config- resource.html#RUNTIME-CONFIG-RESOURCE-VACUUM-COST)

Since every worker is it's own process, I assume that the limit applies to each worker, and overall vacuum throughput increases when using more workers.

That being said, your observation about the autovacuum_vacuum_cost_limit and autovacuum_vacuum_cost_delay being potentially too low may still apply.

Your throughput estimate for 8 MB/s (I think per worker) only applies for the vacuum_cost_page_hit (default 1) case. For vacuum_cost_page_miss (default 10), the throughput would only be 0.8 MB/s.

If my understanding of the way a page miss is defined is correct, this will be the common case unless one has increased shared_buffers from it's default of 128 MB to something much larger. That's b/c pg will assume a "page miss" if the page is not in its shared buffer, even if it's in the host OS page cache.

I might be wrong about the caches, so I'd love for somebody with more insights to confirm/reject these assumptions.

 _Edit:_ Seems like your 8 MB/s estimate is based on the vacuum_cost_page_miss case. But still, that's pretty low :)

<comment><USER7> I am pretty sure. Let me quote the official docs from [https://www.postgresql.org/docs/9.6/static/runtime-config- au...](https://www.postgresql.org/docs/9.6/static/runtime-config- autovacuum.html#GUC-AUTOVACUUM-VACUUM-COST-LIMIT):

</comment></comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>===== autovacuum_vacuum_cost_limit (integer)

        Specifies the cost limit value that will be used in automatic VACUUM operations. If -1 is specified (which is the default), the regular vacuum_cost_limit value will be used. Note that the value is distributed proportionally among the running autovacuum workers, if there is more than one, so that the sum of the limits for each worker does not exceed the value of this variable. This parameter can only be set in the postgresql.conf file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters.

</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>=====

So, that's pretty clear, I think. In practice the balancing happens in autovac_balance_cost() function. The autovacuum workers communicate through a chunk of shared memory, and cost rebalancing is one of the things doing that.

Regarding the limits - yes, the 8MB/s is based on vacuum_cost_page_miss=10, which means a read from the OS. Per second, there's the worker process wakes up every 20ms, so 50x per second. As each round has 200 tokens, this means 10.000 tokens per second. Assuming all of them are reads from disk/OS, we can do 1000 of them (because the cost is 10), Which is 8kB x 1000 = 8MB/s reads. OTOH writes are about twice as expensive, leaving us only 500 writes, i.e. 4MB/s.

<comment><USER8> I completely missed that.

So yeah, your comment is spot on. The default cost settings seem way too low. I'll certainly try tuning them for our postgres servers :).

Thanks!

</comment></comment><comment><USER9> Unreadable in portrait on mobile?

How does one even begin to think that blocking users from scrolling horizontally on your site is a good idea?

<comment><USER10> Indeed. overflow: hidden on the parent combined with float: left on the main text - it's bizarre. Why would someone take the whole content of the page out of the main flow like that?

It's also using some kind of javascript callbacks to get responsive placement of the header, rather than media queries.

</comment></comment><comment><USER11> What ive found is that if wih the default settings, if you're running over 150 million inserts/updates/deletes a day, your database is going to halt because of transaction wraparound errors. autovacuum simply cant catch up.

the solution for me was to batch inserts and updates in one transaction.

</comment><comment><USER12> Site text gets cut off on mobile</comment>


Study: High Frequency Trading reduces volatility, enhances price discovery - <AUTHOR> http://www.google.com/url?sa=t&source=web&cd=3&ved=0CBoQFjAC&url=http%3A%2F%2Fwww.futuresindustry.org%2Fptg%2Fdownloads%2FHFT_Trading.pdf&rct=j&q=%22High%20Frequency%20Trading%20and%20its%20Impact%20on%20Market%20Quality%22&ei=5oqLTNKFMoSdlgf2rIVi&usg=AFQjCNG8fXG9NBOKYcEPysY_-pzF07zS4g

<comment><USER2> FYI: It links to a PDF.

EDIT:

Google Docs Viewer URL: [http://docs.google.com/gview?url=http%3A%2F%2Fwww.futuresind...](http://docs.google.com/gview?url=http%3A%2F%2Fwww.futuresindustry.org%2Fptg%2Fdownloads%2FHFT_Trading.pdf)

Front page:

      HIGH FREQUENCY TRADING AND ITS
      IMPACT ON MARKET QUALITY

      Jonathan A. Brogaard ∗
      Northwestern University
      Kellogg School of Management
      Northwestern University School of Law

      July 16, 2010</comment>


CMOV a Bad Idea on Out-of-Order CPUs - <AUTHOR> http://ondioline.org/mail/cmov-a-bad-idea-on-out-of-order-cpus <comment><AUTHOR> And this from "Intel® 64 and IA-32 Architectures Optimization Reference Manual":

Assembly/Compiler Coding Rule 2. (M impact, ML generality): Use the SETCC and CMOV instructions to eliminate unpredictable conditional branches where possible.

* Do not do this for predictable branches.

* Do not use these instructions to eliminate all unpredictable conditional branches (because using these instructions will incur execution overhead due to the requirement for executing both paths of a conditional branch).

* In addition, converting a conditional branch to SETCC or CMOV trades off control flow dependence for data dependence and restricts the capability of the out-of-order engine.

* When tuning, note that all Intel 64 and IA-32 processors usually have very high branch prediction rates. Consistently mispredicted branches are generally rare. Use these instructions only if the increase in computation time is less than the expected cost of a mispredicted branch.

</comment><comment><USER2> This is one of my favorite Linus posts, because it gives you a great deal of insight into how a modern out of order pipeline works in the context of one specific instruction. It's unfortunate RWT has such a shitty search feature, but it's worth perusing their forums to read Linus's criticisms of IA-64. He points out that the extensive predication in IA-64 makes an out of order implementation much more complicated.

</comment><comment><USER3> I never got why cmov was 2 µops (and thus 2 cycle latency) on Intel CPUs. On AMD (and modern ARM), it's 1 µop with 1 cycle latency and can be issued to any ALU. Which makes it a win for a single conditional mov in pretty much anything short of microbenchmarks with 100% predictable branches, as in Linus's test case.

Also setcc is abysmally stupid in leaving the high 3/7 bytes of the register unmodified - what were Intel's engineers smoking?

<comment><USER2> A lot of features of Intel CPUs can be explained by the fact that the Pentium Pro (and basically every Intel CPU after that until I believe Sandy Bridge), uses a basic architecture that supports reading only two input operands for each instruction in a single cycle. CMOV has to read the flags register, the source register, and the old value of the destination register.

See: [http://newsgroups.derkeiler.com/Archive/Comp/comp.arch/2013-...](http://newsgroups.derkeiler.com/Archive/Comp/comp.arch/2013-04/msg00093.html).

</comment></comment><comment><USER4> Note that Intel added CMOV when they were already on out-of-order CPUs.

The link doesn't show what the context of the discussion is, but its intended application is the case where Linus says it does work:

" \- if you KNOW the branch is totally unpredictable, cmov is often good for performance."

You see this kind of data dependent branches in eg. compression code where the unpredictability is inherent.

<comment><USER5> Context: [http://thread.gmane.org/gmane.linux.kernel/480224/focus=4803...](http://thread.gmane.org/gmane.linux.kernel/480224/focus=480366)

</comment></comment><comment><USER6> P4 micro-optimization. ... what the heck are people doing here that this is relevant to their interests???? :P

CMOV on current CPUs is quite fine— when it doesn't make a dependency mess, when the alternative is a poorly predicted branch, and when the dual execution is cheap / can be hidden.

<comment><USER7> The article was written in 2007, when Intel's latest CPU was the Core 2 Duo. Lots of people still had P4's back then.</comment></comment>


Apple is sharing your face with apps now - <AUTHOR> https://www.washingtonpost.com/news/the-switch/wp/2017/11/30/apple-is-sharing-your-face-with-apps-thats-a-new-privacy-worry/ <comment><USER2> > Still, it wasn't hard for me to find holes in Apple's protections.

> The MeasureKit app's maker told me he wasn't sensing much extra scrutiny > from Apple for accessing face data.

> "There were no additional terms or contracts. The app review process is > quite regular as well—or at least it appears to be, on our end," Khanov > said. When I noticed his app didn't have a privacy policy, Khanov said Apple > didn't require it because he wasn't taking face data off the phone.

I don't see how that's a major "hole" in protections. It's an API the app is using, and Apple reviewed the code and didn't see the data going off device — how is this malicious?</comment>


Excel spreadsheets turned into video game - <AUTHOR> http://www.bbc.co.uk/news/technology-21938171

<comment><USER2> This is very interesting as it reminds me of my youth (and probably also the experiences of other people): After the obligatory QBASIC dabbling, my first experiences as a child with GUI design and programming was through macros and the VBA Editor of MS Office, which, at the time, had a good offline help system. Albeit not having any formal knowledge, creating some simple (mostly text-based and excel-cell-based) RPGs was possible thanks to that.

</comment><comment><USER3> Shame he has not made the code openly available.

Also, I wonder what dependencies are required so that it does not work on Excel 2003?</comment>


You're nothing more than a mass of habits - <AUTHOR> http://blog.willjennings.net/6/youre-nothing-more-than-a-mass-of-habits/

<comment><USER2> Vimes is described in Pratchett's Guards! Guards! as a "skinny, unshaven collection of bad habits marinated in alcohol".

</comment><comment><USER3> "Watch your thoughts, for they will become actions. Watch your actions, for they'll become... habits. Watch your habits for they will forge your character. Watch your character, for it will make your destiny." Margaret Thatcher

<comment><USER4> Buddha had summarized that very succinctly "What we think, we become " :-)

<comment><USER5> "You'll go where you're looking. Don't look down or you'll fall over."

Motorcycle training

</comment></comment></comment><comment><USER6> You've just discovered this? Honestly, Aristotle's ethics is all about habits: keeping and nurturing 'good' habits (virtues) and preventing 'bad' ones (vices)...

So... welcome to maturity.

<comment><USER7> You are right, I think he is carried away by his experinces. Actually, Book 'The power of Habit' (which I am also reading) is more about how habit forms and how to change/replace any Habit (from bad to good), whether it is Individual, Organization or Society. It is 'how' that is important here.

For Individual part, I am planning to launch an app for addicts so that they could also get benefit from same principles. I believe in that cue, routine, reward cycle. But, For creating app I need to do my own research for individual cases.

</comment></comment><comment><USER8> I also discovered that forming habits doesn't mean it takes 21 days or 30 days or whatever nice round number people like to trout. To me, by 21 days to 30 days, something I am trying to make a habit is well on its way to becoming a habit.

I managed to add a bunch of habits such as doing math at khanacademy, writing 500 words a day, measuring data points on my body such as blood sugar, weight, steps, sleeping time, pulse rate, and blood pressure.

</comment><comment><USER9> nice post BUT: i brush my teeth because i want to keep them clean, minus the tingly feelings since my tooth paste doesn't have the chemicals, and according to your technique, you are reducing us to this reward model which actually is detrimental to our psychological progress as human beings, i don't need a cue to depend on when i want to do something, i know what i want to do and i go do it, using your technique you are perpetuating distrust in our own minds and un-confidence in our thinking process by relying on placing cues in our immediate environment to trick us into doing things, i sense a habit of distrust of our abilities coming on and slithering through our psyches, you want to make people feel confident about their decision processes not insecure about relying on external cues, i mean i tend to think we are slightly more advanced than lab rats, but then again that is why advertising is so successfull, because we really do operate on this reward model and most of us don't know what we need or want and think some third party might

<comment><USER10> I agree the tooth brushing example was detrimental to the point of the post.

You could also say, I put on my underwear after drying off merely out of habit and the underwear cartels make their cottony underwear so smooth merely to provide a pleasant reward for my ass cheeks. But, in fact I put on my underwear for a variety of practical reasons and the smoothness is not really a reward.

The snack break example was more to the point. That's a voluntary thing that becomes routine, but could be skipped with no social repercussions.

</comment></comment><comment><USER11> I'm not sure "mass" is the appropriate collective term for habits. Perhaps "collection" serves better here.

I'm more than my habits, Aristotle aside. I'm an economist and a programmer and a father. The last causes disruptive change to habits more often than not.

</comment><comment><USER12> A mass of habits and addictions, so behavioristically pessimistic yet quite true. I think a more useful question would be: what habits should you acquire?

</comment><comment><USER13> No, I'm not.

</comment><comment><USER14> You're especially nothing more than a mass of habits if one of those habits happens to be attempting to render all life nothing more than a mass of habits.

<comment><USER15> You're actually a big sack of chemicals, mostly water. It's actually remarkable that those chemicals manage to form such complex and remarkable things as habits.

<comment><USER14> You've been sold a lie.

There's a reason it's called Gene EXPRESSION.</comment></comment></comment>


Ask HN: What do you dislike most about HackerNews? - <AUTHOR>

And if you're up to it, what do you like most? <comment><USER2> A better UI...highlight the poster's comment...categorize posts for quick focused reading...simple search...read/unread indicator...and a few more....

</comment><comment><USER3> How everyone hides the true knowledge. That's why people worship "the bingo guy" he's one of the few that disclose.

</comment><comment><USER4> Unknown or expired link.

</comment><comment><USER5> Anonymity of up- and downvotes, and the subsequent distrust.

</comment><comment><USER6> Too F*ing addictive

<comment><USER7> I agree. I have gained back some very productive hours be enabling the procrastination setting in my profile.

</comment></comment><comment><USER8> The notion that downvotes = disagreement.

</comment><comment><USER9> Lack of the ability to filter out irrelevant stories and the people that upvote them.

</comment><comment><USER10> Irrelevant "Ask HN" posts.

<comment><AUTHOR> What is relevant and irrelevant in your view?</comment></comment>


Billionaires' Row and Welfare Lines - <AUTHOR> http://www.nytimes.com/2013/10/26/opinion/blow-billionaires-row-and-welfare-lines.html?src=me&ref=general <comment><USER2> What does a billionaire do after buying a $90M apartment in Manhattan? Remodel it of course. Lots for work for carpenters, electricians, plumbers, interior decorators, and all the people that support and supply them. I don't see this as a bad thing; it's a good thing.

<comment><USER3> Yes, that is a good thing. The bad part is that they aren't using the other 99.99..% of their wealth, essentially taking everyone else's labor and ending the cycle of trade that would otherwise help keep an economy going.

And that's not to mention broader macroeconomic issues which are more worthy of essays than HN comments.

<comment><USER4> Thanks to less than 100% reserve requirements on banks, the money the rich keep in American banks is theoretically reinvested through loans back to various enterprises.

The problem arises when the banks don't lend the money and just sit on it... or when companies like Apple siton their huge cash reserves...

To fix this we must boost aggregate DEMAND. Investors and banks give money to businesses when they see demand.

<comment><USER5> Apple has no cash reserves in cash. Even bank deposits are invested back into the economy.

<comment><USER4> Right, the real issue is with the lenders. I would argue that giving money directly to the people so they can send price signals back into the economy -- via Basic Income or a Negative Tax -- is much more effective at increasing aggregate demand.

</comment></comment></comment></comment></comment><comment><USER6> Money from quantitative easing goes to the wealthy and connected first. The rest of the country doesn't see it until its value has been inflated away, which is why you'll see the wealthy benefit from the recovery and the poor stay exactly where they are.

</comment><comment><USER7> Just look at those comments. The readers of the NYTs place the blame for poverty squarely on two groups: The rich, and Republicans. The first are guilty of "not sharing"\--which implies they (the readers) believe in a zero- sum economy. The latter are guilty for not wanting higher taxes, ie, for not _forcing_ the rich to share. So, a single fallacy rules their world view.

<comment><USER8> >> Just look at those comments

ugh, no thanks. I find the comments sections in news articles destroys my faith in humanity even more than youtube comments these days....

</comment></comment><comment><USER9> I'm curious if the author bothered to check what percent of most expensive NYC apartments are bought by Americans (unlike Russian or Middle East kleptocrats).

</comment><comment><USER10> Many of these billionaires are undeserved and unearned billionaires because of the carried interest tax dodge. That needs to go ASAP. Over five years into a Democrat presidency and all these tax issues (low taxes on dividends, double irish corp tax dodge, etc) that protect the uber wealthy persist.

It's not about taxing the wealthy, it's about fairness. $85K earned by a teacher, $150K earned by a developer, $20M earned by Brad Pitt and $200M earned by Steve Schwarzman should all be taxed the same way.

And the same goes for corp earnings. F Apple! Pay your taxes.

Top 10 Private Equity Tax Loopholes [http://dealbook.nytimes.com/2013/04/15/the-top-10-private- eq...](http://dealbook.nytimes.com/2013/04/15/the-top-10-private-equity- loopholes/)

<comment><USER11> Without addressing the issue of tax loopholes in general, there is a logical rationale for lower taxes on capital gains (for Schwarzman, Buffett & co):

\- It's a double tax, as money that was invested had already been previously taxed.

\- It does not account for inflation. If an investment grows only with inflation, capital gains taxes still need to be paid on that growth.

<comment><USER12> A capital gains tax is not double-taxation, as the tax applies only to "gains" on a capital investment, and these gains have not yet been subject to tax. Moreover, most capital investments are made using _untaxed_ amounts (i.e., "reinvested" income), as part of transactions designed to avoid paying taxes.

A capital gains tax is not intended to account for inflation--the persons that pay the capital gains tax (companies and wealthy individuals) are least subject to inflation. The lower rate was intended as an incentive to make capital investments in businesses. Unfortunately, due to the way capital assets are defined (or rather, is _not_ defined) in the tax code, the lower rate has instead resulted in excessive investment in real properties, illusory assets (i.e., derivatives), and other passive investments rather than in businesses.

<comment><USER13> Say you have a business worth $100k. It earns another $100k and pays 35% corporate tax on it. The rest goes into the bank. The company is now worth $165k. If you sell the company for $165k, you pay cap gains taxes on the $65k gain - at 20% qualified cap gains rate, you walk away with a gain of $52k.

That's what double taxation means. You paid taxes twice on the earnings of $100k.

[edit: it might shock some of you to discover that this is a simplified example to illustrate the point.]

<comment><USER12> I don't think you understand what double taxation means. Double taxation refers to a specific _item_ of income.

You own a company, X. It earns income of 100 doing whatever. That income is taxed. This is the first level of taxation. The company then distributes _that income_ as a dividend to its shareholder, you. That dividend is income _to you._ Thus, it is subject to tax again. This is the second level of taxation. If you had performed the income-generating activity directly (i.e., not through the company), it would not be subject to this second level of tax. However, at the same time, the use of the corporate entity provides significant legal and tax benefits. Thus, the double taxation is _mitigated_ but not eliminated.

Another example: Company X, based in the U.S., does some business in France. France taxes that income. That is the first level of taxation. The U.S. also taxes that income, due to its worldwide taxation system. That is the second level of tax on the _same_ income. In this particular instance, we have a treaty with tax to eliminate the double taxation of that same income. (This is not true of all countries, for example, we don't have a tax treaty with Taiwan.)

In your example, you ignore the basic system of US and EU capital gains taxation. When you sell a business, you are generally taxed based on the difference between [sale price] subtract [your "cost basis"] in the business. (Cost basis generally means the amount you paid to acquire the shares, or which you contributed to the business.) It is irrelevant that your business was worth $100k before it made another $100k--the tax code doesn't look at intermediary valuations, and it doesn't care about earnings when determining the tax on the sale of a capital asset. What matters is whether you have a "cost basis" in your shares of the business. If you acquired your shares for $0 (for example, you contributed your labor to earn those shares), then upon selling the business in your example you would recognize capital gains of $165k, not $65k. Usually, capital gain from the sale of a business relates to "goodwill" (i.e., brand value) rather than cash from earnings (and for property or other capital assets, capital gains are usually due to simple appreciation.) Double taxation is not usually a problem with capital assets, so the capital gains rate does not reflect a discount to remedy double taxation. Rather, capital gains rates are discounted to encourage investment in capital assets.

<comment><USER13> _If you acquired your shares for $0 (for example, you contributed your labor to earn those shares), then upon selling the business in your example you would recognize capital gains of $165k, not $65k._

Yes, I was assuming you purchased at $100k to illustrate the cost basis. I should have been more clear on that point.

If you want to argue that double taxation is justified as the price of limited liability, go ahead. But it's silly to compare the capital gains rate to the income tax and then ignore the corporate tax rate. Combined they amount to a lot more than personal income taxes. This is why the wealthy contribute such a disproportionate amount to the US treasury.

<comment><USER14> > the wealthy contribute such a disproportionate amount to the US treasury.

Overall US taxes (from all sources) are approximately flat taxes, if considered relative to wealth, as you seem to be doing. The wealthy contribute roughly the same share of their wealth to the treasury as the less wealthy do. The 90th-percentile-and-above of richest Americans own about 75% of the country's assets in aggregate, and pay about 75% of the country's taxes in aggregate.

</comment></comment></comment></comment></comment></comment></comment><comment><USER4> Automation and outsourcing

<comment><USER15> When was the last time someone from a financial firm on Wall Street went to jail for unscrupulous/illegal actions? Why are financial service organizations allowed to rent seek against the rest of productive society with impunity?

<comment><USER16> Bernie Madoff, who got away with massive fraud for decades.

And, oh yes, that former Goldman Sachs high-frequency-trading programmer (who may have only taken open source code).

<comment><USER17> The programmer got acquitted a year and a half ago:

[http://nypost.com/2012/02/17/ny-appeals-court-orders- acquitt...](http://nypost.com/2012/02/17/ny-appeals-court-orders-acquittal- for-goldman-sachs-programmer/)

<comment><USER16> And was soon thereafter arrested on state charges (the first charges were federal) which he is currently fighting. One bright spot: Goldman was just ordered to pay legal fees for his first trial, as their by-laws say they are required to pay legal costs for officers charged for acts taken as part of their employment, and he was a vice-president.</comment></comment></comment></comment></comment>


Red Hat ditches MySQL, switches to MariaDB - <AUTHOR> http://www.itwire.com/business-it-news/open-source/60292-red-hat-ditches-mysql-switches-to-mariadb

<comment><USER2> I also dumped MySQL and started using and recommending MariaDB in production since i've seen it resolve a lot of my hard fought battles with super complex nested joins and index overloads. Queries that took 4.5s went to 450ms just by dropping in this beauty. From then on I was on the bandwagon. Slow Wordpress site with a ton of plugins that tries to solve everything? Now it can do it within a timeframe thats acceptable. Ok your bottlenecks will still be there somewhat.. abeit less apparent. But it just is faster and scales way more predictable imo with hardware adapted configs.

<comment><USER3> Did you also change the storage engine for a better fit with your data?

</comment></comment><comment><USER4> It's pretty similar to the Hudson/Jenkins situation (also something acquired by Oracle). Kind of sad when the original author has to fork his own project to keep evolving it, but I'm glad they're apparently able to take a considerable amount of users with them.

We also switched to MariaDB in production a while ago. Was absolutely seamless.

<comment><USER5> _Kind of sad when the original author has to fork his own project_ But pretty awesome that Free Software gives him (or her) the right to do so. It used to be you abandoned your code when acquired.

</comment></comment><comment><USER6> Not surprising since MariaDB is a drop in replacement for MySQL; daemon names don't even change.

Not sure how the original developers can create a fork of a product they sold for 1 billion? Oh well, better in their hands than Oracle's.

<comment><USER7> > Oh well, better in their hands than Oracle's.

One might think that but it has surprisingly not been true.

Oracle, already the owner of InnoDB, now owning the entirety of mysql has been able to stop fighting with Sun and push out awesome features at a high rate. Just to name a few since Oracle took over:

* Big performance improvements for multi-core.

* Performance Schema

* Full-text engine for InnoDB

* Thread pools

* Improved support for SSD

* Online schema updates

MariaDB forked at 5.5 and is going to be missing lots of really nice features. They can back port some of it but they aren't going to be able to keep up very well. They have their own implementation of some of these features which, given their small user base, I do not trust as much as the versions implemented in MySQL proper.

Also given that MariaDB was forced to merge with SkySQL to survive I just don't see a bright future for MariaDB as long as Oracle continues to improve MySQL like it has been.

<comment><USER8> > given their small user base

All the distros are switching to MariaDB.

<comment><USER9> ... Which means nothing in and of itself. Where's the money coming from? If you say nothing else for Oracle, say that they know where their bread's buttered.

</comment></comment></comment></comment><comment><USER10> When we first started to worry about mysql, we looked at the alternatives and chose Percona. However, if this is in the base repo...

<comment><USER5> Percona are part of the MariaDB foundation, though so far they still seem to be based off of Oracle's MySQL sources.

Red Hat's announcement wasn't much of a surprise (Fedora had adopted MariaDB some time ago, as has most of the rest of the known universe). A lot of enterprises rely on Percona for support and consulting, however, and should they make a switch, that's likely lights-out for MySQL. Though there's a low probability Oracle would consider transferring the name to a community foundation outside its control (the codebase really doesn't matter as it's GPLd) and the name could continue forward.

It's a pretty powerful message of how branding isn't the end-all in Free Software.

</comment></comment><comment><USER11> In somewhat related news, I wonder how much longer MariaDB will be a "free for all" given Monty's view on open source and open development seems to have changed:

Fluffy summary:

[http://readwrite.com/2013/05/31/mysql-co-founder-wants- you-t...](http://readwrite.com/2013/05/31/mysql-co-founder-wants-you-to-pay- up-for-open-source)

Original interview:

[http://www.zdnet.com/open-source-its-true-cost-and-where- its...](http://www.zdnet.com/open-source-its-true-cost-and-where-its-going- awry-by-monty-widenius-7000016024/)

</comment><comment><USER12> The move from MySQL to MariaDB is one of the easiest decisions an admin can make. I expect it to obliterate MySQL in short time.

</comment><comment><USER13> Also mentions MongoDB making it into RHEL 7... pretty interesting as well, although I can't seem to find any other sources for that currently.

<comment><USER14> They've announced [1] that RHEL 7 will be based on Fedora 18. Based on the package updates list for mongodb [2], it looks like it will using MongoDB version around 2.2.4. The source should be available via Fedora's normal repos.

[1]: [http://www.h-online.com/open/features/Red-Hat-s- RHEL-7-roadm...](http://www.h-online.com/open/features/Red-Hat-s- RHEL-7-roadmap-1631791.html) [2]: [https://admin.fedoraproject.org/updates/mongodb](https://admin.fedoraproject.org/updates/mongodb)

</comment></comment><comment><USER15> The interesting question at this point is who is still using MySQL rather than one of the alternatives?

I'm sure there are many that use the distribution default but I wonder if anyone is actively choosing MySQL still.

<comment><USER16> Twitter uses MySQL for all their data. They forked it and made tons of improvements. Here's their blog [https://blog.twitter.com/2012/mysql- twitter](https://blog.twitter.com/2012/mysql-twitter) and here's the project [https://github.com/twitter/mysql](https://github.com/twitter/mysql)

<comment><USER17> That's a fork, not sure it counts as using mysql unless they largely follow upstream...

</comment></comment></comment><comment><USER18> Do the current 3rd party tools work with MariaDB - SqlYog, etc.?

<comment><USER19> Yes existing MySQL tooling works with MariaDB. The wire protocol is still the same so existing MySQL drivers work to connect to MariaDB as well.

The reverse situation is also useful. The MariaDB client drivers can connect to both MariaDB and MySQL instances yet are licensed LGPL (vs GPL for the MySQL client drivers) which is great for closed source commercial products (and general license compatibility).

We use it in the in house deployed version of our product (database client in your browser[1]) and will be switching the cloud hosted version over to it soon as well. No issues with it so far.

[1]: [http://www.jackdb.com/](http://www.jackdb.com/)

</comment></comment><comment><USER20> I use MariaDB in production. It was totally trivial to drop it in as a MySQL replacement and usually gets slightly better performance. Not to mention not relying on Oracle who one can imagine might not want to give MySQL as much love as it needs given their other database. So I can see why Redhat would want to do that.

As for the name, MySQL was named after Monty's daughter My. MariaDB was named after another daughter Maria ([http://en.wikipedia.org/wiki/Michael_Widenius](http://en.wikipedia.org/wiki/Michael_Widenius)). I think its sort of sweet. Maybe someone has a kid called Postgre? ;-)

<comment><USER21> I wonder how My feels right now?

<comment><USER22> At being slower than Maria? Or being completely interchangeable with her? Family dinners must be awkward :)

On the other hand, both Maria and My are going to be celebrities at any computer science department/startup incubator.

</comment></comment></comment><comment><USER23> Not judging the book by it's cover, but _MariaDB_ doesn't do the DB any justice with this crappy name.

<comment><USER6> Ya, I don't like the name either, I think he named it after his kid?

<comment><USER24> Yes, well, he named MySQL after a daughter called My, too.

</comment></comment></comment><comment><USER25> It is not that MariaDB is any better, it is that Oracle is much bigger.)

Edit: It is all about InnoDB engine, which is _now_ developed and fixed by Oracle. Others, notably Percona, have its own set of patches which adds some features to what Oracle releases, while MariaDB is _mostly_ re-branding.

<comment><USER26> MariaDB right now has working Multi-Source replication and GTID failover in the MariaDB 10.0.3+ alphas.

They are also working on a new table discovery engine, which will bring Transactional DDL to MariaDB, this to me makes MariaDB far more superior to MySQL. They are innovating, and they are open about it. [https://mariadb.atlassian.net/browse/MDEV-3808](https://mariadb.atlassian.net/browse/MDEV-3808)

Oracle have only innovated on the niggles of Mysql, like the unencrypted ~/.my.cnf files to appease their "Enterprise" customers.</comment></comment>


Ask HN: How did you get the attention of the press when you launched? - <AUTHOR> <comment><USER2> I have a few tips:

1) I like the media and keep track of journalists. Part of this is getting to know who is writing where (freelance and full-time) and what they're writing about.

2) When I write pitches, I customize them to the individual writer. If you send generic pitches, you've already lost.

3) I don't use the word 'exclusive'.

4) I treat a pitch like it costs the soul of my first born.

5) When I get coverage, I write a thank you note.

6) I'm always available to explain technical concepts in a languages journalists understand. And, I never request credit.

Basically, know who you're pitching, write good pitches and don't be a dick. Nobody got into journalism to serve as your personal marketing force.

</comment><comment><USER3> Perhaps not the answer you are looking for, but the super successful launches I've seen have built press and public interest long before launch day.

I've never been a part of the marketing side, so I can't tell you how, sadly.</comment>