« first day (4002 days earlier)      last day (949 days later) » 

1:03 AM
@duhaime this may help - from left margin navigate to files then click the drive icon, then google will automatically connect to drive content through an authentication. it autoruns a code like
from google.colab import drive
drive.mount('/content/drive')
 
To get familiar with asynchronous programming would one recommend practicing with trio instead of asyncio? As I've heard that asyncio is becoming more trio like anywau
 
1:36 AM
Yes, I mounted the drive but I'm looking to parse a Google Doc in the drive. I haven't done that before
@astralwolf have you tried RabbitMQ? It's super popular and aweseome
 
 
2 hours later…
3:21 AM
@Valentin Kuhn It throws same error when data = data.drop(index = ['R_1nUhvkmAMhd51ol', 'R_2VI751zjc4E71nf']) is used
 
 
3 hours later…
6:36 AM
how much extra memory does dynamic languages take because of being dynamic?
 
@WalidSiddik 15
 
15? what is that supposed to mean
 
They use 15 more memory
 
15% ?
 
7:17 AM
laurel. i think AD is basically saying the question is primarily pointless and/or impossible to determine in any sensible manner. (and if AD didn't say that, then i will) :P so yeah, just a random number is what you get
really should have been 42 though. grumbles
 
There's a riddle that goes
"What's the difference between and the crocodile?"
"Longer than green."
 
7:54 AM
I actually did a little research on it and found out it's 20 to 50 percent, random number got pretty close
 
whoever quoted you that number did exactly what we did, and then made it look pretty.
lots of people present complete yam as facts and get away with it on the internet.
 
different sources say different things
but the number is kinda that
 
don't believe everything you read. i mean, just think about it, i could easily make two implementations of the exact same language, without even any functional difference, and have two very different memory footprints.
 
it depends how the language is used
@ParitoshSingh true
 
then clearly it wasnt a function of static vs dynamic, was it
 
7:58 AM
I get that you aren't believing anything i'm saying
doesn't matter
 
how much memory does doing this specific task take in language A vs language B is somewhat reasonable. how much of that memory is caused due to static vs dynamic becomes.. not so reasonable. and then, generalise for all static vs dynamic languages... that's just not feasible. if anyone then gives you a number for that, all you need to do is realise that they're either just ignorant or lying to you.
its also possible you saw the first scenario "how much memory does doing this specific task take in language A vs language B" and mis-attributed it to the languages being static vs dynamic.
 
By that question I wanted a discussion about the extra memory dynamic languages take
I didn't read those paragraphs
 
yes, but do they? how do you even quantify that
What im saying is this: this isn't a question of belief. it's a question of logic, and the premise doesn't make sense. memory isn't something that is dictated by static vs dynamic, it's dictated by a lot of other much more relevant things.
 
I don't wanna continue the talk because i'm looking like a idiot
that also made me look idiot actually
Do they?
 
@astralwolf If you can afford using trio, I say go for it. asyncio will take a long while to reach the same level of having-you-do-the-right-thing-by-default. There's been a lot of delays for the planed ports from trio to asyncio, so we're probably talking several years until asyncio catches up.
 
8:07 AM
@WalidSiddik nah, i dont think it's fair to categorize someone's character based on one conversation, and constructive discussion is one of the best ways to demonstrate you're not an idiot, for that matter. i hope you don't take my words as insults, just trying to make an important distinction between "memory difference" and "memory difference specifically because of static vs dynamic"
 
RE Memory of dynamic languages: I would assume that is actually a pretty minimal overhead. What dynamic languages need extra are runtime representations of types, which are rather small and shared by lots of objects. Even compilation won't make that much of a difference, since dynamic languages can naturally re-use the same code-objects for many types; compiled languages tend to reify polymorphic functions for each type.
I'd rather put my money on explicit vs implicit (GC, ARC, …) memory management. Though there is probably the question just how well a single programmer can rival all the brain power poured into GC algorithms.
 
@ParitoshSingh no I didn't
 
yeah GC has a demonstrably huge memory footprint, especially if we're using size of shipped executables as a benchmark
 
Now days memory doesn't really matter actually, even phones have over 200GB storage
 
true, though it depends on where you're working or what you're doing
for example, microcontrollers still care a lot about memory, and so do websites (though not as much as they should lately... :/ oh well)
 
8:19 AM
I'm not sure if it will stay like that.
Memory is one of the main bottlenecks in all our current procurement due to chip shortage.
 
8:35 AM
@WalidSiddik 200 GB of storage has nothing to do with memory use. This is going from bad to worse.
 
i'll be honest, i've seen a gradual shift to more inefficiencies in things we do. it's almost like because computers are faster, theres more memory available, we allow poorer code to go through because "it doesnt matter that much"
 
@ParitoshSingh you mean a video game update shouldn't be 60 GB? Hmm :P
 
haha, you read my mind
i dont even know if it's a trend in general, but it feels that way. the game industry does present a strong case for it definitely being a thing
 
Of course that's again storage, not memory. But same energy.
 
aye, im not really focused on memory specifically when i say that, even performance seems to follow the same trend.
though to be fair, they (games*) have improved a lot graphically. but yeah, im sure we could achieve the same level of fidelity without having to ship assets that aren't even in use for example. that's just.. there's not even any gains there.
 
8:42 AM
something something demoscene youtube.com/watch?v=wqu_IpkOYBg
 
okay.. i have to admit, that was a pretty cool demo scene though. :P
 
Executable size: 177 kB
 
wait, for that? really?
oh wow, im reading the description now. that's mind boggling to me
 
9:07 AM
Of course this is optimized beyond recognition with procedurally generated everything. But there's a wiiiiide margin between that and the 60 GB updates. Even considering 15 years of advancements in technology. Source: none, just my rambling.
 
@AndrasDeak That's what I thought, but I wasn't sure what memory he was refering to and rereading the conversation storage memory instead of ram could have also been possible topic :P
 
@Hakaishin except the storage need of programs in general contexts is 0
if anything, Python's hello world takes up less disk space than C's
 
@AndrasDeak true, except on mobile, my mom always has to worry how many pictures she gets in whatsapp because she has an stone age phone with 16GB memory there storage of a program does kinda matter :D
 
yes, but that's not a general context
(and I also don't get why apps are so large)
 
haha true, also that farbrausch thing is amazing
cause each app needs 100MB boilerplate
 
9:12 AM
I wrote an app that's basically two buttons and very little logic, and it's 3.5 MB
 
basically we're "shipping" an entire bundle of abstraction for just about anything we do on top of it.
 
 
1 hour later…
10:47 AM
What is the largest int that I can convert to a float in Python 3 before I trigger an OverflowError?
 
262
Q: biggest integer that can be stored in a double

Franck FreiburgerWhat is the biggest "no-floating" integer that can be stored in an IEEE 754 double type without losing precision ?

 
that's not what they asked
 
sys.float_info.max should give you a ballpark number. There are still larger integers that fit into it with the maximum precision, though.
 
@AndrasDeak How's it different? O.o
 
hold on
 
10:53 AM
Huh, ok, it is different. Python doesn't quite trigger an OverflowError as soon as I expected it to...
 
yeah, but the accepted answer in your link tackles both
 
sys.float_info.max looks like what I am looking for!
 
>>> float(int(sys.float_info.max) + 10**291)
1.7976931348623157e+308
>>> float(int(sys.float_info.max) + 10**292)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: int too large to convert to float
That's... what.
 
what about it?
Isn't that due to machine epsilon things? The next number being 1e-16 relative error away.
 
@Aran-Fey Note that the first float is exactly equal to sys.float_info.max.
 
10:56 AM
Why is the threshold there and not at float_info.max?
@AndrasDeak Is that how it works? That's kinda awful
 
I don't really understand doubles, so mostly guessing here
but this smells a lot like that to me
if you add smaller values than the next representable float, you get back to where you started from, hence no overflow
(but, again, I could be wrong)
from itertools import count

for k in count():
    float(10**k)
    print(k)
physicist approach ^
now do a bisection search to find the first erroring int
 
import sys
print((sys.float_info.max + 10**291) == sys.float_info.max)
True
this officially hurts my brain.
 
really that's just the "largest exactly representable int" problem again
>>> float(2**53) == float(2**53 + 1)
True
but as you go bigger, the holes between numbers (in absolute terms) become larger
You might ask "Is floating-point math broken?". Yes, yes it is.
 
11:13 AM
sys.float_info.max + sys.float_info.max
Out[25]: inf
im..scared.
could someone explain this figure specifically? the approx 1.8 * 10^308?
 
11:25 AM
@AndrasDeak No wonder floats are confusing, I never heard about the normalized and denormalized forms, but it's a nice thing to know about
 
@AndrasDeak thanks! i had to re-read that a couple times, but all the information was right there
 
12:14 PM
reviews numpy code Still easier than floats…
 
Ugh, spending 2 days on implementing tests for a bug, just to find out that the bug is not in the tested piece of code but in the inputs, oh welp
 
12:29 PM
well, free tests!
 
why is the final line false?
 
Kinda, and I learned a bunch, so it's fine :) Also I just found the bug, if you know where to look things are easy :D
 
@astralwolf Why would it be True?
Math answer: Because isinstance is not transitive.
 
huh
it is transitive isnt it? or maybe i am completely off on what that word means
 
Isn't Painting an instance of ArtMeta, the same way Fresco is an instance of Painting?
 
12:34 PM
no
metaclass is not a parent class.
 
@ParitoshSingh I think only issubclass is transitive.
But perhaps I messed up the mantissa. D:
@astralwolf Fresco is not an instance of Painting.
It's a subtype/subclass/childclass/….
 
@MisterMiyagi i guess the word doesn't make sense to me in this context too much. but isinstance (z, X) is True if z is an instance of Y, and X is a parent of Y. what that means in terms of transitive or what not i have no idea.
 
@ParitoshSingh If isinstance were transitive then isinstance(A, B) and isinstance(B, C) would imply isinstance(A, C). I.e. the instance of a class would be also an instance of the class' metaclass.
 
@MisterMiyagi oops, yeah my bad. but what about Painting. Its not considered an instance of ArtMeta, but can't you instantiate a Painting class using Painting = ArtMeta(Painting, (), dict())?
 
@astralwolf Painting is an instance of ArtMeta.
 
12:42 PM
@MisterMiyagi oh! so two things just happened: i just learnt that isinstance does hold true for metaclasses to it's class... and well doh, that makes sense. and then 2nd, yes you're right, i suppose the whole subclassing and making an instance of that doesn't matter at all in this conversation.
Let's eliminate the middle-man shall we.
class artmeta(type):
    pass

class X(metaclass=artmeta):
    pass

z = X()

isinstance(z, X) # True
isinstance(z, artmeta) # False

isinstance(X, artmeta) # not relevant but good to know, True
 
Ooh, I walked in on an informative conversation. I never thought about the interaction of metaclass and isinstance before. The behavior is... I wouldn't say "intuitive", but perhaps "extrapolatable from simpler principles"
 
Well, it's kinda why we have metaclasses in the first place. :P
 
hai kevin! "extrapolatable from simpler principles".. i kinda like that :D
but yeah, i hadnt thought about the isinstance relation to a metaclass before this either
though i suppose, i haven't really spent any time thinking about metaclasses as such :P
 
I don't really know why we have metaclasses in the first place. When I read about them, I feel like I am in a deep sea vessel, and for just a moment I glimpse a tentacle the size of a school bus, and then it's gone
 
12:58 PM
i know one of the most sensible explanations for them.. but that was superceded by init_subclass so there's that... -_-
 
Seeing an example of a practical application is like seeing a news story about a giant whale that washed ashore, with scars in the shape of six foot diameter rings.
 
Metaclasses just sort of sneak in when classes are proper objects. *shrugs*
The nice part is that you can basically not care about them and things still work.
 
Things actually tend to work better the less you care about metaclasses
 
"Things actually tend to work better the less you care about metaclasses" Fixed it.
3
 
"Colossal squids are just sort of squids that are quite big" is true, and may even be a sensible framework for deducing the behavior of colossal squids, but it doesn't capture the gravitas
 
1:09 PM
don't worry, it's all a bit meta... (im sorry i couldn't resist)
 
 
2 hours later…
3:27 PM
I've nerd-sniped myself for a couple days by rediscovering my big box of K'nex from my childhood. I've made a semi-functional block and tackle system with a "fourfold purchase" layout.
It's a pretty neat physics demo to pull the twine down eight inches with half a pound of force, and watch the four pound payload rise by one inch.
I might be off by a factor of 2 there, but you get the idea
 
you have to have force*displacement be equal
that's work
so I think your original formula works too (as much as physics can work with imaginary units like "pounds" and "inches")
 
It seemed appropriate to use imaginary units since the system is made out of a toy made for eight year olds
I say the system is semi-functional, because if I let the load fall too quickly, all the twine comes unthreaded from its pulleys, and it's a pain in the butt to re-thread it. I think part of the problem is that the block attached to the load is lopsided.
 
@Kevin ...having spent time this morning teaching my 8yo metric and unity of length/area/volume units...no lol
 
In principle, the tension on all four pulleys should be equal, and so the axle they share should be horizontal. But the axle points up at a 20 degree angle, with the highest pulley being the one closest to where the end of the twine is fixed to a hook on the upper block
Or maybe "tension" is the wrong word for whatever quality is uneven here. I can twang the twine and they seem about equally taut, and the taut twines' twangs all vibrate with the same note
@toonarmycaptain Well, this morning I did think to myself "I'm way better at this than when I was eight" so perhaps I have a bit of an advantage
At first I thought that friction between the pulleys and the axle was to blame, but now I'm suspicious that the twine has too much elasticity for its own good
Ah, I dug out the instruction manual and it says it's for ages nine and up. So @toonarmycaptain you can expect your kid's unit-understanding brain lobe to kick into gear within the next year
Hopefully they'll also have a grip on irrational numbers because the rod pieces are all lengths proportional to powers of sqrt(2)
 
 
3 hours later…
6:25 PM
is slack down for yall guys?
this down :D
 
works for me
> Some users may be experiencing trouble connecting to Slack
Today at 9:30 AM PDT
> Incident
Some users may be experiencing trouble connecting to Slack

We are continuing to investigate the connection issue and will keep you posted as soon as we have more information available. We apologize for any disruption this has caused and thank you for your continued patience.

Sep 30, 8:17 PM GMT+2

We are still digging in to this connection issue and we will keep you up to date as more information becomes available. Thank you for your patience today.

Sep 30, 7:46 PM GMT+2

We continue to investigate this connection issue and we’ll continue to keep you posted as soon as we have
super informative
 
@AndrasDeak they killed their dns or something :D
or their dns servers stopped routing properly on the internet...
seems to depend on how stale the dns info is or something :'D
% host status.slack.com
;; connection timed out; no servers could be reached
:'D
 
6:43 PM
Hi Everyone
Recently I gave an answer, this: stackoverflow.com/a/69397316/8565438
It got immediately downvoted - is it due to someone being unreasonable, or is it really a bad answer?
 
@zabop I downvoted the question (now). Awful question. Why'd you want to answer a question that clearly has a typo instead of asking for a clarification in a comment?
 
I did that as well.
 
@zabop well, you did ask for a clarification... true now I saw it :P
 
asking for clarification and answering is always bad
 
just sayin' that there are enough bad questions and rep isn't everything. If question unclear, comment, maybe downvote, cv, then walk away.
 
6:48 PM
either the question is clear or it isn't
 
also the correct way would be to use ast.literal_eval in .apply or something like that.
just like cimbali says.
 
7:04 PM
@AndrasDeak someone has a fffuuuu moment :d
 
the only thing I understand on that link is that "did something quite interesting today" is probably a bit of an understatement
 
@AndrasDeak so they did add a digital signature there... then removed it... all servers that cached the signature will need to TTL out the signature before it will start working again :D
 
neat
What's the time scale for that?
 
10 hours? :P
or something :P
The slack.com DNSKEY shows up in the 12:55 analysis with a 1h TTL, before the com DS shows up with a 24h TTL. Do not throw away your DNSKEY until your delegation's TTL has absolutely positively surely expired from any caches!
:'D
@AndrasDeak so this is the mechanism how DNSSEC ensures you're not going to spoofed pages!
 
7:32 PM
so slack tried to spoof itself?
(inadvertently)
or I guess succeeded
 
so it announced before that "we'll sign all our dns records"
then they stopped that...
 
8:16 PM
On a somewhat related note: Invalid certificate on all SE sites
 

« first day (4002 days earlier)      last day (949 days later) »