« first day (3997 days earlier)      last day (934 days later) » 

12:57 AM
cabbage!
 
1:29 AM
cbg
 
cbgg
 
caller_receive = yield i I had no idea this was valid syntax
 
 
1 hour later…
3:01 AM
@FélixAdriyelGagnon-Grenier I need like that feature so that I could ignore localStorage and
may be redis for django !
 
3:39 AM
(No Roomba) Duplicate How to append item to list in Python‭ - jw lee‭ 2021-09-25 03:05:25Z
 
@NIKHILCHANDRAROY what's wrong with localStorage? Redux shines when used with React because it takes care of updating the state of the pages. You could probably turn it into a key-value store, but it feels like opening an endless bag of problems.
 
 
3 hours later…
user14697742
6:16 AM
python vs C
 
6:29 AM
fight!
 
6:52 AM
@AsadJaved hello. Please be mindful of our room rules which ask that you wait 48 hours before bringing a question here from main
 
 
2 hours later…
8:48 AM
morning cbg folks
 
 
2 hours later…
11:11 AM
Hi There
 
hello
 
 
5 hours later…
4:23 PM
which PEP clarifies how the return statement works inside generator functions?
is it just PEP 255?
 
 
2 hours later…
6:10 PM
Would this be correct?
"When a generator exits without yielding a value, it raises StopIteration" should be interpreted as
"When a generator exits without yielding a value, its .__next__() method invoked through a next() call raises StopIteration somewhere in its method body"
 
6:21 PM
@astralwolf Have you seen docs.python.org/3/howto/functional.html It has a lot of info about generators. I haven't read it thoroughly (yet), but it looks pretty good. I wish it was in the docs when I was learning this stuff.
 
@astralwolf StopIteration is raised to the caller of __next__/send, not in the generator.
 
@PM2Ring I actually have it open (but unread) 6 tabs to the right
 
@astralwolf No, it just means that the caller (i.e., the code iterating over the generator) gets a StopIteration when it attempts to get the next value after the generator has executed return
 
@MisterMiyagi hold on, im confused, in which section of the code is StopIteration implicity raised at? It cant be raised within the generator body itself right?
 
So a generator (either one created via a generator function with yield, or a full-blown class) never needs to raise StopIteration.
 
6:31 PM
Doesn't the caller (next/send) raise the `StopIteration` itself? Reading from here: python.org/3/reference/expressions.html?highlight=send#generator.__next__

generator.__next__()

Starts the execution of a generator function or resumes it at the last executed yield expression. When a generator function is resumed with a __next__() method, the current yield expression always evaluates to None. ... If the generator exits without yielding another value, a StopIteration exception is raised.
 
@astralwolf You can do that if you like. Or simply fail to yield a next item, and the exception will be raised when the calling code tries to fetch a non-existing item.
 
@astralwolf It's raised inside the generator __next__/send method. You can think of these methods wrapping around the generator body.
 
@MisterMiyagi right, this was what I was trying to confirm.Thanks
 
6:46 PM
Sorry if my previous message added to the confusion. "Doesn't the caller (next/send) raise the StopIteration itself?" Yes. The exception is raised in the calling code when it tries calling next or send on a finished generator )or other iterable). Getting a StopIteration is how a for loop "knows" that it's time to exit.
 
@PM2Ring alright, thats great . thanks
 
No worries. As that little demo shows, the generator prints its "bye" message & exits before the exception is raised. So it can't be the thing raising the exception because it no longer exists.
 
My mac appears to have gone rogue. I feel like such a n00b trying to get to the bottom of things happening vs. Windows, so it's lined up for a nuke on Monday :'(
 
@astralwolf Here's a compact recursive generator that I'm rather proud of: stackoverflow.com/a/52414034/4014959 Also see stackoverflow.com/a/41778581/4014959
@roganjosh Oh dear. :(
 
7:06 PM
When the situation gets to the point that it's making the boot-up jingle sounds while the lid is down, it gets a little creepy. Especially since I can't remove the battery. I hope that changing the wifi password has cut it off
 
You know the finger print scanner is also the hardware power button?
 
Or, maybe I succeeded in my terrible experiments in creating sentient life, and I'll be the first victim. A vanishingly-remote possibility, but one I could find a little pride in
@MisterMiyagi at this point, I'm rather glad it doesn't have my fingerprint. I assume I can just power-off vs. sleeping but the fact that it was doing stuff while sleeping left me unsure of what it could do over all
In the end, it could just be some innocuous bug, but there's a bare-faced lie that I'm up to date on Big Sur with version 11.2.3, plus all the other wonky business. I don't like it when the OS lies to me :/
 
Well, if it is celebrating its newfound sentience by making your life miserable, by all means nuke it from orbit.
 
Are you sure it went to sleep?
 
It failed in its primary function. As soon as the touch bar died and I could no longer control the volume, the search lights for the culprit were in full effect
 
7:19 PM
I've just been bitten a few times by "weird" behaviour being that I thought it was powered off while it was actually still battling things out with our Exchange server.
 
@MisterMiyagi MS exchange? Sentient and evil!
 
With the touch bar, restarting the laptop doesn't help and the processes that power it aren't running (the OS should auto-restart them as far as I can tell, so they should be running). Plus the OS is lying about 11.2.3 being up-to-date, the app store loads a blank window, permanently, and now the weird reboot sounds while I'd got the lid closed
 
@roganjosh Sounds like a job for an Apple Store, TBH.
 
Lid closed != asleep
Only worry if it does stuff while asleep
Debian-likes have sudo pm-suspend to emsleepen a laptop
I had a laptop that often would refuse to sleep closed. Fun times.
 
@MisterMiyagi Work already decided the OS will be nuked on Monday. Most of our stuff is cloud-based anyway, so it doesn't cost me much, but when you look at things like Python/Java/C++ environments etc. it'll probably cost me a day just to get everything back up
 
7:25 PM
Oh no, it must have uploaded its consciousness To The Cloud D:
 
I've been pretty happy about fixing such issue with Time Machine.
Unless you have LaTeX installed. Then the day is toast.
 
@MisterMiyagi sending back a benign machine? Good idea.
 
Side effects include sunglasses and Austrian accent.
 

« first day (3997 days earlier)      last day (934 days later) »