Category Archives: Code
Addendum to function currying
In my last post I’ve tried to explain the differences between partial function application and function currying. The post was more generally addressed to JavaScript developers (as an accompanying material to a presentation I’m working on) so I’ve tried to … Continue reading
Filed under Code, Discussion
Differentiating between function currying and partial function application
With the recent rise of functional programming (in recent years) a lot of concepts have made their way into mainstream programming languages. Higher order functions, closures, partial function applications, currying; just to name a few. But from all these concepts, … Continue reading
A simple symfony 1.4 URL validator
A 0.5 improvement, is still an improvement. As much as we’d like people to strictly fill in data into forms, they get annoyed and complain when the http:// prefix is mandatory. As such I had to create my own validator … Continue reading
Filed under Code
Sleepsort
It simply amazed me the cleverness that this guy on 4chan had when writing this algorithm. For each number in the list, it spawns a process waiting an amount of time equal with the number received and afterwards prints its. … Continue reading
Filed under Code
CodeJam, a lesson in Haskell IO
As you may know yesterday took place the qualification round for the Google Code Jam contest. While it’s start time was around 2AM in my timezone I felt pretty excited to participate, given that my objective was to use Haskell … Continue reading
Flavius Josephus in Haskell
My first Haskell solution for a programming praxis challenge, and this time I almost nailed it. Almost, because even with a clear specification of the expected result I still managed to lose focus for a moment, and went for a … Continue reading
The Ackermann function in Haskell
While the Ackermann function is a trivial one to write, it made me realize something today.
Filed under Code
Bingo game in Io language
This is the third chronological challenge from ProgrammingPraxis, and this challenge took the most time to complete given I it was the first program I wrote in the Io language
Prototype based object oriented programming in PHP
The other day I’ve found this interestingly controversial submission on reddit and I must admit that after taking a quick look at the code, I ran of for some eye bleach to erase that image from my mind. While I … Continue reading
Sieve of Eratosthenes in PHP
As mentioned in my last article, I started doing some challenges from the Programming Praxis website. And here comes my PHP solution to the second challenge.