There are two basics algorithms for this both described by Knuth. The more well known Knuth/Fisher-Yates shuffle is O(n) but requires destructive updates. The shuffle listed is O(n log n) but works well for any functional language Read More
Simple generating XML in Erlang Using xmerl
Here’s a quick example of how to build XML documents in Erlang using xmerl. The basic idea is to first transform your data into xmerl’s “simple” format of tagged tuples and then use xmerl:export_simple to generate the XML. Read More
flash socket policy-file-request in Erlang
This Erlang version is pretty much a straight translation of this perl-flavoured socket policy file to give credit where it’s due Read More
Agner: a repository of libraries and applications
Agner is a rebar-friendly Erlang package index inspired by Clojars and Homebrew. Essentially, Agner is an index of Erlang packages with some extra capabilities such as versioning, downloads and so on. Agner is a shorthand for A Giant Nebula of Erlang Repositories. It also pays homage to the Danish statistician Agner Krarup Erlang. Read More
Mustache is a framework templating system
Mustache is an Erlang port of the Ruby framework of the same name, originally written by Chris Wanstrath, one of the founders of GitHub. A powerful feature of this type of framework is the ability to write a ‘template’ that you could use in a Rails application and then reuse in an Erlang application with no changes to that file. The ‘view’, which in MVC terms is more like the ‘controller’ would have to be re-written, but this would greatly simplify the work of porting an application, OR simply running a part of application in a different framework for performance reasons. Read More
URL encode in Erlang
AFAIK there’s no URL encoder in the standard libraries exclude edoc_lib:escape_uri. Think I ‘borrowed’ the following code from YAWS or maybe one of the other Erlang web servers Read More

Comments