Hacker News new | past | comments | ask | show | jobs | submit | Yossarrian22's comments login

Yes. If you want runtime validation of data you’re taking in people recommended pydantic. If you’re looking for runtime validation within your own code I’ve seen people use beartype, though to be honest I don’t personally understand the value added from it

...or Marshmallow, which allows one to do many complex validations in a relatively trivial manner.

On one hand, I feel like I've been in a coma since covid because I've just been coasting along with Marshmallow and jsonschema, but on the other hand it's like a lot of the major advances have been in the past couple years. Apparently pydantic got a big version update in 2023? And now all these competing static type checkers?

Pydantic got the re write in rust treatment so de/serialization is crazy fast now.

msgspec must be insanely fast then: https://jcristharif.com/msgspec/benchmarks.html

But of course unless parsing and manipulating JSON is your bottleneck, Pydantic is great, too.


It's true. msgspec has incredibly fast msgpack serialization. It's a shame so few people know about it.

JSON, too!

Close, Microsoft’s type checker Pyright is Typescript. Its still faster than mypy for me though.

Pls forgive my ignorance, but how is Typescript (a superset of Javascript) used to type-check Python?

You can write a parser and type checker for pretty much any language in pretty much any language. It's just text files as input and text as output.

They're saying pyright is a Python type checker, but it's written in Typescript, not Rust.

There's nothing magical to type-checking Python. You can write this in any programming language. TypeScript is actually a pretty nice language for writing static analysis tools.

just like the Python compiler/interpreter is written in C.

…how else would it work?


He’s not wrong when it comes to revenue and CapEx, what so the TAM here?


The problem is those towns weren’t crap within living memory when the books were written. Now anyone who remembers otherwise is close to dead


Some of them maybe have gentrified (not to ignore that this in itself isn't 100% a good thing). Others are if anything worse than when he wrote the book.


Nah, several of them were always running jokes, some of them were a lot worse a decade or three earlier, and some of them were picked far more for their snobbishness or for being homogenous sanitised suburbia than their decline.


Even if they can get robotaxi to work on a level better than Waymo currently is shouldn’t they just be valued as if they were Uber with $0 paid out to contractors? The labor is not that significant a cost to what’s fundamentally a taxi business


Full FSD would theoretically allow vehicle owners to rent out spare capacity with no hassle.

I saw the low-tech version of this in Honiara: Western expat buys a cheap car. Driver is hired to take kids to/from school, but in lieu of payment, driver is free to run a taxi service as long as he makes his school commitments.


When you don’t have a driver anymore you quickly run into an issue with keeping the vehicle clean.

One time having a drunken stranger puke in your car while you’re not using it will be enough for a lot of people to determine it isn’t worth the hassle.

It’s pretty easy to imagine a number of scenarios that disabuse the nothing of ever renting your car out “no hassle”. Low hassle maybe, but your framing implies you’ve never worked in a job that required engaging the general public.


Not defending yourself and hiding evidence during discovery tends to go badly


Having been to nursing homes and assisted living facilities I think that's mainly due to drugs.


Yep, you'd be surprised by how many turn downright violent when unmedicated. Sometimes the violence is a big part of the reason why the family ended up having to send them to a nursing home.


Man, the nursing homes in the 90s germany, where dement SS-soldiers goto attack polish nurses and victims of the russian liberation ran from any nurse with the accent. Sometimes drugs are the only thing keeping a institution working.


Who should qualify? Do we go by a one-drop rule, if so what percentage of the population are we talking here? Do you have to prove that one drop came from slaves in the United States of America(e.g. "Based on best records available your one drop likely came from slaves in Bermuda no reparations for you")?

And finally how should this be funded? Should people who immigrated or whose families immigrated to America after slavery was abolished be taxed also?


That’s right. It’s about American slaveholders. So you’d have to prove a direct descendant was a slave. Then there’d be the capitalization of the bank. Could probably be structured as a loan.

And yes, everyone would indirectly be taxed for slavery reparations.


This is fantastic! Perhaps I missed it but do you go over why you chose a portrait layout as opposed to a GBA-style landscape layout? With the existing equivalents in the FPGA space all being GBC style I'm curious if that's just a personal preference or if there was something that led you to select that layout.


Good question, I didn't talk about this in the writeup.

It's because I think that this design is the most efficient use of space, if you want to ensure that Game Boy cartridges don't stick out (like they do on the GBA). The device is divided into a front half and a back half, with the PCB in the middle. The screen and buttons are all in the front half, and the cartridge and battery are in the back half. If the device were landscape, you'd have the cartridge take up the entire middle space in the back half, leaving smaller spaces to the left and right (under the Dpad and face buttons) for the battery. So you'd either need to use two smaller batteries (and deal with that), or use a single battery (and have worse battery life and an empty space).

It's definitely possible, this just seemed like the simpler way forward. I probably would actually personally prefer a landscape orientation. Maybe in a future version!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: