Better HN
topnewbestaskshowjobs
Log inSign up

wfunction

3,901 karma · joined Oct 15, 2012 (14y ago) · 1,547 submissions

Submissions

comment 11y ago · link · parent

I think the question meant literally both, always.

comment 11y ago · link · parent

> give cash patients a 50% discount

> That's why the prices are so high to start with.

I feel like health insurance prices are too high by a factor noticeably larger than 2 though.

comment 11y ago · link · parent

> One of my friends had his parked car hit by a drunk driver while he was not in it. His insurance premiums still went up after claiming for the damage.

What the heck? Can you elaborate on this? How is this even legal?

comment 11y ago · link · parent

Did you do the numbers? Would be nice if you could share them.

comment 11y ago · link · parent

I would imagine we're going to grow more worms, not hunt down the existing ones.

comment 11y ago · link · parent

Is it really a good idea to convert plastic to CO2?

comment 11y ago · link · parent

Sorry, but I find this more confusing than anything. I would explain it more in terms of nondeterministic parsing (i.e. delaying the choice of the production rather than picking the production immediately) or in terms of "bottom-up" parsing (going from the string to the start symbol rather than the other way around). That said, it's way easier to understand what it should be doing than it is to understand it well enough to write one yourself.

comment 11y ago · link · parent

I literally took a compiler class just to learn what LR parsing is, and I had to spend an additional ~6 months of my free time just to write an LR parser generator that I found intellectually satisfying and didn't leave question marks in my brain.

In other words, it's not something I expect you can read a couple sentences about and hope to understand well...

comment 11y ago · link · parent

It's a bug if you consider performance to be a feature.

comment 11y ago · link · parent

Yes, list comprehensions can take care of some of these, but you're completely missing the entire point.

The point was that writing something like

  lambda item: item[0]
in your code is inferior to

  lambda (k, v): k
in terms of readability and comprehensibility. It is both longer and it also doesn't document the fact that the item is semantically a key-value pair.

The problem is not (and has never been) whether something is "necessary" or "possible". Tuple unpacking obviously completely unnecessary to begin with, it has nothing to do with whether this is done in a parameter or not. The problem is whether the code is expressed better via unpacking.

comment 11y ago · link · parent

Could you give me an example of what you mean?

comment 11y ago · link · parent

> Well that's one reason yes, and by itself not really a good enough one. But if you read the PEP there are another 4 good reasons that you omitted from your comment, why is that?

Because the other reasons were twice as horrible.

"No loss of abilities"? Uh, you can't do this in lambdas anymore.

"Exception to the rule"? Who cares? It was useful and readable, that's all that matters.

"Uninformative Error Messages"? This has never been a pain point for me. If you don't like it then no one forced you to use it...

"Little Usage"? Well I guess everyone matters but me. Which is fine, but then you shouldn't wonder why it would tick me off.

comment 11y ago · link · parent

> If you think the (rightful) removal of a hardly used feature[1] that has some big problems is a blocking issue then I feel sorry for you.

Uh, thanks?

I would call it anything but "rightful". Making life harder for introspection tools is hardly a rightful reason for removing a core language feature. The code is what most developers are trying to develop, not the introspection tools.

comment 11y ago · link · parent

> As someone who's bounced back and forth between Python 2 and Python 3, I'm curious about your need of parameter tuple unpacking[0]. I've never encountered it, and after some research I don't understand the use case.

> I don't mean to sound like I'm trying to belittle your position, I would like to understand more. The PEP below doesn't seem to do a very good job explaining why people like them, and I'd like to hear a proponents position on the feature.

Basically, I need it for functional programming. See here:

https://news.ycombinator.com/item?id=10213963

comment 11y ago · link · parent

> What are the cases where you use it / rely on it?

Basically any time I need to unpack inside a lambda (e.g. functional programming) and have to use something like itertools.groupby(), I run into trouble with Python 3. For example:

  from itertools import groupby
  def groupby_unsorted(items, key):
    return map(lambda (g, l): (g, map(lambda (k, v): v, l)), groupby(sorted(map(lambda v: (key(v), v), items)), lambda (k, v): k))
  print(groupby_unsorted([1, 2, 3, 4], lambda v: v % 2))
Never ran into problems with it either.

comment 11y ago · link · parent

> When I have to write code in 2.7 now, it feels like shifting from fifth gear down to second.

You mean, second gear up to fifth?

I tried writing some Python 3 code and the lack of parameter tuple unpacking by itself stunned me and drove me crazy, never mind other stuff. Python 3 seems very user-unfriendly compared to Python 2. Won't touch it with a ten foot pole unless my life depends on it.

comment 11y ago · link · parent

The Verizon Math was gold.

comment 11y ago · link · parent

The title is so bad. I thought one of the scientists pointed out the other one had cancer...

comment 11y ago · link · parent

Is this really true? When I navigate to https://certplusrootcag1-test.opentrust.com/ I see the root certificate is "Certplus Root CA G1", not "OpenTrust Root CA G1"...

comment 11y ago · link · parent

Not really, what I meant was that it's pretty easy to go over O(n) without ever duplicating any code. Like just imagine if you had a string literal that held all the numbers from 1 to n^2.

comment 11y ago · link · parent

> Space: O(n). No code is ever duplicated, so the one-lined code produced is linear in the size of the input code.

Seems like a non sequitur?

comment 11y ago · link · parent

> From personal experience, 12.x on 4 completely different devices has proven to be far more stable, fast, and more efficient than 11.x was.

Oh really now? Consider yourself lucky.

"People on the OnePlus One forums have already created 300 pages in the CM12S bugs thread, comprised of more complaints than solutions. Which is why this time, people experiencing CyanogenMod 12S bugs on their OnePlus One might be better off either not installing the update, reverting to the KitKat version of finding a different custom ROM to use." [1]

[1] http://www.geeksnack.com/2015/05/09/oneplus-one-cm12s-bugs-a...

comment 11y ago · link · parent

Yeah it's a pain alright. I I have a suspicion it's caused by an update, because I didn't use to get it until a few months ago. Do you have the same experience? Also, I never managed to get the power button to make it work. If it doesn't work I just have to reboot.

comment 11y ago · link · parent

Seems like the blockchain is forking too...? What happens to everyone's bitcoins in the meantime? Wouldn't this practically destroy the system?

comment 11y ago · link · parent

I'm not even sure they would fix it at this point. They'd probably tell me to upgrade to CM12, which I would definitely not want to do considering how much more buggy it seems to be.

comment 11y ago · link · parent

Thanks!

comment 11y ago · link · parent

Thanks!

comment 11y ago · link · parent

Would someone please explain to me how you one convert between the 1D and 2D coordinates of a Hilbert curve? Is there a formula for it? The drawings look nice but they don't tell you how to actually do the conversion, which seems to be the crucial piece of the data structure.

comment 11y ago · link · parent

> At its core, CyanogenMod is a best in class example of Open Source development.

Really? Why is it that they can't even bring themselves to fix trivial bugs like [1] let alone bigger deal-breaker bugs like [2]? I find the OnePlus One borderline unusable with all the Cyanogenmod bugs it has...

[1] https://jira.cyanogenmod.org/browse/BACON-2855

[2] https://jira.cyanogenmod.org/browse/BACON-736

comment 11y ago · link · parent

Probably trying to insert backdoors before the community develops an algorithm without one.
1
313233
52