Code

The Language of the Gods: Why Hackers Love Lisp and How to Achieve Enlightenment with It

The Language of the Gods: Why Hackers Love Lisp and How to Achieve Enlightenment with It

Free Course: "Quick Start with Python"

Learn More

The father of object-oriented programming, Alan Kay, called it "the greatest programming language ever created." Computer scientist and Pulitzer Prize-winning author Douglas Hofstadter described it as one of the most significant and amazing languages ​​in the world of computer technology. Eric Raymond, co-founder of the Open Source Initiative, emphasized that learning this language provides a deep understanding of programming and contributes to the development of programmer skills. This programming language not only expands the horizons of knowledge but also opens up new opportunities for creating effective and innovative software solutions.

Developers and hackers have always paid attention to programming languages ​​that provide flexibility and powerful capabilities. Lisp, first introduced in 1958, became a favorite among early programmers and computer scientists. Its unique syntax and metaprogramming capabilities attracted the attention of many developers, making Lisp not only a historical language but also a relevant one for today's technological trends. It continues to be used in areas such as artificial intelligence and functional programming, maintaining its popularity and importance in the programming world.

The Language of Artificial Intelligence

John McCarthy, the creator of Lisp. Photo: Wikimedia Commons

Mathematician John McCarthy developed the Lisp programming language in the late 1950s. He is also considered to be the coiner of the term "artificial intelligence" (AI) and the founder of functional programming. During this period, McCarthy was working on a research project that required the implementation of new concepts in programming. To this end, he created Lisp as a tool for implementing his ideas. In 1960, he published the landmark paper "Recursive Functions of Symbolic Expressions and Their Computation by Machine," introducing Lisp to a wider audience and the scientific community. This programming language became a milestone in the development of AI and had a significant influence on subsequent technologies and approaches in the field of programming.

In Lisp, the entire structure of the language is based on lists. Each statement represents a list of elements, and each element can be either a list or an atom. An atom is a basic unit of data that can be a number or a symbol. Lisp's founders believed that the language reflected the workings of the human brain and provided the ability to encode any intellectual processes. Thus, Lisp has become an important tool in the field of artificial intelligence and data processing. Its unique structure and flexibility open up broad prospects for the development of algorithms and models that facilitate a deeper understanding of thinking and logic.

Paul Graham, co-founder of Y Combinator and author of the Hacker News portal, which is developed in Arc, a dialect of Lisp, compared John McCarthy to Euclid and described Lisp as a "scientific discovery." This statement underscores the significance of Lisp in the field of programming and its influence on the development of computer science. McCarthy, one of the founders of artificial intelligence, laid the foundations for many modern technologies, and his work continues to inspire programmers and researchers around the world. Lisp, with its flexibility and powerful abstractions, provides developers with unique tools for creating complex systems and algorithms.

In 1960, John McCarthy published a landmark paper that transformed programming in the same way Euclid changed the approach to geometry. Lisp was not just a new programming language, but a genuine scientific discovery that had a profound impact on the development of computing technology and artificial intelligence. This language became the basis for many modern programming concepts and methods, making it an important milestone in the history of computer science.

Tasks related to artificial intelligence have always been resource-intensive, and the computing power of the 1980s was significantly inferior to today's technology. Under these conditions, the developers of Lisp sought to maximize its performance. As a result, sophisticated compilers were created that rivaled C compilers in quality. Over time, Lisp acquired a mythical aura, which arose for two main reasons.

In the mid-1970s, artificial intelligence researchers faced a shortage of computing power. Engineer Peter Deutsch of MIT proposed creating specialized computers for running Lisp programs. In the 1980s, Symbolics introduced a series of Lisp machines whose architecture was optimized for this language. Thanks to this, Lisp has become associated with efficient and powerful applications in the field of artificial intelligence.

The Symbolics 3640 Lisp Machine. Photo: Wikimedia Commons

During those years, Lisp machine makers and artificial intelligence research labs developed their own versions of the Lisp language, resulting in many dialects. This diversity caused a split in the community. To unite efforts and standardize the language, in 1981 a group of developers began working on a common standard, known as Common Lisp. This standard combined the best features of all existing dialects, which contributed to the wider adoption and application of the language in various fields of programming and AI research.

The second reason is that in 1985, MIT professors Harold Abelson and Gerald Sussman published a textbook called "The Structure and Interpretation of Computer Programs," which became known among hackers as the Wizard Book. This textbook became the standard for MIT students learning to program in Scheme, a dialect of Lisp, for over twenty years. Thanks to The Wizard's Book, Lisp began to be seen as a tool for understanding deep philosophical concepts of programming, which significantly influenced the development of programming and the education of future specialists in this field.

Book cover "Structure and Interpretation of Computer Programs." Image: H. Abelson, G.J. Sussman, J. Sussman. Structure and Interpretation of Computer Programs. The MIT Press, 1996

In the late 1980s, the popularity of the Lisp programming language declined significantly. This occurred against the backdrop of declining interest in artificial intelligence research, which led to a decline in demand for Lisp. Concurrently, more affordable and powerful computers flooded the market, which contributed to the displacement of specialized Lisp machines.

The second wave of Lisp's popularity began with the publication of an essay by Paul Graham, who described Lisp as "the best language for startups." In 1995, Paul Graham and a partner founded Viaweb and developed an online store builder, also called Viaweb, written in this outstanding programming language. Lisp has become a sought-after tool for creating innovative startup solutions due to its flexibility and powerful capabilities.

We decided to use the Lisp programming language to accelerate the process of expanding the functionality of our product and introducing unique features unavailable to competitors. Lisp, being a high-level language, allows us to work effectively with a small team of developers, which significantly reduces costs and increases productivity.

Paul Graham is a co-founder of Y Combinator and the author of Hacker News. He is known for his deep knowledge of startups and technology. Paul Graham actively shares his thoughts on entrepreneurship, programming, and startup culture through essays and lectures. His work inspires many founders and developers looking to build successful companies in the rapidly changing tech world. Under Graham's leadership, Y Combinator has become one of the most influential startup accelerators, providing support and funding for new ideas and projects.

Graham's words convinced only a few enthusiasts. According to GitHub statistics, Emacs Lisp ranks 25th, and Common Lisp is 49th in popularity among platform users. Despite this, the most prominent features of these languages ​​have been adopted by other programming languages. For example, Python adopted the concept of list comprehensions, while C# implemented the LINQ integrated query language.

Lisp is one of the oldest programming languages, second only to Fortran in terms of age. According to the TIOBE index for December 2021, Lisp ranks 31st, ahead of languages ​​such as Lua, Scala, and TypeScript. This language remains relevant thanks to its unique structure and powerful development capabilities. Despite its age, Lisp finds use in modern projects, confirming its importance in the programming world.

Why hackers fell in love with Lisp

Lisp quickly gained popularity among hackers and programmers. The first version of The Jargon File, a well-known dictionary of hacker slang, did not have a separate entry for Lisp, since the practical use of this language was so widespread that every hacker worked with it. However, over time, information about Lisp was added to the dictionary, confirming its importance and influence in the programming world.

LISP (LISt Processing language or, according to another version, Lots of Irritating Superfluous Parentheses) is a programming language that became the basis for the development of artificial intelligence. It is based on the use of variable-length lists and trees, as well as the concept of interpreting code as data and vice versa. Developed by John McCarthy at MIT in the late 1950s, LISP is one of the oldest high-level programming languages, second only to Fortran. Modern implementations of LISP differ significantly from the original, but it remains an important tool in programming and artificial intelligence research. In the 1980s, LISP was the primary language among hackers and programmers, underscoring its significance in the history of computing. Eric Raymond, co-founder of the Open Source Initiative, argues that Lisp still outperforms most modern programming languages. He notes that Lisp's unique features and flexibility make it a relevant and effective tool for developers. Despite technological advances and the emergence of new languages, Lisp retains its appeal thanks to its concepts, which allow for the creation of complex solutions with minimal effort. This ability of the language to adapt and solve a variety of problems underlines its importance in the programming world.

Of course, I am ready to help with text editing. Please provide the original text you want to change.

In the 1970s, the Lisp programming language stood out for its power and flexibility, surpassing many modern languages. Even today, its design continues to be superior to many newer competitors. Lisp provides programmers with unique opportunities for creativity and intellectual freedom, making it a favorite choice among hackers and developers. This language continues to inspire and attract attention, remaining relevant and in demand in the programming community.

According to Paul Graham, the Lisp programming language brought many innovative ideas at the time of its appearance. This language became the basis for the development of new concepts in the field of programming, including data processing and the creation of abstractions. Lisp stood out for its flexibility and powerful capabilities for manipulating code as data, which allowed developers to create more complex and adaptive programs. The innovations introduced by Lisp have had a significant impact on subsequent programming languages ​​and approaches to software development.

The main strength of the Lisp programming language lies in its macros. Macros allow developers to create new syntactic constructs, significantly expanding the capabilities of the language. This makes Lisp a unique tool for solving complex problems, as developers can adapt and optimize code to their needs. The use of macros in Lisp promotes more expressive code and simplifies the programming process. Due to their flexibility and power, Lisp macros remain one of the most significant aspects of the language.

Only the most talented and intelligent programmers choose the path of Lisp, and only the most outstanding of them achieve mastery of macro creation. Macros are one of the key advantages of Lisp and a true strength of any programming language. They allow programmers to write more flexible and efficient code, automating routine tasks and expanding the capabilities of the language. Mastering macros opens new horizons for developers, enabling them to create complex systems and optimize development processes. Doug Hoyt is an experienced programmer with a wide range of software development skills. He specializes in creating efficient and robust applications and has a deep understanding of web development and databases. Doug continually updates his knowledge of new technologies and programming techniques, allowing him to stay at the forefront of the industry. His professional achievements include successful projects in various fields, from startups to large companies, where he implemented innovative solutions, optimizing business processes. Doug Hoyt is a reliable specialist who strives for excellence in every task. Macros in Lisp allow you to transform code in this language into other programming languages ​​and vice versa. By mastering macro writing, a developer will be able to see that many other languages ​​are merely wrappers around the concepts inherent in Lisp. This opens new horizons for understanding and using various languages, making the programming process more flexible and powerful.

Image: Randall Munro / xkcd

Every programming language typically includes a standard library, which consists of modules, classes, objects, constants, global variables, and functions. These elements can be used in any program written in the language. If the standard library doesn't contain a necessary function, the developer can create it themselves or add a new class. Lisp uses macros to extend the syntax, which significantly increases the language's capabilities.

Paul Graham described macros as programs that create other programs. Peter Siebel described Common Lisp as a "programmable programming language," which highlights its main advantage. With Common Lisp, you don't think about adding the functionality you need; you simply implement it. This eliminates the time spent formulating ideas within the constraints of syntax, making the development process more flexible and efficient.

Lisp is the founding language of many programming languages. Its versatility allows it to be adapted to any need: from interpreted scripts to statically compiled, high-performance languages. Common Lisp is exceptionally flexible, allowing for code changes at any stage of development. The result is reliable, clean, and efficient code, which is difficult to achieve in other programming languages.

Pascal Constanza is a programmer specializing in the Common Lisp programming language. With his experience and deep understanding of functional programming, he makes significant contributions to the development of software solutions on this platform. Common Lisp is known for its flexibility and powerful capabilities, making it an ideal choice for creating complex systems and applications. Pascual Constanz's work covers a wide range of topics, from algorithm development to code optimization, highlighting his professionalism and mastery in this field.

Slava Akhmechet, founder of RethinkDB, programmer, and blogger, shared his experience of experiencing the same epiphany Eric Raymond mentions. This state of inspiration and clarity of thought helped him realize the importance of open source and collaborative programming. Akhmechet emphasized that such moments are a source of motivation and creativity, especially in software development. His views on technological innovation and its impact on the developer community are becoming increasingly relevant in the modern world.

Enlightenment has arrived. At first, I didn't realize what was happening, but then suddenly I reached nirvana. Everything became clear. I had repeatedly heard Eric Raymond's words about Lisp being worth learning for the sake of profound enlightenment, but I didn't understand their true meaning. Now, finally, this phrase has acquired meaning for me. I reached a near-divine state of mind, and my views on computer science changed. At that moment, I became part of a community that values ​​Lisp. Learning this language has opened up new horizons in programming and thinking for me.

Image: Randall Munro / xkcd

Lisp's Benefits Aren't Clear to Everyone

If Lisp is truly so good, why is its use limited? The main reason is that beginning developers don't always see the obvious advantages of this language. For those aspiring to work in web development, JavaScript is preferred, while C/C++ is chosen for writing drivers. However, when it comes to Common Lisp, explaining its importance can be difficult. This language offers powerful tools for abstraction, flexibility, and process automation, making it useful for solving complex problems in the fields of artificial intelligence, scientific computing, and prototyping. Despite its lesser popularity, learning Common Lisp can significantly broaden a developer's horizons and deepen their understanding of programming in general.

Learning Common Lisp doesn't provide the same obvious benefit as programming languages ​​like C, Java, or C++. However, the main advantage a programmer will gain is the unique experience this language offers. Common Lisp develops critical thinking and deepens understanding of programming principles, which can be useful for solving complex problems and developing efficient algorithms.

Paul Graham is the co-founder of the investment firm Y Combinator and the founder of the popular Hacker News platform. He is an influential figure in the startup and technology world, known for his thoughts on entrepreneurship, programming, and innovation. Paul Graham actively shares his knowledge and experience through essays that inspire numerous startup founders. His contributions to the startup community and entrepreneurial culture make him a key figure in the modern tech ecosystem.

Matthew Butterick, an American typographer, lawyer, writer, and programmer, argues that the Lisp programming language has many advantages. However, its proponents often fail to present these advantages clearly and concisely.

Lisp and its dialects have unique advantages that are worth considering. These programming languages ​​offer powerful tools for working with abstractions, allowing developers to write more expressive and flexible code. Thanks to its functional nature and support for metaprogramming, Lisp allows developers to quickly solve complex problems. However, to popularize Lisp, these advantages must be communicated to a wide audience in a short period of time. If Lisp advocates fail to emphasize its advantages, it is not surprising that the language remains on the fringes of programming. It is important to create accessible and visual materials that demonstrate the power and capabilities of Lisp to attract new users and increase its popularity in the software development world.

Butterick demonstrates illustrative programming examples. For example, in Racket, one of the well-known Lisp dialects, the code for printing "Hello, World!" looks the same as the phrase itself: "Hello, World!" Even someone without programming experience can see the difference between a simple line of code and code that accomplishes the same task.

Most programming languages ​​distinguish between expressions and statements. Expressions are evaluated and return a value, while statements are commands that are executed. For example, in Python, an assignment statement is x = 42, and an expression could be written as x + 42. However, the following code would not make sense in Python:

In the Lisp programming language, the if statement is a full-fledged expression and can return specific results. This allows programmers to use it flexibly and creatively in computations. To effectively use if in Lisp, it is important to broaden your understanding of functional programming and see the possibilities it provides.

Lisp frees developers from the syntactic limitations of many other programming languages. This simplifies the development process and opens up new horizons for creativity. You can combine various elements of the language in the most unexpected ways, which contributes to the creation of effective and unique solutions. Using Lisp allows programmers to realize their ideas without rigid boundaries, making it a powerful tool for developing complex systems and algorithms.

Matthew Butterick is an American typographer, lawyer, writer, and programmer. He is known for his achievements in typography and typeface design. His work combines legal expertise with modern technology, resulting in unique design and layout solutions. Butterick actively shares his knowledge and experience through publications and lectures, inspiring a new generation of designers and developers. His contributions to typography and programming continue to influence the industry and contribute to the development of new standards in these fields.

Programming in Common Lisp offers a unique experience for developers striving for clean and clear code. This language allows you to express your intentions as effectively as possible, making the development process not only productive but also enjoyable. Common Lisp has powerful features that allow you to implement complex tasks faster and with less effort than other programming languages. Its high level of abstraction and support for functional programming make Lisp an ideal choice for those who value code quality and simplicity.

Paul Graham is a renowned entrepreneur and investor who co-founded Y Combinator, one of the most successful startup incubators in the world. He is also the creator of Hacker News, a popular platform for sharing news and ideas about technology and startups. Paul Graham is known for his insightful articles on entrepreneurship, programming, and startup culture, which inspire many new entrepreneurs. His contribution to the startup community is invaluable, and his ideas continue to influence many young companies and founders around the world.

What is written in Lisp

In 1996, Naughty Dog released Crash Bandicoot, which caused a sensation in the gaming market. Players were captivated by the vibrant visuals and smooth animation. Crash Bandicoot quickly gained popularity and became one of the most iconic games for the Sony PlayStation console. Naughty Dog subsequently released Jak and Daxter: the Precursor Legacy, which also received critical acclaim and a high score of 90 out of 100 on Metacritic. These games not only strengthened the studio's reputation, but also made a significant contribution to the development of platform games.

Screenshot: Crash Bandicoot / Naughty Dog game

Using Lisp and Allegro CL, the developers effectively created tools for designing smooth animations and detailed textures. As a result of their work, over 500 unique objects with a variety of gameplay and visual features were developed. These achievements significantly enriched the gaming experience, providing players with new opportunities for interaction and exploration.

Lisp turned out to be the optimal solution for our project. We were developing an innovative game, which required working with complex character behavior and the implementation of real-time actions. Programming languages ​​such as C turned out to be too cumbersome for our task, while Lisp is ideal for developing games that require high flexibility and expressiveness of code.

Andy Gavin is a co-founder and programmer at Naughty Dog, known for its iconic video games. His contribution to the gaming industry is invaluable, as he participated in the development of such projects as «Crash Bandicoot» and "Jak and Daxter." Through his unique approach to game design and programming, Gavin was able to create engaging game mechanics and captivating stories that became the foundation for Naughty Dog's success. His work has had a significant impact on the development of video games, and he continues to be a recognizable name in the field. Mark Tarver, an experienced Lisp programmer with nearly 30 years of experience, explained in detail the differences between the C and Lisp programming languages. He noted that C is a low-level language that provides more direct access to hardware resources and performance optimization. While Lisp, as a high-level language, offers powerful abstractions and flexibility, making it ideal for developing complex algorithms and artificial intelligence. Tarver emphasized that the choice between C and Lisp depends on the specific tasks and requirements of the project, as well as the programmer's preferences. Thus, understanding the specific features of each language can significantly impact development efficiency and the quality of the final product.

Writing in C can be compared to the painstaking process of assembling a lentil mosaic with tweezers and glue. This language requires attention to detail and precision. At the same time, Lisp is a powerful tool, like an air gun: it is precise and effective. Lisp opens new horizons for developers, providing capabilities unavailable with other programming languages. The choice between C and Lisp determines the approach to problem solving and the level of opportunities available in software development.

There are many projects that use various dialects of the Lisp language. These projects cover a wide range of fields, including artificial intelligence, data processing, and web development. Lisp dialects such as Common Lisp, Scheme, and Clojure offer powerful tools for developing complex systems. They enable the creation of flexible and adaptive solutions, making them popular among developers and researchers. Using Lisp dialects in projects improves productivity and simplifies the development process, which is an important aspect in today's technological environment.

  • GNU Emacs - written by Richard Stallman in Emacs Lisp. Some fans even jokingly call it an operating system.
  • Grammarly is an online service for checking the quality of English texts.
  • Piano is a Common Lisp software package used by Boeing and Airbus.
  • London Underground software is developed in Common Lisp.
  • AutoCAD is a system that uses the internal AutoLISP language.
  • Apache Storm is a real-time big data processing system written in Clojure (a Lisp dialect) and Java.

Lisp Prospects

Lisp, despite its long history, continues to remain relevant and is actively developing through various dialects. This programming language has evolved into a large family of languages ​​offering unique approaches to software development. Today, there are more than 20 Lisp dialects, among which the most well-known continue to be used in both commercial and scientific projects.

  • Common Lisp is the main dialect, released in 1984 and adopted as an ANSI standard in 1995. It supports functional programming, macros, closures, and other features accumulated by other dialects since 1959.
  • Scheme is one of the oldest dialects, created in the 1970s by MIT researchers. The language is distinguished by its flexible and minimalistic design. Scheme does not provide OOP features, but the developer can implement them and other tools independently.
  • Clojure is a compiled language created in 2007 and runs on the JVM and CLR platforms. It supports concurrent programming, macros, and functions as first-class objects. Easily integrated with Java.
  • Racket is a descendant of Sheme, released in 1994. Initially created as an educational language, but over time it grew into the environment of language-oriented programming - that is, it became a tool for creating languages.
  • Emacs Lisp is the dialect in which GNU Emacs is almost entirely written. Created by the author of the GNU project and founder of the Free Software Foundation Richard Stallman and programmer Guy Steele in 1985.
  • Arc is one of the latest Lisp dialects, developed by Paul Graham in 2008. The Hacker News news portal and some other parts of Y Combinator are written in Arc.

According to the TIOBE index, Common Lisp is currently the most popular Lisp dialect, ranking 31st. Clojure, Racket, and Scheme are at the bottom of the list. Despite the existence of various dialects, Lisp still remains an underground language. However, Kent Pitman, a respected Lisp veteran and technical contributor to X3J13, is confident that the language has every chance of regaining its former popularity.

Lisp's main problem is that it achieved commercial success too early. In the mid-1980s, the computing problems the world faced did not require the solutions Lisp offered. At the time, programs such as MacWrite, MacPaint, and Lotus 1-2-3 dominated, and the choice between Lisp and C was unimportant. However, over time, computing requirements became significantly more complex. In today's world, Lisp offers far more solutions and capabilities than ever before.

Read also:

  • Ada Lovelace, Grace Hopper, and 7 other women who created your IT
  • Orthodox PHP developer: The Big Bang is proof of God's existence
  • Must read. 5 latest articles about the Lisp language