#buildpacks #heroku #node.js #Opa #web development

Running Opa Applications on Heroku

TL;DR As I’ve mentioned before, Opa is a new web framework that introduces not only the framework itself but a whole new language. A lot has changed in Opa since I last posted about it. Now Opa has a Javascript-esque look and runs on Node.js. But it still has the amazing typing system that makes Opa a joy to code in. The currently available Heroku buildpack for Opa only supported the old, pre-Node, support. ...

#Emacs #Erlang #Functional Programming #OTP #rebar

Projmake-mode: Flymake Replacement

There is a great new Emacs plugin from Eric Merritt that like FlyMake builds your code and highlights within Emacs any errors or warnings, but unlike FlyMake builds across the whole project. You can clone the mode from here projmake-mode After cloning the repo to your desired location add this bit to your dot emacs file, replacing <PATH> with the path to where you cloned the repo. [gist]3794732[/gist] This Emacs code also uses add-hook to set projmake-mode to start for erlang-mode is loaded. ...

#Erlang

Maru Models: JSON to Erlang Record with Custom Types

Working with Erlang for writing RESTful interfaces JSON is the communication “language” of choice. For simplifying the process of JSON to a model the backend could work with efficiently I’ve created maru_models. This app decodes the JSON with jiffy and uses functions generated by a modified version of Ulf’s exprecs to create an Erlang record. The generated functions are created with type information from the record definition and when a property is set for the record through these functions it is first passed to the convert function of maru_model_types to do any necessary processing. ...

#Emacs #Erlang

Getting Flymake and Rebar to Play Nice

TLDR; Copy and paste the following into your elisp erlang-mode configuration to get flymake working with Rebar projects. Intro Its probably no great surprise to anyone that I dislike Rebar a lot. That said there are times when I have no choice but to use it. This is always either because a company I am contracting for uses it, or an open source project I am contributing to uses it. When I am forced to use it there are a few things I don’t want to give up. ...

#Cowboy #Erlang #OTP #rebar #sinan

Sinan Releases and Being Right

Fred, of Learn You Some Erlang for Great Good, today posted on his blog about the problems around how rebar handles releases, Rebar Releases and Being Wrong. The problems he mentions and a few others are why, despite giving it a legitimate shot, I have found rebar unusable for my workflow to be efficient and stable while adhering to OTP standards at the same time. I suggest first reading his post, if you already use rebar, and then continuing on with the rest of this. ...

#batman.js #Cowboy #Erlang #Javascript #RESTful #web development #Webmachine

Cowboy and Batman.js for Erlang Web Development

Why Cowboy and Batman.js There are a lot of Erlang web frameworks out there today. Not all are modeled after the MVC model (see Nitrogen), but I think all of them are addressing the problem the wrong way. I recently gave a presentation, slides here and the code for this example here, describing my perferred method for using Erlang for web development and why I think it is the best way to go. ...