« first day (4462 days earlier)      last day (710 days later) » 

00:41
(I think I am close to that tag badge! I'll be able to stop asking for help!)
^ Hammered
02:03
I have a self-deleted question (stackoverflow.com/questions/74987453), I used an old answer to try to solve my problem but the old answer had flaws. None of the existing Q/A I can find in other similar questions marked as duplicate actually solve my issue. I'm not quite sure how to re-write my question that will get my preferred solution. Can anyone help me navigate the re-write and undelete so it will get an answer?
02:46
@JamesRisner I recommend checking out How to Ask in the Help section of the site. There are some good suggestions there.
03:05
@Code-Apprentice Thank you. I've read that many times. I generally have trouble asking questions when similar questions don't solve my issue (like this time). There are many (11 at my count) similar questions, none of them do what I need. So I may not be able to change the question to pinpoint my question without landing in false duplicate land - or I suppose it's an issue where I'm the only one who can't read the other questions and derive my solution.
03:41
@JamesRisner I suggest creating a small example that recreates the problem you are trying to solve. That article has talks about this and has a link to another page that gives more detailed suggestions.
 
5 hours later…
08:13
@JamesRisner Linking those other questions and explaining why those solution do not fix your issue is also a good thing to do. Both to prevent people from closing as dupe, help them with getting a feel of the issue, but also so that you get to ask yourself "how is my problem different from that problem", which in turn may make you think about how to make them the same problem.
08:43
@sahasrara62 Thanks for thinking about it. It was that configparser converts everything to str, so it was the object string to begin with and consequent operations didn't do what I expected. I changed to a dict of dicts approach
@Hakaishin cool, yeah i had same concerned, where i dont know internals (before the difference is shared) as i find a little performance gap
Happy New Year to everybody
Hey Andras is back, nice. How have you been? Did you have nice holidays?
09:30
Great, thanks. I got covid on Dec 10 and it's almost over now :P
Ah unlucky. Good that it's over :)
10:35
stackoverflow.com/questions/74991915 Someone keep an eye on this please? I suspect I'm right (see comment on the existing answer) about what the question is intended to be, in which case it's potentially answerable but needs major editing in order to ask that question and have a proper example
11:00
@AndrasDeak--СлаваУкраїні Youch... first time or... ?
Surprising to hear that it's lasted this long!
@CodyGray well... long covid is mostly definitely a thing though... estimates are that 1.8 million-ish in the UK suffer from it
But Andras isn't in the UK! :-p
Ahh good point... I forgot viruses respected borders and travel restrictions... :p
11:14
@CodyGray phew!
@CodyGray tell me about it
Have you had the full set of symptoms most of this time, or has it just been a persistent cough?
Neither. I had a sore throat, then the "deadly man-cold" for a week, then low-key sniffles for a week, then the "deadly man-cold" for another week, then low-key sniffles and mild cough. Mostly fine now.
Huh. That almost sounds like multiple infections or even a series of diseases (e.g., COVID, followed by cold or allergies).
variety is the spice of life and all that...
Yup, and I had 5 negative tests in the first week. But my wife with my exact symptoms tested positive, and I was the only one who went out.
I tested positive during week 3...
11:19
@AndrasDeak--СлаваУкраїні someone's random got stuck
Yeah, I think I must have gotten it some time around November, but I tested negative twice. I just assumed it must have been a regular cold or flu, and I got over the worst of the symptoms within a short period of time (like 4 days), so flu made sense. But then I've had a persistent cough for 6-8 weeks now, so I'm thinking it must have been COVID.
No scenario makes complete sense, but ultimately we'll never know.
@CodyGray sus
11:45
@CodyGray there are multiple variants at the moment, and newer ones keep coming, so it wouldn't surprise me, even if the probability of that happening is slim, that the covid test just didn't work on the variant you had (if you had it).
it's almost as if self-tests didn't have 100% sensitivity
Which tests have 100% sensitivity?
PCR, because they usually test against PCR as the baseline :P
I just did a very barely positive test, yay
12:32
https://stackoverflow.com/questions/74993357/how-python-knows-which-string-should-be-checked-thru-isdigit-method
Do you think the dupe is warranted? I don't think it explains the clue of the question
It sounds like a good dupe - if you only read the title of it and nothing else
Sure, the MRE could very well be print(str.isdigit("1234")), but still I think it's pretty clear map is not what they are uncertain about
I guess adding that to dupes would give a more complete picture
https://stackoverflow.com/questions/51505666/calling-instance-method-using-class-definition-in-python
13:08
Today's pet peeve: questions worded like "Here is some code that works. I made some changes to the code, and now it doesn't work. Why?". They never show the actual code they're running that isn't working.
If they did, wouldn't that make it too easy?
Presumably the OP of the above post has code that contains password.isdigit, and they ran it, and they saw an error message or unexpected behavior. But they didn't show us any of that.
@CodyGray good point... I like the solving questions via use of crystal balls methodology... SO needs more of it! :p
Lately when I downvote a post, I ask myself, "should I leave an explanatory message? ... Nah, evidently the average user likes a little mystery"
They can use their crystal ball to figure it out, just like they expect me to do
I hear tarot cards are also fun in lieu of a crystal ball
13:17
I actually got a deck of tarot cards recently, from the ancestral family Box Of Miscellany that lives in the basement
Let's draw a card and scry some meaning for this isdigit question... It's "The Lovers".
The snake in the apple tree represents my desire to sin by downvoting with no explanation
cmon, it's pretty clear
Pro tip: If you think a question is clear when others don't, you probably should be editing it.
I suppose I'm being overly harsh. I'm grumpy because my holiday is over.
That's true. There's nothing sinful about downvoting with no explanation.
Similar to how there's nothing sinful about a knife.
13:25
Nor anything sinful about holding a door open for someone.
13:48
If I have some sort of persistent data in memory of my Flask app, is there any way for it to not be cleared on debug reload when code changes (without dumping it to file or similiar)?
no... even if not in debug mode... you know how wsgi processes work, right?
I guess not well enough
I wasn't expecting it to work outside of debug, as you need to restart the whole process when code changes
so basically... a request comes in... a flask instance is created to handle it... returns results... the process terminates
so if you want to persist data you have to store it somewhere
You can persist the data in memory between different requests just fine though
that's more a fluke
13:58
I don't know how wsgi processes work, so this is most informative
And since it looks like the same general process is running on debug reload, I thought it is possible to avoid wiping memory when it reloads
so for instance if you use nginx as a front-end proxy to uwsgi for instance... it might create 4 worker processes
The flask debug server does seem to stay alive across multiple page loads etc. I'm guessing this isn't necessarily the case for production-quality servers
those 4 processes might hang around for a while... but it's not guaranteed that each worker will handle the same request from each client and will each have their own process memory
@Kevin It is debug, so it's kinda not production quality by default
14:00
True
so if process 1 gets hit and persists data in memory and the next request also routes to process 1 - then you'll see the effect of it persisting
however, if that second request hit process 2 - you wouldn't see what you thought was persisting that process 1 had
also... the worker processes tend to get killed after N requests/N bytes sent/N seconds being alive and a new process is created to replace it
It's not something I'd every use in prod, I'm well aware of that. But it would be a nice QoL improvement when developing this
so in effect... what you think you're seeing as persistence is just luck and not guaranteed
I can see how it would be useful to have stronger guarantees of persistence in one's development environment... My guess is that the debug server doesn't have a lot of customizability in that regard
@matszwecja I don't see any harm in doing something with before_first_request and teardown_request (or similar) and just dump/load from a pickle or something for testing
14:10
Could this finally be shared_memory's time to shine? ... No, probably not
Anyway, checking out workzeug docs it seems that with reloader enabled, it is restarting the entire server subprocess when it detects the change
Which is what I think I was saying :)
Yeah, kinda
It all falls under the umbrella of "processes may end at inconvenient times"
in short - think of it as process runs... handles request... exits... if it's a worker the master process might keep it around for multiple requests but... that's not guaranteed so don't count on it
14:27
Well, it's all open source ;-) take fate into your own hands, rewrite the master process, force it to guarantee whatever you want
I'm not getting paid near well enough to care this much
Bending reality to your will is its own reward
if using uwsgi for instance... you might be able to play with uwsgi-docs.readthedocs.io/en/latest/Options.html#harakiri
those docs seem... terrible
"harakiri"... Might give an indication of how pleasant the task would be
14:32
the humor is palpable
@Kevin yeah... it's interesting looking at log files and seeing "child zombie killed" and "worker committed harakiri"
The girl with all the gifts is a great movie
(speaking of child zombies)
15:12
Cbg, happy new years to all.
and to you!
I'm guessing lots of people... any reason you ask?
16:06
Cbg all, wish you all a very happy and prosperous new year!
16:17
@anky melon... and you :)
@JonClements really? Sometimes I feel like only 2-3 people here use django if at all. I was wondering if it good and if you would recommend it. We have a similar custom solution, which is pretty ok. So I wonder if it's worth it to switch to it
not sure how that relates to asking about crispy forms?
afaik that's also available in flask and others
it's literally called django crispy forms. Is it really available in other frameworks too?
ah sorry, the it refers to crispy forms not django in general
oh might me being confused... there's equivalents of crispy
I'm probably thinking of wtforms
 
1 hour later…
17:31
I thought it was a neat feature that you could do this obj = MyGeneric[int](), but apparently that throws an error if you don't provide arguments for all TypeVars. Which means your code will go kaboom if MyGeneric ever receives a 2nd TypeVar. RIP forward compatibility
Guess it's back to obj: MyGeneric[int] = MyGeneric()
Meanwhile, the builtins and stdlib:
>>> list[1, 2, 3]
list[1, 2, 3]
¯\_(ツ)_/¯
18:20
I get different output?
>>> list[1, 2, 3]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'type' object is not subscriptable
Ah, thanks
 
2 hours later…
20:27
@davidism Did you ever find an answer to that?

« first day (4462 days earlier)      last day (710 days later) »