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 The DROWN Attack
You misunderstand how Debian works.

Debian practically never updates to new versions of software (until you upgrade Debian). Instead they "backport" security fixes into the older software versions, preserving the old version numbers but adding some stuff on the end to reflect Debian's changes. The intent is that you get "only" security fixes, never features or improvements.

So when you see "OpenSSL-1.0.c-stuffgoeshere" you are not looking at "OpenSSL" openssl anymore, but a version that Debian customized, probably to add security fixes. I say "Debian" here, but really most distros do it (RHEL, Ubuntu, CentOS, etc.) I'm just not familiar enough with their processes to comment specifically.

Debian has disabled SSLv2 in its OpenSSL packages since 2010 [0], and if you are running a Debian OpenSSL version later than 1.0.0c-2 your OpenSSL version is not vulnerable. The current version of OpenSSL in stable is 1.0.1k-3+deb8u2, so unless your server has been under a rock for 5 years you should be fine. And if it's been under a rock for 5 years you have a lot of security vulnerabilities to be worried about.

Of course you may have installed OpenSSL from somewhere else, or you may be using some other software for SSLv2 that doesn't involve OpenSSL at all. So merely upgrading your OpenSSL version is not a silver bullet, you need to think about every TLS deployment you have and how it might be used.

More broadly, use this vulnerability as a wakeup call to learn about "where your software comes from", because everybody has a role to play in staying secure, including users. Debian is maintained by volunteers; you might be happier with a commercial vendor who guarantees response times. Debian backports security fixes; you might be happier with a distribution that upgrades to new vendor versions which may have avoided the confusion here.

[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589706

drewcrawford··on Apple Is Said to Be Working on an iPhone Even It Can’t Hack
The real lynchpin here is not hardware, but iCloud. Apple can pull data out of an iCloud backup, and the only reason the San Bernadino case even got off the ground is because somebody at the county screwed up and effectively prevented the backup from occurring.

iCloud backups can be secured so not even Apple can get in them, but it is fundamentally much harder to secure (can't be hareware-entangled and still restore to a new device), and it would significantly complicate iCloud password changes. I'm sure they are working on it, but it is nontrivial.

That (software) problem is the real reason 99% of users are still exposed, as you say the hardware and secure enclave holes are basically closed.

drewcrawford··on Show HN: Windows 98 in browser
> Although even some desktop apps manage to be as janky and dog slow as almost anything from the Win98 era, e.g. iTunes until a couple of years ago. By contrast, the cheapest Third World market smartphone would run Win98 apps blinding fast.

It is easy to take potshots at e.g. iTunes, but the real reason software "got worse" is not developers getting lazy. What happened is that expectations for CPU-intensive features rose (memory protection, ASLR, NX, encryption, low-latency audio, high-efficiency codecs, ClearType) while willingness to pay vanished. In Win98 times, you bought your music player from the developer (remember Winamp?) whereas now it comes free with your OS, which is itself probably free. So of course it is all half-assed now, but it's not "lazy" to spend resources on software someone will pay for, and not on software nobody will pay for.

You could absolutely reverse this, but it has nothing to do with native or web technology, and everything to do with changing consumer attitudes about choosing software.

> On the desktop, the hardware is finally winning--it's just too damn fast. Hopefully that will happen with smartphones too.

From 1995 until today, power consumption in desktop processors grew about 5-15x, depending on how exactly you measure. 5-15x more power on mobile devices is simply not an option, unless we have a "new physics" kind of breakthrough in both battery and thermal technology.

drewcrawford··on Show HN: Windows 98 in browser
You might think it's a great demonstration if you try it in a desktop browser.

Meanwhile, on actual mobile hardware, the performance is so atrocious it's completely unusable.

No knock on the implementors of course. But the idea that this demo has some deep insight about the performance of native smartphone software is just inaccurate.

http://cl.ly/2O0L3t290s37

drewcrawford··on Apple’s FBI battle is just the beginning of a reality check for the tech sector
Specifically, my comment addressed these parts of your comment:

> It won't make phones less secure in any technological sense... The kind of insecurity people are talking about is a policy concern;

(My comment alleges there is no such thing as a "technological sense" as distinct from a "policy concern".)

> It annoys me a lot when people in technology deploy special- pleading logic like this.

(My comment alleges that the logic isn't special-pleading.)

I didn't intend to be read as confrontationally as perhaps I sounded. You have a minority position in this kind of environment; I take minority positions sometimes, I understand it is not always pleasant to prosecute them. If you don't want to prosecute them, I won't make you. I'm just explaining that I really did offer a good-faith rebuttal of what I understood to be your position. There may be something wrong with it, but I don't think it's off-topic.

drewcrawford··on Apple’s FBI battle is just the beginning of a reality check for the tech sector
You're drawing a false dichotomy when you talk about technology and policy as separate issues. If you are unable to overhear my encrypted messages, were you stopped by the technology of the Salsa20 algorithm or my policy of not giving you the keys? Or were you stopped by the government's policy of not compelling their production for you? Maybe you were stopped by your own policy of not beating people with rubber hoses?

In the hypothetical that Apple did not have the capability to defeat the 5C's passcode counter, is the FBI thwarted because of a technically secure cryptosystem or because it is the policy in the United States to allow such cryptosystems to be marketed and sold?

Policy and technology do not exist in a vacuum. Apple is obviously going to close the custom image loophole in response to this "debate"; so clearly the boundary between technology and policy is fluid. But merely taping a policy out for silicon, as Apple is going to do in the next chip, does not address any of the underlying issues. Sure, in the instant case Apple "technically can" unlock the iPhone, but that is always true: we could create a law such that all phones must be backdoored for example. Assuming Apple loses here, mark your calendar, because we'll have that battle next year when a terrorist uses the new silicon.

There is a line somewhere for what is reasonable to compel. Reasonable people can disagree about where that line is, but let's not paint "people in technology" with a broad patronizing brush of "it's not technology, it's policy, therefore your rules don't apply". Technology is merely policy that's machine-readible.

drewcrawford··on Linode Security Advisory
you forgot "that would have resulted in the disclosure of customer credentials".

I'm speculating, but having been a fly on the wall at this kind of meeting before, here's my theory of how this went down:

Manager: "So somebody got the key to generate one-time password tokens for PagerDuty. How did that happen?"

Engineer: "I have no idea."

Manager: "What about that Lish vulnerability? Could it have been that?"

Engineer: "Could have been."

Manager: "We don't know?"

Engineer: "I mean, they could have gotten it that way, but we don't have logging for security vulnerabilities, because, you know, we would just fix them instead of logging that they occurred..."

Manager: "Okay, I want a second opinion. Time to bring in $SECURITY_PARTNER."

$SECURITY_PARTNER: "What Engineer said. And here's a bill for our time."

Manager: "What about if the customer screwed up and lost a device? Could it be that?"

Engineer: "It could be that."

Support: "PagerDuty said something about wiping their phone."

Engineer: "If they did lose a device, it would be indistinguishable from the evidence we have."

Manager: "So, maybe we weren't hacked after all?"

Engineer: "Maybe not."

Manager: "Any other theories?"

Engineer: "I just want to go on record... AGAIN... that I don't trust our ColdFusion infrastructure at all. The people responsible have all left, and none of us understand it. We need to rewrite in a cooler language, like Python. And hire some actual security people."

Manager: "Sigh. We've gotten enough flak over this that I guess I'll put it in the budget. Okay, good meeting everyone. I'll write this up in a blogpost, because we need to show transparency. That way customers are at least as confused as we are."

drewcrawford··on So you want to write a package manager
The problem is that, as a software developer, I am not going to learn 3 PMs to distribute my free software (yum, apt, homebrew) nor am I going to navigate the politics of Fedora, Debian, Ubuntu, etc. for getting my free software included in their repositories and/or keeping it current. I have things to do, like write software.

Language PMs are "good enough" to solve the problems of the people actually writing the software, and in most cases that is really all that matters. I'm sorry they're not good enough for you, but it's not my fault that Rust, Python, and Go will let me upload to their package manager but Debian/Fedora/whatever you use will not.

Your fight is not with the language PMs, it is with your OS vendor who will neither give me upload rights nor send out someone else who does, who neither designs tools for me to use nor sends someone who already knows how to use them.

To be clear, I think there are good reasons why OS vendors won't change their ways, but software developers won't change our ways either, so neither language PMs nor OS PMs are going away any time soon.

drewcrawford··on Implementing the Elm Architecture in Swift
So, this is the first time I actually understand what the FRP people are talking about. So, thanks for that. It has been greek to me for some time.

However, now that I do understand it, I agree with parent. I don't want to use this for complex UIs. Point by point:

> Cancellation is then implicit on deallocation

In practice, you're going to have retain cycles, no? I mean I don't know where these four lines "live", but if we write them in a closure and ship them off to a sync/diff/runloop engine, unless we are quite careful, that sync engine is going to hold a great many strong references. Unless you intend this to be an IBAction definition, in which case...

> because it provides type safety and compiler verification, instead of hoping that your target/selectors and KVO work and never break when you edit something and the compiler doesn't complain.

As long as the underlying Cocoa uses target-action, true compiler verification is impossible. Compiler verification checks something (these four lines) but it doesn't check that these lines actually run when the slider is moved in any way.

> FRP-like systems allow you to take some evil imperative state (a slider was moved!), lift it into a happy pure-functional world,

It's not immediately clear to me how e.g. throttle is implemented, but it must accumulate state inside it somehow in order to replay the event after the timer.

> Complex UIs are exactly where you want this type of system, because it provides type safety and compiler verification, instead of hoping that your target/selectors and KVO work and never break when you edit something and the compiler doesn't complain.

Compiler verification is good; tests are better. And I do not understand how you would even begin to write unit tests for this.

Now we get to:

1. Stopping in the debugger and trying to reason about these signal chains is complicated, because what we have here is a datastructure in memory, not lines of code I can step through

2. This example does not account for threading, and in any nontrivial example you want to move between background and foreground a few times. It also does not deal with "splitting/merging" (multiple observers, etc.) and I suspect the intersection of those two features is a sharp edge.

3. Finally, let's compare against a slightly more traditional syntax:

    @IBAction func valueChanged() {
        dispatch_throttle(0.5, onQueue: dispatch_get_main_queue()) {
            colorView.color = colorToValue(red: sliderA.value, green: sliderB.value, blue: sliderC.value)
        }
    }
This syntax is also four lines of code, including the context of where the lines live. This example resolves all the problems I listed with the FRP example. In addition, it also collates which slider goes with which color component in a single line, rather than breaking that relationship apart across a (potentially long) signal path.

To evolve from your first example to your second example we would just change

    slider.addTarget(self, action: "valueChanged", forControlEvents: .ValueChanged)
to

    button.addTarget(self, action: "valueChanged", forControlEvents: .TouchUpInside)
While I readily concede this aspect is not quite as elegant as your example, to me having a slightly more complicated 1-line diff is a very low price to pay for all the other benefits I listed.
drewcrawford··on Dear open-source maintainers, a letter from GitLab
> I think any eventual GitLab acquirer would be mad to screw up _our_ winning open core formula

Understand, I want to believe. I want to live in a world where open core works at VC scale and over long timeframes. I'd love to run all my own projects that way, if it was possible. And who knows, maybe you will be the people to do it where everybody else failed.

It's just the available evidence suggests I don't live in that world. In my world, you have to pay money for things if you want them to last. I'd like to pay you money, but you don't want it, and that's weird.

Look at it from my POV. GitLab isn't "just" another tool for me, it's my homepage. I'm in there hours every day. I trust it to store my life's work. That's amazing! People literally kill to get that deeply embedded into their customers lives. But it's also a huge responsibility. You and I are in the honeymoon period right now, but when times get tough and we have 3 kids and a mortgage, it's going to get real.

You may not be in a position to speculate that far out, but I have to. I'm still going to need this product in five years. You might not need me.

drewcrawford··on Dear open-source maintainers, a letter from GitLab
> Do you use webhooks on GitHub? That would actually be pretty easy to implement,

Bingo. Full implementation, in Bash: http://faq.sealedabstract.com/gitlab_mirror/

> What are you afraid of?

Mostly, that you'll get bought by the likes of Oracle. In spite of my quibbles about CE features, I think you're doing a (mostly) fine job of CE right now. But your acquirer will see CE as a cost center (there's no revenue) and will want to "streamline" by focusing on enterprise (where your balance sheet is). GitLab.com will also look like a cost center, and will either shut down, turn into a datamining opportunity, or go through the bad PR of no longer being free. I fully anticipate, in 5-10 years time, that I will be running a CE fork to get out from under your acquirer, just like StarOffice, MySQL, Hudson, etc.

Contrast with GitHub, who makes a silly amount of money from people like me. Their acquirer would be mad to screw up a winning formula.

The good news is, GitLab is such a good product that I still hugely prefer it even after "pricing in" the risk (cough, certainty) that my days are numbered. It is an amazing tool, it really shows that you care about it. For now.

drewcrawford··on Dear open-source maintainers, a letter from GitLab
> Is there a reason why you didn't use GitLab.com, which runs EE and thus has Repository Mirroring?

1. My hosting is way more reliable than yours :-)

2. I need to host the CI runners myself anyway, because you don't have the right config

3. I already have a private GitLab install, so it's no extra trouble

4. My repository mirroring is quite a lot better than yours, as it's instant, not hourly

5. I prefer to have a commercial relationship with important tools. You seem like nice people, let's see what happens when you get acquired. As long as you can't be bothered to sell to 2-person teams, I'll just run CE and have my commercial relationship with AWS instead.

drewcrawford··on Dear open-source maintainers, a letter from GitLab
Just yesterday I ended up implementing my own mirroring of GitHub repositories. GitLab supports this in EE (new in 8.3), but not CE.

That's not a feature that only large enterprises use–I run an open source GitHub organization and wanted to use GitLab as CI. It works! But I needed to reimplement an EE feature to do it.

To be clear, I don't think there is anything sinister about keeping features behind a paid firewall. That is how software developers have paid their rent for decades. I'm just saying that the EE features are not all "mostly interesting to companies with 100+ employees." Several of them are things I needed as a single open-source developer.

I've debated about buying EE to fill in the gaps, but you sell licenses in packs of 10, and I only need 2 :-)

drewcrawford··on Income inequality is not the problem, it's a symptom
You can absolutely avoid it. Inequality was so much less in the 1950s/1960s and we still had police and property.

The disconnect here is that property rights are "more guidelines than actual rules", they are quite literally "made up". It used to be that keeping a black person out of your store was a "property right", until we decided it wasn't, and then we got rid of that one. It used to be that preventing airplanes from flying over your farm was a "property right" until it wasn't, and then we got rid of that one. You can only do that if "property rights" are artificial.

I mean just look around you. We live in a world where Smartflash has a "property right" to your in-app purchases, Apple has a "property right" to your iPad, JSTOR has a "property right" to publicly-funded research, etc. etc. That's because we made it that way; let's unmake it, and do it differently!

drewcrawford··on Twitter’s updated Mac app wasn’t made by Twitter
You'd be amazed at how many companies don't write their own apps. I know, because often the people who write them is me.

The problem is that there's a fixed, small quantity of good, senior, Mac/iOS developers. A lot of them like being independent and flitting around from project to project because that is how you build an experienced developer to begin with.

Meanwhile there is all this demand for apps, and so agencies act as the "market-markers"–acting as the sales force, the marketing team, and playing the role of "nobody got fired for hiring $AGENCY" etc.–but the actual lead engineers are pretty much the same bunch of schmucks no matter whose name is on the contract. If you want to know who wrote it, check the names in the header files, and we all meet at the same bars on Thursday nights.

I always advise people to cut out the middle man and hire the indies directly (disclosure: that would be me) since it's the same thing anyway, except cheaper and with fewer games of "telephone". But the pull of the pretty logo and the rapport with the Account Manager is strong.

Black Pixel is better than most of the agencies in that they do a large amount of their work in-house. But their "in-house" people are often just good contractors taking a break from contracting so I'm not entirely sure what you've accomplished by doing that.

I'm not really complaining–agencies have historically been a reliable source of gigs for me, and so they are my friends; they provide me a valuable service.

But do they provide you a valuable service? That I don't know. I have been in situations before where no matter which vendor the customer went with, I would be an engineer on the project, and the customer sat down and agonized over who to choose. That just seems inefficient.

drewcrawford··on Software Totemism
I've been involved at various times with both Martin and Pieter on the projects that motivated this article. The dichotomy here sounds compelling, but I think it hasn't any basis in reality at all.

Let's look at the data. nanomsg ("the technical endeavor") is, objectively, a project with declining activity, and little of any import has happened in 2015. [0] libzmq (the "social club") merges some 20 patches/week. [1]

Now, maybe this is because nanomsg is "done", and has simply already achieved its status as a "small component that does one thing and does it well" where nothing else needs to be added, while libzmq faces "strong pressure to add one more option, one more feature".

Except that nanomsg is now in its fourth year of unstable beta, and even its own mailing list is riddled with statements that things are so bad don't even bother to file bugs [2], features are "horribly broken" [3], and you should use a different project instead [4]. From my own experience deploying nanomsg in large environments, this criticism (from core developers!) is absolutely true.

One cannot look at these projects and fairly conclude that there is any tradeoff at all between "software as a social club" and "software as a technical endeavor". In reality libzmq is both, while nanomsg cannot even succeed at one. libzmq may be a social club, but it's a social club that ships.

Don't get me wrong, libzmq has plenty of problems, technical and otherwise. I am no champion of it. And it was totally plausible, in 2012, that the philosophy enshrined in nanomsg would produce a better library. I believed that.

What is wrong is now – now that we have the data – to ignore it and pretend that doubling down on a failing strategy is a good idea. What is wrong is to gloss the serious technical inferiorities of nanomsg as a "personality difference", or that the reason it is in a perpetually unusable state is because "we focus on the code".

For nanomsg to be healthy, it needs to do a real postmortem. Admit things aren't working. Think about why. Change the philosophy to something that isn't proven to be broken. Kill some of the sacred cows.

Instead, puff pieces like this are written, that tell stories that "feel true" to developers instead of addressing the real facts at any point. The software can never get healthy when this is the approach.

[0] https://github.com/nanomsg/nanomsg/graphs/contributors

[1] https://github.com/zeromq/libzmq/graphs/contributors

[2] http://www.freelists.org/post/nanomsg/inproc-bugs,1

[3] http://www.freelists.org/post/nanomsg/v07beta-released

[4] http://www.freelists.org/post/nanomsg/release-of-nanomsg06be...

drewcrawford··on What Developmental Milestones Are You Missing?
Your model is more complicated than you think.

If someone says "take vitamin C", you don't point blindly at a log chart and thus consume a kilogram of it (which, based on a rat model, probably would kill you).

This is because the practical algorithm for "take Vitamin C" has the grocer, the government, and a team of scientists sign off on the size of a dosage and how many pills are even in a bottle. So while that may not be part of your model, it is most definitely part of the model. The model tells you how much Vitamin C not to take, and so it passes the heuristic.

And without that cap, Vitamin C is unsafe, etc., so the heuristic holds.

drewcrawford··on Debian Dropping the Linux Standard Base
> Participating in the Austin Group is pretty open

Not really. I know someone who's spent ages trying to get O_CREATE added as an alias for O_CREAT.

http://spiegelmock.com/2015/01/23/fixing-a-typo-the-hard-way...

drewcrawford··on The Night They Drove the Price of Electricity Down
Because "power company can turn off your AC" is not a feature for you, it's a feature for the power company.

The power company's problem is that everybody has their AC turned on at 3pm and either the node supplying those houses is overloaded or they must buy energy at crazy spot prices to clear the market.

If they can flip a switch and knock out nearby ACs for 10 minutes then they have time to figure out how to solve the problem before it becomes a blackout.

Now they could "theoretically" introduce a pricing mechanism such that a number of people would shut off their AC due to an increase in price. But that is a lot more complicated (most residences do not do real-time billing for energy, harder to forecast how many users will shut off if price is raised, have to maintain real-time channel for price data) and in practice something will go wrong and you'll blackout instead.

drewcrawford··on GitLab announces $4M series A funding from Khosla Ventures
Let me tell you my regular frustration, as a person migrating tons of stuff to GitLab.

1. Google "GitLab [obvious feature]"

2. Land on feedback.gitlab.com, on a feature request with hundreds of upvotes

3. "We're accepting pull requests"

4. Filed in 2013

5. Still open

6. Sigh loudly.

7. Check the blog for what evidently more important features they've been working on instead

8. "We're very excited to announce that we'll ship GitLab Mattermost, an open source, on-premises messaging app"

9. Sigh loudly

10. Conclude that they are probably an open source company strapped for cash and to cut them some slack

11. See HN article about closing series A

12. "Oh good, now they can finally get to their epic feature backlog"

13. "I think we're already there, what would you like to see?"

14. Sigh loudly.

Don't get me wrong, I love GL. But wow is that workflow annoying.

drewcrawford··on GCC is moving to git
I keep trying to provoke a reasoned argument with a pro-FSF person, this seems like as good of an opportunity as any. You may want to move this to email (my email is in my profile).

> I face backlash from people who see no ethical concerns with proprietary software

I think this could be clearer. RMS himself has stated [0] that selling exceptions is perfectly fine, so even free software zealots do not object to proprietary licensing in all of its forms. I think most people object to proprietary licensing in some forms. This is a case where speaking in riddles and platitudes is not effective policy.

> or who are apologetic to "open source" instead

Again this is a platitude turn of phrase. I support some kinds of open source and not others, as do I expect most thinking people. Does that make me "apologetic"? Am I the problem? No clue.

> Usually it's in the form of some smartass who will redefine the word "freedom" to mean something different from the context at hand

Quite frankly, one could accuse the entire Free Software movement of this, as that is essentially its purpose: to redefine the loaded term "freedom" in a nonintuitive way.

But accepting for the sake of argument the FSF's vision of software "freedom" as the correct definition, I am not convinced it is an actual view instead of a post-hoc rationalization. For example, the FSF claims [1] the RPL is non-free for 3 reasons:

1. It puts limits on prices charged for an initial copy.

2. It requires notification of the original developer for publication of a modified version.

3. It requires publication of any modified version that an organization uses, even privately.

Now my question is this: which of the four freedoms, specifically, give rise to these objections? Because from my POV the RPL not only protects the four freedoms, but does so strongly, for exactly the reasons here that are presented as so-called "objections".

So, the only conclusion that I can draw, is that the 4Fs are a lot of nonsense, a "just-so" story to explain why GPL License is Best License. Freedom is allowed to go so far, but no further, until GPL v4, and then we can go further.

I am sorry if some of this seems trollish or offputting. I promise it is not. I have read probably hundreds of books and essays on this and I cannot find anything that satisfies me that "Free Software" is an intellectually defensible philosophy. This may be because the people who are best-positioned to defend it have better things to do than defend it to me.

I want to like the free software community, and we do collaborate, in a sense, but it is always strategic and not ideological. It just so happens, in cases, the GPL and my objectives are compatible. But the FSF's objectives and my objectives are not really compatible at all. So there is the same funny taste in my mouth from working at cross-purposes that I get when writing proprietary software. It has the same artificiality.

[0] https://www.fsf.org/blogs/rms/selling-exceptions

[1] http://www.gnu.org/licenses/license-list.en.html#RPL

drewcrawford··on Decertifying the worst voting machine in the US
What you are missing is that the technical part is not the hard part. The hard part is all the rest of it.

For example, here [0] is a link to the 200-page "volume 1" of the federal standards, merely one of a complex web of certifications that these things go through.

One random paragraph is illustrative:

Vote scanning and counting equipment for paper-based systems, and all DRE equipment, shall be able to withstand, without disruption of normal operation or loss of data, electrical fast transients of: a. +2 kV and −2 kV on External Power lines (both AC and DC) b. +1 kV and −1 kV on Input/Output lines(signal, data, and control lines) longer than 3 meters c. Repetition Rate for all transient pulses will be 100 kHz

Now I am a software engineer, and quite frankly I have no idea whether these are large tolerances which would require specialized equipment to withstand or whether e.g. my laptop would sail through this kind of event. Nor do I have any idea how I would demonstrate compliance with these requirements to the satisfaction of a federal examiner.

And that is what voting machines are. They are checkboxes on a specification. That means that you can buy them with confidence that somebody else's ass will be on the line when they turn out to be awful. The fact that they actually record votes is ancillary at best, the primary feature and the reason for buying them is that they tick the checkboxes.

As to why they seem overpriced, the reason is that it costs a lot of money to have an engineer hook the thing up to his fancy oscillator and write you a report that yes, this machine complies with requirement 4.1.2.6.c, over and over again.

[0] http://www.eac.gov/assets/1/Documents/VVSG.1.1.VOL.1.FINAL.p...

drewcrawford··on Windows 10 “steals” your bandwidth
No you don't. You visit a website. The author of the website explicitly uses WebRTC, not you.
drewcrawford··on Let's stop kidding ourselves about APIs
Comments here are a dearth of actual examples. You can argue APIs are a Broadway musical if you don't give any clue what kind of APIs you're talking about.

For a few years I was involved in trying to get session-layer security into a networking library.

The disputes were "nominally" technical, in that they were couched in technical language, but there was a strong political dimension. Here were the talking points:

* Knowing that security code is likely to have bugs, isn't it better to do nothing and know it's insecure, instead of doing something, believing it to be secure, and being wrong?

* What cryptographic methods are acceptable? Do we defer to some standards body, like NIST? Or do we reject NIST methods, because they are NSA shills?

* Do we retrofit something off-the-shelf like TLS? (Which implementation?) Or, as a project that defines new protocols, is it within our mandate to innovate on this?

Because there was no consensus on these questions, after several years it's still plaintext-only. There are, however, various "dark forks" that take minority positions, because writing code is easier than convincing people to your side.

Lack of political consensus (on many issues besides this one) is killing the project, to whatever extent it isn't dead already. And even in its death throes there is this desire to pretend there are no political questions.

drewcrawford··on The Infinite File Download
As a matter of fact, I do; as do many people who take cryptography seriously:

> Any one who considers arithmetical methods of producing random digits is, of course, in a state of sin. For, as has been pointed out several times, there is no such thing as a random number — there are only methods to produce random numbers, and a strict arithmetic procedure of course is not such a method. - John Von Neumann

But to your broader point, no, this is not a question of semantics. There is an actual syntactical difference being asserted here.

That difference is this: randomness has nothing to do with numbers. 0xca--the same number--can be either "random" or "non-random" depending on how you got ahold of it.

When we talk about numbers--prime numbers, even numbers, rational numbers, etc., we are talking about properties of the number; whether they are divisible by 2 and so on. But "random numbers" have no property by which we could recognize them. It is entirely a question of where the numbers were made, not what they are or what they look like.

drewcrawford··on The Infinite File Download
> In theory the copy is random bytes

There is not any such thing as random bytes. Here's a byte: 0xca. Is it random?

Well, if I got it from a fair die, perhaps. But if I got it by printing the hex of a Java program, of course not. Bytes cannot be random, they can only be created in a random way (or not).

In your hypothetical you are not creating the bytes in a random way, you are creating them from a book. So the bytes have nothing to do with so-called "random bytes", but are in fact a derivative work of the book, at the very least.

drewcrawford··on Coping with context-switching madness
I've solved this problem by adapting the algorithm from a journaling filesystem to my real life.

http://faq.sealedabstract.com/uninterruptible_programming_su...

drewcrawford··on Should I use a Swift struct or a class?
One does not "simply" mark a method as mutating.

A) One must ensure that one's callers are also mutating, or otherwise have an assignable reference, all the way up the stack

B) One must mark the applicable function in the protocol interface as mutating, which may or may not be under your control

C) One must now repeat step A for all consumers of the protocol in step B, even if none of the other implementations of that protocol mutate their own state

Of course one can design one's architecture specifically with a view toward making ABC trivial, but in the general, unrestricted, default, I-had-other-problems-that-day-and-didn't-think-about-it case, they are hard.

That is why I find calls to "just learn value semantics" necessary but insufficient. Value semantics will not refactor my code when I discover-by-surprise that 18 functions need to become mutating, breaking API compatibility across several build targets, because I failed to forsee a necessary mutation 8 months ago.

drewcrawford··on Should I use a Swift struct or a class?
Values can't be mutated if they're Ivars and you're in a non-mutating func. Non-mutating funcs are unique to value semantics.
drewcrawford··on A Quick Puzzle to Test Your Problem Solving
Fun fact: Mathemetica has a method FindSequenceFunction which does exactly what you describe. In my experience, however, it generally requires at least 4 terms.

I'm not totally sure how the math behind it works (maybe it's similar to Eureqa?) but the results speak for themselves and are rather incredible.

For example, if I run FindSequenceFunction on this input:

    {0, 1, 3, 8, 19, 43, 94, 201, 423, 880}
Which is the number of 0,1 sequences of length n that contain two adjacent 1s

Mathematica produces the result:

    1/10 (5 2^(1 + x) - 5 (1/2 - Sqrt[5]/2)^x + 
    3 Sqrt[5] (1/2 - Sqrt[5]/2)^x - 5 (1/2 + Sqrt[5]/2)^x - 
    3 Sqrt[5] (1/2 + Sqrt[5]/2)^x)
Which, astonishingly, is correct for all the values I've tried. So apparently Mathematica understands more about this sequence than I do, and I know its definition.

Another party trick is to use the input

    {-(1/6), 2/15, -(13/140), 23/315, -(83/1386), 305/6006, -(2269/
     51480), 4259/109395, -(16103/461890), 30616/969969}
Which is the integral x^n (1 - 2 x)^n for x from 0 to 1, for n = 0..<10. Here it seems 10 numbers are required. This yields the solution

    (2^(-2 - 3 x)
    x! (Sqrt[\[Pi]] (1 + x)! + 
    3 (-1)^x 2^(
    2 + 3 x) (1/2 (1 + 2 x))! Hypergeometric2F1[1, 3/2 + x, 
    2 + x, -8]))/((1/2 + x)! (1 + x)!)
Which as far as I can tell, is a closed-form solution (!) to the integral. A solution it worked out to an integral it has never seen, but only the first 10 elements in the sequence.

So it's safe to say Mathematica knows a lot more about math than I do.

← PreviousPage 4 of 29Next →