« first day (4500 days earlier)      last day (434 days later) » 

1:09 AM
@NordineLotfi Interesting, thanks.
@NordineLotfi Ok, no problem.
 
 
5 hours later…
5:58 AM
Hey everyone.
 
 
1 hour later…
7:18 AM
@Vivek please don't ask for help here with fresh questions on the main site as per our rules
 
7:54 AM
@KarlKnechtel well, you're completely right again. I "read" that page of course, but glossed over that part. That I was explicitly looking for =/
thanks for finding it
 
 
2 hours later…
9:29 AM
@KarlKnechtel Unlike Arne I didn't actually read that page. warnings was just something I found years ago while I was learning and it was "obvious" to me that I would need to suppress duplicates in my own code. Bad roganjosh, bad.
Well, I read bits of it to understand how to use the API but I wouldn't know to actively look for a detail like that
 
 
3 hours later…
12:19 PM
@AndrasDeak--СлаваУкраїні How "fresh" is too fresh? The rules also only say "recent".
 
@KellyBundy 48h
> If your question is eligible for a bounty (>= 48 hours old) and hasn't received a useful response, then you may link to it.
 
^ Literally the very next bullet point
 
Ok ok... Didn't expect it to be in another one...
 
1:10 PM
@KarlKnechtel Excellent questions. I don't know yet :-)
 
1:21 PM
Terminology question. Two objects are "similar" if you can transform one into the other using translation/rotation/reflection. Two objects are "congruent" if you can transform one into the other using translation/rotation/reflection/uniform scaling. Is there a term for "can transform one into the other using translation/rotation/reflection/stretching/skewing"?
I'll call it "resemblance" for now. We already know that any triangle can be skewed into an equilateral triangle, so every triangle resembles every other triangle. But more complicated shapes might not resemble one another. For instance, a rectangle does not resemble any quadrilateral with a concave side.
 
@Kevin At least the Wikipedia article on congruence has swapped meaning for these terms, btw.
 
(This is because affine transformations preserve parallelism. A rectangle has two pairs of parallel lines, so it can only resemble a shape that also has two pairs of parallel lines)
@MisterMiyagi Oops. Thanks, that should save me some confusion later.
I would like to determine if my "triangle plus not-centroid" system has any self-resemblance. If I can construct a new triangle and interior point that resembles the original four points, then this may be a stepping stone towards my ultimate goal of densely covering the plane.
 
1:40 PM
Can you stretch a shape so thin that it turns into a line? And can you stretch a line into a rectangle?
 
I believe affine transformations also preserve collinearity. So if a shape contains three points that aren't collinear, then you can't squish it into a line.
 
Shame
 
2:04 PM
From your MS paint sketch my first thought was that bisecting the parallelograms on each of the points would effectively become a strainght line in the end. They become asymptomaticly obtuse.
Those words are what I mean but perhaps not stated in a mathematically correct way. But it looked like the triangles would be squashed flat over infinite operations
 
looks like someone is about to dive into the 9th circle of unicode hell, i.e. the bidi algorithm
oh boy.
apparently, if you use list on a string of hebrew (or other RTL) text, that will end up displaying backwards from the actual order of elements in the list. The RTL formatting takes over for the entire list representation.
 
2:25 PM
I'm pretty interested in the asymptotic behavior of the system. If I can find something that asymptotically becomes an equilateral triangle plus a centroid, that would be a big win
 
That one escapes my imagination sorry.
 
What am I even paying you for ;-)
 
2:53 PM
I think if my creator told me my one true purpose was some mundane unimportant thing, I would say, "oh, that's a relief"
Not being the chosen one of legend, means that you can sleep in on weekends
 
3:08 PM
Who cares what the creator wants anyway? If they want something from me, I want something in exchange
 
Hi all.
I'm running a function in tkinter's after(). When that function throws, e. g. an AssertionError because I made a mistake, it prints "Exception in Tkinter callback" to the console, but won't trigger VS code's debugger. I'd like the debugger to break so I can inspect variables. Can I do that somehow? I think tkinter catches the exception
 
Good question. I don't know the answer. I'll poke around in the documentation and see if anything turns up.
 
@AndreasHaferburg fyi, there also a tkinter room
 
Everytime I see such questions, part of me thinks "someone should write a proper async tkinter".
callbacks are so disco.
 
@MisterMiyagi there is someone I know on the tkinter room that did something similar: github.com/TheLizzard/PyScratch/tree/main/src/threadsafe
 
3:44 PM
@MisterMiyagi Isn't "disco" a good thing?
 
Actually, async tkinter would still need callbacks. So I'm doubly confused
 
Currently getting VS Code set up so I can play with its breakpoint functionality. My first impression of the software is a bit poor, because it initially opened a window too tall for my monitor, and all the usual ways to resize a window were beyond the top of the screen.
Let's try making a "Hello, world!" script... It prompted me to save the file, suggesting the extension "txt" despite me initially opening the window using the "new Python script" menu item. Now it's running C:/Python311/python.exe Untitled-1 even though I saved the file as "vs_test.py". Now the window is gone along with all my code.
Never change, Microsoft
 
yesterday coworkers struggled with getting test suites discovered with it
 
3:55 PM
I believe it doesn't really matter that I'm using VS Code. What matters is that tkinter catches the exception
 
Quite possibly. I will step down from my soapbox of complaining.
 
@Kevin To resize a window, have you tried holding the Windows key and pressing left, right or up?
 
@Aran-Fey I think it wouldn't, actually. Instead of having all those tkinter functions that you call with a callback and stop, you would await a "tkinter function" and then directly run the "callback".
 
I have not tried that. I'll try it now. Ooh, pretty handy.
 
Some autohotkey scripts use this exact same combo to resize windows. that, or it uses ctypes like that Window Manager in Python I linked once
 
4:01 PM
@Aran-Fey In my book, yes. Which could mean the current public opinion is "no". Kids these days...
 
@MisterMiyagi Hmm, not quite sure what tkinter functions you're talking about. I can think of two kinds of callbacks - events like "button was clicked", and root.after(0, callback) for when you need to modify the GUI from a thread. Asyncio would reduce the need for threads, but that's about it. I doubt it would change anything about the event system
I guess technically you could replace button['command'] = foo with async for event in button['command']: foo(event), but... no
 
For events, I was thinking of an equivalent of asyncio.Event. So "run this after button was clicked" would translate to spawning your own Task that does await button and then runs the callback. By spawning the task yourself, you can also control how to handle its failures.
 
@AndreasHaferburg tkinter catches the exception inside the __call__ method of the CallWrapper class. If you patch that method with a version that doesn't catch the exception, then I expect VS Code will be able to see the exception. Here's a little prototype that works on my machine: pastebin.com/raw/XL5GMHwW
Caveat emptor, not guaranteed for any purpose (express or implied), no warranty, etc etc
 
@MisterMiyagi You mean with task.add_done_callback()? :D
 
@Aran-Fey :P
 
4:16 PM
I don't see much value in being able to access the outcome of a callback from "outside" tbh. If you want to handle an exception, you can just as well do that from the inside with a try:
 
Ideally, it would abolish the need to supress unhandled exceptions because you don't know who should handle them.
The asyncio design isn't ideal for that, but async itself should allow for it.
 
@Kevin Yay that works! Thank you so much! :)
 
In your ideal GUI framework, what would happen to those unhandled exceptions?
 
If a debugger is attached, don't handle it, but let the debugger handle it
 
@Aran-Fey They would be handled by whoever "registered the callback" or bubble up and kill the app.
 
4:36 PM
Ok, killing the app is easy enough, but I don't understand how the exception would bubble up (to where?) or how you would handle it. The callback crashed, so that's not running anymore. Who is there who can handle the exception? As far as I can tell, your only options are to 1) ignore/suppress it or 2) crash the mainloop
 
With an async style you can keep things running even after "return"-ing to the event loop. So anyone spawning a callback would stick around and get awaken if its child failed.
Basically do what TaskGroups do.
 
I still don't get it, but whatever
 
I'll ping you if it ever gets top billing on my random todo list... ;)
 
 
1 hour later…
5:57 PM
I've spent the whole day debugging weird hanging subprocess shenanigans, and in the end it was fixed by a reboot. That's a first, I think.
 
I also remember doing tango with subprocess.
it's easier to find quirks or oddities when using that than actually fixing them...at least for me
 
 
2 hours later…
8:17 PM
Hi
I have an issue with my socket code. It's a chat app over telnet which I'm trying to make readonly for web clients. However, the server is REALLY slow when a web client is connected.
Even output takes seconds to print out in IDLE
 
That doesn't sound like something we can debug for you
 
I did notice though when my code printed the clients which connected, the web client would always connect multiple times.
I had issues debugging that since my code appended all the clients to a dictionary and the web client would reconnect and the server would fail to find that client.
Nvm found the issue.
Turns out my web client was stuck in a while True: loop and I forgot to return before it.
 
Curious that it ever returned. A pint bet on there being more weirdness in this
 
8:48 PM
Anyone got tips on fixing scratched glasses? The internet seems to be conflicted about it, some sources say "you can fix this at home" and others say "you'll just make it worse"
 
if it was scratched cars, I would probably have one or two recommendation hmm
 
Just imagine a transparent car
 
I see what you mean. I guess the fact that it is transparent is what makes most of the recommendation I know for cars unfit for glasses
out of context, this sounds crazy
anyway, if it was a car, I would probably say, 1. carbon paper, 2. anti-scratch spray/gel, 3. paint. the main reason why those do not work for transparent car is because...I mean they could work, but I wouldn't recommend them for glasses, since, then you wouldn't be able to see then
it'll be really cool glasses though, at least if they are sitting on a shelf or something
 
Unfortunately they're sitting on my face :D
 
Right :P
Honestly, I kinda have glasses, but I never wear them (so that means they never get scratches). Nothing fancy, just the anti-glare/anti-blue light ones. My gut feeling tells me most of the DIY tricks on tiktok and youtube are probably either, 1. gonna make it worse, 2. will do nothing
 
8:59 PM
@Aran-Fey I assume the lenses are plastic, potentially with some thin films deposited on them, which would probably make this even trickier
hopefully an anti-scratch surface is not involved...
 
9:19 PM
It does look like there's a protective surface. There's a corner where said surface seems to have disappeared
 
Turns out using random pieces of clothing to clean my glasses was a bad idea after all
 
Nah, it must be the glasses. I do that too and it's still fine after a few years :P
well, I always use a cotton t-shirt...
 
Hmm. I honestly can't remember how long these glasses have been in use. Probably longer than a few years though
This is actually my 3rd pair of glasses. I got a 4th pair a long time ago, but now I use these again - for looking at a PC screen...
In other words, I'm blind as heck
 
ouch
Any old ones lying around as backup?
or new ones
 
9:25 PM
The old(er) ones are too weak, and the newer ones are too strong (for looking at a screen)
 
and the newest ones are too expensive
 
Well, not too strong, but unnecessarily strong
That would be like using binoculars to read a newspaper. Only gonna make my eyesight worse
 
my use case is different, I only wear glasses outside, and that's a lot less time than being inside, so I wear my glasses down a lot slower than you probably do
 
Maybe. The good thing about staying inside is that you don't get very dirty
 
the main sources of glasses dirt I was subjected to were chalk powder and dog tongues
 
9:32 PM
Dog tongues? On your face? O.o
 
I no longer use blackboards and keep my glasses away from the dog so it's fine :P
@Aran-Fey where else!
 
I thought tongues were cave dwellers
Well, dog tongues like to hang out sometimes though
Between the stalagmites and stalactites
 
Yet another reason to prefer cats :P
 
No, cats have horrible scratchy deboning tongues...
 
9:37 PM
They usually keep them to themselves though
...I think
 
@AndrasDeak--СлаваУкраїні can confirm...
It's both dry and wet at the same time. Actually sometimes it's surprisingly dry
 
10:02 PM
In QTreeWidget there is space between last row and the bottom of the widget.
How can i control it?
 
@ChrisP I'll take that as a pass for my MCVE request from earlier
 
What seems to be the problem here?
 
Good question.
Start with "Cute fluffy animals are cool, okay!?" in the room rules.
 
And that I recently commented about posting this in the room, led to a discussion in the Meta Python room, Andras said he wouldn't want me to post this in the room if I wanted to.
@AndrasDeak--СлаваУкраїні Perfect, thanks.
 
So that's the premise, and now Marco is making a scene because I posted a link to an image of a dog licking someone's face, after talking about dogs licking people's faces here. I moved some initial messages to our meta room where we can discuss room stuff, but instead he just wanted to keep being a problem here. So I ended up kicking him and moving his messages to our oblivion room.
 
10:40 PM
I've already said everything I had to say, maybe I'll talk to Makyen about this again, or rather, directly with the SO people.
@AndrasDeak--СлаваУкраїні Is commenting on something to keep being a problem?
 
I think it might be a good idea to dial down the RO actions a little. I'm not saying they were unjustified, but lately they often seem to make things worse
 
I'm not crazy about enabling problem users being loudly annoying. I don't want quality contributors to be driven away by the rest.
 
And when you're constantly being punished, it's only natural that you're on edge and annoyed and prone to writing more stuff that'll get you punished. Like a negative downwards spiral
 
that's fair, but that's also why each kick leads to a gradually longer time out from the room :P
and any good faith I might have involves discussing in the room which we specifically keep available for discussing, rather than walking around with a chip on one's shoulder
I do see your point from the psychological perspective, of course. Thanks.
 
Applauses.
 
10:51 PM
Why? Why would you ruin it? I said something that supports you, Andras responded respectfully, and then you come along with that pointless... I don't even know what. I don't understand.
 
I just said applauses. Just it. That's enough for me. I won't "bother" anyone here anymore, I'll talk to Makyen in the Meta Python room if it's possible for him.
But thanks for your certain support Aran, about Andras answering me respectfully in some parts, ok, nice, but in others I don't agree.
 
11:13 PM
in fact answering you about me respectfully (...) *
 

« first day (4500 days earlier)      last day (434 days later) »