background preloader

Functional languages

Facebook Twitter

Elixir Conf 2014 - Keynote: Think Different by Dave Thomas. The State Monad: A Tutorial for the Confused? - Brandon.Si(mmons) I’ve written this brief tutorial on haskell’s State monad to help bridge some of the elusive gaps that I encountered in other explanations I’ve read, and to try to cut through all the sticky abstraction.

The State Monad: A Tutorial for the Confused? - Brandon.Si(mmons)

This is written for someone who has a good understanding of the Maybe and List monads, but has gotten stuck trying to understand State. I hope it’s helpful! The Data Declaration: Functional parallel programming in Elixir. This article reviews a program that implements a parallelized algorithm, using a functional programming style made possible by a fantastic new language named Elixir.

Functional parallel programming in Elixir

Along the way I very briefly introduce Elixir, review the relevance of functional programming in modern computing, and explain what parallel programming is all about. There’s a lot of ground to cover, so let’s get started! The program This programming exercise is based on finding what I refer to as a wordset. A wordset is a list of words that, when written on separate lines, read the same both horizontally and vertically. You can run the program from a command prompt, such as Terminal in OS X.

The source code, along with instructions on how to run the program, is available on GitHub at Why Elixir? Over the past few months I studied various functional programming languages, as well as the concurrency and parallel programming models their practitioners espouse. After a few days of writing Elixir code, I was impressed. Like this: Programming Languages. Elixir, ReactJS, and the Technologies That Will Rule Until 2020. My name is Ken Mazaika and I’m the CTO & Co-founder of The Firehose Project.

Elixir, ReactJS, and the Technologies That Will Rule Until 2020

I’m a strong believer in the idea that the software development environment is evolving at such a fast pace that it’s far more practical to learn the fundamentals instead of the next group of cutting edge technologies. However, beginners will often ask about the future of web development. And it makes sense. With programming, as with any topic, it’s fun to talk about the next big thing.

It might not be the most productive conversation in the world, but at times, it can’t hurt to look ahead and make bold predictions for the future. It’s never been a more exciting time to be a developer. In 1969, the Apollo Guidance Computer could process 41.6 instructions/second. It would be an understatement to say that technology is evolving rapidly.

In this post, we’ll talk about some of these new cutting edge technologies. Babel & ES6 When developers began to say things to me like: “I really love JavaScript”, I was confused. Elixir. Why I’m betting on Elixir. Background: I’ve spent the past 6 years building web applications in Ruby and the Rails framework.

Why I’m betting on Elixir

I’ve flirted with new programming languages as they came out, but Elixir is the first language that has been able to captivate me. Ruby Crushed It! The ruby language and the Rails framework completely changed the way web applications were built; it started a religion of values that the community cared about. It pioneered the idea that the tools programmers use should be optimized for developer happiness and productivity. It made the bold challenge that it is developers’ jobs to make sure their code was adequately tested and worked. Ruby went from humble beginnings as an obscure language to one of the most popular languages, largely because of the Rails framework and tremendous leadership from people like DHH, Wycats, Aaron Patterson, Jose Valim and a ton of other superstars.

But every so often, artifacts of ruby’s humble beginnings arise Run-away memory! You Could Have Invented Monads! (And Maybe You Already Have.) If you hadn't guessed, this is about monads as they appear in pure functional programming languages like Haskell.

You Could Have Invented Monads! (And Maybe You Already Have.)

They are closely related to the monads of category theory, but are not exactly the same because Haskell doesn't enforce the identities satisfied by categorical monads. Writing introductions to monads seems to have developed into an industry. There's a gentle Introduction, a Haskell Programmer's introduction with the advice "Don't Panic", an introduction for the "Working Haskell Programmer" and countless others that introduce monads as everything from a type of functor to a type of space suit.

But all of these introduce monads as something esoteric in need of explanation. But what I want to argue is that they aren't esoteric at all. Many of the problems that monads try to solve are related to the issue of side effects. Side Effects: Debugging Pure Functions In an imperative programming language such as C++, functions behave nothing like the functions of mathematics. Solution and.