HNHacker News
TopNewBestAskShowJobs

kbsletten

414 karma · joined August 7, 2013

submissionscomments
kbsletten··on Inheritance Often Doesn't Make Sense
In the language of the article, this is subtyping without subclassing. Sure Java/C# implement this as interfaces, but in C++ this would be a case of multiple inheritance. This is a good example of the article's main point that people mean a lot of different things by inheritance and get different value from the different applications of the concept.
kbsletten··on Protecting Against HSTS Abuse
If I remember correctly, Google has done this with the `.dev` TLD they own, so we're already seeing some of it.
kbsletten··on Walmart Whistle-Blower Claims Cheating in Race with Amazon
I guess you'd be wrong. "Online shoppers" is most people these days, and Walmart is one of the strongest retail brands around. They don't even have to be that good to compete in online retail. I think you're likely the victim of a very specific perception bubble.
kbsletten··on How generics were added to .NET
Well, really their hand was forced because they needed to be able to specialize all of the array-of-primative types. It's not as much they saw the advantage as they couldn't imagine a language where you can't express `byte []`. But the point stands that they could have realized that `ArrayList <byte>` is almost as fundamental and created refied generics for user-defined types as well.
kbsletten··on How not to run a CA
I'm not sure that's as good an idea as you think. Even LE has designed ACME to ideally be replicated elsewhere. The big problem with having only one CA is that if they get compromised or go down, that's the entire internet. For good reason, it's not like you can launch a CA in a day, so we will always need a few horses in this race. Culling the herd isn't a bad idea, but without some diversity any issue could be catastrophic.
kbsletten··on Intentional memory leaks
Man, I hope so. Do you know how many times I've seen "really simple" one-line changes hose everything? Bonus points if they're to fix something that was pressing but not urgent and now you've just made it 10x worse.
kbsletten··on How Old School C Programmers Process Arguments
The decrement is the same either way, the value yielded by the decrement expression would however be different. I don't like the wording either.
kbsletten··on Allocation is cheap in .NET until it is not
I know this was changed recently-ish in Java, but I hadn't heard of anybody doing the old substring trick in .NET, do you know when they cut over?
kbsletten··on Mitigations landing for new class of timing attack
I think that the point is that most users can't be expected to understand the risks present in allowing a high resolution timer. It's a very nuanced decision, unlike camera and storage and location.
kbsletten··on Using Java 9 Modularization to Ship Zero-Dependency Apps
The 11MB is (most likely) 11MB of the Java runtime (compared to 200MB for the full runtime which includes all the classes required by the standard library) + a few dozen bytes of bytecode.
kbsletten··on How I learned to program
Yeah, this "meant to" attitude seems a little be self-aggrandizing. I feel like that's a very convenient way to say, "programmers only club, no _others_ allowed." My favorite thing has been teaching scratch in middle school and realizing how non-obvious programming aptitude is. Some real "nerd"-types don't have any actual skill and others who are little socialites or behavior problems take to it with ease. Makes you realize how not special us programmers are.
kbsletten··on How Stylo Brought Rust and Servo to Firefox
They're not saying that C++ compilers do the best possible register allocation, they're saying that C++ compilers generate a register allocation that works and doesn't contain bugs. Technically, spilling everything to memory and loading only what you need to issue instructions is "getting it right" by this definition. No compiler strives to get the "optimal" anything in the general case, but we do expect them to strive to be "correct" in all cases. The language we use determines which properties are included in our idea of "correctness".
kbsletten··on What does an innocent man have to do to go free? Plead guilty
Yes, which would have the effect of cutting down on speeding tickets issued since it's an extra court date for the officer. Many can't be bothered already when you take a ticket to court.
kbsletten··on Demon-Haunted World
It's probably to avoid/mitigate lawsuits. It's possible that this would still be covered under false advertising but there's something to be said about the feasibility of testing a lot of unopened packages to show the ink level is low vs having to run all those packages down within the parameters of the device (so the testers aren't seen as the cheaters, over-using the cartridges to make the problem seem worse than it would be for "regular folk"). They'd be dead-to-rights under-filling but they have a better shot (and a better potential settlement) with the under-reporting.
kbsletten··on At liberal tech companies, those who disagree on politics say they’re isolated
Actually, most of us conservatives have a core stance of "don't trust anything you care about to the government." Nothing more, nothing less. Liberals love to parade out the worst of us because then no "reasonable" person wants to be on that team. To be honest, I don't want to be on that team, but I'm not going to give up because I really believe there's a better way. Better to vote my conscience and try to improve the party reputation buy being a good neighbor than give in so the McCarthys don't accuse me of being racist.
kbsletten··on 64-bit Firefox is the new default on 64-bit Windows
What is the crash rate improvement all about? I get the address randomization, but what changes in 64 that fixed crashes?
kbsletten··on Text Is Keeping Kids from Coding
Well, to be fair programming is (currently, at least) an optional skill competing with soccer, guitar, and video games for mind space. Reading is the lowest bar for practically everything in modern life so there's more tolerance for sub-optimal teaching since we all are willing to hold feet to fire. Until coding is as ubiquitous as reading, we're going to have to do better.
kbsletten··on Why We Can’t Have the Male Contraceptive Pill
Yes. The problem is nobody has "perfect fertility information". Little flukes in exact timing could change the "safe" days significantly. There's actually a whole bunch of info for couples wanting to do this with multiple ways to track fertility with more or less invasive options.
kbsletten··on Announcing Rust 1.19
I believe that they've framed it in this article as mostly for compatibility with C/C++. A simple example is JS objects are often represented as a single f64 with the NaN space punned for 32-bit pointers and 53-bit integers. If you want to put some code written in Rust in that environment, if you could define a union that could expose a safer API by using bit twiddling you could. Presumably if you have the memory to spare or are unconstrained in design you won't use this feature which is part of why it took so long to get into the language.
kbsletten··on Turn your website into a Progressive Web App
I'm pretty sure this is because there's a critical limit on how wide a column of text can be before your eye won't snap back to the next line as easily. The thing I love about the phone centric web is that I don't have to have my browser full screen (as you say, it just wastes space).
kbsletten··on Learn to Read Code
I completely agree. That's what we ended up doing to "remove all those usings." I do admit it was poorly phrased.
kbsletten··on Learn to Read Code
You're correct in your assessment, but the parent is correct in their criticism. I'll try to rephrase, though the particular example is not of particular importance.
kbsletten··on How to Interview Engineers
Unless there is some other mutable state that they both interact with that may cause a race condition. :)
kbsletten··on Kotlin: It’s the little things
I'm not a full time Java developer, but unless you have a really hard time adjusting to the syntactic differences or will grumble when you do something you know would be "so much easier in X", you should be fine. You'll learn the JVM, APIs, and libraries you'll need to be a Java programmer. That seems like a win to me.
kbsletten··on Don't overuse interfaces
I've known people who took the "interfaces are good" to the cargo-cult where they would have a POCO and make an interface for it with getters and setters. No functionality and basically only one possible implementation because it's assumed to be backed by a POCO everywhere. But they "coded to the interface" so it's all good.
kbsletten··on Programming with a love of the implicit
See, the thing is that even in this example he wasn't 100% implicit. Could rails magic up those has_many and belongs_to in method_missing? Absolutely. Do they? Of course not since that's "too implicit." For whatever reason, rails decided that columns are boilerplate and relationships should be declared.
kbsletten··on How I Used Twilio, Python and Google to Automate My Wedding
This was a fun read! When I got married the invitations were very important to my wife, but I built a website to handle RSVP (with my mother as a fallback phone#). It was a fun project, I had my wife help me design it and I also found the tally-at-a-glance helpful. I'm sorry you have to read all this bile about how you did your wedding, but I'm glad you had fun with it!
kbsletten··on Swift 3.0 Unsafe World
Also, if we're talking about passing pointers to objects to C code, GC frequently moves objects in memory which will invalidate the pointer. It's not possible to reliably predict when this will happen, so you need extra language support for pinning to do any of the things in this tutorial without accessing invalid memory.
kbsletten··on Swift 3.0 Unsafe World
I would say that in the specific case of this article (talking about passing pointers to managed objects to C) it is easier without a tracing GC simply because reference counting doesn't ever move the object and so pointers won't be broken (except, as the author shows, if you let the only reference go out of scope before you're done using the pointer). A GC language _may_ implement pinning to overcome this, but not all do.
kbsletten··on Swift 3.0 Unsafe World
Well, passing raw pointers to garbage collected objects is impossible without language support for "pinning". This is because the GC will move objects around in memory breaking any pointers you're using in your C code. That may be a generous interpretation of the author (it could just be bile), but in the context of the article (about C interoperability) that's what comes to mind.
← PreviousPage 3 of 4Next →