chrisoverzero

Joined 13 years ago

Karma
862
Submissions
244
Member since
Mar 23
View on Hacker News

Recent submissions

Comment · 20 days ago
So, nothing to do with Apple Pay at all, then?
Comment · 7 months ago
Comment · 9 months ago
"I made my max bid $500.00, but I'd have paid $500.01!"

"I made my max bid $500.01, but I'd have paid $500.02!"

"I made my max bid $500.02, but I'd have paid $500.03!"

…where does this process end?

Comment · 10 months ago
Mhm! Exactly! In the system those other languages use, once you see the variable’s declaration:

    User activeUser
…you’ll always know that `activeUser` contains a User value – something that might have an `Id` property. And the convention is enforced by the language, so it’s easy to communicate. These semantic distinctions are very useful, I agree.
Comment · 10 months ago
Sure! Let’s say I want to enforce that a variable only ever holds an integer. Rather than put the conventional prefix and the name together, like this:

    var intValue = 3;
…I separate the conventional prefix with a space:

    int value = 3;
…so now my co-workers don’t need to remember the convention – it’s enforced by the language.

(I hope this makes the joke more obvious.)

Comment · 10 months ago
Not all phrases’ meanings are derivable from the literal definitions of the words that make them up.
Comment · 10 months ago
> […] it shouldn't take long at all for people to learn the highly consistent naming conventions that tip you off to what type of data is being handled.

I’ve used languages with an approach like this. The difference in what I’ve used is that you separate the conventional part from the rest of the name with a space (or maybe a colon), then only refer to the value by the non-conventional part for the rest of the scope. Then the language enforces this convention for all of my co-workers! It’s pretty neat.

Comment · 10 months ago
No, we don’t mind. Go ahead.
Comment · 1 year ago
> Luckily, since type constraints are part of the signature of the method and there is no ambiguity, I am allowed to make this overload.

This isn’t the case. It’s allowed because the question-mark syntax means two different things in value- and reference-type contexts. The signatures really look like this:

    public static IEnumerable<TR> SelectNotNull<T, TR>(
      this IEnumerable<T> source,
      Func<T, TR> fn)
      where TR : class // …and the nullability of TR is tracked by the compiler

    public static IEnumerable<TR> SelectNotNull<T, TR>(
      this IEnumerable<T> source,
      Func<T, Nullable<TR>> fn)
      where TR : struct
This is an allowable overload.
Comment · 1 year ago
What makes that "most likely," other than that you thought of it?
Comment · 1 year ago
> How does one put a dollar value on a $10-30 GPT-4 pro subscription?

I’d estimate it at somewhere in the region of $10–$30, personally.

Comment · 1 year ago
> - Translate feature doesn’t have a copy button

Sure it does. It’s labeled “Copy Translation”. It’s the first button under the translation for un-editable text.

> - Multitasking (apps should shut down after some time spent idle, instead they have to be manually closed)

Apps that aren’t working in the background shut down effectively as soon as they lose focus. Don’t let the list of screenshots fool you – those aren’t running. Don’t waste your time swiping them away.

Comment · 1 year ago
Is the answer (ROT13 for spoilers):

V vzntvar gung vg pbhyq abg or orpnhfr Frg erdhverf gur rkgen fngvfsnpgvba bs Rd, evtug?

After looking it up: Nu, lrf, ohg Beq. Vagrerfgvat ubj gung vzcyrzragngvba qrgnvy yrnxf.

Even later: Unat ba, gurer'f ab jnl vg pbhyq or rira vs gung fngvfsnpgvba pbhyq or birepbzr! Vzntvar n frg pbagnvavat sbhe naq artngvir sbhe naq lbh znc `fdhner` bire vg… Gur fvmr bs gur pbyyrpgvba jbhyq punatr!

Comment · 1 year ago
Comment · 1 year ago
You’re responding to a comment containing a method call `thing.makeThingDoerForTest(1, 2, 3)` and saying “That's the trick - it is not test only code.”

Can you square those for me? I don’t get it.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton