« first day (2329 days earlier)      last day (2623 days later) » 
00:00 - 20:0020:00 - 00:00

8:02 PM
Or it has been 10 years, and Antti did something to wipe our memories of the last 10 years, so he himself experience 10 years, but we just forgot about it going back to our everyday lives.
 
This pic is only 5 years old :P
 
I find it hard to recognize New Antti
 
I still see a cat face even though I know it's not... Black top corners are like a black cat fur, The white stuff on the table at the top right hand corner is one eye, the light spot on the ground on the top left hand corner is the other eye. Antti's head is the cat's nose, and his white shirt is the cat's white furry mouth part.... please tell me I'm not the only one... I'm not crazy :(
 
@AndrasDeak Exactly.
#NotMyAntti
 
Postt
 
8:10 PM
:D
 
@MooingRawr considering that it would have to be Grumpy Cat behind a pile of treats, you're not that far off
 
Validation of not being crazy is the only validation I need...
also we never found out what was up with DSM's forehead :( (unless I missed it)
 
you missed it
 
@MooingRawr view spoiler
 
Oh PM answered, not DSM..... no wonder I didn't see it :\
 
8:15 PM
you're crazy
 
@Kevin thank you kind sir. Case closed
 
cbg! Is using Global keyword in python programs not a good practice? repl.it shows warning when I do so.
 
it's usually not if it can be avoided
 
@Grimlock yes don't use global, 99.9% of the time you can do it better another way.
 
That is the general consensus, yes. Choose a design that does not involve globals when possible.
 
8:17 PM
and choose something other than repl.it because I'm frustrated by not being able to copy-paste from it easily so they deserve to suffer
 
Oh okay and my program is full of Global keywords, hehe.
 
@AndrasDeak I use repl.it at work :( no other choice .... (gotta give WinPython a try this weekend)
 
bleh
wimpython? :|
 
Can global be a reason why my program performs slowly? I mean, one of the many reasons? Sorry if it is too broad question.
 
@Grimlock yes
 
8:18 PM
Thanks.
 
local namespace lookup is much faster, I think
 
While name resolution might be slower for globals than locals, the effect is probably negligible for most programs.
 
@AndrasDeak chat.stackoverflow.com/transcript/6?m=35868941#35868941 is what I meant but I got a typo instead:(
 
It would take a lot of globals for that to be the bottleneck
 
well it's surely one of the many reasons:P
2 mins ago, by Grimlock
Oh okay and my program is full of Global keywords, hehe.
sounds like a lot of globals ^
 
8:19 PM
I'm talking like tens of thousands of globals
 
Who knows what other antti-patterns might be there. 10k dynamic variables evalled?:P
 
lots of pseudo lazy evals ;D
 
@MooingRawr you could perhaps try try it online, which I see a lot on Programming Puzzles & Code Golf. There's surely some intentional limitations, but you can probably fiddle around with small problems
well it's no "IDE" nor REPL
let me try if it actually works for something simple:D
 
@AndrasDeak nice, but I was hoping something where I can bring in modules like tkinter, flask, etc etc to play around with
PIL and Flask and Numpy is something I want to deepen my knowledge in
 
does repl.it do that?
no tkinter and flask though, unsurprising
it always seemed to me that one of the codegolf guys is responsible, but I never made sure of it
yup
 
wim
8:28 PM
 
@wim Someone has been playing too much SimCity
 
that must have been python 2,
 
@AndrasDeak Yup, it's Dennis IIRC.
 
yup
that was my impression, but only checked now
 
Whoa, my language is still there! tio.run/nexus/pylons
I wonder what version it's running.
I haven't thought about that project in ages.
 
8:40 PM
@AndrasDeak no but it does base Python
 
shaving start-up
that I could invest in :D
 
Forwarding a question from a coworker: which of the following is preferable?
try:
    stuff() #exit() may be called in here
except SystemExit:
    pass
except: #catch everything but `exit()`
    print("Something went wrong!")
    #give diagnostic info here



try:
    stuff()
except Exception: #catch everything but `exit()`
    print("Something went wrong!")
    #give diagnostic info here
 
wat=?
 
I already told them "consider not using exit at all" and they said "ok, but supposing I did anyway"
 
@Kevin unrelated: I thought u work with c# but Python, when did you get an upgrade?!
 
8:47 PM
I don't work with Python, but he does. Long story.
 
exinception
 
I'm just going to tell him to use the second one.
 
wim
@Kevin the first one catches interrupt
the second one has in incorrect comment
 
I find it weird that they wouldn't consider you to work with Python.... but that's none of my business :\ To answer your question When it is not handled, the Python interpreter exits; no stack traceback is printed if this is desired then don't catch it if it isn't then catch it...
 
wim
anyway sounds like XY problem
 
8:53 PM
He wants his program to terminate early under certain situations. He doesn't want to put any of it in a function, so return isn't appropriate. He wants to catch nearly all exceptions so he can log diagnostic information for later.
There isn't really a stuff() call. There's just a lot of inline code.
 
wim
what about registering an atexit handler instead
huge try: blocks are a code smell
 
some relevant comments here
 
Ok, but these try blocks are like four lines, so
 
wim
library code should not call sys.exit anyway
 
Is using sys.exit() even necessary?
 
wim
8:58 PM
@Kevin still 3 lines too many ... :P
 
Going to say an early rbrb to you Kevin \o since I have to go write some emails :\
 
wim
@MarcusS the only legit use I've seen is in argparse
 
wim
Yeah and I was going to add, it's actually annoying in testing. But there are ways around the annoyances
 
 
1 hour later…
10:32 PM
Hi. Does anyone know why my Flask template cache doesn't reset when I give different GET parameters? :/
I thought I was going crazy, sometimes it updated and sometimes it totally ignored I changed the GET values.
Any clues how to fix that????
OK I know what's going on, it's nasty uh
No new data were injected in the render_template, so it was using its template. The "variable" data was only when calling a template_filter, that sucks, uh.
 
11:37 PM
zzz
 
same here
 
!zzz
 
I just generated 10k lines of data for a simulation, and I really should check if there are any redundancies
but it's past midnight and I have to get up late so maybe I'll just start the job anyway and check it later:D
 
print(''.join(random.choice("Zz") for i in range(20)))
 
git checkout -b "ugh_whatever"
git add .
git commit -m "ugh whatever"
git push origin ugh_whatever
 
11:41 PM
I should've used a HalfheartedBogoSort in the last step
 
Hello, anyone around who could help me by any chance? pastebin.com/mLhhGhBW On the 2nd call of NewMessage I get the following error: TypeError: 'NewMessage' object is not callable
Anyone know why that would be?
 
NewMessage = NewMessage(Team, string)
you're shadowing your class with an instance of the same name
it's as if you did set = set([1,3,4]); set2 = set([2,3])
 
How would I go about calling the very same class again (but it basically has to do everything over again)
 
by not shadowing it
never call an instance as the name of a class
myNewMessage = NewMessage(Team, string) etc
 
Oh, I see
Thanks alot!
 
11:47 PM
no worries
but you don't seem to be using that instance anywhere...so you might have other problems too
 
What do you mean?
I am not supposed to be using it anywhere, it gets a message and processes it, that's all
 
ah, I see
 
Or am I thinking wrong here?
 
throwaway class
 
Is there better ways to achieve this?
 
11:51 PM
no, it's possible, I didn't thoroughly read the implementation
 
Yeh it's fine, theres probably lots of spaghetti in that pastebin
 
well, some people claim that if your class gets instantiated and promptly thrown away, then it shouldn't be a class, just a function or a method
it's probably what @wim would claim to be a code smell
 
00:00 - 20:0020:00 - 00:00

« first day (2329 days earlier)      last day (2623 days later) »