« first day (3109 days earlier)      last day (2063 days later) » 

00:03
The strongest script I ever filled was for a pair of identical twins. They weren't exactly identical though. I don't remember the exact scripts, but I think they were -10, -8.5 and -10.5, -8.5.
I noticed that Chinese people tended to require stronger scripts, say by -1.5 to -2 dioptres, relative to those of European decent. I don't know whether that's because China had spectacles several centuries before Europe, so genetic myopia has had less selection pressure against it. Or if there's some cultural pattern that encourages Chinese people to strongly prefer contacts over glasses.
Although laser surgery is popular, I've spoken with several optoms who are rather critical of it, especially those with lots of elderly clients. When you're 80+, prior corneal surgery just makes the presbyopia worse, and can also increase dry eye problems.
00:21
Negative eight in both eyes here. I pay a ton of money for fancy lenses in my glasses and they are still insanely thick, can't imagine what they would look like if I lived a hundred years ago
@Dodge That's "Coke-bottle glasses" territory. Have you tried contacts? Not everyone can get used to them, but there are several different types these days, and you might find you like them. :) It does take a little while to get used to them, though.
@PM2Ring Yup, I recently switched back to glasses actually, after wearing contacts since I was ten. I reached a point where I just wanted to let my eyes "breathe" for a couple of years and reset. The other thing is that I have convinced myself that some of the eye problems associated with staring at computer screens will be reduced by the fact that the energy must now pass through my lenses before reaching my eyes.
00:43
@Dodge Oh, ok. I can appreciate that. But I don't think it'll make a lot of difference with the computer screens. ;)
FWIW, some modern types of contacts are silicone-based, and they are permeable to oxygen. Older style lenses aren't, so the cornea gets deprived of oxygen, but it takes around 15 hours to notice the effects: eg, you see huge haloes around distant light sources. The cornea tends to absorb water, but it contains a protein which "pumps" water back out. The pumping action is powered by oxygen, so oxygen-deprived corneas get slightly water-logged, which changes their refractive index.
The notion that glasses might reduce eye damage stems from reading that only 90 percent of light energy passes through a window pane so I'm expecting a ten percent reduction in potential eye damage by wearing glasses :) Oh that's a cool factoid... my contact lenses were probably permeable to oxygen and allowed my eyes to "breathe" the whole time, that's reassuring actually
01:01
Contacts have some UV protection, but not as much as modern glasses. And definitely not as much as actual sunglasses. :)
cbg
 
4 hours later…
05:22
Uh, I just found this in the transcript and I'm not sure why/how it works:
Feb 6 at 23:29, by wim
>>> a = 'whatever'
>>> b = type("B", (type(a),), {"__eq__": lambda self, other: "potato"})()
>>> a.__eq__(b)
False
>>> a == b
'potato'
Why does a==b even call b.__eq__(a)? Shouldn't it call a.__eq__(b) and then return its result, since the result isn't NotImplemented?
I thought it worked like this
def ==(x, y):
    if (r := x.__eq__(y)) is not NotImplemented:
        return r
    if (r := y.__eq__(x)) is not NotImplemented:
        return r
    return x is y
 
1 hour later…
06:31
That ^ still works if you remove the inheritance from type(a) btw
 
1 hour later…
07:56
@Aran-Fey: When you're inheriting from type(a), that's because Python tries the right argument's method first when the right argument's type is a subtype of the left argument's type.
When you're not inheriting from type(a), it's because a.__eq__(b) returns NotImplemented.
bleh..
another day of non-stop coding
10:16
Asking for duplicates: this question is yet another reasking of How can I call Python method X on a pandas series? to which the to which the general answer is col.apply/map(X), and no you generally don't need to declare a lambda (for a 1-arg function).
This gets asked all the time, mostly on string methods. It will be impervious to search. Will have to wade through multiple askings for every possible function (split/sub/is_integer...)
10:55
When I use print(len(s)) where s is a set of length 1, it gives 1 as o/p. But, when I'm using it to check a condition if(len(s)==1): print(0) then it's not working.
Why this happens?
11:06
because you're doing something wrong, MCVE please
are you not being confused by your print(0) in the length==1 case...?
I have written like this:
s={100} #suppose
if(len(s)==1):
    print(0)
>>> s={100} #suppose
>>> if(len(s)==1):
...     print(0)
...
0
works for me
cbg
@taritgoswami @AndrasDeak Works well for me...
of course it does
But it's not working in Codeforces judge I guess
11:18
Yeah.
@taritgoswami you said "it's not working". That suggests it's not working for you. Why are you trying to debug based on some wacky code challenge site? Make sure code works or it doesn't on your own, and if you think it does but the site doesn't accept it, say that.
@AndrasDeak Actually in Geek for geek ide I test my code and then submit it. There also I am facing the same problem :(
In that case either 1. you misunderstood the problem and you're solving the wrong problem, or 2. the code site is wrong. Neither case needs us to debug code that's working as intended.
Even there it works for me, P.S. use your regular interpreter instead of online interpreter...
Yes, it works, on that IDE!!
@ksalf you're being confusing
@AndrasDeak Haha, lol :-)
How :P
Well, and not in my laptop also. Here is my code: pastebin.com/rYanHTsM
Here is the output:
what is the input?
ar = list(map(int,input().split()))
s = set(ar)
then s is never changed, so the value of len(s) depends on the input
it might also be a bug that you have a mixture of len(b) and len(s) in your else branches
Input :
1
100
No o/p
@taritgoswami what is that? Input or output? Please try harder to be informative.
@taritgoswami ah, OK
@AndrasDeak That's the input, read the above line
yeah, the message didn't load for me until I reloaded the page
11:28
@user2357112 uff, I could've sworn I double-checked whether a.__eq__(b) returns NotImplemented. Thanks
for i in range(len(s)):
    b.append(s.pop())
you've hidden an s.pop() that will empty your set!
Oops :p
Thanks :)
So, I need to use if(len(b)==1): instead
You see? MCVE. The code block you asked about did what it's supposed to.
@taritgoswami I don't know.
MCVE means?
You have to reason about your code on a broader scale. Asking about a single line in a 5-case if won't necessarily give you the right answer. It's all dependent on whether your assumptions are correct.
@taritgoswami MCVE
@taritgoswami and you should've asked that 25 minutes ago
11:32
@AndrasDeak is a genius.
I really am
@ksalf Yup, owner of this room is a big deal
@AndrasDeak Once I asked about full code, someone told me to narrow down to the part where it's supposed to get a error
@taritgoswami Indeed. That's part of an MCVE.
@U9-Forward: Agreed...
11:33
you still need to provide enough code to actually reproduce the problem
But the "C" stands for "Complete". If you remove too much it's no longer complete. We need runnable examples with input and expected output.
@AndrasDeak: Since you are the owner of the room, do you have to read every single comment posted here?
@AndrasDeak is a
I am an owner of the room. And I don't have to, but I usually do unless there's a longer technical discussion I don't care about.
11:36
<h1>Genius...</h1>
@U9-Forward: I called it first...I am the co-owner of this room now :P
That I cannot do, you won
when using async/await within a function, can we say we are putting tat function in the vent loop, is that the phrase
11:52
I think the terminology is calling it a coroutine rather than a function, but I'm not sure
generator based coroutines were removed in python 3.10
Spot the time traveller...
@AndrasDeak When did you become a room owner?
11:57
yeah
Ah, no
2018
I'm not good with dates
Oh wow
Say i have 100 coroutines that i need visited in an await when using asyncio
and i only allow 5 seconds of sleep, am i guaranteed all 100 coroutines shall be visited and work done a bit
12:12
by sleep i meant await asyncio.sleep(2)
12:33
@AndrasDeak: I posted some cv requests for dupes. Can you look at them?
I saw them
 
1 hour later…
13:38
@AndrasDeak If you think the dupe is wrong, can you say why, otherwise can you help CV?
kale
14:27
Is there any problem in taking inputs, where some of the are negative, with map(int,input().split() ?
I have written like:
Not unless there's whitespace between the negative sign and the rest of the number.
but you can test this yourself to an extent...
again you seem to be having doubts because something doesn't do what you want it to do -> construct an MCVE
tkt_nums = list(map(int,input().split()))
and inputs -1 7 8 5 -4
@AndrasDeak Here is the full code: ide.geeksforgeeks.org/izlHwtQWqe
I said MCVE, not full code
@taritgoswami does it work? Does it not?
What makes you think it doesn't?
@AndrasDeak I thought - and 1 are treated as two different elements
Why did you think that?
You can literally print the result and see what happens.
14:31
As the input is taken as string
Got it
@ParitoshSingh and wwii, can you guys help with my CV requests from earlier?
yeah i can take a look, sec
14:48
lets say i have 5 coroutines each processing 1000 records in a list,is there a way i can follow progress of a coroutine in asyncio in terms of % done
@smci i hesitate to tag this with the dupe target. Even though the error probably is a consequence of something similar, the relation might not be clear to the OP, because the dupe target errors out on the str call itself. It may be the issue regardless, but if that line isnt the one causing the error, the OP could very well "silence" the issue by fixing the encoding during write if i understand the setup correctly. A link to unicode is solid, but that answer as a dupe target might not be.
15:13
I have come to believe that dupes are in the eye of the beholder and unless it is exact (which almost never is) then I don't vote. I see too much inconsistency in word and deeds with repsect to dupe voting.
that's your call
@ParitoshSingh (I assume you're talking about the second one). Have you seen how many duplicates we have? 2974 questions with UnicodeEncodeError. If there's a better dupe, please cite it. (in a comment on the question)
I tend to think "what is 2+1?" is also an answer to "what is 1+2?" and even "what is 1+3?"
does asyncio have something to track task progress
@objectiveME you already asked that once. Until the current population changes here or people can pay more attention you're not likely to get an answer by repeating essentially the same question. It's Sunday and Easter in a lot of places in the world, very little activity here.
15:16
@smci i personally dont know of a dupe for that specific case offhand, and cannot make myself hunt for it atm im afraid.
Are you guys suggesting that all 2974 questions with UnicodeEncodeError are distinct? This is starting to get silly.
its just tough having to deal with questions where you have to guess a lot (until i suppose you're comfortable enough with guesses from past experience) without knowing for sure if you got it.
No, all im saying is that i am not going to search for a dupe because i do not wish to, and i am not going to mark that as a dupe because it doesnt sit right with me. No offense intended.
i take the quesiton case by case, and that question is the kind where i'd just skip and move on personally.
If not of that, then of one of the 2973 other candidates. Given that users keep posting dupes faster than we close them, it's only a matter of time before SO becomes a write-only resource. Some say that has already happened. Sigh. Perhaps I'll just stop bothering on pandas.
Yeah, its a tough fight to fight. but i do not think SO would be any less of an amazing resource than it already is for people seeking info on how to do things right
SO is THE place for answers to anything programming related, and if something isnt on SO, it's generally proven to be something very tricky and obscure
(or well, atleast in my limited experience so far. i suppose python benefits from having a good community on SO, more so than some others)
What you're saying suggests that things are already answered mostly, so most new questions are off-topic or dupes.
15:21
absolutely.
@ParitoshSingh That's like the distinction between Precision vs Recall. I don't see much value in a site which contains some good answers, but is overrun with 999 crap, obsolete or stale dupe variants, which are not closed as dupes. Anyway, whatever.
i mean, wouldnt you agree with that? What do you think? theres only so many things one can ask before they start asking the same thing
Happy Easter.
Well, okay so then question: is it better to mark a question as a dupe even if isnt exactly the right fit, for the sake of overall "sanity" of the site?
gotta go though, rbrb and happy easter. apologies if i offended you, but i mean, i would love to talk and sort it out if you're up for it, i do not see anything i said being wrong, and would love to find out otherwise if that is the case.
15:33
Given my little rant - I voted on one. I concur with '''"I tend to think "what is 2+1?" is also an answer to "what is 1+2?" and even "what is 1+3?"''' and have been corrected here for that. ??
 
2 hours later…
17:45
:D
 
3 hours later…

« first day (3109 days earlier)      last day (2063 days later) »