The official KZread Channel of the EuroPython conferences. Current edition: EuroPython 2024.
EuroPython is the official European conference for the Python programming language.
Copyright © 2004-2024, EuroPython Speakers, EuroPython Society, Sweden and the Local Organisers of the EuroPython conferences. "EuroPython" is a trademark of the EuroPython Society.
Пікірлер
Great overview and presentation!
Absolutely loved this! Thanks!
I find this talk a little more engaging better than those that came after which describe newer Python bytecode. Because of this, I will comment on this talk rather than the others which also have small flaws in them in my opinion. First, a little comment on the work "bytecode". In the context of Python, it is a little ambiguous and vague. Bytecode is a concept that exists outside of Python. See en.wikipedia.org/wiki/Bytecode . In general, it refers to the instruction set of a virtual machine. As correctly mentioned in this talk, it is _portable_ . This was Nicholas Wirth's motivation for introducing it. For high-level bytecode as is found in Python, it is generally _compact_ as well. This is shown implicitly in this and other talks. This compactness was another major factor for its widespread use. Think Turbo Pascal and old IBM PC DOS systems on Intel pre-i386 systems, Intel 8080 and the old Apple Synertek 6502. In the context of Python (and in other bytecode systems), the _instructions_ are organized as a series of amorphous _bytes_ (the "byte" part of "bytecode"), and the first step of a consumer of bytecode like a disassembler or interpreter is to turn these bytes into _instructions_ . Starting with Python 3.6, the disassembler module do a better job at separating these two concepts. Why it took 20 years and something like 30 versions of Python clarify this in the code organization, is to me a bit sad. In 3.6 there was a small push to coin a new word, "wordcode" instead of bytecode since the format switched from one _largely_ one-byte or three-byte instructions to uniformly two-byte instructions. That concept hasn't stuck. Which brings me one small clarification regarding the length of an instruction. While in one sense you can say that "instructions" are one or three bytes before Python 3.6, conceptually, that is not true. When an integer operand value is larger than what can fit in two bytes (pre Python 3.6) or one byte (post Python 3.6). Then one or more "instructions" called _EXTENDED_ARG_ is used. So several "instructions" are really part of one logical instruction. So I guess in addition to "bytecode" being a little vague, so is "bytecode instruction". In the Python context, "bytecode", as distinct from the general concept of bytecode, refers to the amorphous bytestring instruction part of the overall bytecode encoding system. It is good in this talk to point out the incompleteness or vagueness of "dis" output. As this and other talks point out there are those other fields in the Python's code object that exist. Some of these bits of information is melded into the disassembly output so you can kind of infer what those tables are. For example you can reconstruct the constants pool _co_consts_ and the various name tables from disassembly output. Other fields like the flags for the code object, or the "filename" that the code object came from one can't infer. However since 2016 (after this talk came out) there is a better disassembler called _xdis_ pypi.org/project/xdis/ that shows this information. A tough problem of any talk on "Python bytecode" is that there are something like 40 variants and the drift from the first version to the latest is like the drift in languages between German to Norwegian with Dutch, Danish and Swedish along the way. As a result most projects that use Python's _dis_ module tend to suffer the problem that they need a little to a lot of tweaking for the next version of Python. And that they work only for the version of Python interpreter running the tool. The tool mentioned here, Maynard, apparently suffers this problem - there were only two versions ever released. _Byterun_ which uses xdis has the same problem. So again , _xdis_ can assist here a little bit, although tweaking from version to version is still necessary. I could write a bit more about little small corrections that would have made this talk just a tad better. Small example: using the word "Computation Operations" rather than "Arithmetic Operations" because one does not think of string and possibly boolean operations ("contains", or "is in") as "Arithmetic". However let me leave it that if this talk is given again or if anyone in the future has a talk on bytecode, if you run the talk by me I'd be happy to make suggestions or corrections.
I love FreeIPA, it took all the things we previously set up manually and individually, then added more and made it a breeze to setup. Shame that changing over to it where I work now would be too disruptive due to the DNS stuff but I would recommend it for any company’s IT infrastructure.
Very valuable! Thanks!
There is a quote from famers that says "Good enough is perfect".
Amazing insight. Thank you!
I 4rd
took me 7.5 hours to get it running today 😂 most of that was trying to get podman to run the container... ended up realising we were gonna use it with docker-compose anyway so switched to docker and got it working
This was really useful for me
Such an insightful talk
You bring shame on the family
I like this idea and wanted to try it out when I realized that a lot of the code I want to test is actually implemented using or wrapped by macros.
I think macros are only a problem for cdef(). It can be specified manually with function and variable names used by the testcases. Or maybe in some cases, it would be possible to strip macros from the files
This is a really cool idea... i think it'd get your unit tests done really quickly. I don't really do much C any more and most modern languages have testing built in. Some of the C programmers I know though, well their "religion" forbids the use of Python and I'd love too see their faces when you suggest they "pollute" their C codebase with something as "unclean" as Python. ;)
You are such a cool guy
Great idea, how about functions like malloc() which are also used by CPython? Would it be possible to replace them? Well I guess I'll have to try it myself.
On page 48 of Make Your Own Neural Network in the diagram of the NN, why does neuron 2 in layer 1 connect with all 3 neurons in layer 2 and the other neurons in layer 1 connect with only 2 neurons in layer 2? He uses the same diagram in his presentation.
Man can't believe someone copied this talk: kzread.info/dash/bejne/a3Vqr9GPedvaj9Y.htmlsi=4BSlXfRI28NhvQiO
wanted to learn how to write green threads in python... came to a talk that just said "use this library".... Left
can't hear you
Please provide your data set
the way guy trained his fingers is excellent! So much typing.... instead of handy GUI 😆 Serious, why all this fapping in a command line?? People already invent GRAPHICS DISPLAY, use it, Luke! :)
too much rubbish talk about hashes. YES, we know they exist and why.
I am grateful for this video, because otherwise James Bennett would not have told what are the drawbacks of this solution. I saw its partial usage in the codebase of my colleague and also tried it in my own pet-project, but it becomes just too heavy to keep consistent in the long run. The idea of James Bennett with implementing it in QuerySets and Managers sounds much more reasonable right now for me. But till this video, I didn't know where to put the business logic and did not know about manager/queryset opportunities.
Did you use HackSoftware guideline?
@@speedcuber-diary I don't remember that name in my mind, so I think probably no.
antoine is amazing. I have such respect for him, I can only hope to meet him one day.
Explanation of the code 24:09
By far the best compiler
IMHO fat models underrated. Django's ORM is a kind of Active Record. If fat models cannot handle the complexity of business logic in your specific applications, it may means that the Django itself is not suited for your app, especially Active Record ORM. In that case better to choose other framework with other orm approach such as Data Mapper...
Well, I dont know. I prefer to have a Singleton in a constructor instead of leveraging a language property of Python that module is a Singleton. Constructor seems to be more generic and intuitive. If more Pythonic means "utilize every possible quirk of the language" then I am not on board with that.
hurray
Kial li ne parolas en Esperanto?
- "I'd like to use this all the time!" - "No, just to play, please" Lol
The code at 13:34. For computing the mel-spectrogram using librosa you don't need to compute first the spectrogram.
Also, librosa has a function to transform the mel spectrogram to decibel scale.
Great, I'm trying it out, but I wish it would compile a little faster! # I'm using Ccache, but... Can't you make a library (binary) for each Python module to reduce compile time?
Does anybody maybe still have the code? If yes, could you please share it? Thanks on beforehand
Nifty trick there with the editor using ≠ in place of !=. kzread.info/dash/bejne/a3p8tNmrppDepbQ.html
Awesome 👍. Very good explanation. Cleared all my doubts
cd mauro ex-utente NSA?
Brilliant explanation. Thanks a lot.
"if you use that in your daily life, this presentation won't add many things to you" Well, I use it in my daily life but god knows I don't know anything. 😂😂
I can relate
Do you have a working code of the Last example - combo method?
Amazing!
The best py2exe tool right now!
This was a super helpful talk!
what if i need to extract doc file instead of pdf using this ,...please this
uWSGI: We'll fix all the wonky defaults in version 2.1 don't you worry ;) also uWSGI: *never releases 2.1* Thanks for the interesting video!
kzread.info/dash/bejne/rHqGtLeTlN2XeLw.html
%%showast x=1+2 giving usage error : cell magic ~%%showast~ not found