« first day (3345 days earlier)      last day (1595 days later) » 
00:00 - 20:0020:00 - 00:00

wim
8:00 PM
guess the output:
try:
    print("hello")
except X.auto @ property.template<T> X(*T(v := 123), ...) - object:
    errorerrorerror
else:
    print("world")
 
wat
 
My editor throws a SyntaxError at v := 123. All's good
 
Mine throws a SyntaxError at @ ;)
 
Nothing better than except X.auto @ property.template<T> X(*T(v := 123), ...) - object: on a Friday evening to give you an existential crisis :P
 
8:16 PM
why am I stuck on AoC day 2?
 
@inspectorG4dget Make sure you read the bottom paragraph extra-specially
 
@roganjosh many thanks. That did it
 
Oops, that revision has a typo
 
day 2 is the gift that keeps on giving
 
a commented decompilation of AoC 2019 day 13's Intcode program, for real this time: pastebin.com/uDjwfRsA
 
8:19 PM
@inspectorG4dget I lost an hour to it before I came here with my tail between my legs :/
 
Oops, this one has a typo too, but you can probably use context clues to figure out what "decomipilation" means
 
@roganjosh try not to feel too bad. You're at least several days ahead of me
 
Yep, that last paragraph messed with a few people...
 
@inspectorG4dget I got over-ambitious on day 3 and then kinda lost the motivation. Work has been frustrating enough recently. From this discussions here, there's lots for me to learn if I persevere but I need to find the energy :)
 
So, unless my math is off, we're on a steady schedule of an Intcode problem every other day.
 
wim
8:25 PM
does requests offer any replacement for urllib.urlretrieve?
@Kevin pastebin :(
docs call urlretrieve a "legacy interface" but don't offer alternative
 
wim
that is not a replacement, that's writing it yourself!
 
Well, the key thing is the requests module.
 
wim
no the key thing is not buffering the entire download into memory before writing it to disk
 
In that case, see the answer below.
 
8:32 PM
@roganjosh shush! don't tell anyone
 
@wim presumably, thats why it was included in python3 --- because there wasnt one
 
I had this same question a while ago and even tested a few different options, but I think I deleted that script from my machine...
 
They do state legacy and "may become deprecated" but they currently aren't deprecated.
 
wim
sounds like the answer is just "no".
 
well, maybe.
lol
 
wim
8:34 PM
surprising. seems like a pretty basic functionality that a library "for humans" should provide.
 
@Code-Apprentice The secret's safe with me, don't worry :P
 
wim
Apparently I was digging for this a year ago and forgot stackoverflow.com/q/15035123/674039
@Kevin thx
 
@Kevin hosting it by your own petard
 
wim
I am quite impressed that the breakout game is only ~7k of intcode and the computer is only ~100 lines of python!
 
8:37 PM
@wim haha!
Looks like requests has sort of the inverse functionality...
 
wim
yeah
 
seems like a reasonable feature request
 
wim
glaring omission requests.download(url, filename)
there must be a good reason why it's not there...
@Kevin did you figure out how the scoring worked? view spoiler
 
Kenneth says "There is little value and many disadvantages of having a library write to files directly on your behalf." which I do mostly agree with.
 
wim
wow. kenneth can be pretty mean
 
8:44 PM
@wim My first revision named the scoring algorithm lol_idk, but I think I figured out what operations it's doing. I just updated.
 
wim
you're still sticking to your if/elif computer? brave man
 
stream=True seems like the good opt for ya, wim
 
wim
yep
 
just tried it, glad you asked! didnt know I wanted this.
 
I think it's something like view spoiler Or perhaps some permutation of those values in different positions
 
wim
8:47 PM
some people hacked the game by making the ball bounce off the floor 😂
that sounds like a lot more effort than just moving the paddle, but I guess some people just can't resist to cheat :D
 
@alkasm For some odd reason, the default chunk size for stream=True is 1 which makes performance totally bad. In our tests here, 32 was sufficient for most of the benefits, but I routinely use 1024 just because 1024.
 
The reason I set out on my decompilation adventure is because I wanted to hack the paddle to be infinitely wide :>
But paddle width is pretty dang hardcoded at "1" so I guess it would be easier to turn the paddle's row into a solid wall
 
wim
you should post your disassembly to reddit. really neat, people will enjoy this
 
@PaulMcG 2^10 is always a winner. Neat! Thanks for the follow up
 
Oh? I'm surprised that there wasn't one already submitted at 12:05 AM. When I have access to my reddit account, perhaps I'll make a submission.
ETA thirty minutes from now
 
9:30 PM
[insert Dio yelling "30 minutes have passed!"]
 
9:40 PM
Composing post... Checking that it's not a duplicate... Reticulating splines...
 
wim
@PaulMcG I wonder what the reason for such an idiotic chunksize is
 
Uh oh, I don't have enough pieces of flair. Does this count as "upping the ante"?
 
wim
10:04 PM
uses elliptic curves to sign over 100 quatloos to Kevin
 
10:49 PM
@wim I could not say. Dev was too lazy to test? Really no reason for it.
 
 
1 hour later…
11:57 PM
Hmm, both my /var/log/messages and /var/log/user.log are 1.5 GB. I suspect this is not normal...
Or, hmm, these are my rotated .1 logs, latest entry a week ago. I guess I'll just trash them
 
00:00 - 20:0020:00 - 00:00

« first day (3345 days earlier)      last day (1595 days later) »