« first day (4092 days earlier)      last day (857 days later) » 

vey
1:21 AM
hello
 
Hi @vey!
Welcome to Room 6, the SO Python Chat Room
 
cbg o/
 
 
9 hours later…
10:30 AM
Has anyone started using an alternative to Docker Desktop, e.g. Rancher, ahead of the coming changes to licensing?
 
 
3 hours later…
1:03 PM
When jokes go too far with colleagues rarible.com/token/… :/
I guess I could sell up and make the purchase of a lifetime. I have been looking at investment approaches recently, maybe it's this NFT
 
Veto
 
The pixelation is quite exquisite though, don't you think?
 
Tasteful, poignant, and not $150,000.
 
1:21 PM
I mean, I did trigger this imgur.com/a/i1GmgyU but I didn't expect him to go actually list it :P
I think, if anything, this just makes me even more confused about what on Earth NFTs actually are, given that he could actually just do that. This is a silly place.
 
2:08 PM
My layman's understanding: an NFT is a statement of the form "{person} hereby owns {asset, typically an image}", written in a very tamper-resistant ledger that is trusted by a large number of people.
 
Trusted, but seemingly useless. I did some more research and, as ever on this topic, I get more confused about what this system even is
I buy a cat gif for $3 million. Great, now what? It's all over the internet already anyway.
 
A concerning number of people seem to believe that, because the ledger is very tamper-resistant, then every statement written in it must be true. But tamper-resistance only prevents information from being edited.
 
If the NFT bubble (if you can call it that) doesn't burst then I'll eat 3 of my hats... then sell the video with an NFT. You, yes you, could be the owner of this entirely irrelevant content
 
I can put "Kevin owns the Mona Lisa" on the blockchain a million times, but it won't make it so. On the other hand, suppose the legal owner of the Mona Lisa wrote "I, Wealthy McRichington III, agree to transfer ownership of the Mona Lisa to the holder of this token". Then the NFT is about as valid as an ordinary coupon.
 
Or, I could just have the Mona Lisa on my wall as a tangible asset. That would involve breaking lots of laws and theft... but you hopefully get the point
I don't need some hash to tell me that this tangible asset is mine - it's on my wall
 
2:20 PM
Umm... just been delivered another pack of flow test thingies... weird thing is I didn't actually request any more and there's apparently a shortage... confused
don't recall anything on the NHS site when requesting a pack that you effectively signed up to automatically get a pack every 2 weeks or something either
 
Now, there is precedence for tangible assets that don't really go anywhere when people buy them. When one country sells gold to another, it doesn't leave the gold reserve, they just wheel it out of the seller's vault and into the buyer's vault. I bet they don't even do that much if there's no audit in the near future.
 
@Kevin but if the owner calls it in, they'll get it, right?
If not, this is the kind of thing wars are fought over
 
If Canada sells two gold bricks to Mexico, maybe I'll wait a week and see if Mexico sells one gold brick to Canada. Then I only have to move one brick instead of three. You gotta be smart if you want to survive the brick-wheeling business with a functioning back
@roganjosh I imagine so. There are probably gentleman's agreements not to call in everything at once, which might destroy the economy forever.
 
@roganjosh commodity trading is a weird thing... you "buy" the right to the item you're buying but you don't necessarily need to take possession of it... so company's that buy 500k barrels of oil don't suddenly get delivered 500k barrels of oil
 
Yeah, I'm trying to build an argument but then falling down on what commodity trading really amounts to. Maybe NFTs aren't all that bizarre in context
 
2:26 PM
I read an interesting article about a guy that wanted to know how to actually turn his "one barrel of oil" commodity into an actual real barrel of oil that he could touch and roll into his house. Apparently it's quite an ordeal.
 
what you then do in the commodities market is hope to sell your "ownership" of the 500k barrels of oil to someone that wants to buy them at more than the price you paid for it
 
Especially since oil is toxic and has a short shelf-life outside of a fancy storage facility
 
Sure. I've done trading myself so I have a hand-waving understanding of how the market works
 
Gold is easier in that respect. The only thing dying there is your grass once you discover your pallet of gold is too heavy to push inside
 
What I've never got a grip on is the volatility in bitcoin. If I was trading USD/GBP and Trump decided to pull out of the Paris agreement - that's gonna cause issues. But nothing even close to the extent of the swings on Bitcoin so I don't even know where the volatility comes from
 
2:30 PM
@Kevin but you're not buying a specific barrel of oil... you're buying the right to have a barrel of oil...
 
The US is still diversified, so the Paris agreement might only hit a small portion of the economy... fine. But in bitcoin you'll suddenly lose 50% and it doesn't support even the tiniest bit of the economy
 
@JonClements Yeah, that's why it took the guy like five paragraphs of beaureaucratic bushwhacking to actually get the barrel he was entitled to
 
Then load NFTs on top... this is all imaginary stuff :/
 
@Kevin Basically... commodity trading isn't about actually having the thing... it's more just identifying it's fairly cheap at the moment and might get more expensive and in demand later... buy low and sell high and all that
 
Real money is also imaginary, but the government will do violence to anybody that doesn't play along, so consumer confidence in its value is higher
Bitcoin nerds have weak arms and therefore can't guarantee the same level of violence. Ergo: less confidence, more volatility
 
2:42 PM
banks don't have money either... they're legally required to hold a certain amount of cash reserves (in the UK at least) and obligated to actually give you physical cash but if everyone did that at once - they couldn't do it
 
The frustrating thing for me in trying to reason this out is that I can't disagree with the tenets of the counter-arguments :'(
Maybe I just have to accept that this stuff isn't as weird as it appears to me
 
I'm only partially joking about the violence thing. If you tell the IRS you won't pay taxes because these green slips of paper are meaningless, the police really will put you in jail.
 
I didn't take it as a joke - you're completely correct
 
@Kevin The HMRC is about as much fun - although you'd have to do a lot to get back into jail over it
 
The IRS probably doesn't want you in jail if they think they can get more money out of you. You'd have to be pretty obstinate about never participating in the economy again for them to say "okay, go manufacture license plates in federal prison then"
 
3:19 PM
@roganjosh it's the other way around. It's weird. But so is money.
Then again there's money weird, then there's bitcoin weird, and then there's NFT weird
@Kevin there were ptoblems a few months back when oil future prices dipped into the negatives
People had to pay other people not to be obliged to actually buy those barrels
 
I don't think it was futures?
Huh, it was. I thought it was those without futures that suffered but it hit the producers
 
Few = 20, apparently
 
Ah, I was thinking about the spiralling energy costs in the UK, which has blown out a lot of companies. Well, 2022 holds a lot of promise :)
 
3:45 PM
I visit SO for the first time in a while and I see a 40k rep user post a self-answer about "safely" using eval. Nice.
 
Link?
I want to learn
 
Here. Have fun learning.
 
Thanks, found it since
 
Coincidentally, I deleted my gist that completely restored the builtins from nothing just a few days ago
"Never gonna need this anymore" - me, a few days ago
 
Can't you recover it?
 
3:58 PM
It's probably still up on the riddles page, actually. Or at least a trimmed-down version of it
 
Probably not
 
Nice
 
"Last edited on Dec 11, 2019" :(
 
@Aran-Fey edited, now it looks like a dupe
I've already voted unclear
 
4:03 PM
Oh, nice dupe target
 
4:35 PM
"I'll get back to you when I've had a chance to attack this." Just lol. It might as well be me at work
<grabs popcorn>
 
re: "As you must know, telling people eval can be made safe is harmfully wrong." I'm sorry to say this, but that sounds like FUD and hand-waving. callables and vals explicitly define what can be eval()'d. — Mike Pennington 22 mins ago
 
It's more fun for me to play with websites than eval because that scares me a little that to prove my point, I might have to do something terrible to my own system
 
Did this dude even so much as glance at Ned's article?!
 
Let's find out
 
Plus, his rebuttal to Andras's "I think this is a dupe" was essentially "No, that question is about evaluating math. My question wants to evaluate more than just math" as if that'll somehow magically make eval more safe. Dude's a lost cause as far as I'm concerned.
Plus, the whole eval(compile(code, '<string>', 'exec'), globals, locals) thing he keeps doing is such a hilariously dumb way to do exec(code, globals, locals), it's clear he has no clue what he's doing
 
4:45 PM
I think the whole premise is enough to earn my downvotes, even before Andras has a go at breaking it. It's just terrible advice
... and now I can move on with my life. What was I doing again??
 
Moving on sounds good. I have a plate of pasta to devour.
Wait a minute, "pasta" is an umbrella term for all... y'know... doughy foodstuffs? I thought pasta was essentially the same thing as "noodles". Is bread pasta? Is pizza pasta?
 
Bread and pizza are not pasta as far as I'm concerned. Also, the dictionary definition says "... and typically cooked in boiling water." which I don't think I'd do with pizza
 
So I guess it's just that there's no english word for "Teigwaren" (food made from dough) then
 
5:01 PM
I'm 90% of the way towards writing an exploit for that guy
 
Every image result so far is "pasta" so I'm not sure where the bread/pizza came in?
But, to my knowledge, there isn't a collective noun for something that spans pasta and bread in the English language
 
Crazy
This must be how Shakespeare felt, that's why he constantly invented new words
 
I'm not sure why you'd need it. I'm from the North and we can eat everything on bread. When I put carbs (rice/pasta) on bread, the Southern population's head explodes
So I'm kinda inclined to think that bread and pasta should be in separate categories
 
Yeah, ok, that also made my head explode
 
Bah, NameError weirdness... Did the scoping rules for generator expressions change or something
 
5:06 PM
They behave like a nested function, so you can access the globals but not the locals
...I think. Now that I've said it, I'm unsure
No that's dumb, of course generators and nested functions can access the surrounding locals. You can't assign to them, but duh
 
Just back on my own English, I don't know why I said "collective noun", oops. Now I wonder if there's a collective noun of pizzas. A gaggle of pizza?
 
That would put pizza in the same category as geese and journalists. Doesn't seem like a good fit
 
Apparently, "slice" is the collective noun. I don't believe it. That's less than one pizza so that makes the pizza a collective noun in itself... a collection of pizza slices?
 
TIL a group of albatrosses is a "rookery"
"slice" is fun, I like the paradoxicality
 
Wut is my own language? :/
 
5:19 PM
exec("a = (a for _ in (1,)); print(list(a))")          #[<generator object <genexpr> at 0x00000160994FC6D0>]
exec("b = (b for _ in (1,)); print(list(b))", {}, {})  #NameError: name 'b' is not defined
I'm too annoyed to properly troubleshoot
I think I can hack the second one to work if I use global. Still don't understand why it's necessary though.
 
Hmm, I can't explain that either. dis shows that the generator is trying to load b from the global scope, but I have no idea why
I guess local name binding works differently in exec. In a function, python analyzes the code and sees an assignment to b, so it knows b is a local variable. If this doesn't happen in exec, then that would explain it
 
I was thinking something similar. In normal conditions, Python can determine which objects some names resolve to, even before generating any byte code. Maybe exec skips doing that in some cases...?
But even if this "early resolution" step was disabled during compilation, I would expect it to search all containing scopes for a variable named b, which it would find at the file level.
 
Oh right, I remember now. There's a similar problem with class scopes. Functions defined in a class can't access class variables; similarly, functions defined in an exec string can't access the local scope
>>> exec('a = 5; f = lambda: a; print(f())', {}, {})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 1, in <module>
  File "<string>", line 1, in <lambda>
NameError: name 'a' is not defined
>>> class Demo:
...     a = 5; f = lambda: a; print(f())
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 2, in Demo
  File "<stdin>", line 2, in <lambda>
NameError: name 'a' is not defined
 
5:36 PM
Oh, surprising. I have a faint memory of why class variables are like that, and I don't think you can use the same argument for exec. Whatever that argument may be >_>
"Because the devs don't want you to be able to do it" is a possibility, as always
 
Btw, I can confirm that your exploit works in 3.10. I bet that clown eval'd your entire code, that's why it failed
 
I think he'll figure it out if he toys with it a bit. My coding power is too depleted to give thorough guidance.
 
Suddenly a wild Andras appears
 
Wow, that's a lot of effort put into a duplicate
 
I had but one close vote to cast
 
5:45 PM
Especially since the OP has only displayed laziness thus far
 
it's not like I'm the only gold badger here, ahem
can't let harmfully wrong posts sit around unchallenged
 
Huh, apparently I'm allowed to upvote but not downvote. That seems backwards
 
125 rep needed for a downvote, 15 for an upvote
that's why HNQ is such a huge misfeature
 
Optimized for sand
 
HNQ?
 
5:49 PM
hot network questions
You get 101 rep from association bonus, more than enough to upvote, not enough to downvote.
 
Right. Google. I'm a little slow today...
 
6:05 PM
@AndrasDeak Stepping up
 
@PaulMcG dupe target is in my comment, and its dupe target
 
Sorry, didn't get that you were looking for a dupe hammer, so I close-voted along with you in the "unclear" category. I can't unclose-vote and then reclose-vote.
 
:/
@vaultah yeah, that's the dupe target of the dupe target, thanks
 
Hammered
 
6:10 PM
I've added it. Thanks, Matt.
 
hahaha. A five year old question where all the answers agree that "eval is dangerous". Someone stops by to say "I don't think eval is that dangerous really"
 
ooooof that's horrible
> I don't think eval is that dangerous really. When eval is called with your string that you want to evaluate it kinda makes a sandbox. It even allows you to pass a dictionary as variables. I might be wrong but I can assure you Python has a safe eval.
No, no no no no no no
 
I might be wrong, but I can assure you :D
 
"I might be wrong but I can assure you"
 
it would be hilarious if it weren't tragic
 
6:20 PM
Ha, snap. I'm just imagining the doctor coming in with I might be wrong but I can assure you that this isn't fatal
That's cracked me up
 
haters will say it's unsafe
 
 
2 hours later…
8:08 PM
This library is driving me mad. It has a high level API that I'd like to use, but it's not suited for everything I want (and apparently it's a bit wonky on Windows). So over the days I've learned more and more about the low-level API, and completely reworked my code, but I have made exactly zero progress on solving my problems. All I've achieved is that I have more control over things, but that hasn't proved to be helpful :|
Every achievement is celebrated for 0.5 seconds before I realize that my code still isn't in better shape than it was... uh... a few weeks ago
 
What library is it?
 
SpyteAranFey
 
ohoho
 
It makes sense that audio/video playback is complicated, but damn
It's trivial to get a video playing, but as soon as you do anything it goes kaboom. Wanna resize the window? Nope, can't do that. Fullscreen mode? Good joke.
 
8:15 PM
left as an exercise to the reader
 
I am familiar with this kind of suffering
Trying to remember what library I used for my own video playback project... I think I suppressed the memory
Jan 12 '20 at 14:14, by Aran-Fey
I've tried gstreamer and it was a mess, so I'd recommend anything else
It seems that time goes in a circle
It appears I was using VLC's Python bindings, with less success than you're having now
 
"Why are you hitting yourself?" for nerds
 
As a programmer, I hate the G-libraries. As a user, I love the G-libraries.
 
I'm sure that the tech behind video playback is astoundingly sophisticated these days, but you'd think the hard parts would be somewhat encapsulated away from things like resizing the window
 
8:32 PM
window resizing is usually handled automagically, but seems to have issues on Windows. What really surprises me is that there's no easy way to get fullscreen mode
Ah, "could not find libvlc.dll". I remember that problem
 
Do I need to find The Sound of Silence for you?
 
I don't know what that means, but if you want me to shut up and suffer in silence, sure, I can do that
 
lol, no, just the "hello darkness, my old friend" meme
 
If I'm reading devblogs.microsoft.com/oldnewthing/20050505-04/?p=35703 right, there's no formal flag for full-screen-ness, but Windows can guess when you're trying to do it, and hide the taskbar on your behalf.
 
oh, I love my OS guessing things on my behalf
 
8:38 PM
This sounds very dumb, but I endorse Raymond Chen as a smart guy, so I defer to him on this matter
 
I think this is the first significant log4j exploitation I've seen in the wild
 
@Kevin It's a bit... facetious? To suggest that people trying to get fullscreen windows is misguided, when you just have to make it fullscreen-ish and it will magically be fullscreen.
 
Well, making a fullscreen window is easy enough. Rendering into a fullscreen window is also just as easy as rendering into a non-fullscreen window. The problem is switching into fullscreen mode while the video is playing. I have to remove all widgets from the window, then fullscreen it, then tell the video player to render the video somewhere else than before.
 
Raymond gets much correspondence from people trying to do silly things with the Windows API, so I expect he errs on the side of calling people silly
 
I'm blissfully end-y in my userness. Still, I've had issues with resizing mplayer videos, when the screen size was invalid during my resize attempts. I think I ended up losing the video (it was still running, but the window disappeared into another dimension).
Which is to say I can certainly believe when someone has problems with something as simple as resizing a video
 
8:45 PM
@Aran-Fey If all of these requirements were thoroughly documented, I think I could adhere to them... But I'm guessing they aren't documented, and you've been discovering each one by tripping over it in the dark
 
Hmm, no, that was pretty much how I set out to implement it. I've considered some hacks like spawning a new (fullscreen) window on top of the regular one, but that would lead to a bad user experience if you alt+tab out of it or something. So, as weird as it may seem, I think removing all widgets from the window is actually the proper way to do it. The problem is convincing the video player to not implode when this happens.
 
Hmm I see
 
9:01 PM
> The internet is full of hearsay about what you need to do to get fullscreen exclusive mode in OpenGL. [...] There's a big issue with all of these claims: they're not documented, and there's no obvious way to test if they actually work! If we're serious about doing things right, we need to find a way to test for fullscreen exclusivity.
From gamedeveloper.com/disciplines/…. I'm happy to see at least one person online that actually wants to apply critical thinking and perform experiments, rather than just parrot what they read on Stack Overflow Ripoff #2342
TLDR: despite their investigative work, they don't know how to reliably trigger "real" fullscreen. But the same is true for 50% of triple-A video games, so it wasn't for lack of trying
 
Reading that made me realize that I have no idea how displays work
> If you're in borderless window mode, you can set the resolution to anything you want since you're just resizing a framebuffer.
My brain just goes "uh huh"
 
I'm not sure whether that quote means "setting the window to a particular resolution will always work because it will simply change the dimensions of the window to match", or "the resolution you specify doesn't need to correlate with the window size or your monitor's specs at all, because Windows will magically convert everything for you"
 

« first day (4092 days earlier)      last day (857 days later) »