That's a good point! I suppose in Python that could be a guard in the column definition function.
HN user
Lunrtick
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.
That would be nice. I've been using Keepass2android for years now though, and it's been really great!
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.
I've been using Postale for a for a few years now, it's been very solid and the pricing is reasonable!
The author of SQLAlchemy (which recently released great async support) wrote a great post about how async can actually lead to a small decrease in performance compared to the older threading model, at least for db related functions in a web backend context. [1]
For websockets or lots of network calls, you can't really beat async though.
[1] https://techspot.zzzeek.org/2015/02/15/asynchronous-python-a...
Have you tried Django Ninja? https://django-ninja.rest-framework.com
It's most of FastAPI (auto docs generation, great Pydantic integration, etc) but for Django.
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
That sounds extremely frustrating. Maybe a good workaround is a custom domain?
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.
DigitalOcean does offer Timescaledb in the their managed postgres offering AFAIK, along with quite a few other extensions (PostGIS etc)
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.
When did 5 GB of RAM become severely limited?
When you want to use 6 GB..
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 think that was a ±14% drop in the number of people living in a free country now that India is relabeled
I've also been using Zod for the same purpose - they've got a nice comparison section that included io-ts
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.
I wish I had time to read them all...
This was posted in 2016, but their process hasn't changed. I'm not sure if it's actually caused any real damage yet (usually you'd add your domain fairly quickly), but it seems crazy that in between declaring DO as your DNS provider and importing the domain on DO, it can be stolen.
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
Jitsi has end-to-end encryption now (used it a few days ago).
It behaves quite hilariously when you switch to e2e encryption after a normal connection - the other party gets random noise for a little while.
Hehehe, is that what we call searching on DDG now?
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.
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...
I totally agree about not needing to make the whole page reactive, it definitely drops the amount of work required.
Regarding the page loads, have you looked at Turbolinks? https://github.com/turbolinks/turbolinks/blob/master/README....
It's basically a drop in upgrade, makes the whole site feel like an SPA with none of the work. Lovely.
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.