« first day (2156 days earlier)      last day (2983 days later) » 

23:00
it took 700 MB before I ctrl-c'ed it
def b(o):
   import time
   t = 0
   while True:
     print(id(o))
     try:
       o.__call__
     except AttributeError:
       return t
     o = o.__call__
     t += 1
     time.sleep(0.25)
shows that the ids of __call__ aren't the same
literally infx objects in python functions
what the heck are you guys doign?
@noɥʇʎPʎzɐɹC What is the self attribute in functions in the global scope?
@flawr I just showed that all python functions have a __call__ attr and they themselves are functions
@Downgoat in global scope?
so python functions == objects?
23:05
@Downgoat self is just a name - you can call it potato, the system just does class.member_function(instance, arg1, arg2) when you do instance.member_function(arg1, arg2)
@Maltysen yes
@Downgoat normal functions outside of a class shouldn't have self attribute
PyObject*s are initalized with (PyObject *self, PyObject *args)
@flawr python everything == objects
23:06
@Downgoat It's just a normal argument, self is just the standard
@Downgoat that means (Class *self, PyObject *args)
@noɥʇʎPʎzɐɹC also is there a way to get all the keys of a python object. Like even the hidden ones (like __foo__)
@Downgoat dir
that returns dictionary no?
Actually that might work
@Downgoat no
sweet thanks
23:11
import time
o=int
while 1:print(id(o));o=o.__call__;time.sleep(0.001)
@Downgoat anyways, doing list() on a dict returns its keys
for a counter in python
what attribute is an integer's value stored in?
@Downgoat there is no way, attributes can be dynamically returned
@Downgoat what do you mean by value?
23:13
like I could make an object that returns "pizza" for all attributes
@Downgoat int is implemented in c, so there is none
@noɥʇʎPʎzɐɹC yes, but dir returns the ones registerd with __getattr__
Hm okay
can you give me a list of all primitive classes?
@Maltysen you mean __dict__
@Downgoat primitive classes?
@noɥʇʎPʎzɐɹC i meant __getattribute__
@noɥʇʎPʎzɐɹC okay, another question: Is there a way to get { k: v } dictionary of an object?
I tried dict(foo) but that returns error if foo is not iterable
23:16
@Downgoat .__dict__
@Downgoat type is the only object with a special property, which is it being it's own type
@Downgoat .__dict__
doesn't work for dynamic attrs though
@noɥʇʎPʎzɐɹC like classes which have their values as C++ items
e.g. int, string probably
@Downgoat there are tons
@Downgoat {y: x.__getattribute__(y) for y in dir(x)} works in Python 3.
@Downgoat you might just want the builtin types
23:18
(I may have taken you too literally.)
@Maltysen yes those ones
@Downgoat note that a lot of theses aren't "primitive" in the sense you meant
e.g. range
some of those are implemented in python, not c
There are a few objects with the special property of not being able to inherit off of them, for edge cases such as bool
also for singletons, like ...
...I'd honestly forgotten that ... are a thing in Python 3.
>>> print(...)
Ellipsis
I don't know/remember what they're used for.
@El'endiaStarman I love using it instead of pass
23:26
@El'endiaStarman Nothing, can be used for AST rewriting magic or placeholders
@TuxCopter it was intended for numpy slicing
Well, in vanilla Python it do nothing
@El'endiaStarman waaat
Welp SVG arcs are weird
Is numpy written in python or c++?
23:34
C++ probably definitively, because performance and strict typing of numpy
23:51
ಠ_ಠ I made an handmade SVG, I edited it in Inkscape to modify a path, now the file is totally messed up
Yeah, numpy is definitely not written in Python.
It's meant to be super fast at stuff like array manipulation.
The ultimatum game is a game in economic experiments. The first player (the proposer) receives a sum of money and proposes how to divide the sum between the proposer and the other player. The second player (the responder) chooses to either accept or reject this proposal. If the second player accepts, the money is split according to the proposal. If the second player rejects, neither player receives any money. The game is typically played only once so that reciprocation is not an issue. == Equilibrium analysis == For illustration, we will suppose there is a smallest division of the good available...
@El'endiaStarman list slicing
and .pyi files, and for elegance, ... can be valid python code
Kavka's toxin puzzle is a thought experiment about the possibility of forming an intention to perform an act which, following from reason, is an action one would not actually perform. It was presented by moral and political philosopher Gregory S. Kavka in "The Toxin Puzzle" (1983), and grew out of his work in deterrence theory and mutual assured destruction. Kavka is also well known for his Paradox of Future Individuals, which addresses our moral obligation to future persons to plan for the future now. His slave child example also displays the deontological concept that holds humans as "beyond...

« first day (2156 days earlier)      last day (2983 days later) »