Hacker Newsnew | past | comments | ask | show | jobs | submit | bza's commentslogin

> As for writes, a new key could go anywhere in the index

This forces index tree rebalancing to occur on many (even most) writes, which is hugely detrimental to performance.


Which tree structure is this for? Many tree structures (e.g. the classic red-black tree) perform much better (doing less rebalancing) for randomized inserts than for ordered ones.


This technique is unreliable in practice, and the author's discussion is confused.

First, their explanation doesn't make sense. They're supposing that there's some determinacy in the order in which a matcher can be expected to examine the different possible matches. But that's provably not the case: if it were, then deterministic and non-determinsitic finite automata would be inequivalent.

But the technique in question does seem to require some determinacy as to which of several alternatives will match against a string. Where does that determinacy come from? The semantics of the alternation operator (the '|') as usually formulated don't specify any preference among alternations. For that reason, POSIX additionally requires that a matcher return the longest possible match (and if there are several such, the leftmost is what must be returned). Where you do find an explicit guarantee concerning which of several different possible ways of matching will be preferred, it's almost certainly because the engine is aiming at POSIX compliance.

Such compliance has a significant cost, though, as it requires the matcher to consider all possible matches (in order to find the largest). For that reason, most regex engines forego strict POSIX compliance and only guarantee that some match will be returned if one exists, not that that match will be the leftmost longest. Some engines offer the option of requesting strict POSIX behavior, but the default will always be to eagerly return the first match encountered (and recall the point above that there provably can't be a guarantee about the order in which matches are encountered, in general).

You should never do this in production code unless you're sure that your matcher is POSIX-compliant.


The phrase to google is "elective amputation".


Thanks that was informative.


It's not physics woo; the way the OP's using "duality" is common among mathematicians and physicists. The different types of duality listed in the physics and math sections of the Wikipedia article you linked to are thought of, by typical practitioners in these areas, as all being instances of a more general phenomenon. That's why these various things end up being called dualities.

That generic kind of duality is well described in the first sentence of [1], and the OP's explanation of a duality as "a connection between two things where the properties of one defines the properties of the other" is pretty obviously an attempt to convey, to a lay audience, that sense of duality.

[1] http://en.wikipedia.org/wiki/Duality_(mathematics)


It's not physics woo; the way the OP's using "duality" is common among mathematicians and physicists.

You seem to be right. I must backtrack and say, "One learns something new everyday!"


> This is the trade off we pay for lower taxes.

Why would mandating that companies provide meaningful maternity or paternity leave require higher taxes? This topic doesn't have much to do with fiscal policy.


If a company is required to provide paid leave, then that means they are required to pay a person money and aren't getting anything in return for that money. In other words, you're paying a person not to work. It essentially acts the same way as a tax.


This already happens all the time for salaried employees, they often receive vacation time that doesn't reduce their yearly salary and this works perfectly fine for those roles. This isn't a tax scenario, this is more of a compensation adjustment for workers.


Vacation is still an option for employers, not a requirement. If the government required vacation time and a company did not previously offer vacation time, it's net-effect would still be an additional tax.

I'm not making a moral argument here -- actually find it rather immoral for a company not to offer adequate time off. I'm just saying the net-effect of a government forcing a company to pay more money than it normally would is a tax.


Whether a system is tightly coupled is independent of whether it's implemented as a single process. Objections to systemd as monolithic, as constituting a single point of failure, etc. are based on its being a tightly coupled set of components.


That systemd is tightly coupled is a valid objection, but "single process" has a specific meaning in this context and it implies a much worse design, with every component potentially taking down PID1. As far as I know, this is not the case in systemd.


"most open source tools and frameworks were developed for OSX, then ported to Windows or Linux"

gcc?


The $1.5 billion figure given in the article is already in today's dollars.


JP Morgan was far richer than that in his day. It's disingenuous at best.


It is also completely wrong.


The current policy (as enunciated by Stefan Monnier, who took over as maintainer from RMS a few years ago) is for new packages to be added to the package archive unless there's a very strong argument for their providing core functionality. (Packages that already ship with Emacs are unlikely to be removed from the core, though.)


I've heard it's actually being considered to move org-mode and eshell into packages, provided the release process can be ammended to generate releases which include packages by default.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: