

; and ; respectively, in case anyone wants to see how it renders on their machine and is also lazy.


; and ; respectively, in case anyone wants to see how it renders on their machine and is also lazy.


You can use mutable default arguments now with a new syntax:
https://peps.python.org/pep-0671/
def bisect_right(a, x, lo=0, hi=>len(a), *, key=None):
def connect(timeout=>default_timeout):
def add_item(item, target=>[]):
def format_time(fmt, time_t=>time.time()):


I don’t use Rust much, but I agree with the thrust of the article. However, I do think that the borrowchecker is the only reason Rust actually caught on. In my opinion, it’s really hard for a new language to succeed unless you can point to something and say “You literally can’t do this in your language”
Without something like that, I think it just would have been impossible for Rust to gain enough momentum, and also attract the sort of people that made its culture what it is.
Otherwise, IMO Rust would have ended up just like D, a language that few people have ever used, but most people who have heard of it will say “apparently it’s a better safer C++, but I’m not going to switch because I can technically do all that stuff in C++”
The era of pedantry is finally over:
Direct support for REPL-specific commands like help, exit, and quit, without the need to call them as functions.


To be fair, Python is just glue for code written in lower level languages when it comes to AI


“Considered Harmful” Essays Considered Harmful
Because “considered harmful” essays are, by their nature, so incendiary, they are counter-productive both in terms of encouraging open and intelligent debate, and in gathering support for the view they promote.
At any rate, they don’t have to break type safety anymore with PEP 612
If anyone’s wondering why:
>> 0.000005
0.000005
>> 0.0000005
5e-7
It’d be interesting to see if switching to pypy made any difference. It won’t beat the eventual exponential growth, but I’ve seen it be as fast as Rust code I’ve written for code like this.
Yeah, they’re definitely still the standard. They’re not really replaced by comments, comments are more for explaining why bits of code are the way they are. Docstrings are kind of like comments for functions/classes/etc that Python knows how to handle specially. The interpreter will parse the docstrings and make help text out of them available to the help builtin function
Not really a question, but something to think about is being more strict about backwards compatibility so that people don’t get burnt out on having stuff break. Coming from this post by the Tesseract dev, who did not like the breaking changes to the v3 API in 1.0: https://dubvee.org/post/2904152
To formulate that into an actual question, do you think the changes are still worth it and you’d make the same decision to break backwards compatibility?
Thanks (It was bothering me
Yeah, I discovered this when a coworker wrote code like def foo(timestamp = now()) and had fun debugging why there were a bunch of duplicate timestamps.
PEP 671 would add new syntax to ease the pain, but it’s not accepted yet. It would allow for writing function definitions like one of these:
def bisect_right(a, x, lo=0, hi=>len(a), *, key=None):
def connect(timeout=>default_timeout):
def add_item(item, target=>[]):
def format_time(fmt, time_t=>time.time()):
Only one program can listen on a port at a given time usually. Something’s listening on port 443 (the standard HTTPS port), and when nginx starts up it tries to listen on that port and can’t. You can figure out what’s already listening on that port with commands like lsof or netstat, see here for examples:
https://superuser.com/questions/42843/finding-the-process-that-is-using-a-certain-port-in-linux


IMO this is a good fit. There’s no rule against it, and I’m a fan of not splitting up communities until really necessary. Maybe once there’s so many people posting code for review that it becomes annoying to find other posts, then it’d be worth creating a new code review community or something.
Good callout. I’m actually admin on this instance so it wouldn’t apply to me by my reading of the code. Lemmy schedule also doesn’t currently use the scheduled posts Lemmy feature, it tracks it separately. Still good to know though, thanks.
Excited to see the idempotency feature. That will help a lot with double posts from using https://github.com/RikudouSage/LemmySchedule
This is probably the best explanation I’ve seen:
http://adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html