HN user

Lunrtick

49 karma
Posts2
Comments29
View on HN

They could also have done default=uuid.uuid4 to have a new id each time, or default=lambda : str(uuid.uuid4()). It's not really related to whether or not it's a database default.

It seems quite unfair to place the blame on SQLAlchemy here, or even Python.

Even a statically typed language wouldn't prevent this kind of issue - the author of the code is the only person who can decide when they mean "use this exact string each time" or "use this function to give me a new string each time".

I suppose a column description API could follow the dataclass style definition, with different argument names for default and default_func. That would (I think) prevent this from happening.

I've tried a bunch, but many of the prettier ones don't have Linux versions. I've been using DBeaver (https://dbeaver.io/) for years now though - it's occasionally a little rough around the edges, but overall it's really amazing!

It uses jdbc drivers for database support, so it can handle basically anything.

May I ask what context you use it in? It looks like it strikes the right balance between simplicity and descriptive power - kinda like a statically typed python.

The web side of it seems rather different from a Flask or FastAPI setup, and it obviously doesn't have SQLAlchemy (which I really like). Do you have any recommendations on that front?

Seveneves by Neal Stephenson. Excellently written like all his books, but the complete loss of hope (realistic as it was) was far too depressing - I like my SciFi as escapist as possible

I'm currently loving FastAPI and Sqlalchemy, but I have been looking for TypeScript equivalents - TS is such a nice language to work with.

What libraries are you using? I haven't found anything that seems to match the easy OpenAPI schema generation and validation that FastAPI and Pydantic provide.

My occasional accidental Google search for programming related things has been filled with spammy sites - I wouldn't quite describe them as "no content", but there really wasn't much of it. DDG isn't really better, but I definitely wouldn't say it's worse, at least for my searches.

I'm interested to hear how you find it - I looked at it to manage some parts of an already existing system (postgres + sqlalchemy) and there are some quirks.

It doesn't automatically detect foreign keys and make the fields for them correctly. Furthermore, it seems like they don't even use foreign keys for the models created through their UI - I checked the github issues, it seems like all of this is planned but work on it seems to have just started.

I don't mind this too much, to be honest, though I would prefer it if they open sourced it with licence based restrictions.

They're not open sourcing Pylance, which has some really nice features. The ones I mainly use are the semantic highlighting (it colours variables etc based on their type), and the auto imports (wow, I didn't realise how much I missed that).

However, those are just sugary extras, the real benefit is the typescript based type analysis. This can be had using the open sourced pyright extension.

Lincos language 6 years ago

Taijin Kyofusho was the first song of theirs I heard - wow. Such a great band!

They dropped the temperature under load by a good 10 degrees C just by milling a few mm off the heatsink so it actually made contact with the CPU... sure, that didn't increase the performance drastically, but it seems like a massive oversight on Apple's part

I definitely agree, the insane dependency chains really make me uncomfortable.

However, not every project will involve pulling in such crazy stacks. I recently experimented with Hapi + TypeORM. Hapi's core goal is to use only what they directly maintain, and I think it works really well! Node_modules is still not tiny, but it's at least an order of magnitude better than what I'm used to.

That is generally true, but I think the intended purpose is to reward R&D. If a company spent 10 years and lots of money making something, they should get some benefit for the investment.

In practice, though, I think the system is less than ideal.

Rob Pike interview 6 years ago

I think a major one is simply the easy of deployment - one self serving binary is quite refreshing after dealing with wsgi etc.

I suppose the static analysis is quite cool too...

Not quite the same, but I got a Withings Steel HR when my pebble died, and I love it! I charge it once a month, and it handles the most important notifications quite well. Far less hackable though.