« first day (3529 days earlier)      last day (1643 days later) » 
00:00 - 13:0013:00 - 23:00

13:06
Oh how I loathe the post-closure answer grace period
you mean that str.replace question?
@AndrasDeak I'm not too fussed when it happens by accident, but it does annoy me when people use browser hacks to exploit it.
5 answers on a basic debugging dupe without debugging it
@PM2Ring probably not a mainstream thing
@AndrasDeak :facepalm:
13:15
I could live with the crappy answers, it's the upvotes that are annoying.
Sends totally the wrong message.
I would have linked it if I wanted to
I went & found it anyway. I wish I hadn't... But I guess it's a change from looking at homework dumps on Physics that consist of a crummy phone photo of a text book page, pasted in sideways.
13:32
@PM2Ring Damn that sounds rough
At least scan the textbook page
heck there are phone apps these days that can do that for you
13:49
@RoadRunner-MSFT Half the time they don't even bother to make sure the page is flat. :) OTOH, Physics has a very strict homework policy, so we can generally close those questions.
@PM2Ring sounds like my remote mid-terms
14:07
@AndrasDeak I've always been curious, what stops students from cheating in remote exams?
Nothing
Other than their own conscience.
14:20
Hello
14:41
@MisterMiyagi (the reason for pinging you specifically: How to submit solution on exercism?[Yes, I can google it, I did that, it didn't helped]). I am using linux(mint).
(I figured it out, I think)
 
1 hour later…
16:07
@PM2Ring The sad part is there are still people who think homework questions are okay on Physics (overflow or SE)
or rather see "homework questions are okay but .... " and completely ignore the but ...
@RoadRunner-MSFT There are things you can do using webcams & remote desktops but all can be bypassed (I just changed a solid chunk of my questions to open-ended ones which are harder to cheat and made it harder - also did a few bot sweeps to make sure my questions weren't super "Google-able")
16:49
TypeError: 'IntVar' object does not support indexing
@ChrisP nope, it doesn't
So, what's the error?
` print(title[0][2])
self.repeats_songs[row-1][0] = tk.IntVar(value=int(title[0][2]))
self.repeats_songs[row-1][0][1].set(int(title[0][2]))`
print --> 0 Correct.
Error at the third line.
Aaa
I found the error
Congratulations.
ok now!
Pff, when you have to work in a large project (or medium), then sometimes it's difficult to be 100% correct in one parsing...
Hell, I have that problem with 20-liners sometimes...
user13682510
17:28
@AndrasDeak Good idea!
18:24
@ChrisP with your track record you are required to come with an MCVE when you ask for help. Have the shortest amount of code necessary to reproduce your issue, with a clear problem statement and question.
I'm surprised that's a real error, because / isn't even integer division
In python 3
Right, but it's a real error in python 3. I guess it just means "int divided by int"
it happens when doing regular division on integers. not sure why it doesn't just give inf as dividing floats would do.
I feel like it was suppose to be a pointer to the solution (using //) but agree the wording is a bit weird
#1 question from students (even though all my examples use decimal) for my Rule-based analysis assignment: How come my confidence percentage will not match yours & I keep getting inf?
The answer, in every language, is don't use float
18:43
I've yet to see a problem where floating inf was a side-effect and arbitrary-precision solved it
that's almost always an XY problem
floating inf shouldn't be a side-effect (these are students mind you but an XY from them trying to roll their own Decimal class)
....one day I'll find the Quora/Reddit/SO post which has this Decimal class and destroy it (or well add a warning to not use it at least :)
PYTHON has a builtin one. Are you sure they aren't using that? Or is it your JAVA course?
15 mins ago, by LinkBerest
The answer, in every language, is don't use float
It's the course where they can use Python, Java, or Scala as they choose (they can also use C# or R but C# would be difficult and nobody has wanted to use R yet)
All 3 of the first options have a Decimal class of some sort (built-in or standard library - its called BigDecimal in Java & Scala but same concept)
18:59
Ah, the classical "but that dude on the internet was using it too!" situation?
yep, somebody somewhere rolled their own Decimal class with Python (I honestly don't look for it because I'd rather call out a student early then have them get bitten by that - just copy & pasting stuff without understanding it - later on)
its a functional nightmare thing (chaining from list to map to str to ... ugh)
19:21
Is it good practice to del variables after they're no longer needed? For some reason I don't see this very often in Python code.
@user76284 no. it's usually either a waste or a strong indicator for bad design.
names are automatically cleared at the end of a scope.
There are only 2 reasons to del variables: 1) The variable uses a lot of memory or 2) The variable causes a reference cycle
What if you want to unbind a variable?
then you use del
tangent on the recent indentation discussion: there is a pretty highly voted Short description of the scoping rules?
I had to scroll all the way to the bottom to find a useful answer! /s
19:34
not that good of a reference then, eh?
well, evidently at least 2 people were dissatisfied enough to scroll all the way down. I'm not convinced we should trust their judgment though :P
too late, you've already motivated me to roll out my own answer...
20:03
hm, I've just realised that walruses are now a thing.
My motivation to write about scoping has just sailed to sea, to be never seen again.
typical siren effect
pretty flabby sirens. Did not expect the tusks, either.
you should've pinned yourself to the wheel
it's quite a package, indeed
21:03
from operator import iadd
if (target := iadd(target, value)) < limit:
    ...
@AndrasDeak Do you still have the red-hot poker?
Context: From the motivation to withdraw PEP 577. "PEP 572 technically allows inline augmented assignments to be written"
So I'll never be able to do x += y += z += 3 :'(
it's a cruel world...
goodnight guys
 
2 hours later…
22:51
alright, now I know why there aren't any concise descriptions for scoping...
rbrb
00:00 - 13:0013:00 - 23:00

« first day (3529 days earlier)      last day (1643 days later) »