HNHacker News
TopNewBestAskShowJobs

ben509

4,046 karma · joined December 7, 2017

I'm an engineer presently working for Capital One Investing, prior work at AWS for the CloudHSM team, before that Novetta, and before that I did 6 years in the army.

I'm also working on the Tenet language; see https://tenet-lang.org/

Also at https://keybase.io/ben509

YdRK9Q3mIBRWsRBonHhJCsgLnurwJk9eHbw1Jg4wz9M

submissionscomments
ben509··on Dark patterns after the GDPR: consent pop-ups and their influence
Most of a supermarket's layout is determined by hard requirements like refrigeration, stocking heavy items and handling payments.

If you're wondering why, for instance, the milk is in the back, it's because it needs to stay cool and it's heavy.

ben509··on Dr. Seuss books deemed offensive will be delisted from eBay
I think cultural appropriation contains two elements. One is the concern about Western colonailism, which I can't address because it gets into critical race theory and that's a huge subject I don't completely follow.

You can peel off a far simpler concern that culutural heritage can be lost or devolve. France, for instance, goes to some lengths to preserve the French language. I went to some Scottish heritage group, and we all dressed up in kilts and ate haggis and such.

And it's a tough problem. Getting people on board with preserving cultural heritage is hard, especially because young people are precisely the ones you need to attract, and they tend to want to do things that are new and exciting.

ben509··on Dr. Seuss books deemed offensive will be delisted from eBay
> Nobody actually reads Mein Kampf ... It was (and still is) about the personality cult of a strong man and his message of power via blaming and oppression of minority groups, not the actual words themselves.

That's precisely why people should read it. That personality cult developed because Hitler's narrative of oppresion by Jews resonated so strongly.

> just like nobody actually reads the Bible unless they're actual preachers

Nonsense. Christians not only read it, but study it as a guide to life. There was an informal thing at my work where they'd read and discuss a passage every week or so.

ben509··on How does your programming language handle “minus zero” (-0.0)?
There is the difficulty that you don't actually have zero, you have postive and negative infinitesimal.
ben509··on How does your programming language handle “minus zero” (-0.0)?
They're equal. But, copysign(1.0, -0.0) == -1.0
ben509··on How does your programming language handle “minus zero” (-0.0)?
0 does double duty as meaning itself and to indicate underflow due to multiplying very small numbers.

If you have a function that can experience underflow it can be useful to preserve the sign of the underflowing value.

Otherwise you'd need more checks to get that information.

ben509··on How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
The major choices that avoid braces are indentation and keywords.

Indentation's upsides are less line noise. In my opion, while there's less noise, there's less symmetry, so it's a wash on the beauty count.

Indentation breaks many tools, especially the way amateur coders use them. They're frequently showing code snippets by copy-pasting into web pages that strip indentation.

Notably, the standard pylint rules insist on two lines between functions and classes because the extra whitespace helps people find things. That same whitespace you get if you close a function with a single brace...

Keywords are surprisingly nice. Lua does them very well:

    function foo()
        doSomeStuff
    end
You get rid of the pointless { at function, and you have a simple "end" when you're done.
ben509··on How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
My senior moment came when we were talking about graphics and I mentioned some various things and CGA. My coworkers let me ramble a bit and then one politely asked what CGA was.
ben509··on How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
> (e.g. people wasting hours trying to write a "function" that takes an enum and outputs another enum w/ a fixed prefix...

Metaprogramming shouldn't suck so much that this takes hours.

ben509··on How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan
> red flag is a bad description, because he ended up being self-reflective and looking deeper

No, red flag is fair since it's just a warning sign. Even if we take it as a mark on the guy, it's true that he ought to get outside the scripty bubble.

ben509··on Parsing can become accidentally quadratic because of sscanf
Besides the fact that you have to walk the string just to find the length of it...

Null-terminated strings try to save space by encoding the string length by convention. This can fail due to off-by-one errors, mistakenly allocating a fixed buffer, strings that have an unexpected null in them, and more.

Those can lead to all kinds of nasty problems like buffer overflows, which allow someone who can craft an input to write arbitrary stuff into memory.

God only knows how many security vulnerabilities and performance problems could be traced back to null terminated strings.

ben509··on ISO 8601: a better date format
> Really? It's hard to parse the year??

Is it so hard to write "it is?" Nevertheless, you used a contraction.

You did so entirely unconsciously because that's how langauge works.

ben509··on Researchers find stem cells for hair regeneration
Yup. There are no bad reasons to not pursue a relationship, because anything that avoids heartache and misery is implicitly a good reason.
ben509··on Researchers find stem cells for hair regeneration
And the issue of whether people generally care misses the point. A man wants her to find him attractive.
ben509··on YouTube blocked chess channel after mistaken detection of racial slurs
A lot of language-fixing slacktivism easily becomes a trend because it's highly visible and requires no genuine effort.

It's complete bullshit, though. This particular bullshit is awful since it trivializes all this historic pain to some inane game of word association.

There's no point arguing, though, just drag your heels until they get bored and go off on some other crusade.

ben509··on Has Amazon Ruined the Name Alexa?
> I asked, but somehow she didn’t feel like changing her name.

That's nuts. It's just a bit of paperwork!

ben509··on “Silicon Valley’s Safe Space” has misinformed readers
I think you have to work "we are baddies" into your entire system of thought.

The best example I can think of is Judeo-Christian thinking has the idea built in through the fall from paradise, Cain killing Abel, and broadly the repeated arc of humanity forming a covenant, breaking it, rinse, repeat; Christianity adds the whole story of Christ being crucified.

And I think that works, conceptually, because God can be good while people are awful. God is this immutable, objective "good" that we can't argue with or rewrite as we please.

Similarly, science can say that its theories are all wrong (bad), but the universe is right (good), so observations trump theory.

And a republic can work as a form of government because its premise is people are awful but reliably self-interested, so you can construct a structure of government that pits those different interests against each other and results in a big stalemate. There the "good" isn't very good, but self-interest is at least consistent, and the desire for a continuing political stalemate over a civil war is good enough.

So for an ideology to incorporate "we are baddies" into itself, it probably needs some external thing to be the "good" that it looks to, but that "good" has to be something that can't be easily rewritten to be whatever you want it to be.

ben509··on “Silicon Valley’s Safe Space” has misinformed readers
I think a discussion platform is a complicated dynamic system. Social media has various algorithms and even layout decisions (how comments are sorted) that promotes stuff that gets engagement. Then they have a mess of filters that tries to limit some of the worst behavior.

I suspect what makes it really hard to understand is there's a training effect as users subconciously learn what things get more attention, and what attention they see as favorable is a moving target depending on their emotional state.

So you really have no idea what changing the kind of attention they get will do, and even if you did, when you try to make changes to see what happens, you have to wait on the timescale of human learning to see what the result of those changes are; how the dynamic is settling into a new stable state.

ben509··on Animation of a blue whale trying to avoid ships
It's not an inability to believe it's true. It's more being burnt out by ritualized concern. It comes from seeing something awful that we're all supposed to be concerned about, listening to people beat their chest about it, and then the next day it's something else and those people have moved on to that and forgotten about yesterday's crisis.
ben509··on Timezone Bullshit
> It's interesting how it's easier to change time than to change the hours in which we work.

I think the main pain point would be customers being confused as to when companies are open.

This doesn't even work well with smartphones; all the calendar apps are hopelessly manual and can't answer something like "what are good times to run an errand involving steps X, Y, Z."

At best, you can ask it when people are available for a meeting and it will show you that everyone important is booked solid.

ben509··on Pattern matching accepted for Python
It will be to stick your constants in a module and use module.constant to match them. Or use an enum. Or hang them off a class.
ben509··on Pattern matching accepted for Python
A separate statement doesn't compose with complex patterns. I'd prefer always requiring the walrus operator to capture:

    match response:
      case (not_found, msg := _):
        return f"Not found: {msg}"
      case (error, "No swizzle available"):
        return "We lack swizzle. :-("
      case pair := (_, "Swizzle"):
        log(f"Unexpected swizzle: {pair}")
        return f"Swizzle?"
      case ((code := _), _):
        return f"Success: {code}"
ben509··on Pattern matching accepted for Python
I like it. I was just trying to do some simple "parsing" of a pyproject.toml file. So I wrote the standard crud of, "is it a dictionary? If so, does it have a specific key? What if it's just a string? If so, ..."

Having a dedicated syntax would mean someone could look at the patterns I'm matching and see clearly what the format of the input should be. This seems ideal for handling various user-friendly toml/yaml/json configuration formats and other semi(poorly)-structured data.

I think it also addresses a real weakness in OO: to add behavior per class you either lard up classes with not-really-relevant methods, or create a proxy class, or do the inevitable if/elif isinstance chain.

ben509··on Pattern matching accepted for Python
The two-space compromise might work:

    def handle(command):
        match command.split():
          case ["quit"]:
            print("Goodbye!")
            quit_game()
          case ["look"]:
            current_room.describe()
It'll be a bit odd, though.
ben509··on The computers rejecting job applications
It made a strangely compelling argument that it would be fine if it forked off a subprocess to monitor itself.
ben509··on I followed my dreams to get demoted to software developer
> But why does a position with greater risk necessitate greater compensation?

There are various methods to address risk:

1. Avoid the risk

2. Reduce the risk

3. Transfer the risk

4. Accept the risk

When you buy insurance, you're doing #3. If you self-insure, you're doing #4. Either strategy requires putting some money towards premiums, the expected possible cost of the risk.

It's much cheaper to pursue #1 or #2. You're then saving an amount exactly equal to the premiums don't have to pay under #3 or #4.

Thus, you can pay a person to do #1/#2 a fraction of the equivalent cost of #3/#4 and still come out ahead.

> A lazy manager can get along by just regularly pruning reports who produce more liability than reward.

Yup, and the books will balance.

ben509··on Migrate Everything from Linux to BSD
I didn't get the ZFS complaint either. Countless years of development went into OOP. Lots of great software has been written with it. It's still a buzzword.
ben509··on Don't Offer a Free Plan
The "you are the product" assumption alone is probably the strongest reason to never offer a free service.
ben509··on Don't Offer a Free Plan
I think trials can be improved for services where you can discern whether the user is directly interacting with it. You give them 100 days of usage, and then decrement a counter when they interact with the site the first time each day.
ben509··on Google, Apple cave to Pakistan pressure to take down apps by Ahmadiyya Muslims
The people can live without your search engine, because there are other ways to find content.

It's hard enough to mount resistance against a repressive regime when it is blanketed with propaganda.

When companies like Google and Apple operate in those nations, they help legitimize and normalize that regime, confirming all the propaganda.

After all, the Google brand didn't come from the regime, they are a foreign firm that decided it was ethical to do business there.

← PreviousPage 4 of 34Next →