lunes, 18 de abril de 2016

Logic Programming

Day 1: Unified Theories of Code
Three days is all we have to get you using logic productively, but because core.logic is embedded in Clojure, the more familiar functional programming is always nearby to help.

On the first day we’ll learn about unification and the basic logic operations. We’ll build a database of facts and see how core.logic can reason about them. Finally we’ll take a peek at conditionals in logic.

Logic programs are like puzzles where only some information is given and the solution to the puzzle is to find the rest of the information. Imagine a Sudoku square where at the start of the puzzle only the rules and a few numbers are known. Or think of a jigsaw puzzle, where only pieces of the picture and shapes are visible.

Programming with logic means providing some starting data and the rules of the puzzle. Core.logic does the actual work of solving the puzzle and provides the resulting solutions.

Day 2: Mixing the Logical and Functional
Day 2 will add some pattern matching and other macro sugar to the previous day’s topics. We’ll see how to unify and work with maps as well.

 common feature of functional programming languages is pattern matching, and while Clojure has a limited form of this feature in its destructuring syntax, there are libraries that provide powerful pattern matching macros. David Nolen, who wrote core.logic, also wrote core.match, one of the best of these pattern matching macros, and it should come as no surprise that core.logic has pattern matching built in.

The languages you are probably familiar with have a single kind of conditional. Tests are run in order and whichever test passes, the code for the corresponding branch is run. It may surprise you to learn that core.logic has multiple types of conditionals. You saw the first of these, conde, yesterday, but now we’ll learn about two more, conda and condu.

Day 3: Writing Stories with Logic
Finally, on the last day we’ll wrap up by learning about finite domains. By then you’ll be ready for some more complex examples too.
Logic programming is implemented behind the scenes with directed search algorithms. You specify constraints and the language searches for solutions that satisfy the criteria.

Referencias: 
- “Seven More Languages in Seven Weeks” by Jack Moffitt.

sábado, 26 de marzo de 2016

Triumph of the Nerds Part III: Great Artists Steal

"Triumph of the Nerds Part III: Great Artists Steal" is a documental created in 1996 which premise is exactly the creation of the GUI and how this change the world of the computation forever. Now, the documental is mainly about the creation of the concept of GUI which originally was first created for Xerox and later was a concept that Apple took (by inspiration of Xerox) in order to implement a GUI in their inventions, being the Apple Macintosh the best invention that used the GUI created by Apple in that time, telling us that Apple had as "killer software" in that time, a software created by Adobe which gave to the company fame of create hardware dedicated for the computer artists, but that unfortunately wasn't enough to ensure the domain of the competition of Apple in the 90's because all of this was affected by the creation of Windows, the most popular GUI in the history of the computation, which was created for being used in the IBM computers, the most popular computers in the 90's, which turned Microsoft in the powerful company that nowadays is and the strongest competitor for Apple till the date.

Now, the GUI was really the difference that change the world of the computers for good and made that the computers were the great success that are nowadays, because nowadays all the computer systems from PCs to tablets use GUI's for everything doing possible that the use of the applications be more friendly and intuitive to use for anyone.

With this documental we can see that it doesn't matter if you are the first one to have a potential idea just like XEROX did, because if you don't take advantage of it, you will lose against other rivals that see your idea or also have the idea and do take advantage of it just like Apple or Microsoft.

If you are interested in watching this vides: here's the link: Triumph of the Nerds Part III: Great Artists Steal.

Language as the “Ultimate Weapon” in Nineteen Eighty-Four

The article "Language as the 'Ultimate Weapon' in Nineteen Eighty-Four" written by Jem Berkes tell us that in this novel a very important weapon that the government use to control the society is the language because this important tool that the people use to express their ideas is the one that allows us as humans think and express freely about all the things and situations that take place in our lives, the ones that can be positive for us and for the other people and also the negatives, the latter being very destructive for the government in the "1984" novel because the government here have to be praised and never judged.

Jem Berkes (2000) says in his article that the language is something that allows us as humans communicate our ideas in different ways, characteristic that is very beneficent for us because this help us to think in a more free and creative way, this being supported by Myers (1986) who said that "expanding our language is expanding the ability to think" and that "different languages impose different conceptions of reality", ideas that are clearly logic because between more words and ways to express we have, more ways of thinking and reason the situations we can use in order to attach the idea in a clearly and existent way that other people can understand easily. 

Like O’Brien say "People can't commit crimes if there's not a world or concept who describe it". We need words in order to imagine and create new things.

Why is the Nineteen Eighty-Four novel by George Orwell relevant to a student taking the Programming Language course?

The novel is the perfect counterexample of our reality speaking of programming languages. Imagine you want to solve a problem which use an object oriented approach and there's only ONE programming language to use, not a very rich one, and it is also a functional language. Then you are in problems, that's why the variety in languages is important so you can express anything you want in the best way possible.

If you're interested in reading this article: here's the link: Language as the “Ultimate Weapon” in Nineteen Eighty-Four.

If you're interested in reading George Orwell's: 1984's novel, here's the link: Nineteen Eighty-Four.

martes, 15 de marzo de 2016

Rich Hickey on Clojure

Rich Hickey is the creator of the Clojure programming language and in the podcast "Rich Hickey on Clojure" produced by Software Engineering Radio in the year 2010, he precisely talks about what is the main differences between his programming language and the rest of the languages that are based on Lisp, telling to the audience the benefits that Clojure has and also how Clojure can be a good tool in the world of programming thanks to its particular characteristics. 

Clojure is a dynamic program language for the VJM that between his attributes has inmutability and pure functions with a functional focus and concurrency which makes of Clojure a good option for the parallel programming, also this programming language has data literals as lists, maps and vectors contrasting with the single use of the nested lists in Lisp, which is a great characteristic that in the world of the Lisp makes Clojure a alternative with many options to choose. 

Also, Clojure as a Lisp language programming have the characteristic of  "programming in metaprogramming" which makes Clojure a different language type to use in situations like for example as scientists or researcher which makes Clojure a good element for the singular use and not for mainstream activities. In the case of Clojure, the target public can be the ordinary programmers that works with Java or C++ because in the core Clojure is more simpler and powerful that Java. This can be false because in my opinion Java is more easy to use because it have more tools which as a programmer can use in a more easy way because Java is more easy to learn if you are used to program declarative languages but maybe everything is a situation of get better with practice and Clojure can be a good example of this if as a programmers we can learn to use this language.

Another characteristic of Clojure is that it permits the use of libraries that can do the work more easy with the different data structures that Clojure allow to use which is a great because with these libraries the use of lists and collections is more easy to implement and also a very important characteristic of Clojure is that with in this tool the values don't change because the data structures are immutable and this makes that the data structure has a great performance warranty because this characteristic makes possible that the values don't have to be locked and with this the language can be used in situations where the concurrence and parallelism programation is important. 

All the previous information is a small sample of the power that Clojure can offer to the programmers that search a new way of programming and more if this new way includes concurrent programming that make use of the data structures as lists which handling is more easy to do with a Lisp programming language. 

domingo, 28 de febrero de 2016

The Promises of Functional Programming

Doing for the first time a program is an activity that in many cases can be very difficult for some people, all of this depending on which is the problem that the program is trying to solve and which is the language that the programmer is using to create the solution because the truth is that the language in this case can be the difference between have a good experience in the programming or to have a nightmare trying to solve a problem that is not really difficult in itself but that the language doesn't allowed you to solve it in an easy way. Now the language despite of being different to the other languages, specially the most popular languages like Java or Python, share an important characteristic between them that is that they belong to the family of "imperative programming " instead of the family of the "functional programming". 

The "functional programming" as Hinsen says in his article is a form of programming that allows to write a program using functions, like the mathematical expression, which change the way in which most of the programmers know how to do a program, all of this because the "functional programming" have characteristics like the absence of variables or loops and the extremely use of the recursion which makes the activity of programming with a functional language a task that involves a high learning curve and a different way of thinking, different of how the "imperative world" works. 

Now, like we programmers can say that if "functional programming" is not very popular in the industry it is not necessary to learn how to manage the tools of this form of programming which maybe can be a huge mistake because in the present the technology has advanced so fast that the same has created forms in which a program can be executed talking about the parallelism and concurrence programming which is an application area that the "functional programming" serves very well and for the same is important that as a programmers give to this way of thinking and programming a chance because in the technology world anything have an static position.

In functional programming it is common to write functions that take functions an parameters and yet return another function, they are called high-order functions.

The article then talks us about concurrency and parallelism. The big issue with concurrency is the difficulty of maintaining the data in a coherent state. And for parallelism the difficulties are to identify independent computations inside a program and coordinating them with the required communication operations so that the resulting program always produces the correct result and does this efficiently for typical input parameters.

If you're interested in reading this article, here is the link: The Promises of Functional Programming.

domingo, 21 de febrero de 2016

Triumph of the Nerds Part II

The second part of the documentary "The triumph of the nerds" talks about the fight that all the computer companies had to remain at the top of the food chain, an example of this is IBM, that at the time were mostly focused on the creation of mainframes, but at the time the boom was the personal computer so if they took more time they were going to lose a lot of ground that they could not get back.

After seeing "Triumph of the Nerds Part II" and knowing the history between IBM and Microsoft, its very amazing see that thanks to the disruption between IBM and Microsoft caused for the discussion related with the OS of IBM computers (where IBM doesn't want to use "Windows" like instead of its own OS called "OS/2") IBM went of the glory to the hell which proof that the PC world is not an easy context for the business thanks to the velocity in which this context changes with technological advances that are presented faster and faster.

Its not a surprise that Microsoft is a giant in the IT industry in our days where this company covers since software development to hardware development all of this thanks to the "good" decisions that the company has made over the time and its important to mention that all this decisions were unleashed since the company discovered that the software is the essential tool for a PC because the software and specially a good OS can be the difference between a computer that is easy to use for the average person and a computer that is hard to use which is synonym of a failure in all the aspects.

This was a very interesting episode to watch because of all the information and history background that we learned from it, all the decisions that have lead the market to what it is today and all the repercussions of the proposals that were rejected and the individuals that after learning what could have been are most likely crying themselves to sleep every night. Further confirming the idea that in the computer and software industry (or world if you may), you don't only need the idea, but you also need to have the necessary means and the drive to implement them, because otherwise you will have to watch as the competition steals all the glory (and the moneys), as you get to be forgotten as a mere whisper in the wind without any other thing that a mention on a documentary in years to come (only to be forgotten later).

If you are interested in watching this video, here is the link: Triumph of the Nerds Part II

martes, 9 de febrero de 2016

Revenge of the Nerds

Nowadays, when we talk about the different programming languages that exist in the market for different purposes is inevitable thinking in more than a couple of options that we like programmers can use to solve the same problem with the tools that the language in that moment is offering us. Now, like Paul Graham says in his article called "Revenge of the Nerds", is truth that some languages are better for certain problems than others, all of this because some of these languages can bring to us like programmers a set of many tools or exclusive characteristics that can handle the solution for the same problem in a better way, which can be a solution that is more direct, optimal and efficient than the others solutions that can be reached with the other languages. 

Supporting in a certain way the point of view that Graham express in his article, is amazing that in the industry world where the majority of the actual students of IT engineering careers want to work exist people called the "pointy-haired boss" that decide what is the best technology and language that a team can use to build a project when this person doesn't know how the world of technology is really changing outside and how all the tools that are available in the market work, because the decisions that this "boss" is taking is inspired in what is mainstream in the moment, not the best option in all the cases. 

The previous can make us think that Lisp, in this case, can be the optimal tool to reach the solutions for many problems that exist outside in a better way, being this an alternative that may be very difficult to see because this language (despite of having characteristics that are implemented in many popular languages like Java, Python or Pearl) doesn't enjoy the same level of popularity that other languages have, which makes it unable to be a realistic option for the "pointy-haired boss" because this language doesn't have the same support in the industry that the other options thanks to its "low level of popularity" and as a personal opinion, our obligation as new IT professionals should be break down this obstacles taking risks in the moment when we have to choose a tool to develop something as Graham says "using the most powerful language that exist for our problem and wait for our competitors' pointy-haired bosses to revert to the mean" doing with this action a positive change in the industry generating more ways in which the IT specialists can find and develop new tools and solutions that can be the future breakpoint in the industry.

What I learned here is that despite what the bosses say, when we are startups, always design the products to please the users, not them, because in the end, the users are the ones who are gonna buy them. Also always try to use more powerful languages to get shorter programs, and with that you will reduce the time it takes to write it. This also helps us when resolving too complicated programs.


If you're interested in reading this article, here is the link: Revenge of the Nerds.

domingo, 31 de enero de 2016

Dick Gabriel on Lisp

This week we review a podcast about he experience that Dick Gabriel has on LISP. Languages like Lisp which were developed for AI had in-built reflective mechanisms, although not formally described, like the quote mechanism via which code could be visualized as data.
Brian Catwell Smith’s work in the 80’s gave it a formal definition and the architectural shape to carry this very powerful construct forward.

The reality is that LISP is a language that have a really interesting list of characteristics as its metacircular interpreter (the possibility of a language to evaluate itself with the same language), the lists that are the principal tools to evaluate in LISP, the apparently infinitely recursive way of functioning and the possibility of using macros to extend the language, among others, that makes of LISP unique in many environments where other  common languages like Java or C are not the option.

Lisp, is a functional language, it takes arguments and returns a value, we can nest functions, and the primary data structure is the list, and is the one that encodes the programs. Many things that Dick said about Lisp were totally new and different to me, he took us to the very past times where the Universal turing machine was created, when people needed some kind of machine that could compute anything, then it appeared something that could interpret lists, so one day Steve Russell, thought that if he could take that piece of code and hand compiled it, then that could be the interpreter of lisp. That universal machine was called eval, and with that machine, you could construct any list you wanted and send it to eval so it could evaluate it. Thats how the Lisp interpreter was born.

Now, some positive things are that like  Dick Gabriel said, LISP has served of inspiration for another languages like Ruby in the part of meta-language and has contributed to another languages like Java to implement characteristics like the garbage collector  that are very useful in the actuality, which can be used to say that LISP has left its mark in the industry.

So in my opinion, many people doesn't know about Lisp and it is a language that has been around for so many years that more people should get the time to know the language and start implementing their programs in this language because it has advantages in many ways and it is easy to use compared to other programming languages in many ways, of course it has disadvantages.

If you are interested in listening to this podcast here is the link: Dick Gabriel on Lisp

martes, 26 de enero de 2016

Beating the Averages

"Beating the Averages" is an article written by Paul Graham, co-funder of Viaweb, which principal purpose is to spread the story of how Lisp was a fundamental factor in the creation of the company because Lisp has many features that other languages didn't have and not everyone knew how to work with it.

Something very curious is that Graham justified his success with LIPS in that "the strengths that made this language a powerful tool for Viaweb was that Lisp is poorly implemented in the industry" and therefore the same is not very popular in the context which causes that its management and its implementation was very unknown for many of the programmers that was dedicated to the development doing that other companies could not copy their strategies and knowledge in their business. Lisp is a difficult language to learn and master and most programmers prefer Oracle, C, C++, Java... Eric Raymond says that "Lisp will make you a better programmer, even if you never actually use Lisp itself a lot" which is something that make us think that precisely this language is difficult to learn but it has its rewards. As it is a hard language to learn is can teach you another way to develop. Why learn latin if nobody uses it anymore?, well it is the foundation of many other languages and so by learning latin we can jump to other languages easily, the same happens with LISP.

A really nice thing he also does is that instead of crushing other programming languages, he decided to create the "Blub Paradox" which is a fictional programming languages that he uses to explain how programmers think, I mean the programmers only think in the way their programming language allowed them to. Jump to another language is always a true challenge.

As learning of this reading, I think that after watching this case of triumph lead by the use of Lisp is important to give an opportunity to the new tools that are in the market no matter they are not very popular (of course, this applies in specific cases). Like programmers is important that we have a general knowledge about the use of the different options that we have available because we can generate more and different ways of solving a problem because as it is referred in the article: you think in the language you know how to use.

If you're interested in reading this article, here is the link: Beating the Averages.

martes, 19 de enero de 2016

The Semicolon Wars

This week lecture was about getting a standard between programming languages. Brian Hayes, the author the article, exposed some of the most notable conflicts programmers had overcome in finding the ideal programming language. To solve this problem programmers release a new programming language that tries to cover all the flaws the previous languages had.
But this just arise another problem, nowadays 8,500 programming languages has been created, according to Hayes that is one per week since FORTRAN was released in the 1960's. This means that we've failed in creating a programming language that covers all, most programmer say that we should pick one and work all together to improve it. The question here is which one to choose? some may say LISP, like Hayes, but others support Java, Python, Ruby, Swift.. etc.

Like Brian Hayes mentions in his article, it's real that "every programmer knows there is one true programming language, a new one every week" which makes, be a programmer, a hard option for those people that aren't flexible, static in some ways and the more important characteristic autodidact because be a programmer means be an 'upgradeable professional'.

Every programming language has its strengths and weaknesses, each of them has its own syntax, that one must study deeply in order to become familiar to the languages. The truth is that getting an unified languages is a very difficult task, for not saying impossible, because every programmer has a favorite one.

Knowing how to program in languages that belong to different families is something that for sure I want to know because this creates a situation in which knowing how to program using different perspectives and different tools can create unique opportunities where the creativity can be amazingly exploited creating solutions that can be as awesome as the situation demands, without limits, situation that make me think that the future can be specially improved thanks to us, thanks to IT professionals.
We are far from get a unified programming language so as programmer lets choose that one we are more familiar with or more comfortable. Everyone gets their chance to choose.

If you're interested in reading this article, here is the link: The Semicolon Wars.

domingo, 17 de enero de 2016

Triumph of the Nerds Part I

This is a very interesting documentary about how the computer era became to be.
It describes us how the first computers were just after World War II, big machines of the size of a room, and how they focused on resolving mathematical issues.

Later on computers became easier to manage, and so a group of people referred in the documentary as "nerds" focused their attention in this 'electrical-technological' trend.

I found this part awesome, I mean, they were just a group of people who thought that something good can come from this new technology. They created discussion groups in which they proposed new uses for the machines.

The video centers in the idea that most of this developments were born with the intention of impressing their friends. Who would find a new use first? Who could add a feature that makes the machine usable? and so many questions that triggered the people to create.

People gathered in their garages to built new machines with more processing capacity or easier to transport and eventually Microsoft and Apple were created. The rest is history.

Most of the new ideas are born like this, a group of friends in a garage building something maybe for a college project or just for fun. The thing is that they all have the vision to see something that wasn't there and somehow change the world. So maybe we should make our goal to approach to this way of thinking, in order to make a contribution to society and why not to make our mark in history.

One thing is certain and this is that the invention of the PC revolutionized the world for good, situation that changed in an enormous way with the invention of the Internet, bringing important ways of living, like interact with the people and the world in real time, ways of living that became essential for many of us. 

Source: 
Documentary video titled “Triumph of the Nerds Part I: Impressing their Friends” produced by PBS, and written and hosted by Robert X. Cringely in the year 1996.

martes, 12 de enero de 2016

Introducing myself

For all of you reading this, my name is Carlos Sebastian Loredo Gomez, Sebastian for short.
My expectations for this course are: to know the strengths and the weaknesses of different programming languages and how to develop in these languages.

About my hobbies and personal interests: I love to watch sci-fi series in TV and to read books (Stephen King particularly). If there's more I don't recall it at the moment.

A book I have recently enjoyed: Drowning Towers by George Turner, which describe how the future society lives after overpopulation.
TV programs: Well I think I have a lot to put in this part since all my holidays were about watching TV series. I'll just list them in order of how I liked them. Stargate SG-1, Sanctuary, Stargate Atlantis, Black Mirror, Eureka... just to mention some.