« first day (2454 days earlier)      last day (2495 days later) » 

8:00 PM
@WayneWerner it's not
 
DSM
You can make consistent sense of 2^inf and inf+1 and all sorts of craziness if you really want to.
 
By convention, sure. Because we like things to be one-to-one, otherwise things get messy and break.
If I graph x^0.5, I could most completely graph https://www.desmos.com/calculator/essw68z2bs
...at least in my opinion? Because both -2 and 2 squared equal 4
 
that looked like something not pi also
apparently it was just my font?
π is what I tried first
 
that is by definition pi
In [176]: '\N{greek small letter pi}'
Out[176]: 'π'
code version looks better
 
8:01 PM
so, 3+π.
there we go
;)
 
@toonarmycaptain that's not a function you have there
 
wim
imo, ∞*0 == 0 is intuitively a more reasonable definition than ∞*0 is float('nan')
 
@wim that's fine, but you're wrong.
 
@wim sometimes intuition isn't correct :)
My intuition was that division by zero would give me a NaN, but it turns out that's just an exception even in floating point
 
in proper languages it will give you signed inf
but now I'm getting unsure
 
wim
8:04 PM
ok, show me why that's not a reasonable definition
 
@wim it's a "reasonable definition" but fortunately there are more reasonable ones, including the status quo
Infinities make sense as limits, just as you said. But then inf*0 should only be made sense of in terms of limits. But as I showed, the product of a series that tends to inf and one that tends to 0 can tend to any of {0,inf,arbitrary real number}. So there's no unique proper value to assign to a generic "inf*0". If you want numeric result, NaN is the only sane choice.
 
@AndrasDeak What I have graphed isn't, because functions have to be 1-1, or everything breaks. It's a piece-wise function that shows x =y^2
 
So @wim what if your inf*0 is instead inf/inf? Which inf is infer?
this can arise depending on precedence/grouping
@toonarmycaptain no, not "everything breaks". It's just that by definitions functions can have at most one value (but not necessarily 1-1: negative values don't have a real sqrt for instance)
so why are you showing me a graph of not-a-function when we're talking about the function sqrt(x)?
 
wim
inf/inf is indeterminate
 
@wim oh rly?
and inf*0 is not?
 
wim
8:09 PM
depends on your axiomatisation, but yes.
 
@AndrasDeak ...were using function in the python sense, when I was using it in the mathematical sense (as least as I understand mathematics)?
 
I imagine your surprise when inf*(1/inf) and (inf*1)/inf give different results
one zero, the other nan
@toonarmycaptain I'm not DSM
 
I'm using function in the mathematical sense.
 
wim
who told you that you could generalise the rule a*(b/c) == (a*b)/c
 
8:11 PM
Real numbers typically obey associativity. Floats don't, by a small margin. But not inf vs 0.
 
wim
infinity is not a real number
 
You can bet your black-and-white butt that defining inf*0 to be 0 would lead to an insane amount of clusteryam for most people
the only counterargument being "nan is not logical enough for me"
 
wim
>>> 1/float('inf') == 0
True
 
yes? ^
 
wim
well that is intuitive too, and it's defined as such
 
8:13 PM
no, that's unambiguously true
it can't be any yamming thing else
 
@AndrasDeak Isn't x = y^2 is a valid function? What I graphed is simply the function of x = y^2 rewritten with respect to x, right? x = y^2 shows all of the y values that when squared give you a particular x value.
 
1/{series tending to infinity} will always tend to 0
 
wim
so, show an ambiguity in defining float('inf') * 0 == 0
 
16 mins ago, by Andras Deak
@wim lim (n^2*1/n) for n->inf is inf
I'll stop this discussion now because you're clearly ignoring my arguments
ignoring/rejecting off-hand; whetever
@toonarmycaptain valid function of what as a function of what?
 
wim
I'm not ignoring your argument, you haven't put forward your argument in a coherent manner yet
 
8:15 PM
9 mins ago, by Andras Deak
Infinities make sense as limits, just as you said. But then inf*0 should only be made sense of in terms of limits. But as I showed, the product of a series that tends to inf and one that tends to 0 can tend to any of {0,inf,arbitrary real number}. So there's no unique proper value to assign to a generic "inf*0". If you want numeric result, NaN is the only sane choice.
@toonarmycaptain x-> "number y for which y^2 is x" is not a function: for every x you get two values, but a function in the mathematical sense maps every input to at most one output
 
wim
repeating what you said previously verbatim doesn't make your argument any better
 
wim
nobody said you could generalise associativity of the reals to these "new numbers"
 
DSM
Something about cats with tilted heads gets me every time.
 
Tilted heads you say.
There's something slightly unnerving about that photo.
 
DSM
8:20 PM
Okay, apparently I have a limit of about 60 degrees or so.
 
tried doing that...need to go to physio.
 
New project idea, write a library that will determine if DSM will like the degree of head tilt a cat displays.
 
there's a reaction gif where a cat tilts its head and then the gif is rotated by 90 degree turns, ad infinitum
 
DSM
My gmail/slack/almost-everywhere-but-SO avatar is a cat with a tilted head. That's how cute I find a (modest!) tilt.
 
decency is key
 
wim
8:23 PM
#unsubscribe cat-pictures
 
I'm sure there's a userscript for that
 
/subscribe wim cat-pictures
you're not going anywhere wim
 
You can never escape the cat pics.
never
 
wim
I hate cats
 
DSM
Rule #5 stands.
 
wim
8:24 PM
especially when they're used to derail interesting mathematical conversations :P
 
DSM
Animal pictures are often a subtle hint that a particular conversation has reached its, er, limit.
 
:|
ore no genkai
 
awwwww ^
 
wim
no s**t sherlock
as I wrote, used to derail conversations
 
8:26 PM
I'd note that in this specific instance there was no conversation to derail
 
@AndrasDeak so I can do y = x^2, but when rewritten x = y^0.5 {x>=0}, -(y^0.5) {x<0} it's not ok?
 
@toonarmycaptain it's "OK" but not a function
 
wim
what about that is not a a function?
 
*sigh*
I'll be over there ->
 
wim
oh, the range is over x not y
@toonarmycaptain y = x^2 has two solutions
(except at x=0)
 
8:30 PM
well actually
 
DSM
I'll break out the Christmas kitten if I need to.
 
@DSM Oooo, please do!
 
smitten with kitten
 
wim
back on Python - does anyone know how to do a post-install script with setuptools?
 
8:31 PM
...in mittens?
 
wim
I found this, but it looks hacky
25
Q: Execute a Python script post install using distutils / setuptools

kynanI'm trying to add a post-install task to Python distutils as described in How to extend distutils with a simple post install script?. The task is supposed to execute a Python script in the installed lib directory. This script generates additional Python modules the installed package requires. My...

 
DSM
user image
3
 
@AndrasDeak fair enough :)
 
wim
I don't think this task should require subprocess
surely there must be some magic for it in setuptools already, but their docs are not the greatest
(and the Q is 4 years old)
 
@DSM Welp, there goes what little bit of productivity I had left. Just gonna stare at that for the rest of the day.
 
DSM
8:37 PM
@MorganThrapp: adorable animals are a weakness of mine. I sometimes use "look at cat pictures" in meetings as an example of what I'll spend my days doing if certain tasks I'm waiting on aren't done. My colleagues only think I'm joking..
 
Hey guys, I'm having a strange predicament.
Easily solvable by conventional standards, and not really impacting me
but I was wondering if I can not an if condition of condition
 
I don't know why, but one person's style of code greatly annoys me :|
 
if (not if foobar) myCondition: doSomething()
 
wim
try
 
@neet_jn I mean, isn't that just if not foobar and my_condition: do_something()?
 
wim
8:40 PM
if (myCondition if foobar else not myCondition):
 
God damn
 
Ohhh, I misunderstood.
 
I feel like an idiot
thanks dude
 
wim
for sure you can refactor this to be less confusing, though :P
nobody here has ever done post-install tasks?
 
example?
I've done enough orchestration that I'm pretty sure I have
 
wim
8:43 PM
in my case, I want to import a gpg public key in the case of successful install
 
what orchestration tool are you using?
 
wim
I am putting this in the config management repo, but it's also nice to have pip do it automatically for local dev and jenkins not to have to be orchestrated too
I know how to do it with that. But I don't want local dev to have to run ansible / salt / puppet
 
oh ok
 
wim
they should be able to pip install .[dev] and run pytest, having it "just work".
 
Isn't that just if myCondition and foobar
 
8:49 PM
wim, I don't put post install at that level usually. We usually use whatever orchestration even locally. The one thing we do differentiate with local is we will bring up fake services, ant what not to bring up things faster just for local dev
 
wim
yeah, I guess that smells like the correct solution tbh.
 
I read that as if bool(myCondition) == bool(foobar): since I think this should return True if both are False? Or I have misread
 
wim
I just found that gpg will not even use the imported key until you mark it as trusted anyway :P
and it's not easy to mark it as trusted non-interactively
 
@PaulMcG I think you're right
 
One of our newer projects @wim will use docker-compose yaml files that differ based on what environment they are deployed own. So they bring up the appropriate container when in that environment. With those compose files you can put in your post install commands too
well, for whatever DockerFile it will end up using, the commands will be there
ugh...I hate finding bad typos after the edit timer runs out.....
 
wim
9:06 PM
yes, I have that for some projects too. this project is not containerised though.
 
hiera for our vagrant/puppet projects
 
wim
I'm not sure what I hate more, docker or vagrant
 
vagrant..it's ruby
docker is go
that was easy
:P
 
Do you have a staple's 'That was easy' button?
 
wim
but docker, inc is probably more evil than hashicorp
 
9:09 PM
Evil as in...
 
world domination. weaponizing cats
 
wim
docker can be a bit hostile in the open source world, I'll just leave it at that
 
docker still has that novelty that is being pushed around and is a flashy new toy for a lot
 
And that's why Moby and OCI have happened. They don't have the ability to be evil too much anymore
 
wim
they need to decide if they want to be FOSS or enterprise because they are being jekyll/hyde about it currently
 
9:18 PM
You can be both. Do a split model like GitLab et al, or a pay-for-support model like Red Hat. I'm not sure how well either of them would work for Docker, though. THey've gotten stuck in a weird place
 
DSM
Aaargh, I've been misreading an output table and thinking the bug was in location X when really it must be in Y. :-/
 
Ah, so there's two types of XY problems.
 
DSM
Heh. Time elapsed from realizing which module the problem was in to fixing the problem: about three minutes. (sigh)
 
9:39 PM
TIL you can compare numbers to None in python 2. I can't believe I used that language for years.
 
you can compare anything to anything, right?
worst case it uses an arbitrary-but-consistent-during-a-run ordering
>>> '2' < float('nan')
False
>>> {'a':3} < (4,2)
True
 
*shudders*
 
DSM
Wanting to be able to sort heterogeneous containers isn't a crazy thing to want, but in retrospect we should have just had some kind of helper key function to provide a "sane-enough-for-everyday-work" ordering.
 
apples_to_oranges()
 
makes me wonder what flaws we'll see in python 3 once python 4 comes out
 
9:47 PM
that crazy broken behaviour with monads
 
DSM
By then typing everything will be mandatory and Python will just be a slower C#, so nobody will care.
 
oh are we doing python 2 funnies?
>>> [i for i in range(10)]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> i
9
I love that one
 
This comes up from time to time, but I think Guido basically said that if there will be a Python 4, it'll be for a really, really, really good reason
 
going back to old-style MRO would be a good enough reason for me
 
@KevinMGranger that was true for python 3 too
 
9:49 PM
@idjaw .
I don't even know the old-style MRO, what was it
 
@KevinMGranger That took me way too long to find that link
LOL
 
@AndrasDeak What I mean is their bar for entry is much higher than it was for 3
 
ah
py3 was "really good reason", then
it's two levels reallyer now
(sorry, natives)
 
class A:pass
class B(A):pass
class C(A):pass
class D(B,C):pass

# python 2: D, B, A, C, A
# python 3: D, B, C, A
 
I view it as "multiple pretty good reasons, with at least one really good reason" but not one big "it's really important that we break compat for this"
3 feels like it encourages mixin-style classes more than true multiple inheritance, which I think is a good thing. But if you used multiple inheritance heavily I can understand the annoyance there
 
9:52 PM
Perhaps the PSF will amble towards a commercial model, and they'll eventually break py 3 so that everyone pays for py 4.
 
I'm probably in the minority about this, but I think it's stupid how the new-style MRO in combination with super() can make you accidentally call functions you've never seen before
 
There's so many companies invested in python they'd either fork 3 or just force everyone to switch to go
 
class A:
    def f(self):
        print("I'm doing something useful")

class B(A):
    def f(self):
        super().f()

class C(A):
    def f(self):
        raise Oops

class D(B,C):pass

B().f() # works
D().f() # doesn't work
 
Whoa, that's not what I would have expected to happen
 
isn't that the "diamond problem"?
 
9:56 PM
"the" diamond problem? it's one of the problems of diamond inheritance, yes
 
I wouldn't expect something called super to give you anything that isn't above itself in the hierarchy
 
Jun 27 at 19:37, by idjaw
Andras is a physicist in a programmer costume
 
hahaha
 
Lessons learned here:
1. don't do multiple inheritance
2. computers were a mistake
 
speaking of which, being in the same ballpark is perfectly satisfactory for me :P
by which I mean "give or take 3 orders of magnitude"
 
9:58 PM
3. Andras is a physicist.
 
spoilers!
 
once upon a time I was going to go in to physics.
 
but then the Fire Nation attacked
 
we lost a lot of good people that day
 
Same but then I switched majors to Game Design and then didn't do that either
 
10:11 PM
yeah. I went to electrical....then hardware.....now I'm working as a software dev.
 
10:35 PM
rbrb all, time to go sit in traffic
 
rbrb
 
 
1 hour later…
11:43 PM
I always regret looking at new posts
 
don't we all
 
How... how did I not know about Construct
Basically the majority of the work I've done on my side project already exists
 
> Rule of Diversity: Distrust all claims for “one true way”.
 

« first day (2454 days earlier)      last day (2495 days later) »