No, you don't get notifications for rejected edits
Yeah, it's happened twice that someone has tried to edit a winning answer into that answer
The first time, it got accepted with a note about how it isn't their answer. I'm very tempted to CW-flag, if it weren't for the fact that their original answer is still there
i made a test program for the google doodle thingy: (link is too long so you may have to expand the message) https://tio.run/##rVVLT9tAED57f8Vkc1m3ThQnt4gc0hIQUiRQgri4VrWJN62LWVtrG2gRvz2dsQOxTQwq9DLancc33zzWTn5nP2M92m7ns6vZfAkT8Jj1wCyLp5k0GR@DGDgwsB1SrWJpAlR5Hu9zB3inFL7PrEfn38Mc8HiXzt02xQeAO03gzpuMhw4MXwBXw54Quy9THDIV4tWKX6n9f5Bt60drZ/rvinon2e4BgGr7@nXR@YipJReRZT5jp7j3Lpuj/BKhGLIFHQ2KEWOB2sC5@CTtMbOMynKjQUiv5yJwFKYZnsd4sW3GVlG8vk4xSt3KSIQ6yTNBekIwuRaBzKQDoU4zk6@zMNYpYYYbCFNSSr1WomotE5CPtYkNpPkKrRhfgyCrtUcvnWxmqYiAK44wwSLJW6s7TJYpJJrlSaTEPXyG4B4ox71DJ0zxJ0wKRG83Ray2vAah4VStRcQHcDSBJzzP9eEIIq…
and can confirm that the suggested edit quite clearly does not work :p
Unfold a list code-golf functional-programming
Haskell's and Scala's standard libraries have an unfold function that builds a list from an initial state s and a function f. This is done with the following steps (explained in an imperative way to be simpler):
Apply f to s.
If the result
is empt...
I wish break and continue worked like return, so you could do something like continue x = 0;. It'd mean getting rid of the label functionality for those (which isn't a big loss IMO), but it makes it easier to write one-liners in loops and increases readability imo
That's reminded me that I wish yield return existed in Python, where it acts like a return statement when encountered (so code after isn't run), but it still acts as a generator
you can do yield _; return but that does not feel as good as a yield return statement would
because 95% of the time you're using return it's returning a value but as far as i can tell a return in a generator doesn't pass the value you give it along
I love how yields are different in every language: you've got Python's (and JS's?) generator-making yields, Scala's for-comprehension yield, Java's new return-from-switch-and-stuff yield, Ruby's yield that I don't even understand, and probably more
I'm having a hard time wrapping my brain around PEP 380.
What are the situations where "yield from" is useful?
What is the classic use case?
Why is it compared to micro-threads?
[ update ]
Now I understand the cause of my difficulties. I've used generators, but never really used coroutines ...
I kinda want to make a userscript+PythonAnywhere server that lets you reply to messages with emojis instead of using messages or stars and does other stuff
so you can thumbsup someone's message to acknowledge and reply to it and they can't respond back thus allowing two people to finish a conversation without one person really needing to send the "last message"
because they sent the last real message, but you performed the last action
idea: a chat client that constantly scrolls and when someone posts a message it just appears - if people send messages at the same time they just appear next to / on top of each other, and if no messages are sent the old ones just gradually scroll off the screen
i've wanted to totally remake a chat client for se chat for some time lol, either as a userscript that just totally overwrites the entire window or as a completely independent app / webapp