jueves, 31 de marzo de 2016
Language as the ultimate weapon
Today I will talk about the article "Language as the ultimate weapon in Nineteen Eighty-Four" by Jem Berkes.
The article mainly talks about how a specific language can manipulate people thoughts as George Orwell wrote about in his novel "1984", where Newspeak supressed ideas of fear or freedom that could be said in English (or "Oldspeak).
As the author suggests, language is a very important tool in expressing feelings, language can either empower or supress certain thoughts, there is even a theory that people can have different personalities depending on the language they are speaking.
Link to the article: http://www.dailymail.co.uk/sciencetech/article-3004943/Being-bilingual-really-two-minds-Researchers-say-people-different-personalities-language.html
The first time I heard about it was in middle school, I had a great Spanish teacher, he was still very young (about 20 years old) and was studying philosophy. He was teaching us how you could analyze people's real intentions by paying attention to the specifics words they said, his example was something like "English speakers usually focus mostly on the adjetives used to describe an object than the object itself, while Spanish speakers usually focus more on the object than the adjetives used to describe it, thats because of the language, in English you place the adjetives before describing the object, while in Spanish you first tell the object and then use adjetives to enhance its description, thats why in English you say "A red car" and in Spanish you say "Un carro rojo".
Even though it may be a very simplistic example, it really reflects how powerful a language can be. (How could you know if you're angry or in love if the language in which you are thinking doesn't have the words to describe either feeling?).
Another great example is programming languages, most like the entry where I talked about "The six men and the elephant". When facing a programming problem, a Java programmer will see a bunch of objects because the language in which he thinks represents it as objects, where a Lisp programmer will see data represented as lists being processed. The greatest power of Lips comes because Lisp doesn't recognize a difference between a program and data (programs are data, data are programs) where a C or Java programmer would blow their head up trying to understand what that idea means, in Lisp programs can easily write programs that wrote programs that write programs, because in the end programs produce data and data is programs so programs can produce programs (start sounding much like Inception).
As a main Lua programmer, I can tell that even though Lua tries to assemble Lisp's list processing power, Lua programmers mostly see things as glue or drugs, because you have to eat many glue as a child or be on drugs to consider using Lua. Bad jokes aside (even though Lua jokes never get old). I think the best thing about using Lua is that variables have to type and don't have to be defined.
I used Lua to program search algorithims for a simple AI game a few weeks ago, and that flexibility of the language helped me get everything done under 150 lines (the whole game). Since you have a lot of flexibility on variables, my board functions neither knew, either cared if the parameter they recieved was a real game, a simulated game or plain text, so I abused those functions in each way I could and used a lot less code than I may have used if I was programming in Java (lots of validations).
And the project had to be done in very short time, so I think Lua was a great choice, its list procesing features (that try to emulate Lisp and even the Lua manifest even brags about it) were great to process all the data.
I think there isn't a blog entry where I mention it, but the more I study different programming languages the more I get sure about it, everything in software development can be reduced in terms of a list (maybe a linked list or it could even be a dictionary) of trade-offs, so the more you know about any programming language, the more you understand the benefits and weaknesses of each trade-off and when the time comes where you have to make a choice, you are most sure you made the right call.
That is all for now, as an advice, try to read a lot about any new shiny programming language that comes out, not because every one of them becomes the great new C or Java or Pascal, but because they all try to make the best out a new way of thinking, and if you can understand the weakness of that way of thinking, you get to a point where you see the language as a tool to expressing ideas, and not the idea itself, and you get the most out the tool (the language) and the real idea behind it.
Wololo
The triumph of the nerds, part III
Today I will talk about the last part of "The Triumph of the Nerds".
I experienced a strong feeling of melancholy even though I hadn't even been born on that time, so the song of this blog's entry will be "On Melancholy Hill" by Gorillaz, enjoy.
First of all, the documentary is great, I found the last part to be perfect, seeing it right now, many years after it was produced gave me a feeling of melancholy, like I was remembering something I wish I could have lived. It is just great to hear the stories of the minds behind the P.C revolution, Steve Jobs' vision and search for becoming a legend, his devotion to the P.C was something out of this world, and Bill Gates' business ideas were much like seeing a chess game between two masterminds of computing history.
One of my favorite parts of the video was the part where the "Jobs vs Gates" relationship is explained, the great thing is that at the time of the video they were perceived as enemies, and now, many years after that we know both of them settled as they always ought to be, two masterminds of computing, both aiming for different things, both complementing each other.
And I may have a naive idea about it, but I think that their different ideas about computing were in a great sense to the computer revolution, Steve Jobs trying to push the limits of personal computers, searching for a faster, better, more beautiful computer (although always pricier), and Bill Gates, making computers accesible for everyone, I saw a video dated many years ago where Bill Gates was asked what were his thoughts about software piracy in India and his response reflected much what made Microsoft what it is now, he answered something like "Software empowers people, the great thing about it is that when India settles as an important software producer and people start buying software, we know it will be Windows' software".
So in a way Steve Jobs vision pushed the limits of computers, and Bill Gates business vision made computers accesible for everyone.
The documentary is dated before Steve Jobs returned to Apple, and before Windows invested on Apple, so it feels mostly like a time machine, and seeing it now just makes you want to go back in time just to say "In the end, everything went along well".
I like a lot the end, where Lawrence Ellison, founder of Oracle talks about the future (which now feels much like past) of the Internet.
I would like to add that there is a great article from "The Telegraph" that talks about Bill Gates' words about Steve Jobs' death, their relationship and a letter Bill Gates wrote to Steve Jobs and he kept by his bed, here is the link of the article if you would like to read more about it.
http://www.telegraph.co.uk/technology/bill-gates/9041726/Bill-Gates-I-wrote-Steve-Jobs-a-letter-as-he-was-dying.-He-kept-it-by-his-bed.html
Wololo.
I experienced a strong feeling of melancholy even though I hadn't even been born on that time, so the song of this blog's entry will be "On Melancholy Hill" by Gorillaz, enjoy.
First of all, the documentary is great, I found the last part to be perfect, seeing it right now, many years after it was produced gave me a feeling of melancholy, like I was remembering something I wish I could have lived. It is just great to hear the stories of the minds behind the P.C revolution, Steve Jobs' vision and search for becoming a legend, his devotion to the P.C was something out of this world, and Bill Gates' business ideas were much like seeing a chess game between two masterminds of computing history.
One of my favorite parts of the video was the part where the "Jobs vs Gates" relationship is explained, the great thing is that at the time of the video they were perceived as enemies, and now, many years after that we know both of them settled as they always ought to be, two masterminds of computing, both aiming for different things, both complementing each other.
And I may have a naive idea about it, but I think that their different ideas about computing were in a great sense to the computer revolution, Steve Jobs trying to push the limits of personal computers, searching for a faster, better, more beautiful computer (although always pricier), and Bill Gates, making computers accesible for everyone, I saw a video dated many years ago where Bill Gates was asked what were his thoughts about software piracy in India and his response reflected much what made Microsoft what it is now, he answered something like "Software empowers people, the great thing about it is that when India settles as an important software producer and people start buying software, we know it will be Windows' software".
So in a way Steve Jobs vision pushed the limits of computers, and Bill Gates business vision made computers accesible for everyone.
The documentary is dated before Steve Jobs returned to Apple, and before Windows invested on Apple, so it feels mostly like a time machine, and seeing it now just makes you want to go back in time just to say "In the end, everything went along well".
I like a lot the end, where Lawrence Ellison, founder of Oracle talks about the future (which now feels much like past) of the Internet.
I would like to add that there is a great article from "The Telegraph" that talks about Bill Gates' words about Steve Jobs' death, their relationship and a letter Bill Gates wrote to Steve Jobs and he kept by his bed, here is the link of the article if you would like to read more about it.
http://www.telegraph.co.uk/technology/bill-gates/9041726/Bill-Gates-I-wrote-Steve-Jobs-a-letter-as-he-was-dying.-He-kept-it-by-his-bed.html
Wololo.
jueves, 17 de marzo de 2016
Rich Hickey on Clojure
So, today I will talk about a podcast with Rich Hickey about Clojure.
Today's song will be one of my favorites, the song is "Giorgio" by Daft Punk, lots of soft funky bass slaps that get along well with the time I'm writing this entry.
Clojure is a Lisp dialect created on 2009 by Rich Hickey with a very bold promise, bring Lisp back more powerful than ever, and bring it to industry applications.
First of all, Rich Hickey defined Clojure as a language binded to the Java virtual machine, in a way that Clojure could run along with Java, the pointy haired bosses' favorite language, in a way that programmers could easily run Clojure code in a Java project, Rich even jokes about it. "Tell your boss that you're just using a new Java library".
Second, Clojure is focused on concurrency, with many programming languages having problems dealing with concurrency, and concurrency being a critical aspect of new generation programming languages due to the heavy use of multiple cores on computers and other electronic devices. Clojure attempts to solve that problem by using immutable data structures that can be processed by multiple cores without the use of locks or other complex mechanisms, by using atoms, agents or refs Clojure brings simple, yet powerful synchronization tools.
Third, Clojure extends Lisp by not only having lists as a primitive data structure but lists, maps, vectors, and sets, all of them work transparently with Clojure sequence API, which handles a lot of sequence processing.
In that way, Rich attempts to bring a more powerful tool, which works easily alongside other mainstream conservative languages, so you have the power of Lisp, macros and other obscure Lisp's uniqueness on a mainstream Java enviroment. Lisp has been reborn more powerful than ever.
And while I haven't had that "Eureka" feeling while working with Clojure, and I still find it somehow hard to adjust to the syntax (or should I say "lack of syntax"?) of any Lisp dialect. I find it very tempting to use with Java code. You could for example, code a videogame in Java and use native Java for UI and all the graphic related aspects and use Clojure for data processing like handling the enemies AI, that way, you could reduce a lot of coding time and deploy a powerful, platform independent game that could run virtually on any device (the one and only appealing feature about Java).
In that way I find Clojure to be a really promising programming language for the near future, I'm almost certain that in a few years Clojure will have its big boom. And so, the Lisp era will finally begin.
Thats all for now my fellow reader(s)
Wololo.
Today's song will be one of my favorites, the song is "Giorgio" by Daft Punk, lots of soft funky bass slaps that get along well with the time I'm writing this entry.
Clojure is a Lisp dialect created on 2009 by Rich Hickey with a very bold promise, bring Lisp back more powerful than ever, and bring it to industry applications.
First of all, Rich Hickey defined Clojure as a language binded to the Java virtual machine, in a way that Clojure could run along with Java, the pointy haired bosses' favorite language, in a way that programmers could easily run Clojure code in a Java project, Rich even jokes about it. "Tell your boss that you're just using a new Java library".
Second, Clojure is focused on concurrency, with many programming languages having problems dealing with concurrency, and concurrency being a critical aspect of new generation programming languages due to the heavy use of multiple cores on computers and other electronic devices. Clojure attempts to solve that problem by using immutable data structures that can be processed by multiple cores without the use of locks or other complex mechanisms, by using atoms, agents or refs Clojure brings simple, yet powerful synchronization tools.
Third, Clojure extends Lisp by not only having lists as a primitive data structure but lists, maps, vectors, and sets, all of them work transparently with Clojure sequence API, which handles a lot of sequence processing.
In that way, Rich attempts to bring a more powerful tool, which works easily alongside other mainstream conservative languages, so you have the power of Lisp, macros and other obscure Lisp's uniqueness on a mainstream Java enviroment. Lisp has been reborn more powerful than ever.
And while I haven't had that "Eureka" feeling while working with Clojure, and I still find it somehow hard to adjust to the syntax (or should I say "lack of syntax"?) of any Lisp dialect. I find it very tempting to use with Java code. You could for example, code a videogame in Java and use native Java for UI and all the graphic related aspects and use Clojure for data processing like handling the enemies AI, that way, you could reduce a lot of coding time and deploy a powerful, platform independent game that could run virtually on any device (the one and only appealing feature about Java).
In that way I find Clojure to be a really promising programming language for the near future, I'm almost certain that in a few years Clojure will have its big boom. And so, the Lisp era will finally begin.
Thats all for now my fellow reader(s)
Wololo.
jueves, 3 de marzo de 2016
The promises of functional programming
Today I will talk about the article "The promises of functional programming" by Konrad Hinsen.
This blog's song will be "7 years" by "Lukas Graham", great song.
Enjoy.
The article talks about the differences between functional programming (as seen in Lisp, Mathemathica and other weird programming languages) and Imperative programming (as seen in C).
Lisp became a promise of better programming languages many years ago, however, that promise isn't still completely fulfilled, to anyone that has programmed in Lisp or any of its many dialects, it is very simple to see that Lisp has a completely different approach towards programming problems, and in many ways, a more powerful one.
I think I have said this many times, but there is always a tradeoff in programming languages, and Lips isn't the exception, it's killer feature is the same that makes it so hard, it is difficult to understand, no matter how many times Lisp gurus tell anything else, learning Lisp requires a lot of effort and thinking different, the main difference between Lisp and C is that in Lisp everything is made out of functions, pure functions (in C functions work more like methods or procedures). So you have to think different to define a function, rather than a procedure. Hence why Lisp was considered a slow language many years ago, machines work internally using procedures, not functions, so the first thing that slowed Lisp's progress was how hard it was to translate Lisp code to machine language, sometimes, things get lost in translation.
However, as time passed by, hardware become more complex, right now parallelism is becoming the next big thing, and the main problem we have right now is that even if our machines have four or eight cores, most programs just use one or two, even games, which have always tried to push the hardware to its limits by using every obscure programming language they could be programmed (a couple of decades ago, a lot of games were still programmed in some sort of assembly language, to be more efficient, another great story is the engine behind Doom and Heretic games, programmed by the great Jogn Carmack, the engine wasn't purely 3D, instead, it displayed 2D textures and modified them using mathematical functions because computers those days weren't so great displaying 3D graphics, which made the game extremely fast and the objects would sometimes "bend"). I got a bit lost, returning to the point, even games nowadays use only 2 or at most 4 cores.
We still have many cores so we can run multiple processes at a time, but a single process almost never fully uses the computer, the main reason behind this is that programming parallel applications is a very hard thing to do, there are a lot of race conditions, data is often corrupted by other threads/cores.
Functional programming is a great promise to solve this problem because programs are interpreted as pure functions, not procedures, they don't use variables in a traditional way, hence being mostly thread safe, and I say mostly because there is still a lot of work to do regarding translating to thread safe, machine code. But any functional programmer can tell you that they have a lot less problems programming parallel applications than the guys who code in C.
In a couple of years, we will still use a lot of imperative programming, but it is certain that there will be a lot more functional programming as a common practice in programming.
Wololo.
This blog's song will be "7 years" by "Lukas Graham", great song.
The article talks about the differences between functional programming (as seen in Lisp, Mathemathica and other weird programming languages) and Imperative programming (as seen in C).
Lisp became a promise of better programming languages many years ago, however, that promise isn't still completely fulfilled, to anyone that has programmed in Lisp or any of its many dialects, it is very simple to see that Lisp has a completely different approach towards programming problems, and in many ways, a more powerful one.
I think I have said this many times, but there is always a tradeoff in programming languages, and Lips isn't the exception, it's killer feature is the same that makes it so hard, it is difficult to understand, no matter how many times Lisp gurus tell anything else, learning Lisp requires a lot of effort and thinking different, the main difference between Lisp and C is that in Lisp everything is made out of functions, pure functions (in C functions work more like methods or procedures). So you have to think different to define a function, rather than a procedure. Hence why Lisp was considered a slow language many years ago, machines work internally using procedures, not functions, so the first thing that slowed Lisp's progress was how hard it was to translate Lisp code to machine language, sometimes, things get lost in translation.
However, as time passed by, hardware become more complex, right now parallelism is becoming the next big thing, and the main problem we have right now is that even if our machines have four or eight cores, most programs just use one or two, even games, which have always tried to push the hardware to its limits by using every obscure programming language they could be programmed (a couple of decades ago, a lot of games were still programmed in some sort of assembly language, to be more efficient, another great story is the engine behind Doom and Heretic games, programmed by the great Jogn Carmack, the engine wasn't purely 3D, instead, it displayed 2D textures and modified them using mathematical functions because computers those days weren't so great displaying 3D graphics, which made the game extremely fast and the objects would sometimes "bend"). I got a bit lost, returning to the point, even games nowadays use only 2 or at most 4 cores.
We still have many cores so we can run multiple processes at a time, but a single process almost never fully uses the computer, the main reason behind this is that programming parallel applications is a very hard thing to do, there are a lot of race conditions, data is often corrupted by other threads/cores.
Functional programming is a great promise to solve this problem because programs are interpreted as pure functions, not procedures, they don't use variables in a traditional way, hence being mostly thread safe, and I say mostly because there is still a lot of work to do regarding translating to thread safe, machine code. But any functional programmer can tell you that they have a lot less problems programming parallel applications than the guys who code in C.
In a couple of years, we will still use a lot of imperative programming, but it is certain that there will be a lot more functional programming as a common practice in programming.
Wololo.
Suscribirse a:
Entradas (Atom)