Better HN
topnewbestaskshowjobs
Log inSign up

wfunction

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

Submissions

comment 9y ago · link · parent

> If you roll your own crypto, you're liable to have the guy down the street spot an issue in your custom implementation and walk out with all the goods before you realize what happened.

Isn't it quite obvious that you can have multiple layers of crypto? Like your own on top of a standard one? Why do you (and a lot of people, not just you) set up a silly strawman argument whenever talk of rolling your own crypto comes up in any online forum?

comment 9y ago · link · parent

Thanks for saying exactly the same thing that's come to my mind over and over again. I would totally roll my own crypto on top of an existing cryptosystem if I could and if someone with this much computational power was in my threat model. That way I would get the best of both.

Same goes for hashing by the way: I'd totally stack multiple hash functions on top of each other too. But in this I'd only stack cryptographic ones that have not yet been broken; I wouldn't roll my own.

comment 9y ago · link · parent

> If your company wants to see side projects but dislikes the idea of you actually working on them after starting, you are doing something wrong.

My impression was they generally want to see side projects for newbies/recent graduates, i.e. stuff the applicant would have been working on during college or something. Not stuff the applicant was doing on the "side" during his/her previous years of employment. Am I totally wrong here?

comment 9y ago · link · parent

> What's legally or ethically gained by comparison to existing MIT/BSD licensed c libraries?

Copyright notice requirement means you can't just copy-paste a single function.

comment 9y ago · link · parent

I hate this braindead nonsense so much. What if you're NOT in the workplace? Does everything important or non-interruptible only ever happen at a workplace? What if you're a high-schooler presenting your final project to your teacher for grading or something? What if you're in the middle of watching a movie with your family?

comment 9y ago · link · parent

What about those making presentations outside of a business? Like teachers/academics? Or some dude who wants to present something to his club? Surely none of those could possibly matter more than a security patch, right?

comment 9y ago · link · parent

Presumably they are reading this sentence somehow, so they could look at the website the same way.

comment 9y ago · link · parent

> It's got a handful of pretty smart heuristics that we've added over time to help it get stuck.

I assume you mean NOT get stuck? Or do you mean something else like settling on a solution?

comment 9y ago · link · parent

Also, wouldn't this mean you have to pay interest on the ENTIRE amount of the loan, as opposed to tax on just the gains? So if you have $1000 that means at 2% interest (I assume that's yearly) you're paying $20/year, whereas if your stock went up 5% (= $50), that means you'd be paying (say) 25% of that, which is $12.50. So it should be only better if either have a high tax rate or your stocks /really/ increased in value (not just kept pace with inflation).

comment 9y ago · link · parent

> There were generally no map/filter/fold APIs in those languages, eager or lazy.

Array.FindAll, Array.Convert, etc. all existed in C# beforehand. Though maybe this is what you meant in the next sentence.

> In cases where the APIs were there, they were generally not as easily accessible (i.e. they were the equivalent of imap etc, with some hoops to jump before you could use them).

This is going on a tangent but LINQ still has hoops to jump through. You have to say "using System.Linq;" at the top if you want to use the new syntax. That's like saying "from itertools import *" and then using imap, which you could've always done.

comment 9y ago · link · parent

What happens if your stock goes to zero in the meantime while you've borrowed against it?

comment 9y ago · link · parent

> But even if a company doesn't pay dividends, it will often make a profit that ends up on the company's books. A part of this profit, proportional to your ownership, belongs to you who own the stock.

You're totally missing my point. I'm saying, even if your stock is "worth" $1 trillion, if you don't actually ever sell it, you haven't earned a single penny from it. It's only money when it's actually money. So my question was whether the OP was ever selling the stock or not.

comment 9y ago · link · parent

> you are probably better off borrowing against your investments if you need cash

I don't understand what that means. Whom would you be borrowing from? Where would the cash be coming from?

comment 9y ago · link · parent

Ahh, makes sense, I should've guessed. Thanks!!

comment 9y ago · link · parent

Ah, gotcha. Thanks!

comment 9y ago · link · parent

Ah, so no actual income then? Just stocks going up in value? As in, at some point you'd have to sell before you actually have any income from it, right?

comment 9y ago · link · parent

Question: how do index funds (or any kind of stock, really... in fact this question isn't really about index funds) "pull in the rest"? Do you actually manage to sell them when they're high and buy when they're low again? Or do you get stocks with dividends and just make money using the dividends? Obviously merely possessing stock of high value is kind of moot if it doesn't turn into cash somehow, so I'm curious how people usually do this. (I don't know much/anything about finance.)

comment 9y ago · link · parent

Does any layman expect GR NOT to break down? To me it's intuitively only correctly describing emergent phenomena in the limiting case of large scales; it's bound to be less accurate than something that is correct on small scales.

comment 9y ago · link · parent

Notice in said languages they added lazy APIs. They did not remove eager APIs. Python already had imap, ifilter, izip, etc... I already said this and I'll repeat: I would've been just fine if they made those easier to use (e.g. no import). There was no need to change the behavior of existing APIs.

comment 9y ago · link · parent

I thought the two additional "o"s that you missed indicated sarcasm.

comment 9y ago · link · parent

> Lambdas are not really pythonic these days anyway

Too much nonsense in your comment. Really now? How about you give a realistic example where syntactic sugar doesn't substitute for it? Like what am I supposed to pass to sort(key)? And incidentally, this tuple unpacking problem comes up when sorting frequently... and that's the prime example on their web page (and a realistic one at that) for where you're supposed to use lambdas: https://docs.python.org/3/tutorial/controlflow.html#lambda-e... If you're telling me this isn't Pythonic, you're really just not being sensible.

comment 9y ago · link · parent

> Regardless, I still think it's quite impolite to downvote somebody who wants to help you and misunderstands you

Well, I don't consider it a "misunderstanding" when there are literally just 2 things to note in my comment that you're replying to ("lambda" and "tuple unpacking") and you still somehow miss 1 of them. I think it totally deserves a downvote, because it makes me look stupid when you present a reasonable solution to a non-problem and make readers assume I was saying something other than I was, and on top of that I have to waste some 5-10 minutes of my time replying. That's not something I appreciate.

That said, like I said, I never actually downvoted that comment (because I obviously couldn't). So you don't need to worry about the internet points.

comment 9y ago · link · parent

> In any case, I think I see your problem. You are not the sole user of Python language.

I'm glad I'm not. Otherwise I probably wouldn't be using it either. Not sure how that is my "problem".

> There are features that other people like (such as using [asterisk] in unpacking), and so features you like are weighted against their use cases, and a reasonable compromise is made.

I like that [asterisk] syntax too.

> And frankly, I think if you like to use lambdas that much, you really want to program in a language where everything is an expression, such as Lisp or Haskell.

Or I could just keep using Python 2.7 which works just fine, and not move to version 3 where I'm not welcome.

comment 9y ago · link · parent

I'm not trying to make anything or anyone "look" any particular way. I'm trying to present an argument against the undeserved misuse of a label that carries a negative connotation and that is carelessly thrown around in this industry far too much in order to dismiss technologies people don't consider smoking hot enough for their tastes.

How in the world was my definition "arbitrarily-chosen"? I literally chose definition #1 on Oxford English dictionaries. That's arbitrary?!

comment 9y ago · link · parent

>> So even if no one ever uses it, it still renders the old one obsolete?!

> This is a strawman, because I don't think this ever happens (feel free to give an example). There will always be people who try to use new standard; they may abandon it later, but they will at least try to use it.

...I thought it was obvious I didn't mean the case where literally NO ONE was using it, but apparently it wasn't. Sorry. My point was, if it doesn't catch on, then does it still render what came before it obsolete? Is it only about time and whether it fixes some things from before? Not about whether it's actually used, or whether it introduces other problems, or whether the previous technology is still in widespread use, or a million other factors? Really?

As for Python 3 being used and more every day, yes, I never claimed it was obsolete or dead or anything else. I'm just saying Python 2.7 is being used too, and hence it's not obsolete either as you seem to think. You claimed it was, so I asked for your definition of the term. You're rejecting the standard one and you still haven't given me one that you're willing to apply to things other than Python. Not to mention I don't see why software deserves special treatment for the word's definition here.

comment 9y ago · link · parent

I wish I could downvote. I specifically said I hate the tuple unpacking syntax change in lambdas. That's where I used it so much to begin with, not in defs! I obviously can't put statements like that in lambdas, and until now I didn't need to do that to make my code readable. Now I have to name all of my lambdas just to make this syntax work, which is nonsense. It used to be there and it worked perfectly fine.

comment 9y ago · link · parent

> So you _hate_ Python 3 because of two changes in syntactic sugar?

First of all, the tuple unpacking one is a HUGE readability AND maintainability issue; it's not just syntactic sugar. var[0][1][2] is not only far less readable than the unpacking notation, it doesn't even have the same semantics (doesn't enforce the structure of the tuple).

That means Python 2.7 helped me catch more bugs. Think about that!

Second, no, I just listed the two that irritated me the most every time I tried to switch, because they were the first things that came up by far the earliest and most frequently. Small inconveniences can be amplified through their frequencies. There are lots of things I don't like about it though... division becoming floating point division, having to say list(foo.items()) or list(map(...)) instead of just foo.items(), etc... again, more verbosity and typing for common cases where I really didn't mind the old way. If I wanted imap(), I could've just used imap; they could've just moved that to __builtin__ and made my life easier that way.

By the way -- the lazy nature of map(), etc. also means you catch fewer bugs now. Again, think about that! Just because it looks more efficient, that doesn't mean it's actually better. If there's anything I've learned, it's that even the smallest things tend to come with non-obvious tradeoffs.

Finally, regarding strings: if you look at my earlier comments, yes, I already acknowledged the Unicode changes were for the better. Awesome. I agree. Cool? OK, but there are other things in the language besides Unicode though, and they're not as awesome. I don't spend my entire programming life dealing with Unicode strings, so I care about other things too, and they make my life harder. Simple as that.

comment 9y ago · link · parent

> Addendum: I think for standards like programming language semantics (which in case of Python is directly embodied in the C implementation), "obsolete" means there is a new standard by some official body (say, the developer of the old standard) that addresses shortcomings of the old standard.

Really? So even if no one ever uses it, it still renders the old one obsolete?!

1
202122
52