HNHacker News
TopNewBestAskShowJobs

drewcrawford

4,834 karma · joined June 13, 2008

AI tooling and systems/SDK engineer · Rust, WebAssembly, Swift/Apple platforms · wasm-bindgen contributor · building AI Bot Mafia (botmafia.games) · sealedabstract.com · github.com/drewcrawford
submissionscomments
drewcrawford··on PostgreSQL partitioning explained
I'm no database expert, but I don't think the features you want are possible, really. To get a unique constraint over multiple tables you'd have to lock them all, and if you lock them all you have lost the performance benefit of partitioning tables.

There are things you could do, like key on a GUID, that would ensure each insert has a unique ID in a lock-free way. But the semantics of that are going to be very different from a traditional autoincrementing ID.

drewcrawford··on Driver caught using cell phone jamming device
Well like I said, I don't think anybody's coming after you for building a faraday cage for yourself.

If you do it in a movie theater though, it presents a safety issue, and that's a negative externality.

drewcrawford··on The cost of Linux's page fault handling
We have a different prior expectation of the utility and feasibility of action B. In my view, Linus is uniquely suited to do something useful here, and his chance of success is high. In your view, Intel is already doing the best it can, and his likelihood of success is low. Our positions follow.
drewcrawford··on The cost of Linux's page fault handling
So, that is actually an interesting thought experiment, thanks for that.

However I'm not sure it is directly applicable here. There are two courses of action that could solve this problem:

A, an action that improves kernel builds

B, an action that improves several workloads

For A and B of similar cost, it makes sense to do action B in preference to action A.

Your argument speaks to A being of positive utility, but given a finite knapsack of effort smaller than the set of possible actions that fit in the knapsack, a greedy algorithm that places any positive item into the knapsack is not optimal.

drewcrawford··on Driver caught using cell phone jamming device
I'm not a lawyer but I do read FCC regs for fun...

A passive faraday cage on your own property that's not open to the public probably isn't an issue. As far as size goes you would be subject to local building codes of course.

Once you get into active jamming however that requires you to transmit and to transmit you need a license from the FCC. The right to transmit anywhere in the US is under the FCC's jurisdiction and doesn't have anything to do with the landowner. It may seem strange to divorce airwave rights from property rights but it's not that different from water rights or mineral rights or airspace rights, which have a long legal history of being divorced from landowner rights.

When you open your faraday cage to the public it gets a little tricky too, because if a "licensee" has the legal right to be somewhere according to you and the legal right to transmit or receive according to the FCC then you can't really legally prevent them from doing both at the same time. This idea, which is called the "OTARD rule" in some situations, is interpreted to force landlords to allow tenants to install WiFi and satellite equipment on rented property for example.

There probably is an FCC rule that would prevent stores or movie theaters or similar public places from jamming via a Faraday cage, but since actively jamming is cheaper I am not aware of any actual instances of this type. So in that sense it's a test case, but I'm reasonably certain which way it would go.

drewcrawford··on Driver caught using cell phone jamming device
This is like trying to exert control over the airspace (e.g. for airplanes) on your property. It is completely unworkable.
drewcrawford··on App Links: Link Anywhere on Mobile
Sure. So let's say you run Skype. Currently the way skype works is to add somebody, they have to find out their Skype name, tell it to you, you receive it, they type it into a search box, pick from a list, then wait for the other person to confirm. That is, shall we say, terrible.

Deep app links would let you just send somebody skype://user/jim89 or better yet skype://invites/9384jr83 which provides a massively better on boarding experience.

Not only that, but I am working on an app where you don't even have a username, so there's nothing to type in a search box. A URL-based scheme like this one allows you to eliminate an entire field and the whole "create an account" step.

drewcrawford··on Don't Deal With It, Fix It
While this is completely true, it is itself a bug, that we should fix. We shouldn't live in a world where a programmer's normal expectation is her patch sits in limbo for a long time and then is rejected.
drewcrawford··on AT&T's 'Expansion' of 1 Gbps to 100 Cities is a Big, Fat Bluff
Your source states that AT&T spent "0.8 cents" "of each dollar of revenue" on R&D. Secondly, if you dig into the source [1] of your source, you find that R&D spending for North American telecom companies in 2013 are dead last against every other industry as a percentage of revenue. I renew my claim that "basically none" R&D spending is a fair and accurate description.

> AT&T is rarely the only wireless or telecom provider in any given market

That is technically true, but I would paint the same facts as "approximately 96% of the population has at most two wireline providers". [2] This is an optimistic estimate: "the data used here do not provide adequate information on price and performance to determine if multiple providers in a given area compete head-to-head".

> If you want to have a market, then you can't regulate rates of return.

I don't disagree with you there. I think where we disagree is that you think a competitive market for wireline broadband in the US in 2014 is a possible scenario. In my mind, the regulated monopoly (or public utility) is the only viable model.

[1] http://www.strategyand.pwc.com/global/home/what-we-think/glo...

[2] http://books.google.com/books?id=l8oI5rA_NpQC&pg=PA37&lpg=PA...

drewcrawford··on AT&T's 'Expansion' of 1 Gbps to 100 Cities is a Big, Fat Bluff
> According to this reasoning, every year Google is "ripping off" the public to the tune of $6 billion.

This comparison is invalid because Google's business is fundamentally different than a telecom in every relevant dimension. Telecoms sell a commodity product with technology they source entirely from third parties, the only form of product differentiation they have is geographical monopoly, and it is a zero-sum game: basically none of AT&T's budget goes to R&D [1], and all of it goes to operating AT&T's existing business exactly as it is now [2]. Meanwhile Google's core business is basically the opposite in every dimension.

A much better comparison would be to a water company or power company that has "too high" of a profit margin. And of course people do complain about that.

[1] http://www.cnet.com/news/meet-the-group-trying-to-make-at-t-...

[2] http://www.att.com/Investor/ATT_Annual/2013/downloads/att_20...

drewcrawford··on Lavabit appeal confirms original ruling [pdf]
Let's stipulate for the purposes of this thread that he broke the law, was a jerk, and did a morally wrong thing.

None of that is justification to violate the privacy of innocent third parties.

drewcrawford··on OpenBSD has started a massive strip-down and cleanup of OpenSSL
Part of the problem here is that it is very hard to audit something OpenSSL's size. It has 450,000 lines of code. Are you going to skim, let alone audit, a mathematics-heavy codebase of that size? No.

Some of that is OpenSSL's fault, but a lot of it is inherent in implementing a 200-page (before extensions!) standard. GnuTLS is 170 KLOC, CyaSSL is 205 KLOC, and even PolarSSL, commonly thought of as the gold standard in trimming the fat, is 55 KLOC.

If you want to reduce the level of paranoia, you would have to pair down the size and scope of TLS by an order of magnitude. For the record, I support that kind of thing, but you would have to cut a lot of things people actually use, not to mention breaking backwards compatibility.

drewcrawford··on Extend Python 2.7 life till 2020
There are a lot of comments here from people who aren't on the python-dev list and don't really understand what this diff actually means.

The core developers are not required to maintain 2.7 post-2015, and most of them won't be involved in it. That part hasn't changed.

What is happening is that Red Hat is preparing to cut a RHEL 7 release, which AFAIK depending on how much you pay them they support for 13 years. So they will need to figure out how to support 2.7 themselves at least through 2027.

Here is where I am reading between the lines. RH are well within their right to fork Python and keep their maintenance patches to themselves and their customers (Python's not copyleft). But, they are nice guys and so maybe they are willing to upstream their changes at least for awhile if there is still a Python project willing to accept them. Again, this is my speculation based on the ML discussion, not what RH has actually said they will do.

An analogy can be made to Rails LTS, a commercial fork of Rails 2.x that patio11 was involved in [0]. Inevitably somebody is going to step in to support 2.7, and so let's see what we can do to avoid a situation where the only way to keep running 2.7 is to subscribe to RHEL.

Meanwhile, there are some large companies that use 2.7 extensively on Windows (e.g. Enthought, Anaconda) and the thinking goes that somebody can probably be found to produce a Windows installer once in awhile, assuming that Python.org will still host a download.

So really what is happening here is not very exciting. The core committers aren't doing anything different than leaving the project as originally planned. What is happening is that they will leave the lights on in the source control repository and on the FTP server, so as to capture the free labor from people at large companies who have an interest in continuing to support 2.7.

The alternative is that RH and other vendors create proprietary and expensive forks of Python 2.7. That may end up happening anyway, but it will take longer for your employer to notice you should stop contributing your patches back if binaries still appear on python.org and you don't have to ask IT to set up SCM and a bug tracker, etc.

[0] http://www.kalzumeus.com/2013/06/17/if-your-business-uses-ra...

drewcrawford··on OpenBSD disables Heartbeat in libssl, questions IETF
I have read all the TLS WG discussions I can find on this RFC. The picture that emerges for me is that of an inherent, institutional failure in the nature of working groups.

As far as I can tell, there was only one person that raised the "we don't need this" objection (Nikos Mavrogiannopoulos, GnuTLS principal author). He asked for a defense of the feature on three occasions [0] [1], and received a response twice, both responses from the same person. There was no further discussion, so either his objection was addressed or he felt further discussion would be unproductive. I would be interested to know which. GnuTLS does ship with heartbeat disabled, so it's possible Nikos continued to express skepticism about the feature.

However this document was eyeballed by many security experts, who I will not name and shame here, who proofread or made comments or edits to the document, without objecting to the general premise.

It seems to me that, inherent in the nature of a working group, the specific parties who are in favor of the feature will always be better represented than the interests of a wider audience that faces the nonspecific harm that the feature might be implemented poorly and introduce a security vulnerability. Sort of a reverse-NIMBY situation if you like. The software community cannot mobilize to combat every new TLS proposal on the grounds of nonspecific harm, but everybody with a pet feature can mobilize to make sure it is standardized.

[0] http://ietf.10.n7.nabble.com/tsv-dir-review-of-draft-ietf-tl...

[1] http://ietf.10.n7.nabble.com/Working-group-last-call-for-dra...

drewcrawford··on Heartbleed
This is a cross-vendor, cross-platform vulnerability that requires one to assume that almost any password used over https, any SSL session, or almost any SSL certificate used in the last year, hell, anything in server memory in the last year is compromised. I'm quite confident there are many systems that relied solely on SSL to gate immediate, root access, and some of those are still right now, as we speak, exploitable.

If that's not "burned down the internet" nothing possibly qualifies.

drewcrawford··on Heartbleed
Ok, I'm going to take the counterpoint on this.

Heartbleed, and "goto fail" are bugs that any competent C developer could have found. You, me, the muffin man, the NSA, a bright undergraduate student. Anyone. These aren't vulnerabilities that you read about in a crypto journal. They are basic implementation bugs.

So why weren't they found by amateurs? (Well, perhaps the premise is false. Perhaps they were found by amateur attackers.) However I submit to you if true it is because people who are actually experts in cryptography do not generally spend their time looking for dumb implementation bugs. I'm sure some do, but many don't. Which is understandable--we want those people looking for weaknesses in AES or curve25519 or something.

Meanwhile we have a culture of abstinence-only crypto education, where everything crypto touches is a forbidden land that we shame any ordinary software developer for venturing into. Nobody found this bug because ordinary developers aren't there to find it. They're not there because they're told to leave.

You suggest "double down on amateurish" facetiously but I claim that amateur hour would have actually caught these two bugs, because any amateur can see them. Maybe it would have created more bugs, maybe not, but I think it would have stopped these two early.

What I think we need to do, and what we should have done a long time ago, is recognize that abstinence-only crypyotgraphy doesn't work. We need to define levels of risk. Writing your own crypto algorithm is Threat Level Red. Implementing a strong one from a spec is Threat Level Yellow. Implementing a high-level authentication scheme like TLS from a spec is Threat Level Green. Porting OpenSSL to a new architecture is Threat Level Blue.

Abstinence-only crypto education doesn't recognize that some people are going to do crypto anyway. It also doesn't recognize that "not enough eyes" is a threat model that objectively produces THE most serious vulnerabilities we have faced in recent years. Putting all our eggs in OpenSSL and telling ordinary developers to use it and not ask questions literally burned down the internet. I don't know what kind of bad scenario we were trying to avoid, but the one that actually happened was worse.

Some type of risk-aware model encourages people to get involved in a skill-appropriate way. That needs to be the goal of the crypto community right now; to capture the energy from software developers interested in cryptography (particularly due to recent world events) and do something useful with it; not turn them away and say "nothing to see here".

drewcrawford··on My Heart Bleeds for OpenSSL
> Has this sort of behaviour been observed for other vulnerabilities in the wild that can be cited?

Yes. The mailing list that was used as recently as 2011 to coordinate exactly this kind of issue was backdoored.

Further reading: http://www.openwall.com/lists/oss-security/2011/03/03/3

drewcrawford··on The Heartbleed Bug
I think clang's AddressSanitizer gets pretty close to what you want. It misses some tricky cases on use-after-return, but other than that it offers pretty robust memory safety model for bounds checks, double free, and so on.
drewcrawford··on U.S. lawmakers ask Gilead to justify hepatitis C drug's $84,000 price
"low barriers to entry" is as best as I can tell an arbitrary phrase that means whatever you want it to mean.

For example, a movie industry with the "lowest barrier to entry" would be a legal system where I can take The Hobbit from New Line Cinema, copy it, and sell it to consumers at industrial scale. As far as I can tell, not even the Pirate Party advocates for such a system.

Whenever somebody says "low barriers to entry" inevitably what they mean is "low enough that Big Bad Company is in trouble, but not zero". And while I support the sentiment, and to a significant extent, the policy, I fail to see how arbitrarily adjusting the barriers to entry to a different value because I don't like who is benefiting from it right now is anything other than picking winners and losers, which is a very un-free-market thing to do.

drewcrawford··on How are cold-calling ceasefires illegal?
Not at all. To advertise inside each other's premises, you have to enter somebody else's private property, and with some exceptions, right to refuse entry or forbid certain activities on your property is not just allowed, it is what private property actually means.

However, I am not the private property of my employer, so unlike this store analogy you need nobody's consent to advertise your job to me. You just call me. This isn't Saudi Arabia where you have to consult my mahram before you offer me a job.

Now under the legal theory we have discussed so far, you may imagine that two companies could voluntarily draw up a contract not to hire me just cause that's what they want to do. However, in the United States we don't allow certain types of contracts, even if all the parties to the contract consent. For example we don't allow murder-for-hire contracts, even though both parties have consented to the contract.

Similarly, this type of contract is one that is prohibited by law even though both of the parties may agree to it. Specifically the Sherman Antitrust Act prohibits "any contract... in restraint of trade or commerce among the several States". That language is kind of vague but the case law for the last 120 years is clear that this sort of contract is the kind that is prohibited by the act.

drewcrawford··on I Hunt Sys Admins
This is kind of off-topic, but I don't know where else to ask.

Have we seriously entertained using "OSS" licenses that would prevent NSA & co. from using them?

I know Douglas Crockford has his "don't be evil" JSON license that got everybody's knickers in a twist. And I know OSI has a nice page on why field of use restrictions are bad.

However... I wonder if these pre-Snowden viewpoints credibly consider an organization that uses the software community's tools to conduct targeted attacks on that community. I mean, these documents suggest a much scarier attack on software developers than, say, putting the Linux kernel in a TiVo or whatever they changed in the GPLv3.

On the other hand, maybe FOU restrictions are still bad on principle. What do you all think?

drewcrawford··on “This presentation can’t be opened because it’s too old”
#2 isn't viable because it breaks the primary design goal and the entire purpose of Keynote '13--that every presentation opens the same way across desktop, web, and mobile. The Keynote '09 source code does not and never has compiled for ARM, and so you would be faced with exactly the same dialog you have now, except instead of on your Mac it's on your iPad and instead of asking you to find an old version of keynote it asks you to find a Mac.

The great thing about #1 is that if Apple really did leave money on the table here, any third-party developer can collect it. Just put a Mac with two versions of keynote behind a REST endpoint and charge a buck or two per conversion. If you can turn a profit at that, not only do you get the smug satisfaction of clearly winning an internet argument, but also there's a cash prize.

If, however, that sounds like a waste of a perfectly good weekend, an economic bet that is unlikely to pay off, it would be an equal waste of a weekend for an Apple engineer. Apple is not a charity; they are a business that takes calculated risks, and they didn't like this one. Did they miscalculate? If you think so, there is no reason not to fill the gap yourself.

drewcrawford··on Google Fiber expansion moves fast; San Antonio approves construction
It's sort of a funny question.

Do roads make economic sense if we didn't have a federal government to subsidize them? Probably not: Texas derives around 58% [1] of its highway costs from vehicle-related fees (e.g. registration, gas tax, etc.) and the rest is subsidized from unrelated sources.

Then again if we did not have a road system, our economy would be in poor shape, because it is harder to get the store to buy things, and to transport the things around. So from that perspective roads are an economic net positive even if they were 100% subsidized from unrelated businesses.

Gigabit internet is similar to roads. It probably can't/won't be funded 100% by the people who use it. At the same time, it is important infrastructure that opens up new avenues for economic opportunity, and I suspect that any major city that had gigabit as available as roads or electricity would find that the benefits exceed the costs, be they subsidized or otherwise.

[1] https://www.icloud.com/iw/#numbers/BAKsWA7R5a0YQGg3ptGBpPlvQ...

drewcrawford··on Mt. Gox leak rumor
It's pretty easy to miss "basics of a good design" like a cron job job when you are also missing actual basics like source control or any release process whatsoever [1]. I understand the Wired article to mean that for awhile they were actually editing source code on production servers in some cases.

This really is a case of a company managing assets well in excess of the limitations of its experience or ability, literally a trading card company that found themselves operating as a bank.

The thing I don't know was whether their customers had adequate notice that mtgox was grossly incompetent. Smart people have told me they did, but at the same time, the list of services I use where I have personally bothered to check if they use source control and have a test environment is not very long.

[1] http://www.wired.com/wiredenterprise/2014/03/bitcoin-exchang...

drewcrawford··on Ask HN: Kicked out by co-founders – what are my options?
I'm not a lawyer.

1. Run, don't walk, to the copyright office and register. It costs $35, you can do it online, and if you do it in time it puts you in a better negotiating position. I'm not going to walk through the legal situation here, just do it. Your lawyer will thank you.

2. If you think owning the IP was a provision of the accelerator deal, you could probably brick the deal by writing to the accelerator yourself and pointing out that you own the IP. I wouldn't do that without a lawyer's ok, but I would definitely make a threat as one software engineer to another to the founders that it's within your power to contact the accelerator and see if the cofounders blink.

3. Is the IP being used by them right now? And how is it being used? There are potentially some strategies there but I would need more details. If you don't want to share that information here then lawyer up.

drewcrawford··on Eric S. Raymond only gets $20/mo on GitTip
I'd be interested in corresponding with you about this problem but I don't know your email.
drewcrawford··on Silk Road 2 Hacked, All Bitcoins Stolen
Lowercase-l libertarian checking in.

I don't oppose governments. I oppose some of their laws.

Most ordinary people oppose laws--half the country opposes the ACA, the other half opposes the Patriot act. Perhaps libertarians oppose more laws than the average person, but opposing laws and advocating full-on anarchy are two very different things. There is no hypocrisy inherent in calling for the repeal of some laws and calling for the enforcement of others, because this is what Democrats, Republicans, Greens, Libertarians, and all the rest of them do 7 days a week.

You reference Ayn Rand in jest but it is worth pointing out what she and other libertarian thinkers have actually said about the role of government:

> Such, in essence, is the proper purpose of a government: to make social existence possible to men, by protecting the benefits and combating the evils which men can cause to one another. - Ayn Rand

> The free society has an indispensable role for government. The law, in a society of free people, protects the life, liberty, and property of all persons alike, ensuring peaceful conditions within the community. Government performs as an impartial umpire, by interpreting and enforcing the previously agreed upon rules. - Ludwig von Mises

> A government which maintained law and order, defined property rights, served as a means whereby we could modify property rights and other rules of the economic game, adjudicated disputes about the interpretation of the rules, enforced contracts, promoted competition, provided a monetary framework, engaged in activities to counter technical monopolies and to overcome neighborhood effects widely regarded as sufficiently important to justify government intervention, and which supplemented private charity and the private family in protecting the irresponsible, whether madman or child -- such a government would clearly have important functions to perform. The consistent liberal is not an anarchist. - Milton Friedman

In fairness to you, there are some libertarian thinkers who have been more on the anarchist side (Murray Rothbard comes to mind). But there is nothing inherent in libertarianism that would require libertarians to adopt an anarchist position, and in fact most libertarian thinkers have taken a very positive view of government when it enforces those laws that libertarians think are important.

What I'm trying to say is, libertarianism isn't the same as anarchy, and most libertarians aren't working to destroy the government. They're working to change it, to make it better, the same goal that conservatives or liberals or anybody else has. And there's nothing inherently hypocritical about repealing drug laws but keep prosecuting thieves.

drewcrawford··on Why systemd is winning the init wars and other things aren't
> They've certainly called themselves a unix (in the generic, no trademark),

At one point, they probably were a Unix. But Unix as a place and Unix as a goal are two very different things. Both skiers and mountainclimbers find themselves at the tops of mountains.

> When the term "Linux" is used in general, we mean a unix.

You mean a Unix. I mean Linux. There is no "we".

> So yes, refugees from Windows coming over to distros that have always been unix(-like) and trying to change them into the some sort of Windows-like junk is a problem.

I don't believe you. Where are these vanguard Unix-style Linux distros? RHEL? Adopting systemd. Debian? Adopting systemd. SUSE? Adopting systemd. These are distributions from the days of old. They have formed a consensus that systemd-style Linux is the future.

I mean I think it is fair to say that the Linux community is divided on this issue. But characterizing the systemd/dbus/ufs folks as "Windows refugees" is totally inaccurate. Systemd has the backing of important community members of the Linux community.

drewcrawford··on Why systemd is winning the init wars and other things aren't
The dispute here is philosophical. You want a distribution that follows The Unix Way. Where init does its little job and dbus does its little job and so on. Small, simple tools.

But there is another way. A way that believes that when you unite the core tools into one powerful process you can do cool things. These cool things have been proven, from the basics like faster boot times, to more advanced features like saving/restoring random seeds, automount, SELinix integration, and so on.

You are arguing "this isn't Unix!!!" but that is the whole point. You can win an argument with a mountain climber by pointing out he is going downhill, but not a skier; since for a skier, going downhill is the point. These Linux distributions are not temporarily disoriented mountain climbers accidentally heading away from Mt. Unix. They are deliberately skiing away from it at a high rate of speed. What they will find at the bottom of the slope is an interesting question, but simply pointing out that their strategy is bad for mountain climbing is neither here nor there.

What I am saying is, if you want to run an OS that believes in the Unix Philosophy, the shortest path is to install Unix. You are going to have about as much luck convincing Fedora that they ought to be Unix as you would convincing Redmond.

drewcrawford··on Widespread sex differences in gene expression in the human brain (2013)
While you are correct that this particular study offers no real evidence in the nature/nurture debate, my understanding of neuroscience is that the existence of early differences in gender-based behavior are so well established in the discipline that to publish on that result is no longer interesting to neuroscientists. What remains at this point is to figure out a mechanism behind that result. So the line of inquiry behind this paper is not so much "whither behavioral differences?" but rather "Given this large body of research over the past 10 years that demonstrates behavioral differences, what can we see in the brain that might be a mechanism for this result?"

If you are not familiar with that earlier body of research establishing behavioral differences, these studies might be a place to start, and then of course you can walk the bibliographies to find more.

http://www.psy.miami.edu/faculty/dmessinger/c_c/rsrcs/rdgs/e...

http://www.sciencedirect.com/science/article/pii/S1571891304...

http://scholarworks.umass.edu/dissertations/AAI9219513/

http://www.math.kth.se/matstat/gru/5b1501/F/sex.pdf

http://home.cc.umanitoba.ca/~dcampb/Campbell.InfantMetaALSex...

← PreviousPage 8 of 29Next →