cover of episode #109 – Brian Kernighan: UNIX, C, AWK, AMPL, and Go Programming

#109 – Brian Kernighan: UNIX, C, AWK, AMPL, and Go Programming

2020/7/18
logo of podcast Lex Fridman Podcast

Lex Fridman Podcast

AI Deep Dive AI Insights AI Chapters Transcript
People
B
Brian Kernighan
Topics
Brian Kernighan: Unix 的诞生源于 Bell 实验室在 Multics 项目失败后,一群工程师对优秀计算环境的追求,以及 Ken Thompson 利用 PDP-7 进行的早期实验。它最初是用汇编语言编写的,后来发展成为用 C 语言编写的可移植操作系统。Unix 的设计哲学注重简洁性、模块化和可组合性,这使得它易于使用和扩展。Unix 的成功也带动了 C 语言的普及,并对后来的许多操作系统和编程语言产生了深远的影响。在 Unix 的发展过程中,他还参与了 AWK 和 AMPL 等编程语言的设计,以及 Go 语言的书籍编写。他认为编程既是艺术又是科学,既需要创造力,也需要严谨性。他分享了他对编程语言历史的看法,以及他对各种编程语言的经验和见解,包括对 AWK、Go、C、C++、JavaScript、Python、Rust 等语言的评价。他认为编程语言的多样性是好事,因为不同的语言可以探索不同的编程范式和思想。他还讨论了他在 AMPL 语言中的工作,以及他对优化问题的看法。他谈到了他对图论的研究,以及他对 P=NP 问题的看法。他还分享了他对人工智能的看法,以及他对人工智能未来发展的担忧和期望。他认为,虽然人工智能具有巨大的潜力,但也存在数据偏差等问题需要关注。他还谈到了他对计算机在当今世界影响的看法,以及他对未来计算技术发展的展望。他认为,计算技术在改善人们生活的同时,也带来了一些负面影响,例如隐私问题。他认为,未来编程语言的发展方向可能是更高的抽象层次和更强的声明式编程能力。 Brian Kernighan: 在 Unix 的早期,编程是一件非常有趣的事情,因为程序员可以自己构建大部分系统,并且反馈循环非常短。他认为 Unix 的效率源于其在资源受限的硬件环境下开发的背景,这迫使程序员寻找简洁高效的解决方案。他认为,好的操作系统应该易于编写程序,并且高效可靠。他认为,好的编程语言应该具有良好的表达能力和效率,并且能够适应不断变化的硬件环境。他认为,好的编程示例应该既实用又具有代表性,能够帮助程序员学习和理解编程语言。他认为,虽然现在有很多编程语言,但实际上只有少数几种语言被广泛使用。他认为,新的编程语言可以探索新的编程范式和思想,从而推动编程语言的发展。他认为,虽然机器学习具有巨大的潜力,但也存在数据偏差等问题需要关注。他认为,未来计算技术的发展将会带来许多机遇和挑战,我们需要谨慎地应对这些挑战。

Deep Dive

Key Insights

Why did Unix become so influential in the world of computing?

Unix was designed as a programmer-friendly environment that made it easy to write and use programs. Its simplicity, efficiency, and portability allowed it to be widely adopted, especially in academic and research settings, leading to its widespread influence.

What was the initial hardware used to develop Unix?

Unix was initially developed on a PDP-7, a mini-computer made by Digital Equipment Corporation. It had limited memory and processing power but was sufficient for early experiments in file systems and operating systems.

What is the Unix philosophy, and how does it influence modern programming?

The Unix philosophy emphasizes simplicity, modularity, and the idea that each program should do one thing well. This approach has influenced modern programming by promoting the use of small, reusable tools that can be combined to solve complex problems.

What is AWK, and why is it still widely used today?

AWK is a scripting language designed for text processing, created by Brian Kernighan, Al Aho, and Peter Weinberger. Its simplicity and powerful pattern-action paradigm make it ideal for quick data analysis tasks, which is why it remains popular even after 40 years.

What is the significance of the C programming language in the history of computing?

C is a system programming language that found a balance between expressiveness and efficiency, making it ideal for writing operating systems and other low-level software. Its portability and association with Unix made it one of the most influential languages in computing history.

What is the role of AMPL in optimization problems?

AMPL is a mathematical programming language used to model and solve large-scale optimization problems. It allows users to express complex constraints and objective functions in a human-readable format, which can then be passed to solvers for computation.

What does Brian Kernighan think about the future of artificial intelligence?

Kernighan believes AI has tremendous potential, particularly in areas like games and machine translation. However, he also raises concerns about biases in data that could lead to incorrect conclusions, emphasizing the need for careful handling of data to avoid reinforcing societal biases.

What advice does Brian Kernighan have for people who are curious about programming?

Kernighan suggests that while not everyone needs to be a programmer, everyone should understand what programming entails. He recommends starting with simple concepts like assembly language to grasp the fundamentals of how computers work and how programs are constructed.

What does Brian Kernighan think about the impact of computing on human communication?

Kernighan sees both positive and negative impacts. On one hand, computing has made global communication easier and more frequent. On the other hand, it has led to increased distraction and potential isolation, as people often focus more on their devices than on their immediate surroundings.

What is Brian Kernighan's view on the future of programming languages?

Kernighan believes that programming will increasingly be done by programs rather than people, with more emphasis on declarative languages where users specify what they want rather than how to achieve it. This shift will likely lead to higher levels of abstraction in programming.

Chapters
This chapter explores the origins of Unix, tracing its development from the Multics project's demise to Ken Thompson's creation of the initial Unix operating system on a PDP-7. It details the early challenges and the collaborative environment at Bell Labs that fostered innovation.
  • Unix's creation on a PDP-7 computer
  • Ken Thompson's pivotal role
  • Bell Labs' collaborative culture
  • Unix's initial implementation in assembly language
  • The evolution of Unix from a proprietary to a widely adopted system

Shownotes Transcript

Brian Kernighan is a professor of computer science at Princeton University. He co-authored the C Programming Language with Dennis Ritchie (creator of C) and has written a lot of books on programming, computers, and life including the Practice of Programming, the Go Programming Language, his latest UNIX: A History and a Memoir. He co-created AWK, the text processing language used by Linux folks like myself. He co-designed AMPL, an algebraic modeling language for large-scale optimization.

Support this podcast by supporting our sponsors:

If you would like to get more information about this podcast go to https://lexfridman.com/ai or connect with @lexfridman on Twitter, LinkedIn, Facebook, Medium, or YouTube where you can watch the video versions of these conversations. If you enjoy the podcast, please rate it 5 stars on Apple Podcasts, follow on Spotify, or support it on Patreon.

Here's the outline of the episode. On some podcast players you should be able to click the timestamp to jump to that time.

OUTLINE: 00:00 - Introduction 04:24 - UNIX early days 22:09 - Unix philosophy 31:54 - Is programming art or science? 35:18 - AWK 42:03 - Programming setup 46:39 - History of programming languages 52:48 - C programming language 58:44 - Go language 1:01:57 - Learning new programming languages 1:04:57 - Javascript 1:08:16 - Variety of programming languages 1:10:30 - AMPL 1:18:01 - Graph theory 1:22:20 - AI in 1964 1:27:50 - Future of AI 1:29:47 - Moore's law 1:32:54 - Computers in our world 1:40:37 - Life