The following is a conversation with Brian kernighan
a professor of computer science
at Princeton University.
He was a key figure in the computer science community
in the early Unix days
alongside Unix creators,
Ken Thompson and Dennis Ritchie.
He co-authored
the C programming language with Dennis Ritchie
the Creator C
and has written a lot of books
on programming computers.
And life
including the practice of programming
the go programming language
and his latest Unix
a history and a memoir.
He co-created talk to text processing
language used by Linux
folks, like myself
Eco designed ample and algebraic modeling language
that I personally love
and if used a lot in my life for
large-scale optimization,
I think I can keep going for a long time
but this creations and accomplishments.
Which is funny because given all that
he's one of the most humble and kind
people I've spoken to
on this podcast
quick summary of the ads to new sponsors
the amazing self-cooling
eight Sleep mattress and raycon earbuds,
please consider supporting the podcast
by going to eight sleep.com
Lex and going to buy
raycon. Com.
Click the links by the stuff.
It really is the best way to spoil this podcast
and a journey.
I'm on if you enjoy this thing
subscribe on YouTube
review 5000 have a podcast
supported on patreon connect with me on Twitter
at Lex fridman.
As usual
I'll do a few minutes of as now
and never any ads in the middle of that can break
the flow of the conversation.
This show is sponsored by eight sleep
and it's incredible pod Pro mattress.
You can check out at 8 sleep.com Lex to get $200 off
the mattress controls
temperature with an app.
I can cool down to as low as 55 degrees research shows.
The temperature has a big impact
on the quality of our sleep
and a girl has been a game-changer for me.
I love it. The pop Pro is back
two sensors attract heart rate heart rate
variability and respiratory rate.
Showing it all on their app.
Once you wake up plus
if you have a partner,
you can control
the temperature of each side of the bed.
I don't happen to have one
but they sleep
app reminds me that I should probably get on that.
So Ladies
If a temperature controlled mattress
isn't a good reason to apply.
I don't know. What is the app's
Health metrics are amazing.
But the cooling of loan is honestly worth the money
as some of you know,
I don't always sleep.
But when I do,
I choose the a sleep pod Pro mattress.
Check it out at a sleep. Com Lex to get $200 off.
This show is also sponsored by raycon earbuds
get them at by reykon. Com Lex
there quickly become
I'm a method of listening to podcast audio books
the music
when I run
do the push-ups and pull-ups that I've begun to hate
at this point.
Or just living life.
In fact,
I also listen to Brown noise with these
when I'm thinking deeply about something
it helps me Focus
the mind
they're super comfortable pair easily
great sound great bass 6 hours of playtime.
In fact
for fun.
I have one of the earbuds in now
and I'm listening to Europa by Santana.
Probably one of my favorite guitar songs.
It kind of makes me feel like I'm in a music video
so they told me to say A bunch of celebrities
use these like Snoop Dogg
Melissa Etheridge and cardi B.
I don't even know if cardi B
is but her earbud game is on point to mention
celebrities actually care about
I'm sure if Richard Fineman was still with us.
He did listen to The Joe Rogan Experience
with raycon earbuds
get them had by Drake on. Com Flex.
It's how they know
I sent you.
And increases the chance that I will support
this podcast
in the future
so far all of the sponsors click all of the links.
It really helps
this podcast
and now there's not conversation with Brian. Kernighan.
Eunuchs started being developed 50 years ago
and be more than 50 years ago.
Can you tell the story
like you described a new book of how Unix was created?
If I can remember that far back
it wasn't
it was some while ago.
So I think the gist of it is that at Bell labs
and in 1969,
they were a group of people who had just finished
working on
the multi project
which was itself a follow-on to see TSS
so we can go back there if an infinite regress in time,
but the ccss was a very
very very nice time
sharing system is very nice to use.
I actually used it. That summer
I spent in Cambridge in 1966.
What was the hardware there? Right.
So what's the operating system was the hard way there?
What's the CTS look like kind of like a standard time
during system
certainly at the time.
It was the only time sharing of let's go back to
the basic.
What's the time today? If we go back into
let's call it the 1950s and early 1960s.
Most Computing was done on very big computers
physically big
although not terribly powerful
bike. Today standard
that were maintained in very large rooms
and you use things like punch card to Richburg
Amazon talk to him.
So you would take a deck of cards right
you program on it.
Send it over a counter headed to an operator
and some while later.
Backwood come something. That's it.
Oh you made a mistake
and then you'd recycling
so is very
very slow.
So the idea of time sharing
was it you take basically that same computer
but connect to it
with something that look like an electric typewriter.
They could become a long distance away.
I could be closed
but fundamentally what the operating system did
was to give
each person
who was connected to it and wanting to do something
a small slice of time on Through April to get a job.
So I might be editing a file.
So I would be typing and every time I hit a keystroke
the operating system would wake up and said, oh
he typed character.
Let me remember that
let it go back to doing something else
would be going around
and around a group of people
who were trying to get something done
giving each a small slice of time
and giving them each
the illusion that they pretty
much hit the folk machine
to themselves
heads time sharing
that is sharing a computer. Time
Resorts of the computer
a month number of people who are doing it
without the individual
people being aware that there is other than innocence.
The illusion.
The feeling is that you had The Machinist your own
pretty much
that was the idea.
Yes, you had if it were well done
and if it were fast enough
and other people weren't doing too much
you did have the illusion
that you had to hold machine to yourself
and it was very much better than the punch card Model
S o c t s s the compatible time
sharing sister Was I think
arguably the first of these
it was done
and I guess technically 64 something like that
it ran on an IBM 7090
for slightly modified to have twice as much
memory is the norm.
It had two Banks of 32 K words instead of one.
So I'm ready to K words
50 kilobytes * 2
By today's standards sets down in the noise
at the time.
That was a lot of memory memory was expensive.
So CTS was led by Fernando korbatov
Corby earlier this year
and a bunch of other folks
and then
so I spent the summer is 66
working on that had a great time.
I met a lot of really nice
people and indirectly new of people. At the labs
who were also working on a follow-on to see TSS
that was called multix.
The multics was meant to be the system.
That would do everything that she TSS did
but do it better for a larger population
all the usual stuff.
The actual time sharing the scheduling
how much what's the algorithm that performs
the scheduling?
What's that look like how much magic is there?
What are the metrics?
How does it all work in the beginning?
The answers.
I don't have a clue.
I think the basic idea was nothing more than who
all wants
to get
something done
supposed to things are very quiet
in the middle of the night.
Then I get all the time that I want
suppose that you and I
are contending at High Noon for something like that.
Then probably the simplest
algorithm is a round-robin one
that gives you a bit of time
gives me a bit of time
and then we could adapt to the Like
what are you trying to do or you text editing
or are you compiling or something? And we might adjust
the schedule
according to things like that sell Caso Mall
thanks was trying to just do some of the cleaning up
a little bit.
What was it was meant to be much more than that.
So multics was the multiplex
information in Computing service,
and it was meant to be
a very large thing would provide
Computing utility
something that where you could actually think that
it's just a plug
in the wall service.
White cloud computing today,
but 50-yard years earlier.
And so what multix offered was a rich
your operating system
environment Pizza Hardware
that was better
designed for doing the kind of sharing of resources
and presumably lots of other things.
Do you think
people at that time had the dream of what
cloud computing is starting to become now,
which is Computing
is everywhere that you can do. Plug-in almost,
you know, you never know how
the magic works.
You just kind of plug-in at near little
computational needs to perform
and it does
it was that the dream I don't know where that was
the dream.
I wasn't part of it
at that point member. I was an intern first number
but my sense is given that it was over 50 years ago.
Yeah. They had that idea
that it was an information utility
that it was something where
if you had a Computing task to do
you could just go into it.
No, I'm betting that they didn't have
the same view of computing
for the masses.
Let's call it the idea that you know,
your grandmother would be shopping on Amazon.
I don't think that was part of it.
But if your grandmother were programmer,
it might be very easy for her to go and use
this kind of utility.
What was your dream of computers at that time?
What did you see as the future computers?
Could you have predicted what computers are today?
Short answer absolutely not have no clue.
I'm not sure I had a dream it was a dream job
in the sense that I really enjoyed what I was doing.
I was surrounded by really really nice people
a very fine City living in the summer
less. So in the winter
when it snows
but in the summer, it was a delightful time.
And so I really enjoyed all of that stuff
and I learned things
and I think the Good Fortune of being there for summer.
Let me tend to get a summer job at Bell Labs
the following
so That was quite a
useful for the future.
So this Bell Labs has this magical legendary place.
So first of all,
where is the labs?
And can you start talking about that
Journey towards eunuchs
and Bella's? Scattered around at the time
scattered around New Jersey to primary location
is in a town called Murray Hill
relocation. Cold.
Murray Hill is actually the across the boundary
between two small towns in New Jersey
called New Providence in Berkeley Heights
think of it is about
15-20 miles straight
West New York City
and there for about an hour north of here
in Princeton.
and at that time it had make up a number three
four thousand people there
many of whom had phds and mostly doing
physical sciences
chemistry physics material things,
but they're strong math and rapidly growing interest
in Computing
if people realized
you could do things with computers
that you might not have been able to do
before you replace Labs
with computers that have Worked
on models of what was going on?
So that what
that was the essence of bell Labs again,
I wasn't permanent play there. I was
that was another internship.
I got lucky and internships.
I mean if you could just linger in a little bit,
what was the what was in the air there?
Cuz some of this is the number of Nobel prizes
the number of Tony Awards
and just legendary computer scientist
to that come from
their inventions
including developments occurring lyrics
it's just Is unbelievable.
So is it was there
something special about that
place is very definitely something special.
I mention the number of people so very large
number of people
very highly skilled and working in an environment
where there was always something
interesting to work on
because the goal of the labs
which was a small part of AT&T
which provided basic of the
country's phone service
goal of AT&T was to provide service for everybody
and the goal
The labs was to try to make that service
keep getting better.
So improving service
and that meant doing
research on a lot of different things
physical devices like the transistor
fiber optical cables or microwave system.
All of these things
The Lads worked on
and it was kind of just the beginning of real boom
times and Computing is as well as when I was there.
I went there first and 66.
So Computing was at that point.
Fairly young and Sophie
for discovering that you could do
lots of things with computers.
So how is UNIX born so multix
in spite of having a really good ideas.
Lots of good people working on it fundamentally
didn't live up
at least in the short run on
I think he ever to the it's goal of being
this information utility.
It was too expensive
and what was promised was delivered much too late.
And so in roughly the beginning of 1969
Bell Labs pulled out of the project
the project at that point
had included MIT
Bell labs and General Electric General
Electric main computer
such an electric guitar Hardware operation.
So Bell Labs
realizing this wasn't going anywhere on a time scale
accurate about pulled out
his project
and this left several people.
An acquired taste for really really nice
Computing environment
but no Computing environment.
And so they started thinking about what could you do?
If you're going to design a new operating system
that would provide the same
kind of comfortable Computing
setss had
but also the facility stuff
something like multix are brought forward
a lot of paper design stuff
and at the same time
Ken Thompson found
what is characterized as a little-used
bb7. Where he started to do
experiments with file systems,
just how do you store information on a computer
and efficient way
and then this famous story
that his wife went away to California for 3 weeks
taking their one-year-old son and three weeks
and he sat down and wrote an operating system,
which ultimately became Unix
So Soft for productivity is good in those days
as a PDP. What's a PDP $0.07
a piece of hardware?
The part where it was one of the early machines
made by digital Equipment
Corporation deck
and it was a mini computer
so-called it
I would have to look up the numbers exactly
but it had a very small amount of memory,
maybe 16k
16-bit words or something like that relatively slow.
Probably not super expensive
maybe again
making this up.
I'd have to look at $100,000 or something like that,
which is not super expensive in the states, right?
It was expensive
it was enough that you
and I probably wouldn't be right
by one
but a modest group of people could get together.
But in any case
in it came out if I recall in 1964
Suburban 1969,
it was getting a little Obsolete
and that's why it was little used.
If you can sort of comment,
what do you think? It's
like to write an operating system like that.
So that process that can went through in 3 weeks.
Because you were
I mean, you're part of that process
you contributed a lot to to
Enochs is early development.
So what do you think it takes to do that?
First step that first kind of from design to reality
on the PDP.
So I did not write it.
I have never had an operating system code
and so I don't know what operating system is simple.
and this first one wasn't very big
but it's something that let you run processes of some
let you execute some kind of code
that has been written
it lets you store information for periods of time
so that it doesn't go away
when you turn the power off
or reboot
or something like that
and there's a core
set of tools that are technically not
part of
an operating system,
but you probably need them in this case
can Rodan and assembly For the pp some of that worked.
He did his texts out of there so that you can
actually create text.
He had the file system
stuff that you've been working on
and then the rest of it was just a way to load
things executable
code from the file system into the memory
give it control and then recover control
when it was finished or in some other way
with what was the code
written in the primarily of the programming language.
Was it in assembly assembler
that can create These things
were Assembly Language
until probably the call
it 1973 or 74
something like that.
I had to forgive me if it's a dumb question,
but it feels like a daunting task to write
any kind of complex system
in an assembly is absolutely impossible to do
any kind of what we think of as software
engineering of the assembly.
Is it to work in a big picture.
I think it's hard.
It's been a long time since I rode Assembly
Language attitude is absolute truth
in Assembly Language.
If you make a mistake,
nobody tells you
they're no training wheels whatsoever
and so stuff doesn't work.
Now. What are the buckets?
That's the same problem, right?
How do you actually get something
that will help you debug it?
The part of it is his inability to see
the Take picture.
Now these systems were not big in the sense of
today's pictures of the big picture was
in some sense
more manageable.
I mean realistically
enormous variation in the capabilities of programmers
and Ken Thompson.
Who did that first one.
This is kind of the singularity
in my experience of programmers
with no disrespect to you
or even to me
several leads removed.
I know there's levels
This is it's a it's a fascinating thing
that they are unique
stars in particular in the programming space
and in particular time,
you know what
the time matters to the timing of
when that person comes along
and the wife does have to leave to get like
there's this weird timing
that happens that and then all sudden
Something Beautiful
created.
How does it make
you feel that there's
a system that was created in in 3 weeks.
And maybe you can even say on a whim
but not really
but of course
quickly that is now
you could stick of most of the computers in the world
run on a unix-like system
what it would
how do you even like a if you kind of Zoom
from the alien perspective
if you're just observing Earth at all
send these computers take over the world
and they started from this
little initial seed of by eunuchs.
How's that make you feel? Did you ask
earlier book predictions?
The answer's no,
there's no way that you could predict that
kind of Illusion.
And I don't know whether it was inevitable
or just that whole sequence of blinds.
Like I suspect
more of the latter.
And so I look at it.
It's kind of neat.
I think the real question is what they think
about that cuz
he's the guy arguably from whom it really came.
Tremendous contributions from Dennis Ritchie
and then others around in that Bell Labs
environment.
But you know if you had to pick a single person
I would be can save when you book your next
the history in the Memoir.
Are there some memorable human stories
funny or profound from that time to just kind of
stand out
there's a lot of them,
but I think part of it was Villas at the time
he was a very special kind of place to work
because there are a lot of interesting people
and the environment was very
very open and free was very Cooperative
environment very from the environment.
And so if you had an interesting problem
you going to talk to somebody
and they might help you with
the solution
and it was a kind of fun environment to
and that which people did strange things
and often tweaking the bureaucracy in one way
or another.
The rebellious in Benson
kinds of ways to put up with an enormous
didn't really want to
so maybe to linger on in a little bit.
You have a sense of what the philosophy
that characterizes
Unix is the
design
not just the initial
but just carry through the years. Being there
being around a what's the fundamental philosophy
behind the system
provide an environment that made it easy to write
her easier
for doctors to write permit.
So we've met as a programmer
environment wasn't meant specifically
has something to do
some other kind of job.
For example,
it was you. Extensively for word processing
but it wasn't designed as a word processing system.
It was used extensively for lab control,
but it wasn't designed for that was used extensively
as a front end for big
other systems
big dump systems,
but it wasn't designed for that.
It was meant to be an environment
where it was really easy to write programs
that says Prairie could be highly productive
and part of that was to be a community on
there's some observation from Dennis Ritchie.
I think at the end of the book
that says that From his standpoint.
The real goal
was to create a community
where people could work as programmers
on the system.
I thinking that since certain for many many years
it succeeded quite well at that
and part of that
is the technical aspects of
because it made it really easy to
write programs
people did right
interesting program is Asperger
intended to be used by other programmers in service,
virtuous circle are more and more stuff
coming up.
That was real.
Good for programmers
and you're part of that community of programmers.
So what was it like writing programs in that early
Unix? It was a blast.
You know,
I like to program. I'm not a terribly good burger,
but it was a lot of fun to write code
and in the early days
there was an enormous amount of what you would today.
I suppose called low-hanging fruit.
People hadn't done things before
we're in this was this new environment
and The whole combination of nice tools
and very responsive system and tremendous
colleagues made it possible to write code
you could you could have an idea in the morning
you could do it in an experiment with that
you can have something limping along that night
or the next day
and people would react to it and they would say
oh that's wonderful,
but you're really screwed up here
and and the feedback loop
Quizlet very
very short tight.
And so a lot of things got develop fear. quickly
that of in many cases still exist today
and I think that was part of what made it fun
because program yourself as fun as
puzzle-solving in a variety of ways,
but I think it's even more fun.
When you do something that somebody else then uses.
Even if they whine about it
not working the fact that they used
it is is part of the reward mechanism.
And what was the method of an interaction
that communication
Feedback loop
and this is before the internet
for the internet.
It was mostly physical right there.
If you know
somebody come into your office and say something
so these places are all closed
but like offices
are nearby that are really Lively into interaction
building and most of the people were involved
in this unit
stuff for interest recorders,
and there was a room.
How big was it? Probably call it? 50ft by 50ft
make up a number of that
which had some access to computers there
as well as in offices and people hung out there
and it had coffee machine.
And so that there was a it was mostly very physical
we did use email
of course
and but it was fundamentally all for a long time
all-in-one machine.
So there was no need for any of that
stressing you just think
about what Computing would be today
without Bell labs.
It seems so
many people being in the vicinity of each other.
So it's sort of getting that quick feedback
working together
so many brilliant people.
I don't know
where else that could have existed in the world been
given how that came together.
What? Yeah, I will.
How does that make you feel? That's
that's a little element of History.
I think that's very nice.
But I sent it
survivor bias and if it hadn't happened about left
there were other Places that we're doing really
interesting work
as well as Rocks
park is prevalence of the obvious Ones
lyrics part contributing normal
amount of good material
and many things we take for granted today
in the same way
Cambridge Park experience.
I don't think they capitalized in the long run
as much
their parent company
was perhaps not as Lucky in capitalizing on this,
who knows
but that would that certain another place
where there was a tremendous amount of influence
through a lot of good.
University activities
and my team was obviously no slouch
in this kind of thing
and then in others as well,
so you next turned out to be open source
because of the various ways that AT&T operated
instead of a had to it was the focus was on telephones.
So I think that's a mischaracterization
in the open-source.
It was very definitely proprietary license.
But it was license freely
do universities in Morris code form for many years
and because of that
generations of University students and their faculty
people knowing about eunuchs
and there was enough expertise in the community
that it did
then became possible for people to kind of go off
in the wrong direction
and do something that look
unix-like the Berkeley version of Unix started with that
licensed code. and gradually picked up
enough of its own
code contributions
notably from people like Bill Joy
that eventually it was able to become completely free
of any cheap
AT&T code
another was an enormous amount of legal
jockeying around this
that in the late early to late 80s
early 90s,
something like that
and then not I guess
the open-source movement might have started
when Richard stallman started to think about this
in the late eighties and by 1991
when Torvalds decided he was going to do
a unix-like operating system.
There was enough expertise that
in the community that first
he had a Target
he could see what to do
because that's the kind of the Unix system
call interface
and the tools and someone were there.
And so he was able to build an operating system that
at this point
when you say eunuchs in many cases
what you're really thinking is Lenox from my
and I felt that Unix was open source
without actually knowing it
but what you're really saying,
it was just freely license. Ace Frehley licensed
I felt open source in a sentence
because universities is not trying to make money.
So there it felt
open source in the sense that you can get access
if you wanted to write a very
very very large.
She's had the license
and they were able to talk to
all the other universities
who had the license
and so technically not open
technically belonging to a AT&T
pragmatically pretty open.
And so there's a ripple effect
that all the faculty in the students
then I grew up
and then Feathered the wind
throughout the world and permit in that kind of way.
So what kind of features
do you think made for a good operating system?
Did you take the lessons of Unix
you said,
you know
make it easy for programmers like that
that seems to be an important one,
but also Unix turned out to be exceptionally robust
and efficient.
So is that an accident
when you focus on the programmer,
or is that a natural outcome?
I think part of the reason for efficiency
was that it began on extremely modest Hardware
very very very tiny.
And so you couldn't get carried away.
You couldn't do a lot of complicated thing
because you just didn't have the resources
either processor speed or memory
and also that enforced a certain
minimality of mechanism.
And maybe a search
for generalizations so
that you would find one
mechanism that serve for a lot of different things
rather than having lots of different special cases.
I think the file system
in Unix is a good example of that file system
interface in its fundamental form
is extremely straightforward.
And that means that you can write code very
very effectively from for the file system
and then one of those ideas on the generalizations
Is that she
that file system
interface works for all kinds of other things
as well?
And so
in particular you think idea of reading and writing
two devices is the same as reading and writing
to a disk that has a file system
and then that gets carried further.
In other parts of the world process
has become.
In effect
files in the file system in the Plan
9 operating system, which came along
I guess no late 80s or something like that.
Took a lot of those ideas from the original
Unix and tried to push the generalization
even further.
So the Implanon
a lot of different resources are file systems.
They all share that interface.
Let me one example,
we are finding the right model of how to do
something means that an awful lot of things
become simpler
and it means they're four.
They're more people can do useful
interesting things with them without him to think
as hard about it.
He said
you're not a very good programmer.
You're you're the most
smartest human being
okay, but you'll continue saying that
I understand how
this works,
but you do radiator sort of love for programming.
So let me ask program is more an art or science.
Is it creativity
or at a rigger of each combination of some of the art
is figuring out what it is.
It's really want to do what should that program be?
What would make Good program
and that's some understanding of what the the task is
what the people who might use this program want
and I think that's that's art
in many respect.
The science part is trying to figure out how to do
it. Well
and some of that is Will computer science
see stuff like what algorithm should we use
at some point
mostly in the sense of being careful to use algorithms
that will actually work
properly or scale properly.
Avoiding quadratic algorithms for the linear
algorithm should be the right thing
and more formal view of it
the same thing for data structures.
But also it's
I think
an engineering field as Wellman engineering
not quite the same as science
because engineering you're working with constraints.
You have to figure out
not only what is a good
algorithm for this kind of thing.
But what's the most appropriate algorithm
given the amount of time we have Compute
the amount of time we have to program
what's likely to happen in the future
with maintenance
who's going to pick this up in the future
all of those kind of things that if you're
an engineer
you get to worry about
where is if you think of yourself as a scientist
while you can
maybe push them over the horizon in a way
and if you're an artist,
what's that?
So just on your own personal level,
what's your process like a writing
a program say small? Enlarge their tinkering with stuff
is you just start coding right away
and just kind of evolved iteratively
with a loose notion
or do you plan on a sheet of paper first
and then kind of design in the what
they teach you
in the kind of software
engineering courses in undergrad
or something
like that.
What's your process like metal
first? I don't write big programs at Wait.
It's been a long time since
I wrote a program that weighs more than not
call it a few hundred or more line
something like that.
Many of the programs are right or experiments
for either something. I'm curious about
or often for something that I want to talk about
in a class.
And so those necessarily tend to be relatively small
a lot of the kind of code. I write these days
tends to be for a sort of exploratory data
analysis work out some collection of data
and I want to try and figure out
what on Earth is going on.
And for that
those spriggans tend to be very small.
Sometimes you're not even programming.
You're just using existing tools like counting things
or sometimes you're writing Ox grips
because two or three lines will tell you
something about a piece of data
and then when it gets bigger
will and I will probably write something in Python
because that scales better off
to call it a few hundred lines
or something like that.
It's been a long time since
I wrote programs that were much more than that
speaking did exploration and talk first.
What is OCH scripting language? That was done by myself
La Hoehn Peter Weinberger.
We did that originally in the late 70s was a language.
It was meant to make it really easy to do
quick and dirty tasks like counting things
or selecting
interesting information from Basically all text files
rearranging it in some way of summarizing it
so runs a command on each line off aisle,
and there's still exceptionally widely used today
OS lutely. Yeah,
I think it's so simple and elegant
serve the way to explore data
turns out you can just write a script
that does something seemingly trivial
in a single line.
The giving you that slice of the day
to somehow reveal something fundamental about
the data keeps
that seems to work
still sort of what it was meant for.
I think what we didn't appreciate
was that the model was actually quite good
for a lot of data processing
kind of tasks
and that it's it's kept going
as long as it has cuz at this point
it's over 40 years old when it's still a useful tool
and This is paternal interest
I guess
but I think in terms of programming languages
you get the most bang for the buck by learning off
and it doesn't scale
the big programs
but it does pretty pretty darn
well on these little things
where you just want to see all the something's
in something
and so yeah,
I find a party right more hot
and what kind of stuff do you love about cuz
they're a hit if you can
comment on certain things. That gives you Joy
when you can
in a simple program reveal something
about the dishes or something that stands out
a particular Futures.
I think it's mostly
the selection of default behaviors
that you sort of hinted that at the moment ago.
What act does is to read through a set of files
and then within each file, it rates through
a each of the lines
and then on each of the lines,
it has a set of patterns that it looks for that
your art program.
And if one of the patterns matches
there is a corresponding action that you might perform
and so it's kind of a quadruple
a nested Loop or something like that, man.
And that's all completely automatic.
You don't have to say anything about it.
You just write the pattern in the action
and then run today to buy it.
And so that Paradigm for programming is very natural
and effective one
and I think we captured that reasonably well
and all those other things for free
as well.
It splits the dating. Fields
Southern on each liners field
separated by white space or something.
And so it does that for free.
You don't have to say anything about it
and it collects
information is goes a long
like what line
are we on? How many fields are there on this line
self lots of things that just make it
so that a program
which in another language. What's a python would be 5
10 20 lines in August
one or two? That's so because it's one or two lines.
You can do it on the shell
that you have to open up. Another whole thing.
You can just do it right there
in the interaction with the with the operating system.
Is there other shell commands
that you love? Over the years that you really enjoy
using graph.
Some sense
yet, right because what is grap
so grep is basically searches
the input for particular patterns
regular Expressions
technically a certain class
and it has that same Paradigm that off cuz
it's a pattern action thing
it read through all the files and all the lines
in each file,
but it has a single pattern
which is the regular expression
you're looking for in a single action
printed if it matches in that sense,
it's a much simpler version of you could write crappy
an octopus as a one-line.
And I use grep
probably more than anything else at this point
just because it's so convenient and natural.
Why do you think it's such a powerful tool
grab knock?
Why do you think operating systems like Windows
for example,
don't Habits of you can of course I use
which is amazing.
Now. There's a Windows for Linux
like which you can basically use All the fun stuff
like I can grab and inside of windows
but Windows naturally should have been the best
part of the graphical interface
the Simplicity of grab
that it's searching through a bunch of files
and just popping up naturally,
but why don't
you think that why
you think that's unique to the Unix
and Linux environment?
I don't know I strictly unique
but it's certainly Focus there
and I think some of its the weight of history
that windows. Came from
a most awesome estas was a pretty pathetic
operating system.
Although, not a large number of machines,
but somewhere in roughly the 90s
Windows became a graphical system
and I think
Microsoft spending a lot of their energy on
making that graphical interface
what it is
and that's a different model of computing
custom model
Computing that where you point and click
and sort of experiment with menus.
Is the model Computing work
right rather? Well for people who are not programmers.
Just want to get something done for his teaching
something like command line to non-programmers
turns out that sometimes be an uphill struggle.
And so I think Microsoft probably was right
and what they did now
you mention whistle or whatever.
It's called The winix
W S L is what I like it.
But there have been things like that
for longest cygwin.
For example,
when she's a wonderful collection of take
all your favorite tools from Unix and Linux
and just make them work perfectly
on Windows.
And so that's
something has been going on for at least 20 years.
If not longer
and I use that on my one
remaining Windows machine off routinely because its 4
if you're doing something that is bad Computing
suitable for command line.
That's right way to do it
because the
windows equivalents are nothing else
not familiar to me.
Why should I would definitely recommend
two people to stay down
you signaling to try whistle?
Yes. I've been so excited that I could use Bath
& be back to write
scripts quickly and in Windows change
my my life.
Okay. What's your perfect programming set up?
What computer without operating system with keyboard
would editor?
Yeah, perfect is too strong a word.
It's what I use by default.
I have a at this point
a 13-inch MacBook Air,
which I use
because this is kind
of a reasonable balance of the various things. I need
I can carry it around.
It's got enough Computing horse bars
greens big enough keyboards.
Okay. That's why I basically do most of my Computing
on that.
I have a big iMac in my office
that I use from time to time.
As well,
especially when they need a big screen,
but otherwise. Tends not to be used
as much out of there.
I use mostly Sam
which is an editor that Rob Pike wrote long ago
at Bell Labs
has ended that science and dropped
it. Does that precede VI does not heating
Max it postdates
both VI Andi, Mack
it is derived from Rob's experience with Ed and VI
That's the original Unix editor, LOL.
So what's what's the history of editors?
Can you can you breathe
this is your fat I use emacs.
I'm sorry to say so
excited to come out with that.
But what's was the kind of interplay there?
Send me a x
call it the first time
hearing systems going back to what we were
talking about.
The word editor.
There was an editor on CTS
that I don't even remember what
it was called.
A woman might have been edit
where you could type text
program text and it would do something
or other document text.
You could save the next favorite thing to do
would getting an attitude. And Ken
Thompson Road and editor called QED
which was very
very powerful.
But these were all totally a command base.
They were not most Parker sure
based because it was before mice
and even before cursors cuz
they were running on terminals that printed on paper.
Okay? No,
no CRT type displays
let alone the LEDs
and so then
when you next came along and took cutie and stripped
we we we we down
And that became an editor
they call Didi and it was very simple,
but it was online oriented editor
and so you could load a file
and then you could talk about the lines
1 through the last line
and you could print ranges in lied.
Yuka dad text you can sleep text
you to change text or you could do
a substitute command.
It would change things with no line or within
groups of lines.
They go work on a parts of a file extension
on any part of it,
but whole thing or whatever,
but it was entirely Command line based
and it was entirely on paper paper.
And that meant that you can yeah right real paper.
And so if you change the line
you have to print that wind
using another lined paper
to see what the change caught. Okay.
So when when CRT displays came along
then you could start to use cursor control
and you can move where you wear on the screen
in. Without reprinting of printing
and one of the word number of editors.
They're the one that I was most familiar with
and still use his VI,
but you're stung by Bill Troy.
And so that dates from probably the late seventies
as a guess
and it took a full advantage of the cursor controls.
I suspected
emacs was roughly at the same time,
but I don't know. I've never heard internalized
D-Max.
So so I use Why I stopped using
can I use VI sometimes and I are you saying what I can
and Sam is available on most systems.
It is available.
You have to download it yourself
from typically The Plan
9 operating system distribution.
It's been maintained by people there off
and so I get home tonight.
I'll try it. It's
it's I said,
although my love is with Lisbon
Emax. wanting to that hippie world of how do you fly
to say
what religion were
you brought out for us to write
most of the actual program
I do is C C plus plus in Python,
but my weird sort of my religious upbringings and less
can you take on the impossible task
and give a brief history of programming
languages from your perspective?
So I guess you could say I just started
probably in what the lake. Ortiz or something like that
people used to program computers
by basically putting in zeros and ones
using something light
switch is on a console
and then or maybe holding paper tapes
something like that. So extremely tedious
awful whatever
and so I think
the first programming languages were route
to recruit assembly languages
where people would Basically ready program
that would convert mnemonics like a DDD into
whatever the pattern
was a corresponding to an ad instruction
and they would do
the clerical work of figuring out where things were
so you could put a name on a location in the program
and the assembler
would figure out where that correspondent
to win.
The thing was all put together and dropped into memory
and early on
in this would be the late forties.
I am very early 50s
there were some letters
written for the various machines
that people use
you may have seen him the paper just a couple days ago.
Tony Burker died.
He did this thing in Manchester called the cold auto
code language,
which I knew only by name
but it sounds like it
was a flavor of Assembly Language
sort of a little higher in some ways
and a replacement language is Alan Turing wrote
which you put in zeros ones,
but you put him in backwards order
because that was the hardware.
Yeah, yeah,
that's right.
It's backwards Assembly Language is len.
Let's call
let the early 1950s into every different
flavor of computer has its own Assembly Language
the Edsel hits in the Manchester head and the IBM
whatever 79-year 704 or whatever
it is.
That's why everybody had their own assembly
languages have a few commands
addition subtraction and branching of some kind
if then type of situation Right,
they have exactly in their simplest form
at least one instruction for Assembly
Language instruction
instruction in the machines
repertoire night.
And so you have to know the machine in too much pain
to be able to write programs
in it.
And if you write in Assembly Language program
for one kind of machine
and then you say cheese,
it's nice.
I can I get a different machine start over. Okay,
so very bad
and so what happened in the late fifties
was people realize you could play this game again,
and you could move Level in writing
or creating languages that were closer to the way
the real people might think
about how to write code
and where I guess
arguably three or four at that time. There
was Fortran would confirm IBM
which was formula translation
meant to make it easy to do
scientific and Engineering computation is now that
formula translation.
That's why I put for cabal wishes to come
and business-oriented language that I Grace
Hopper and others worked on. Always retain business
kinds of tasks.
It was Outlaw, which was mostly meant to describe
algorithmic computations.
I guess you could argue basic was in there somewhere.
I think it's just a little later
until all of those move to level up
and so they were closer to what you
and I might think of
as we were trying to write a program
and they were focused on
different domains for transfer.
Formula translation engineering computations.
What's a Cobalt for business
that kind of thing still used today
released for sure
and probably at level
then you must call it Fortran.
You have a language that was not tied to a particular
kind of Hardware
because different compiler
we can file for different kind of hardware
and that meant two things.
It makes you only had the right program
once very important
and it meant it. Could in fact
if you were random engineer physicist,
whatever you could write it for him yourself.
You didn't have to hire a programmer to do it for
you might not be as good as you get through
a programmer,
but it was pretty good. And so it did
Mark Pi's didn't made much more broadly available.
They build it write code.
So puts the power of programming
to the hands of people
like you
anybody wants programming language
and is not been tied to a particular kind of computer.
sending in the seventies
you get system programming languages
of which sea is the Survivor
and what let what is system
programming languages that programming languages
that would take on the kinds of things
that would necessary to write
so-called system programs
things like text editors or assemblers or compilers
or operating systems
himself those kinds of things and Teacher Rich
they have to be able to do a lot of stuff
a lot of memory management access processes
all that kind of stuff.
Valley processing dates a different flavor
what they're doing.
They're much more in touch with the actual machine
in a foot in a positive way.
That is
you can talk about memory and a more controlled way.
You can talk about the different data
types that the machine supports in a doorway there
and more ways to structure
and organize data.
And so the system programming languages
there was a lot of effort and not in note
call it the late 60s early 70s.
See us.
I think the only real Survivor of that
and then what happens after that
you get things like
object-oriented programming languages
because you write programs in a language like see
at some point
scale gets to you
and it's too hard to keep track of the pieces
and there's no guardrails or training wheels
or something like that
to prevent you from doing bad things.
So C plus plus that tradition and senen
it took off
from there.
I mean, there's also a parallel
But if I do
I'll track with a little bit of functional stuff
a list and so on
but I guess from that point
is just an explosion of languages
can a Jawa story
there's the JavaScript
there is all the stuff that the cool
kids these days are doing with Rost
and all that
they do
so what's to use your Euro to Book
C programming language.
What in C is probably
one of the most important languages
in the history of programming languages
I do kind of look at him back.
What do you think is the most elegant or powerful
part of see?
Why did it survive?
Why did it have such a long
lasting impact?
I think it found a sweet spot that in expressiveness.
So you can rewrite things in a pretty natural way
and efficiency
which was particularly important
when computers were not nearly as powerful
as they are today
and you're going to put yourself back 50 years.
Almost in terms of what computers could do
and that's
you know,
roughly for five generations
decades worth while I write
so expressiveness and efficiency
and I don't know the environment that it came with
as well,
which was Unix
so that meant
if you wrote a program
that could be used on all those computers
that run Unix
and that was all of those computers
because they were all written
in seeing that way.
Unix the operating system itself as portable
as we're all the tools
but all were together again
in one of these things were things that
on each other in a positive cycle.
What did it take to write set of a definitive book
probably defend of a book at all
programmed like
it's more definitive to a particular language
in any other book
on any other language
and did
two really powerful things,
which is popularized
the language. From my perspective.
Maybe you can correct me in second is greatest
standard of how you know,
the other houses language is supposed to be used
and fly.
So what are they? Did
you have those kinds of Ambitions in mind
when working on that skill and just luck.
Now Dennis,
I wrote the book in 1977,
stretchy, right and at that point
Unix was starting to spread.
I don't know how many there were
but it would be dozens to hundreds of Unix systems
and see was also available on other kinds of computers
that had nothing to do with Unix
and so the language had some potential
and there were no
other books on C. And our lives
was really the only source
Ford and Dennis
of course
was authoritative because it was his language
and he had written the reference manual
which is a marvelous example of how to write
a reference
manual very
very well done.
So I twisted his arm until he agreed to write a book
and then we wrote a book and The Virtue our advantage
at least
I guess I'm going first is that then
at other people have to follow you
if they're going to do anything.
and I think it worked well
because Dennis with superb Rider.
I mean. It really did
the reference manual in that book is his.
I had nothing to do with that at all.
So just Crystal Clear Pros. Well expressed
and then he and I
I wrote most of the expository material
and then he and I are
did the usual tympani back and forth. Country
finding it
Fly spent a lot of time trying to find examples
that would sort of hang together
and they would tell people what they
might need to know.
What a boat
the right time that they should be
thinking about needing it
and I'm not sure it completely succeeded
but it mostly worked out fairly.
Well, what do you think is the power of example,
I mean your You're the Creator
at least one of the first people to do
the hello world program.
Just like the example.
If it's
aliens discover our civilization
hundreds of years from now,
it will probably be hello world program
just to have broken robot
communicating with them with a Hello World.
So what and that's
a representative examples to what what
do you find powerful about examples
examples of will tell you how to do something
and it would be representative of you
might not want to do exactly that
but you will want to do something. That's
at least in that same. General
vein into a lot of examples in the sea
book were picked for these very
very simple straightforward text
processing problems that were typical of Unix.
I want to read input and write it out. Again.
There's a copy command.
I want to read input and do something to it
and write it
out again.
There's a grab
and so that kind of find things
that are representative of what people want to do
and spell those out
so that They can
then take those and see the the core parts
and modify them to their taste and
I think that a lot of programming books
that I don't look at programming books
a tremendous amount
these days,
but when I do I'll want them don't do that.
They don't give you examples that are both realistic
and something you might want to do.
Some of them are pure syntax.
Here's how you add three numbers will come on.
I could figure that out.
Tell me how
I would get those three numbers into the computer
and how he would do something useful with them.
And then how I put the back out again
deeply formatted and
especially if you follow the example,
there's something magical of doing something
that feels useful
not perfect.
But the attempt
in all cases
was to get something that was going to be either
directly useful
or would be Very representative of useful things
that a programmer might want
to do
but within that vein of fundamentally text processing
reading text doing something writing text.
So you've also written a book on go
language admits. I work the Google for a while.
I've never used
go to go and rust the two languages that I hear
very young
spoken very highly of night.
Wish I would like to troll.
There's a lot of them
just Julia
there's is all these incredible modern languages.
But if you can comment before let me be comments on
what do you find
where does ghosted in in this broad
spectrum of languages? And also
how do you yourself feel about this wide
range of powerful
interesting languages that
You might never even get to try to explore
is a fine.
So go go first comes from Bell Labs tradition
in part not exclusively.
But two of the three creators can
Thompson and Rob Pike are literally
the people
the people and then with this very
very useful influence from the European School
in particular
are the clothes fear
the influence off to Robert graysmith.
It was against the second generation down
student at dth.
And so that's an interesting combination of things.
And so some ways go captures the good parts of sea,
it looks sort of like see it.
Sometimes characterized to see for the 21st century
on the surface.
It looks very
very much like seat,
but at the same time
it has some interesting
data structure and capabilities
and then I think the part that I would Say
is particularly useful. And again,
I'm not a go expert
in spite of co-authoring the book
about 90% of the work was done by Alan Donovan.
My co-author
who is a go expert
but go provides a very nice model of concurrency
it basically the cooperating time
communicating sequential processes
the Tony horror set for 40 plus years ago.
Can go routines are to my mind
a very natural way to talk about parallel computation.
And in the few experiments I've done with them.
They're easy to write
and typically work in very fishing
as well.
So I think that's one place
where go stands out to that
model of parallel computation is very
very easy and nice to visit with just a comment
on that.
Do you think she foresaw
or the early unique stays for saw? Threads
and massively
parallel computation.
I would guess not really. I mean
maybe it was seen
but not at the level
where it was something you had to do
anything of boat for long time
processors got faster
and then processor stop getting faster
because of things like power
consumption and heat generation.
And so what happened instead was that
instead of processes getting faster
there started to be more of them
and that's where that parallel threaten stuff
comes in.
So if you can comment on the all the other languages,
is it the break your heart
the Elara get to explore them for
how do you feel about a variety,
but I would love to be able to
Try more of these languages.
The closest I've come
is in the class that I often teach in the spring
hair up.
It's a programming class
and I often give
I have one sort of small example
that I will write in as many languages
as I possibly can of got a 20 on languages
at this point.
And and that's why do a minimal experiment with
all mine was just to say,
okay. I have this trivial task
which I understand the task and it should
It takes 15 lines in Ark
and not much more in a variety of other languages.
So, how big is it
how fast is it? Run?
And what pain did I go through to learn how to do it
and that's what it's like anecdata right?
It's a very very very narrowly.
The hardest step of the programming
language is probably the first step right?
So There you're taking the first step
and so my experience
with someone who chooses very present
Like Glue on a scripting language.
I should never used
and I took my little prayer in the front of his with
a trivial formatter.
It just takes in lines of text of varying lengths
and put them out
in lines that have no more than 60 characters on
H lights
with the flow process
in a browser
or something.
So it's very short. And in Lua,
I downloaded Lewin in an hour ahead
it working never had a flu in my life.
Just going with online documentation.
I did the same thing and skala
what you can think of is him
flavor of java equally true.
I did it in Haskell
it took me several weeks,
but it did run like a turtle
and and I I did it in Fortran 90.
Painful, but it worked and I tried it in Rust
and it took me several days to get it working
because the model of memory
management was just a little unfamiliar
to me
and the problem I had with rust
inspect what we were just talking about.
I couldn't find good
consistent documentation on Rust know
this was several years ago,
and I'm sure things have stabilized
but at the time
everything in the restaurant seem to be
changing rapidly
and so you find what looked like a working example,
and it wouldn't work.
Who is the version of the language that I had?
So it took longer than it should have rested
some language.
I would like to get back to but probably won't
I think one of the issues
you have to have something you want to do.
If you don't have something that is
the right combination
I want to do it
and yet I have enough disposable time.
Whatever to make it worth
learning a new language at the same time
never going to happen.
So what do you think about another language? JavaScript,
that's this Well,
let me just a little,
then. I said you were what I was brought up.
So JavaScript pecinas
the probably like the ugliest language possible
and yet it's quite arguably
quite possibly taking over
and not just the front in the back end of the internet
but possibly in the future
taking over everything
because they have now learned to make it
very efficient.
So what do you think about this? A lot of ways
when it first came out
JavaScript was deemed to be fairly a regular
and an ugly language in certainly
in the academy.
If you said you were going to JavaScript
would ridicule you
get was just not fit for academics to work on.
I think a lot of that has evolved.
The language itself has evolved
and certainly the technology of compiling it
is testiclea better than it was
and so in that sense.
It's a Absolutely a viable Solution on back ends
as well as the front ends
used. Well,
I think it's a pretty good language.
I've written a modest amount of it
and I played with JavaScript translators
and things like that.
I'm not a real expert
and it's hard to keep up even there
with the new things that come along with it.
So I don't know whether he will ever take over
the world.
I think not
but it's Certainly an important language
and worth knowing more about
there's maybe to get it here, done
something which JavaScript
and actually most languages in Python
such a big part of the experience of programming with
those languages include libraries
serve using building on top of the code that
other people have built.
I think that's probably different from the experience
that we just talked
about from Unix and C days.
When you building stuff from scratch,
what do you think about this world
of essentially leveraging building of libraries
on top of each other
and leveraging them?
That's a very perceptive kind of question.
What are the reasons programming was fun
in the old days
was that you were really building at all yourself
with the number of libraries you had to deal with
was quite small.
Maybe it was print out for the standard library
or something like that
and that is not. Case today
and if you want to do something in you
mentioned Python and JavaScript,
in those of the two funny examples,
you have to
typically download a boatload of other stuff
and you have no idea what you're
getting. Absolutely nothing.
I've been doing some playing with machine learning
over the last couple of days
and G.
Something doesn't work.
Well you pick up install this.
Okay and down comes another. Gazillion
megabytes of something
and you have no idea what it was and if you're lucky
it works
and if it doesn't work,
you have no recourse
actually no way
you could figure out which
of these thousand different packages,
but I think it's worse in the NBA
in p.m. Environment for JavaScript.
I think there's less discipline with controller
and there's aspects of not just not understanding
of work,
but their security issues
is there buses issues.
You don't want to run a nuclear power plant
using JavaScript
essentially. Probably not
speaking to the variety of languages.
Do you think that variety is good or do hope
think that over time we could convert
stores123 programming languages?
That's that you mention to the bailout days
when people could serve the community of it
and the more languages you have.
The more you separate
the communities is
the Ruby Community. There is the python Community.
There is C plus plus Community.
Do you hope that unites
one day to just one or two languages?
I certainly
don't hope that are not sure that that's right.
Cuz I honestly
don't think there is one language that will suffice
for all the programming
needs of the world.
Are there too many at this point will arguably
but I think
if you look at the distribution of how they are used
Something called a dozen languages
that probably account for 95% of all programming
at this point in that doesn't seem unreasonable
and then there's another Well,
2,000 languages that are still in use
that nobody uses and
or these don't use in any quantity,
but I think new languages are good idea
in many respects cuz
they're often a chance to explore an idea.
How language might help
I think that's one of the positive things about
functional languages
for example
there a particular day
good place where people have explored ideas that
at the time didn't seem feasible.
But ultimately have wound up
as part of mainstream languages
as well.
Let me get to go back as early as recursion
lisp and Fallout 4 with functions
is first class citizens and pattern based languages
and I don't know closures and on and on
and on lamp
this interesting ideas that showed up first in call it
broadly the functional programming community
and then find a way into mainstream languages
at the playground
for rebels in the playground
themselves are probably not going to be
the main street
at least for some help
but the ideas of come from there are in value.
So let's go to something that what
when I found out recently
I've known that you've done
a million things,
but one of the things
I wasn't aware of the you had a role in ample
and before you interrupt me
by minimizing your role in it
ample is incredible. That
when I first came to it about 10 years ago
or so,
how can you describe what is the ample language? Sure.
So apple is a language for mathematical programming
technical term
think of it
as linear programming
that is setting up systems of linear equations
that are on some sort of system
of constraints
a bunch of things that have to be less than this
greater than that
whenever and you're trying to find a set Values
for some decision
variables that will maximize or minimize
some objective function.
So it's a it's a way of solving
a particular kind of optimization problem
very formal sort of optimization problem,
but one that's exceptionally useful and specifies
there's object to function of constraints
and variables that become separate from the data
operates on right.
So the That kind of Separation
allows you to put on different hats
when put the head of an optimization person
and then put a another half of a date of person
and dance back and forth in and also
separate the actual solvers
the optimization systems
that do the solving that you can have
other people come to the table
and then build their solvers
whether it's linear or non-linear. Convex
non-convex,
that kind of stuff.
So what is the eu's how you got into that world?
And what is the beautiful
or interesting idea to you from
the world of optimization?
Sure. So absolutely
not an expert on this
and most of the important work
in ample comes from my two partners
in crime on that
Bob for her
who was a professor. Pain in the industrial
engineering and management science department
at Northwestern
and my calling it a bell Labs
Dave gay
who is numerical analyst and optimization person.
So the deal is linear
programming purposes place to stay with
linear programming
a x is less than or equal
to be. To be as a set of constraints
access the decision
variables and a has
the how the decision variables are combined to set up
the various constraints.
So as a matrix + x + B your doctors
and then there's an objective function
which is just as some of the bunch of x's
and some coffee shops
on them
and yet that's the thing. You want to optimize
the problem.
Is it in the real world? That Matrix a is a very
very very intricate very large and very sparse Matrix
where the various components of the model
are distributed among the coefficients
in a way
that is totally an obvious to anybody.
And so what you need is some way to express
the original model
which you and I could write me and we'd write in
mathematics on the board,
This is greater than the sum of that kind of thing.
So, You need a language to write
those kinds of constraints and Bob were for long
time has been interested in modeling languages
languages that made it possible to do this.
There was a modeling language around called Gams
the general algebraic modeling system,
but it looks very much like Fortran was kind of clunky
and so Bob's been a sabbatical year at Bell labs
in 1984,
and he was in the office across from me
and always geography.
And he had a gay
and I started talking about this kind of thing.
And he wanted to design a language that would make it
so that you could take
these algebraic specifications,
you know some Haitian
and that you would write on the board
and convert them into basically
a matrix
and then passed that off to a solver
which is an entirely separate things.
And so we Talk about some to sign
if the language
I don't remember any of the details of this now,
but it's kind of an obvious thing
you just writing up
mathematical expressions in a Fortran like Curry
writes or an algebraic
but textual light language
and I wrote the first version of the sample
program
my first C plus plus program and shampoo.
And so I did that fairly quickly.
We wrote
it was Very big
but it started show the feasibility of it
that you could actually do
something that was easy for people to specified models
and converted into something to solver
could work with the disabled time
as you stated
model and the data are separate things
that one model would then work
with all kinds of different data
in the same way that lots of programs do
the same thing.
But with different data
for the one of the really nice things
is the specification of the models
human. Kind of like is you say is human-readable.
Like I will literally stuff. I work. I I would send it
to colleagues that I'm pretty sure
never programmed just just to understand what
the optimization
problem is.
I think how hard is it to convert that you said you
there's a first prototype in C plus
plus to convert that into something
that could actually be used by
the song.
It's not too bad
because most of the solvers have some mechanism
that lets them import a model in
I form
it might be as simple as the Matrix itself into
some representation
or if you're doing
things that are not linear programming in
there may be some mechanism of let
you provide things like functions
to be called or other constraints
on the model.
So so all ample does is to generate that kind of thing
and then solve Deals with all the hard work
and then when the solver comes back
with numbers and Falcon
versus back into your original form.
So, you know
how much of each thing you should be buying
or making your shipping
or whatever.
So we did that in 84
and I haven't had a lot to do with it since
except that we wrote a couple of versions of a book on
which is one of the greatest books ever written.
I love that book.
I don't know why.
It's an excellent blunt Bob for wrote
most of it.
And so it's really really well done
Dynamite teacher and type set in latex.
No, no, no you kidding.
I don't know we did it with you rock.
I don't even know what that is.
Exactly the way I think it's clear up is is a young
a predecessor to the tech family
thinks it's in for matter
that was done at Bell labs
in this same period of the fairy early seventies.
All that predates Tech and things like that
bite 5 to 10 years
but was never less they just I'm going by memories.
It was remember it being beautiful outside of eunuchs
see all going
all the things you talked about
all the amazing work. You've done.
You've also done working graph Theory.
But let me ask this this crazy out there question
if you have to make a bed.
I have to force you to make a bet.
Do you think P equals NP?
The answer is no alloy.
I'm told that somebody ask Jeff Dean
if that was the key under what conditions
but Glenn p and he said
either p0rn is one or vice versa.
I forgot so, but your intuition is I have no I have
no intuition
but I got a lot of colleagues have got
intuition at their wedding is no
that's the popular. That's the popular bet. Okay.
So what is computational complexity Theory
and do you think these kinds of complexity classes
especially as you've taught in
this is this modern world?
There are still useful way to understand
the hardness of problems.
I don't do that stuff.
The last time
I touched anything to do with any many years ago
was before it was invented before I did this in 1968
and I worked on graph partitioning
which is cuz
you've got a graph at that is a nose and edges
kind of graph
and the edges have weights
and you just want to divide the nodes
into two piles of equal size.
So that the number of edges that goes
from one side to the other is as small as possible.
And we need developed.
So that's problem is hard. Well
as it turns out
I work wish and land at Bell Labs on this
and we were never able to come up with anything
that was guaranteed to get the right answer.
We came up with your wrists
except worked pretty darn well.
And I peeled off some special cases for my thesis,
but it was just hard
and that was just about the time that Steve Cook was
showing that
there were classes of problems
that appeared to be really hard
of which graph partitioning was one
but this is my expertise
such as it was totally predates
that development
only lasting so that he received your cares
the two of yours names for the traveling
salesman problem.
If for the graph partitioning that was
How did you you weren't even thinking
in terms of classes?
You're just trying to find such idea of heuristic.
That kind of does
the job
pretty well,
you would call it the a closed form
or algorithmic thing. That would give you good
guaranteed right
answer only compare graph partitioning to Max flow
Min cut or something like that.
That's the same problem
except there's no constraint on the number of nodes
on one side
or the other of the Cod.
And that means is it easy problem
at least as I understand it?
Where is the constraint
that says the two have to be constrained inside
makes it hard
problem is
the Robert Frost has that phone
we have to choose to pass.
So what
why did you is there
another alternate universe
in which you pursued the Don knuth path of?
But you know
algorithm designs and not smart enough.
You're in front of the modest
but so used to procedure Kind of Love of programming.
I mean when you look back to those,
I mean just looking into that world.
Does that just seem
like a distant world of of theoretical
computer science
then is it fundamentally different
from the world of programming?
In all seriousness.
I just didn't have the talent for it.
I when I got here is a grad student
Princeton and I started to think about research
at the end of my first year
or something like that.
I were briefly with John hopcroft to is absolutely now.
He mentioned during Award winner Etc
great guy and it became crystal clear.
I was not cut out for this stuff.
Okay, and so I moved into things
where I was more cut out for us
and that. Tended to be things like writing programs
and then ultimately writing books.
You said that in Toronto is another garage,
you did a senior thesis
or a literature survey on artificial intelligence.
This was 1964.
What was the day? I landscape ideas dreams at that time.
I think that was one of the what you've heard of
AI winners.
This is whatever the office
it was a isomer or something.
That is why these things were people thought that way
we could do anything with computers
that's always hard problems.
We could computers will solve them.
They will do machine translation.
They will play games like Chess at they will do
Mission. Don't prove theorems in Geometry.
They're all kinds of examples like that
were people thought
why we could really do those sorts of things
and I don't like
I read the Kool-Aid in some type of paper
is called computers
and thought
that was published in that era
and people were very optimistic.
And then
of course it turned out that what people thought was
just a few years down
the pike was more than a few years down the pipe
and some parts that are more lesson
now sort of under control.
We finally do. Play games like going to Jess
and so I'm better than then people do
but there are others on machine translation
is a lot better than it used to be
but that's 50 close to 60 years of progress
in a lot of evolution
hardware and a tremendous amount
more data upon
which you can build off systems
that actually can learn from some of that
and the the infrastructure to support developers
working together
like an
open-source
smoothies. . As that is also an empowering
what lesson do you draw from that
the opposite of winter
that optimism set in
the short run is pretty easy to be too pessimistic
or maybe too optimistic in a long run.
Probably shouldn't be too best man.
I'm not saying that very well
it reminds me of this. Mark from Arthur Clarke
science fiction author
who says we know when some distinguished
but elderly person says that something is is possible.
He probably right and if he says it's impossible,
he's almost really wrong with the time scale is right.
So what are your thoughts on this new summer of AI
now in the work
with machine learning in your network
kind of mentioned
you stopping to try to explore and look into
this world.
it seems fundamentally different
from the world of heuristics
and algorithms
like search
that it's now purely serve
trying to take huge amounts of data and learn
learn from that day
to write
programs from the data
and they're probably just wanted to know
how little I've learned
from them,
but I think
it has tremendous potential
for certain kinds of things.
Some men games
has one where it obviously has had any effect
on some of the others
as well.
I think there's definitely not expertise.
I think there are serious problems
in certain kinds of machine learning
learning at least
because what they're learning
from is the data that we give them
and if the day that we give them
has something wrong with it.
Then what they learn from
it is probably wrong to the obvious thing
is Some kind of bias in the data
with the data has stuff in it.
Like I don't know
women aren't as good at men as men at something. Okay,
that's just flat wrong.
But if it's in the data
because of historical treatment
than that machine
learning stuff will propagate that
and that is a serious worry
the positive part of that is machine
learning. Does is reveal the Bison
the data and put some ear at our own society
and in so doing
helps us remove the by you know,
helps us working ourselves
Merritt ourselves the Mystic Point of View
and if it works that way
that would be absolutely great.
And and what I don't know
is whether he does work that way
or whether the name of the AI mechanisms of machine
learning mechanisms reinforce an amplifier.
Things that have been wrong in the past
and I don't know
but I think that's a serious thing.
We have to be concerned about.
Let me ask him out there question.
Okay. I know nobody knows
but what do you think it takes to build
a system of human level
intelligence has been the Dream from the 60s.
We talked about games about language
about about image recognition,
but really
the dream is to create human level.
Superhuman level tell
just what do you think it takes to do that?
And are we close?
I haven't a clue
and I don't know how metering talked about
this isn't his paper on machine intelligence back
and she's on her early fifties
or something like that
near the idea of the Turing test
and I don't know what the Turing test is.
Is it good to know? It's an interesting test
at least it's in some vague sense objective
whether you can Read anything into the conclusions
as a different story.
Do you have worries concerns
excitement about the future of artificial intelligence.
So there's a lot of people for a warrior
and you can speak broadly than just artificial
intelligence is basically Computing
taking over the world and various forms.
Are you excited by this future
as possibility of computing
being everywhere
or are you worried?
it's some combination of those.
I think almost all Technologies over the long run
or four good
but there's plenty of examples
where they haven't been good either
over the long run for some people
or over a short run
and Computing is one of those and AI within
it is going to be one of those as well,
but Computing Brad Leone for adjuster today
example is privacy
that the Use of things like social media
and so on
means that in the commercial surveillance
means that there's an enormous amount
more known about why people
other businesses go whatever
then perhaps one out of feel comfortable with
so that's an example.
Sesame sample
positive possible negative negative effect
of competing
being everywhere.
It's it's an interesting one
because It could also be a positive leverage correctly.
So I I you know,
I have a deep interest in human psychology
and humans seem to be very paranoid about this
data thing.
I add a but it that varies depending on age group.
It seems like the younger folks.
So it's exciting to me to see what society looks like
50 years from now
that The concerns about privacy might be flipped on
their head
based purely on human
psychology vs. Actual concerns are not
what would you think about Moore's law?
Will you said a lot of stuff?
We've talked to talk about programming
languages in their design
and their ideas
are come from the constraints and the systems
they operate
and do you think
Moore's law
that the exponential Improvement of systems? will
continue indefinitely
is as mix of opinions on that currently
or do you think do you think they'll be
do you think they'll be a plateau time
scale matter?
So if it goes on long enough that might be all we need.
Yeah, right won't matter.
So I don't know we've seen places where Moore's
law has changed
for example
mentioned earlier process
processors don't get faster anymore.
But use that same growth of the building
put more things in a given area
dude horizontal instead of vertical
so you can get more more processors or memory
or whatever
on the same chip.
Is that going to run into a limitation
presumably because at some point
you get down to Individual atoms
and so you got to find some way around
that will we find somewhere around that?
I don't know.
I just said that if I say it won't all be wrong.
So Jim Keller and he says he actually describes
he argues that the Moore's law
will continue for a long long time
because he's mentioned the Adam. We actually have
I think a thousandfold increase
the decrease in Trenton Transit Center size.
The possible before
we get to the Quantum of a sister still
a lot of possibilities.
He thinks he'll continue indefinitely
which is an interesting optimistic
optimistic viewpoint.
But how do you think
the programming languages will change for
this increase
whether we hit a wall or not?
What do you think?
Do you think
you'll be a fundamental change
in the way programming
languages are designed?
I don't know about that.
I think. What will happen
is continuation of what we see
in some areas
at least
which is the more programming
will be done by programs than by people
and that more will be done by sort of
declarative. Resin
procedural mechanisms
where I say, I want this to happen
you figure out how and that is
in many cases at this point.
Domain of specialized language is 4 narrow domains,
but you can imagine that broadening out
and so I don't have to say so
much in so much detail
some collection of software.
Let's call it languages are more programs
or something.
We'll figure out how to do what I want to do.
And one day getting to the human level.
The Utah still teach a course
computers in our world here at Princeton
that introduces Computing and programming to not major
what just from that experience.
What advice do you have for people who don't know any
more programming,
but I'm kind of curious about this world
or programming
seems to become more and more of a fundamental skill
that people need to be
at least the world. Recommend
a good book set for the questions
of should everybody know how to program
and I think the answer is probably not
but I think everybody should
at least understand sort of what it is
so that if you say to somebody
I'm a programmer.
They have a notion of what they might be
or if you say this is a program
or this was decided by a computer running a program
that they have some Intuitive
understanding and accurate
understanding of what that might imply
so part of what
I'm doing in the in this course,
which is very definitely for
non-technical people on a typical person in it
has a history or English major
try and explain how computers work
how they do
their thing.
What programming is how you write a program and how
computers talk to
each other
and what did they do
when they're talking to each other?
And then I would say nobody very rarely
and it does
anybody in that course go on to become a real
serious programmer,
but at least
they've got a somewhat better idea of what
all this stuff is about.
Not just the Purgatory
but the technology behind computers and Communications
do they write a do they try and write
a program themselves.
I introduce them to
how machines work at a level below. Hello
languages to wave a kind of a toy machine
that has a very small repertoire
doesn't instructions
and they write trivial Assembly Language programs
at that.
If you were to give a Flavour
the people of the programming world
if they competing world,
what are the examples issue should go
with so little bit of assembly to to get a sense
its lowest level of what the program. Really doing it
on Thursday.
I mean
in some sense.
There's no such thing
as a lowest level that you can keep going down.
But that's the place right Ruth online.
So the idea
that the computers have a fairly small repertoire
very simple instructions that they can do like adding
subtracting and branch
and so on
as you mentioned earlier
and that you can write code at that level
and it will get things done
and then you have the levels of abstraction that week.
Higher-level languages
like for trainer see or
whatever
and that makes it easier to write the code
and less dependent
on particular architectures.
And then we talked about a lot of the different
kind of programs
that they use all the time
that they probably realize our programs
like they're running Mac OS on their computers
or maybe windows
and they're downloading apps on their phones
and all of those things are programmed that are just
But we just talked to both except at a grand scale
and it's easy to forget that their actual programs
that people program. There's engineer
that wrote wrote those things
Jeff. Right?
And so anyway
guy make specting them to make an enormous
conceptual leap
from there 5 or 10 line
toy Assembly Language thing
that adds two or three numbers to know something
that is a browser on their phone or
whatever,
but but it's really the same thing.
If you look at the broad
in Broad Strokes at history,
what do you think the world like,
how do you think
the world changed because of computers?
It's hard to sometimes see the big picture
when you're
in it,
but I guess I'm asking
if there's something you've noticed
over the years that
like you were mentioning
the students are more distracted
looking at their now. There's a device to look at.
I think Computing has changed its run
this amount of it obviously,
but I think one aspect of
that is the way that people interact with each other
both locally and far away.
And when I was the age of those kids
making a phone call to somewhere was a big deal
because it cost serious money.
And this was in the 60s, right?
And today people don't make phone calls.
They send text or something like that.
So if there's a up and down and what people do
people think nothing of having. Correspondence
regular meetings
video whatever with friends or family
or whatever any other part of the world
and they don't think about that at all day.
And so that's just a communication aspect of it
and getting that brings
us closer together
or does it make us This
does it take us away from the closeness of
human-to-human contact.
I think it depends a lot on all kinds of things.
So I treat male with my brother and sister in Canada
much more often than I used to talk to them
on the phone.
So probably every two or three days
I get something or send something to them. 20 years ago.
I probably wouldn't have talked to them on the phone
nearly as much
so in that sense, that's brought my brother and sister
and I closer together if that's a good thing.
I watch the kids on campus
and they're mostly walking around with
their heads down
fooling with their phones
the point where I have to duck them.
I don't know that
that has brought them closer together
in some ways
doctors. Sociological research that says people are
in fact
not as close together as they used to be.
I don't know where that's
really true.
But but I can see potential downsides and kids
where you wake up
and smell
the coffee
or whatever.
But if you look at the again,
nobody can predict the future,
but are you excited kind of touched
just a little bit with with a I
but are you excited by the future
next
10-20 years to computing.
Will bring you if you're there
when there was no computers
Roy and now computers are everywhere
all over the world
and Africa and Asia and just every every person
almost every person in the world has the device.
So are you hopeful optimistic about the future?
It's mixed
if the truth be told
I mean,
I think there are some things about that that are good.
I think there's the potential for people
to improve their lives.
All over the place
and that's Obviously good
and at the same time
it released in the short time short run.
You can see lots and lots of bad
as people become more tribalistic
or parochial in their interest
and his enormous amount
more Us and Them
and people are using computers
and all kinds of ways to mislead or misrepresented
or flat out
lie about what's going on
and that is affecting politics locally
and I think
everywhere in the world.
Yeah. The long-term effect on political systems
and so on
and so who knows
knows indeed
people not have a voice
which is a powerful thing
people who are oppressed
have a voice
but also everybody has a voice
and the chaos that emerges
and that is fascinating to watch
you can go back and relive a moment in your life.
One that made you truly happy outside of family
or was profoundly transformative.
Is there a moment or moments that jump out at you
from memory?
I don't think specific moments.
I think there were lots and lots and lots
of good times
at Bell Labs
where you would build something
and it worked that works.
But yeah,
and then somebody used it from
they said she that speed
those kinds of things. Happened
quite often in that sort of Golden Era
and then the 70s when Unix was young
and there was all this
low-hanging fruit and interesting things
to work on in a group of people
who we're all together
in this
and if you did something they would try it out for you
and I think that was in some sense
a really really
good time and talk was talking example of that
that when you build it than people used it.
I know millions of people accused
and all your stupid mistakes are right there
for them to look at
it does have a positive impact on so so many people
so I think there's no better way to end it
Brian. Thank you so much for talking
it was an honor.
Thank you for listening to this conversation
with Brian. Kernighan
and thank you to our sponsors.
Eight Sleep mattress and raycon earbuds,
please consider supporting this podcast
by going to aceelite.com
and to buy raycon cam-plex.
Click the links by the stuff.
These both are amazing products.
It really is the best way to support this podcast
and the journey
I'm on
it's how they know.
I sent you
and increases the chance
that they'll actually support
this podcast
in the future.
Enjoy this thing subscribe on YouTube
review it with 5,000 Apple podcast
support on patreon or connect with me on Twitter
and Lex
fridman spelled somehow
miraculously without the letter
e just
fridman because when we immigrated to this country,
we were not so good at spelling
and now let me leave you with some words from
Brian kernighan
don't comment.
Code rewrite it.
Thank you for listening and hope to see you next time.