Better HN
topnewbestaskshowjobs
Log inSign up

wireprotocol

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

Submissions

comment 13y ago · link · parent

Learning erlang here. I wish I had seen this article before -- I haven't even finished reading it yet and it's already nicely explained some things that confused me for a while before.

For instance, the idea that IO doesn't necessarily go to the node the process is running on. That makes a lot of sense now, because in erlang, you don't want to be too concerned about which node a process is running on.

comment 13y ago · link · parent

"but less experience -is- a lower standard"

  * If they are hiring for junior positions, perhaps not;
    perhaps they just expanded their junior engineering team.
  * If nobody hires junior female engineers now, there will
    be no senior female engineers later.

comment 13y ago · link · parent

How did you get all of these details? I would assume that some are in dispute -- e.g. the tip left on the table (how would we know unless both sides confirmed?).

comment 13y ago · link · parent

"It seems I was fired not because Applebee’s was represented poorly..."

Actually, that is probably why she was fired. Saying something publicly about a customer, especially in a way that could look bad for the customer, does not reflect well on the restaurant.

If you interact with customers, it's your job at risk. The customer is sometimes, but often not, risking much by being rude in one way or another. Is it fair? Maybe not. But that's unlikely to be a productive discussion.

comment 13y ago · link · parent

It seems like this is what the FDA is designed to do.

Cost of FDA: someone might miss out on a beneficial treatment because it has not been reviewed by the FDA (and may never be, given the cost of FDA approval).

Benefit of FDA: prevents charlatans from fleecing medically-ignorant people (which is pretty much everyone) of their life savings just before they die, which might be better spent on proven treatments or left as inheritance.

At some point, we decided that the benefits were worth the costs.

Unfortunately, the benefits tend to be obvious and the costs tend to be more hidden. That usually results in overdoing it (in this case, perhaps overburdening the development and use of new treatments).

comment 13y ago · link · parent

What is the problem with that reasoning? Not liking and failing out of school is not a medical problem.

comment 13y ago · link · parent

He ended up in the psychiatric hospital after the abuse had already gone on for a while. Why do you say that he most likely had "psychological issues to begin with"?

comment 13y ago · link · parent

I think the challenge is that they are prescribed so casually with so little monitoring.

I guess we could just say that he's an adult, and can OD if he wants to. But I cringe at the damage that can do.

comment 13y ago · link · parent

Do you have specific suggestions, aside from not grading on a curve (which is common but certainly not universal)?

comment 13y ago · link · parent

Oh, I see. Thank you.

After asking around on IRC, I found out about CEAN, which looks like it's trying to be a central clearing house. But it's a little strange looking compared to ones that I'm used to... it doesn't look very community-oriented. I couldn't even find a license file for CEAN itself.

But it looks like rebar offers a lot already, so I'll look into that more.

comment 13y ago · link · parent

I've been trying to learn a little erlang for a while. One of the things that holds me back is the external libraries. If it's a part of erlang/OTP, then great, usually I'm happy with it.

But it's hard to find, install, and update external libraries compared with many other languages (like haskell/cabal, ruby/gems, etc.). How do you deal with that on a practical level?

comment 13y ago · link · parent

Thank you. I knew that Datomic existed, and some of the basic things you pointed out here, but I'll take a closer look. It seems like you really think it has a lot of promise.

That being said, I don't think CRA is a panacea. Databases will always have a "read, decide what to do, write" pattern (because that is what happens in the real world, and databases model the real world). If the read happens at time T, and the write happens at time T+100; then you could have a race condition if something happens at time T+50.

Postgres can detect such race conditions by using true serializability (based on a technique called Serializable Snapshot Isolation[1]). It gets tricky to apply the same technique for temporal databases, though I believe it's possible. Do you happen to know what techniques Datomic offers users to help avoid/detect/resolve race conditions?

Don't get me wrong. I think it's a very useful direction to go in. I've done a lot of work on temporal features in postgres. I'm also aware of some of the limitations, however. You still need some kind of coordination and something resembling locks or a conflict detector.

(By the way, please avoid derogatory comments about people who make different technology choices than you do. An argument could be made that postgres is CRA. And even if not, CRA versus CRUD is a small part of what is actually important to users; many of whom face a different set of trade-offs than you do.)

[1] http://drkp.net/papers/ssi-vldb12.pdf

comment 13y ago · link · parent

"[SQL] is way too simplistic for comparison with real world functional programs"

Another way of interpreting that is that the ideas behind SQL are so powerful that it's able to be one of the most successful programming languages of all time without all the bells and whistles of a language like haskell.

It's so successful that it can get by with horrid syntax, a ton of special cases built in, and the mess of SQL NULL semantics.

Sometimes it boggles my mind that more functional programmers don't get involved in databases, where all of their ideas are already proven to be useful.

I don't necessarily disagree with you, depending on what you mean by "real world" programs. I just think that if there is already an area where the concepts are useful (whether you call that a "real world program" or not), it makes a lot of sense to keep trying to build from that. Trying to convince someone to learn haskell to build a website when they already know and like ruby is an uphill battle.

comment 13y ago · link · parent

In many ways, SQL is the case that proves how important and practical some functional language ideas are. SQL is, by many measures, one of the most successful programming languages of all time.

comment 13y ago · link · parent

I would add to that: being a cab driver out of college doesn't mean you are making a career out of it. It's called an "entry-level" job for a reason.

comment 13y ago · link · parent

I disagree that MySQL is a better choice when you have "faulty" data:

* In postgres, you have PL/python (or PL/V8JS, or perl, or many other languages) to help you through the mess. For instance, you could write a canonicalization function to help you put the data into a more-queryable form. You can then even index on that function.

* Powerful triggers might help with post-processing, or putting data into some queue of "bad data" that needs to be cleaned up later. Maybe by doing so, you realize that the data isn't "bad", your schema just needs to be updated to reflect new interesting cases.

* You can pull data in from remote sources with foreign data wrappers, which might be necessary to clean the data up properly (e.g. one extra join against the company LDAP directory using the email might be able to canonicalize those employee names).

* You can catch errors using subtransactions and have a different processing path for data that doesn't fit in the schema.

Maybe some of these features exist in MySQL (I haven't been a real user since around 2003, aside from a bit of administration). But in postgres, these features all work together seamlessly along with all of the other features in postgres to make it all work nicely and without a pile of caveats. And that matters a lot when trying to wrangle strange data.

comment 13y ago · link · parent

"Better to deal with the exceptions up-front"

That may be, but when an application developer is developing, they primarily need to get data into the database. That may be right or wrong[1], but it has a big impact on the adoption of particular database systems or practices.

And it's somewhat irrelevant to this discussion, because there are many ways you can feed the data you want into postgres (like declaring columns BYTEA, TEXT, or HSTORE), no matter how "bad" it is. I would argue that it's much easier to deal with "bad" data in postgres than mysql because you have so much flexibility (e.g. write a function inside of postgres in PL/python to get some meaning out of the ill-specified data; or write some triggers to do post-processing).

[1] I personally think that a misalignment of incentives is responsible for the widespread focus on the ease of writing into a database without considering the utility of the data once it's in there.

comment 13y ago · link · parent

"PostgreSQL is pedantic with data insertion, almost to a fault."

The PostgreSQL philosophy isn't about being "pedantic", but it is very different from MySQL. I assume that you have much more experience with MySQL; maybe you are trying too hard to use postgres in the mysql way rather than the postgres way?

Personally, I don't think it's a good idea to migrate usually for this reason. The entire project development always has lots of built-in assumptions about how the DB will be used, so the new system is almost never quite the right fit. It can only work in trivial cases, or when you have the right expectations.

comment 13y ago · link · parent

Cool project. I expected to be underwhelmed, but when I saw the dependency stuff, I was impressed. Maybe it should include a hook so that it can detect dataset changes automatically by running a separate command (or did I miss it?).

With a bit of creativity, I think there may be a lot of applications here.

comment 13y ago · link · parent

"impractical to refactor the schema"

Relational theory is intended to make it easier to achieve data independence, including various kinds of schema changes.

You did not offer an alternative, but I am very skeptical that whatever alternative you have in mind somehow improves matters.

"you can't stream data effectively"

If the currently available SQL products don't allow you to stream data effectively, and that's what you need to do, then use something else.

My point was what people are actually doing for IPC. And for the most part, it's using SQL databases. Even communicating between processes in a single application (e.g. related web requests served by different processes), SQL databases dominate.

comment 13y ago · link · parent

Well, it's not thought of as a "channel between two processes". Maybe more like a hub, except it actually stores data (which is similar to an async protocol that buffers/queues messages).

But that's all kind of irrelevant. The purpose that a database serves is a good replacement for other kinds of IPC. It imparts meaning to data and allows applications to communicate in a common way.

Think about it this way: every language has a different way of representing some missing value -- null, nil, undef, Nothing, None -- and all are slightly different. But the application is probably influenced by SQL NULL semantics more than any of those. (EDIT: reworded this paragraph)

Databases pretty much own everything, which is something I think that language people should spend more time focusing on. Maybe the reason that cool new language isn't 2X as productive as python is because you are still using the same database. Language designers need to focus on informed innovation in the database space if they really want to make an impact.

"including state transitions that change the acceptable messages"

That sounds an awful lot like DDL to me.

comment 13y ago · link · parent

In many ways, SQL is the protocol by which we combine programs together.

comment 13y ago · link · parent

I agree with the other comments here. It reminded me, unfortunately, that I did something like that once:

http://thoughts.davisjeff.com/2007/11/17/700-queries-for-one...

I can rationalize it in a few different ways, I'm sure. But the bottom line is that, if it's open source software, the correct approach is to either offer constructive criticism directly to the developers, or just not say anything without being directly prompted (e.g. "should we use this software").

I can see exceptions for major projects with a large developer base. You still need to keep it constructive, but I don't necessarily think you have a responsibility to join the mailing list for everything you want to complain about.

comment 13y ago · link · parent

Excuse me, but I am paying her salary, and granting her immense power. She owes me a better explanation if she wants to keep those things.

Aaron had a right to his freedom until convicted. Ortiz does not have a right to her job.

Sure, maybe I'm jumping to conclusions. Maybe she will clear her name tomorrow. But "business as usual" and "all the other prosecutors do it, too" doesn't cut it any more.

comment 13y ago · link · parent

CYA is more likely.

comment 13y ago · link · parent

Most people seem to be asking for her to be fired. I waited for a while to see more evidence appear, but at this point it looks pretty clearly like she abused her power. Asking for her to be fired is perfectly reasonable, not a mob.

I am much more concerned that she had that much power in the first place. I don't think she is any worse than many of the other prosecutors. I think we need to reign in the laws that prosecutors use in these situations.

A recent link also said that she liked to use civil forfeiture laws. I can't say I have much sympathy for her.

comment 13y ago · link · parent

"Cutting spending without losing quality of life is difficult."

But it's easier to cut habitual spending, and replace it with discretionary spending and maintain or increase quality of life.

You may choose to spend your limited money on a large house, a new car, and a boat; but with limited money for extras; or you can get a smaller house, a late-model used car, and have lots of extra money for social occasions and travel.

The former has a high level of habitual spending and you are locked in. If times are tight, even temporarily, you have to sell those things, often at a heavy loss. You are also very strongly attached to your current salary, which reduces your freedom to try a career shift of some kind.

The latter could also be a high quality of life, because you leave your smaller house to go on vacation twice a year, and you can enjoy spending on social events or conveniences. But you have much more freedom and flexibility in your life.

"In the vast majority of cases, you'll be cutting from social spending (going out less), convenience, or leisure."

What about getting a smaller house, or driving a late-model used car rather than a new one, or not buying that boat/plane?

"In every single case, getting an after-tax $10,000 raise is going to be overwhelmingly preferable to cutting your spending by $10,000."

That's true in the sense that more money is better. And cutting total spending (rather than replacing habitual spending with discretionary spending) can often reduce quality of life.

However, there are a lot of dangers in only focusing on getting raises. For one thing, a raise is not necessarily permanent, so it doesn't necessarily translate into more money. And it can lead you to increase your habitual spending, which is much harder to cut later than discretionary spending.

So, I think I would change my point slightly to be: keep habitual spending small, and grow it slowly in response to increases in income. To maintain a high quality of life, spend money in discretionary ways (e.g. "pay for it once") like vacations, conveniences, social outings. Oh, and renting does not necessarily count as discretionary, but it can.

comment 13y ago · link · parent

Cutting a spending habit without losing any quality of life is like an annuity and it increases your freedom. Getting a pay raise keeps paying you for a while, but has disadvantages like:

  * By definition, you have to keep working to keep getting it
  * Taxes go up
  * It may come with some implicit strings that
    require you to work more or carry more stress
  * arguably reduces your freedom
In our field, getting a pay raise might be the easiest way to improve your savings rate, but we should just keep in mind that reducing consumption has some important advantages.

And it's a good idea to practice reducing consumption now. If your income goes down or surprise expenses come up for any reason (not just retirement), it will help you get through it comfortably. It's a lot harder to increase your income in a pinch than reduce your consumption.

comment 13y ago · link · parent

OK, I agree now, thank you for the detailed explanation.

To summarize, you are saying that in my example, the programmer would almost certainly notice that it's a macro; at which point he would know to look at the documentation and it would still look like a referentially-transparent macro.

comment 13y ago · link · parent

I can think of examples where it works well to be distributed and ones where it doesn't.

PostgreSQL is a very distributed development group. There are small clusters of developers in many places throughout the world, but even then generally don't gather more than once per month. Sure, there are plenty of user groups and conferences, but it's not an every-week kind of thing.

And the postgres project really delivers. A strong release once per year with a variety of features; balanced between new innovations, performance, robustness, manageability, etc. It's hard to beat that.

I think the worst situation to be in is where you have very strong clusters and a few satellite developers or groups of developers. What happens is that the satellite developers are simply out of the loop, and don't even know what decisions are being made.

Either delegate components very clearly between remote groups, or go all distributed, or completely local.

1
737475
87