« first day (3048 days earlier)      last day (2125 days later) » 
00:00 - 21:0021:00 - 00:00

21:00
@piRSquared I've probably done the same too...but I make it a point to not do this now unless I know the person I'm responding to actually understands what to do in the production case.
Yeah, I no longer offer advice on how to use eval
@Kevin Toolmakers are generally indemnified against the use of those tools from what I know, with firearms manufacturers given special protections. (Like "safe harbour" protections for online sites that index/aggregate or host user content.) E.g. you can only sue a hammer maker if the hammer is faulty, causing injury, not if you go around town smacking people in the head with it. (There is no reasonable precaution they could have taken to prevent that misuse.) AFIK.
@piRSquared lol, exactly.
At least let's establish that "I hope my invention isn't used to do bad things" doesn't indemnify you any more than if you had said nothing.
But, hmm, counterexample: laser pointers labeled with "do not point at airplanes".
Se so. However there are good chunks of leagalese to waive liability, esp. in software cases which tend to also waive merchantability or fitness for a particular purpose. ;P If a hammer came with a clause like that, I'd be worried!
Now I'm quite curious if those fitness clauses have ever been tested in court.
21:11
completely out of the topic at hand here, but I really hate pandas' keyword how for dropna and the set of possible values being 'all' and 'any'.
and just the how keyword in general
also the monospace font on SO chat is not distinguishable enough from text.
@AlexanderReynolds Heh, I userstyle (via Cascadea under Safari) and override all pre, tt, code, etc. to use Hasklig. Also to redefine tabs as 4-character universally. Long ago I gave up on any hope of web developers doing those elements justice. XP
^ + dark mode wherever I possibly can. Wake up three monitors first thing in the morning and boy howdy are the photons too loud if I have any un-customized sites up.
ah I remember looking at hasklig before.
My main fixed-width font is Monofur (patched for Powerline symbols). I just wish I could get a copy patched for ligatures, or I'd still be using it. (It's the Comic Sans of fixed-width fonts; especially useful for dyslexics.) T_T
ligs are less useful in Python IMO, so I actually get annoyed with some of these...if I was actually writing in a language where there's tons of symbols I can see it being helpful. I think it looks nice I'm just not used to it. and some things in particular really annoy me. (triple equals turning into ≡ drives me up a f*cking wall)
21:21
Heh, I like the triple equals symbol. T_T Of course, in my Python code, the #1 use is for return value annotations. (#2 being comparison operators.) ;^P
yea the arrows are sweet.
call me old school but I prefer ascii in my source
3
I dislike the triple equals because ≡ means "is congruent" or "in the same equality class" or something along the lines of "is equal in value but maybe not exactly equal" in mathematics while in JS === does not at all mean that
same @AndrasDeak
That's the true glory of ligatures. It is ASCII… with a compound glyph representation for human eyes.
It means quite the opposite, where == is more similar to ≡ mathematically, and === is more similar to = mathematically.
21:24
@amcgregor my human eyes prefer ascii
I kind of figured that having a unicode arrow in a type annotation would break the parser...
def 📢(✉️):
    print(✉️)

📢("✋ 🌏")
ew, take that swift away
@amcgregor four spaces or ctrl+k...
have we pointed you to the illustrated formatting guide yet?
Nope, just the FAQ, which was TL;DR. ;^P
but it's even longer than the faq I'm afraid :P
21:27
Merci!
Well, notably, the FAQ was DR due to the brevity of the "how do I format" answer and lack of follow-up resources linked there. ;^P
yeah, chat has always been a bit of an orphan
@AndrasDeak Not… tabs? >:3
@amcgregor good god
@amcgregor never!
:prepares her heathen tab-based derrière for the banhanmer: >:D
21:34
I ain't gonna read no tabbist pamphlets
"tabbist" lol
From one of the times indentation came up on CodingHorror, this napkin calculation on the kWh cost of space-based indentation. Won't you think of the carbon impact?
nice example of Fermi estimation
> (And seriously, if your editor can't display tabs with your preference of spaces then your editor sucks. I don't care how l33t it makes you. Tabs FTW)
the cat's out of the bag; it's the emacs mafia again!
There's another efficiency aspect to code I enjoyed examining. Keyboard layout. Use a heat map tool, dump all of your open source code into it, see what comes out. Turns out Colemak was very nearly perfectly optimum for my code. I has weird typing biases.
How does that compare to, say, Ulysses?
21:48
clearly youre not a gamer :P
no WASD emphasis detected
@ParitoshSingh Layer 2, toggle on bottom right-most key switches to QWERTY explicitly for gaming. Also rotates the modifier keys, since Control is crouch in most of my games, making crouch-jumping easier (thumb roll-off).
oh, interesting.
@ParitoshSingh if you're a gamer does "wasd" just happen to appear in your open source code more often? :P
yep, muscle memory, and accidental alt tabs when youre supposed to be coding but are actually playing something. :P
The "finger rap" for QWERTY is asdf. So mundane. The finger rap for Colemak is arst. Sounding rude is certainly a good start, I feel!
21:53
its mundaneness is a bit ironic
(Colemak only moves, I believe, 9 keys around. The vast majority of important shortcuts are unmodified, so as to maximize muscle-memory re-use.)
huh, that's good to know
zxcvb, a, qw, being the left-hand left-most unmodified shortcuts, for example. ^_^
Soooo would it be bad to do something like for i in range(61^32): do something?
aha
@HunterGuimont no
>>> 61^32
29
21:55
thats supposed to be 61 to the power of 32
well it isn't ;)
thats what i meant
what is ^ in python then?
binary XOR
61**32?
so would it be bad to do what i was trying to do?
21:56
contextual disambiguity FTW
@HunterGuimont depends on what you mean by "bad"
python will handle it just fine with no issues, but anything nontrivial in the loop will take forever*
(*not actually forever)
== 1350687001332003958728623852374735172807518011483204347521 — if I haven't declared my love for Python's transparent bignum support today, I frickin' love transparent bignum support.
i mean thats 1.350687e+57 loops
@HunterGuimont indeed
okay okay well thats impressive
note that at this range you lose double precision:
>>> float(61 ** 32) == 61 ** 32
False
21:57
It does start to chug with numbers > 2**30**20 or so. ;^P
so make sure you're using ints ;)
It will not end. You should write something in the will, should you wish any living entities to benefit in the far, far, far future, if our predictions for the heat death are incorrect
im confused
basically im just trying to make a verifyer for a randomized salt so i dont have to store them
just use an infinite loop
21:59
Sounds like how deep thought was made.
but if all fail i want to go back
and before you ask how to do that: read a good tutorial or just google it
@HunterGuimont Salts are stored alongside the hashes. This is a) intentional, and b) perfectly OK as long as every record uses a unique salt; that's the purpose of it (so two users with the same password != same hash), not to provide a "secret key".
for i in 61**32:
    sleep(5)
print(42)
22:00
@ParitoshSingh int object is not iterable
Gosh Darn it!
for i in range(62**32)
for i in range(61**32):  # xrange on Python 2, if you value your sanity
    sleep(5)
print(42)
This is why we never found out the question
22:01
(also, apologies)
@ParitoshSingh we never found out the question because the program was written in java and took too long to start up
@amcgregor sanity or RAM?
Just like 60% of the systems everyone uses these days.
The latter, to prevent degradation of the former via fruitless investigation after some very, very long waits. ;^P
ps. thats a part of the 80% of all statistics on the internet that are made up.
22:03
@ParitoshSingh 40% of the time it works every time
haha, i know right! :P
:insert angry panther sounds here:
Hey ummm is doing for i in range(61**32) plausible? Either i messed up or it takes foreeveerr which makes sense too hhaa
tudum, tudum, tudum tudum tudum tudum tudummmm....tudududumm
@HunterGuimont No, it is not plausible
22:04
@HunterGuimont have you read anything we wrote?
not really
tbh
@HunterGuimont On Python 2 range() attempts to construct a list of the requested elements. On Python 3, it's smart and uses a generator. On Python 2, to get the generator benefit, use xrange() instead.
@HunterGuimont then come back when you're open to answers to your questions
@amcgregor don't waste your breath
sorry its not that
would 61**16 be more plausible?
or 8
also, python 3. embrace the future!
or the present..
22:06
thats just the length of the salt
or the nearby past.
im using python 3
@HunterGuimont go figure it out
we've answered your question, what you make of it is up to you
22:06
@HunterGuimont to be totally clear...no. this is not what your for loop should be doing.
we also can't debug code we can't see but at this point I don't want to see it
@ParitoshSingh For the last 5 years or so, the ##python-friendly topic has stated: Python 2 or 3? You've had 10 years… go with 3 unless you have special requirements. (or equivalent) Originally read as "unless you have special needs", but I quickly realized my mistake. :P
so much for friendly :P
@HunterGuimont 61**16 is 36751693856637464631913392961. If the code inside the for loop took a single nano second to run, then this code takes 3.6751693856637465e+19 seconds to run. That's 1165388567244 years.
22:09
let them figure it out
I do as I please :P
me too
if you insist on enabling a help vampire I'll eventually have to resort to moderating you to ensure the sanity of the locals
web archive to the rescue
do you think the user would mind waiting 1165388567244 years. XD
they would
22:12
ask a ui designer
#notmyjob
lol
maybe i should make the salt less random
Please stop thinking out loud. If there is specific help you need, we can help, but are only willing to do so if you're ready to listen and learn. We won't waste our time. Please read the linked guide to know what behaviour you should avoid going forward.
def some_count():
    for x in range(1000):
        pass

%timeit some_count()
31.3 µs ± 55.9 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)

# Some calcs
milliseconds = 31.3 / 1000
seconds = milliseconds / 1000
total_seconds = seconds * (61 ** 32)

years = ((((total_seconds / 60) / 60) / 24) / 365.25)
That shows you how you could test this yourself.
Actually, poop, I was out by a factor of 1000 because I did more than a single loop to try stabilise it. That's gonna have a big impact on the 1.3396615440239983e+45 years to run the calculations
pro-tip: timing = %timeit -o your_function()
@HunterGuimont No! It should be as random as your system can give you. If you insist on doing this stuff yourself, please read the Wiki links I gave you earlier so that you understand all the principles involved. Otherwise, you will mess it up, and create a system that's more complicated than it needs to be, but less secure than what you think it is.
22:16
Oh man, that's an option with the IPython magic method?
no, I just made that up
(it is :P)
:) I tried assignment and obviously got None. This was the only time I've wanted units for something other than to just see a result so I didn't check the docs. Thanks for that mate
no worries
Actually, if I'm not mistaken, the calculation time will come down to e42 years. Spooky...
Thats just wicked
22:24
Incidentally I had to calculate a few days ago that the time it takes for all the molecules to spontaneously end up in one half of a 2x(10 nm)^3 container is around a day (rough estimation). For a container double the size (with the same atmospheric density) that's 1e12 years. For a container of (1 mm)^3 it's ballpark something like 10^(10^17) years
We can still hope to pass through walls on a regular basis, though, right?
hope never dies
I swear when I was at school, the principle that a coin might spontaneously leap up from a table was massively oversold in Physics class
it probably was
@roganjosh If protons decay, 10**41 years is about the longest possible proton mean lifetime. And if that's the case, the Black Hole Era starts in around 3*10**43 years. See en.m.wikipedia.org/wiki/Timeline_of_the_far_future
22:31
@PM2Ring huh, so it might be complete before the heat death? Is there some theoretical point then that you might be able to throw something into a black hole to keep it together? (like, a totally abstract thought experiment, but a computer might exist as is does now on my desk but only in a black hole)
@AndrasDeak Ha. That kind of thing has been a topic in the h Bar recently. One of the younger members is having problems getting his head around just how unlikely these kinds of apparent entropy violations are.
it's a bit mind-boggling
I was surprised that moving from 50 atoms to 100 atoms in my nanoscale example the time jumped from 10 hours to 10^12 years. The exponential function is a formidable beast.
I think I'm falling down the same path of mixing entropy and gravity
My God, what did Is start hahaha
in The h Bar on The Stack Exchange Network Chat, Feb 3 at 18:05, by PM 2Ring
Let's expand the coin tossing experiment to 320 coins. 2^10 is a little over 10^3, so 2^320 is around 10^96. The universe is just under 14 billion years old, and there's about 31 million seconds in a year. There's around 10^80 protons in the observable universe, so let's pretend we can flip each proton like a coin, 320 times per second. We'd expect a single run of 320 heads by now.
@roganjosh I'm not sure how you can use a BH as a computer, or even as a data storage device. Allegedly, it doesn't actually lose any quantum information, but it doesn't make it easy to actually read it back / decode it. Retrieving the data from the smoke, ash, and energy spectrum of a burnt book is much simpler, by comparison.
22:42
@PM2Ring Sorry, I phrased by question as a non-physicist. I was thinking more about how the heat death is an ever increasing dispersion of elements. Such that one day, the black hole might "crush" an object to the same level of gravity that I experience now on Earth. But I'm mixing two concepts. I don't think the question could make sense, because entropy and gravity are, in this sense (I think) correlated, but on different paths
my understanding of black holes is that they crush everything way more than what you experience
The black hole will evaporate to very low gravity, but injecting an object from our current era into the situation could not be reasoned about.
I don't think "era"s matter beyond "baryonic matter"
Well, black holes are the limit as far as gravity goes, and they also have the maximum entropy. See en.wikipedia.org/wiki/Bekenstein_bound
I'm mixing the concepts of the bonds that hold the material of my computer together and gravity. They are different forces. It was a silly question I think, now I reason about it more.
22:49
fun fact: the one that holds your computer together is electromagnetic force, waaaaay stronger than gravity :)
that's also what keeps you from falling through other stuff
Yeah, I suspended my chemical engineering knowledge it seems when I conducted what was supposed to be a thought experiment that ended foolishly :P
right, I forgot
There's a Physics SE question that asks how big a hydrogen atom would be if it were held together by gravity instead of EM. IIRC, it's roughly the size of the observable universe.
But it does raise the reverse situation in my mind. The heat death relies on proton decay to break these bonds?
no
heat death is inevitable
just...utter thermal equilibrium (boo!)
22:53
that reminds me of some theory i think it would be called, that what we see and measure as gravity is only the consequence of the real gravity force being filtered down by something we dont yet understand
just because its so out of proportion compared to other forces
at least I think what is ambiguous is what will be at equilibrium
pet peeve of the day: waking up in the morning and realising you only have enough cereal to fill half your bowl
@coldspeed oooh that's bad
and you can only be angry at yourself which makes it worse
That Wiki timeline article gives times for heat death with various proton decay timelines, and with no proton decay.
pet peeve: waking up in the morning.... and...thats it. yeah.
22:54
yeah :( had to go to the nearest ralphs and get more
@ParitoshSingh one major explanation is multiple dimensions
some versions wonkier than others
@PM2Ring But what Andras appears to be saying is that we don't know the driver for breaking, say, the ionic bonds specifically in my table salt?
Unless I'm misunderstanding
we still havent confirmed multiple dimensions so to speak right?
only that the "possibility" of them looks solid mathematically and whatnot
@roganjosh gravity will do that if a blob is large enough
heck, in neutron stars you see atoms and nuclei breaking down
@ParitoshSingh neither confirmed nor denied
22:56
But they no-longer exist once we get down to just black holes?
this is the convenient realm of string theory where experimental evidence is a few decades or a dozen down the line ;)
We continually run out of drivers for breaking these bonds
@roganjosh I don't think we know what's inside black holes
i see i see.
but IANAA
22:59
Are 16 digit binary okay to use as salt?
Good job I only have that for loop to worry about when all this is happening :P I'll stick with engineering and my production schedules for the next year
Or 32 even
@HunterGuimont There are libraries that do all this for you. One line of code. What application are you trying to build?
I'd rather do it myself than use a library
Then you will be hacked
23:01
Also because I'm just doing this for myself
It's not going to be public rly
@roganjosh not the first time we've told them
2 days ago, by Andras Deak
1 min ago, by Andras Deak
the very little I know about crypto goes "don't roll your own"
Yes yes ik
Fair enough
But somebody did at one point... And I'd like to learn too
one "middle ground" so to speak
take those libraries, dig in through their code
23:03
One testable prediction of the various supersymetry theories is that protons have a finite half-life, and different "flavours" of these theories predict different values for that half-life. All of those values are far greater than the current age of the universe, but if you observe a large enough sample of hydrogen atoms you should see a few decays over the span of a few years. Experiments have virtually ruled out all but the longest half-life predictions.
you learn more by looking at other peoples' code than writing your own. If you want to learn how to do it, that's a different story
develop the background information necessary to vet their choices and make decisions
@HunterGuimont that's fine. There's one guy I know why likes crypto here but AFAIK nobody is an expert and you're asking fundamental questions that you need to be researching yourself
I was gonna look through passlib but I was in a rush and I didn't know where the specific code was
Okay
you won't learn anything if you're "in a rush to learn"
23:05
^ my thoughts exactly
Then that basically sums it up. Either you want to learn this properly and dedicate the time or you go with an existing solution
using us as a shortcut to learning will leave you stranded
No no, I was gonna look later I just had to go somewhere
And some info is hard to find or not readily available so I asked because you guys are much more experienced
Get your hands dirty. the earlier the better.
@HunterGuimont for what you're asking, I don't think I'm alone in saying our experience is collectively saying "don't do this". The people inventing these algorithms are seriously few and far between and even they get pushed to the kerb once they get broken
23:10
there's no harm in trying to learn how they all work but whoever is responsible and curious enough should likely be able to find resources online
This is true too I guess
for someone lazy there's a high chance that it goes "I'm curious" -> "I want to learn" -> "I want to do it myself using stdlib" -> "I just hacked this together" -> "[6 months later] Oh hey I did this for fun 6 months ago, let me grab these few lines"
hey, using something you wrote before isn't lazy
I never said it was
ugh, why do people insist on sending documents to fill, in pdfs? :(
23:14
because they hate you ;)
srsly how hard are forms tho
i dont want to have to go through 50 loopholes just to be able to edit it, or print and write and scan again
only to be printed and shredded afterward
@ThiefMaster With this what would be the course of action? I see Deprecate werkzeug.contrib.cache. I can reliably reproduce the error on my production server with AJAX requests every 2 secs to a route needing a login. I can try make an MCVE but is it even worth it if you're deprecating? This is a real and server-crashing error with an easy fix.
To my knowledge, flask-session is still the most current 3rd party app, and so this error will persist
Sorry, I should say that I fixed it in werkzeug, not flask-session, which is what is confusing me on how to go forward
23:39
@HunterGuimont I get that. But don't expect to learn this stuff overnight. Crypto is a big field. Even if you just focus on the current best practice for password hashing there's a fair bit to learn & understand. You don't need to fully understand the maths underlying all the algorithms, but you do need to understand the principles involved.
Those Wiki articles I linked aren't small, and they aren't particularly easy to read, but they are a lot easier than reading the original computer science papers. At the least, you need to understand the articles on cryptographic hash functions & salts, HMAC, key derivation and stretching, as well as some specific key derivation schemes like PBKDF2, bcrypt & scrypt.
23:50
On the topic of even professional security experts mucking up crypto, a classic example is WEP, the first WiFi security protocol.
00:00 - 21:0021:00 - 00:00

« first day (3048 days earlier)      last day (2125 days later) »