Better HN
topnewbestaskshowjobs
Log inSign up

wireprotocol

7,244 karma · joined Sep 25, 2010 (16y ago) · 2,593 submissions

Submissions

comment 9y ago · link · parent

"scientific consensus"

I am very troubled by this phrase -- it's almost an oxymoron. Science is not democratic, and scientists aren't anointed arbiters of facts.

Anyone can be a scientist simply by following the scientific method and collecting data in good faith; and a lone outsider with new data can challenge 100 years of "consensus". Obviously they are subject to challenges themselves, or if it's unlikely enough they might reasonably be ignored (e.g. a known charlatan saying they observed cold fusion).

Did this terminology start with the "scientific consensus" on anthropogenic climate change (which I do not dispute, by the way)? I think I understand why it was used in that debate, but I don't think it was a good precedent. Now it's being used to directly apply to policy ("growing scientific consensus on the failures of the global war on drugs").

Before long, it will be used directly in political debates to try to force some scientific organizations to choose a side. And then all credibility is lost.

Researching policies that require deep analysis of scientific (or other) data should be left to think tanks or something similar.

comment 9y ago · link · parent

If you put two nuclear power plants on the same grid, it is pretty hard to imagine how a meltdown of one plant would trigger meltdowns elsewhere on the grid (because the grid carries electrical energy and is incapable of carrying high-speed neutrons). But with software, you don't have to imagine such failures, they happen all the time (because the internet can carry any data, including more software). So I still maintain that software systems are more complex. And if they aren't more complex today, they will be soon, because the complexity is growing without any obvious bound.

But for the sake of argument, let's say they are of comparable complexity. If you show a layperson a nuclear power plant, and say "who do you think should run this: you, or a team of nuclear engineers?" they would probably answer "a team of nuclear engineers, please". Show the same person a television, and they will feel like they should be able to operate it. But it's actually an internet-enabled TV running sophisticated software that is on the same home network as your internet-enabled security camera system, and it's a very unsettling situation. In other words, now software makes everything -- toasters, TVs, phones, cars -- into incomprehensible systems.

comment 9y ago · link · parent

"don't put devices on the network that don't meet your security needs"

Does it not disturb you that the mere presence of a device on your network could compromise everything else? Why is that?

I argue it's because of complexity. We don't really know how these devices behave outside of very controlled circumstances.

And the vulnerability could be anywhere in the stack. I remember this bug from a while back:

https://lcamtuf.blogspot.com/2014/10/psa-dont-run-strings-on...

The gnu strings utility was vulnerable to untrusted input! Who would possibly imagine that would ever be the case!

Honestly, that bug just made me give up. Software cannot be reasoned about any longer. I used to believe that solid components strung carefully together could add up to something understandable. But no, we are beyond that.

I'm not talking about crazy James Bond hackers that somehow infected your compiler or something. I mean that, by accident, a basic utility does something crazy.

This is not math or science or engineering any more. It's wizardry, witchcraft, and alchemy.

(I'm exaggerating a bit, but it really is discouraging to me.)

comment 9y ago · link · parent

And it does! That's what's maddening about it. The complexity always seems to justify itself, but the end results are probably not where we want to be.

comment 9y ago · link · parent

+1. The AI apocalypse looks more like a Kafka-esque bureaucracy and not so much like I, Robot with machines shooting at us.

comment 9y ago · link · parent

"The issue is that things change so quickly that generating such knowledge is economically useless."

That's a good point, and certainly part of the problem, but it does not detract from my point.

The bottom line is that we don't understand the software in the world around us and that it would be hopeless to try. Whether that's because of static complexity or dynamic complexity seems like a separate discussion.

Changing software on the scale that humans do is kind of like changing the laws of physics every year. Great to know that we understand some past snapshot of the software stack that we built, but not relevant to living in today's world.

comment 9y ago · link · parent

"I disagree...When I can choose my mechanic, I own it."

I think we are in agreement here. You don't personally need know everything about everything you own. But someone needs to know enough about it that you can use their expertise or learn from them if you care to.

The myth is that it's about who knows -- the right laws (or the right consumer pressure) will open up the right information, and freedom will supposedly follow. That's a minor factor, sure, but I believe it's more of a myth.

The real thing holding us back is that nobody understands these complex software stacks, we are just building them bigger and bigger and understanding them less and less.

comment 9y ago · link · parent

The problem is software complexity. You can't really own anything you don't understand, and you can't be free in a world you don't understand. And we don't understand software.

Imagine a naive young king who doesn't understand how to do anything for himself. He will easily be controlled by those around him that do understand the world.

Of course, nobody before ever understood everything about the world. But different people understood different aspects in depth, and education gave literacy so people could share expertise.

Software is so complex that nobody really understands it. Nobody understands how a car works, nobody understands how a phone works, because they are both controlled by hopelessly complex software. Governments can't regulate emissions because the software changes the emissions controls based on arbitrary unknown factors. Security problems are just a small subset of the surprising ways complex software behaves -- surprising even to the software engineers who build it.

And the key is that this is all new complexity that didn't exist before. Physics and biology were developed to understand pre-existing complexity, so we always made forward progress. But we are moving backwards now because we are introducing complexity faster than we are understanding it -- much faster.

Therefore this is actually worse than the naive king mentioned above. In that example, it's just an asymmetry of information, and that can be resolved through education. Software is so complex education can't hope to keep up.

comment 9y ago · link · parent

Education offers tools to help manage complexity -- abstract mathematics and lab sciences help us understand the complex world around us.

But that has mostly been used to manage complexity that already existed (e.g. physics, biology), or that is somehow inherent to our world (e.g. complexity resulting from social interactions among humans).

Now, we are creating our own, new kinds of complexity that didn't exist before. Software isn't there to help us manage complexity, it is adding to the complexity of our world, and dramatically so. That moves education backwards.

comment 9y ago · link · parent

If everyone took the time to really learn and understand advanced undo/redo, I wonder how that would change our thinking? Might we find all kinds of new ways to apply it in the physical world?

Maybe the reason people find it hard now is just the limit of natural languages as they exist today. We haven't made time travel, alternative realities, and hypotheticals a part of our ordinary speech (beyond trivial cases), but maybe we should?

comment 9y ago · link · parent

Simplicity is closely related to education, and education is closely related to freedom.

How are we supposed to take education seriously when we create devices of such complexity that they are essentially magic, and hand them to students?

Before computers, complexity always had tight upper bounds. A watch could only get so complex before it wouldn't fit in its housing; and a car could only get so complex before it could not be efficiently manufactured/repaired. With computers, there is no upper bound to the complexity.

We are now overrun with complexity, but it's hard to see how to fix that. A business that puts blind faith in a complex system to do something slightly faster/better will probably win against a business that tries to truly understand what it's doing. An employee who just keeps adding to the complexity will probably win against an employee stepping back to simplify things. A consumer who makes convenient choices about complex things without asking many questions will probably find life easier.

comment 9y ago · link · parent

Many of Alan Kay's concepts will take not only time, but also some kind of catalyst to gain acceptance. What might that catalyst be?

comment 9y ago · link · parent

"If you can assert that after loading new code from a file, ..."

You are arguing about technical details, and I am arguing about architecture. The only way you will agree with me is if you zoom out a bit, and look at it from the developer's point of view:

* To deploy a bugfix, did the developer have to take the system down for maintenance and/or interrupt service? The answer for both PHP and erlang is "no".

* Does a runtime exception/crash bring down a large part of the system, or is it isolated as much as possible (often to a single request)? The answer for both PHP and erlang is the latter.

Those are two of the biggest claims erlang can make, and PHP can make them, too. Either the erlang community has a lot of difficulty communicating the advantages, or they aren't quite as unique any more (though perhaps they were at one time).

Now, erlang does have it's place. It's great for handling arbitrary protocols and getting a reliable, performant network daemon going quickly[1]. The binary pattern matching is awesome. The erlang shell allows you to have a point of entry to find out what's going on in a system while it's running. Really awesome stuff.

[1] I wrote one such daemon, replacing a bunch of python and finding a lot of bugs in the original along the way. The erlang version was about 50% as many lines of code, even though I wrote out all the typespecs and had to reimplement some things that the python version got for free. But the service was tiny, so you're right, I'm not an erlang expert.

comment 9y ago · link · parent

"there is virtually nothing in common between PHP and Erlang, other than them both being programming languages. The comparison is entirely fallacious"

I just disagree. When I was reading an erlang book for the first time, that was one of the first things I thought: this sounds like the architecture of PHP working against a database.

Hot code loading? I do that all the time -- just FTP the file, and the module will see that it changed and run the new version.

Let it crash? Sure, PHP can do that too -- one runtime exception on unexpected input doesn't affect the other requests at all.

By the way, I happen to like erlang and find PHP unpleasant to use and scary from a security standpoint. But I think a lot of people underestimate how good the PHP architecture was in a lot of ways.

comment 9y ago · link · parent

My reasoning is something like: "if these simpler database semantics matter, then maybe you should look at the more sophisticated semantics postgres has to offer".

If you get my point but find flaws in my argument, well, I can live with that. Counterpoints welcome.

comment 9y ago · link · parent

If you agree with my point then it's not hard to see how postgres is more friendly:

You can write a function in python (or a number of other languages) and share code with your application, and use those functions almost anywhere in postgres (including unique indexes). That makes the unique indexes much more powerful, especially if you want to adapt to changes without rewriting all your data.

Or, you can use range types and an exclusion constraint to form a non-overlapping constraint that prevents schedule conflicts:

https://www.postgresql.org/docs/10/static/rangetypes.html

There are tons of examples and others list them all the time. The problem is that a lot of people read past them because they don't see why semantics matter.

comment 9y ago · link · parent

"And PHP has very Erlang-like "let it crash" semantics if you squint your eyes: one request causing havoc will not affect others at all, especially if you use a transaction to control DB side effects."

Exactly my point, thank you for clarifying. PHP crashes (in some form or another) all the time, but the application can still remain up because that PHP process only has state for the one request (kind of like a single erlang process having state for only one request).

comment 9y ago · link · parent

If you think haskell would make a good database language, you're probably right. It's a lazy, statically-typed, type-inferred, declarative language with tightly-controlled side effects -- just like SQL.

But in its current form, Haskell is just not a DBMS. So, it must rely on a DBMS like postgres or mysql, and the semantics of the DBMS matter very much.

And yes, I can compare SQL to Haskell, and I did a while back:

http://thoughts.davisjeff.com/2011/09/25/sql-the-successful-...

comment 9y ago · link · parent

This is really about database semantics. If you think database semantics matter, you'll almost certainly prefer postgres.

A lot of people simply don't care about database semantics though. Possible reasons:

* They are more interested in a particular application (e.g. wordpress), and use whatever default database it seems to prefer.

* They are more interested in a particular framework/library (e.g. django), and use whatever database it seems to prefer.

* They don't see any reason a database should have interesting semantics, because it's just a place to stash data until you need it again.

* They really care about programming languages, but see SQL as a second-class citizen that looks archaic and is really just an obstacle to work around using cool language features.

I believe database semantics do matter. It's hard to make a single argument that will convince everyone, but here are a couple things to consider:

* SQL catches errors that may be impractical to catch even with haskell. For instance: you could have had a bug in the application three versions ago that lead to an inconsistent database state (e.g. a duplicated item ID), and you are just finding the bug now. SQL to the rescue: if the unique constraint exists, then you are fine, and the error would have been raised three versions ago before it ever got in the database.

* Few languages have anything that comes close to ROLLBACK. Erlang kind of does, in the sense that it's a mostly-functional language and a process crash mostly resets you to a good state. But the guarantees of ROLLBACK are much stronger and clearer. I believe this is actually why erlang never really took off widely -- a PHP script hitting the database is a better version of the same concept: the PHP code can crash, and that will cause a lost connection and a ROLLBACK in the database, getting you back to a known-good state and the other requests just continue working (security and other PHP jokes aside).

Rambling a bit, but I believe postgres really is the leader when it comes to database semantics, and I believe that is one of its most important contributions.

comment 9y ago · link · parent

"Alcohol: the cause of, and solution to, all of life's problems." -- Homer Simpson

comment 9y ago · link · parent

"The ability to cause destruction overseas is of secondary concern"

No, that's my primary concern.

If your calculation is off, and they do attack, or scare someone else enough to attack them, the result will be horrific.

And you seem to assume the situation there is stable and KJU will behave rationally. If domestic politics in NK get complicated or KJU gets too paranoid, there's no telling what he will do.

comment 9y ago · link · parent

How does that help in the case of the DPRK?

comment 9y ago · link · parent

I know there are lots of outrages going on today, but put in perspective, the situation with North Korea is far and away the gravest concern.

We are talking about literally millions of lives at stake -- perhaps many more if it gets out of control and becomes a war involving both China and the US.

I don't have a solution, but I think we need to be prepared for tough choices. It may be that no good outcome is possible at this point.

comment 9y ago · link · parent

Imagine somebody placed a classified add saying:

"Free wheels. Find them on the car in the driveway at 123 Main St. Also help yourself to the backyard furniture."

And you live at 123 Main St.?

comment 9y ago · link · parent

If you have to start giving reports, it kills creativity. The point is to do something everyone else may think is irrational, but you feel would lead somewhere interesting.

comment 9y ago · link · parent

It's the same group of people, they just may be in different moods at different times.

comment 9y ago · link · parent

Interesting. Can you please share the article?

comment 9y ago · link · parent

Interesting. Then rust should not care about the destruction order, right?

comment 9y ago · link · parent

Thank you. I will look into these and give it another try.

It's a good point that maybe I should just have the right expectations here, and expect data structures to be hard in rust.

I looked around a bit and it looks like these thing are quite challenging in haskell as well.

comment 9y ago · link · parent

But in my example this is not hard to get right in C. The tree is constructed (on the stack would be fine), then used for a while without mutating it, then freed all at once.

The thing that makes this hard in rust is destructors. If there's a cycle between A and B, and you destruct A first, then B, then B's destructor would see a dangling reference to A. And vice versa if you destruct B first.

But I don't need destructors, or at least ones that can see these references, so it's frustrating.

1
363738
87