« first day (3442 days earlier)      last day (1510 days later) » 
00:00 - 16:0016:00 - 23:00

4:00 PM
My teacher's
 
Ok. Have they taught you about lists as a separate entity?
As in, have they made a clear distinction between lists and arrays previously?
 
oh, good prompt. is the teacher specifically saying "you must not use lists, even though we're using python" and something along those lines, or are they using the term "Array" loosely?
 
If the teacher did not specifically say "numpy array", he may mean something else, like the built-in array module, or even some kind of custom type you're expected to implement yourself
 
@AndrasDeak can you clarify this? because it seems exactly like what list does as well. Or does numpy.array not over allocate on append?
 
4:04 PM
@MisterMiyagi numpy doesn't overallocate.
 
@MisterMiyagi not that I know of. And an array is guaranteed to have a single contiguous block of memory, so when you append even a single item it's guaranteed to copy the whole thing.
 
it expects fixed sizes only.
 
The YouTube app sends me notifications of stuff it thinks I'll like. And when I select a video from the notification list, the link gets marked that I've watched it. But if I watch one of those videos from any other link then the notification list doesn't get updated, which is somewhat annoying.
 
@AndrasDeak are we sure on the last sentence? Can it do any attempt of expansion or is it really guaranteed to copy the lot?
 
Wild guess: the teacher wants the class to use an array of static size to implement a circular buffer
 
4:06 PM
@ParitoshSingh, @AndrasDeak thanks, TIL
 
In which case using a numpy array is more or less fine, since you're not actually changing its size
 
@JoãoJúlio are you sure they excluded a Python list? The term "list" commonly refers to (doubly) linked lists.
 
@MisterMiyagi A numpy array is essentially a C array, with a bit of extra stuff to make it digestible by Python. So you get the blocks you requested, with no over-allocation.
 
one other thing i wasn't sure of. does a stack contain only integers?
like, this might be a bit embarassing, but i don't actually formally know what a stack means. i just "sort of" understand it as some kind of LIFO structure
 
Yes, they made a clear distinction. The thing is, the first exercise it was to creat the "normal" Stack algoritm (using a list) and now they want us to create the same algoritm but using an array (they don't specify if it is a numpy array or not). And after that we have to say if the time complexity is the same in both algoritms.
 
4:09 PM
@ParitoshSingh Stacks as they are typically implemented in vanilla python can usually contain whatever types you want, in any combination. If you're using numpy to make one, though, it's probably going to be just ints.
 
oh.
@Kevin yeah, that last part was the part why i was wondering. okay cool
@JoãoJúlio ah, now it makes sense. your teacher wants you to do it the "Bad" way so you can find out actually that it's bad. well in that case, oops, we might have given it away?
 
Sorry if I'm to slow writing.
 
ok go for it, treat an array like a list, get through this exercise. commit a sin in the name of science.
 
AHAHAHAHAHAHAHAHHAHAAHAHHAHAHHAHAH
 
.... ok?
 
4:11 PM
Wonder how many items you have to push on that stack until the performance actually becomes noticeably bad. A million?
 
i don't really think they'll ever notice it really
 
@roganjosh I have no reference but "pretty sure"
 
@ParitoshSingh this might seem like a strange suggestion, but I can wholeheartedly recommend looking at the specification of a small-scale ARM board memory layout.
 
You can play around with loops and appends and arr.base and stuff
 
I have no reference handy but i dug through this stuff earlier, also "pretty sure" re. array reallocation
 
4:12 PM
Thank you guys for your help!
 
@AndrasDeak that's my position too. I dont know whether this comes under the umbrella of "peephole" optimisation. I'll keep an eye out for that
 
Numpy arrays were never meant to be appended to. There's no arr.append method I bet, just np.append. No point in overallocating for an antipattern.
 
Agree. But can you do a local search to see whether you can just expand your allocation and see whether it will be contiguous, rather than just go back to the OS and make it find an entirely new block?
 
@MisterMiyagi hmm, the first couple google searches make me think i'll need a lot of background before being able to grasp what im looking at, assuming what im looking at is correct.
 
(Pushing probably outside of my understanding to the point of talking nonsense)
 
4:16 PM
@roganjosh local search?
 
> A copy of arr with values appended to axis. Note that append does not occur in-place: a new array is allocated and filled. If axis is None, out is a flattened array. docs
 
I don't think memory works that way
 
Without diving into source code, that might be the best "hint" at what's happening
 
@roganjosh Not necessarily. It probably uses realloc geeksforgeeks.org/g-fact-66 which, in theory, can extend an allocated block if it just so happens that the required RAM happens to be in the free list. But you certainly shouldn't count on that behaviour, especially in a complex environment, like a Python Numpy program. You might get lucky if you're running a very simple C program, though.
 
@ParitoshSingh a quick google search also showed me that this information was a lot easier to come by in that one course I took 2 years ago. Sadly, the slides aren't online. :/
 
4:20 PM
the bigger problem, i imagine, is that if you're doing a lot of appends very frequently, every "slot" you find will eventually just not be good enough, and so you'll end up having to jump around a lot in finding bigger and bigger continuous memory blocks that are free
Basically, ending with the memory cursing at you about being evil or something
 
Modern OSes are usually pretty good at proactively avoiding fragementation, such that requests for successively larger chunks of memory will succeed
 
@PM2Ring perfect, thanks. I would never rely on it, I was just curious about whether it could actually happen. one_more_wafer_thin_mint could theoretically exist as an optimisation :P
 
interesting, that's good to know
 
@roganjosh What Paritosh said in chat.stackoverflow.com/transcript/message/48899517#48899517 contradicts what I said, though. So Numpy never tries to extend, it always allocates a fresh array, and explicitly copies the old contents.
@ParitoshSingh And that sort of thing is a recipe for memory fragmentation. Python itself reduces that problem by maintaining its own memory "arenas", rather than directly asking the OS for memory every time it creates an object. But I have no idea what sort of memory management Numpy uses.
 
Oh, that does ring a bell, python reserving memory areas that is.
As for numpy, im trying to confirm how it behaves. Still not too great at reading source code though, but i've gotten to here for now. Im just more worried this will eventually end up running into cython or something, and then i'll truly be lost :P
 
4:31 PM
I'm not sure numpy relies on cython? Pandas does, but I suspect that anything in numpy that does would be a quick boost rather than anything fundamental
 
oh you won't believe this...
afaik, numpy has 2 core components that use cython. and i have no idea what they are :P
 
A quick Google suggests that Numpy directly calls malloc(), so it doesn't do its own memory management, or use Pythons arenas. Of course, it also interacts with objects created by Python, but it lets Python look after those.
 
i saw this code in concatenate and got a heart attack for a second. just heads up, it was a false alarm
if out is not None:
    # optimize for the typical case where only arrays is provided
    arrays = list(arrays)
    arrays.append(out)
return arrays
but they do sometimes literally resort to using python lists apparently if im reading this right! (not in our case though, for np.append, out is None...phew)
having said that..i have no idea how to proceed now
 
@ParitoshSingh relying on numpy for append would likely be worse than a list, so what part do you find shocking?
 
if i didn't make a mistake so far: docs But i dont see where the logic is actually written now. maybe the decorator?
@roganjosh in the sense that conversion back and forth should ideally be costly enough to negate all gains that you'd have gotten, i assumed
since numpy isn't really concerned whether we call append multiple times, it just has to do it "once" in that sense
but this was all based on assumptions which may not necessarily be true.
 
4:39 PM
It is. It sucks; have you appending to arrays in a loop?
 
i'll one up you, we've concatenated entire dataframes in a loop
When i saw that code, i got a heart attack. No wonder it was taking us 3 hours+ for each run
 
Ok, well that's extreme (concat of dfs in a loop) but I'm trying to understand why part of the code shocks you. You seem aware already from anecdotal results?
 
oh
in the sense that, we aren't "concerned" with the loop part of things when talking pure implementation of append
in the sense of the implementation, it's just a 1 time call right? they don't particular care that we were silly enough to do this call multiple times to achieve some goal
 
Oh, no, I dont think they care. That's on you :)
 
Im not quite sure if im explaining it well or not. Essentially, if im only "adding" elements one time, I just had a mental model of ("find a memory location that matches the length combined. treat it as an array. assign this new array in two slices one by one, first half and the last thing)
So, just the role reversal to "convert to list. append on that. convert back" surprised me, that's all
(and im assuming they convert it back, eventually. :P)
 
4:45 PM
Have you fixed this since or is it still an issue?
 
oh yeah yeah, that code was in a pretty critical pathway. also, this was all last year
it wasnt pretty, but we made big lists for everything :P
 
Aha ok, that's where I was getting cobfused then. I was on the fence over whether seeing the code was horrifying in terms of your current approach or whether you're just seeing it in plain text what you faced earlier :)
 
see, only when you asked me that was i starting to doubt how you were reading into it :P sorry, yes! you got it
my only surprise with the code now is in the sense of "oh they utilize lists for this specifc implementation of array concatenation where out is given beforehand. Guess it just must be worth it even for 1 item".
 
No worries :) it's probably me being slow
 
here is where im stuck though.
i guess this is where i'd need to understand how that decorator works, because otherwise i don't really see any operation being done. This, assuming that i didn't make a mistake tracking down the code so far
which i very well might have. not too sure
 
4:50 PM
@roganjosh re: IR35 - nope - doesn't affect me... made sure of that one :)
 
@JonClements I was just shocked I hadn't seen it. I've got the rolling news on TV and both sky and bbc on my phone... and a cat for 6th sense stuff. I just wanna feel like I have a proper command centre set up, I guess, since watching my farm grow is not particularly dramatic :P
 
btw is there a good way to measure small optimisations in python program? any of the methods given here(to measure time of execution): stackoverflow.com/questions/1557571/… aren't good for measuring small optimisations
 
@Manik timeit works fine for small optimisation. If you have a tight loop, you can use line_profiler
 
i take it back, np.append absolutely always converts to a list eventually, and then does that append
 
cynical answer: small optimizations are, almost definitionally, not worth implementing, so you may as well not bother measuring them
 
5:04 PM
With all the caveats about "premature optimisation...".
 
the only issue is, because this conversion happens, it must be a new memory location every single time
(er, barring memory being freed and fancy stuff like that.) but it's never "nicely asking the array to check if it has space" directly. it goes to list first, and then lets the list do it's "im going to nicely expand my stuff" stuff. Im honestly so conflicted right now..
tl. dr, just never append. :P
It's literally doing the same work you'd be doing, converting to a list, and then appending on the list
 
roganjosh will i see time differences even in programs like checking if a number is prime given here? because i couldn't using time module the time seemed to vary too much for every run
 
I don't see that as an issue. I always expected that to be the case, I was just curious whether it was possible to slightly expand the memory allocation you already got
@Manik try it?
 
sorta ish, if the "list" append does it, it does it at that step. But then you take the conversion hit all over again, which has to go find a new memory.
 
I had hoped that numpy would be smart enough to realloc-in-place, but I expected that it would have to take a round trip somewhere that foils that plan. Pessimism wins again!
 
5:09 PM
So, yes and no. Because it has to leave the realm of it's own datatype, it has to do the full allocation, twice!
 
But if you're appending 10 dataframes, it can do the allocation in 1 go, if you provide a list of them beforehand, no?
 
numpy append only takes 2 args right?
or you mean specifically concatenate? im not too familiar with it's sig, let me check
 
I think pandas has a way around this but now I'm not sure
 
for all we know, maybe it's converting everything to python lists too! :P
and i wouldn't even be surprised anymore at this point.
 
@ParitoshSingh it quite possibly does do this, but it can know the dtype and the final length so it's always better to do multiple appends as an aggregated list when you can
 
5:16 PM
oh that's interesting to know. that's going to be painful to remember down the line
sidenote: i was wrong about cython and numpy.
numpy goes to pure c, it was some parts of scipy that went to cython
 
:)
I would have been surprised otherwise. Pandas, though, does have fundamental things in cython
 
scipy apparently goes to a lot of things though, including c++ and fortran
 
@Manik Take note that benchmarking/timing is an art in itself. In short, never rely on a single measurement. The Pyperf docs give a short overview on some important topics.
 
@roganjosh yeah.. not worried about IR35 - more worried about what might happen to the savings my brother and I have been putting into a trust fund for my nephew
it's not a massive amount for sure, but we wanted to make sure should he go to uni he's got a decent start at going for it... rather than grants/loans etc...
 
@JonClements can't even speculate on that one :( I was just surprised that that news was spread but didn't get covered by the BBC or Sky, so thought I'd let you know
 
5:29 PM
yeah... my accounts guy is pretty good - probably helps we've been friends for nearly 15 years :)
get away with his fees being a steak and a pint and a natter
 
Oh. That is markedly cheaper than I had. And I have a near-endless supply of sweets until this week :/
 
:)
rummaging around trying to find the paperwork for that trust fund... might be at my bro's although I'm sure I have a copy somewhere
 
wim
do downvoted posts closed as duplicate get roomba'd ? (roomba forecaster thinks so) is that a recent change?
 
@wim does it have an answer?
 
wim
no
 
5:40 PM
then yeah
 
wim
is that a recent change? or I just never noticed
I thought dupes stayed as signposts
 
good point - I'm probably misremembering stuff
is the roomba forecaster a userscript you're using?
 
hi can anyone help me in keras issue
 
@Ananthakrishna I don't think we have any keras experts here, but if you want to ask, then please just ask
 
okay
this is my problem
 
5:44 PM
However, please look at our room rules... we ask that you wait 48 hours before asking here when you've asked on the main site as asking there will get the attention of people that can answer it
 
hmm.. okay
 
@roganjosh ahh... okay... guaranteed 4.2% as some backed by bonds and could be 7% over its life span depending on how well stocks perform...
which errr... stock market wise hasn't been great in a while and especially now it's somewhat yam
 
wim
@JonClements yes on stackapps - stackapps.com/questions/7239/…
 
@wim pop into the SOCVR room - Makyen is normally active and knows a few bits and bobs :)
 
roganjosh, MisterMiyagi melon
 
5:51 PM
@JonClements my gut instinct is that you definitely shouldn't bail on them
@Manik did you time it?
 
this sounds stupid but i couldn't do it. i tried in jupyter notebook print(timeit('checkPrime(n)') but jupyter just froze
 
AFAIK jupyter should support the %timeit macro/magic/thingy
 
@roganjosh indeed... well, his dad and I have been paying £250/mth into this for 15 years now so hopefully in 3 years he gets a bit of a head start as it were
 
note that timeit takes a while, and using it as a function can take a long while
 
Usually when timeit freezes on me, it's because I didn't put my code in an if __name__ == "__main__": guard, so it implicitly reimports itself over and over
Dunno if Jupyter does that or what
 
5:56 PM
timeit('"-".join(str(n) for n in range(100))', number=10000) this example worked fine in jupyter
 
(I say "head start" - more just "doesn't have to start being an adult with debt")
 
wim
found the roomba rules stackapps.com/help/roomba
IIUC now , the forecaster was right and I was wrong
the "not closed as a duplicate" saving reason I was thinking about can only saves non-negatively scored questions 👍
 
@JonClements that's... a lot of money, even with no interest :)
 
@roganjosh as long as he's not me when I was 18 and a lunatic with money :)
 
wim
I paid off student loans fully by the ripe age of 37. Crazy how long that debt can hang around.
 
6:11 PM
Here's hoping he doesn't do something shortsighted and impractical -- like pursue a college degree ;-)
 
@wim dupes are exempt from 9-day roomba for closed posts, but they are still subject to 365-day (I think) roomba if downvoted or there are few comments or something like that...
 
racked up £30k of credit card debt by 21 (good old days where everyone would just give you credit) - paid that back by age 25 and then yeah, learnt that lesson in a not very nice way
 
4 years to learn that lesson. Not so bad to learn by 25 if you have to pay it back. Careful with releasing a lump-sum if they haven't had the painful lesson. I obviously don't know the circumstances
 
@wim in the UK - you can get a "loan" now for further education that's roughly 9k/yr... but you only pay it back when you're earning more than X amount etc... and that loan expires after N many years anyway etc... etc...
@roganjosh can't be arsed to read through the paperwork much more... but yeah, think it's a lump sum that becomes available - he's just gotta be a responsible 18 year old
 
like most 18-year-olds
 
6:20 PM
I can only hope :)
 
Send him on a quest. Bury the lump sum in a chest inside the cave of eternity on the island of peril in the forbidden quadrant.
 
Then get him stuck in the graphics
 
A note within says "the real treasure is the friends you made along the way... And also all this gold, enjoy!"
 
Oh, I was sidetracked by my own adventure :P
 
I certainly wasn't at 18... I regret nothing in my life, but I'm fairly sure if I had the chance to talk to my 18 year old self... there'd be some choice words not fit for public consumption :p
 
6:23 PM
What kinda thing does he want to learn, @JonClements, if he even wants to go to uni?
 
Based on my knowledge of young people, I wager "fortnite streamer"
 
professional dabber
 
So, a triple concentration on business management / public relations / improvisational acting
Plus whatever extracurriculars improve hand eye coordination and APM
 
@AndrasDeak you're so hip and cool. It's basically all that keeps me here :P
 
@roganjosh @MisterMiyagi timeit now worked in jupyter(i don't know why it was freezing before) there was a difference of about .0009s in the programs(checking if number is prime). had to use globals = globals() argument
 
6:35 PM
@roganjosh I'm not sure... I'm not sure he's even sure
time will tell I guess
 
@Manik is that per-run?
 
per "read whatever value it prints"
 
how to know if it's per-run?( i didn't give number argument)
 
@JonClements I'm obviously out of the loop of uni now but I know plenty of people that have done really well out of apprenticeships. I went to a grammar school when every presentation was about when I went to uni.
 
timing tests of primality checkers can be deceiving because something that can quickly determine whether 17 is prime might be very slow at determining whether 1000017 is prime
 
6:39 PM
@roganjosh grammar school - how posh :)
 
I deferred entry and changed from pharmacy to chem eng during the year out. Now I dont anything associated with it(I guess I can) andhave32k debt
 
i checked for 10^9 so that i would get a large time
 
@JonClements I tried to edit on phone and hit cancel at the end. Finishing School didn't do enough for mobile phones :/
@JonClements my school bus drove through Salford and we used to throw bricks at us. I've got flashbacks to hoovering my head to get the glass off my scalp. Odd flashback :)
 
Is CPython the only one with a 3.8 release on Windows?
 
you Manc. you :)
(says, the Surrey boy :P)
 
6:51 PM
If you haven't hoovered your head from louts bricking the bus, have you ever lived? :P
 
@Manik 10^9 is divisible by two...
 
Let's see. Pypy3 is on 3.6.9, Jython is on 2.7.1, IronPython 2.7.9... Not looking good
 
Thank Kevin ^^
 
Stackless Python has a 3.8.0b3 preview release apparently
I'm just clicking through en.wikipedia.org/wiki/…, I don't have any insider info here
 
@Kevin Oh, but Jython will soon release the newest Python version... 2.7.2
 
6:56 PM
Wow, I've not even heard of half that list... :O
 
@Peilonrayz in general, CPython is the only with the most recent and previous major version
 
@roganjosh hey, I lived in Dewsbury for 9 months - does that count? :p
 
The non-reference implementation field is less competitive than I thought... Time for KPython to shine
 
@JonClements gonna have to try better than that :P
 
@Kevin and here I was thinking you're the mastermind behind Python3K
 
7:03 PM
@roganjosh I prefer brown sauce? Am I getting closer... to being "ooop nath"? :)
@MisterMiyagi don't confuse @Kevin with other stuff - the LOTC still needs doing... /*me taps paws*
 
I don't mastermind anything, but I do spend a lot of time appearing before open source engineers with half-baked plans and saying "that's a terrible idea :-)... Do it >:-)"
 
Yeah I didn't think there would be, but I'm very uninformed on non-CPython projects.
 
sorry guys i was mixing up the functions there is a difference of about 0.25s in both methods for 10^6 executions for test case 1111113
and i could hear the fan inside running faster while running the program:)
 
user11585758
guys do you know why -inf is coming when runnit numpy arrays
 
user11585758
like this
 [-1.43704182e+012]
 [-5.95946728e+027]
 [-2.54994654e+058]
 [-4.66851058e+119]
 [-1.56485064e+242]
 [            -inf]
 [            -inf]
 
7:18 PM
MCVE please
 
user11585758
after 5th iteration all goes to -inf
 
user11585758
code is long should i post it
 
If it's long, it's not an MCVE
 
user11585758
I was building ml algorithms and after written gradient descent code as ,
(theta, costs) = regr.GradientDescent(epochs=10, learning_rate=0.0001)
 
user11585758
Is that sign of vanishing gradients, but why would it would vanish in only 5 iterations
 
7:22 PM
Why would it not?
-inf means you're dividing a positive number by +0 or a negative number by -0.
 
@mathematics because your numbers are diverging
 
user11585758
scikit learn works fine upto some iterations
 
So...stop one iteration earlier.
 
user11585758
Thanks this can be done.
 
(or, you know, check if the function you're trying to minimize/maximize doesn't diverge toward -inf)
 
user11585758
7:26 PM
May be have implementation error
 
I don't think stoping one iteration earlier is the way to go. if you expect to converge to zero, -1.56485064e+242 is as wrong as -inf.
 
no way ;)
 
just trying to meet my quota of technically correct but only vaguely helpful comments for today
WFH has deprived me from students that can be shown The Correct Way by liberal application of sarcasm and doubtful looks.
 
Ask a vague question, get a vague answer
 
it was either that or "ah, you have a bug on line 23"
 
7:32 PM
I'm being unduly snippy considering I don't know the first thing about ML and thus can't even tell whether the question is truly vague. Multiple consecutive WFH days has made me into a feral gremlin
 
user11585758
Guys you are working on stackoverflow
 
we are what?
 
@Kevin Well, gradient descent finds the optimum of a convex/concave function. If you don't know the function nor what the actual code does there's very little to say.
(whether or not ML)
 
@mathematics Is that a question? If so, none of us are employees of Stack Exchange Inc.
 
user11585758
oh sorry, i was just asking
 
7:35 PM
I'm not mad, I too was just asking
 
@Kevin allegedly
 
user11585758
:D , you guys always here to help.
 
user11585758
Thanks
 
It's fairly frequent that somebody assumes we've got some sort of official affiliation with SO. Nope, we're just enthusiasts that somehow got italicized names
 
user11585758
So how is news about coronavirus in your areas guys
 
Tay
7:37 PM
Ive always been curious about the italic names
what is that from?
 
@mathematics we prefer not to talk about it much
it's similar everywhere
 
user11585758
:( , yeah, take care guys
 
@Tay It's given to those that have the privilege/burden of being a Room Owner
 
Tay
ah
burden... hahah
 
user11585758
oh i found error :D, instead of dot product i was doing elementwise
 
7:44 PM
was it on line 23?
 
user11585758
:D 43, 61
 
user11585758
bye guys , its mid night
 
bye
@mathematics so...not "USA" after all? Midnight would imply 3 hours ahead of me.
 
If you're in voluntary quarantine and have blackout curtains, midnight can be whenever you want :-)
 
cue Kevin arguing that "mid night" might be a loose explanation of it being late :)
 
7:49 PM
It's 3:49 PM here in Eastern Time so I don't think I can spin it to that degree
 
It was cool when I was in Uppsala (Sweden) that the curtain track curved back at both ends towards the wall. We don't have that here at all, and it was a nice example of design motivated by the local environment (i.e. short and bright summer nights)
 
Corona has solar implications, no? Maybe a virus of the corona can change solar patterns?
I'm not sure what they would look like, I just wanted to sound smart about drawing inferences from the name
 
i can say you've succeeded. TIL!
 
<bows/>
 
Solar flares take place in the corona (more or less) so you might expect a fluctuation in the radio spectrum
 
7:55 PM
it's weird because im sure i'd have heard "sun's corona" before, but it literally doesn't ring a bell at all
 
and/or an EMP that eradicates society
You may have heard of the sun's corona during coverage of an eclipse, since the corona is the only part that's still visible
 
Indeed, that's what im banking on as well.
But it is either wiped from my memory, or i really never encountered the term before. weird. I don't think the aliens abducted me in the meantime though
but then again, Maybe that's wiped too
 
the corona is the fun part that's 200x hotter than the sun's actual surface at ~6000 kelvins
one of those "impress people at the bar but hope that they don't ask 'how does that even work?'" facts
 
Ha. Relate
 
Except, if we were to ask it here, im sure you'd probably give a perfectly great answer :P
Unless kevin or PM 2 Ring beat you to it i suppose, hmm
 
8:00 PM
Usually when I'm asked to elaborate on one of my Fun Facts, I just guess and nobody bothers to verify it
4
See, the corona is hotter than the surface because the higher you go, the less dense the plasma is, which means there's more room for each particle to move about in an excited way
 
hmmm...
 
You can't mosh pit in an open field, nor in an elevator, you need just the right density
 
You can't mosh pit in an open field? Sorry?
 
Not by yourself at least ;-)
 
people run away from you in a field if you try to mosh
 
8:02 PM
You might wanna ring Download Festival with the urgent news!
 
i know
 
dang it kevin, now im confused whether that's a legit explanation or just a bluff, or even a double bluff
 
This is just a rehash of my mostly wrong guess as to why a system can have negative temperature if you put too much energy into it
 
> "The surrounding corona rises to over a million K, but the heating process has not been identified. Most solar physicists suspect the process is magnetic, since the strong magnetic fields " oh...now it really makes sense why we'd hope the people at the bar don't ask for an explanation.
 
user11867329
@AndrasDeak That worked actually
 
8:23 PM
Hi guys! Why Django Rest Framework dudes still uses url in documentation and not path / re_path?
 
@OakDev you have done nothing but ask for help with off-topic things here and post noise. You disregard official requests and warnings, and have an attitude doing so. You are a troll and a help vampire. You are not welcome here.
 
@Sierran sorry, I don't understand the question?
 
@Sierran looks to me like they use path().
 
@Code-Apprentice Here yes, but look on homepage and scroll down :)
 
maybe you are looking at old versions of the docs or parts that were overlooked with updating to Django 2
most likely that's an oversight
 
8:36 PM
Yeah, maybe. But on their github page they still use url :sadpepe:. It's confusing.
 
8:49 PM
Their GitHub readme is the same content as the homepage
you should fix it and make a PR
 
Say I want to test two methods of a class, both of which require HTML as input. I want to fetch the HTML once and feed it into both, rather than download it twice. I'm thinking I'll write two test functions in a class with a setup_class method that pre-loads the HTML. But I'm wondering if there's a clean solution with a fixture rather than the x-unit style setup function?
 
@Code-Apprentice Good idea ;)
 
Done
I can't help but think this title is a dupe, though, and might not encapsulate what they're asking
 
wim
I don't think the title can be a dupe, the system prevents that.
anyway I just wanted it reopened so I could use it as a target for stackoverflow.com/q/60764915/674039 which already collected 3 bad answers.
if you do have a target with better answers, feel free to hammer them both to it!
@roganjosh Yeah the title is not very good. Any suggestions?
LMBO
dude instead of correcting me why don't you help the dude instead and give him the answer. Not everybody is perfect as yourself seems to be. — cg4tw 21 mins ago
 
@wim the title can't be (except when I found a weird case of it can being) but I mean the sentiment. Is it not a dupe of this?
 
wim
9:33 PM
maybe is but the accepted answer there is bugged
so don't use that one!
ugh, the one that is duped to is even worse.
 
@wim dude, you better refund him his $0.00 real money and your time
 
wim
I can't think of a concise word for order-agnostic list. The CS word is "bag" but I don't think many people are familiar with this word.
 
@wim I feel there is a decent root to that problem but I can't find it, sorry :/ but I agree that the dupe is messed up so maybe they can be aggregated better
 
wim
9:52 PM
I settled on "Get unique elements from list of lists when the order of the sublists does not matter", still not perfect but maybe an improvement
 
wim
10:08 PM
@Aran-Fey you answered your own question ("clean solution with a fixture")
it looks like this
@pytest.fixture(scope="module")
def canned_html():
    s = get_canned_html(...)
    yield s

def test_foo(canned_html):
    ...

def test_bar(canned_html):
    ....
get_canned_html will only be called once here.
there's a dependency injection - the same object from the yield statement will be used, inside both tests
 
great... my nephew's mum is stuck in Portugal, my brother has to work his store, so uncle Jon might be having to tend to a rather moody 15 year old
joy of joys
 
10:23 PM
biohazard!
 
meh who knows, they'e all off school now anyway
think the last school "has" to close tomorrow
I don't get enough time to spend with him anyway... so might be a blessing in disguise
 
:)
maybe he'll take you for a walk in the park, maybe even play fetch
 
and a bouncy ball!? a bally! a bally!?.... /me runs around looking for the ball
 
a bee-ay-ell-ell
 
/me looks at @Andras - there is a ball right!?
 
10:30 PM
D:
 
I bet we've all done that thing with dogs where you pretend to throw a ball and they run off and look confused
the smarts ones just sit down look at you and give you that look that says "yeah, very funny, stop taking the yam"
 
is it expected that if someone posts a question, that the sample of code they post should be a minimal example that someone can run in their shell to reproduce the problem?
 
if it's a debugging problem then yes
 
okay thanks.. yes it's a debugging related question
I asked the poster for a minimal sample and he gave me a link to his git repository =)
 
yup, we don't like that
I like to bring up link rot as an explanation
 
10:39 PM
debugging stuff is something in and of itself
kinda wish some of the obvious courses we see online as Q's, their instructor had mentioned it... heck, even if you're not going to properly do a debug, just throw in a few print to at least get a clue
 
Perhaps they did...but those people never end up asking questions on SO.
there's always a few who just posts a photo of the assignment as a question
 
10:56 PM
oh come on redis, why you no cluster properly...
/me gets steel toe caps out
and there we go - it now suddenly just works
 
hint of physical violence often helps with hardware
until the uprising I guess
 
just be nice to your google/alexa devices - remember your P's and Q's and they may spare you :p
 
00:00 - 16:0016:00 - 23:00

« first day (3442 days earlier)      last day (1510 days later) »