PyCon 2014

Cómo convertir un aplicación Python en un archivo EXE ejecutable

Brandon Rhodes  · 


Extracto de la transcripción automática del vídeo realizada por YouTube.

well welcome to the beginning of the end I see that that that uh the river are all tired I'm not saying you look tired I'm just saying that I can tell because I know you so well and we're almost near the end and you've hung in there this talk

some lightning talks and we will all be done I'm Brandon Rhodes and I'm here to announce that the day of the exe is upon us old von Neumann dr. von Neumann he threw us a real curveball it used to be you knew what your computer would do you when you

switched it on because before powering it up you disconnected and reconnected a bunch of wires to set up what computation the computer would do when you turned on and it was von Neumann that catapulted us into the computing age by suggesting that instead of

having to set the computer up for a specific calculation you could just have a general-purpose machine called it that read instructions right out of memory just like computers had already been reading data the swept to the world so that by the time I grew

up and learned machine language on the little colored computers to that my dad bought a hex 86 sitting in memory what is it what does it mean what is that by going to do it depended it depended on whether you told the processor that it should run that as an

instruction that it is a command it should obey or whether you simply treat it treated it as data but it looked exactly the same either way so if I saw 86 86 sitting in memory it could mean the instruction load a value into register a and here's the number

134 x86 that you are to load instruction and data scattered together in memory and you and tell the difference you can't tell just by looking at it you can guess but you don't know what's supposed to be code and what's supposed to be data some

called dr. Von Neumanns idea ambiguous some people said that his ideas were dangerous but I prefer to look at it a bit differently when I walk into the coffee shop and am asked what programming language I'm using and I'm like oh it's it's really

cool it's really really homo iconic even I can't tell my data from my code sometimes it's really bare metal it's a really really low level which is course is a complete lie did you know that Intel like a decade ago Intel got sick sick of x86

machine language and they refused to implement it anymore they have engineers that write a translator that translates it into what they call micro ops which is a cleaner machine language that they're actually willing to implement on their own processors

I tell them that if machine language is just going to be a JIT interpreted layer they need to do better marketing and just call it x86 dot J asked and I think that it would sell better so more chips and that everyone would then believe it was really bare-metal

given von neumann's idea that code and data would all be numbers the idea this interesting recursive idea was invented of a compiler a piece of code that works hopefully and that writes new pieces of code for you that throws information over the fence

from being data to being code now this architecture poses a problem for a language like Python that initially one person was writing by themselves targeting processors with machine code is a complex undertaking it's slow it's difficult you need a lot

of specialized knowledge and Python just wants to run on every single processor without having a needing an intimate knowledge of each of them and so without having to know everything about every single processor how can we solve this problem how did Ito solve

this problem what turns out there's this guy named David wheeler he once said that all problems in computer science can be solved by another level of indirection and so like many languages before and since the c python interpreter that you download from

the website uses bytecode Python compiles in by a to a pretend machine language it's byte code that it runs inside of a little pretend processor that it implements so see Python does not by my earlier definition do actual compiling it turns some data into

some other data but it never actually throws it over the fence to being something that the processor can be exposed to raw and know what to do with it your py file is read in as text C Python parses compiles it into bytecode which is another data structure

[ ... ]

Nota: se han omitido las otras 2.159 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.