News for hackers. Stuff that matters.

gabes

Is inappropriate content on some random forum the same as deliberately manipulating children?
I think this misses what is undeniably the best part about zod. Yes, you could define all of your types this way, but it’s only necessary at the boundary of the program. Internal functions don’t need to validate inputs if the caller is trusted.

Being able to define a loose input schema at the boundary and then transform it into a shape that your program actually needs is extremely useful.

The entitlement of the gaming “community” is next to none.

I did what you said last year and it’s been a delight.

This is exactly what I would do too if AGI was just around the corner.
Re:Litdb – type safe SQL for JavaScript/TS on Thursday December 05, 2024 @08:44PM (#42335204)
What does a migration look like with something like this?
Meta doesn’t buy competition?
You should have read the post before commenting.
Re:Britain being forced to go cashless 'against its will' on Sunday April 03, 2022 @09:11AM (#30896623)
I was asking because American right wing news has frequently lied about what was happening here in Canada. To my knowledge there hasn’t been a single report of a frozen bank account over a donation except for some debunked tweet by a Canadian conservative politician.

Thus, I asked for a source.

Re:Britain being forced to go cashless 'against its will' on Thursday March 31, 2022 @02:03AM (#30864279)
> Even people who donated to the truckers before the crackdown got targeted in the bank account freezes.

Source?

Re:Ask HN: Why can't await be used from non-async functions? on Monday February 28, 2022 @01:03PM (#30502885)
This isn't _exactly_ true. JS will await on anything that is Promiselike (an object with a `then` function that accepts a callback). See the TS definition of Promiselike.
I've both personally and professionally worked on builder-type applications in the past and found that lenses are always the most elegant way to do state management. Over the past month I decided to hack on a general purpose library for React and lenses with the end goal of coming up with something that felt _good_ to use. Cheers!
Re:React Facade: Dependency injection for React hooks on Monday July 05, 2021 @12:06PM (#27739332)
I think this suggestion highlights why I'm not a fan of the module-level mocking approach. It puts the onus on the developer to ensure that type checks are present where they wouldn't otherwise be. On larger teams, I've found that stuff like that is too easy to forget about or choose not to do.
Re:React Facade: Dependency injection for React hooks on Sunday July 04, 2021 @11:12PM (#27734329)
Yeah that’s fair. Not sure about you, but in the past I’ve struggled with keeping Jest module-level mocks in sync with their actual interface. Was playing around with how I could get around it and this is something I came up with.
Re:The 'Fuck You' Pattern on Monday June 28, 2021 @11:49PM (#27671544)
Ah of course. Shows how I hold my bias toward Facebook :facepalm:
Re:The 'Fuck You' Pattern on Monday June 28, 2021 @04:38PM (#27667744)
Speaking of fuck you patterns, has anyone else been part of the A/B test where navigating to an Instagram page prevents you from using the back button? They somehow clean my tab history so that I can’t go back to Google. It’s been happening to me for months!
This game is incredibly good. It's everything Diablo 3 should have been.
Re:Public speaking for introverts on Tuesday September 19, 2017 @12:18PM (#15285977)
The definition of an introvert is a shy person.

Older »