« first day (3866 days earlier)      last day (1074 days later) » 

2:18 AM
:-D
 
In the documentation of URLRouter it says "Positional groups are discarded as soon as a single named group is matched." so does this mean that the args key will be an empty list?
 
2:54 AM
@CoolCloud I have done my part
I thought you only answered tkinter stuff
 
3:20 AM
@CoolCloud closed
 
3:33 AM
@PaulMcG Kay thanks :)
@python_user Believe it or not, it has 'Tkinter' in question, so it got tagged along while searching for tkinter :P
 
 
2 hours later…
5:41 AM
@CoolCloud do you actually search for tkinter in addition to watching the tag? that is dedication
 
6:05 AM
cbg
 
 
2 hours later…
7:43 AM
cbg
 
cbg
 
8:13 AM
cbg
 
cbg
 
cbg
 
ccccccccbg breaker!
14
 
green leaves float down from the ceiling
 
that was the longest cbg train I have seen ;(
 
8:28 AM
there's been much longer before... but then someone always goes and ruins it :p
 
yeah "someone" ;)
 
Hey I want to set a static ip on a linaro linux, now I set it in /etc/network/interfaces and it works, but after reboot the ip get's deleted, any ideas how to make it permanent?
 
have you tried unix.stackexchange.com/questions/314494/… ? the one using netplan?
 
@OldTinfoil how you been?
 
Both good and bad man, thanks for asking. Business is doing well, but it's driving me mad. What about yourself?
 
8:38 AM
I don't have netplan
the weird thing is the config file is correct, because after I reboot networking with ` sudo /etc/init.d/networking restart` it gives me the correct ip, it's just that after a device reboot it doesn't do that networking restart, which is very odd
 
It's not that unusual - depending on how your OS manages its networking. Some Linux distros recommend not directly modifying /etc/network/interfaces because it gets overridden by whatever network management tool you're running on your system
I would also disclaimer that I don't know a damned thing about linaro.
 
to be precise, I added a file named test in /etc/network/network.d which /etc/network/interfaces reads with source-directory /etc/network/interfaces.d
unfortunately me neither, this is the only thing I need to do with the distro, but it seems harder than I thought
 
@OldTinfoil oh you know... business doing well... but already mad anyway so... :p
 
@Hakaishin Any clues in your logs about what is happening at start-up? It might give a clue as to what is loading your networking
But if we go down the road of checking out logs, we should move this conversation out of room 6
@JonClements To be fair, I've always found you to be relatively sane for a 3 legged pupper that codes.
 
8:58 AM
"relatively"? :p
 
Have you ever met any springer spaniels? They're utterly bonkers.
 
Also huskies
 
9:14 AM
hmmm so our network guy couldn't do it. Guess I'm writing the supplier
 
Can you stick your startup logs into a pastebin?
 
@OldTinfoil yes give me a moment
I guess journalctl -b doesn't contain sensitive information? I quickly checked but couldn't find anything
 
It depends, but you can delete it now
 
not much in it I think
 
9:29 AM
But yeah, your system is running dhclient, so you need to adjust your dhclient.conf file
 
recbg
hmm strange.
yesterday at home I had a problem with smart tv... which stopped working via wifi :'D
it gets completely strange IP over wifi...
even though gw address is right :D
 
Using powerline?
as in, anywhere in the network?
 
nope. it is DSL out... also ESSID is my surname and mac right etc... we've had these odd stuff now...
so my thinking was maybe I am running DHCP server somewhere or something but can't find any :'D
but the IP was something really strange, almost like link-local 169.254. but wasn't even that
 
What was the IP?
 
naturally I don't remember it :(
need to check later today...
back in the days when I was living in student flats...
someone had misconfigured a DHCP server
and plugged it into the wall... brought down the entire network in the entire block :D
 
9:38 AM
Sounds about right. It's always fun to do that when people have pissed you off
 
other time was equally funny, customer complaining that network in their premises is slow...
I found the culprit in their lab... there was a dumb hub, and they had connected two ports of that into two wall sockets :D so their dumb workgroup switches were routing packets in a loop, token ring, lol :D
 
facepalm, but to be fair - everyone has done that.
My girlfriend did it when she thought she would be helpful and tidy up my cabling. Was a bit of a head-scratcher until I tracked it down.
Back to your TV issue - you've not changed your TV region / wifi region settings?
 
not that I know :D
it is a samsung so it can do strange things by automatically getting updates :(
right now I am at office so I cannot check anything :P
"non-lockdown problems" :D
 
Bants. Well, when you get home it's worth doing a sanity check on if your wifi is using legit wifi channels
 
ya... it is those ISP managed combined wifi/dsl/we route your IP tv multicast/whatever smart boxes so IDK what it is doing :
 
9:44 AM
looks on in horror
I personally find things that auto-configure are more of a headache than not. *

* for a given level of auto-configure. Naturally, the optimal level is the amount I personally prefer.
 
@OldTinfoil ex, right? ;)
 
Well, funny you mention it...
 
10:19 AM
@OldTinfoil This could be made into a great sticker :)
@AnttiHaapala jap had a customer do this once too and then blame us why things didn't work :D
 
A confusing one to have on the back window of the car though!
 
10:31 AM
@python_user I could search the tag, but many 'new contributors' don't add tkinter tag, so I search for the word instead ~ stackoverflow.com/search?tab=newest&q=tkinter
 
 
3 hours later…
1:36 PM
arhghgh... the inbuilt wireless card in my desktop is driving me nuts... thinking of getting a USB one or something... any recommendations?
 
looks like you misspelt ethernet.
 
Not sure if this helps, but my brother says he likes to look for cards that are known to work on the raspberry pi, because that means they're supported by linux. But nowadays the raspberry has wifi built in, as far as I know
 
well, I'm on linux, and the interface in it was a right pain as the power management use to shut it off periodically - so disabled power management for that interface and it worked fine for a bit... but now... it's just... ummm
might be the router
and that's not right either... should be 3x that
 
1:55 PM
Don't be like me... paying for 250Mbit/s, but only getting 20 because of old router + old wifi card
 
 
1 hour later…
3:15 PM
Hmm, I'm getting a lot of "can't take the square root of a negative" exceptions in my code... Maybe I should just use complex numbers everywhere
I'm playing around with the intersection of two circles and there are frequently no real solutions, when the distance between centers is greater than the sum of the two radii. But you can still find a numerical value for their "imaginary" points of intersection. I'm trying to visualize what that number represents geometrically.
 
@Kevin from cmath import sqrt
 
I imagine that cmath.sqrt will be invaluable to me, if I can manage to convince myself that this isn't a totally silly pursuit to begin with :-)
 
well it would make your current code Just Work so you could figure out if the result makes sense
 
I'm trying to visualize what a circle looks like in 2D complex space, but it's hurting my brain
 
Circle how?
Or by 2d complex space you mean (c1, c2) complex pairs?
 
3:29 PM
Yeah
 
yeah, I don't do 4d
Well, I do 4d. I don't visualize 4d :P
 
I'd be happy if I could visualize just the 3d slice of the 4d space where x.imag=0
 
in that case it's probably a sphere
 
The first example in the above link has imaginary solutions (0, +/- i sqrt(3)) so I should at least be able to see the hyperspheres* intersecting
(*possibly not the real name)
 
hyperspheres do exist I think
I talk about hyperellipsoids to my students
 
3:33 PM
I also think they exist, but I don't know if they're what I'm trying to envision here
Maybe if I define my givens and objective better... where's my drawing board
 
they are the generalisation of a sphere in n dimensions: points in space where the norm is constant
 
I think things get a bit wobblier for complex space because usually when you do r^2 = x^2 + y^2 + z^2, you don't expect z^2 to give you a negative number
 
yes, but it would be straightforward to use |.|^2 there
distances are normally real
 
True
Definition: an Ultrasphere is the 4d surface described by the equation R^2 = w^2 - x^2 + y^2 - z^2 for some constant non-negative R. Objective: plot the 3D cross section of an Ultrasphere where x=0.
The intersection of an ultrasphere and the WY plane is a circle. When it intersects the WZ plane, it's... a parabola? And likewise for the YZ plane
Hyperboloid matches what I'm imagining quite closely.
 
3:59 PM
yeah, that looks like a metric similar to what you see in relativity
 
I must be having a good day, I'm reinventing wheels from last century
Rather than my usual standard of twenty centuries
Still not quite sure if this is practical towards finding imaginary intersections of circles, since finding the real intersections of two hyperboloids isn't exactly a cognitive breeze. For me at least.
 
4:18 PM
Full documentation for the kmeans parameter of PIL.Image.quantize: "kmeans – Integer". Very helpful :|
 
nice
you can probably pass the number of clusters :P
 
4:29 PM
On one hand I'm disappointed by the discovery of Image.quantize because I already manually implemented a Median Cut algorithm, but on the other hand I get 3 new quantization methods for free
 
4:52 PM
You know it's a slow day at work when you spend an hour just googling image quantization algorithms
 
Sounds like my ideal day
 
Well, the problem is... there's plenty of work to do, we're just having a hard time getting it done. Supervisor's not gonna be happy
 
Sounds like the day that typically follows my ideal day
Hmm, usually when I see that some fancy sounding algorithm is mentioned in documentation but not explained, I assume that it's considered elementary in its own field. But I suspect that's not what's going on with PIL.Image.quantize, because google gives me no meaningful results for "quantize maximum coverage"
 
5:16 PM
@Aran-Fey well... I've beeped at the ISP a bit and now it's doubled somehow... but... umm... still not a happy puppy... mind you, was paying nearly 50% more for just 8mps so... shouldn't get too narfed about it
 
@Kevin Yeah, that's pretty much also why I was surprised to find a whole three algorithms I hadn't heard of before. I have a feeling that "maximum coverage" could be referring to the "Popularity" algorithm (i.e. picking the most common colors)
 
I found a pdf that's quite far beyond my reading level, which seems to indicate that "maximum coverage" is much like k-means except it has a different criteria for judging the quality of a clustering
 
The last time I worked on this project was, uh... 5 years ago, so I guess all those algorithms must've been invented in the last 5 years. Yeah, that's gotta be it. Definitely not my bad googling skills.
 
It's still optimizing for minimal total distance, but... Using something other than squared euclidean distance?? Not too confident about any of this
It also mentions a method that minimizes the worst-case distance between a cluster and its most distant data point. That sounds coverage-y.
 
5:40 PM
Here's Pillow's implementation of max coverage aka quantize2
The for (i = 0; i < nQuantPixels; i++) { loop looks rather k-meansy to my untrained eye
 
Does someone know how I can force MyPy to accept invariant TypeVars in contravariant (input) positions?
I've got a single kind of type that is used everywhere throughout my code as input/output, so it's invariant practically. But MyPy keeps bugging me on every individual utility that does only consume it.
 
Not sure I follow what you're after, could you write up a small example?
 
Sure. Here's one in the playground: mypy-play.net/…
All the protocols happily chew on a T, but for the last one MyPy insists on different variance.
 
5:56 PM
The wikipedia page for K-Means clustering says it operates on vectors... So when used in image processing, does it interpret RGB colors as 3D vectors or something? So it could potentially yield better results if used on HSL colors?
 
My gut says yes and yes
Hmm, but HSL space is a cylinder, right... You might get weird results because H is a measurement of angle
 
@Aran-Fey What do you expect similar parts to be like?
 
General purpose k-means algorithms won't know that (0, 0, 0) and (2pi - epsilon, 0, 0) are very close together
 
@MisterMiyagi That... makes absolutely no sense to me at all. WTF, mypy?
 
It might help to just ignore hue. Depends on the usecase, of course.
 
6:03 PM
Converting to euclidean-compatible coordinates wouldn't be too hard, I think. Y = value, X = saturation*cos(hue), Z = saturation*sin(hue)
 
That's still going to give weird clustering results from the different slopes.
 
"ignore hue" is indeed an approach I see for many image massaging algorithms
 
I generally recommend "ignore data" as a practical first working solution.
 
The Miyagi-Kevin quantization algorithm: first, convert the image to grayscale. Then, you're done, because there are only 256 values in grayscale.
 
data is a first-order correction at best
 
6:09 PM
cabbage
 
My last student was a bit perplexed by my excitement that plain random outperformed most of their ultra sophisticated algorithms.
 
@MisterMiyagi I have to say, I have trouble wrapping my head around the idea of a Callable where the parameters are invariant. Callables are inherently contravariant on the parameters and covariant on the return value. If you need a function that takes a bool as input, any function that takes an int as input will also do just fine. That's just how the language works. Isn't creating a callable with invariant parameters a nonsensical idea?
 
Reminds me of how debunkers of the paranormal occasionally say that they'd be just as excited to find someone that never gets Zener cards right, as opposed to someone that always gets them right
If you differ from random chance in either direction, then something interesting is happening
 
@Aran-Fey Well, yes, in a way variance is messed up anyways. But it's the stick MyPy is beating me with.
Though for all but the last protocol, invariant input type is indeed correct – since it's also the output type.
hides some type latices
 
6:25 PM
Wait, variance has no bearing on that, though? As long as it's the same TypeVar, the input and output types will be identical, no matter what its variance is
 
Ah, that's the annoying part. Since variance in typing sticks to the variable, not its usage, you have to get variance right even if it is self-evident.
 
Are you sure about that? I played around with it for a bit and didn't get any different results when I changed the variance. Do you have an example where it makes a difference?
 
Did you use functions or protocols/generics?
MyPy seems to be lenient about functions.
Like Kevin's fabled tripple Union Dict whopper a few months back.
 
A function, I think
 
Come to think of it, MyPy seems to be pedantic exactly in the cases of maximum annoyance. :/
 
6:40 PM
I got a bronze "popular" badge from my mypy question just yesterday, so I guess it's not just me that found it confusing
 
Hear Ye! Science hath concluded: invariant doesn't mix with Protocol, and co/contra-variant doesn't mix with Generic.
 
Can science also tell me if these are good or bad things?
 
120% "bad" at 95% confidence.
 
You might have to go across campus to the Humanities department and ask them for an objective definition of "Good" and "Bad" first. They should be able to work it out in an afternoon, I'm sure
 
Hm, my Generic use-case was actually wrong. I blame Protocols.
 
6:43 PM
@MisterMiyagi Great, because I heard that p=0.05 means nothing
 
If it gives you radiation poisoning, it's bad. Otherwise, if it gets you more grant money, it's good. Otherwise, it depends.
 
I don't get Protocols. How is this not an error?
class Proto(Protocol[T]):
    def func(self, x: T) -> T: ...

class Impl:
    def func(self, x: bool) -> int:
        return 1

p: Proto = Impl()
 
Is it somehow because bool is an int subclass?
 
@Aran-Fey By the power of Proto[Any]! For great type erasure!
 
Oh, right
 
6:49 PM
@roganjosh so of course there's a wikipedia article on fool's errand
 
I still can't find a way to make the variance matter though
 
It doesn't surprise me. These things are quite commonplace and probably not as hurtful as an outsider might imagine. Things work very differently on the shop floor of a factory vs. academic circles
FWIW I had it done to me with some counterbalances
 
if i document a boolean's travel and trajectory within a spaghetti code, i would call that a bool's errand
 
The sweets dropped onto a vibrating plate that would, when it reaches a certain weight, drop the sweets into the tub by pivoting against a counter-weight that you could screw up or down to change the leverage. I got sick of the conveyor getting overloaded before it tipped, so I moved the counterbalance closer to the pivot and stopped the overloading
My boss found out and waited for me to clock in the next morning. His first words were - "do you know know who messed with that yamming counter balance? We've had the night shift going all night trying to fill our tubs. You were on the machine, right?". Scared the poop out of me; I was a deer in the headlights, but he broke cover in the end and we had a laugh
 
jolly good :P
 
6:58 PM
Pranks of that sort can be fun in the right environment
 
an opt-in environment
 
@Aran-Fey It seems that my beef is exclusively due to Protocols. And going down the rabbit hole from there on.
 
7:17 PM
when passing arg values into a function
which one would you prefer
`function(input, tags=True)` or
`function(input, tags = True)`
aesthetically ofc
 
PEP 8 says use the former
@PIngu And for formatting code in chat please see our code formatting guide
 
you answered before i even posted
backtick character which one is ? ' or `
i often get confused between the two
and also [link](url) format too makes me dizzy
 
If you're using a US keyboard, the backtick key is on the far left of the number row
 
@Kevin kay
 
what you used earlier were backticks
you can practice in the sandbox
 
7:26 PM
@AndrasDeak iso these rules hold good across all rooms ?
 
@PIngu function(input, tags=True)
 
@PIngu these are not rules, just some tips to tell you how to use chat properly
these are our rules, and they only apply here
 
analogically similar to facebook groups these SO rooms ?
I thought these groups were randomly generated by SO from the major categories.
 
Nope :-)
 
@Kevin kinda that gives me "Came to the Wrong Neighborhood" vibes
 
7:35 PM
:-P
 
8:26 PM
@PIngu I don't think we want anyone to feel like that. Kevin has a habit of pre-emptively answering questions before they're asked (we even call it "being Kevin'd). As long as you put effort in on your side, you're in the right neighbourhood :)
 
True
 
Unsolicited Song Suggestion: youtu.be/IbMZZagzqeE
 
Hmm not bad
In the genre of commercial/promotional media with weirdly high production value, Virgin America's Safety Video is pretty catchy
 
Did I watch an ad or is that really 15 seconds long?
ah, so the answer is "yes"
 
The two of us watched the same video, but who knows what pi watched :-)
 
yam it!!!
I copied url before the ad was over
 
9:09 PM
But we outnumber him so our consensus reality overrides his
 
@piRSquared it's alright, Kevin was blown away anyway
 
Youtube actually has an URL for its ads? O.o
 
Ah, Leo, he's good
 
My taste in music is rather... rudimentary... So I try to keep an open mind about things other people link
 
9:10 PM
I listened to his Africa cover about a hundred times
 
I like that one a lot as well
 
@piRSquared I don't think I'm familiar with the original
 
Hmm not bad
 
Agreed. The metal version is pretty good too, but I wish he could sing without making those faces...
 
9:18 PM
@piRSquared you asked a while back about classical music which I couldn't comment on. But on a slightly related note, if you're looking for instrumental music, I recently found Lindsey Stirling (mostly instrumental modern violinist, pop-y though). And I love Adiemus and stuff (fake-Latin jam, as good as instrumental). And of course anything Apocalyptica.
@Aran-Fey and making those eyes :P
 
Hehe, I tabbed out after I saw his white iris contacts in the thumbnail
"I think I'll appreciate this best via audio only"
I liked Lindsey Stirling for a while but I burnt out hard when Pandora decided to make my electronic-ish channel 50% Lindsey, 50% everything else
 
@AndrasDeak Those are great suggestions
 
It got to the point where I'd hear exactly one second of electric violin, and I'd immediately know who was playing
 
@Aran-Fey I imagine Mozart would have made some weird faces in his music videos too.
 
Probably a face that says "What in heaven's name is that monstrous device that's pointed at me?!"
 
Mozart's sister‐in‐law, wrote in one of her letters that he often used to touch his napkin to his lips, make grimaces, tap his hands or feet on objects, or play with hats, pockets, tables and chairs seemingly playing clavier.
 
If only I could be the Mozart of computers, and then I too could pretend to be a cat and nobody would be allowed to call me cringe
 
they only call you cringe if you're not a cute cat
 
"Play along with his weird skits or else he'll get sad and delay the iPhone N+1 for another year"
 
This is a safe place, you can meow if you'd like.
 
9:29 PM
I don't own Apple in this scenario, they simply employ me and provide lodgings in their highest tower
If anybody from the 40th century is reading this and thinking "I wonder what it would be like to meet the famous Kevin... Do you think he'd be all baffled by our cool technology?", I promise I would make an honest effort to listen to your explanation and not call it witchcraft out of hand
If it's advanced biotech and kind of gross looking, maybe put a towel over it first
"Wow, hypocrite much? This kind of talk coming from the creator of the world's first slugputer"
 
I would imagine that in the 40th century technology will be so advanced, it will practically be witchcraft for the average consumer
 
The Clarke-Hofstadter corollary: sufficiently advanced technology is indistinguishable from magic, even if you take into account the Clarke-Hofstadter corollary
 
Don't have a PhD in quantum mechanics? Don't even try to reconfigure your 40th century X server
 
I get resurrected in the 40th century and I'm like, "I was ready for, like, teleportation, and mind reading, and total control over matter and energy, but THIS? [I gesture at the thing before me which I cannot even describe here] This HAS to be magic"
 
[halting problem solver shimmers]
 
9:38 PM
In the 40th century everything is super primitive for the few survivors. Except for the time machine the handful of living humans use to transport themselves back 70,000 years.
 
[Laughs in P=NP]
I see a lot of support for both "the future will be cool and advanced" and "the future will be broken down and primitive" theories, but I think we should bet some quatloos on "the future will have a couple neat new things, but will otherwise be a lot like the present"
 
Will there still be bad CG in anime? :(
 
At some point Apple will do the math and discover that inventing a new compression algorithm that's 0.01% better than the state of the art, would be exactly as profitable as permanently liquidating R&D, and that will mark the point where the S-curve of technological progress flattens out
 
Speaking of quatloos, is there a quatloo alt coin? We should make one so we can finally keep track of these bets.
 
It's the most crypto currency there is because the transaction log is securely locked away in my brain
@Aran-Fey I think CG tech will progress into the "good" range, but bad CG will routinely rotate back into fashion thanks to retro appeal
Same as NES era pixels and PS1 era polygons and VHS/CRT screen fuzz
 
9:50 PM
But those aren't normally used in proper media, are they? More common in indie art and games.
 
Granted. You probably won't see it heavily employed in Avengers 23, but it will find some comfy niches to persist in
Trying to decide if Stranger Things is a valid example of nostalgic tech usage... The video is obviously better than Betamax quality, but the soundtrack has an unmistakable element of synth
 
 
1 hour later…
11:07 PM
What's a TLE """error""", just saw someone use it and got confused
 
TLE? """?
 
Googled TLE... time limit error. They must have done triple quotes for some reason...
weird
 
People write all sorts of things in questions on SO. Ignore those.
 
It was in a comment
 
Was it the asker?
 
11:11 PM
No
 
weird
 
Guy had 35K rep as well... might be a habit of theirs maybe? Idk
What is the generic term for loops, conditions, functions, etc (anything with a colon at the end)
 
I don't know if there's a more official word, but the grammar refers to them as compound statements
 

« first day (3866 days earlier)      last day (1074 days later) »