sábado, 23 de febrero de 2019

The Roots of Lisp

After reading Paul Graham "The Roots of Lisp", I realized that there is a lot of information and knowledge that I still have to learn. Starting with John McCarthy's paper showing that with some simple operators and notation for functions you can create a programming language, which he named LISP (List Processing), I must say that I had no idea of the origin of the name, but thanks to the reading I understood that this name is because it uses a simple data structure (list) for code and data. 

McCarthy's discovery changed the way the programming languages were created, with Lisp created, now there were two models of programming: C model and Lips model. The evolution in computer's performance and hardware has made that the new programming languages move to the Lisp model. 

Graham explains some important terms that McCarthy created, starting with an expression which is also an atom and made by a sequence of letters or a list of zero or more expressions separated by whitespace and enclosed by parentheses. These expressions go together with 7 different operators which are the base for Lisp programs, these operators are: quote, atom, eq, car, cdr, cons and cond. 

Graham also talks about how Lisp functions' origin and how they are expressed. Functions in Lisp are expressed as lambda with parameters and an expression, functions are evaluated through a function call and with this, the expressions are evaluated. There are different types of functions that are created with the 7 operators. Functions can also concatenate lists, substitute expressions, etc. but the main thing is that there are functions that take any Lisp expression as an argument and return the value. 

I can say that I've enjoyed this reading, finding out about Lisp origins and how the functions, expressions, and operands were created too and their importance with Lisp performance. I can say that McCarthy's purpose of creating a language that describes algorithms was successful. There is something more important than just learning mathematical terms or theorems, the thing is to learn where do programming languages are heading with these inventions and creations for new programming languages. 

References: 

- P. Graham (2002). The Roots of Lisp. Available at: http://webcem01.cem.itesm.mx:8005/s201813/tc2006/roots_of_lisp.pdf

viernes, 8 de febrero de 2019

Rich Hickey on Clojure

After listening to Rich Hickey on Clojure, I can agree with Rich on some topics. The main challenge for Rich is to make people understand that Clojure is very simple and that there are not as many rules as they might imagine. Clojure has many benefits, and Rich Hickey talks about one in specific: metaprogramming. Many of Lisp features are list, and being able to create programs from programs, programs from many things are great. Metaprogramming has to be used carefully.

Java might be a simple programming language and used by more people than Lisp but Lisp has an advantage over Java. Using Lisp, specifically, Clojure will be simpler than Java thanks to the implementation of lots of functions in the Sequence API. 

Rich Hickey also refers to the differences between Lisp and Clojure, with which I agree with some of them. First, Clojure is unique because the program is presented as data structures and not as a text to the compiler. Clojure has also more structures than only lists, for examples, vectors, and maps. Rich also says that one difference between Clojure and Lisp popularity is that Clojure retains Lisp power by including access to Java's libraries and many people know Java and its libraries very good. Finally, Rich says that Clojure's main characteristic is that the core data structures are immutable, the built-in library is made in terms of abstraction and non-concrete data structures, protocols, persistent data structures, and reference types, this might be kind of confusing by reading but it is very important for Clojure's working. 

I really liked this podcast because it talks about many important points that we don't know about lisp and after every reading or listening during this almost 3 months of working with Clojure, I keep learning more and more about this programming language and about different technologies like imperative languages. An imperative language is not something usually talked about in the programming area and it can be sometimes kind of difficult to work with but thanks to JVM, Clojure is a programming language which might become a powerful tool for using it in projects, or in any other activity. I want to improve my programming skills to become a better programmer by using Clojure. 


References: 



- Episode 158: Rich Hickey on Clojure, retrieved on September 22th, 2018 from: http://www.se-radio.net/2010/03/episode-158-rich-hickey-on-clojure/

miércoles, 6 de febrero de 2019

Dick Gabriel on Lisp

After listening to Dick Gabriel and his experience with Lisp, I can agree that Lisp is a functional language and this requires a different way of think than Object-Oriented Programming Languages. Lisp has a prefix notation, this means that a simple addition like 1 + 1 = 2, would be a (+ 1 1) in Lisp. You may ask, why do this operation that way? Well, because for the computer it is easier to parse the operation with a prefix notation because the operations are executed as they are read. Even though Lisp has been used for artificial intelligence, the main reason for Lisp's lack of usage is the learning curve which is high. 

I've heard of many programming languages, but I must accept that I haven't heard of Lisp nor Clojure before this course and this must be because of the few people that use them. There might be a few people using them, but these people are the ones who have a specialized way of thinking. 

Knowing Lips and its functionality will help you for having better programming practices, a clear example is macro, a macro is a program that creates programs by taking forms or objects as inputs and produces code to be then compiled and executed. 

Macros are not the only fascinating feature of Lisp, the way that Lisp is installed into computers is another amazing feature because Lisp installation makes the language to create itself and allows the user to modify or tune the language. 

As a conclusion, I can say that the fact that you don't know a programming language doesn't mean that it doesn't exist. It is always good to know as many programming languages as possible because you don't know when you will need it. It would be good to learn programming languages as Dick suggest, as poetry, because in this way you can be more creative along with the programming languages features you will become a better programmer.

References: 

- Episode 84: Dick Gabriel on Lisp, retrieved on August 30th, 2018 from: http://www.se-radio.net/2008/01/episode-84-dick-gabriel-on-lisp/