all over town

Palm Beach County is Boca Raton through West Palm Beach... it's basically all one giant urban sprawl.

Flutter is awesome, it's better than React Native,

Flutter uses native iOS widgets now?

there is a ceiling effect.

I've been a daily smoker for about 20 years. Anecdotally, there does seem to be a ceiling, but it doesn't have the same effect on your perception; reaching the ceiling with a low tolerance feels a lot closer to something like mushrooms than reaching it does with a "dab a gram of extracts every day" tolerance, in which case most of the psychedelic effects are not present.

It's a pretty easy hypothesis to test: eat one gummy to establish a baseline for your high. Eat like ten gummies to hit the ceiling, and then repeat with like 40 gummies. I don't believe many people with a normal, human tolerance will notice the difference between 10 and 40. If you bumped the dosage high enough, say from 100mg/400mg to 2g/8g, I doubt there's anyone that could notice the difference.

I don't think this study invalidates the anecdote whatsoever. Long term caloric deficit has different effects on the body than a 24 hour fast does; chronic users have entirely different anatomical contexts than people who have abstained for an entire year; and so on.

If you wanted to really invalidate this anecdote, you'd need a long term experiment with chronic smokers as your subjects who would need to gain weight while being a chronic smoker, abstain for long enough for cannabinoids to be undetectable, and then lose weight rapidly while continuing to abstain.

it being in the midwest makes it much more likely there's P&R cameos, too

Mike Schur literally goes on long ass rants about how important journalism is on The Poscast all the damn time, too. It's not like he'd be a hard sell.

It's not. It's a logistical issue. Restaurants rarely have any system at all for handling order cancellations - in a lot of cases, cancelling an order means that someone has to call the restaurant in order to contact a manager who then has to walk into the kitchen, remove a piece of paper from the line, tell the chef to not make the order because it's already in his head, and then hope the order isn't already in-flight by the time that happens.

In the case of an UberEats order, the ticket gets printed automatically, the chef reads it to the kitchen and puts it up in expo. The window for cancelling an order before it costs the restaurant money is the amount of time it takes for that ticket to print. Hardly any restaurant in the country is on an entirely digital system, so even then, another ticket would have to be printed that says "cancel the other ticket."

Once the order is accepted by UberEats, it's in the system and things are moving on it: the ticket gets immediately printed in the kitchen and food begins to be prepared, a driver gets assigned and starts driving towards the restaurant, etc. All of these things cost money, and whoever causes the reason for the order to be cancelled ought to be responsible for all that money - so if you're cancelling it because you changed your mind, you should still have to pay, because drivers are already driving and cooks are already cooking and your money has already been spent, whether the food gets finished or not. If UberEats forgets to assign a driver, they should have to pay; if the restaurant cancels your order because their chef quit, they should have to pay.

I've always wanted a car with multiple honks. A nice, not that loud, short little beep like a tap on the shoulder. A sustained mechanical howl of rage and danger. A loud but pleasant alert to people nearby so they can come to you.

oorza
1
:Colts: Colts :Colts: Colts
12dLink

When you have access to a little, you become blind to many things you don't have and your focus is filled with what little you do have. When you have access to almost everything, it's the inverse, you become blind to the things you do have and your focus is filled with what little you don't have. It's like if everything everywhere was the same as movies: when you have access to nine billion movies because of streaming libraries, it's hard to choose, and the few movies you can't see (e.g. because of theater timing) easily become more desirable to you. Now imagine that's literally everything.

What OP may have interpreted as verbal assault may actually have just been forcefully speaking truth to power. Knowing the difference and when to deploy both is a key skill in senior engineering. 

There’s a concept called an Overton Window, most commonly used in political discussion, but its core idea is abstract: for any idea, there’s a shifting window that encompasses all the acceptable viewpoints. That window shifts based on what happens and how often it happens and what the reaction is. Something like AI generated child porn is right on the edge of the Overton Window for what’s acceptable vis-a-vis child porn but only for right now. The act of normalizing it would shift the Overton Window, as all normalizing does for its respective window, and make actual child abuse somewhat more acceptable. 

That’s why it must be swiftly and thoroughly treated the same as abusing a real child. 

oorza
10
:Colts: Colts :Colts: Colts
20dLink

That's why I never leave my house without Preparation F, you never know when your factoids will start flaring up.

oorza
17
:Colts: Colts :Colts: Colts
23dLink

I've been saying it for about a year now, and I feel like I'm not super tuned into football any more, but the market has definitely moved so far as to create an untapped valuation mismatch. Namely, the type of players that excel in power football don't necessarily excel in a standard modern offense, so they're cheaper, and you can acquire an outsized amount of power football talent per dollar, if any team were to commit fully to it.

Running backs are devalued, TEs that don't catch are devalued, OL without lateral quickness are devalued, why not just buy all the best of these three categories and punch people in the face as you run them over? You could almost certainly put the best running back committee behind the best power run blocking line with the best run blocking skill position groups all together and still probably have a bottom 5 spend on offense right now. And that means #1 spend on defense.

oorza
55
Wayne Brady
24dLink

A Penix getting pulled out too early ruining an entire night for everyone? Never.

this is so true and I swear to god the older I get, the better they taste and the more I can't eat them

oorza
1Edited
26dLink

It seems a bit silly to break every way of creating your object except for going through you validation

That's not silly, that's the point. There's a whole bunch of cases where that's exactly what you want: an ORM is a great case, where the only thing that should be able to make database entities is a factory of some sort that does all the ORM-y stuff that needs to be done; a reference to a file handler or other type of external handle is another; an API request or otherwise expensive validation that you don't trust is going to be done correctly externally, e.g. a configuration file that needs to be validated for real-world correctness that can't be expressed in the type system (you didn't specify a window's width/height larger than the screen, a user ID exists in the database, a user ID exists in multiple databases, etc.); you might want to control a small set of queries to run (against an API, DB, whatever) and don't want your downstream consumers to write their own. If the question is "If it would make my life easier and/or my code safer if I controlled the creation of X, what is X?" I feel like I could spend the rest of the day just listing one example after another. Every single answer to that question is potentially and probably a good use case for nominal types.

Structural typing is largely a better idea as a default construct because that question represents a small portion of the overall work you do in a programming language. In most cases, particularly in JS, it doesn't matter, but that doesn't mean it never does. Like I said before, it's probably never going to be the difference between good code and bad, but it does help, and compounding a bunch of little things that help 1% here and 2% there is how you create a culture of maintainability in a codebase.

Zod does validation with structural types with zero issues.

Zod uses branded types internally to hand the exact case I mentioned vis-a-vis not re-initializing validators and re-running validations. Whether you realize it or not, you recommended using them right here as a means to recommend not using them, because they're used appropriately here and there's no reason why you'd ever want to make an object Zod is going to brand except through one of the various functions that create said objects.

This is unrelated to the topic at hand, but Zod does not do anything with zero issues. It's phenomenally slow for validation at runtime, and the way its types are implemented make it fairly easy to make using TS impossible because of compile time performance. I did an experiment dumping my entire database via a Prisma schema as Zod schemas... however I tried, the TS language server couldn't handle only a few thousand Zod schemas, even after I had given it 8GB of RAM. Zod is terrible and puts a relatively low hard cap on the complexity and scope of your validation schemas because of its awful performance characteristics.

Kind of the inverse of what I said before, but stacking things that are slower than they should be but don't individually matter is how you wind up with slow software. If you don't care about the performance of your validators, it's fine, but when it's your validators, and your API access layer, and your state management, and the giant pile of abstractions that controls your routing, and the other giant pile of abstractions that controls your theming, and a hundred other core pieces of functionality that increase their fraction of runtime from 1% to 1.25% (or 0.01% to 0.0125%), then you wind up with software that feels slow and shitty and without any low hanging fruit.

I recommend typia or runtypes (in the case of react-native or some other bundler you can't easily use TS transformers with) now.

There are scenarios where it's extremely helpful.

First thing that comes to mind is an internal layer that makes the somewhat implicit assumption that data has been validated before it comes in. Accepting only branded types can force downstream users to use your validation and allow you to only accept data that you're reasonably sure is acceptable.

Speaking of validation, what if you have an extremely expensive piece of validation that needs to be run, say an API request to validate a token of some sort? Branding a type as IAlreadyInvestedABunchOfTimeToValidate<T> can be used as a quick, safe means to prevent duplicate, expensive work.

If we're gonna talk about expensive work, one of the most useful cases for branded types is any kind of data hydration. Let's say you have a Model with mandatory field id. You can accept Model | Hydrated<Model> all over the place, and the first time you see an unhydrated model, you can hydrate it, brand it, and encode that information into the type system, rather than (or in addition to) something like an isHydrated field.

And so on... I feel like this is one of those tools that you don't miss if you don't use it, but if you do use it, you see a ton of places for it to make your life 1-2% better. It's a small benefit when you can use it, but it's almost always (cognitively) free to use it, and small enhancements like this cascade and compound throughout a codebase.

oorza
3Edited
27dLink

Typescript isn't sound. You can do this by just flat out lying to the type system. This is actually how I prefer to do it because it prevents trash from occasionally making it through serialization layers into logs and whatnot.

const mySymbol: unique symbol = Symbol('mySymbol');
interface _Branded {
  [mySymbol]: true;
}

type Branded<T> =  T & _Branded;

function brand<T>(value: T): Branded<T> {
  return value as Branded<T>;
}

Everything here will either get removed by tree shaking / JS optimizer / TS compiler, or in the case of the function call, it will pretty immediately get JIT'd away. If you're worried about the empty passthrough function call, first of all what kind of JS are you writing where performance is that critical, and second, you can just manually cast as branded wherever you want.

I am totally unfamiliar with Supabase, so if you can throw together a simple repro I can clone and play with locally, I might be able to be of more help.

I think you may be able to do something like this, though:

```

type From<Table> = SupabaseClient<Database>['from']<Table>; // this parameterization of the Supabase from call needs to be validated against the type definitions

type Query<T, Q> = ReturnType<From<T>>['select']<Q>; // ditto ```

Just provide the generic to the function type:

declare function foo<A, T>(a: A): T

type R = ReturnType<typeof foo>; // unknown

type R2 = ReturnType<typeof foo<object, string>> // string
oorza
18Edited
29dLink

The powers that be hired a big wig consultant to come in and make us a more enticing acquisition target now that we're cash flow positive. One of the first things he did was explode about how tightly coupled we had become to AWS and install a new devops czar who immediately started migrating us into kubernetes. I initially was of the opinion that that was maybe reflexive and mostly unnecessary, but he had tales just like this one.

If you ask around, as I did, I'm sure you can find that you know a bunch of people with either first or second hand knowledge of a case where a small startup team (<20 engineers) was absolutely fucked (financially, technologically, expertise-wise, there's a bunch of different ways in can go wrong) by their coupling to one of the cloud providers and had to derail the business development plan for months to decouple. Turns out about a third of the CKAs in my personal sphere got their certification in such a circumstance.

I'm now firmly in the camp that it's never too early to be cloud agnostic, and it's obviously much less expensive to start with it than migrate into it later.

All they'd have to do is wrap the announcement in some nonsense about how the wide array of form factors and different types of people driving cars will finally give them enough training data to make FSD a real thing.