sábado, 20 de octubre de 2018

Language as the Ultimate Weapon


Why is the 1984 novel by George Orwell relevant to a student taking the Programming Language course?, this is a question that can be answered using the article written by Jem Berkes, Language as the ultimate weapon in 1984.

The novel told us what happen today in the media, talking about the use of languages, we are manipulated subtly to a certain way of thought. A language is a social construct, but also a human thing, one thing that the novel and the article have in common is the Power concept.

Language is a very powerful weapon that can be better than torture because it can be continuously applied to the public without raising great public opposition or fear. Society is being bombarded with oppression without feeling it directly.
“Media is powerful as a tool for manipulation both because the public is widely exposed to it, and because the public trusts it”. (Berkey)

A comparison between the 1984 novel and the article is that in the novel there is a dystopian language called Newspeak where English is reduced to fool the nation so as to obey a party and just use certain words that might never affect them, and this is like a Lisp dialect, Clojure.
In an ordinary context, language is a weapon that can be used for good, in 1984 novel, Orwell shows us how it can also be used to control an entire society and make it think as we want to.

Now, trying to answer the main question I think that we are studying programming languages, and even if programming languages and natural languages are not the same, they have a great number of things in common. We expand our vision of programming and we understand easily implementations in languages beyond our knowledge. We must fight the ignorance imposed to us as the novel recommend us

sábado, 13 de octubre de 2018

The Roots of LISP


This article explained us that John McCarthy published a paper where he showed how, given a handful of simple operators and a notation for functions, you can build a whole programming language. Its name was Lisp (List processing).

The article shows us a definition for expressions, which is an atom, a sequence of letters, or a list of zero or more expressions, separated by whitespace and enclosed by parentheses.
If an expression is a list, we call the first element the operator and the remaining are called the arguments.

A Function contains atoms and expressions, where in a function call each expression is evaluated. Parameters can be used as operators in expressions as well as arguments.
Adding periods at the end distinguishes primitive function from those defined in terms of them and avoids clashes with existing Common Lisp functions.
We can define functions that concatenate lists, substitute one expression for another, etc. We can also write a function that acts as an interpreter for our language. It means a function that takes as an argument any Lisp expression and returns its value.

Using quote,atom,eq,car,cdr, cons, and cond we can define a function that actually implements our language, and then using that we can define any additional function we want.

If we want a language for describing algorithms, we might want something more abstract, and that was one of McCarthy´s aims in defining Lisp. Lisp does not have side effects, no sequential execution, no practical numbers, and dynamic scope. But these limitations are remedied with surprisingly little additional code.

In this paper, McCarthy´s falsity is represented by f, not the empty list. If we can understand the McCarthy´s eval, we understand more than just a stage in the history of languages. Lisp is not something that McCarthy designed so much as something he discovered




sábado, 6 de octubre de 2018

THE PROMISES OF FUNCTIONAL PROGRAMMING


This blog talks about the advantages of functional programming. It helps the reader to understand what makes Clojure language a powerful tool for parallelizing and dealing with concurrency.
 To use functional programming, we must compute functions, a mapping from input values to output values, the function returns the same output when given the same input and it´s only task is to return a value without side effects. As a function, does not change anything in memory, variables are not needed, this makes a great advantage because unlike traditional programming, you can trace the function call chain to know where a value came from.

Functional programming uses abstraction, so we can use a higher-order function as a result. This kind of functions uses another function as a parameter and return a function as a result, with these functions is easier to implement patterns that occur repeatedly inside an algorithm.
Clojure is a Lisp derivation, it is a functional in terms that it deals with the mathematical definition of a function, every new function defined by the opening of a parenthesis returns either a value, or another function.

Clojure uses recursion, and lazy sequences instead of typical loops to manage concurrency. It also talks about that we must make use of this kind of functional languages to take advantage from non-stopping technological world.

Concurrency and parallelism are gaining importance because single threaded performance is not improving as it used to, and computer hardware is getting more powerful and to take advantage of this power, concurrency and parallelism are to be used.
Concurrency is difficult to use because several threads need to coordinate to not use data at the same time to avoid errors in the result, this is currently solved by locks, semaphores, etc.
Functional programming offers regarding concurrency and parallelism, there is a long way until parallel programming is possible as it is imagined

sábado, 22 de septiembre de 2018

Rich Hickey on Clojure


On this podcast we can hear to Rich Hickey, who is the designer/ writer of Clojure. The master mind behind Clojure. On this podcast he talks about Clojure and some other aspects of Lisp Language as well, he refers to it as a motivation that led him design a new version of the Lisp language. He explains us how Lisp was considered the basis for Clojure.

At the beginning he gives us a brief introduction of both languages. He makes an affirmation that says that Clojure is a dynamic programming language for the gradient boosting machine, but it also runs in a common language runtime.

 Clojure runs scripts so it is considered a functional language, it runs on JVM. This is the reason why this programming language can run almost everywhere. The implementation of its data structures helps to make programming much easier than Lisp. On the other hand, Lisp programs are presented to the compiler in the form of data structures as the compiler doesn´t compile text.

Rich Hickey says that Lisp has never become mainstream as Java or C++ because this language was not designed to be a mainstream language, it was targeted toward superusers like researchers and smart people with difficult problems. As a main reason, he wrote Clojure because he wanted a language with all the power of Lisp but without the isolation problem.

The main differences and common aspects mentioned in the podcast about these two programming languages are that in Lisp data structures are mutable, they can change. In Clojure data is immutable. In Lisp, all the libraries work for the specific data structures, while in Clojure there is an abstraction of those functions to make this functions work for every data that presents any kind of sequential structure.

This podcast was very interesting to compare this programming languages and its scope and limitations .

sábado, 8 de septiembre de 2018

Revenge of the Nerds


Again, we have another approach on which is the best programming language, now considering the efficiency on resolving certain problems better than in other languages.

Paul Graham describes a character that his development of software is written in whatever programming standard by the time. The pointy-haired boss thinks that all programming languages are equal, and this is a fatal mistake. In this article we can learn that many of the actual languages are integrating lisp like functionalities and becoming more powerful.

From the article we can learn that in the past, programming languages did not support recursion. So, Lisp was one of the first programming languages that started using it. Graham says that the syntax of Lisp is friendly because we can write a great amount of code using less lines.
Something that surprise me was the fact that Lisp starts as a theorical exercise by McCarthy but after that one of his students decided to traduce it into machine language and he finally create a compiler. It was created as math not as a technology, and that´s why it is difficult to get obsolete.
In this article we read some other features that we have learned before from Lisp, as its macros. But there was an interesting idea, even if you build the most powerful macro you can not claim that you invented a new programming language, you just have created a new dialect of Lisp.


Graham mentioned three problems of using a less common programming language:

1.- The programs written in that language may not work well with programs written in other languages
2.- Probably there are less libraries
3.- Maybe it is difficult to find programmers that use that language

I learned a lot from this article, with every article I believe that we learn more from this programming language called Lisp.

sábado, 1 de septiembre de 2018

Dick Gabriel Podcast


This podcast is about an interview to Dick Gabriel, where he started talking on functional languages and defining them like this to all the languages that take arguments and return values, and they can be used in other functions. I didn´t know that they are called like that because of this.


Before this interview, I didn´t know that Lisp was too old, it has been used since 1958. Other important point on this interview was the fact that Lisp can be used to build AI software with its meta-programming and it´s meta-circularity.


Something that get out of my mind was the fact that Lisp´s interpreter was implemented in just one single night, using fifteen lines of code (Eval). Also, I learned that a metacircular interpreter is an interpreter or compiler written in same language of the program that is going to be interpreted, so it interprets itself. Also, I learned that Eval is a Universal Machine that runs lists.


I like how Dick talks about macros, because is too understandable and he teach us that is a Lisp code that produces the expression we want, and they are a string type of operation. This makes it the best and powerful attribute of Lisp language.


Before this class I didn’t know about Lisp at all, and know I know that Lisp has different dialects, in other way they are variations of Lisp language. This Variations are Scheme, Common Lisp, MacLisp, InterLisp, etc. In this interview the most used is Scheme because we understand that was the most used and popular because the side effects of it´s functions weren´t as severe as in Common Lisp.


This was an interesting interview that help me to know more about Lisp and its different dialects and advantages between them, also it helps me to know about Lisp story.


sábado, 25 de agosto de 2018

BEATING THE AVERAGE


I agree with the argument that says that learning a programming language in specific won’t get you a job or will make you win a lot of money, but it will make you smarter and will improve your mind and will make you better writer in languages. So, I can say that learning Lisp will make me a better programmer.

I believe it is great to ignore what other people are doing. It is incredible that a company grows ten percent a year, this means to work hard and stay there. It is important to get new features done before its competitors to avoid them taking the advantage. Lisp let us to do so, it let us to write software quickly, and server-based applications magnify the effect of rapid development.

In business a valuable thing is the technical advantage over your competitor and they won´t understand. Programming languages vary in power. People prefer to program in a high-level language, and have a compiler translate it into machine language for you. Also, people have a language for every specific program they want to write or similar programs that they have made with a specific program. But, after certain age, programmers rarely switch languages voluntarily. People tend to consider just good enough whatever language the used to.

Lisp macros are unique, and they are related to parentheses they are not there just because they want. They are not there just to be different. Parentheses are the outward evidence of a fundamental difference between Lisp and other languages.

In conclusion, do not stick into the normal standards, make different things. They can be the difference between you or your company and the competition, don’t be afraid to use new things, they could make you more efficient and would give you more value than others.