Better HN
topnewbestaskshowjobs
Log inSign up

wireprotocol

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

Submissions

comment 6y ago · link · parent

What is an example of a simple, serial ocaml program and how you would change it to use parallelism?

comment 6y ago · link · parent

I feel like we are conflating a civil issue (qualified immunity) with criminal issues like murder.

comment 6y ago · link · parent

Widely-shared responsibility and widely-shared credit don't have a great track record for accomplishing amazing and bold things.

comment 6y ago · link · parent

Would there still be an independent judiciary?

comment 6y ago · link · parent

"But qualified immunity prevents those who care to take recourse from acting to take recourse."

If a cop murders someone, we need a way to get them into prison, not a way to sue them (or sue the taxpayers).

More bodycams, more dash cams. Maybe every arrest video should be reviewed by an independent organization even without a complaint. Usually bad behavior starts with little things, and its easier to correct before it escalates.

comment 6y ago · link · parent

Isn't qualified immunity only for civil suits? Police can still be criminally charged.

Perhaps police aren't charged criminally when they should be, but that doesn't seem to be because of qualified immunity.

Suing over murder is not a great recourse, anyway. You still lost your loved one, and the individual you sue probably can't pay you much.

comment 6y ago · link · parent

It's about having any specific goal, really.

Money is more of a general goal, like happiness. Hard to stay focused.

comment 6y ago · link · parent

You only do new things if you believe you will fail if you don't.

Established companies have an expectation of success if they just keep doing what they are doing, so anything new is an unacceptable risk.

comment 6y ago · link · parent

You still have to scan the oldest generation at some point; otherwise (assuming some activity) you'll be leaking memory there over time.

Moving the work to another core doesn't really change my statement.

Aside: I wonder if it's feasible to switch to reference counting for the oldest generation? That would move the problem back to deallocation. I'm not sure if that's a good trade-off, but it would be interesting.

comment 6y ago · link · parent

People who feel passionately about something impractical can get pretty creative trying to justify their passion. The creativity is the output here -- not the stated goal.

comment 6y ago · link · parent

A fair point. But a similar argument could be made about speech and the press. It's at least a little scary.

comment 6y ago · link · parent

But haskell could offer so much more. A good type system would be huge. Just replacing NULL with Maybe would be huge. A lot of other ideas could come out of it.

And people care about correctness in a way that they don't with python or javascript. Haskell really has something to offer.

comment 6y ago · link · parent

I'm sure there are some counterexamples, but for the most part most SQL implementations will fail to compile a query if you try to add a string to an integer or take the average of a date column. So I'm not quite sure what you mean.

And type inference also plays a role with CASE statements, UNION, etc. Again may depend on SQL implementation.

comment 6y ago · link · parent

"The hard economic truth for engineers is that technical excellence is overwhelmingly irrelevant"

No. Technical excellence matters a lot when used appropriately, but competing with javascript and python is not where haskell is going to win.

There IS a language with HUGE success that is: declarative, strongly typed with type inference, lazy, and no side effects. It's called SQL[1].

That's where Haskell could shine -- compared with SQL. Imagine Maybe rather than NULLs, a sane language, multiple returns, a much better type system, etc. Python and Java can't touch SQL, but haskell could.

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

comment 6y ago · link · parent

"If black powder and shot for a muzzle loader are available, has your right been abridged?"

Your idea has been deemed dangerous by the internet police, and your ISP connection will be cancelled. Don't worry, you are still free to write a letter to your local newspaper, so your rights have not been infringed.

Our rights are naturally extended with technological advances in the same spirit. Demanding cell tower records is considered a "search" and twitter is "the press".

comment 6y ago · link · parent

"I'm personally mostly OK with rifles, except automatic rifles with large capacity magazine."

You mean semi-auto or fully-auto?

I ask because many states in the stats I offered allow pretty much any semi-auto rifle to eligible people with little restriction, and the deaths are still lower than knives/fists. While I agree that some rifles are scary, the data just don't seem to justify restrictions on semi-auto rifles regardless of magazines.

I think all states have laws against brandishing or threatening people with any weapon.

I generally agree about background checks, but some laws are pretty extreme, where it prevents reasonable sharing, and I don't agree with that.

I am not aware of any real problems with open carry demonstrations other than they make people uncomfortable. That doesn't seem like a great reason to pass a law, but I don't see a big problem having a law like that in city limits. You need ways to allow people to legally transport though, which should include walking.

comment 6y ago · link · parent

I think the order was reasonable but let's remember that something lies between being forced to do something and being forced not to do something. What lies between is freedom, and it's a much larger space than the two extremes combined.

The Rabbi might use his freedom to leave his synagogue open, close it until we defeat coronavirus, or close it until defeat all transmissible contagious disease.

comment 6y ago · link · parent

Although I happen to agree that, in this case, the order respects the freedom of religion; I also appreciate the dissent.

I'd be disturbed if there was no hint of dissent when something pretty clearly goes against the text of the Constitution. We should all have a bit of hesitation as this unprecedented stuff is happening, and make sure it's not permanent. Let's remember that this is all not normal, so hopefully we can somewhat get back to normal with our rights intact.

comment 6y ago · link · parent

Allowed the whole time in all California jurisdictions, or allowed now (after lawsuits)?

comment 6y ago · link · parent

I read the article I linked again and did not see any indication that Bullseye Bishop was given options to stay open. Where did you get that from?

comment 6y ago · link · parent

"I’m strongly in favor out stronger gun control but find your argument here reasonable."

A few genuinely curious questions.

First, would you rather there was just no 2nd Amendment at all? I can understand that point of view.

Second, let's assume there is a right to bear arms, and that it's not going away. Do you think all of the little half measures are actually helpful? Stuff like how you can buy ammo, or what models of guns are acceptable, or what kind of grip or stock a rifle can have?

Third: rifles. Not many killings happen with rifles. They are lower than knives, and behind even fists/feet[1], even in states with very permissive rifle laws. What do you think about removing pretty much all restrictions on rifles (and accessories, including suppressors[2]), and instead restricting pistols more heavily?

[1] https://ucr.fbi.gov/crime-in-the-u.s/2018/crime-in-the-u.s.-...

[2] For most rifles, a normal suppressor just reduces the sound from "instant permanent hearing damage" to "louder than a jackhammer and you still probably want hearing protection".

comment 6y ago · link · parent

It appears San Jose took a strong stance at least at one point:

https://www.mercurynews.com/2020/03/18/coronavirus-san-jose-...

Not sure the current status, but I'm sure a lot of lawsuits happened.

comment 6y ago · link · parent

You actually want the gun stores to remain open. Why? Because closing them just feeds into the hoarding mentality that causes people to buy irrational numbers of guns when they are available. If someone feels like they can walk into a gun store any time they want and buy a gun with no hassle, they won't be in any rush. And for certain kinds of people, there's a big element of "the government doesn't want me to have this thing... here's a pile of cash, I'll take 12 and stick it to 'em".

Since you asked, the right to keep and bear arms includes the ability of ellegible people to buy them, along with ammunition, and make use of practice/training facilities.

Part of having a right means you don't need to explain it to anyone else. You can exercise your right, and if someone is curious why you did what you did (past tense), then you can choose to explain it to them. Nobody gets to ask "why" as a condition of exercising a right; otherwise it's not a right, it's a privilege.

comment 6y ago · link · parent

The background-check-for-ammo law is a constitutional disaster. There was recently an injunction against the AG enforcing it, but the ninth stayed the lower court's order.

I read the decision granting the injunction, and wow. The ID requirements are even higher than for buying a gun -- you need certain kinds of ID that proves that you are a citizen (passports can take a long time to get, and some people have complications with their birth certificate). For those who were able to provide such an ID, the background check falsely rejected 16% of applicants, amounting to over 100K people.

I really think that people would be more willing to compromise if they felt that their rights were respected. But what a lot of people don't realize is how outright hostile these gun control laws are. They are meant to penalize and annoy gun owners, not provide safety.

Another example is the handgun roster in California, where you can only buy certain models that were approved before 2013. They aren't safer, they just made the new standards infeasible to meet, so no more models are approved. This doesn't help anyone, unless you think annoying gun owners is a worthwhile goal.

comment 6y ago · link · parent

The difference between respecting a right and not can be seen by how much restraint goes into crafting the law. The details can get murky, but often the spirit is plain to see: was a good faith effort made to specialize the law to the problem being solved with minimal interference on any rights?

Here, the California order doesn't ban going to church, it places additional building capacity and total attendance limits.

There are complications though -- the longer these emergency orders drag on, the more skeptical we should be. They should be reviewed frequently, enforced moderately, and lifted promptly along with other similar activities. Surely it would turn into disrespecting the right if ballparks and concerts reopen first.

Another complication is the idea of protests. While limiting the capacity of a church doesn't completely deny religious services; limiting protests strikes more at the heart of the first amendment and our ability to challenge decisions at all.

The closing of gun stores is also problematic. It seems many gun stores in California have been ordered completely closed (not sure about state/county/city status), when other retail establishments remain open. A farmers market near my house is offering pony rides, the Starbucks and the Baskin Robbins are open, as are liquor stores and probably dispensaries. I think there is a real Constitutional issue there, and if it makes it to SCOTUS I would expect an injunction allowing gun stores to remain open.

comment 6y ago · link · parent

The ruling has not been issued. This is about an injunction before the ruling.

comment 6y ago · link · parent

"Generational/compacting GC has the opposite problem. Garbage collection takes time proportional to the live set, and the amount of memory collected is unimportant."

Takes time proportional the live set times the number of GC runs that happen while the objects are alive. In other words, the longer the objects live, the more GC runs have to scan that object (assuming there is enough activity to trigger the GC), and the worse GC looks.

comment 6y ago · link · parent

Speedup numbers should be given when optimizing constant factors -- e.g. "I made this operation 5X faster using SIMD" or "By employing readahead, I sped up this file copy by 10X".

The points raised in this article are really different:

* don't do slow stuff in your latency-critical path

* threads are a nice way to unload slow stuff that you don't need done right away (especially if you have spare cores)

* dropping can be slow

The first and second points are good, but not really related to rust, deallocations, or the number 10000.

The last point is worth discussing, but still not really related to the number 10000 and barely related to rust. Rust encourages an eager deallocation strategy (kind of like C), whereas many other languages would use a more deferred strategy (like many GCs).

It seems like deferred (e.g. GC) would be better here, because after the main object is dropped, the GC doesn't bother to traverse all of the tiny allocations because they are all dead (unreachable by the root), and it just discards them. But that's not the full story either.

It's not terribly common to build up zillions of allocations and then immediately free them. What's more common is to keep the structure (and its zillions of allocations) around for a while, perhaps making small random modifications, and then eventually freeing them all at once. If using a GC, while the large structure is alive, the GC needs to scan all of those objects, causing a pause each time, which is not great. The eager strategy is also not great: it only needs to traverse the structure once (at deallocation time), but it needs to individually deallocate.

The answer here is to recognize that all of the objects in the structure will be deallocated together. Use a separate region/arena/heap for the entire structure, and wipe out that region/arena/heap when the structure gets dropped. You don't need to traverse anything while the structure is alive, or when it gets dropped.

In rust, probably the most common way to approximate this is by using slices into a larger buffer rather than separate allocations. I wish there was a little better way of doing this, though. It would be awesome if you could make new heaps specific to an object (like a hash table), then allocate the keys/values on that heap. When you drop the structure, the memory disappears without traversal.

comment 6y ago · link · parent

"Based on its license it's very hard for any one company or individual to 'own' Postgres"

I know you already know this, but it takes a lot more than just a license. I'd like to call attention to the very enlightened (and noble) work others have done to build a robust political structure and community for Postgres.

The core team, committers and major contributors are spread across many companies and continents. There are different foundations across different regions for handling finances, trademarks, domains, and other basic business operations.

Amazingly, a lot of this structure was being put in place a long time ago, when Postgres was still the weird database option to choose.

1
456
87