News for hackers. Stuff that matters.

rwjwjuwjudf

Re:N-queen puzzle in 4 lines of Scala on Sunday April 10, 2016 @06:16PM (#11468438)
Are there any programs that produce output before they are executed?
Re:N-queen puzzle in 4 lines of Scala on Sunday April 10, 2016 @05:57PM (#11468369)
Output is a side effect.
Re:Sample workflow for LP digitization on Sunday April 10, 2016 @05:40PM (#11468311)
He did say this, but maybe it wasn't clear. It's faster because you can skip the meaningless bureaucracy associated with obtaining copyright permission for a tiny run - a lot of dance music samples other music. If you try that with a digital release, it can bite you if it blows up.
Re:How an Idea to Develop a Safer, Smart Gun Backfired on Sunday April 10, 2016 @12:27AM (#11464895)
I think the original expression was poor, it could perhaps be paraphrased as "gun safety is an oxymoron".
Re:Ask HN: Best startup/tech movies? on Sunday April 10, 2016 @12:05AM (#11464835)
Pirates of Silicon Valley, Sneakers, Primer, Ex Machina
Re:How an Idea to Develop a Safer, Smart Gun Backfired on Saturday April 09, 2016 @11:08PM (#11464680)
Nice analysis! I was thinking safety is a function equivalent to negation. But I agree if safety and gun ownership are separate variables.

  p | safe (p) | ¬p | safe (p) ↔ ¬p
  --+----------+----+--------------
  T | F        | F  | Owning a gun is unsafely owning a gun.
  F | T        | T  | Not owning a gun is safely owning a gun.
I think this is the original reason why it's confusing, because the sentence "not owning a gun is safely owning a gun" is highly unintuitive. There is a contradiction because safely owning it conflicts with not owning it.

edit: I think we can legitimately fix the confusing sentence to read "not owning a gun is safely not owning a gun".

Re:Congratulations You’ve Been Fired on Saturday April 09, 2016 @11:00PM (#11464647)
Over my lifetime I feel like computers have gone from nerdy thing that nerds do to trendy thing that popular kids hire nerds to do badly and treat like garbage. I guess it's not really surprising that people known for poor social skills get taken advantage of like that, but still it bugs me because I identify with them.
Re:How an Idea to Develop a Safer, Smart Gun Backfired on Saturday April 09, 2016 @09:14PM (#11464315)
Oh come on, the claim is that safe (p) <-> !p, which is a bit different. Attack the actual claim.
Do you sit through television commercials without talking, getting up, turning down the volume, muting them, or looking away?
I think there's two things here.

The first is the implicit or explicit contract to view ads in exchange for getting to view content. Entering into a contract in bad faith or breaching a contract is both a legal and moral issue. When the terms of a contract are repulsive to me, I have no moral problem breaking them or lying about my intentions. I would let you pay me any amount of money to eat shit without proof and not follow through. You could always try and sue if that ended up being a problem. Generally though I won't enter into such contracts if there's a viable alternative.

The second thing is ownership of the property that's used to view the content. The argument here is that since it's my computer, I can control what my computer displays to me. I know that you have the copyright on the content and the ads, but copyright doesn't stop me from doing what I want with my own private copy so long as I don't distribute it.

So in the end, if you distribute content to me without verifying that I've viewed the ads first, you're putting yourself at risk for breach of contract on my part, and since I find ads repulsive it's a really high risk because it's my computer and I'm going to program it the way I want.

I'll readily agree that the content/ads thing is a problem, and that people deserve to make money for making things. But any fix to this problem is going to be systemic, not based on convincing people to play by the rules when they can easily get away with breaking them.

Alright, these are the statements that made me feel guilt / anger, along with the message I interpreted:

> If you walk up to me and ask for my newspaper without offering compensation, and I say "sure, but you have to first look at this pamphlet I'll hand you with it", then I think in this example it is clear that throwing the pamphlet away prior to reading the paper is morally wrong.

"You shouldn't accept my gift without reciprocating."

> For me, the arguments that fall along the lines of "once it's been sent I can do what I want" don't sit well because they feel anti-social in nature.

"Your arguments are uncivil, you should make different arguments."

I get your point about "For me".

> We don't act that way with the people around us, why should be expect it to be entirely different just because we can't see their face?

"You should not treat your property like it's yours alone."

> Unaccountability for poor behavior is a downside of anonymity, and something to to by mitigated, not accepted.

"Your behavior is bad, you shouldn't behave like that."

I hope this helps, and I understand that I may have misread you, it's just my reaction / perspective.

I think it's pretty simple, any time you're admonishing someone and telling them how they should behave, rather than how they have to behave, it's basically a guilt trip. It makes people feel guilt. This guilt is supposed to motivate actions you desire from the individual.

It's fine if you have your morals, but your morals are not my morals. And it's a more effective argument to talk about yourself anyway: "I view ads because I believe it's a fair exchange for the publisher's content."

So, while I'm kind of a hypocrite for saying you shouldn't guilt trip people, what I really mean is that I've found it's better to talk about my own morals than to tell people that I think they should have them.

Re:Jeff Bezos’ letter to shareholders on Friday April 08, 2016 @08:15PM (#11459161)
Hmmm, good point. Ok, if you count individual messages, there is more spam, but if you look at the kinds of spam messages, they are way less diverse. So spam goes into one of ~10 buckets (419, pharmacy, fake conferences, view my profile, etc.), but the rest goes into 1000 different buckets. But you still have a good point.
> For me, the arguments that fall along the lines of "once it's been sent I can do what I want" don't sit well because they feel anti-social in nature.

For me, guilt trips are anti-social in nature. And from a business perspective, they're a losing proposition, because over time people just stop feeling guilty.

Re:The Financial Industry Is Having Its Napster Moment on Friday April 08, 2016 @08:48AM (#11454226)
> the fact that everyone does have their marginal benefit and marginal costs for every good and service that can translate to a binary decision of whether they would purchase a good or service at a given price.

I think this fact is more like an axiom.

Re:Jeff Bezos’ letter to shareholders on Friday April 08, 2016 @05:08AM (#11453464)
Positive means you found the special thing you are looking for; negative means you just found an ordinary thing. False positive means you thought you found the special thing but you didn't, it was just ordinary; false negative means you thought you found an ordinary thing but actually it was special.

False positives mean you throw away ham as spam (terrible), false negatives mean you let some spam into your mailbox (not a big deal). But false positives also mean you diagnose benign as malignant (annoying), and false negatives also mean you diagnose malignant as benign (fatal).

So depending on what you are looking for, it varies whether false negatives or false positives are worse. Or maybe they can be equally bad.

I don't think you need to rename positive and negative as long as positive is understood as unusual and negative is understood as normal.

Re:React v15.0 on Thursday April 07, 2016 @08:02PM (#11451667)
The link you gave doesn't use the word implicit and actually says:

> Wherever possible, make sure you have an explicit license to any necessary patents held by the licensor.

Then it goes on to distinguish between weak and strong grants.

I think you mean weak, not implicit. AFAICT, there isn't an implicit grant with patent law, because the default is that you're infringing without an explicit grant.

The text of the link itself could contain copyright material. Google says the practical limit 10 years ago was ~100Kb, not sure now.
Well, you could do a double-blind test where you feed pureed lazy plants and pureed healthy plants to your test subjects and see if you can detect a difference.

But honestly just the metaphor of humans being like lazy plants is already deep enough, it's already a window into the human soul, you don't need a literal connection.

What you said makes sense right up until the last bit about the lazy plants generating low energy in humans. There is no science to substantiate that, like none at all.

I think it's more likely that we're living in a system that seeks unwittingly to extract the most value, hence the lazy plants and the lazy people. Lazy plants is obvious, but why are lazy people more valuable? Because they are perfect office drones, and that's what you need to keep the system running, or growing even. Not healthy people that wouldn't tolerate sitting at a desk for 8 hours a day.

So, reasonable thinking, just skip the pseudo/non-science stuff because it just gets in the way. My take on your idea is just speculation and conjecture that isn't wrong prima facie, and is also unfalsifiable.

Re:Classism in America on Wednesday April 06, 2016 @07:52PM (#11443372)
People also use something like that to mask a lack of knowledge / experience / understanding / intelligence. Once in a while someone uses big words so well it's poetry, but those people are the exception.
I think that's wrong, because all 4 if-statements are evaluated for each sample.

But yes agreed, in general there are lots of edge cases. I actually wrote a finite state machine specification for an elevator in a logic class once. Without having really thought about it much, it looks like the biggest problems with thermostats are dealing with scalars, sampling frequencies, and sampling error.

Also you can decouple the handling of ac and heat, and check the current state to prevent a redundant transition into the current state.

  if (temp > max + error)
    if (off (ac))
      turn_on (ac);

  if (temp < max - error)
    if (on (ac))
      turn_off (ac);

  if (temp < min - error)
    if (off (heat))
      turn_on (heat);

  if (temp > min + error)
    if (on (heat))
      turn_off (heat);
The higher mg caffeine / mL of coffee mitigates that a bit, probably so it's 2x as bad instead of 4x as bad.
Did you use a computer to post your comment?
I don't like tipping for those situations where it's unclear how much is appropriate, for instance grocery delivery at the supermarket says their employees won't take tips but then you talk to the delivery person and they say that it's bullshit, people tip anywhere from $1 to $50 at Christmas. What am I supposed to do? Tip a percentage of my groceries? That's ridiculous. Nobody on the receiving end will honestly tell you how much to tip, because they want you to overestimate it.

But when it's clear what to do, like in restaurants and cabs, I'm happy to tip a percentage.

Re:Your heart rate at gunpoint on Tuesday April 05, 2016 @04:48AM (#11428847)
Yeah, for men, 220 - age is your max heart rate, in theory. And "going to die suddenly" = max heart rate.

The other thing that's bullshit about the graph is that there are only 4 evenly spaced data points for what sounds like a 5-10 minute encounter. Don't believe it at all, why wouldn't you show real data? Or talk more about the data if that was the point of it?

Re:Malloc envy on Monday April 04, 2016 @07:16PM (#11426536)
You were asking about design, not implementation.

The way Java works is there's a language spec and a VM spec and then organizations are free to implement them as they see fit. So JVM design is referring to what's in the spec.

What's wrong with Sun's implementation? Well, they did the best they could, given that there's no design / spec to work from (for the JIT). The memory model was completely replaced in the spec in ~2005 (to work better on multi-core CPUs and stuff), and the threading model was changed in the spec sometime in the 90s (from green threads to native threads).

Re:Malloc envy on Monday April 04, 2016 @06:12PM (#11426171)
The JIT and threading / memory model were bolted on afterwards. The JIT isn't even part of the JVM spec. (Unless this has changed.)
Re:What It’s Like to Almost Get Executed on Sunday April 03, 2016 @09:05AM (#11415949)
There's no such thing as no state. For any conflict, whoever wins is the de facto state.

Older »