21,276 karma · joined Nov 23, 2012 (14y ago) · 6,746 submissions
blog: https://rtpg.co
email: raphael at above domain
comment 1y ago · link · parent
I have had good success with DRF model serializers in like Django projects with 100+ apps (was the sprawling nature of the apps itself a problem? Sure, maybe). Got the job done
As with anything you gotta built your own wrappers around these things to get value in larger projects though
comment 1y ago · link · parent
In a more just world pythons typing story was closer to typescript’s and we could have a fully realized idea like it that supports the asymmetric nature of serializing/deserializing and offers nice abstractions through the stack
Right now Pydantic for me is like “you can validate a straightforward data structure! Now it’s up to you to actually build up a useful data structure from the straightforward one”. Other tools give me both in one go. At the cost of safety (that you can contain, but you gotta do it right)
comment 1y ago · link · parent
You have way less in terms of tools to actually provide nice straightforward APIs. I appreciate that Pydantic gives you type safety but at one point the actual ease of writing correct code goes beyond type safety
Just real straightforward stuff around dealing with loading in user input becomes a whole song and dance because Pydantic is an extremely basic validation thing… the hacks in DRF like request contexts are useful!
I’ve seen many projects do this and it feels like such a step back in offering simple-to-maintain APIs. Maybe I’m just biased cuz I “get” DRF (and did lose half a day recently to weird DRF behavior…)
comment 1y ago · link · parent
If you want to "just" use sys.remote_exec, you will need to use that from a matching Python version. If you dive into the implementation (check out the PEP), you could most definitely write a C or Rust program that implements remote_exec and "does the thing".
The protocol is basically "tell the program to read a python script from this file". That python script will be executed in the running program's environment, but you don't need for the software on the other side to be a python program!
sys.remote_exec itself only targets same Python versions though.
comment 1y ago · link · parent
This is what 3.14's remote debugging protocol gives us. And even more than that, because I believe that debugpy needs to be invoked beforehand!
The value of this tooling is you don't need to predict that you need debugging before running the program. All of your Python programs[0] can be debugged. No need to restart. No need to modify the launch parameters either: you don't need the "debug configuration" from vscode, you just need a PID.
[0]: so long as you're using the same version of Python and it has the remote debugging protocol enabled, and also you have the right OS permissions
comment 1y ago · link · parent
I think that the attitude of the government has shifted but not by _that_ much, and I don't think we can discount the past 50 years of urbanism as having no effects (plenty of the stores I'm thinking about aren't 100 years old after all). But I won't pretend to believe that we can't have nice things taken away from us.
I don't know how we get new Nakano Broadways in the current environment.
comment 1y ago · link · parent
People say this but Tokyo preserves _way more_ weird subculture stuff and small stores than other major cities IMO, despite constant rebuilding. My theory is basically that because it's nice and dense, and the real estate is extremely liquid by my understanding, stores and restaurants can get their 100 superfans that support the business.
Like I moved to Australia a couple years ago and I have no idea how anyone could afford to open a small independent shop, and you see loads of chains.
Tokyo it's harder than before, but places like these shopping arcades offer some respite (along with other shopping centers).
I am worried that the Tokyo government isn't particularly interested in preserving these places though. They have openly said they want more places to be redeveloped like Ginza of all places.
comment 1y ago · link · parent
A decent mental model is that the top-most commit isn't generally going to get pushed up anywhere. It's like your working copy but also you get stashing "for free" (change back to main to make a new commit? All the WIP stuff stays on that branch instead of being carried over to main!)
comment 1y ago · link · parent
I am very unhappy with asyncio leading to the gold rush of a lot of people writing "async-capable" libraries that all make (IMO) really gnarly design decisions in the process. I have seen loads of newer Python projects that take async-capable libraries that make life harder for people who like shipping stable software.
Meanwhile a lot of existing libraries/frameworks that just have more "serious" overall designs have to churn quite a bit to support sync and async workflows.
I care a lot about Django getting async ORM support in theory, but at this point I don't know how that's happening. My current mentality is crossing my fingers that something akin to virtual threads[0] happens
[0]: https://discuss.python.org/t/add-virtual-threads-to-python/9...
comment 1y ago · link · parent
One should acknowledge how many of the freedoms locked into the founding ideology of the US is pretty close to what libertarians reach out for. I don't know many libertarians arguing against Citizens United.
That isn't to say that the US can't aim for something different, and that the core of the nation today likely believes many different things.
We can choose our own destiny without trying to ascribe every good idea to what a group of people thought at the founding of the country.
comment 1y ago · link · parent
comment 1y ago · link · parent
People who do this kind of stuff without much personal involvement get surrounded by consultants who do lowest common denominator nonsense with everyone taking their 30% extra on top of costs (because the person paying isn't paying attention!), and you end up with a bunch of stupid gastropubs that aren't profitable, and your IT company doesn't have any local talent.
Almost every restaurant and business that people actually like survives by having some owner put a bunch of energy into it. I don't think there are that many people who would be willing do that... and if you pay people to do it for you the economics really stop working extremely quickly.
At one point the billionaire will be tired of dropping $5 million a year for their pubs that nobody actually cares about
comment 1y ago · link · parent
Still want my phone battery to be replaceable, but I'm pretty fine with not being able to do it myself.
comment 1y ago · link · parent
And so while there are people who want "small screen + nice camera". There are people who want "small screen + small price". There are many people who _don't want the small screen_. So you have this phone that can cost a lot of money (in a pretty messy market where most phone models seem to not make money anyways), and you're going to cut off chunks of the market?
So we end up with small screen + shitty camera and specs etc. And people here who want a small phone (but really want a small phone that isn't miserable to use) still are unsatisfied.
comment 1y ago · link · parent
After opening FF while previously using Arc for a while I was super happy with the usability improvements (that don’t seem to have impacted older workflows fortunately… big fan of how FF makes it easy to customize the toolbar etc)
comment 1y ago · link · parent
In the abstract I'm open to some specific traditional medicine thing working for "some" reason, but I understand that that makes me (as they say in the industry) a mark.
comment 1y ago · link · parent
That's a bit surprising, after seeing so many people I know in academia who are basically being used as private sector R&D on the cheap (see all the formal methods work being funded by cryptocurrency outfits...), I would have assumed that most large corporations even outside of "innovation" sectors would take advantage of this.
But maybe this effect in places like the US are just downstream of the wild wage arbitrage you get by doing this.
comment 1y ago · link · parent
Meanwhile if someone told me "yeah eating a bunch of ginger when you have a cold is good to you because ginger has a bunch of stuff that's good for your body then" I don't have a particularly hard time believing it. Sure! Why not!
The article's critique about symptom management rather than disease management is legit though. And the precision for actual research is good. But at the end of the day if my body needs some stuff for symptom management and some TCM strategy involves me giving myself like 20x the dose of it... well it's something, isn't it? Though you could argue about it "deserving" credit or not.
Nobody whines about the unscientificness of giving yourself a bunch of salt through chicken noodle soup after a hangover.
comment 1y ago · link · parent
On top of that, being unable to just slap in big docstrings in my code makes me sad. Docstrings are useful.
This isn't the end of the world, but it's something that bugs me.
comment 1y ago · link · parent
Anyone know what minesweeper software I'm thinking of?