 Okay, so we'll start with the next talk by Christophe de Danachon, concept programming. We'll be talking about concept programming. Hello, so my name is Christophe de Danachon and it's indeed hard to say, so thank you for... And my objective today is to make you better programmers, like making you think about something that programmers usually don't think about and help you figure out mistakes that you may be making in your code because everybody has been making them for 20 or 30 years. So who is a developer in the audience? Okay, so I'm talking to the right crowd. So, what is concept programming? Basically, it's focusing on the translation from wetware, which is in your head, into software, which is into a machine. So it looks extremely simple, like this, right? Basically, it's a one-to-one mapping. Turns out it's not that simple because, for instance, I have this in my head, right? And when I go into code, it looks more like this. Who has this experience? Okay, so again, right crowd. So what you remember the WYSIWYG, well, old-timers might remember what you think is, what you see is what you get. In software, what you think is not what you get. So let's try to identify a few problems in the code and going from intuition on stuff that doesn't quite work as we want, to method. I left this picture, I was biking near to my home and I got this nice car that polluted me with a diesel exhaust while I was biking and then I got stuck and I saw them trying to get out of the rock they were on and they had no method to it. So they basically stayed stuck there until I called the fireman. Okay, so let's start with something that I called pseudometrics. I'm sorry if I turn my back to you, I can't get mirroring to work here so I have to look at the screen to check that it's okay. So pseudometrics are pseudo because we can't really measure what is in our brain yet. However, you'll see that they are quite intuitive and easy to use. Syntactic noise, for example, is code that does not look as expected. An example is in LISP, you write plus two three. Whereas in mathematical notations, you write two plus three. So that is an example of syntactic noise. Syntactic noise is code that does not behave as expected. An example of that is a small torque where if you write two plus three times five, you get 25 and not 17 because small torque, everything is an object and basically it passes objects left to right. Therefore priorities are not respected. Presonance is not respected and you get 25 instead of 17. When I mentioned that to Alan Kaye phase two phase, his answer is yes because mathematics are wrong. I think this is the wrong answer. Bandwidth is an analysis of how much of the problem your code does cover. For instance in OCaml, you have to write two dot old plus dot three dot old. And this plus dot means that the plus in OCaml does not cover floating point numbers. So it has a low bandwidth compared to the plus in C. And finally the signal to noise ratio is what fraction of your code is useful. And here, we can take for instance a complex operator in C plus plus where all the stuff in red is really not that useful. It doesn't give you information. I included that the return type of the function which you can deduce from the expression in the function. Now, what is interesting and the analogy to music or signal processing is that much like in music, what is noise to one person might actually sound like music to someone else. So that's important to remember all this because it's in our head, it's subjective. However, it is useful. So let's, I mentioned mistakes that everybody does. Let me start with a simple example which I call concept cast. Concept cast is when you replace a concept in your head with another one that is related. For example, and the problem with that is that very often it's unconscious. You don't know you're doing that. And it seems to work. So what's wrong with it? But it generates many problems because you lose a lot of semantics and a lot of signal. And you introduce another employees. So here are a few examples of concept cast. An example is all the languages that don't have variadic functions, you need to replace a variadic function with a list. When you have text, well, if your language does not really support the notion of text, you can replace that with a pointer to a chart. Anybody who has programmed in C knows how many mistakes you can make out of that. Write line, same thing. You can replace the idea of writing a line with the idea of writing a character that skips a line which is fancy on all terminals in 1972. But today causes many problems. Like for instance, there is practically no way today C++ to write a line in a correct portable way that doesn't break because you put a lock around it. So if you have multiple threads, multiple threads, you get mixed outputs. You can also, and that's basically the next one. It's replacing write with an operator that does one operation at a time because at the time this was introduced, C++ did not have proper variadic type safe functions so they had to replace one concept with another. Replacing an array of something with a pointer of two something also found in C causes so many mistakes, any CVE you can take, any 100 CVE 99 are one of these issues. Replacing A of N indexing in an array with star of A plus N which is the definition in C. How many of you did know that? So that's a good fraction. Now the fact is that you can write in correct C minus one bracket A and it indexes the one element before your array and it's perfectly legal. And the last one which is more complicated is replacing the idea of resource with a C++ idea of resource acquisition is initialization. This one is much more subtle and if you want to know more, please ask me after the talk. Now let me go to a very, very new concept. None of you has ever used that concept, the concept of maximum which is written from the Wikipedia page as mean of any number of things is the first one if it's smaller than all the others than the mean of all the others and otherwise it's the mean of all the others. Looks simple, right? Let's try this in C. So I can write this as int min and what is the problem with this? Low bandwidth only deals with integers, can't deal with more than two values. So it does only one comparison. So basically we are quite far away. I can increase the bandwidth a little bit in CPP using the C proof processor which is the standard definition of mean in C that most of us have used and that is much better because now it works with floating point. That's the good news. The bad news is it also works with char star. Remember the text to char star conversion? Okay, so now for char star it gives a completely nonsensical result because it compares not the text but the pointers which makes, has absolutely no usage whatsoever. Okay, let me try that in C++. So now I write the template. Larger bandwidth now because now I can have any type and my less than is more control. So it still fades on pointers but it doesn't fail on an STD string because operators less than exists on a STD string. Okay, I've been writing languages inspired by this since the late 1990s and in 2001, one of my compilers could actually compile that stuff and what this says is that a type is ordered if it has a less than that returns a Boolean and the mean of one ordered entity is that value. The mean of one order and other stuff is you do the mean of the rest. This looks much more like what you have on the left, right? But there is still a bit of extranoities but I'm still very happy with this one because frankly, so I've been on the, at that time I was doing that stuff. I was on the C++ committee and I've been talking to C++ committee members and only 20 years later, we see some concepts appear in C++ except they are not my concepts but well, at least there's something. Now in C++ 11, now you can have viadic templates and this is again just only 10 years after Excel was done yet. But I'm glad it's there, so now we can use that. Okay, in Java we have nothing so basically when Java looks up to C++ it does all the mistakes. Now it has a list and you have a list of untyped objects and you basically have all the drawbacks that you had before and for fun in a max list you can actually get something relatively decent. So that's what it looks like in my current language and just in case you're curious this is not completely vaporware. The definition that you see there is the definition that is used in the presentation that I'm giving you because that presentation is written in this language, the L3D with hence all the fancy animations. So representing concepts in the code can the code be as rich as our brains? Let's try. First of all, let's try concept inspired naming to make the code understandable. Programmers for instance write file and they think file and it has the same properties. If you call it cat it doesn't work. So we all do concept programming without knowing it. Thank you. And that means you can do concept based composition to make the code scalable. For instance in code, like in real life a file can be used to build a database. Then you can have concept inspired behaviors to make the code reusable. For instance, you don't need to know the OS magic behind file. All you need to know is that it behaves like a file. You can store stuff in it and it stays. And finally concept based specifications make the code manageable, you can exchange stuff. For instance, the behavior of file is to a large extent reliable, portable, documented, et cetera. We all do concept programming without knowing it. But we can do slightly more than that. So let's think about the process of creating abstractions in our code, of composing stuff. It started like this with Fortran basic, et cetera. So where the abstraction you had where compiler provided symbols, expressions, stuff like that. And then the next step was to have structured programming so you could have proper loops, you could have function names like plot, et cetera. Then the next step was objects. All this was when I was young, long time ago. Then Java distributed programming and you have more stuff. And Python came, well, I take Python, XML, et cetera. It's basically you start composing stuff more than writing your own. And it's basically you're looking at software components. That was a dream when I was a kid. So what does Excel bring you to that? Well, basically you start there and that's more slow, right? It's an exponential low. So if you don't change the tools, what happens is you fall under the low as time goes by. You don't change the tools, you just automatically follow that. So you need to change the paradigm every end year to make progress. So you're always there in practice. So the idea behind my language, and by the way I'm giving a talk tomorrow on the language specifically if you're interested, is to have something that is on demand. You evolve your set of concepts all the time. Excel stands for extensible language. You add concepts as you go. And the idea is that instead of being on the right, you can basically bounce whenever you need and you can take advantage of this stuff. It's important because the set of concepts is infinite. For instance, even if we consider only those that are relevant to a program, like for instance here, we can exclude the cigarette lighter if it's a calcium later. We still need a number of minority paradigms, like I'm going to show a few, but basically that means you invent your own incompatible language every time. So for instance, you have logic programming that was a language problem. Or you have design-backed contract that made it to a few other languages, but basically for today, the best implementation of that remains if iPhone. And in the end, you create your own language like I just did, basically. So keep going like this. I'm going to very, very quickly go through a few applications to show you that in real life, it does actually matter. For instance, I wrote a game. I just gave a talk. You can look it up later when you're back from first time, but I gave a talk in the ritual gaming. That's what I was doing when I was 18 or something. That was the first 3D platform game. How did concept programming play into that? Well, that's the description of 3D objects in it. To you, it's probably unreadable, but if you know, like I did, because I created it, that Z, sorry, ZM5 means along the Z axis minus five, XP5 along the X axis plus five units, et cetera. This is actually a description I can replay in my head and I can understand what object I'm talking about. So it's 3D modeling with only assembly language, if you wish. Okay, that's a bit far-fetched. Another example, a car simulation that basically was a matrix for car electronics. You put an electronic device in it. It doesn't know it's not in a car. So now you can run at 50 miles an hour in the Sahara DISA and run into a snow pile and see what happens. Okay, so where does concept programming play a role here in the development itself, converting, for instance, between C and Visual Basic, in the description of the system itself, the scenario language. So you basically, what changes here? You start with the notations and then you create the tools to play with the notations that you understand that are part of your domain concept. Same thing where some games are wrote when I was young. So in that case, it's the matrix multiplication because there was a number of these games. They actually went to the United States infrared connecting machines through infrared. So actually these were just basically demos for that tool and that was a tool that allowed you to program these machines at high level. It was a cross compiler for the machine and you can see the same idea of trying to have the high level concepts that are relevant to what you're doing. I'm going to skip that one and just going to show you what our 3D looks like. So you have dynamic text, you have 3D transforms. Basically, my question when I started trying to push the limits about my language was how do I go beyond standard programming and I thought, oh, documents, that's a good test and you see the result. So I hope that this will give you ideas and so I am out of time, but I try to speak fast. Thank you.