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 !
I have the same issues in Zed and VS Code, but somehow everything works in PyCharm. Even all the double underscore nonsense in QuerySets that I've never seen work enywhere else. I don't use it very often because I mostly work from my potato of a laptop these days, but when I really just need to Get Shit Done, I sacrifice 10 browser tabs to reclaim some RAM and open PyCharm.
Pycharm does not have good type checking. It has the best type inference, but its type checking is very basic. It’s not strict, that’s why you don’t see a lot of errors. When complex types don’t much, it won’t complain.
I agree, type annotations need work. I just use stubs and then I have some rules to set some of the more common ones to be warnings instead of errors, and then I just deal with the fact that there's gonna be some yellow squiggles.
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 :)
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.
The way it's typically done is that the worker process reports back its progress to the job metadata on the queue, and the web worker polls the job metadata to read the progress. I've implemented this for progress bars many times on Django with django-rq.
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.
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
Doesn't it depend on the medical center these days? In Poland everybody was so crazy about it that even police used to go on public transport (trams, buses) to check if everyone have their masks on, but now some doctors ask you to wear a mask (then they provide it as well), some not. Same thing in hospital.
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.
Yeah here in Spain nobody does masks anymore either. Except some tourists.
I'm glad, I always found it a super heavy burden, for me even worse than the lockdowns. But this is due to prior respiratory issues and PTSD related to that. For other people it will be a lot easier.
For me I'll just take the risk as it comes, I'm sure it's a bit higher without them but there's many things that can kill you in this life. For me being overweight is probably a lot more likely to do so.
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.
Oh yeah I love living in the city. Drinking and partying in clubs with hundreds of people in a tiny place (so masks really won't help anyway) until 6am. My life is not very healthy I know, but it's very exciting which is also important.
There was a commercial in Holland saying "If you have to watch your life flash before your eyes one day, you'd better make sure it's not going to be boring!". I subscribe to that, although the ad was for the army which I wouldn't find exciting at all :)
But I know many people who love the quiet life. I lived in a small town for a decade but it made me feel so restricted, I deeply hated it. People vary! And I don't have a family even at my age so I'd be pretty lonely outside the city.
I'm continuing my tradition of doing AoC in Whitespace[0]. The first year I did it, it was motivation to build out a standard library so things wouldn't be so tedious. Now, I find myself wishing I had finished better tooling. I debug with wsjq[1], a CLI debugger like gdb written in jq, but it's slow.
I've done last two AoCs in F# (well, only the first few days too). For a person without prior functional programming experience, it was fun! Unfortunately I won't have time to participate this year, but if I did, I'd probably chose F# again.
Nice. I've started picking up F# too and am trying AoC with it this year. I'm still early in my functional journey, but I think AoC has been helpful thus far.
You guaranteed it would be a negative interaction when you negatively interacted with the post. You're allowed to skip the ones you don't want to reply to.
I only toyed with F# recently, but coming from Python I really like that I can also use a REPL to experiment stuff: I wonder if experienced F# devs use it too.
I hope to have time to build a small web backend project this winter, to get to know the language and ecosystem better.
I heard good things about Oxpecker for the http part; do you have any recommendation for a good postgresql client/driver ? (I don't like ORMs)
- https://monazita.gitlab.io/monazita/ (i developed it for a project of mine while learning fsharp. Basically works but could be more polished and is pgsql only)
As an polyglot dev who has the chance to use F# dev at times the REPL is how I POC most things - if I'm not sure of an API, even inlined into my actual codebase just hit the "Send to F# interactive" and it runs there and I can try things inside a module. Or when I want to try a new library, or when I want to do a quick benchmark, or as a substitute to a PS script, etc. You can even make F# scripts executable with the shebang `#!/usr/bin/env -S dotnet fsi` which we do a lot for scripts around our projects as an alternative to bash/python in our .NET projects where we already know a dotnet-sdk is installed. Usually runs faster too and typically just as concise. Just my anecdote opinion - the syntax and idioms of F# lean themselves more to REPL programming then C# which typically needs more OO structure rather than small code snippets strung together.
Congrats on the release, it like every bit of it !
I hope Gleam will find more sponsors for Louis and the core contributors, especially one from a stable company !
On this side, have you thought about publishing paid educational content to both pay the bill and still contribute to Gleam’s growth ? I don’t know for others but I would love to pay for something like Luca Palmieri’s book Zero To Production in Rust but in Gleam !
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 !