Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Jul 2, 2021 10:40
uhhhm
Jul 2, 2021 10:39
(Are that pandas jokes?)
Jul 2, 2021 10:33
But yeah, there were literally situations during that one day where I referred to a discussion I just finished in one of the other rooms.
Jul 2, 2021 10:33
Cannot close as dupe in a chat community sadly :D
Jul 2, 2021 10:32
@CodyGray Not “complicated” in a bad way but just more challenging. I just don’t want to deal with “how do you ask for user input” or “print something in a for loop” any more…
Jul 2, 2021 10:32
@CodyGray I was very shortly baited by custom Discord roles based on activity. So I thought I had to become active there to get better roles. – I decided it wasn’t worth the effort afterwards.
Jul 2, 2021 10:31
I guess I really prefer working with more “complicated” questions these days
Jul 2, 2021 10:30
@AndrasDeak Yeah, I joined a large C# discord some time ago and managed to spend a single day dealing with lots of people asking very basic questions in four separate channels. That was just too much so I stopped doing that immediately :D
Jul 2, 2021 10:28
There isn’t a Python collective yet!!!!11 (there isn’t yet, right? :P)
Jul 2, 2021 10:26
I’m just feeling a bit burned out from online communities these days. It’s hard to motivate me to be active in any chat really :/
Jul 2, 2021 10:25
heh
Jul 2, 2021 10:25
Life is keeping me busy but other than that pretty good :)
Jul 2, 2021 10:24
Glad to see everyone is still around here :)
Jul 2, 2021 10:24
!!! !
Jul 2, 2021 10:23
I played Doom only very rarely (even rarer than Duke which at least was something I played during my childhood every now and then)
Jul 2, 2021 10:22
oops, meant Duke actually
Jul 2, 2021 10:22
cbg
Jul 2, 2021 10:22
@JonClements I don’t remember exactly “thrashing” anyone.. I think it was mostly luck because I was never good at Duke Nukem? 😅
Dec 12, 2019 14:56
That looks nice
Oct 17, 2019 14:09
@Kevin And threeteen of course.
Oct 17, 2019 13:04
:D
Oct 17, 2019 12:58
I think we need to consider the two lives of this room: The old one, and the one after it was rescued by @JonClements. So we have two eras: BC and AD – Before jon Clements and After jon Did rescue the room.
Oct 17, 2019 12:48
Halfway there..? ^^"
Oct 17, 2019 12:46
@joncle My memory fails me a bit but wasn’t I already RO before that? (And then I went for a break, returning Oct'14)
Oct 17, 2019 12:28
Only one of us is wearing a ninja mask that might cloud the vision.. rolls eyes
Oct 17, 2019 12:26
You did look younger 5 years ago though. But maybe that’s the ninja outfit.
Oct 17, 2019 12:25
We’re old.
Aug 13, 2019 22:27
@piRSquared That is amazing! And it makes me miss the lambda calculus stuff from uni.. :(
Aug 12, 2019 14:49
Imports are probably allowed now..
Aug 12, 2019 14:47
The returned string has the same rules as the original golf
Aug 12, 2019 14:46
That returns a string that contains a literal though
Aug 12, 2019 14:45
e.g. '-~int()' would be a valid return value of said expression
Aug 12, 2019 14:45
Next level: Code golf: Write an expression that returns that a string that contains a valid Python expression that evaluates to 1, without using any literal values, such as integers, bools, floats, strings, lists, etc.
Jul 26, 2019 13:45
I really don’t like where the SO team is heading with this: meta.stackexchange.com/questions/331349/… – The answer and lots of comments were deleted...
Jul 12, 2019 10:16
@MisterMiyagi Hmm, you’re probably right there. The add does a lot more and eventually invoking __add__ is just one thing..
Jul 12, 2019 10:09
(yes, very complex :P)
Jul 12, 2019 10:09
class SType:
    def __add__(self, other):
        return 'spamNI!'
Jul 12, 2019 10:09
I could imagine that the context switch back to the Python implementation of __add__ be the reason.
Jul 12, 2019 10:09
The BINARY_ADD should be able to call the __add__ implementation a lot faster than a method lookup and method call though.
Jul 12, 2019 10:07
@Arne No, why + is slower than a call to __add__ for the custom type
Jul 12, 2019 09:51
Okay, I’m apparently very rusty… My original timing (using a custom type) didn’t make sense here: stackoverflow.com/posts/57004399/revisions – Can anyone see what I am missing?
May 27, 2019 12:09
Cabbage
Apr 3, 2019 23:11
@AnttiHaapala Yes, blame me!!
Mar 8, 2019 16:19
“and children will think we lived in such a quaint era” – But we do, don’t we?
Feb 25, 2019 14:31
@amcgregor Oh wow.. that could theoretically even be “1.70000000000068 million dollars”
Feb 25, 2019 14:17
@amcgregor Thanks JSON
Feb 25, 2019 14:14
You need to keep up with this or your numbers will be wrong!
Feb 25, 2019 14:13
17.4
 
Mar 3, 2021 00:53
I’d suggest you to attempt this using static analysis at authoring time (i.e. when the code is being written). You mention in your meta question, that you need this for optimization but all your attempts will negatively impact this a lot more. And your approach so far skips valid use cases (e.g. passing the return value to another function) and is also very easy to circumvent if you want to (e.g. myfunc() // =). This simply cannot be done at runtime from within JavaScript.
 
Mar 11, 2019 20:21
For those using my primary counter userscript, I have just fixed it to work with the updated layout.