Merken

Python as the keystone of building and testing C++ applications

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
OK so we have fallen marketing and thinking about how to build less of link is made by finest for the kind of a so please introduce him out of the deal that was working with few the it hi everybody I'm and I work as
a software engineer at written in BN gender into issue to what we do and it that we make life push and link software and hardware creation and performance 1st make life but you can see on the left the string here life is a digital
audio workstation for creating musical ideas turning them into songs and performance on its nuclear ability accessibility list is the application is for Mac and Windows from the tree or could be 16 then we make approach the
1st is the use of the device which becomes a powerful electronic music instruments when combined with life in this and the 2 properties that at the top but wonders if she squeaks Siemens poet light unit which is a C + + application friends and then we make link is that
the quality that keeps music applications and devices in sync by synchronizing their it is really good to add developers and iris the now you might ask but what does that have to do with Python well we do use spike it 1st we use it to write remote trips for me to control these medieval and for others devices like push that musicians can use to
interact with light another 2 and their and their music creation workflow and have then use
Python scripts to automate continuous integration and reuse mutagens and last but not used since that's the topic of this talk that we are using Python to build and test lossless was applications such as like so let's see how we do life which the In order to build the blast was editions you have to compiling the restless souls and sometimes also see an object of Cecil's words but and so you combine them into an object binaries which vary widely used by the linker into libraries and executed this when building life more than 1400 files are combined to product 88 libraries in executive fortunately they are tools to help you have been suppresses applications and you don't have to call the combined and the link manually the secure use all of this is you might already know that once listed here and fortunately most systems support only 1 platform and we want to build a life on Mac and Windows and actually like used to be built from files on Mac Visual Studio Projects on Windows and it was a total maintenance and so we started using a hyperlink to that would abstracts most of the platform differences this is to Due stands for generate your projects and in the middle system a bit like C intuitions it's symmetric from tool that generates files for platform-specific Princess it can generate makefiles new the procedure projects and expert part and it is written in Python nowadays is mostly used to be a problem electrons which is the base of units absolute to not in the in the year it's just engine to and it is also integrated in the life of a story to actually life here is the life gets storage of union listed you just what matters for that torque and um at everything we use it some modules to integrate different particles or to reuse of code the crossing the projects and here in order to build and test life and the library was during the contents this system which is also an evident was story I think the most uh and there's also would be justified in light of 2 now the contents of this is from the system itself is a clustering and and it contains 1st of all the chip repository as so we have some kind of similar deception and here it's magic I have been informed in Python scripts so to build and test applications they are free supplements strips complicated by is responsible for according to with the right audience then build up the corre this system to I think this mean job or excluded and then run that called C + + from those options specific to going into the forward sales of our life is with they waited too long for this talk so what does it mean uses symbol and 1 example to see how that these things which to so here the analog always projects brief simple and it obviously contains a copy of the system and history of the West but wouldn't be that system where an enlightened alive in history has that W G 5 this must go to combine is spread between the source for the and the test for which also contains the cooking of capture which is the simplest assuming this frame now is evident that it would here to targets world and it worked the both will produce 1 executive this from 1 source so pretty simple predators you might find the syntax funnier that would make sense because well it's Python dictionary the content of the and I wanted to speak straightforward class 16 must be world and in had on the 2 pp we use the cast as from a to just brightest really dummy unit tests that always now it's been that such as ML the hill and project we 1st called the confidence it is to get what it's doing and for which configuration so we is the platform could be Mac that I'm running on Windows 64 stands for 64 bit could be to and yellow is the the limiting factor could be the computed applied this is responsible for according to which you know in order to file and generates that the usage 5 since we are in this example at the generated files and and title UNICEF their which matches the configuration In the 2nd time we called the bins based on the computation it prints what is about to happen then it causes and it's been since it's the default on Windows the repeating myself as you can see the invisibility consul output that to executables have there this little about the exceeding 1 thinks that there exist the dog friendly dreams what happened at which is really convenient when there are thousands of targets with hundreds of files and you don't want to screw all everything like when we believe lie and that is not the facts and ended up with for here again in a subfolder based on the configuration this 1 of for the more called deeper because when according buildup by we can choose between 2 by and reads and this division to supporters based on the configuration allows us to simply build and test several configurations of the same applications in the same request and now we can run the hello with extinction hello to finish that example and source recalling the round trip with the CPP test and it will basically call it releases plus plus this from from the correct output for I by convention on the executives and you the best are treated as asbestos Reynolds and thus there would be exceed want from here on in your text but it I remember I was in summary of which this 1 is fast and which have been which is again pretty common when you have dozens of and you don't want to read on the other so now we're seeing how the
system works in a very small projects but not a talk of what it means to use it with complex applications such as life welcome to the award logics via a lot more flies in the light was stories so it takes much more than like reading much more like to build and test but it was in the exact same way the only thing to do is simply counting being Enron nothing more but you don't get fooled by their appearance the fact that they are only free scripts to call doesn't guarantee on itself that the scripts are easy to use and maintain and expand In fact this created could have been developed in to the colonies were and it would be and that's not only for developers who work directly on them but also for the developers while using them to build and test application and
developers really don't like to work with a mass so what I mean you we didn't have a lot of these in a thank you otherwise it wouldn't be giving a talk I would still be embedding hiding from my in recordings and so on and so on instead of chaos we embrace consistent the free doubly restricts continue being and run share a common architecture they only use modules from the Python Standard Library consider on last loading and that process and they follow the same sequence of action 1st past the arguments including finding the project to find since its entry point then they figure out what the users the user wants to do and then they just don't more than just a common architecture of these free scripts actually share a common design this design is made the integral and by iterating this principle description become easier to use maintain and extend knowledge right I wanna share which you for each of design principles and they are generated so we should be able to to apply them to your monster 1st principles fairly early loud and clear I don't 316 y that we know for an example just to be sure and here is the smallest so we declare an argument parser if 1 argument targets then we get the target directory actually out of the arguments and we count how many entities that are involved and we printed underground when running the script on projects there are 6 inches not expected the same thing on a non existent exceptions group as so we get an error which is actually the Latin specific character windows error so my colleague working on my own even see the same thing I here pretty easy to trace back where that error comes from the they're not some new lines in that script and it's pretty obvious what happens but if really complex script which does a lot of things and it's really helpful to explain to the user what is wrong with what you typed on the command line it's not about industry so how do we do that in well so it is take
arguments I believe that so here functions which basically takes a pack status of women that is directed if it's not phrases an argument type error exception we a comprehensive or was it just be the and we use a lot of In the title of the argument the now in passing the arguments of positive we actually call that function and if everything is fine nothing changes this this another the user since but there the formalism then we actually get an error message which is clear because now we know it's something wrong when passing the arguments and not about industry so fairly fairly loud and clear just to make the screen easier to use the 2nd
design principle is support and so you might the customer default country go together that makes I have shown you that did can also generate new job and injuries not to do for the tools on Windows and Mac that we support because it's pretty fast so if I wanna come to Europe OK the word project with me John Dekel the goal is to win minus minus thank you the output with extract ninja indication then I wanted this script with his men and I get into output and then examined in a work and everything is the same since about what's going on the compiler course should identical but I mean he's man adamant that minus minus Niger every time I call configurable and I do but not every day so all students so that that issue and we've created the weights Christian defaults so in a which again is that by convention users can drive when they want to be given to the also as the 1st argument so these arguments go at the beginning and then whatever they put on the common line goes next so they can always on the command line of right anything that this the but also in so there is 1 . us using the use of force then they can it can be
1 policy this system repository so when you have several working group is it can be useful to have different settings based on the working of of these values is the to synoptic and this is the 1st time and another said comman-line arguments idea and takes precedence
in the opposite reads documents from left to right so
now with the content of the falsify including minus minus means our including computer by ended up by I can just called comfort because the and I don't have to die in the now the theory is intrinsically do not integrated project specific feature so all the business and repository is the life that must of done and no they used by line it can be used actually to suppose education if we have a look at the basis of clustering composed we so this chip there are 3 main scripts and share code between different transcripts and there is a Python module which contains function for the argument parsing like existing dual function just shown functions for getting the default argument based on platform and function to figure out where is the complement 5 so there are some heuristics have you have you seen I don't have to specify where it is the 1 that just for the light to fight when quoting configure the so now for this example let's imagine ladies for some because configurable then run are pretty big 3 complex so let's just go with it seems very hard part here is the content of this is all of we report our policy is we all constants from system but continues to define despite the default value of the 1st argument which is the platform the word size and then we have the and the script only prints the content of the argument nothing fancy so let's call it just to see hard looks just print In United platforms land and water the 64 since these are of the 4 not go back to the general ontology In when projects I would like to call this crime when I don't know this specific argument that I really would like to so here we could imagine but we want then I will to change the language so instead of seeing the world would also among the people and the whole world so we did language on the kind obviously that 1 work from that there is no such argument that my the sneaky and asked if we have that to the system no we do
not integrate project features because it adds maintenance costs and it leads to a pure ivory changes as soon as another project starts using that future and in the original project decides to 10 the changes so no instead we make it easy to write a script extension so here we back to the simple of all the script with some space because I'm going to the blank as soon as we do it is introduced the a number of module from the system then we create script extensions the I will come back to that spot in a few slides but basically we created extension invent afterward we use so we have a function called extend our positive before which we put for defining the other arguments and another function called extent of after that we after the frame so this is the only thing we have to write in the consistent not it's you know it works In the top projects the last 2 they have to do so the 1st thing anyone 1 has to do with is create actually module name this is an extension that's the conventions it has to be like this and in fact modules beginning there should be 1 of our that is 1 of the whole scene of marked by this find matches the the name of the extension that clearly here we define what is 1 of the 2 functions so here we define the extent of laughter and now we call the script with our specific argument what so how it is that black magic that well
1st of all as for the extension of Python module and in of the model that is a function call gets screwed extension when coding but functionally passed to the 1st thing to past the the straight and remember in so the mere API we define what are the functions that the extension has and now we go into the dead so who has a done the 1st flight import OK pleasant and so this is low level awareness of importing the Python module so the 1st thing you have to do is to find it sorry and using their college and stuff well that's module could be and then the house if it has been found you can actually then there is the more craft to and the closing files and what not that what you have to keep in mind here is that now we have a function called find and finally we look at you and this is not really useful to create extension so clearly restricting intention for so we're back to describing the JetScript extension function takes 2 arguments the screen name in the meaning of so the 1st thing to do is to find that this is an extension of the module and the 1 that's on you this is by convention it's hard and we basically do divided by just going to have on the tree structure of and used order to find but as so we start at the the requested and then just go up up up up and to the root of the tribes and if in any of for those days names this is an extension to actually not just afforded by for modeling uses centers there is not and if we have found that then we can try to find inside it a module which has this decides to treatment if nothing has been found that because maybe the user there was project or another project has defined in extension descriptor extension is just a dimming into and the end we iterate over it's actually of the minimum energy I is the script extension does another actually it we just said so that student extension that is written by this function is complete so descriptor that is using this object doesn't have to check whether the attribution exist and you can just rely on this minimal I incomplete and yeah just work to wrap it up would be generalized by an to be called title of the the talk is indeed the case and we thought I said nobody can work on that in about the design principles and values the future remembers that having something is good in absence of identical but knowing and sharing them is better so I invite you come to me into your FIL your Python is that and share whatever design principles you are using in your code in manuscripts to to make them better so many all together we can make the users of our that's had I the potential for it if if it we actually have like a lot of time for questions so race has place yes just small question I was wondering why would you might decide include tuple system as as as as a model instead of partitioning not the point in we have um kind of history from that evidence of uh having everything in the repository mean almost everything so we'll receive land this this combined with the Python interpreter itself but all the code we write the combining is inside the life of prostitutes so all and in the same module so so so then that means that you want to make something like a whole text on anything for your libraries next we have to update user model like this take various going that way In the I've done that and that's a that's bad now it's like we have done In a way more activated things the reason that and so how did you think about using while France corresponds to and so the guarantee system so yeah so lots of birds yeah some sort of there is a lot and scones called a compiler directly but we are really attached to using certain ideas like exclude and magical because we like to use that to and unfortunately exclude only works if you actually exclude project and sewage is being able to generate project files that are really who like that we like maintenance project was in the because and then the people this system repositories million from around jet we wasn't of so but that obviously never got it so that demonstration of did you look at but has less read about the rate and read actually had a colleague who is 1 of the main regional policy make the thing is that when the transition was made From the Makefile and Visual Studio that were 6 in the library to do at that time see made was to annoying and but now it is it's by the option 4 questions have 1 most of them have the actually through the use for dynamic loading like uh you have uh gone through there but it's it's going up like that of course is that the stories to the Lorentz they're looking for models but how do you actually a set up the order in which they are executed um share basically the or pardon for this function that is for or documents in a generative here it's a study of the Quran for and experiment 4 minutes blindfolded into the room and just because of the order in which the past the if we have to go further sure the final model function which takes all these factors because so you just have the 1 extant it only look for 1 5 years in the 1st much the system extensions Python modules that matches is the moment of that's the default behavior of life and for any kind of and how you up so they looked into this they would set up and you have like entry points and you the radius of like extensions if you want to have a little baby it's a you have seen drug for example or by this they look different places another extension of what and you can actually extends through but for that below doesn't look like you need to react to the Indian were pretty happy about the number of lines in this more the thank you
Videospiel
Hardware
Verschlingung
Software
Ikosaeder
Binder <Informatik>
Software Engineering
Baum <Mathematik>
Computeranimation
Hardware
Zeichenkette
Netzwerktopologie
Videospiel
Einheit <Mathematik>
Kategorie <Mathematik>
Gruppe <Mathematik>
Bildschirmfenster
Arbeitsplatzcomputer
Nuklearer Raum
Kartesische Koordinaten
Mailing-Liste
Binder <Informatik>
Gamecontroller
Gruppe <Mathematik>
Besprechung/Interview
MIDI <Musikelektronik>
Skript <Programm>
Kartesische Koordinaten
Softwareentwickler
Synchronisierung
Computeranimation
Bit
Freeware
Dokumentenserver
Desintegration <Mathematik>
Datenmanagement
Kartesische Koordinaten
Computerunterstütztes Verfahren
Extrempunkt
Binärcode
Computeranimation
Metropolitan area network
Softwaretest
Einheit <Mathematik>
Prozess <Informatik>
Gamecontroller
Gruppe <Mathematik>
Bildschirmfenster
Skript <Programm>
MIDI <Musikelektronik>
Default
Große Vereinheitlichung
Analogieschluss
Funktion <Mathematik>
Inklusion <Mathematik>
Softwaretest
Umwandlungsenthalpie
Korrelation
Dokumentenserver
Abstraktionsebene
Ähnlichkeitsgeometrie
Prozessautomation
Quellcode
Biprodukt
Algorithmische Programmiersprache
Teilbarkeit
Konfiguration <Informatik>
Sinusfunktion
Motion Capturing
Arithmetisches Mittel
Hyperlink
Datenerfassung
Projektive Ebene
Ordnung <Mathematik>
Sichtbarkeitsverfahren
Telekommunikation
Subtraktion
Rahmenproblem
Wort <Informatik>
Klasse <Mathematik>
Unrundheit
Systemplattform
Division
Code
Systemprogrammierung
Physikalisches System
Bereichsschätzung
Binärdaten
Programmbibliothek
Skript <Programm>
Inhalt <Mathematik>
Gravitationsgesetz
Speicher <Informatik>
Konfigurationsraum
Expertensystem
Videospiel
Kontinuierliche Integration
Symboltabelle
Physikalisches System
Binder <Informatik>
Elektronische Publikation
Visuelles System
Modul
Hill-Differentialgleichung
Objekt <Kategorie>
Moment <Stochastik>
Uniforme Struktur
Mereologie
Wort <Informatik>
Partikelsystem
Lie-Gruppe
Informationssystem
Folge <Mathematik>
Punkt
Prozess <Physik>
Gemeinsamer Speicher
Gruppenoperation
Gruppenkeim
Parser
Kartesische Koordinaten
Komplex <Algebra>
Computeranimation
Monster-Gruppe
Metropolitan area network
Physikalisches System
Deskriptive Statistik
Datensatz
Verzeichnisdienst
Standardabweichung
Existenzsatz
Unordnung
Bildschirmfenster
Skript <Programm>
Skript <Programm>
Softwareentwickler
Maßerweiterung
Gerade
Umwandlungsenthalpie
Parametersystem
Videospiel
Elektronische Publikation
Ruhmasse
Vorzeichen <Mathematik>
Ausnahmebehandlung
Physikalisches System
Parser
Modul
Systemaufruf
Rechter Winkel
Betafunktion
Projektive Ebene
Skalarprodukt
Lateinisches Quadrat
Computerarchitektur
Cloud Computing
Verzeichnisdienst
Personal Area Network
Fehlermeldung
Lesen <Datenverarbeitung>
Gewicht <Mathematik>
Compiler
Mathematisierung
Formale Grammatik
Regulärer Ausdruck
Extrempunkt
Computeranimation
Metropolitan area network
Prozess <Informatik>
Bildschirmfenster
Skript <Programm>
Indexberechnung
Default
Gerade
Metropolitan area network
Touchscreen
Funktion <Mathematik>
Lineares Funktional
Parametersystem
Datentyp
Typprüfung
sinc-Funktion
Ausnahmebehandlung
Generator <Informatik>
Diskrete-Elemente-Methode
Forcing
Rechter Winkel
Parametersystem
Projektive Ebene
Wort <Informatik>
Fehlermeldung
Parametersystem
Dokumentenserver
Menge
Gruppenkeim
Physikalisches System
Ext-Funktor
Computeranimation
Dualitätstheorie
Subtraktion
Rahmenproblem
Gemeinsamer Speicher
Dokumentenserver
Wasserdampftafel
Fächer <Mathematik>
Mathematisierung
Formale Sprache
Zahlenbereich
Maßerweiterung
Computer
Systemplattform
Raum-Zeit
Code
Physikalische Theorie
Computeranimation
Demoszene <Programmierung>
Metropolitan area network
Kappa-Koeffizient
Syntaktische Analyse
Skript <Programm>
Skript <Programm>
Inhalt <Mathematik>
Maßerweiterung
Default
Konfigurationsraum
Gerade
Umwandlungsenthalpie
Lineares Funktional
Parametersystem
Videospiel
Ontologie <Wissensverarbeitung>
Dokumentenserver
Heuristik
Vorzeichen <Mathematik>
Physikalisches System
Modul
Integral
Softwarewartung
Rechenschieber
Konstante
Parametersystem
Mereologie
Basisvektor
Wort <Informatik>
Projektive Ebene
Vektorpotenzial
Punkt
Momentenproblem
Gemeinsamer Speicher
Compiler
t-Test
Computeranimation
Übergang
Netzwerktopologie
Nichtunterscheidbarkeit
Visualisierung
Skript <Programm>
Wurzel <Mathematik>
Default
Große Vereinheitlichung
Gerade
Lineares Funktional
Parametersystem
Interpretierer
Multifunktion
Dokumentenserver
Systemaufruf
Kontextbezogenes System
Teilbarkeit
Konfiguration <Informatik>
Arithmetisches Mittel
Softwarewartung
Generator <Informatik>
Projektive Ebene
Ordnung <Mathematik>
Gruppenoperation
n-Tupel
Abgeschlossene Menge
Zahlenbereich
Maßerweiterung
Code
Informationsmodellierung
Programmbibliothek
Skript <Programm>
Maßerweiterung
Datenstruktur
Touchscreen
Attributierte Grammatik
NP-hartes Problem
Beobachtungsstudie
Videospiel
Radius
Physikalisches System
Elektronische Publikation
Modul
Quick-Sort
Objekt <Kategorie>
Energiedichte
Baum <Mathematik>

Metadaten

Formale Metadaten

Titel Python as the keystone of building and testing C++ applications
Serientitel EuroPython 2016
Teil 15
Anzahl der Teile 169
Autor Martin, Alain
Lizenz CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
DOI 10.5446/21083
Herausgeber EuroPython
Erscheinungsjahr 2016
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Alain Martin - Python as the keystone of building and testing C++ applications At Ableton, we make [Live], [Push] and [Link], unique software and hardware for music creation and performance. Live is a C++ desktop application built from a 15-year old code base. Push is an instrument embedding a multicolor display which renders a [Qt Quick] scene powered by [Qt]. Link is a technology that keeps music devices in time and is available to app developers as [LinkKit], an iOS SDK. "But what does all that have to do with Python?", you might ask. This talk answers that question by explaining how our developers use Python to build and test C, C++ and Objective-C source code. Based on [GYP], what we call "build-system" is a collection of Python scripts that simplify our workflows, and help us write better software. The three top-level scripts, "configure.py", "build.py" and "run.py", share a common design which makes them easy to use by developers, as well as easy to maintain and extend. This talk describes the essence of that design, so you can apply it to your own project.

Zugehöriges Material

Ähnliche Filme

Loading...