« first day (2581 days earlier)      last day (2559 days later) » 

22:00
@Mr.Xcoder error
Render the float's decimal representation in Comic Sans at 14pt and return the width in pixels
3
@MartinEnder /shudder
@MartinEnder I don't have enough underscores to express my disapproval with :P
@Mr.Xcoder Depends. What does it do when given an int?
@DLosc It returns the number of digits.
I thought about returning the number of decimals for a float.
22:10
Maybe length on numeric types should return the type's sizeof?
Or maybe just the whole length excluding the .
@Mr.Xcoder length of it stringified. As to not break on integers converted to floats
@Mr.Xcoder What does it do for negative integers?
@DLosc The number of digits of its absolute value.
Ah, okay. Then as a user, I think I'd expect it to give the number of integer digits--i.e. len(float) === len(int(float))
So basically an integer base-10 logarithm.
22:14
Hm, that works too. Thanks
I implemented it as len(str(abs(int(item)))) :P
that's gross
Do it better then :)
16 mins ago, by Poke
@Mr.Xcoder error
raise TypeError("Incompatible Types") might be a better choice :P
math.ceil(math.log10(item))
22:17
i would also have it error for an int
Oh no I don't have math imported and am not planning to use it.
@Poke Nah, for integers I'll keep it that way. For floats, I made it error now.
🤢
@Mr.Xcoder is this golf?
No, it's language development :P
then why on earth would you opt for a version that's so much slower
math.ceil(math.log10(...)) is basically the definition of how many digits a number has
22:20
Another corner case: 0
Why on earth would I ever import math? Anyway, I don't use that anymore
because math has math.sqrt
No... There's ** (0.5) for that
Wait I have math imported >_>
For trig
Dammit ;-;
22:21
I would hope
@Mr.Xcoder don't do this
Why exactly?
I would also like to know
readability
Is there a performance difference, too? I would think that math.sqrt might take advantage of a specialized square root algorithm that **, being more generalized, can't.
22:23
Nope.
@Mr.Xcoder citation pls
what's wrong with math
It's... heavy.
@Mr.Xcoder how does this prove performance
22:24
But I use it anyway so...
If the arguments are both integers, and so is the result, is the result guaranteed to be an integer in IEEE floating-point when all three can be represented in the number type?
Just a sec
@Mr.Xcoder just import only some of it then
python has that ability
I know...
Actually, you are right.
@Mr.Xcoder uh, idk about that
1.7088023014366626e-07 > 2.276967279613018e-08
22:27
it's consistently that too
but the performance doesn't matter
not for something that tiny
what matters is that **(0.5) looks like line noise
We're literally talking about 10 ^ (-8)... It doesn't matter
i think the import math might be slowing it down though
@DestructibleLemon no that's not included in the time
I'll use math.sqrt
@quartata yeah ok. weird that it would be slower
22:29
function call
python's bad at them
@Mr.Xcoder Yeah, it's the other way around. I just ran a benchmark and got ~10 secs for a bunch of runs of ** 0.5, versus ~34 secs for math.sqrt.
ok not gonna use math.sqrt then
So... Now I am confused
this confirms that i do not need to change my ** .5s
I'll just use ** (1 / 2) instead :)
22:30
I think quartata's right. Function call overhead.
@DestructibleLemon the behavior @DLosc is describing is over millions of iterations
@Mr.Xcoder that will for sure be slower, python doesn't do much constant folding
Too bad Python doesn't have macros like C. It could just statically rewrite math.sqrt(x) to (x)**0.5 and we could all be happy.
pypy and cython probably do that
Ok I'm going to step out of this discussion about infinitesimally small performance differences for taking the sqrt :P
@quartata but rationalisation!!!!
i already wrote the thing
22:32
100 million iterations, to be precise.
makes sense
10/10^(-7)
@Mr.Xcoder TNB: Much Ado About (Next To) Nothing
I suspect that that changed in recent Python
because ** normally really does use pow which will always be slower than dedicated sqrt
plus it has a bit of overloading from what I see
@EriktheOutgolfer Here are his last moments, immortalized. – He ain't dying :P
22:36
it's the moments that are immortalized :)
Yeah but his last moments :)
> his last moments as a moderator
lol what were you thinking
You changed that after I commented – Nah, it doesn't work that way :)
I don't say it does, but it's easy to understand what I really mean
I know but...
Everyone's talking about me like I'm dying or something. The only difference is that I won't have a diamond. — Alex A. ♦ 2 hours ago
22:40
ah, thanks for mentioning it then, he would have thought I too thought he was dying o_o
@Mr.Xcoder I've had this exact experience when leaving an online community. It's interesting how human psychology works. If you never see someone anymore, it really is as if they're dead. (Or in Alex's case, he's only mostly dead.)
I've left many online communities so far, one of which I was kind-of a mod on, so I know the experience :) But I didn't quite like that place anymore
-1
Q: Find the dot product of Rationals

Wheat WizardI was at a friends house for dinner and they suggested the idea of a "Prime-factor vector space". In this space a the natural numbers are expressed as a infinitely dimensional vector such that the nth element in the vector is the number of times the nth prime divides the number. For example 20 ...

@DLosc Yeah, but we won't never see him anymore. In fact, we'll probably see him just about as much as we currently do.
22:47
Sure. He's been mostly dead for a while--now it's just official. ^_^
My brain can't process that many negations in a single sentence this late :|
It's only a little double negative, what's the problem? :D
The problem is hanging around in TNB at about 1 AM :p
I can confidently not say, that the statement: "It isn't not true that we won't never see him anymore" is false.
@Mr.Xcoder
You flaked my brain completely.
22:56
@DJMcMayhem I mean, sure, I imagine you can confidently not say many things. I can confidently not say that the earth is round. But I can also confidently say that the earth is round. Not saying stuff is easy, and fairly easy to do confidently.
Hmm, maybe I should have said "Can't confidently say"
my school system doesn't allow me to access it because it says i'm not a registered user every now and then >:(
@DJMcMayhem Do I smell confusion? D:D
I submitted the wrong thing and want to substitute it with the right thing but i'm not a registered user all of a sudden so i can't and there isn't anywhere to enter a password because it is that useless
also i think i forgot what my password was because they had that change password thing happen
>:(
oh and they have those bullshit security questions i don't remember the exact phrasing to
thanks school
the only thing i remember about my password is they had that bullshit please include 1 number thing
Every time my uni asks me to change my password, I increment the number I used for the last one and hash it. I'm almost up to 10.
23:10
@Οurous So your password is a hash? Do you memorize it?
@DLosc why would he memorize it if it's easily calculated
i imagine he uses a hash function and is using such an insecure password out of spite?
yeah anyway thanks school
i hate security questions so much
@DestructibleLemon or so he can easily remember the base o.O
@DestructibleLemon because they're basically just additional passwords that people pick easy to remember answers for?
@DLosc Chrome does. I know the algorithm and the number so I don't need to.
@Poke no because i have to fuckign remember the exact phrasing on something i only use if i forget the password, which i only tend to do if i haven't used the system to input my password in a while, and they're all invariably targeted toward 20 something year olds or some shit even in a school system or something and never apply to me in anyway so its almost always some variation of: this security question does not apply which i can never remember exactly how i answered it
23:16
@DestructibleLemon i generate random strings for security question answers and save them alongside my password in my password manager
because they don't really provide additional layers of security
liek what was the colour of your first car
The color of my first car is qbsyvcAE8xBs@T3$0ZT*1rz&v7!Ge83g3hnxjRgKU9
2
ez
i prefer when they just email you a reset link
which i guess is bad if your email is compromised, but any security question easy enough for me to remember probably isn't secure either
like the only time i ever typed in my new password was when i set it the first time so like how the frick am i supposed to remember it
i fucking hate it when there are password length limits too. like those have never helped me remember a password, they only make it harder
just use a password manager
and all your worries melt away
like, i know what i tried to make my password, but what did i make it after the arbitrary restrictions
@Poke either way its a bit late for that now
23:20
maybe for this iteration of forgetting
@Poke good luck telling this to the customer support guy over the phone
but now is as good a time as any to start using one
@Downgoat yeah 42 is a little long. for security questions i usually limit it to like 18
@Downgoat why do they store the security questions plaintext >:(
@DestructibleLemon because they don't understand how security works
@Poke stupid thing
23:22
get used to it
you'll be facepalming for the rest of your career if you're in anything involving security
when I installed windows 10 (for only a couple minutes) when I got this laptop
it asked for a mandatory password hint
i feel like if they had a better system for security questions, like, where i can actually tell what my answer would have been, it might be tolerable
I gave it the hint "no"
I think my hint is "i like elks"
haha
tbf that password hint has helped me more than security questions ever would
like
the only person who is going to be able to change my password account now isn't me
23:30
@DJMcMayhem Kinda done :).
It's not exactly a User appreciation challenge, but still.
2
Q: There are two new sherifs in town – Identifying DJMcMego pairs!

Mr. XcoderWe have some new sherifs moderators in town, Mego and DJMcMayhem. We need a challenge to properly honour them for their new positions, so there we go. Here's something that has caught my attention when hovering over their profiles – their user IDs are 31716 and 45941. If you perform digit-wise...

23:55
A sherif is a highborn. Do you mean sheriff? — Dennis ♦ 1 min ago
@Dennis Yes, thank you! That’s the worst typo I’ve ever made!
Not a big deal.
I have a coworker named Pedro. I'm not very good at typing on a touchscreen, so I wrote Hola Pedo. as a reply to his WhatsApp message. Pedo is Spanish for fart.
That’s even worse, you made me feel better :-)
I have to go get some sleep now. Hopefully there isn’t anything unclear...
@Dennis It has even worse connotations in English...

« first day (2581 days earlier)      last day (2559 days later) »