Better HN
topnewbestaskshowjobs
Log inSign up

rtpg

21,281 karma · joined Nov 23, 2012 (14y ago) · 6,748 submissions

real name: Raphael

blog: https://rtpg.co

email: raphael at above domain

Submissions

comment 11y ago · link · parent

how does that end up working for typechecking? does the Map module end up having all the properties of the intersection of these elements?

The Map example seems pretty easily solvable via Haskell through typeclasses or the more standard OOP-y languages through interfaces, but am I missing something? Does SML not have the tools for this right now?

comment 11y ago · link · parent

it's hardware dependent, but I was ruining my hearing until I realized that in fact I don't need to turn up the volume from those notifications. Ears can work much like eyes do in the dark/quiet and adapt.

I wonder what the potential output volume range for unpowered headphones is for the volume set at, say, 40% in windows.

comment 11y ago · link · parent

In France there's the issue of train lines basically starting and ending in Paris mean that flights are pretty quick cutting across the country (Lyon-Nantes for example).

But I think most people see domestic flights as a bother more than anything. The love for trains shows in the stats (second biggest per capita usage of trains after Japan), train stations are usually in the dead-center of town, and you don't have to deal with luggage limits.

comment 11y ago · link · parent

sure, but wasn't it in 1968 or something where there was basically 200 plane hijackings? I feel like there's good intentions at least

comment 11y ago · link · parent

I think everyone acknowledges things have gotten better, but the effects of institutional racism are pretty long-term.

Just an example, but up until maybe a generation ago, it was nigh-impossible to get a mortgage on your house if you were black or decided to live in a neighborhood that was less than 95% white. Even when going through federal aid programs.

Meaning people end up having to go through what are basically loan sharks to get housing for their family, and if anything at all happened, the house is lost instantly. Makes it pretty hard for the grandparents to retire in their tiny house when nobody actually owns the property.

I think the crime level stats are usually confounding with poverty rates. Pretty sure the color of one's skin doesn't make it more likely to kill someone, but there's an argument for poor environments (for example, the worst apartment possible because literally no one else will rent to you, in an area with poor social services) helping spawn crime.

comment 11y ago · link · parent

>African Americans serve virtually as much time in prison for a drug offense (58.7 months) as whites do for a violent offense (61.7 months). (Sentencing Project)

I think the fact that blacks are given much less lenient sentencing is enough to put the game largely in the oppressive class's favor, and to call the system racist.

And, if purely by statistics, it's hard to argue that this skewing is because all of these people are drug dealers (if they're all drug dealers, who are they selling to?)

comment 11y ago · link · parent

Is Rust not ready? Maybe part of the challenge is writing it in Rust

comment 11y ago · link · parent

Just a practical consideration, but the HTML table tag is actually a lot more restrictive (<table> can only contain <thead> <tbody> or <tr>, so no wrapping span to regroup some table rows) than using <div>s. Can be important depending on third party libs.

comment 11y ago · link · parent

It's actually a consequence of the CSS box model, which makes a lot of other things simpler, and means that figuring out how to position things isn't turing complete or something.

I think the secret is that maybe 10% of CSS writers actually have read more than the bare minimum to getting their layouts to work ( I am not among them, mind you).

comment 11y ago · link · parent

We've started expirementing with using Typescript, and this alone relieves this issue of knowing whether your object is jQuery-wrapped.

But honestly,the $-prefixed variables is so commonplace that I mostly treat it as gospel

comment 11y ago · link · parent

I didn't realize there wasn't a quorum rule

comment 11y ago · link · parent

Pretty sure the burden is on the car to ensure safety, since they are the one operating heavy machinery in public, instead of just walking.

It actually does make sense to blame the driver for their behavior.

comment 11y ago · link · parent

this might be a silly question but why can't they use parachutes? wouldn't a mostly empty rocket float? or is there an issue with the salt water and whatnot

comment 11y ago · link · parent

car technology was 50 years less mature, but are our brains any better? There's a lot of studies showing the strong correlation between speed limits and car accident fatalities, even recently

comment 11y ago · link · parent

In the world of Enterprise software (which is where most of the money actually is), most peoples needs _aren't_ that different. Basically everyone is writing CRUD + data summaries.

I'm curious as to why you think JQuery is a framework. From my view of things, it seems to be a library in all definitions I've encountered.

comment 11y ago · link · parent

One thing brought up in the article is that currently French surveillance services are basically working carte blanche, with absolutely no legal checks.

Le Monde had a set of articles about some of this surveillance framework brought to light by the Snowden leaks, but of course the French press didn't talk about it, since the NSA stories were somehow "more relevant to the public".

For all the fingerpointing at the US for the Patriot act and the NSA, France's surveillance state is pretty ominous and there are basically no rules.

comment 11y ago · link · parent

If you assume that there actually is no issue at Tor, how would the message be different? This could just be that the top guy is leaving, and this is their way of reassuring that it's still business as usual, and everything _isn't_ falling apart.

Of course that's the sort of message that you write if it is falling apart as well, so I guess this is basically a contentless press release on that part.

comment 11y ago · link · parent

I don't think the story is meant to convey truthiness, but kind of a silly story. Maybe something about leaky abstractions or the perils of black-box thinking?

I'm sure an FP nerd could extrapolate and use this to point out the importance of referential transparency

comment 11y ago · link · parent

I like the design of the new signs, but is it easy to read? I'm not a driver and I have pretty bad vision, but it seems like it would be hard to understand from the driver's seat.

comment 11y ago · link · parent

I think this is just a thing, like any software projects, where there's a list of bugs, and you try to fix as many as you can.

And when they're not fixed, the support team needs to write _something_. I can sympathize with whoever wrote this. I imagine working for the IRS has its own set of stresses (esp. considering this is stopping people from getting their refunds or whatnot too)

comment 11y ago · link · parent

because it's not America as whole who got together to do it, it's a couple people who live in the country who do it. At least that's how I see it.

"America rejects Bush, elects Clinton" makes sense because it's talking about something the country as a whole did. But saying "America builds the creationist museum" can be read as "this was built with a non-minimal amount of popular support, is representative of how americans see things as a whole, and should be placed on the index card describing the country and its people"

5332.

United States dollar almost doubles in value in a single day (2013)(coinion.com ↗)

2 points · by rtpg · 11y ago · discuss

comment 11y ago · link · parent

I know this is off-topic, but ascribing a country as the "doer" for this sort of story frustrates me a lot.

I'm sure people would be up in arms if "America builds Creationist museum" was a headline, so why should we do this for other places? It's not even hard to rewrite! "First hotel entirely operated by robots to open in Japan"

comment 11y ago · link · parent

there's a lot of listicles but it drives some high-quality journalism.

Check out this amazing article covering the writing of the AUMF after 9/11 http://www.buzzfeed.com/gregorydjohnsen/60-words-and-a-war-w...

5335.

Save HTML Form State in LocalStorage(github.com ↗)

3 points · by rtpg · 11y ago · discuss

comment 11y ago · link · parent

on the inverse, why are there any TLD restrictions at all? Why can't google get google.chrome? It's just a text field, after all

This is a serious question, because I know a lot of people are against the expansion of TLDs (now I wouldn't have put .sucks on the top of my list for expansion, but...) and I haven't seen a real argument against it.

comment 11y ago · link · parent

I think this is very similar to arguments about gov't regulated minimum speed broadband. Especially considering airports and the like are usually built with massive gov't support.

And free market arguments do not really apply here I think.If I need to get from NY to Paris in less than 2 weeks, I have no choice but to get onto a plane.

I think standard minimums make absolute sense, because there's not a free market, since people are basically forced to travel by plane (at least for international flights). That or getting rid of reclining seats...

comment 11y ago · link · parent

I think the thing is that he knows this is the beginning of many more seizures for him. Much like Lehman failing triggered a huge chain of events (to take the guy's own analogies).

So for him, he's looking to save his business. Doesn't mean we should bail the guy out, but the situation might be much graver than that 87 number might imply.

comment 11y ago · link · parent

python's warnings library is good for this

For example, in our application code, we'll use a warning for some type coercion for example

    if isinstance(obj,Bar):
        warnings.warn('Using a Bar as a Foo!')
In production, this will just print a message to the log. So this is useful for things like phasing out old behavior, where we try to stop using it but don't want hard failure if it's used for now.

But in our tests, we do want hard failure (so we can phase out the behavior as much as possible before removing the functionality). So we do something like the following:

    if TEST:
        warnings.filterwarning('error','Using a Bar as a Foo!',RuntimeWarning)
Which basically says "if I receive a warning matching the regex given, then raise an error instead of just logging". So if I hit that code path during tests it will fail the test.

It's very useful, even if warnings is a bit too much about regex matching for my tastes

5340.

How to Sell Excellence(docs.google.com ↗)

2 points · by rtpg · 11y ago · discuss

1
177178179
225