The Peterman Pod - Creator of OCaml: Functional Programming, Formal Verification, Programming Languages | Xavier Leroy
Episode Date: July 20, 2026Xavier Leroy (creator of OCaml) is an expert in compilers, formal verification of software and functional programming. This interview should be an approachable resource if you're curious about for...mal verification of software since I was learning that on the fly during it.• My ergonomic keyboard project I mentioned, you can follow along here: https://read.compose.llc/• The Kickstarter page for it: https://www.kickstarter.com/projects/ryanlpeterman/compose-simple-ergonomics-beautifully-donePodcast links:• YouTube: https://youtu.be/9Cswiqrq6So• Apple: https://podcasts.apple.com/us/podcast/the-peterman-pod/id1777363835• Transcript: https://www.developing.dev/p/creator-of-ocaml-functional-programmingThank you to this episode's sponsor for supporting my work:• WorkOS: makes your app Enterprise Ready with easy to use APIs to add SSO, SCIM, RBAC, and more in just a few lines of code, check them out at https://workos.com/Timestamps:(00:00) Intro(00:43) What sets OCaml apart(04:39) OCaml vs Rust(07:57) Why is manual memory management more performant(11:21) Javascript vs OCaml(14:00) Famous Rob Pike quote(16:05) Type inference and how it works(22:12) What is formal verification and how does it work(40:07) What made multicore support difficult for OCaml(50:17) How programming languages interface and call each other(57:41) The danger of almost-correct LLM code(01:05:39) How LLMs will change programming languages(01:10:26) Industry vs academia(01:15:05) Most interesting unsolved problems(01:18:30) Top book recommendations for engineers(01:21:17) Advice for his younger self(01:23:31) OutroWhere to find Xavier:• Wikipedia: https://en.wikipedia.org/wiki/Xavier_Leroy• Website: https://xavierleroy.org/Where to find Ryan:• Newsletter: https://www.developing.dev/• X/Twitter: https://x.com/ryanlpeterman• LinkedIn: https://www.linkedin.com/in/ryanlpeterman/• Threads: https://www.threads.com/@ryanlpeterman• Instagram: https://www.instagram.com/ryanlpeterman• TikTok: https://www.tiktok.com/@ryanlpetermanReferenced in this episode:• CompCert verified C compiler: https://compcert.org/• seL4 microkernel: https://sel4.systems/• Programming Pearls (book, not an affiliate link): https://www.amazon.com/dp/0201657880• How to Design Programs (book): https://htdp.org/
Transcript
Discussion (0)
Testing can only show the presence of bugs, but not their complete absence.
This is the creator of the OCam programming language,
and I asked them all about programming language design and formal verification.
Oh my God. I'm not a big fan of JavaScript.
And Rust is the finest language for manual memory management.
Manual memory management is not always faster.
Maybe this will be the decade of formal verification of software.
If you took LM generated code and turned it up, what languages would become more popular, what languages might fade away?
Here's the full episode.
What sets O-Kamel apart from other programming languages?
It is a fine functional language.
You can write functions by case over inductive types and recursion and combine them with combinators and higher other functions and everything.
So it's really a fine functional language, but it's also a fairly decent systems programming language.
And so it has full imperative power.
It has lots of interesting control structures, exceptions, threads, handlers for user-defined effects, which we added recently.
And it has a very predictable cost model, execution model.
So when you write your code, you have a pretty good idea what will take time and what will be fast and what will be slow.
And that's not the case for all functional languages.
Some are pretty unpredictable.
And then the implementation is also pretty performant.
Okay.
So there's a fairly decent compiler, not the best in this class, but the code is pretty efficient.
There's a very good allocator on garbage collector with low latency, so you don't have much poses.
you don't have long, long poses, and that's quite important when you do things like network programming.
And so you can write systems applications in a mostly functional style, and with all the benefits of functional programming.
And so initially, OCamel wasn't designed for those kind of applications.
So create was more for things like
for fear improving or
implementing domain specific languages.
And then we got
some of our first users
who were from the systems community,
in particular,
the ensemble
project in the late 90s at
Cornell University. So it was a
network stack for
a network protocol stack for
reliable multicast
and those kind of, you know,
collaborative distributed applications.
occasions like collaborative editing or multiplayer video games. And their first code was in C,
of course, there were systems people, right? And it worked, but it was unmaintainable and they
couldn't extend it anymore. And someone had the idea to try Okameh. And so first the code became a lot
nicer and easier to evolve. And the performance was about as good as a C code. And in particular,
they had this brilliant trick of running the garbage collector while packets are in flight.
Once you've sent a packet, you're idle for a few microseconds,
and so you can run some GC.
It costs nothing.
And so they were very happy with that.
And then there were some other projects like this using OKML4 systems application,
like the Mirage, Myrache, Unicernels.
And another benefit or consequence of this ensemble project
is that one of the PhD students working on that was Yarn Minsky,
who then went to Jane Street and implemented their trading infrastructure in Okamele.
So that is still today when I have big users.
And again, they do automatic trading, so it must be.
be fast and reliable and no long pauses, but they also want the elegance of functional programming.
They want non-programmers to be able to read and their code like financial engineers or
quantitative analysts.
And so, yeah, so Camel is a fairly good match for those kind of applications.
I thought it might be interesting to ground some of the conversation here by making
comparisons across programming languages, maybe ones that people know more. When you think about
Rust versus O'Kamel, what are the big differences and the pros and cons of the various design
decisions in those languages? The big dividing line is between Rust and O'Kamel is, well, O'Kamele has
automatic memory management, garbage collection, and Rust is definitely a language for manual memory
management.
It's the finest language that I know for manual memory management.
It manages to make it mostly safe with the discipline of borrowing, et cetera, and tracking
ownership and so on.
So it's infinitely safer than C or C++, but it's still a language where you allocate
and free memory yourself.
And on the one hand, it gives more control over what the program is doing.
On the other hand, it's still a big responsibility.
It's significantly harder to write programs when you have to manage your memory,
even with the help of RUST's types.
So, yeah, for me, that's kind of the main dividing line.
Otherwise, Rust has many of the high-level features of functional languages,
in particular in data structures and the ability to do pattern matching and so on.
So it's a very interesting design because they really managed to some kind of fusion between,
you know, C or C++ style low-level programming.
and some of the high-level facilities of functional programming.
But still, that divide garbage collection versus manual memory management remains.
So it sounds like this is a performance trade-off where you give more to the programmer in exchange for higher performance.
That's mostly true.
They said manual memory management is not always faster.
Or you need to be a very good programmer.
so that it's always faster.
There's been some mostly C++ code, for instance,
that there's a lot of copying of objects just because, you know,
you're not quite sure you're the only owner.
So you make a copy and now you're the only owner.
But the copying is quite costly in time and in memory plot.
So, and for those kind of applications,
garbage collected language is better.
And likewise, with a GCE, you can work with shared sharing in data structures, okay?
And it's perfectly safe.
While sharing is kind of limited with the rest ownership discipline.
There are more constraints.
And so you may end up unsharing and so using more memory.
It is surprising to me that that may.
manual memory management would in many cases be more performant than automatic.
Because for instance, in other patterns in computer science, like let's say letting the compiler optimize things for you instead of optimizing things yourself,
I would have thought that, you know, letting some system manage memory for you rather than manually managing it would also be better.
So why is there a difference there?
Well, because garbage collection takes place at runtime.
time. So indeed, from time to time, the program is no longer computing, executing what you've
wrote. It is actually a scanning memory, trying to find memory that is no longer used. So,
so there is a runtime overhead. And it can be, depending on applications, 10%, 20%, maybe sometimes 30%.
But again, that doesn't mean the whole program is 30% slower than if you had written it with manual memory management, because there may have been other costs, as you said, of manual memory management.
But, yes, there's been a lot of research on trying to do more, let's say, compile time, automatic memory management.
And you can do that to some extent, but it's for some programming styles where it's easy to track the lifetime of objects and data blocks.
But in general, you still have quite a bit of work to do at runtime.
I think a lot of people for a garbage collection, they might think of it as a binary thing.
Or it's either you have it or you don't.
But I wonder in OCamill, is there some way to like turn down.
the memory management and do some manual.
So kind of like a mixture to have the benefits of both.
So that's one of the things that the Jane Street people are looking at.
So they have their ox camel variant oxidized okamele, which is kind of okamele with some
inspiration from rest.
So it's still very experimental.
But yeah, they've been playing with things like stack allocation of some data structures.
So that automatically deallocated when the function returns.
that is quite cheap.
Yeah, there are a few things you could try,
but I'm not sure they are going to make such a big difference.
I remember doing with the students some experiments
with stack allocation of data structures a long time ago,
and you don't win as much as you would think.
Basically, garbage collection or heap allocation is pretty cheap
for objects that have a very short lifetime.
If they die before the next garbage collector,
they will cost very little in garbage collection time.
But it's more expensive for long-lived data structures,
because those will be scanned and analyzed multiple times.
And stack allocation works for the first kind of objects,
things that have short lifetime anyway.
So you don't win as much as you think.
One of the most popular programming languages, JavaScript.
Curious, when you think about the difference between JavaScript and OCam,
what's the main thing that comes to mind?
Yeah, I'm not a big fan of JavaScript.
Well, so JavaScript is, well, first, it's very dynamic.
So type checking is entirely dynamic, but it's more than that.
I mean, pretty much everything can be really fine at runtime,
including, I don't know, the semantics of method in vocation, for instance.
So really some pretty fundamental aspects of the language are very flexible.
So some people say, oh, that's great.
We can do lots of meta programming, et cetera.
And to me, it's a big weakness.
I mean, it makes programs that can be very fragile and also have some security issues.
So, yeah, so JavaScript is a ultimate dynamic language, in my opinion.
While Okamele is very static, static typing, static binding,
pretty much everything is fixed at compiled time.
Okay.
And then, well, I guess it's kind of a different data model.
JavaScript is a little more object-oriented in the way it presents data.
Maybe that's not that important.
And to say one good thing about JavaScript is that it also contains a decent functional language inside.
You know, there's a little bit of a little core of JavaScript, which is basically LISP, and can be used to do functional programming if you want.
And actually, the designer of JavaScript, I think, was a former LISP person.
I can't remember his name, but...
Brandon Ike, maybe?
Yeah, Bannon Hick, yeah.
There's a little bit of heritage from LISP to JavaScript, but a very dynamic kind of LISP.
You said you weren't the biggest fan.
Is that just because of the dynamics or is there some other aspect?
Yeah, mostly the dynamics.
I think they really went overboard with that.
This kind of meta object protocol where you can really find the semantics of very basic operations like method invocation.
The fact that a method can, there's a lot of introspection, a method can look at its own call stack, look at its callers, look at the code of its.
scholars, which is a security nightmare.
All those things, I think, are completely unnecessary and not conducive to good programs.
Easily abused.
Yeah.
Easily abused.
I think on the topic of functional languages compared to imperative languages, there's
this thought that functional languages are kind of harder to learn or maybe they have
more perceived complexity.
And actually, when I'm my research, there's this.
popular quote from the designer of Go, Rob Pike, and he's talking about what they intended to do with Go.
And he said, you know, the key point here is the programmers are Googlers. They're not researchers.
You know, they're young, fresh out of school. They're not capable of understanding a brilliant language.
And I think, you know, that thought of a brilliant language is often attributed to functional languages.
what do you think about, is a language like O'Camel harder for programmers to grasp than imperative languages?
I think functional programming is not fundamentally harder, especially if you have a little bit of mathematics background.
So coming back to the quote by Rob Pike, I think it describes very much how they go about hiring at Google.
They hire a lot of engineers who are fresh out of college.
Some of them have a master's degree.
And then they train them internally.
Other companies, I think, tried to hire people with more education
and perhaps more diverse backgrounds.
And, yeah, so Jane Street, for instance,
and some others use Okamele as a filter on who they want to hire.
Yes, they have a few.
were applicants, but in general, they have more interesting backgrounds.
So, and perhaps one last thing I would have to say, Python is 50% functional language.
Okay.
A lot of good Python code looks like functional code with comprehensions.
So I think people are already halfway through functional programming when they are comfortable with Python.
Yeah, when I was learning O'Kammel.
in college, I think one thing that really stood out to me,
and I thought was interesting, was this concept of type inference,
where the compiler is kind of,
it knows the types of everything implicitly
in the way that the code is written.
Can you explain type inference and what the advantages are?
Well, the basic idea is that you don't have to declare
the type of every variable you introduce,
every function parameter, every local variable.
Because quite often the type can be deduced from the uses of the variable.
Okay.
Like if you do, I don't know, X equals string length of S,
then you kind of know that S is a string and X is an integer, right?
Because that's what the string length function, that's a type of string length.
And it tells you that.
So that's a basic idea.
Now the actual realization is a little more complicated.
basically you need to collect a number of the compiler needs to collect a number of constraints
and then try to solve them.
Well, if there's no solution, then it's a type error.
But sometimes there are several solutions and you must find good criteria to choose one.
Otherwise, I mean, it also needs to be predictable for programmers.
And often also you can still put type annotation.
As a programmer, you can still put type annotations if that makes a good.
code clearer. So I think the main advantage is precisely to have less verbose code, less verbose
code where you don't, you don't need to put types everywhere, but only where they help
a documentation and documenting the code and making it easier to read. But quite often you,
for small local functions, for short-lived,
or variables, the type is obvious from the context.
So let's just a minute.
If I'm trying to figure out how this type inference works,
the intuitive example you said makes sense.
But you mentioned it seems to be some sort of system of equations that you solve
or something like that.
Can you give a concrete example?
Maybe, what does that look like to the compiler?
Okay.
Well, for a slightly more complex example,
say you have function with two parameters, X and Y.
and then you do if x equals y.
So that tells you that x and y have the same type,
but there still doesn't tell you which type it is,
assuming polymorphic equality comparison.
So you've learned something about x and y,
that they have the same type,
but you still don't know what the type is.
And later, maybe you will learn something about the type of x,
and now you will have determined the type of y as well.
So that's the kind of constraints you accumulate,
and solve.
A little bit like, you know,
Sudoku or those kind of puzzles.
And then there's the interesting case
where you don't have enough constraints
to find a unique type.
So maybe in the end, X and Y will be,
you know they have the same type,
but it's still unconstrained.
And then that's where you automatically
get polymorphism for free.
The type checker says,
okay, those types are unconstrained,
so it can work for any type.
So my function can take an X of any type and a Y of the same type,
again any type, and it's a polymorphic function.
So there's this beautiful, I think, phenomenon
that polymorphism can be discovered
just by running type inference and noticing that,
oh, there are no constraints, so it must be polymorphic.
And that was a guide insight by Robin Milner,
the British computer scientist pioneer,
who invented this ML family of languages and this kind of type inference in the 70s.
Polymorphism was not well understood at the time.
And so the fact that he could have,
he could introduce polymorphism so easily in his language,
just as a consequence of type inference was a beautiful discovery.
So for type inference, it seems like the benefit is, you know,
the code is, you know, the code is.
going to be a lot more concise because we don't need to write out all the types, which seems
nice. But what are the tradeoffs of adding type inference to a programming language?
Well, as I said, type error messages can be very confusing because they not always point
to the actual source of the type error. Okay. The system may have done some wrong inferences
and will report some of those inferences instead of reporting the actual source of the type error.
So it's been a subject of much research, and there's no very well-defined idea of the source of a type error, basically.
So, yeah, so errors can be an issue.
Some features of type systems are easy to combine with type inference, to handle with type inference, and some are harder.
For instance, when it comes to genericity, so I mentioned parametric polymorphism, which is very well handled.
But subtyping, the kind of thing you have in object-oriented languages, is actually harder to combine with type inference.
For super technical reasons that I'm not going to go into.
So sometimes you have to make a choice.
Either you have type inference, but it is less powerful.
Or you have a full type inference, but a more restrictive type system.
And that choice is part of the language design, actually.
You mentioning this solver kind of reminds me of the topic of formal verification.
Could you explain what formal verification is?
Well, the idea that for some programs, you want to
you want strong guarantees that the problem is correct and guarantees that are hard to get just
with testing and reviews, code reviews.
You know, there's this famous quote by Daigstra, the Dutch Computer Pioneer,
which goes something like, testing can only show the presence of bugs, but not their
complete absence, because in general there's infinitely many inputs to your program and you cannot
test demo. So you're only testing a sample and sometimes you have surprises. So what if you want to
make sure that program is correct for an infinite number of inputs? And that's where you need to
turn to those so-called formal methods. So you're using mathematical reasoning, you're using
static analysis algorithms on your program, to really analyze all possible executions of a piece of
code and making sure that it matches a specification.
The specification can be very simple, like the code will never crash, given well-formated inputs.
So that's a fairly simple property, but still extremely useful, because code that crashes is
always code that can be attacked.
It's often a security hole.
So for instance, all accesses within a way, all accesses are always.
within bounds. That's a very simple property and it's very hard to ensure just by a type system or
just by testing. So that's where you need some more advanced formal verification. And then
there are much more precise specifications that you may want to check. That can be where
the program always terminates. It can be the program doesn't leak confidential data. It can even be
well, the program computes this mathematical function with an error,
floating point error under, I don't know, 10 to the minus six.
Okay.
Something like that, something very precise like that.
And so it's been a really hot topic in software sciences since the,
at least the 70s, I would say.
There's lots of techniques.
Some are just fully automatic like that.
static analysis, but they're already pretty good at finding bugs and making sure that some
bugs like a way out of bounds are not there. And some are a lot more interactive and require a lot
more program or assistance to write specifications and then do so-called program proofs, so
proving mathematical statements about the program. I hear about it a lot more now, which is
lean and these theorem provers. What are
are those in this context and how are they used?
So, yeah, so Lean is an example, an instance of the so-called proofers or proof assistance.
So originally those were developed to do mathematics in the computer.
So nothing with not formal verification of programs, but they can also be used for formal verification of programs.
But the initial motivation was really to do mathematics with the help of the computer.
Well, originally, everyone focused on automatic theorem proving.
So having the machine find proofs all by itself, but that's very, very difficult.
And not necessarily what mathematicians need.
And so those proof assistance are more like, well, formal languages.
like programming languages,
but where you can write mathematical definitions,
mathematical statements,
and they will help you prove.
So some small proof steps they will do automatically.
And for others, the user still has to guide the prover
through the major steps.
But the good thing is that the proof is recorded
also in a format that the machine can understand
and re-check.
So when you complete a proof in Lean or Rock or Isabel
or one of those tools.
And it is rechecked.
And the computer makes sure that all inferences are justified,
that you didn't forget any case,
that you didn't use a conclusion as an hypothesis,
or all kinds of problems you can have with a pencil and paper proof.
And so in the end, you get proofs that are extremely reliable,
extremely credible.
And it's been, so those tools,
have been used a little bit for some big mathematical results where the proofs are so big that they can't be done just by humans.
You really need computer assistance. I think there's a recent example with a weak gold bar conjecture.
So part of the proofs involve checking a whole lot of inequality, maybe a thousand inequalities involving several realties.
variables and blah blah blah. And so computer assistance was really needed to make sure that
everything was checked and there was no human mistakes left. And maybe we'll talk about
generative AI later, but there's also now a lot of interest in conjunction with generative AI.
AI is pretty good at coming up with plausible proofs, okay, but then they have to be checked
by humans.
Unless
AI writes a proof
in one of those formal languages
like Lean,
in which case it can be checked
by a machine
and that's
much more effective.
So yeah,
so it's the idea
of using the machine
to help you write proofs
and recheck proofs
that you've written yourself
or maybe with some help from an AI.
And now those tools
can also be used to prove
properties about programs.
And so I spent many years
proving the correctness of a compiler,
C compiler, using one of those tools,
the RAC proof assistant.
So basically,
when I'm proving about the compiler,
so it takes C code, it produces assembly code,
and proving that the assembly code is phase four
to the C code.
So there's no means.
miscompilation. The compiler didn't introduce a bug in the program that wasn't there originally.
And it's a fairly big proof because compilers do complicated things about programs,
and then you have to define exactly what it means to preserve the semantics of a program.
So you have to define the semantics of your programming languages.
And so it's all a very good use of those proof assistance.
The same work could be done on paper, but, I mean,
This would be a proof of several thousand pages and nobody would want to read it.
Nobody would trust it.
It's just too big.
And it would be very hard to evolve.
Good thing about those mechanized verifications of programs is that it can also help you evolve the program.
You can add new features and so on and adapt your proofs and be really sure that you haven't introduced a regression or things like that.
So it's really programming taken to a higher level.
And today is quite expensive.
It takes a lot more time to prove a program than to find it in the first place.
But maybe this is getting a little better.
Yeah, and I should also mention another great example of verified software.
It's a microkernel, the SEL4 microkernel developed in Australia.
and which is used as an hypervisor in some applications.
And so it's really like 8,000 lines of extremely technical C code
that, you know, manipulates processes and capabilities and security tokens and so on.
And it's been proved correct.
Every line has been proved correct.
And that's a very big achievement.
When you mentioned the example of verifying a mathematical proof, that makes sense to me.
When you talk about proving something about a program, it's a little bit more abstract to me
or having some trouble visualizing.
Could you give a concrete example, like maybe some trivial program and we're trying to
prove something about it and how that theorem prover would work?
Let's say you have a function that takes three numbers.
X, Y, Z, and returns the average of those numbers.
Okay.
Only, yeah, and maybe you're using a not completely obvious formula, like T equals X plus Y,
and then T equals T plus Z, and then T equals T divided by three, and then return T.
So not exactly the formula for the average.
And you want to prove that that function is correct.
So you want to prove that it returns X plus Y plus Z divided by three.
And maybe you will have to make it clear whether you're rounding up or rounding down.
If you're using integers or floating point numbers, you know, it's not an exact arithmetic.
So yeah, you will have to say exactly what you're.
mean by divided by three. And then if you're in a language like C, you can have arithmetic
overflows. Okay, when you compute X plus Y or plus Z, you can overflow the range of
representable integers. And in C, it's a bug. It's an undefined behavior. So typically,
you will want to put a so-called precondition under function saying, okay, if you call me,
call me with numbers that are between, I don't know, zero and one million, for instance,
but no bigger than that. And then the Prover will check that no overflow can occur in this case.
Okay. And so basically you have the precondition that says, okay, these are safety guarantees
that must hold of the parameters. Otherwise, anything can happen. And then there will be a little bit
of kind of symbolic execution of the function body.
It says, okay, when you do T equals X plus Y, then T plus equals Z, then T slash
equal three, then in the end, T is X plus Y plus Z divided by three, provided no overflow occurred.
And then you put that with a precondition that says there cannot be any overflow, and you get
your final result.
Okay, so basically you're stating a contract for your function, a pre-appetises on the
arguments, guarantees on the results, and you want to prove, analyze the function body to show
that this contract is respected. I hope it's a little more concrete. So it sounds like a lean
will help you basically take in some invariance about a program and kind of propagate them
through line by line and uphold them. And so you can say something about. Yes. Yes.
Maybe not Lean by itself.
A program prover.
A program prover will do exactly what you say.
And for Lean to be able to do it,
you still need to teach it a little bit
about the semantics of your programming language.
Okay, that what does a plus means,
what does assignment means.
Lean is mathematics.
You don't assign in mathematics.
You don't say X equals X plus one.
Or you're just comparing X and X plus Y,
and it's always false.
There's no assignment in mathematics.
There's assignment in many programs,
so you need to make it explicit
that there are three different states
for the T variable, three different values,
and relate those values to,
well, the program defines what those values are,
and then a provover-like lien can reason
about those three successive values,
because now you're in part,
you're in mathematics.
And that kind of a bridge between programs and their mathematical meaning is called semantics,
that the field of semantics of programming languages has been a big topic in peer research
since the 60s at least.
Am I understanding then that like a pure functional programming language, that gap between mathematics
and the actual symbols is much smaller than an imperative?
Absolutely.
Yeah, you're absolutely right.
And that's one of the reasons why people who do formal methods don't like assignment, don't like imparti features.
Purely functional style is much closer to mathematical style, so much easier to reason about.
There can still be a few discrepancies between the program and the math.
For instance, functional programs may not terminate.
They may loop forever.
Mathematics doesn't like that.
So you need a way to reasonable termination.
And also, yeah, sometimes, for example, the arithmetic you get in the programming language is not integer arithmetic or it's not real.
Rehalls, you know, it's floating point.
It's not real.
So you still have to account for that gap.
But you're absolutely right that the gap is much shorter for functional programming.
And in the experience of ComServe, my verified compiler,
I think the first decision was to violate it in a purely functional style
so that it would be easier to reason about it later.
You mentioned the specifications that we could prove.
And one of them was proving that the program terminates.
But I thought that's a famously difficult or impossible.
I forgot exactly the halting problem, right?
So how is that something that you could prove?
Okay.
So what the computability theory says is that there is no algorithm that will always,
that can always say this problem terminates or this program doesn't terminate.
So there will always be some very weird programs for which your analyzer,
your automatic termination analyzer will produce a wrong result or will not terminate itself.
so it will not work.
But still for many programs you can succeed.
You can write automatic termination analyzers
that will work for a large class of programs.
And then the termination analysis,
termination proof can also be done by hand
by a mathematician.
So perhaps
a human can
can see through those weird touring programs that are hard to prove to terminate and
recognize the trick.
But anyway, so yeah, it's a hard problem.
And all program verification tasks are difficult problems.
Okay.
They are pretty much all undecidable.
So you know that there is no static analyzer that will always find all problems, all problems in all programs.
But still, you can try.
Okay, you can try for specific problems, for specific programs,
and get some very useful results out of that.
You only need to be able to do it for the cases that are of interest to you,
the programs you really care about.
Open AI, Anthropic, Cursor, and Versal all use this product to make their lives better.
And the problem it solves is when you're building SaaS or an AI product,
and you want to sell to other companies,
there's all these requirements you need to meet.
There's SSO, there's SCIM, there's ARBAC, there's audit logs.
These are all things that take time to integrate, but aren't the main focus of your app.
WorkOS is an API layer that lets you meet all of these requirements in just a few lines of code.
So let's say you have a new SaaS product and you want to sell to other companies.
WorkOS will solve all of these critical feature gaps for you.
You can check them out at WorkOS.com to learn more and get started.
and I appreciate them for supporting my work and sponsoring this podcast.
One thing I saw when I was researching O'Camel is that in 2022,
O'Camel added multi-core support.
But from my memory, I remember multi-core processors became standard much earlier than that.
And so I figured there might be some unique engineering challenge in adding that support.
So, yeah, what happened there and what made it difficult?
Well, there were engineering challenges, for sure.
There were also some language design issues.
But let's talk about the engineering challenges first.
So it's true that when you have a language with the runtime system, memory allocator or garbage collector,
well, at least the one for O'Kamel was really designed with sequential executions in mind.
So if you add a shared memory concurrency,
then you need a garbage collector and a memory allocator
that can work concurrently.
And that's actually quite difficult.
At least if you want them to be fast.
Of course, you could always, you know,
take a lock at every operation in the heap,
but then you would sequentialize your programs.
Basically, they would run as slowly as a single processor.
So that's not interesting.
So, yeah, so there were engineering challenges.
And, yeah, it was at least initially quite reluctant to basically re-implement a complete garbage collector and memory allocator and large parts of the runtime system.
That's what we did eventually with, well, it was done mostly by the team at Okamell Labs at Cambridge University.
But, yes, it was a really big rewrite.
But then I said there's also a language design issue, which is that for the longest time,
well, now when you say multi-core processors and so on, pretty much everyone, and language support for multi-core processors,
everyone thinks about language support for shared memory, concurrency.
you know this model where you have several threats of control and they access the same memory
and basically the threats communicate by modifying the memory and someone else is going to know this.
You know, I've never liked this model of communication.
I mean, it's a bit like if you want to communicate with your neighbor,
then you break into their houses and their house and then you move the furniture around
and then when they are back, they say, oh, something was moved.
So it's probably Ryan who's trying to tell us something.
Maybe you could just meet your neighbors, you know.
And that would be things like message passing,
which is a completely different form of communication, much higher level.
So, yeah, so for the longest time,
I was really interested in message passing concurrency.
And there's, for instance, there are a functional language called Erlong
that was built on those ideas and that I found quite interesting.
However, I never got to have a decent language design.
And everyone was saying, no, but it's too costly.
It's not effective.
There's too much copying of data.
With shared memory, you can share some kind of huge database in memory.
If you don't modify it too much, then basically the sharing, the concurrency is free.
While with message passing, we'll have to exchange a lot of data, so to get the same effect, so you will pay more for it.
Anyway, so, okay, so starting with Java, I guess, and then C-C++-2011, there was this idea that, okay, we need to expose shared memory concurrency to the programmers.
But then comes the problem of the memory model, which is that what happens when there's a race, for instance, when two,
Two sides want to access the same location, and maybe they want to modify it in different ways.
And so sometimes parts of the CC++ standards say it's undefined behavior.
Anything can happen.
But still you need to give a little more guarantees.
At the other end of the spectrum, there's so-called sequential consistency, which says, well, what happens is like an interleaving of reads and rights of your program.
You don't know which interleaving, but there is an interleaving.
But that doesn't work with modern processors, multi-core processors.
They reorder memory accesses in very clever ways to get more performance.
And so viewed from the program, it's very hard to predict what they are actually doing.
And so you need to give your programmers, when you're designing a language with shared memory concurrency,
you need to give your programmers some guarantees about the ordering of reads and rights,
concurrent reads and rights, while not constraining the hardware too much.
And it's very difficult.
So Java went through like five different iterations of the memory model.
Some were two straight, somewhere too lax,
some were inconsistent,
where we're making predictions, impossible predictions,
where the past depends on the future.
Crazy, really crazy stuff.
Then C++11 did a little better,
but still extremely complex memory model.
And so when we wanted to add,
especially the Okamele Labs people wanted to add share memory concurrency to Okamele,
we had to also agree on a memory model that would be exposed to the program rules.
And that also took quite a bit of a design, quite a bit of time to come up with a good design.
And I think it's better and easier to understand and use than the one of Java.
But the Okamele memory model is still quite complicated.
And sometimes I feel sorry our users are exposed to that.
So that explains why it took so long, solving the engineering challenges, but also having, agreeing on a memory model and what kind of guarantees we are going to give to programmers.
Oh yeah, I forgot to say one thing, which is that so in CNC plus plus there are a lot of things you can say.
always just undefined behavior or anything can happen.
In typesaf languages like Java and OkMEL,
you want to give stronger guarantees.
Maybe many things can happen,
but your data should remain well typed.
Typically, you don't want to expose an object
to another thread before it's been fully initialized, for instance.
And that's actually very hard to guarantee
in your memory model.
And then you have to implement that memory.
model. So your compiler also needs to take extra precautions to guarantee this. So yeah, type safety
in the presence of shared memory concurrency is not obvious at all. So that's why it took so long.
So in Python, I know this is the famous Gill or the global interpreter lock. What is that lock
protecting? Is it the cleanup of objects on the heap or is it something else? Among other things,
Yes.
So yeah, we had the same thing in Okamele before.
Before multi-core Okameel was merged in.
So, yeah, well, basically the idea that when your runtime system is not threat-safe,
as we said, you can protect the non-threat-safe functions by your lock
so that they will never be executed concurrently.
But if you take the lock at every allocation and release it,
you take and release the lock for every allocation that is just too slow anyway,
And so the idea is that you take the lock when you enter Python code, let's say,
and you start executing Python code.
But you can still release it when you do input output, for instance,
when you're going to block for a long time,
or when you're calling into C code that is thread safe and is not going to use your runtime system.
Then you can release the lock and some other Python thread can take it and execute.
So you get a little bit of concurrency.
You can overlap computations in your high-level language with I.O.
Our computation is a low-level in another language.
But you still have neutral exclusion between two threads running Python or running OCamel before multi-core OCam.
So you get some benefits like concurrent IO, but you don't get any parallelizer.
You don't get a speed-up.
for computations.
And so, yeah, so we used to have this guild in, you know, Camel as well.
And so you can get rid of it, but in general, you need to redesign at least a garbage collector and memory allocator.
There's probably a few places in the Okamele runtime system.
They still use locks to ensure mutual exclusion, like in the IEO sub-system.
And some phases of the garbage collector, I think, there's a phase which is kind of stopped the world
where you need to make sure that everyone, no Camel code is running.
For a short time, you need to make sure that everyone is stopped
and then do a little bit of work to finish the GC, and then you can restart everyone.
So, yeah, these are tricky things.
And I don't know what the Python people are up to with their gill,
if they finally manage to remove it or they're still working on it,
but I've heard they're making progress.
Yeah, you mentioned Python calling into C,
and I've seen that pattern before of a higher level language interfacing with a lower level one.
How does that binding typically work?
Oh, it's another kind of worms.
Well, there are two aspects.
there are the control flow and there are the data.
So the control part is not that hard.
So yes, you need a mechanism so that your Python interpreter
or your OCaml compiled code will actually jump to the C function.
So for OCamel, basically, you tell the OCaml
that this function is not implemented in OCamel.
It's actually implemented by the C function and you give its name.
And then the compiler will emit a call to the C function.
using the C calling conventions, which are not exactly the same as the OCaml calling conventions,
but the compiler knows about that.
And so it will call the C function, maybe through a little bit of glue code, whatever,
and then the C function will execute and return back to the Ocamel code.
That's relatively easy.
Now the hard part is data, like function arguments and function results.
because Okamele and C have different data representations.
For instance, a floating point number in Okamele is generally boxed.
So it's allocated in the heap and handled for a pointer.
So it's more like a double star in C.
It's not a double, which is not allocated, just sits in a register.
So typically the C code needs to use the so-called firing function interface,
so some C function and macros provided by OCamL.
To access the OCamL data, the OCamel arguments,
extract the part that it needs, the numbers.
Yeah, another example is arrays.
In OCamel, when you have a two-dimensional array,
it's actually an array of arrays.
So view from C is an array of pointers to arrays.
While in C, an array of arrays is there's no intermediate pointer.
So it's not the same representation.
And so you have to explain to C or give C some functions and macros to access elements in Okamell arrays.
It's not exactly the same code that you would do to access a C array from C.
Okay, so you need accessors, but now if you want to, if your C code wants to return some complex results,
like a list, an array, and so on, it needs to allocate it in the Okamel heap.
So it needs to ask the runtime system to do some heap allocation and then fill the heat blocks correctly.
And then this allocation can trigger garbage collection.
So the C code must also kind of cooperate with garbage collection with route registration mechanisms, etc.
So there's quite a bit of work to be done.
And then different function interfaces arrange this work differently.
So the base FFI for Okameh, basically, it's a C code that must do all the work.
But then it can be very fast, quite optimized.
But there are other FFIs, like the C types, FFI in Okamele,
where most of this data conversion and mediating between two data formats is automated.
You start basically with the description of the C type of the C function,
and you can automate some of those conversions.
but sometimes it can be expensive.
For instance, you may end up copying a whole array
while your C code only needs to access two or three elements in it.
Okay, so there's lots of trade-offs,
and quite frankly, it's a dirty part of programming language implementation.
The OCamL FFI is not that clean,
but if you get the Java FFI, for instance, it's also quite complicated.
it. And for Python, I never tried. So I don't know what it looks like. But yeah, it's a necessity,
but it can be quite hard because the data models are different between the two languages.
So to kind of get the big picture, on the OCamle side, there's an interpreter, which is a program
running an application space that is interpreting your OCaml code. And then at some
point in the OCaml code, it says, do some, you know, load this C program. And the C program
is a binary somewhere. And the OCam interpreter then starts to load those instructions
and execute them. Okay. So actually, this is the third aspect that I didn't touch. So Ocamel, well,
there's an interpreter mode, but in general, we compile. We compile to assembly code and then machine code.
And so in compiled mode, what you say is how you put together the OCaml code and the C code is done by the linker, the C linker.
So basically someone else is doing that for us.
And it's not that different from linking together to object files produced by C or to object files produced by OCam.
But you write that for more interpreted languages.
There's also the question of how you load the C code.
You use a dynamic loading interface, DL open, for instance, in Unix.
And then there's a little bit of introspection.
So at runtime, the interpreter with queries, the C library.
Where is the address of a function named Fu?
And then it will find the address and use that to manufacture a call.
So yeah, if you're in an interpreted setting or bytecode compiled setting like Python,
there's this additional level of complexity on top of it.
I see.
I see.
Okay.
So if I had a mixed O-CAML-C program to my computer, it's just one binary or one blob.
In the simplest case, yes.
there are also dynamic loading facilities in Okamel,
but I don't want to get into that
because I'm a firm believer in static linking.
I think programs should be statically linked
so that there's no surprise when you run them.
Like, oh, where is this DLL?
Or DLN not found, for instance, the problem.
But of course, you lose a little bit in flexibility.
But yeah, I think static linking
has a lot to
is actually quite useful
in that it guarantees a lot of things
it checks a lot of things at link time
that you don't have to check again at runtime.
We mentioned earlier in the conversation
talking a little bit about LLM generated code.
I thought that might be interesting to cover.
And in one interview,
you talked about the danger of almost correct code.
So plausible code,
but it's wrong that an LM can produce.
and what are your thoughts on how to address that kind of problem?
It's a tough problem.
I mean, globally, I'm a little bit skeptical about General EBI.
Of course, they can do amazing things that were unthinkable like a few years ago.
But there's always some errors.
Okay.
you can't really trust what's being produced by generally VI.
And so in principle, humans should be there to check the output and fix errors
or ask the LLM to fix its own errors until the result is actually usable.
But of course it's very hard because, well,
slop problem.
AI is produced so much,
it's so easy to produce
to produce
large numbers, large quantities
of text, of code, or
pictures, whatever,
that in the end
there's no human
no human time to
check it all.
So, yeah, recently
I heard
when someone
working in an AI startup who
enthusiastic about AI generated code saying that thanks to generative AI,
the cost of programming is dropping to zero.
Well, the cost of writing code maybe, but what about, you know,
checking it, making sure it is correct, that it does what we want,
that, well, that cost is not zero at all.
And for me, every new line of code is a liability.
You have to test it, you have to check it.
Maybe you have to do formal verification.
You have to evolve it, maintain it later.
So, no, I don't want huge amounts of code.
Okay, I want, there are 50 lines of code that have been thought,
that have been polished over the years.
So anyway, I'm not getting that with AI.
And I think that's a problem.
And this idea that humans will be there to be.
check the output of
generally VAI is just wrong.
No, they
are not available for that.
There's too much of it and it's
not present
either. I mean, I don't think it's a good
way to split the work between
machines and humans.
So anyway, so maybe there will be
some societal solution
like a big
no-to-a-eye slope
movement. So we're trying to see that
in some open source projects that refuse had generated contributions because there's just too many.
I know that, well, for OCamill and especially for Comsert, have received some issues,
a report of issues that were obviously generated by AI, and there was maybe one good issue among 10 reports.
And each report was several page long, and with very detailed explanations.
and repro case that in the end doesn't repro anything
or reproduces something else.
But it takes time to go through all those things
and maybe at some point I will say no
to AI-generated contributions.
Okay, but maybe there's also a bit of a technical solution,
which is, as we said earlier,
to have AI produce proofs.
So evidence that its creation is correct
So as I said, this is starting to work for mathematical proofs.
Some generally VARs are able to produce proofs both in English
and in the formal language of the lean prover, for instance.
And so you can get a lien to recheck the proof and get some confidence.
You still need to be very careful about the statement,
because sometimes AIs will change the statement or the definition
to make the proof easier.
That happens.
And also you should be careful about so-called self-formalizations
where the AI also comes up with some definitions
and some statements by parsing a PDF file or whatever.
And sometimes it introduces errors at that point.
So anyway, there are still a need for human review,
but on smaller quantities of text and mathematical text.
And maybe when they will also work for program proof.
So when an AI generates a program,
it might be able to generate some lean proof or whatever
that the program satisfies some specification.
So I think it is possible.
But now the question will be,
where does the specification come from?
It's always been a big issue for formal methods.
It's not just that verification is hard,
but agreeing on the spec can be difficult to.
And when mathematicians have a lot of experience,
you know, in stating definitions that they find interesting
and stating theorems that they believe should be true
or that will mean something.
Computer programmers are less good with that,
and it's fairly easy to come up with specifications
that are inconsistent or impossible.
So remember this average function
when there was a precondition of the three numbers,
three arguments saying they must not be too big.
But say maybe you can end up with a precondition
that just cannot be satisfied.
And at this point, the body of the function will always be verified, even if it's completely wrong, because the assumption says, basically, his function cannot be called.
And so you get a false sense of confidence.
You've verified something, but it's actually unusable.
And that's a fairly delicate point where I'm not sure LLM's.
are going to, or AI is going to help much.
But it's a problem with formal methods in general.
And some possibilities include the ability to test specifications, for instance.
So instead of using your test suite to see if your code works out,
you can also use it to see if your spec checks out.
those kind of things.
But yeah, we're kind of moving some of the difficulties
from the programming phase to the specification phase.
But we still have some problems.
Anyway, so that might be a way to deal with the AI generated code
and develop some confidence in it.
You know, LLM generated code is becoming extremely popular.
And I think there's a lot of potential downs
stream consequences on this on the programming language landscape.
And I thought it might be interesting to hear your thoughts on speculating.
Imagine 10 years for now.
If you took LM generated code and turned it up, how might you think that the programming
language landscape might change?
Yeah, a couple of years ago, someone asked me about that.
and there was a concern that the training data would be,
there wouldn't be enough training data in Okamele
for an LLM to really learn how to program in Okamele.
And it's true that there's less OCaml code
in the wild than JavaScript code, for instance.
But apparently, contemporary LLMs do wear
with the amount of OkML code they have,
maybe because there's enough,
maybe because learning has become a little more efficient,
maybe because, well, there's less Okamel code than JavaScript code,
but maybe the okaymel code is better quality average.
I don't know.
Anyway, maybe LLMs are getting better also to transfer knowledge
that they've learned from one language to another.
That could be.
I have no idea how those things work.
But yeah, so the latest feedback I've got about LLM's and,
well, yeah, Generative AI and Okamele,
is that the Okamele code generated is quite decent
and quite similar in quality to more popular languages.
And one thing that seems to help the generative AI is a type system.
So the fact that there's some static checking, just of the type, it's already effective in, you know, avoiding some errors and maybe encouraging the LLM to like declare types first.
So give some type structure to the program.
All right.
And now, 10 years from now, it's difficult to guess.
So will it be the more popular languages of today that will be even more popular because of generated in AI?
Will it be the safer languages of today that will be more popular with AI because there are fewer errors in the end?
I'm hoping it will be the safer languages.
really don't know.
I've seen in the industry, there's a few cases where, because it's so easy to generate code,
massive rewrites are something that would have been very infeasible in the past, are very
realizable now.
So if there's an existing project where they chose a programming language for whatever
reason in the past, they could translate the entire thing into another language,
with reasonable confidence.
Given that kind of environment,
which programming languages
would you expect more people
would switch to
because they want to switch to it
but they weren't able to in the past,
but now it's cheaper so they can.
Well, so today,
I've heard mostly about
C and C++ to Rust translations,
hoping that the
generic loss code will be safer.
he said I've seen at least one project when the generated Dost code is entirely in unsafe blocks.
So it's really kind of line by line translation of the C code, you know.
But maybe it can still be used at a starting point for making it safer later.
So yeah, I would say today I can imagine significant efforts being done with Rust as the target language.
In the functional world, I'm not quite sure.
Well, maybe a functional language to one of those proof assistants, like Lean or Rock,
because they also have programming languages, functional programming languages in them, much more restricted,
but much more I'm unable to prove.
So maybe for a few projects, that could be interesting, again, as a first step towards a formal proof.
as we said earlier.
When you compare industry versus academia,
today where would you say most of the innovation
and programming languages comes from?
And also has that changed over time?
Okay.
Well, I think most of the innovations
have come from industry lately.
And that wasn't the case in the early days of computer science.
if you think of, I mean, the truly innovative languages like Algold, LISP,
small talk, where we're developed in mostly academic settings.
Well, small talk was Xerox Park, which was an industrial research lab,
but very far away from industrial customers.
And then there were, you know, much more practical languages and ugly.
Uglier languages developed typically at IBM like Fortran, Cobol, PL1, etc.
And then, so really the idea that the nice ideas come from academia and nature there.
And then, well, the nice ideas from academia started to be transferred by industry much more quickly.
I'm thinking of well-C-and-es-and-es-plus and then.
Java, which really took ideas like object orientation and, well, garbage collection,
automatic memory management in industry.
Before Java, it was just, you know, crazy academics in the ivory tower that were using
garbage-collected languages.
It was completely impossible to have that in enterprise computing.
And Java came, and two years later, everyone was doing garbage collection.
being very happy about it.
And Java also popularized type safety,
bad code verification,
some pretty advanced techniques of the 90s.
And if you look at further developments,
I don't know,
Swift, for instance,
popularize the idea of algebraic data types
and pattern matching,
and then Rust.
Well, Rust is even more spectacular,
I would say,
because, well, algebraic data types, garbage collections, etc.
Those were already present in academic languages, like Camel, for instance.
But Rust really took very recent research results of the 2000s on Safe Low Level Programming
that were basically never implemented in any language
and managed to do a consistent hole from that.
And so I'm really admirable.
And I have the impression that, well,
I would have loved if first came out of academia,
but I'm not sure it would have been possible
because it's also a huge effort
and you really need the backing of a big company.
But still, I'm not sad because I think it's also a very good sign
that industry is interested in new programming languages.
You know, at some point in the 90s,
pretty much when I was hired at Inriya on a research position,
when I was hired as someone who had developed first versions of Okamele,
well, predecessor of Okamele,
and who was working on types systems or programming languages and so on.
But then some people told me,
but there's no future in programming language research.
Industry has decided it will be C++ forever.
So deal with it.
Maybe you could do software engineering,
and not PL research.
And then Java came a few years later
and showing that no,
industry hasn't decided on a particular programming language.
Industry is still interested in new programming languages.
Industry still thinks that a new programming language
can be part of the solution to software problems.
And I find it extremely encouraging.
We are not stuck with bad long.
languages from the past. Well, there's a lot of legacy code, of course, but they are still
really interest for better languages. And I think this will continue. And I think it's good for the
computing field. In 2018, there was an interview that you did. And they asked you, what are the
most interesting and important problems to focus on in the coming years? And you called out
the difficulty of programming, you know, GPUs, because they were using the most interesting and important problems to focus on in the coming years. And you called out the
difficulty of programming, you know, GPUs because they were using dialects of C, shoddy tools,
and also the challenges in verifying machine learned code, basically.
And that sounds pretty relevant today, but what would you say your answer is today?
So, yeah, I think, well, for the question of how we program massively parallel hardware,
I think we've made a little bit of progress recently.
like the MLIR initiative around LLVM or some domain specific languages like HALID, which are pretty good.
You know, those sensor, domain specific languages for tensor computations are getting a little better.
But still, I find it a little bit frustrating that I cannot do, I don't know, see if I'm proving on a GPU.
I have absolutely no idea how to go about that.
and in part by by lack of an appropriate language.
So I'm not ready to program the GPU pipelines at a very low level myself.
And I think it's more general.
I think we are not using all these GPU and the highly parallel hardware as much as we could.
Yeah, so verifying applications that have been learned or generated.
generated by AI or so on, it's still a pretty hot issue.
Back in 2018, I was more thinking of verifying simple neural networks,
like those used for, I don't know, computer vision,
self-driving cars or some numerical computations like, you know,
weather prediction and so on.
So specialized LLMs, but you still want some guarantees about what they produce,
that they cannot produce completely inconsistent outputs, for instance.
There was some attempts in the last years at using static analysis tools
and basically program verification tools applied to LLMs,
but, well, it doesn't scale.
LLMs are big.
Sorry, neural networks are big.
And for LLMs, there are also a distinct lack of specification.
Okay, you don't really know what's a good answer from an LLM.
Well, you know it when you see it,
but you cannot write a mathematical specification of it.
So that part is probably over.
What I would say are the big problems for today.
Probably maintaining software quality,
despite AI slope, despite a lot of pressure
to throw away traditional software development techniques,
using LLMs as an AI as much as we can to make a nice proofs, so proofs that can be checked by machines.
Maybe this will be the decade of formal verification of software.
We've been waiting for that for 50 years, so maybe it will finally take off.
What's your top book recommendation for software engineers and why?
This is an old one.
They're programming Perth by Bentley.
I think I read it when I was a PhD student,
but I think it's nice as showing how very talented programmers work,
how they think about their programs.
It's a combination of choosing the right algorithms,
expressing them clearly,
knowing when to stop,
when to use a simple algorithm where,
when a more complicated one is not needed,
having a sense of elegance in the code you write,
having a feeling for where the problem is when the code misbehave.
So all that kind of things that are hard to communicate.
And I think those pearls that are very easy to read
and don't use any complicated data structures,
don't use any complicated language.
I mean, it's kind of timeless, you know.
I think those pearls are good illustration of that.
So if you haven't read it, it's a classic,
but I think it's a nice reading.
Nice read.
The second one is a little more controversial, I guess.
So how to design program,
which is a fairly ambitious title as well.
And this comes from the scheme community.
Okay, Fen Eisen, Findler, Flat, and Krishamworthy.
and those people have developed,
well, the scheme community is famous for having developed
pedagogical resources that are, I mean,
ways to teach programming that go beyond teaching functional programming,
basically.
And so there was the MIT course,
structural interpretation of computer programs, which was quite famous.
And this is kind of a more modern twist
on similar ideas.
And I find this book interesting because, well, it really teaches you the way of functional
programming, or a way to functional power army.
It can be very irritating sometimes, very opinionated, very almost mystical sometimes,
but it's also another glad attempt at trying to communicate how experience,
programmers go about designing a program even before writing the first line.
And then how given a language like skiing, which is pretty flexible, how the code kind of follows naturally.
Knowing what you know now, if you could go back to when you just started your career and give yourself some advice, what would you say?
Sometimes I regard that maybe I specialized a little too early in programming language research.
Or maybe, well, there are some topics that I didn't learn because I didn't feel like it.
And that I had to relearn later or I still have to learn now that I'm almost 60.
and maybe not as quick as I was back in the day.
So, yeah, maybe I did specialize a little too early,
and so I would encourage everyone to get,
everyone who's serious about working in computing,
to get fairly diverse computer science background,
even for topics that look super theoretical
and are not very relevant to.
to everyday jobs.
Well, we mentioned
computability, for instance,
things like the halting problem and so on.
You're not going to run into that very often,
but it still gives
interesting perspectives, I think.
And then it also helps
understanding new problems
like with quantum computing.
What can you do with a quantum computer
that you cannot do with a normal
computer and it's time to revisit all of the classic complexity theory I learned earlier
when I was young.
And so, yeah, I think it's good to have this kind of background, even if it's not
obvious you will be using it every day.
And sometimes I wish I had taken time to accumulate a little more of this background
before specializing in programming languages.
Awesome.
Well, thank you so much for your time, Professor Lewar.
I appreciate it.
Thank you, Ryan.
That was nice.
Hey, thank you for watching this podcast.
If you liked it and you want to see the show grow,
please support with a comment or a like.
Also, if you have any recommendations for people you want me to bring on,
please drop a comment.
Guests like Barbara Liskov, Mike Stonebreaker, Mark Brooker,
these were all people that I brought on because someone left a comment.
On another note, aside from the podcast, I'm working on building the ergonomic keyboard that I wish existed.
Here's a glance at the prototype. It's a split keyboard. So there's two sides. This is in the case.
But yeah, we launched on Kickstarter and we hit our goal within eight hours of launching. I really appreciate it if you were one of the people who grabbed one of the early units.
We're now working on the long journey of building the tooling now. And so if you still want to pick one up, I've left the late pledges open on Kickstarter.
so you can grab one there.
I'll put a link in the description.
Thank you again for watching the podcast,
and I'll see you in the next episode.
