Tag Archives: erlang

Distributed Coding Prefunc: Some Basic Erlang & Erlang Shell Basics

Erlang LogoThe first few parts of this series include:

This continues the series, with the intent of getting to “Distributed Coding” with this all ramping up around Erlang and distributed programing in general. In this entry we’ll jump into some of the basics of Erlang and the shell that we can use to test and write some code.

Erlang Basics : The Shell & Some Integers

Before getting to deep into things, here’s some basic shell usage commands and integers to get a feel for the Erlang shell. To start the shell just type erl, which will present the following in the terminal.

$ erl
Erlang R15B01 (erts-5.9.1)  [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9.1  (abort with ^G)
1>

To exit the shell just type “q().” and hit enter like this.

$ erl
Erlang R15B01 (erts-5.9.1)  [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9.1  (abort with ^G)
1> q().
ok
2> $

It’ll execute a second line that will dump you back out to the terminal. One thing to note, is that when you execute “q().” it drops to a second line numbered two above. If we start the shell back up again and type in some actual code we’ll see that the numbers increment. The idea is similar to each line of code in a code file.

Start up the shell again and type the following.

$ erl
Erlang R15B01 (erts-5.9.1)  [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9.1  (abort with ^G)
1> q().
ok
2> Adrons-MacBook-Air-2:erlangMagic adronhall$ clear
Adrons-MacBook-Air-2:erlangMagic adronhall$ erl
Erlang R15B01 (erts-5.9.1)  [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9.1  (abort with ^G)
1> -69.
-69
2> 2#1212
2> 2#1212.
* 1: syntax error before: 212
2> 2#1010.
10
3> $A.
65
4> $B.
66
5> $a.
97
6> 2*2+100.
104
7>

What I’ve done here is enter some values, primarily all integers. These integers, on the first line is a negative integer. By entering a “.” at the end, the lines executes and returns the value. In this case, the value is “-69”.

The second line, I entered “2#1212” without entering a period to finish the line of code. Thus, nothing executes.

The third line I entered the same thing as the second, “2#1212” which is not valid, giving us a syntax error. On the next line I tweak my value just a bit, entering a valid hexadecimal number “2#1010” with the appropriate period at the end. The line executes and it displays the decimal integer “10”.

So far at this point, this shows us several things:

  • Every line must end with a period to execute.
  • We’ve seen a negative integer, a positive hexadecimal integer and an invalid integer and the error that throws “* 1: syntax error before: 212”.
  • We’ve seen that when the line in the shell successfully executes we get the next incremental line, such as “-69.” was on the first line, the first successful second line was the “2#1010.” value and as we move through each line above the code line increases.
  • A valid integer includes -69, but also includes a hexadecimal representation of an integer such as “#2#1010”.

Moving beyond these values the “$A”, “$B” and “$a” are all ASCII representations and return their numeral values.

On line six I actually perform a basic calculator type multiplication and addition of integer values, which returns the integer value 104.

Now that we have the shell start and stop figured out, that gives us a platform in which to start stepping through some of the basics of Erlang.

Erlang Floats

Above we’ve seen how regular integers are represented such as 2, 100 or -69 along with hexadecimal and ASCII numeric representations. For floats, we’re looking at similar uses. Spool up the shell again and try out these examples.

1> 21.21.
21.21
2> -1234.1234.
-1234.1234
3> 3042.1.
3042.1
4> 650.21
4> 650.21.
* 2: syntax error before: 650.21
4> 650.21
4> 650.21.
* 2: syntax error before: 650.21
4> 650.21.
650.21

Lines 1-3 show some standard floats. On the first part of line four I left off the period to show that it won’t accept the line, even with a period in it, because of the numbers after that period. In that second line number four I’ve added the period, but it throws a syntax error.

Then note I did the exact same thing again, to show that entering a float and then adding the period, will still leave the float broken because of the way the Erlang compiler is waiting to execute the code. It’s almost like the compiler sees “650.21650.21” which of course doesn’t mean anything. However on the fifth line of the number four lines, I finally get a good execution and it displays the float I’ve entered “650.21”. Be sure when you’re fixing values like this, the compiler could be stuck in mid execution, because without the period at the very end, being the last character on the line, the compiler is still waiting for the period to actually start the execution.

Mathematical Operators, You Know Those Things That Help Math Explain the Universe!

Erlang has the standard operators that you’re used to, especially if you’ve done anything with a language based around C syntax such as JavaScript, Java, C#, C++, Objective-C… well, pretty much every regularly used static typed language and more. In functional languages these operators are pretty common too. If any don’t look familiar, be sure to get intimate with them. You’ll find them all over Erlang code.

The + and – characters act as addition and subtraction, but also as unary operators. In order of precedence, the unary operations of the + and – have the highest precedence and the addition and subtraction usage of the + and – have the lowest precedence.

The * and / signify multiplication and division. They’re precedence is just below that of the unary operators of + and -.

Two that are a slight bit unique, is the usage of “div” and “rem” for division and remainder, for integer numbers. This begs to bring up the point that whenever an integer is involved in multiplication, division, addition, subtraction or other operations, it is coerced into a float when being operated on against another float. Such as 2 + 3.47 would mean that 2 is turned into a float before it is added to 3.47.

Here’s some examples of operations occurring between numbers via the shell.

$ erl
Erlang R15B01 (erts-5.9.1)  [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9.1  (abort with ^G)
1> +15.
15
2> +2.
2
3> -11.
-11
4> 11 div 5.
2
5> 12 div 5
5> .  
2
6> 15 div 5.
3
7> 14 div 5.
2
8> (12 + 345) div 12.
29
9> (3+2)/5.
1.0
10> 2*3*4.12.
24.72
11> 1+1+1+1+13+-2.
15
12> 2/3 + 3/4 - (1/2 + 2/3) - 1.
-0.75
13> 14 rem 5.
4
14> 

These examples show a number of effects of how the operators work. Notable is how everything looks very much like simple math being done. This is one of the more readable aspects of Erlang. Note also that the rounding generally goes down.

Distributed Coding Prefunc: Ubuntu Erlang Dev & EUnit

Erlang LogoAfter installing Erlang on OS-X and then getting QuickCheck installing via Erlang, I wanted to expand the OS options I’m using to Ubuntu (i.e. Linux). So in this entry I’m going to cover the Erlang install, a quick eunit bit, and then a QuickCheck install and sample. The first step in geting Erlang installed is deciding how you want to install it. So far, it isn’t like Rails where it is pretty important which method you pick to how well it will work for you on Ubuntu. For Erlang all methods get you started with a good version that is working. The method I used was simply to install with apt-get.

sudo apt-get install erlang erlang-doc

After installing, always a good idea to run things and make sure they’re all content and happy with your machine. Startup the erlang shell.

erl

Then run some of the commands. Some I’ve found that will present you with useful and interesting information ist he erlang:system_info function with appropriate parameter passed. The otp_release parameter will get the version of erlang, the cpu_topology shows you the processor outlay for you machine (or in this case my virtual machine, with a single processor core allocated to it), and allocated_areas shows a bit about system memory allocations.

Eshell V5.9.1  (abort with ^G)
1> erlang:system_info(otp_release).
"R15B01"
2> erlang:system_info(cpu_topology).
[{processor,{logical,0}}]
3> erlang:system_info(allocated_areas).
[{sys_misc,80748},
 {static,1007616},
 {atom_space,98328,73387},
 {atom_table,95961},
 {module_table,9084},
 {export_table,50316},
 {export_list,240960},
 {register_table,180},
 {fun_table,3266},
 {module_refs,2048},
 {loaded_code,3437028},
 {dist_table,403},
 {node_table,227},
 {bits_bufs_size,0},
 {bif_timer,80200},
 {link_lh,0},
 {process_table,262144},
 {ets_misc,52504}]
[{processor,{logical,0}}]

Now that erlang is effectively installed we can write a little sample code. To do this I created a directory called “TestingErlang” and in it placed an Erlang code file called “eunit_tests.erl”. Note: I’m using Sublime 2 on Ubuntu, so exchange that for whatever text editor you’re using for your Erlang coding.

adron@ubuntu:~/Codez$ mkdir TestingErlang
adron@ubuntu:~/Codez$ cd TestingErlang
adron@ubuntu:~/Codez/TestingErlang$ sublime eunit_tests.erl

Add the header file include.

-define(NOTEST, true).
-include_lib("eunit/include/eunit.hrl").

Adding the header file include will cause all the function with _test() or _test_() to automatically be exported. An exported function of test() is created that can be used for running all of the unit tests. This also will include the preprocessor macros of EUnit for writing tests. So now throw a super simple test into the file.

You may want to, amid the automatic export of the methods ending in _test() or _test_() not name them this, and you’ll then need to add a line at the top of your code file like this.

-export([reverse_test/0]).

After this, add the function test as shown below.

reverse_test() -> lists:reverse([1,2,3]).

The complete code file should look like this.

-module(eunit_test).
-define(NOTEST, true).
-include_lib("eunit/include/eunit.hrl").
-export([reverse_test/0]).

reverse_test() -> lists:reverse([1,2,3]).

Build it and call the function.

Eshell V5.9.1  (abort with ^G)
1> c(eunit_test).
{ok,eunit_test}
2> eunit_test:reverse_test().
[3,2,1]
3> 

BOOM! Passing. So now we know we have a good Erlang install and eunit is setup and usable. In the following blog entries I have in the works, we’ll dive deeper into what and how Erlang works from an extremely basic level all the way to diving into some of the more complex features.

Distributed Coding Prefunc: Installing QuickCheck for Great Testing

Erlang LogoA few weeks ago I kicked off this series of “Distributed Coding Prefunc: Up and Running with Erlang” and had wanted to keep up the momentum, but as life goes I had to tackle a few other things first. But now, it’s time to get back on track with some distributed computing. I intend to write tests with my samples, as I often do, I decided to take a stab at .

Before going forward, note that there is QuickCheck for Haskell and there is a QuickCheck for Erlang. Since the point of this “Distributed Coding Prefunc” is to get started coding with Erlang from zero, I’ll be talking about the Erlang version here. This version is created by John Hughes and Koen Claessen, starting the Quviq Company in 2006.

To download QuickCheck choose the version you intend to use, I’ve chosen the commercial license version from the download page.

At the command prompt, install QuickCheck by running Erlang and then run the install with these commands.

Launch Erlang:

$ erl
Erlang R15B01 (erts-5.9.1)  [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9.1  (abort with ^G)
1>

Then execute the install:

1> eqc_install:install().

If the execution of the install displays this error, you’ll need to use sudo.

Installing ["pulse-1.27.7","eqc-1.27.7","eqc_mcerlang-1.27.7"].
Failed to copy pulse-1.27.7--copy returned {error,eacces}??
** exception exit: {{error,eacces},"pulse-1.27.7"}
     in function  eqc_install:'-copy_quickcheck/3-lc$^0/1-0-'/3 (../src/eqc_install.erl, line 63)
     in call from eqc_install:install2/4 (../src/eqc_install.erl, line 44)

Kill Erlang with a ctrl+c and restart Erlang with the sudo command.

$ sudo erl

Now when you install you should see the following result or something similar. You’ll be asked to continue, select lowercase ‘y’ to continue. It may be different for some, but when I hit uppercase ‘Y’ (I suppose I got overzealous to install QuickCheck) it finished as if I’d hit no or something else.

1> eqc_install:install().
Installation program for "Quviq QuickCheck" version 1.27.7.
Installing in directory /usr/local/lib/erlang/lib.
This will delete conflicting versions of QuickCheck, namely
    []
Proceed? y
Installing ["pulse-1.27.7","eqc-1.27.7","eqc_mcerlang-1.27.7"].
Quviq QuickCheck is installed successfully.
Looking in "/Users/adronhall"...   .emacs not found
Could not find your .emacs file!
Try install("path-to-emacs-file") or install(new_emacs).
Bookmark the documentation at /usr/local/lib/erlang/lib/eqc-1.27.7/doc/index.html.
ok

You’ll note above, I don’t currently have emacs installed. The reason it looks for emacs is because QuickCheck has templates/ops mode for emacs. So if you use emacs you’re in luck. I on the other hand, don’t, so I’ll just be using this from wherever I’m using it.

In addition to the lack of emacs, another important thing to note from the message is the link to documentation. Once you get this link open it up and check out the docs. They’re broken out into easily readily topic spaces and are a good place to do initial reference checking while you’re writing up your specs.

If you have a license, it is important to note, that if you’ve used sudo with your installation you’ll need to kill your running Erlang session and start it anew without sudo. Otherwise you’ll run into issue down the road trying to use the libs (unless of course you want to go hack on your permissions manually). Once you’re ready to register the software it’s simply one command, where xxxxx is your license key.

eqc:registration("xxxxxxxxxxxx").

Alright, next time we’re on to next steps…

My Year of Coding, Messaging, Learning, Leading, Reconoitering, and Hacking in Photos

Hope you have a little patience, this blog entry is going to be pretty long. There was a multitude of conferences, more than a hundred pair coding sessions, more cities, hotels and other things as I criss crossed the country helping to knock out projects, code, fire off some open source projects and generally get some technology implemented. It has been a spectacular year. I also could add, it has thoroughly kicked my ass and I’ve loved it.

2012 Coding Projects

In 2012 I’ve taken the healm of the Iron Foundry Project which led to the creation of Tier 3 Web Fabric PaaS. A Cloud Foundry & Iron Foundry .NET based PaaS. From there the project led to an expansion of leading the efforts on the Thor Project, which is a Cloud Foundry User Interface for OS-X and Windows 7. Beyond that I’ve contributed to and participated in dozens of different projects in various ways over the year. I finished up this year by joining Basho in December and thus, joined the Riak & related Basho Projects.

Coding Project Aims For 2013

Some of the projects I’ve started, will join or hope to otherwise continue participation in include the following. Here’s to hoping 2013 is a hard core coding and contributing year of excellence!

  • Many of the Basho Organization’s Projects I’ll be diving into, including work around Rebar, Riak, Docs & a number of others.
  • Name Factory – a project I’ve started a while back of Riak + JavaScript around creating massive test data with JavaScript and also using Riak for the storage & searching on that data created.
  • Criollo – Criollo is one of the most common forms of cocoa, is a native OS-X Cocoa User Interface for distributed systems built on or using Riak.
  • SpikeOp – This I’ve dubbed the name of the iOS interface for distributed systems built on or using Riak.
  • I want to use and possibly contribute to Corrugated Iron, the .NET Client for Riak. Prospectively to use for a Windows 8 User Interface for distributed systems built on or using Riak.
  • I’ll continue to maintain and provide support for the Iron Foundry vcap-client Library currently available via Nuget for .NET.
  • Thor Project for Cocoa & Thor .NET for Cloud Foundry & Iron Foundry.
  • Expand on prospective services for Cloud Foundry, either I or efforts I may lead to do this.

…there are others, but they’ll have to be figured out during the course of events. Also, there are an easy dozen other projects I’ll be working that don’t particularly have to do with coding, two are listed below. For an easy way to keep up with the projects I’m coding on, leading, participating in or otherwise hit me up on Twitter @adron or ADN @adron.

Big Project Aims for 2013

Thrashing Code Project – This is sort of, kind of secret. It’s going to happen soon, I have a personal schedule for it and I’ll be releasing information accordingly when the site and twitter account goes live.

Tour Triumvirate – I intend to plan, and hopefully will take at least 2 of the three tech tours I setup. More information will be forthcoming, but the original notion is outlined in the blog entry I wrote titled “The Adron Code Tour, Let’s Hack, Bike and Talk Hard Core Technology“.

Books I’ve Read in 2012

All of these I’ve either read or re-read in 2012. I set a goal at the beginning of last year to get my ass in gear when it comes to reading. A focused, get it read, understood and learn approach. I think I did pretty good overall. Not a book a week, but I’m getting back in gear. Considering my best year of reading was 100+ books, it might be a difficult to reach that again since I’m a working citizen, versus a child with plenty of time on their hands. But, it’s good to have goals.  😉

  • The Clean Coder: A Code of Conduct for Professional Programmers
  • The Rails 3 Way
  • Eloquent Ruby
  • The Economics of Freedom: What Your Professors Won’t Tell You, Selected Works of Frederic Bastiat
  • The Myth of the Robber Barons
  • Excellence Without a Soul: Does Liberal Education Have a Future?
  • Seven Databases in Seven Weeks: A Guide to Modern Databases and the NoSQL Movement
  • Surely You’re Joking, Mr. Feynman!
  • The Innovator’s Dilemma: The Revolutionary Book That Will Change the Way You Do Business
  • The Lean Startup: How Today’s Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses
  • 8 Things We Hate About IT: How to Move Beyond the Frustrations to Form a New Partnership with IT
  • Smart and Gets Things Done: Joel Spolsky’s Concise Guide to Finding the Best Technical Talent
  • Rework
  • Steve Jobs
  • Eloquent JavaScript: A Modern Introduction to Programming
  • JavaScript: The Good Parts
  • Node for Front-End Developers
  • First Contact (In Her Name: The Last War, #1)
  • Cloudonomics: The Business Value of Cloud Computing
  • The REST API Design Handbook
  • HTML5 Canvas
  • HTML5: Up and Running
  • Triumph of the City: How Our Greatest Invention Makes Us Richer, Smarter, Greener, Healthier, and Happier
  • Traffic

Book Reading Aims for 2013

  • Natural Capitalism
  • How God Changes Your Brain: Breakthrough Findings from a Leading Neuroscientist
  • Discourse on the Method of Rightly Conducting One’s Reason and of Seeking Truth in the Sciences
  • Political Ideals
  • The Autobiography of Benjamin Franklin
  • Wrestling with Moses: How Jane Jacobs Took On New York’s Master Builder and Transformed the American City
  • Bikenomics: An Introduction to the Bicycle Economy
  • Everyday Bicycling: How to Ride a Bike for Transportation (Whatever Your Lifestyle)
  • Just Ride: A Radically Practical Guide to Riding Your Bike
  • Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation
  • Erlang Programming
  • Building Web Applications with Erlang: Working with REST and Web Sockets on Yaws
  • Think Complexity: Complexity Science and Computational Modeling
  • Async JavaScript
  • Smashing Node.js: JavaScript Everywhere (Smashing Magazine Book Series)
  • Windows PowerShell for Developers
  • How to Use the Unix-Linux vi Text Editor
  • Sketching User Experiences: The Workbook
  • Designing Interfaces
  • Information Architecture for the World Wide Web: Designing Large-Scale Web Sites
  • Consider Phlebas
  • Snow Crash
  • How to Change the World: Social Entrepreneurs and the Power of New Ideas
  • Mission, Inc.: The Practitioner’s Guide to Social Enterprise
  • Simply Complexity
  • Complex Adaptive Systems: An Introduction to Computational Models of Social Life (Princeton Studies in Complexity)
  • Thinking In Systems: A Primer
  • Thinking, Fast and Slow
  • Programming in Objective-C
  • Learning iPad Programming: A Hands-on Guide to Building iPad Apps with iOS 5
  • Cocoa Programming for Mac OS X
  • Getting Started with GEO, CouchDB, and Node.js
  • JavaScript Web Applications
  • Suburban Nation: The Rise of Sprawl and the Decline of the American Dream
  • Design Patterns in Ruby

…and the two books I’d like to re-read this year because they’re just absurdly entertaining and I’d like a refresher of the stories.

  • A Confederacy of Dunces (I’ll be reading this for the 2nd time)
  • The Hitchhiker’s Guide to the Galaxy (Yup, just want to read it again)

My 2012 Coder’s Year in Photos

What I’ve put together here is a photo story of the year, hopefully it’s entertaining in some way. With that, here’s a review of the year, cheers and happy new year! 2012 started with one of my last hack sessions as a Seattle Resident at Ruby at Racer weekly meetup.

Ruby at Racer Meetup

Ruby at Racer Meetup

Meanwhile some of my last views from Russell Investments. Absolutely beautiful, epic and awe inspiring views of the Puget Sound from the Emerald City of Seattle.

View from Russell Investments Seattle Headquarters, stunning!

View from Russell Investments Seattle Headquarters, stunning!

Then a fitting image, from the business meeting floor of the same building, the settings sun for my departure.

Overlooking the Puget Sound, Japanese Garden in the forefront from the Russell Investments Building in Seattle.

Overlooking the Puget Sound, Japanese Garden in the forefront from the Russell Investments Building in Seattle.

February of 2012 kicked of with my return to Portland, Oregon. Stumptown regularly welcomed me back more than a few moments.

Stumptown Morning Brew

Stumptown Morning Brew

One of the first meetups I attended back in Portland was the DevOps Meetup.

DevOps DevOpers Hanging around pre-meeting at PuppetLabs in Portland.

DevOps DevOpers Hanging around pre-meeting at PuppetLabs in Portland.

That DevOps meetup just happened to have a session on one of the code bases I was working with, Cloud Foundry.

Cloud Foundry preso on how the pull requests and such where going to be built into a process, which still today is rather cumbersome for community involvement. However, it's still moving forward, albeit at a slower pace than it could if it was streamlined around github instead of github being an

Cloud Foundry preso on how the pull requests and such where going to be built into a process, which still today is rather cumbersome for community involvement. However, it’s still moving forward, albeit at a slower pace than it could if it was streamlined around github instead of github being an “end point” read only repository…

While my move consisted of many a couch, as I just couch surfed for the first 45 or so days I was back in Portland, I finally moved into a place at the Indigo in downtown.

My New Place, priorities as they are my system sits in the corner ready for use.

My New Place, priorities as they are my system sits in the corner ready for use.

The new system, albeit a great Christmas present from 2011, became the defacto work system of 2012 and remains one of my top machines. Mac Book Air w/ 4GB RAM, i5 Proc, 256 GB SSD. Not a bad machine.

2011 Mac Book Air, settled into it's workspace cradle.

2011 Mac Book Air, settled into it’s workspace cradle.

A view from on high, looking down upon the streets of San Francisco from the New Relic Offices. Thanks for the invite and the visit, it was great meeting the great team at New Relic San Francisco!

New Relic San Francisco View

New Relic San Francisco View

Getting around on my first trip to San Francisco of 2012. Thanks to John, Bjorn, Bill, John and the whole team in Portland and San Francisco for the invite. Great talking to you guys.

MUNI Streetcar FTW!

MUNI Streetcar FTW!

On the same trip it began pouring rain as I’d never seen before in San Francisco. I sat by Duboche Park, staying warm and away from drowning! Arriving outside was one of the MUNIs that eventually I was rescued by from the torrential floods and returned to downtown, dry and intact!

MUNI to the rescue on the torrential downpour of the year in San Francisco.

MUNI to the rescue on the torrential downpour of the year in San Francisco.

…and Julia thanks for the tour around San Francisco and the extra tasty lunch at EAT!! Good times!

Eating at the EAT sign!

Eating at the EAT sign!

Amidst all these images, I threw together some into a collage. There are a number of awesome coders & hackers of all sorts in these images. Shout out to Jerry Sievert, Eric Sterling,

Snikies, a collage I made!!!! (This one you can click on for a full size image)

Snikies, a collage I made!!!! (This one you can click on for a full size image)

…and alas I’ll have another zillion images and such as we all roll into 2013 and onward. Cheers! For some more new years posts I’ve found useful check out this list, which I’ll be adding to over the next few days.

Distributed Coding Prefunc: Up and Running With Erlang

Erlang LogoBefore diving into architecture, coding, descriptions and other things related to distributed computing over the coming months. It helps to become familiar with a language like Erlang. I’m going to dive immediately into getting Erlang up and running before any theory, description or otherwise, so following the most direct installation…

Installing Erlang

This is easy on OS-X. Pending of course you have the XCode and Developer Tools installed.

curl -O http://erlang.org/download/otp_src_R15B01.tar.gz
tar zxvf otp_src_R15B01.tar.gz
cd otp_src_R15B01

Then compile the latest XCode and tools you can use the LLVM Compiler.

CFLAGS=-O0 ./configure --disable-hipe --enable-smp-support --enable-threads \
--enable-kernel-poll --enable-darwin-64bit
make
sudo make install

For more information on building Erlang you can also check out the Erlang Organization Site. It’s that simple, so now that it is up and running you should be able to check that all is right with the install by pulling a version.

erl -version

In my follow up blog entry I’m going to take you through the Rebar Riak Core Templates. This will get you up and running with an Erlang Application. This application can then be used either as a stand alone Erlang App for whatever you want to build with it or as a great starting point to build against Riak.