Skip to content

Instantly share code, notes, and snippets.

@nmcb
Last active February 13, 2022 07:02
Show Gist options
  • Select an option

  • Save nmcb/819bd62d864c1b158eccbeb453a8b683 to your computer and use it in GitHub Desktop.

Select an option

Save nmcb/819bd62d864c1b158eccbeb453a8b683 to your computer and use it in GitHub Desktop.

On Denotational And Implied Semantics

Okay, let's start.

Can everybody hear me well?

Jon: "Good, but we can't see the screen".

That's correct, because there will not be slides.

Edsger Wybe Dijkstra

Edsger Wybe Dijkstra was a pretty remarkable man. He was born in 1930, and he died in 2002, and he was educated as a theoretical physicist. A deeply disciplined man. He started in the late 50s, to work for something called the CWI in Amsterdam, which is a mathematical institution. And even though he was educated as a theoretical physicist, with his mathematical inclination, he was the right person to develop the right software there, for the first computers. This was a very different time.

He developed software at the moment that the computers themselves where being developed. So, there was an interface between the hardware and the software, and he was developing software at the moment that he did not have a physical machine to test his software on. He is famous for working on Algol 68, and he's also famous for the statement "GOTO considered harmful", and he's also famous for inventing something called "Structural Programming".

Dijkstra was convinced by his boss that a new science of computing was required, that such a science at that moment just wasn't there. And he struggled with this, because he was actually a pretty arrogant and intellectually inclined person. So he wanted status, and as a theoretical physicist he probably would have had it. And he was not directly inclined to form a completely new field in that sense. But he was convinced by his boss to do it, and with that he sort of bootstrapped, in the Netherlands, computing science as we know it.

At some point he married and in the Netherlands it is required on your marriage certificate to state your profession. He is officially the first programmer in the Netherlands, and it was a huge fight with the authorities, because "programmer" was not in the list of possible professions, [but] this' was what he was [and became named for]. So, here we have the first Dutch programmer.

One of the things that is remarkable about Edsger Wybe Dijkstra, is that, in his time it was not possible to communicate very easily, he wrote down all his thoughts, every evening, on paper, by hand or by physical typewriter, and they are called the EWD's the Edsger Wybe Dijkstra [papers], and they are numbered. And they run into the... there are approximately 1500 of them. And it's a remarkable amount of information, and knowledge, that he wrote down, and I can still recommend to watch those. Eh, or not watch those, but read those papers.

One of the things he was also remarkable about is, he was so deeply disciplined about writing versus talking, that, he spoke very slowly; he sort of first had the thoughts in his head, and only then, after he formed the thoughts in his head, only then he spoke about [them].

In two-thousand and one, I was lucky enough to work with a colleague who was a student of Dijkstra. This was also a pretty arrogant and intellectually inclined person, and he was studying in at the university of Eindhoven, a technical university. That technical university was going a little bit down in status, mostly because Edsger Wybe Dijkstra, who used to be a professor there just left for the [United] States. And he moved to Houston. This colleague of mine, he is called Ron Kersic, told me a story of how he applied with Dijkstra to be his student. Just imagine, we have a twenty year old person, quite arrogant, wanting to up the level and become a student of Dijkstra, who is in Houston at that time, so he wrote him a letter, [asking ]whether he was allowed to become Dijkstra's student, and Dijkstra said: yeah, sure, just come over and we'll have an application and see if you can become my student.

So Kersic, very nervous, flew to Houston, this was the time that you could still smoke in airplanes, it was a different time, and took a hotel very close to the place where Dijkstra was having his office. And in the morning, Ron went to [Dijstra's] office, and was asked to wait outside until Dijkstra came in. Dijkstra came in, took Ron Kersic to the blackboard and asked him to write the letters of the alphabet. Ron wrote, as beautifully as possible, all the letters of the alphabet, after which Dijkstra also went to the blackboard and said: well, it's pretty okay, but do this 'r' a bit different, and this 'h' I can not directly see it, and the 'i' because perhaps its a '1' and perhaps its an 'i'. Now Mr. Kersic, if you go to your hotel, then next morning we'll try this again. Practice very hard on the letters of the alphabet, and then tomorrow, when you come in, we'll see if you can become my student.

So Ron went to his hotel, and the next morning, completely nervous he went back to Dijkstra and was asked again to write the letters of the alphabet on the blackboard. And Dijkstra said: Good. Good progress, you are allowed to be my student. And Ron told me this story when, we were sitting in a bar, in America, because we worked there at the time, and we had both a bit to drink, and I asked him: did you study, in the evening? And Ron said: yes, the whole evening I studied, writing the alphabet as Dijkstra would have liked it. Just an example of how disciplined this man was.

Dijkstra is also known for the Turing Award Lecture, in 1972, and in which he most focused on [lecturing] that programming is a branch of mathematics. And Dijkstra, arrogant as he was, thought actually that the not so good mathematicians would probably be better to not becoming programmers, because programming would be the hard part of mathematics. Dijkstra also missed a couple of things. So for example Carl Hewitt, who we know from the Actor Model, later conveyed that Dijkstra missed that the assignment operator is actually a more harmful thing than the GOTO statement. In that lecture, in 1972, he [reiterated] what he said before in 1968, which was a phrase called the "software crisis" in which he posited that the main challenge, the central challenge of programming, is how to maintain intellectual control over the complexities of our own making. In other words how to not make a mess of it. I posit that that challenge, up to this moment, has still not been met.

Ikke

I want to have a short question: I'm curious about the age distribution in the audience, who here is younger than twenty? [None] Who is older than twenty? [All] Twenty-five? [90%] Older than thirty? [70%] Thirty-five? [30%] Fourty? [10%] Fourty-five? [Four in the audience] Fifty? [Two in the audience] Fifty-five? [None but one member overlooked]. My apologies [to that one member of the audience]. I try to see everybody at the same time and that's not easy for me.

I was born in the small town of Utrecht, in the Netherlands in 1971. The Netherlands has pretty much a Calvinistic culture, for those of you who do not know it, we actually derive pleasure from disallowing ourself pleasure. [Shakes his head looking at the audience] Not very well known.

In general, I didn't talk much for the first two decades of my life. If you're born in 1971, and you grow up in the 80s as a child, being a nerd was not known as a group yet. And, nerds were sort of unpopular at that time. And up to the age of something like twelve, I, at elementary school, was bullied. I was this type of person who open-eyed looked at the group at the moment that everybody was looking at me. That sort of made me very anxious, because most of the time, that would mean that something would happen to me. In this case I can see all of you and your eyes at this moment as something that makes me incredibly uncomfortable.

I learned to distrust groups and distrust attention. And there are two points, two things which really stick to [my] mind in this case. One time I observed that a bully opened up a sandwich of mine, opened it, spit on it and then closed it. And even though I saw that, I still ate the sandwich. In another situation; I remember that I was kicked in the bud quite often, and at some point there was a group, and they decided that I needed to be kicked in the bud. And they told me that I needed to turn around, so that they could kick me in the bud. And I turned around, so that they could kick me in the bud.

This [experiences] gave me a long term obsession. A long term obsession with what is human action and what precisely is it that makes yourself act against your own interest. I basically started to distrust groups. Individuals are sometimes okay unless they are part of a group, and, in all honesty, what I'm telling you is: I don't like you very much as a group.

At twelve I learned to program. My father worked in administration, and at some time, they showed, at the chamber of commerce, what the future would look like with computers. So he went to a location where they showed him a computer, and my father thought: well I'm forty, probably nothing will happen with me with computers anymore, but for my son, this nerd, let's buy him a computer.

So he bought me a commodore 64, which at that time was a month of salary, for a 1MHz processor, 64Kb of RAM, and it was attached to an analogue television. At school where I was, if children were being punished, they were given long divisions, because it takes a lot of time to calculate a long division. So I wrote a program, which printed out the calculation of a long division, and with that, for the first time, I was able to earn a little bit of money from my schoolmates when they were being forced to do a long division.

Then at age 16, by that time I had an IBM 286, a hard-drive of 20Mb, I wrote a very small administrative program, in Visual Basic, for the company of my father. For one week of work I was paid two times my fathers monthly salary. I remember I told him proudly, and I can still see the short flash of jealousy in his eyes.

In the end I ended up going to the university in Delft, where I studied electrical engineering. At the age of twenty-five, I was quite late. And there I learned to fight complexity with mathematics. Electrical engineering is very good for that. Yes? It's a character building education in that sense. It's applied physics. I don't know, eh, just a small question, has anybody worked with electronics? [A handful of members in the audience raise their hand].

So, for example there is something called the seventy-four hundred IC range, which basically are very small components, which are ANDs, ORs, XORs, and just the quality of those physical components, the quality with which you can mix and match them and still be certain that the totality of your composition works. It's quite remarkable. I also challenge you to, for one time just lookup the documentation of those small physical components. Most of the time it's something like five-teen pages, all types of environmental and [external] constraints, in that documentation you can lookup precisely what is needed to make a larger composition of those small components. And I have never seen any of that quality in, what we are doing here, as [programmers]. Such a five-teen page documentation of such a simple component as an AND, or a NAND, or an XOR, I would compare it for example with the fold method, or the >>= method. And we would not see things like: the complexity, the guarantees, all that type of information, we basically are still in the process of [getting to] understanding what we are doing.

Basically nowhere in computer science, and over the last 25 years, I've seen that quality being matched.

I have an electrical engineering friend who started to work in France for a very little electrical engineering company, and his customers are three companies. They are Intel, Phillips and Samsung. And what they produce is what you can call "an image of a silicon corner". At the moment that you go higher in frequency towards the giga Hertz, electrons just don't want to go around a corner anymore, but they bounce back. So their sole product is this corner, with some quantum mechanical offsets in such a way that an electron wave is being helped around the corner. Sometimes when I'm programming I'm thinking about all those electrons which are just screaming around corners in a physical sense.

The main property of the success of that company, and it already exists for twenty years, is "focus on the smallest problem of your abstract composition, and make that work incredibly well".

I majored in chip design. Chip design [uses] something that compiles a hardware description of a system, of code, into images, and those images are then projected onto silicon. In essence, it's a compiler. You take code and [it] puts out an image. I got interested in compilers, and in software that creates software, and the term 'software' originally originated as a joke, we had 'hardware' and we wrote all this code, and we had no idea [yet] what 'software' was, so [we] made the word 'software' as a joke because nobody knew [what it was]. Nowadays software is a very normal word, and everybody uses it. I still want to posit that we don't actually understand what software is.

Software is Eating the world

And that's a problem because software is eating the world. Human individual understanding is finite. We have a tower of layered abstractions on physics, which yields software at the top, and it is just too large to fit in one head. Everybody goes up in the stack, and at some point accepts an abstraction at a certain layer without actually being able to understand what goes on underneath. And that's also a problem because with that we are living in our abstractions and we start to take them for real. I posit that nobody is understanding what we are doing when we create software. Really nobody.

For the last thirty-five years I've spent all my [time] on understanding what software is. There is literally nothing more important to me than understanding what software is. No relations, no family, no health, no status. I really don't care so much about it.

I do not claim any authority, but I do claim the authority to choose my own authorities, and I would suggest that you do claim that yourself also. In that sense I have nothing to give and nothing to gain, other than repeating your understanding. The best authorities that I got to knew for understanding what computation was were Turing and Church. The untyped lambda calculus. Which is my best model to understand software. And in the end it all comes down to three constructs. Abstraction, which is pulling something known out of something unknown. Introduction, which attaches a name to that something. And application, which is applying something known to a composition of abstractions... which in the end, is unknown.

I like abstraction very much. Introduction I'm already a little bit scared about; where is this name coming from all of a sudden, what is this 'x', this name that we attach to it. And the thing that I really despise is application. Because as soon as you apply something, you make it useful, and I distrust useful [new] applications.

So, where are we now in the realm of software? Are we maintaining, as Dijkstra posed, intellectual control over the complexities of our own makings? Yes? Do we make it "for the better" in that sense?

No!

We have millions of developers in the industry allowing bug-ridden shitty code into production. We are creating a world in which we are surrounded by machines that scream for our attention. We pay for that world by giving up our autonomy, our privacy, our intimacy and our humanity. And we already crossed the threshold, I believe that it is already too late to clean up the mess that we are ourselves responsible for [creating] in the last forty to fifty years. In that sense I have no solution here. I'm not going to say how it's going to be better.

But I would like to end with a couple of unpopular opinions. Which probably are unpopular in, especially in an environment like this. The first one is: software development doesn't scale in human effort. If you need two teams to create one composition of software, you're doing it wrong. The second one is: let's start treating software contributors as part of the problem instead of part of the solution. And the third one: premature application is the root of all evil.

I thank you for your attention.

Q&A

Are there any questions?

Q: Thank you for the speech. What do you think about modern AI and machine learning from a philosophical perspective.

A: I think that in modern machine learning we still have no idea what we're doing. In the end it's just prune-and-graft, and at the moment that we find new structures in big data, personally I have a dislike of it, because for me that means little meaning. Like small data can convey a lot of meaning, but as soon as we have big data, we only get little meaning out of it. The thing I distrust the most about it is that it is not one-hundred percent deterministic for a hundred percent of the input. And that in a broader social sense always means that percentages will fall out of what is intended, and how to handle those percentages, I'm very worried about.

Q: So thank you for the talk, it is a very interesting subject, which, I don't know, somehow resonates with my feelings. I missed the beginning, maybe you already touched it, but in the unpopular opinions you said that it is already too late to clean up the mess. Can you elaborate maybe, what exactly are your fears, what is the mess, why are we like ... I don't know? My use, when I used to do programming, using visual foxpro, was also pretty messy but we don't see this mess around. Maybe some mess cleans itself.

A: That is a positive view, and I like that positive view. My favourite abstraction is one vertical line. And then we have a left-side and we have a right-side. If this vertical line is a compiler, and I, myself at this moment, am [the code] on the left side of this vertical line, then putting this code through the compiler makes it applicable. I think that if we're looking at software development in the larger sense, with the millions of developers that are pushing code trough that compiler to the other side so that it can be applied. I think that is the mess we're in. So, just that code, and that complexity that we can not manage intellectually anymore, individually, but also not as a group. And I think that all our efforts, if I would put a positive note, would actually be to put our effort in letting code not get through that compiler. And in that sense, I hope I will grow old enough too, for example see technologies like [dependent] types, Idris, Agda ... the certainty types, which allow, when you go through a compiler to the other side, to be certain about what is happening on that other side. I'm not certain if this is answering your question, but those were the associations which it evoked.

Q: I have one note, or maybe, what is your opinion, because like, I have one hope in software with bugs, because I am very more afraid for malicious use of software. Like the social scoring in China or so. If there are bugs, if there are hackers, maybe we can still get around it. So, what is your opinion? Are the bugs or the software that doesn't work properly anymore dangerous, or the malicious use of software?

A: Personally I only see one solution and that is just not participating in what the world is giving us in features. So for example I myself, I don't have a mobile telephone. I don't have an alarm clock. Those sort of things that sort of draw your attention into [them]. Other than that I just share your opinions about the worries that we have at this moment.

Q: What moment did you became so disappointed in the development of software?

A: At some point there was a very good talk by somebody called Heather Miller, about the bus-factor of all the libraries out there and how worrisome that is because of our dependency on human effort to actually maintain [the libraries]. And the [suggestion] was that there should be more people that are maintaining the libraries. I turned in my head that idea around, and took it serious that perhaps we are working with something so complex that it is really true that only a very small group of one, two, perhaps three people, can actually maintain a library. So that the idea of attaching more contributors to it is actually something that is negative instead of positive. This was something, I think, now two and a half years ago, and that was the talk which at least made me also wanting to express my feelings, other then just go with the flow, and be the happy peppy programmer.

Q: Hey. Yes, so I have two questions actually, or maybe not really questions but more observations I would like you to react to. So the first one is: we were talking about when you were young, and you discovered programming, and how you used that as a way to escape the baddies at your school I guess, the humans that were offending you, and how now you are considering that computers are failing us, in a sense because we are loosing our humanity because of them. And the second one is: so, you were answering a question about which I don't remember, but you said that you were looking forward to technologies like Idris that would give us more certainty on what we're doing with programming, but in the same way Idris, and dependent types are, non decidable. And it's a known fact. And also we know we can't guarantee what Idris is doing, which is because of Gödel's theorem. So, what would be your take on that.

A: First, I offer no solutions to your second [question] because really I don't have it. But if I would search for it, I would search for it in that [dependent type] direction. I can appreciate somebody like Conor Mc Bride incredibly much, whom is, more or less, the driving force at this moment of everything new that is happening in haskell. I would search for it in compilers stopping software instead of allowing software. Your first question, eh ... thank you for the first question. I appreciate that. I do not want to take away anybody's pleasure, which I know myself very much, of how programming, on your own, behind the computer, can really create a bubble, in which you are allowed, by yourself, to flow, and in a sense I do think that that is something which is actually very good. Also at this point I would like to state that even though this is a very negative talk, I'm incredibly in debt to for example people like Martin Odersky, who created the tools for me to escape that [negative] type of feeling, and that basically also provided me with the tools to provide for an income, for my family, for myself. I think very often that is under appreciated, the fact that we depend on this other people to give us the tools, and then we accept those tools sort of automatically as already being there, and we start to say negative things about the things that disappoint us about that tools. In that sense I can be a pretty happy person in my own bubble as long as it is not [creating something that can be] applied.

Q: Thank you very much for that Marco. You mentioned a distrust of groups, and I don't know if you have been following the news in the UK for the last weeks and months, but there is a nation where I'm from which has been unable to come to a coherent decision, more recently a parliament of six-hundred and fifty people who failed to almost any decision at all. Is this evidence of the same phenomenon, that is, that you see as, problematic for software, and is that a failure of the group to find a stable equilibrium, or are they finding a stable equilibrium but one that is far from optimal.

A: I'm looking at that, ehhh ... I'm following it, thank you for your question. I'm looking at that more as an evolutionary process in which power is constantly either pushed down to smaller groups or pushed up to larger groups. I completely agree with the fact that it is a failure to reach a stable equilibrium. Historically, I would like to suggest that perhaps the age distribution in especially England makes that, coming from a background in which the UK was an empire, still tries to remain that feeling of being an empire. When it comes to the decision itself I would like to have had a vote within the UK, first for England to leave the UK, and only after that we can decide whether England can leave the EU. But I say this a little bit with my horns on. I'm also human, like, hmmmmm... That would be good for [England] to experience that first. Going through that feelings [of leaving the kingdom]. People are so sloppy with each other. Conor Mc Bride who I follow also on twitter, already one and a half years ago said: the Irish border is going to be the breaking point [of brexit]. Nobody paid attention at that moment. And you could just wait, up to the moment that very slowly, that was going to be, more or less, the breaking point. Trying to answer your question, coming from the Netherlands we are very much used to push power down to the lowest group [that] is able to responsibly handle that power. And only when they prove not to be able to handle that power, we try to push power up. I think that in the EU we a little bit too easily accepted the power at a higher level, and now we are in the dynamics of how that [plays] out. The last association which it evokes is that, I remember that five-teen years ago there was a referendum in the EU for the European constitution. Around that time I was quite young and I choose to be against it. But I remember very clearly how there were politicians going from different countries that tried to convince the people to vote in favour, and one of them was Brandt, from Germany. And the sentense which he used was "to keep in mind that you guys are the first generation of Germans and French, and French and English, and English and Germans, that, when they see each other, don't start to shoot at each other". That didn't convince me at that time, but now that I'm a little bit older... it convinces me now. I think we have a lot to loose, by allowing [to leave], or not trying to convince England to remain in the EU. And a personal opinion would be that I think there should be a next referendum, and that I would hope very much that they remain. I hope this answers your question.

Q: First of all, thank you for your talk, for the personal story, it was very interesting. You mentioned the barrier, that vertical line that the compiler sort of creates, and you said that you would like more code to stay before that line. Do you think that we are, the software that we have right now, is beyond saving because people don't... maybe it is not just the compiler that allows to much trough that barrier, but maybe people just don't spend enough time thinking about what they should put on the other side. Maybe we just rush too much decisions and ones the code is on the other side there is no way to bring it back and replace it with something better.

A: Yeah, I find it very interesting that programmers do not care very much about the actual human application of the software they write. In general we like so much to code that any problem that is given to us, we will try to solve as the problem is stated, while we could think much more about what problems we are actually trying to solve. Just for a question: who here is writing software for, let's say, to help the environment. Whom here is writing software ... [looking at Jon who says 'indirectly'] ... okay, as a library writer probably? Jon: Fury saves compilation time which makes CPUs use less... Good point, very good point. I agree with that part.

Q: If somebody from society starts paying us to write software to save the environment we would probably do it.

A: Yeah, but you are society.

Q: We're a part of the entire society, we are a very small minority group...

A: Yeah, I agree, but already just using the word we there already makes me a little bit uncomfortable, it...

Q: Why?

A: Because it separates us from society.

Q: Isn't it the same, like you have a group like baker's bake food which has a lot of calories, because they get payed for it, so we do the same as any other group around.

A: Yeah, but just because everybody jumps off a cliff does not mean that I need to jump of a cliff.

Q: No that's not jumping, we are just doing what we're here around for.

A: Is that the opinion of we or is that the opinion of you.

Q: I think it's just the way the world is working right now.

A: And that's a very good point, and I agree with that point. Yes.

Q: You talked very negatively about what most of us do as a profession, or you express criticism, let's put it this way, but you kind of said in some answer that you are very gracious to Scala and that's sort of what pays your bills, so you do software development yourself, as a job, and how that can deal with what you said just now? Thank you.

A: I have a confession to make. So, even though I don't state it out load when I'm hired, my main goal is to not get software in production, and I warrant that for myself, by knowing, that there will be a force, [that] is strong enough to balance me out and put software in production. But I would like it if there would be more on my side. So that it [becomes] really more balanced. But thank you for your remark.

Q: Question is why you say that mess is a mess. Because, we have the logical revolution which is a very weakly directed brute de force; we have the technology revolution which is also a brute de force, but less weak, directed more strongly; we have the development of type systems which are, or maybe, also a brute de force, but very strong directed. Yes? So, we have a creation where one side is brute the force which we do, and the other side is also power, is also brute the force, not to do of the second level, not to do brute the force of the first level. Why you think there exists some optimal, or maybe that you need be on one part where the level of the physical brute the force is minimal.

A: I was not able to completely follow your question. But I don't think in black and white in terms that one side can be good. I think very much that both always exist, and if I'm looking for a balance then I'm looking for a balance of both black and white existing at the same time. I thank you again.

Q: One more question, about society and what it pays us for. Society pays us for result, not for software. What is software? We can see as developers. For me, good software is like a good story. Scala is good software. That's why we are here. But society doesn't care. Good story or bad story, they need just result. Plane flying. Car riding. Everything works. That's all.

A: I'm looking forward to your presentation on that subject.


On Denotational and Implied Semantics was presented by Marco Borst at the ScalaUA conference in Kiev at 2019-03-30. Transcripted as was audible, corrected for mistakes with phrasing and terms in square brackets. All comments are welcome, if you have any questions feel free to ping me at nmcb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment