« first day (4319 days earlier)      last day (854 days later) » 

00:03
stackoverflow.com/questions/67944550 is another example of the variant question. But the underlying cause is the same, so maybe we just need to ensure there's an answer that covers the other symptom?
00:45
@KarlKnechtel All hammered.
We are now up to: 340 questions linked to/from Why does my recursive function return None?
@KarlKnechtel Maybe. It's pretty common for newbies to not understand how each function call creates a fresh set of local variables.
I'll contribute an answer later.
@KarlKnechtel I'm tempted to delete that one. If any confused newbie sees it, it will probably just add to their confusion.
@KarlKnechtel Done
I moved on to the next canonicalization. stackoverflow.com/questions/64519403 should duplicate stackoverflow.com/questions/7053652/…
01:19
@KarlKnechtel I'm not sure. But a good answer to that question should explain why it's bad practice to use a list comp when you don't actually want a list. I guess we could put a comment link to stackoverflow.com/q/5753597 or stackoverflow.com/q/69063714
I'm pretty sure stackoverflow.com/questions/5753597 is what I was looking for
the other question is not good. It's not popular and it has several confusions (in particular, script vs repl output)
I think there's an underlying, missing canonical here: something like "Why do I see extra output at the REPL from this code using print?"
(I wrote about this in another recent answer, but the context is inappropriate)
That shouldn't be an issue if you know that the REPL always prints the result of any unassigned expression unless it's None.
FWIW, in C, the printf family return the number of characters printed. That isn't used very often, but it can be handy when you're building a table with sprintf.
I assume Guido dropped that from Python so that the REPL wouldn't print mysterious character counts whenever you print stuff. ;)
@PM2Ring well, yes; the entire point is to explain that it does so, because a lot of people don't seem to understand.
I guess that part of this is a leftover from print being a statement, such that there was no None to return.
@PM2Ring so does.write on file-likes (including sys.stdout) iirc?
lemme put my draft in a gist or something...
01:43
@KarlKnechtel C fwrite returns the number of objects written, rather than the number of chars or bytes. But that's not a problem because you have to pass the object size to fwrite.
@KarlKnechtel That looks fine to me.
 
6 hours later…
07:55
stackoverflow.com/questions/41365922 I don't think this is really a duplicate of what it was linked to. The question seems to be intended as general about "repeating the entire program". Despite the low score it has 40k views, and a vast horde of apparent duplicates turns up in search results. I think we should recognize it as a separate target so we can dupe-hammer that other stuff.
As we know, questions aren't off-topic for Stack Overflow simply because they're "too basic", and a lot of beginners apparently can't make the mental connection between that while keyword and the thing they want to do with the program
it's also useful for them to see basic program organization with a main function, and the two existing answers are pretty good quality
IMO, if they were capable of mentally mapping the advice for "how to ask the user for input until a valid response" into "how to ask the user for a response after doing the thing, and do the thing again until the response is a specific value", they wouldn't be asking in the first place
stackoverflow.com/questions/42747894 This version has even more views, but a lower score. I'm not sure about the relative quality. I think it's lower quality overall, especially factoring in answers.
@AndrasDeak--СлаваУкраїні I used your help to write an asnwer to the question you linked. Maybe it can help others there!
stackoverflow.com/questions/21598713 another candidate - the question has too much code, but the accepted answer is to the point and shows both for and while.
Oh, maybe this is more like it: stackoverflow.com/questions/20337489
... actually, I'm not sure that's any better than the first option. It shades closer to the "ask until valid response" duplicate, because it's "ask and do until invalid response".
whereas beginners usually seek "(do and ask) until invalid response". seemingly trivial, but only once you understand
stackoverflow.com/questions/12557376 another option, actually I think this is my fav so far
It just needs a better title.
08:28
stackoverflow.com/questions/4264634 Do we have something better, i.e. that isn't written to be a subjective "pythonicity" question?
08:41
stackoverflow.com/questions/45895161 Ew. This is a specific debugging question, and the title is misleading.
duckduckgo.com/… searching like this gives a whole raft of attempts at the "run the program again" question
stackoverflow.com/questions/11459102 this one is highly viewed, but seems confused and not great.
Honestly, now that I've reviewed stackoverflow.com/questions/23294658, I think it gets over-used as a target
The top answers are just too advanced.
08:57
@KarlKnechtel That one has stuff about raw_input vs input which is no longer relevant and may confuse newbies. I like your 1st example best. stackoverflow.com/questions/41365922
mm, that would be a pretty significant edit to the first answer
but I think it's one that's justifiable to make, 10 years later
(that said, the linked stackoverflow.com/questions/1781445 is... not good)
Does Martijn still use the chatroom?
However, I think Kevin's canonical Asking the user for input until they give a valid response is still a valid target. Ok, it doesn't exactly match, but it's a good tutorial with lots of examples newbies can copy & modify.
@KarlKnechtel He's still a RO, but he doesn't visit much these days.
mm.
I strongly disagree that most beginners will be able to piece it together (and I have noticed that "I was dupe-hammered as something totally wrong" is one of the more common off-site complaints)
but I'll wait for more opinions
going to sleep now anyway
@KarlKnechtel Too advanced? I guess that exception stuff might be a bit too much for the newbies. OTOH, if you really are asking for input you do need to learn about exception handling, sooner or later.
@KarlKnechtel Sweet dreams!
I'm sure Kevin will be happy to contribute to the discussion.
 
1 hour later…
10:20
@KarlKnechtel I don't think that people searching for "how to rerun python again" really know what they're asking for. If it was VSCode, for example, the answer would be "just click play again" rather than wrapping things in a while loop which isn't running Python again
I don't think there's gonna be a good catch-all for that kind of question because the misunderstanding seems very fundamental (at least in terms of the search terms)
10:38
Has anyone done any work on geospatial clustering before? I'm currently using HDBSCAN which, on a technical level, is working for our solution. Explainability to the customer, though, is almost completely out of the window. I've had a few goes and just flatly failed. Every day they have a random assortment of locations and they think "well I wouldn't group Site A with Site B" but I can't convey that it's a combinatorial problem and they'd have to make clusters every single day with a human brain
I'm willing to try any other method, especially if it has explainability, but I haven't identified anything better. Maybe nearest-neighbour chain algorithm
Their main sticking point is that, as the locations get further away from their geographical centre of work, the clusters naturally start expanding. This is a good thing... but not to our stakeholder's mind
Especially if there's a method that can incorporate a different concept of "distance". For example, two waste sites might be next to each other but they accept entirely different types of load (one only accepts 50 types of plastic, the other only accepts garden waste). They would be less likely to be grouped than the third site that accepts 20 types of plastic and garden waste
11:30
@KarlKnechtel oh come on
11:44
We seriously can't assume that people can't be bothered to read one answer at least superficially. The accepted, top answer has the vanilla, "read a tutorial" level answer in the second code block. In no universe is that "too advanced". We can't and shouldn't cater to users who don't read answers. Waste of time, more clutter on the site.
It has so many upvotes because so many 15-rep newbies found it helpful. There's plenty of issues out there to solve, please don't invent inextant ones to solve.
@MitchellvanZuylen OK, although the question is language agnostic so language-specific semantically dupe answers tend to stick out.
12:25
yep, agree with Andras. I learned about AST by accident without even knowing what a coroutine was, so being afraid or fearing that the user is "confused" isn't it. It's part of the goal of learning/knowing.
That's not really my point though. My point is that the accepted answer is not too advanced.
ah, my bad
but I still agree nonetheless :)
been a while I saw you say that. Anyway, pretty hot these days :/
Agree with Andras' point. I don't know how far Karl's addiction is going to go in finding dupes. This feels a bit like scraping the barrel for dupes
12:28
I know they said it was dopamine inducing, but I don't think their addiction is bad. They did some great work with finding canonical answer and such already
Or actually, not. The dupe exists but it's being rejected for being "too advanced"
@NordineLotfi this is true and it's admirable work in some ways. I'm afraid there'll be a tipping point where it becomes noise to others in the room. I've already stopped reading most of the messages
We aren't an army to be mobilised. It's all well and good that it gives Karl satisfaction to hunt out dupes etc. but there's a default assumption that it can be raised in this room daily and I'm not keen on that
@AndrasDeak--СлаваУкраїні wanted to add this too: the fact that's it's too advanced depends on the fact that you know or not. Even if it's in a tutorial, we all know a lot of tutorial barely scratch the surface in term of explanation. Even if you don't need to know too much about print to use it, that isn't the same for everything else. Add to that the fact that they might not even know themselves what make them say it's advanced, and that's another problem
@roganjosh I don't know what's acceptable in those cases, it's hard to say. If someone say something related to subject X that's also related to this room subject (eg: python) when is it "too much"? When it's mentioned more than X times? If it's inside a huge block of text?
@NordineLotfi I'm not talking about hypotheticals. Read the answer we're talking about.
12:35
alright, I'll read it again :)
specifically, its second section
@NordineLotfi It is hard to say and it's strictly on-topic. I'm going off gut feel, which is why I'm not taking action on it. I don't know how many other people want to be engaged in this
To me, I just skim the messages and maybe read the odd one
@NordineLotfi as you know we often talk about all sorts of off-topic stuff here. There are no black-and-white rules. For instance, regulars who contribute here can pretty much talk about anything that others are interested in. Random users popping in are expected to stay on topic unless they're joining an existing off-topic discussion.
FWIW, I've found the swath of messages annoying for a while and today decided to block them
12:40
But Karl's crusade involves people going out of their way to look at a bunch of crap mixed with a bunch of redundant-looking dupe targets. It's a lot of mental effort. That's quite unlike other kinds of off-topic chat.
In other words, it's a chore instead of light-hearted discussion. Few people are invested in doing that.
I see. What you all say really open my mind to some subtleties I didn't know (especially, explained some interaction I had on other rooms on SO/SE). I guess it's a good thing I never stay active too long on rooms, since I'm either busy, or find that, I may do something similar that may be a bit annoying to some, without noticing
Well, this is very room-specific.
yeah, true
hopefully, if I ever do something mildly annoying to some, some of you will tell me...but that's probably too unreasonable to say that, so I guess I have to do a lot more self-study/introspection
@NordineLotfi to be fair, this isn't even that egregious. You can be assured you'd know if something was irritating other users. But I do think a line is starting to be being crossed with the frequency of calls to find dupes when a lot of the regulars here are deliberately avoiding the main site because it's a dumpster fire
Speaking personally, I did a lot of work at one point on main and now I've abandoned it to the wind. I come here for sense
12:59
yeah, I see what you mean. I also do less now on SO/SE, although it's for different reasons, I agree about what you said for SO being a dumpster fire :D
... for the Python tag. It still works in other tags, but following the main Python feed will drive you insane
can't deny that
13:18
@AndrasDeak--СлаваУкраїні reread it, you were right. I don't think it's "too advanced" since learning about Exceptions is the very first thing most people have to learn or at least, notice when they first try Python.
There are no exceptions in the second section.
there aren't? I thought you meant this?
@NordineLotfi I did, yes, the "accepted top answer" as I noted multiple times. I.e. stackoverflow.com/a/23294659/5067311. Second section therein.
I can't really specify this any better short of making a screenshot with a red arrow drawn on it
hmm, but aren't there Exception handling done in the linked answer? I thought that's what you meant by "not advanced". Sorry if I didn't understand the first time
I think it might just be a text communication thing. It does go back to exception-based after the second block
13:22
oh, gotcha
Don't think that's necessary, I think Nordine understands now
yep, thanks for being patient :P
It's a LBYL vs. EAFP thingybob
Trapped in the house waiting for the BT engineer to turn up so I can yell at them about my internet. In a heat wave. I need to be in a pub garden :(
 
2 hours later…
15:55
cbg
16:15
@AndrasDeak--СлаваУкраїні I don't mind dupe-hammering. But I have limited energy when it comes to deciding between a whole bunch of potential dupe targets. I may put on the effort if the topic interests me at that point in time, or if I've written a related answer. Otherwise, I tend to skip them.
Maybe Karl should start a new room dedicated to this stuff. And when he needs help dupe hammering he can post a brief link here.
I think that's the consensus. @KarlKnechtel I think it would be worth limiting our exposure to your dupe quests if possible please. The discussion starts around here and ends with PM's suggestion just above. I think it's getting a bit much for the room to support sorry
17:20
I made a truly horrible project (based on syntax/language semantic and project layout) but it works. github.com/secemp9/stackdump2txt Please bestow me with your reaction/and or your criticism (I would like them, to help me improve)
17:36
It has mixed tab and spaced indentation for a start (that I can see)?
Your IDE could fix that for you. It becomes obvious when it's pushed to git
Other than that, the module is pretty huge and there's a lot of if going on from here but I don't know the context and you take a lot of args so maybe it's warranted
@roganjosh ah yeah, I blame geany for that one -_- Thanks for noticing this
@roganjosh yeah, I don't need all of those so I'll probably clean those out in the next commit :)
 
3 hours later…
21:04
@NordineLotfi <insert obligatory plug for Sublime Text here>
21:45
Can't recommend ST4
At least paying for it
@vaultah why not? I really like it. I'm also fortunate enough to be able to pay for it, as I like supporting software that I use regularly. I can understand why students can't.
There are definitely some things missing, like built-in robust support for virtual environments, but that kind of fits with its philosophy - be a fast, excellent text editor with the capability to be extended with plugins.
22:14
@MattDMo hmm, tried it on a free trial once, but my style is more geared towards open source editor (eg: vim, geany etc). I also hop on different editor based on factors, such as guts feeling or moods, so it's a bit chaotic
but I appreciate the recommendation :D
Nearly all (99.99%) of the plugins are open-source, including the built-in packages, and the API is in Python. But, I know what you mean about wanting everything to be open-source. It's one of the things I don't like about it, but software engineers and associates need to be paid, and I can imagine it's tough making a living on donations alone, so I totally understand why it's commercial.
But, personal choice. Use what works for you!
Thanks for understanding :) yeah, I do pay for some subscriptions so that's not the reason why I only use open source editor, it's mostly just me being a bit chaotic and doing whatever, you know? I find myself editing a bunch of stuff that is part of some editor, and then changing it back. The fun is more in how you can change it, rather than the fact you can use it like that...don't think this make sense though
but I guess there is some comfort in knowing you can do it, so there that too
22:30
No, I understand what you mean. From a Sublime perspective, the API is really extensive, and when combined with themes and color schemes, it allows you to control/customize most things about the editor. But, you can't do things like modify the regex engine, for example, so in that regard something that's totally OSS would be better (should you want to do that, which I certainly wouldn't :P )
Anyways, I also use vim when the situation calls for it, although my Vim-fu is nowhere near where it should be for the amount that I use it. I mainly put it in insert mode and navigate with the arrow keys and PgUp/PgDn :)
And yes, I use nano on occasion <bows head in shame>
@MattDMo I think I did that once for vim or emacs, although that wasn't from scratch but just me editing github's extensions/plugins I found...
@MattDMo to be fair, I do whatever when I'm on vim: sometimes I use arrow key, other times I force myself to use hjkl or whatever my moods say is fine. I don't really care about it as much as the popular usage dictate
@MattDMo yes, I use that one too
23:22
@MattDMo I use it too. Stability and auto-complete has gotten worse since ST3
Hmm, I haven't noticed that. There are a lot more settings for autocomplete now, maybe some tweaking there might help? I use Anaconda for Python autocompletion, and various LSP engines for other languages when needed. They've increased the number of snippets for some languages, so maybe you're noticing that? Some plugins coughSublimeCodeIntelcough are also kinda buggy and unstable.
Hard sayin', not knowin', though.
BTW, did you ever figure out that key:value highlighting thing with the Neon Color Scheme? I see the issue is still open, did I actually push the fix?
Did we decide on a solution?
@MattDMo There are many reports of crashes and freezes on their forum, and also reports about ST not suggesting strings in the same file
I experienced both of those many times
Interesting. I haven't been to the forum in a while, and only occasionally drop into Discord if I have a specific question about the API or something.
That sucks. I really haven't noticed anything off.
23:38
@MattDMo I implemented the solution that I liked in my fork, but it's definitely hacky
@vaultah I'll take a look
I couldn't make it work with Python-specific scopes, so my solution probably breaks things for other languages
meta for everybody! :)
I like how you fixed the highlighting for decorator arguments, I'm definitely borrowing that. I need to think more about the other changes...
I didn't know how to make the background transparent, so I simply shoved an invalid value there :D
I have no experience developing ST color schemes, so what you're seeing is a quick and dirty collection of hacks that happen to work for me
And that's the reason I didn't make them into a PR

« first day (4319 days earlier)      last day (854 days later) »