ducdetronquito

Joined 2 years ago

Karma
53
Submissions
24
Member since
Jan 2
https://github.com/ducdetronquito
View on Hacker News

Recent submissions

Comment · 2 months ago
Comment · 5 months ago
Comment · 5 months ago
Congrats on the release, and thanks for this nice tool !

I migrated a small python/django backend project at work from basedpyright to pyrefly 1.0 yesterday to try it, and the migration was painless: just running pyrefly init converted the basedpyright config to a pyrefly config in the pyproject.toml.

The typecheking phase went from ~3/4s to 0.5s which is very nice when ran with pre-commit hooks. It also caught some unnecessary type conversion that basedpyright missed (ex: calling str(value) on a value that is already a string).

I haven't toyed too much with the LSP in zed, but I did not feel anything was missing for now.

I will try to migrate larger backends in the following weeks to see how it goes.

Anyway, it's very cool to see a new stable and fast typechecker for Python ! :)

Comment · 6 months ago
You paint them wrongly as elitists.

It's a critique of low effort PRs compared to the high effort review they require.

Comment · 9 months ago
Good read, TIL!

That being said, I use Django daily for 10 years but I don’t understand the ORM besides basic CRUD. Even a simple group by looks weird.

Writing plain SQL feels easier and more maintainable in the long run.

Comment · 11 months ago
Good job, template partials looks like a nice improvement !

That being said, the current state of type annotations is a pain: django-stubs works on mypy but with a plugin (and mypy is slow as hell), django-types is a fork a django-stubs that works on pyright but is usually out of sync and pylance ships its owned stubs forked from django-types.

My biggest wish for next Django release would be that they finally ship type annotations themselves where it is possible. I don't need the crazy inheritance parts or the crazy stringly typed parts to be have proper type annotations, but just some simple stuff like HttpRequest, HttpResponse, View, Model, etc would help a LOT !

Comment · 11 months ago
You're right, but I also don't find a way a task queue library could know that upfront either to implement progress reporting.

Does anyone know a task queue library that implement it ? I would be curious to look at it !

Comment · 11 months ago
I also warmly recommend procrastinate !

We moved all our celery tasks to procrastinate at work for all our django backends since almost two years now and it has been great.

Having tasks deferred in the same transaction as the business logic stuff is something that helped us a lot to improve consistency and debugability. Moreover, it's so nice to able to inspect what's going on by just querying our database or just looking at the django admin.

For those wondering, procrastinate has no built-in alternative to django-celery-beat, but you can easily build your own in a day: no need for an extra dependency for this :)

Comment · 11 months ago
To implement progress reporting, it means you are able to know the time a task would take to run upfront, no? Is it even possible to do it accurately ?

Though, I imagine you could have strategies to give an approximation of it, for example like keeping track of the past execution time of a given type of task in order to infer the progress of a currently running task of the same type.

Comment · 1 year ago
Pleasant and interesting read !
Comment · 1 year ago
First thanks for mentioning tach, I wished this tool existed for a long time and I'm happy to give in a try in the following days!

For typechecker, I also vouch for Pyright which is what we use for all our django backends at work.

Just be aware that you will have hard time to typecheck part of your code where you rely heavily on django's magic (magic strings, auto-generated properties/methods, etc...).

In these cases, it's sometimes better to avoid these features entirely or accept that some part of your code will not be typechecked.

Comment · 1 year ago
I subscribe to that too!

If your enjoy your time that's more than enough to continue doing what you do :D

Comment · 1 year ago
Yeah me too, I could not stand it.

I do agree with you !

Focusing on being healthy is in my opinion way more beneficial to avoid being sick in general than trying to avoid being sick at all cost. Being stacked by millions in cities living unhealthy lives is definitely not helping to prevent being sick. I move to the country side after the last lock down, ~50km from a big city to still be close to work, and it's been very relaxing and good for my family's overall health.

Comment · 1 year ago
Yeah I think these days it depends on the doctor: some don't care, some asks you to wear one. But I admit I may be wrong here, I'm lucky to be healthy and my family too so we pretty much never go to the doctor.

We had this police operations too, even in restaurants where you had to have your mask when standing up (like going to the toilet, paying the bill, etc..), but you could take it off at your table.

I remember during the first lock down we were forbidden to go 1.5km from home except to go buy food: there was a large parc close to home so a lot of families would go there to chill, play with kids, do running, etc... but after 3 weeks the police noticed and they were going around in the parc to fine everyone. Most people were more afraid to get caught than to get sick, even old people.

Comment · 1 year ago
To continue on sfblah's comment (just above mine): in France, before the mask mandate that came after the first covid lockdown, I don't remember a single doctor/nurse* to wear a mask to do their job even during intense period of sickness like in winter or even during previous pandemics.

I don't remember anyone wearing a mask either in the doctor's waiting room, even when it was fool of sick people (old and young mixed)

* except for dentists, surgeon and their assistants during

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton