Erlang/OTP News feeds
Welcome to Planet Trapexit. On this page, you will find the latest entries from all the news feeds currently in our database. If you know feeds that would be suitable here (that is, that relate to Erlang/OTP in any way, please add them here.
September 02, 2010
Erlang Solutions
- Jobs
Subcontractors, Stockholm Sweden
We are looking for subcontractors available on a full time basis with immediate start on a rolling three months contract.
Roles will involve working as part of a small team of Erlang developers from our Stockholm Office.
You should have experience of developing reliable, fault tolerant applications in Erlang. Experience with linux/bsd, networking, riak and erlang web/nitrogen is highly desirable.
Knowledge of SMS communications protocols, SIP, Telecom and embedded will assist in your consideration for this role.
Immediate start to contract if you are the right person. Rates to reflect skill level and aptitude.
Process-one Blogs
TextOne for iPhone, with photo sharing!
Our iPhone version of TextOne, the simple and fast messenger for smartphones, has received a nice photo sharing feature.
TextOne, the simple, light and fast smartphone messenger, is now offering a new feature to share photos with your friends.
Easy, a new icon appears at the top right of the conversation screen, you just need to tap it.
There, you can choose to take a picture or select one from your albums... and add the text you wish.
This will appear in the conversation as a taped instant photo, like any other messages.
You can also browse the photos exchanged with your contacts.
Of course, this also works with TextOne Pink!

Photo sharing in TextOne will let you share good moments with the people to whom you are close. Or alternatively play ;-)
And finally, you can play with it
by Nicolas Vérité at September 02, 2010 08:43 AM
September 01, 2010
Damien Katz
What's New in CouchDB 1.0 Security 'n Stuff
Today, I get a little help from Rebecca. She's writing a CouchApp, an application that is served right out of CouchDB and that lives in the browser. It has no middle tier application server in Ruby or Java. The application and display logic is written in JavaScript, the user interface is HTML & CSS, the backend is CouchDB and uses Ajax to shove JSON back and forth.
by Damien Katz at September 01, 2010 12:36 AM
August 31, 2010
Programming in the 21st Century
Common Sense, Part 1
There's a photo of mine in the September 2010 issue of Popular Photography. I'm excited about it; my photo credits are few and far between, and it brings back the feelings I had when I wrote for magazines long ago. Completely ignoring the subject of the image, there are couple of surprising facts about it.
The first is that it was a taken on a circa-2004 Canon PowerShot G5, a camera with a maximum resolution of five megapixels.
The second is that it's a doubly-compressed JPEG. The original photo was a JPEG, then I adjusted the colors and contrast a bit, and saved it out as a new JPEG. Each save lost some of the image quality. I was perfectly willing to submit the adjusted photo as a giant TIFF to avoid that second compression step, but was told not to worry about it; the JPEG would be fine.
Yet there it is: the five megapixel, doubly-compressed photo, printed across almost two pages of the magazine. And those two technical facts are irrelevant. I can't tell the difference; it looks great in print.
Now it is an impressionistic shot, so it could just be that the technical flaws aren't noticeable in this case. Fortunately, I have another anecdote to back it up.
Last year I was in New Mexico and took a lot of photos. After I got back home, I decided to get a few photo books printed. The source images were all twelve megapixel JPEGs, but the book layout software recommended a six megapixel limit. I cut the resolution in half, again twice-compressing them. When I got the finished books back, the full-page photos were sharp and beautiful.
The standard, pedantic advice about printing photos is that resolution is everything. Shoot as high as possible. Better yet, save everything as RAW files, so there's no lossy compression. Any JPEG compression below maximum is unacceptable. Double-compression is an error of the highest order, one only made by rank amateurs. And so it goes. But I know from personal experience that while it sounds authoritative, and while it's most likely given in a well-meaning manner, it's advice that's endlessly repeated in a loose, "how could it possibly be wrong?" sort of way and never actually tested.
by James Hague at August 31, 2010 06:00 AM
August 30, 2010
Erlang Inside
Russia’s numerous contributions to the Erlang community – Dmitrii Dimandt, creator of erlanger.ru
Erlang Inside is sponsored by Inaka Networks, Erlang consultants combining experience with Telecom to build high performance web applications. This week, Erlang Inside has a guest post from Dmitrii Dimandt, a Russian developer and creator of the site erlanger.ru. I’d like to talk about the Russian Erlang community and what it’s doing with Erlang. In [...]
by Chad DePue at August 30, 2010 04:58 PM
August 29, 2010
Chicago Erlang User Group
6/2/2010 OTP Plus
Here's the video from the group meeting on 6/2/2010 on "How to use OTP". OTP makes coding with Erlang just so much easier. OTP just abstracts so much coding away. Jon Patton discussed using gen_servers and Tristan Sloughter discussed using gen_supervisors. Great talks guys!!A couple of other impromptu talks were also given. Martin Logan talked about terminology and how we can discuss and
by noreply@blogger.com (Barry Nicholson) at August 29, 2010 09:15 PM
August 28, 2010
Nicolas Charpentier's blog
Next language to learn: Haskell
Remembering ”The pragmatic programmer: Fro, Journeyman to Master”, each developer should learn a new language each year. This year, I will give its chance to Haskell. Why Haskell ? Scala was a candidate for this year but Haskell has a strong reputation in the functional world. I came to functional with Erlang because of its concurrent and distribution [...]
by charpi at August 28, 2010 07:36 PM
Programming in the 21st Century
Personal Programming
I've mentioned before that this site is generated by a small Perl script. How small? Exactly 6838 bytes, which includes comments and an HTML template. Mentioning Perl may horrify you if you came here to read about Erlang, but it's a good match for the problem. Those 6838 bytes have been so pleasant to work on that I wanted to talk about them a bit.
I've used well-known blogging applications, and each time I've come away with the same bad taste, one that's caused by a combination of quirky rich formatting and having to edit text in a small window inside of a browser. I don't want to worry about presentation details: choosing fonts, line spacing, etc. It's surprising how often there are subtle mismatches between the formatting shown in a WYSIWYG editing window and what the final result looks like. Where did that extra blank line come from? Why do some paragraphs have padding below them but others don't?
I decided to see if I could bypass all of that and have a folder of entries marked-up with basic annotations, then have a way to convert that entire folder into a real site. And that's pretty much what I ended up with. The sidebar and "Previously" list and dated permalink are all automatically generated. Ditto for the atom feed and archives page. The command-line formatter lets me rebuild any page, defaulting to the newest entry. If I want to change the overall layout of the site, I can regenerate all of the pages in a second or so.
There are still legitimate questions about the path I chose. "Why not grab an open source program and modify it to fit your needs?" "You do realize that you decided to write an entirely new system from scratch, just because you didn't like a few things in existing programs; surely that's a serious net loss?"
My response is simple: I did it because it was easy. If I get annoyed with some feature of Microsoft Word, I'm not going to think even for a second about writing my own alternative. But the site generation program just took a bit of tinkering here and there over the course of a weekend. It never felt daunting. It didn't require anything I'd label as "engineering." I spent more time getting the site design and style sheet right, something I would have done even if I used other software.
Since then, I've made small adjustments and additions to the original script. I added the archive page nine months later. Earlier this year I added a fix for some smaller feed aggregation sites that don't properly handle relative links. Just today I added mark-up support for block quotes. That last one took ten minutes and four lines of code.
If this suddenly got complicated, if I needed to support reader comments and ten different feed formats and who knows what else, I'd give it up. I have no interest in turning these 6838 bytes into something that requires a grand architecture to keep from collapsing. But there's some magic in a solution that's direct, reliable, easy to understand, and one that fits my personal vision of how it should work.
(If you liked this, you might like Micro-Build Systems and the Death of a Prominent DSL.)
by James Hague at August 28, 2010 06:00 AM
August 27, 2010
Damien Katz
Why Large Hadron Collider Scientists are Using CouchDB
A nice article on ReadWriteWeb: http://www.readwriteweb.com/enterprise/2010/08/lhc-couchdb.php
And the case study: http://www.couch.io/case-study-cern
by Damien Katz at August 27, 2010 02:51 AM
August 26, 2010
Erlang Solutions
- Jobs
Junior Systems Engineer at Erlang Solutions, London, Stockholm or Krakow (travel to client locations may be required)
With our portfolio of customer facing projects increasing in all our offices, we are looking for talented individuals to join our young and dynamic teams. You will need to be passionate about Erlang and believe it can be the next Java. The right candidate will join a small team of highly skilled systems engineers developing software in Erlang/OTP. You will gain valuable experience in exciting state-of-the-art systems within the Telecom, Financial Services, Banking, Messaging, Automotive and Logistics sectors. As our clients are spread on six continents, fear of flying is unfortunately a “no no”.
1. Responsibilities:
• Research, design, development, test and support of Erlang and related software
• Develop solutions using distributed concurrent programming, software
packaging and release
• Write code in Erlang and occasionally in other languages such as C, Java, Clojure, Haskell, Scala & Objective-C to name but a few of our favourites.
2. Skills and experience required:
• Be passionate about Erlang
• A minimum of 1 year’s Erlang programming even if it has been a hobby or
academic project
• Experience with other languages such as C and Java, and it's always good to have another perspective
• Knowledge of Distributed Computing, and revision control software
(preferably GIT or Subversion)
• Experience of implementation of soft real time servers
• Experience with interconnection protocols (HTTP, XMPP, SMPP, ...)
• Experience with Linux, OS X and Solaris operating systems
• Experience with web front-end development will be a plus
• Experience with Agile Methods, including Test Driven Development will be
an advantage
• Problem-solving and thinking laterally as part of a team, or individually, to meet the needs of the project
• Good verbal and written communication in English
• Good customer facing and presentation skills.
3. Minimum Education, Certification, Training:
A degree in Computer Science, preferably a Masters.
4. Eligibility:
The right candidate will work in a rapidly expanding company and community, receive a competitive salary with full benefits and stock options. Applicants will be considered only if they are currently eligible to work in the EU, but remote work will be considered for ideal candidates.
Senior Systems Engineer at Erlang Solutions , Location: London, Stockholm or Krakow (travel to client locations may be required)
With our portfolio of customer facing projects increasing in all our offices, we are now looking for talented individuals to join us. They will need to like travel, be passionate about Erlang and see a future in this technology area.
The right candidate will lead and programme in a small team of highly skilled systems engineers in developing Erlang/OTP software to meet customer requirements.
Selected candidates will be leading the development of state-of-the-art Erlang systems in the Telecom, Financial Services, Banking, Messaging, Automotive and Logistics sectors.
1. Responsibilities:
• Research, design, development, test and support of Erlang based software
• Develop solutions using distributed concurrent programming, software
packaging and release
• Write code in Erlang and occasionally in other languages such as C, Java, Clojure, Haskell, Scala & Objective-C to name but a few of our favourites
• Evaluation of open source Erlang killer apps
• Mentoring and coaching junior staff.
2. Skills and experience required:
• Be passionate about Erlang
• Superstar programming skills in Erlang/OTP, possibly 3 or more years
• Experience with other Programming languages
• Knowledge of Distributed Computing, and revision control software
(preferably Git and Subversion)
• Experience of implementation of soft real time servers
• Experience with interconnection protocols (HTTP, XMPP, SMPP, ...)
• Experience with web front-end development is an advantage
• Experience with mainstream operating systems, including Linux, OS X &
Solaris derivatives
• Experience with Agile Methods, including Test Driven Development
• Experience of planning, estimating and leading a team is an advantage
• Good verbal and written communication in English
• Good presentation skills and public speaking experience.
3. Minimum Education, Certification, Training:
A degree in Computer Science, preferably a Masters.
4. Eligibility:
The right candidate will work in a rapidly expanding company and community, receive a competitive salary with full benefits and stock options. Applicants will be considered only if they are currently eligible to work in the EU, but remote work will be considered for ideal candidates.
Open Source Support Engineers at Erlang Solutions, London, Stockholm or Krakow (occasional travel may be required)
We’re looking for people with world class technical and communication skills and a strong desire to see Erlang become the next Java. Experience in supporting and troubleshooting Open Source applications, preferably in Erlang, is a must.
If you know what open source development is all about, we definitively want to hear from you. Experience of trouble-shooting C applications or virtual machines is certainly a plus.
1. Responsibilities:
· Maintaining Erlang / OTP systems and distributions
· Working closely with Erlang enthusiasts, the open source community as well as customers’ operational and technical support staff on community patches
· Maintaining SLAs and response times with our clients
· Experienced individuals will help establish the support process as well as service levels and agreements
2. Skills and experience required
· Be passionate about Erlang
· Superstar trouble-shooting skills in Erlang/OTP
· Experience with other languages, including C and Java
· Experience contributing to or enabling open source
· Familiarity with Git and other revision control systems
· Database administration skills in Couchdb, Riak, and obviously Mnesia
· Experience with Ejabberd, Rabbitmq, Disco and other open source Erlang killer applications
· Comfortable with Linux, Unix, Vxworks and other embedded/desktop operating systems
· Experience of providing software support as well as being in previous customer facing roles will be a distinct advantage
· Good verbal and written communication in English.
3. Minimum Education, Certification, Training:
A degree in Computer Science, preferably a Masters.
4. Eligibility:
The right candidate will work in a rapidly expanding company and community, receive a competitive salary with full benefits and stock options. Applicants will be considered only if they are currently eligible to work in the EU, but remote work will be considered for ideal candidates.
August 25, 2010
Erlang Solutions
- News
25 August 2010: Erlang User Conference Registration Open with a Very-Early Bird Rate!
Registration for the Sixteenth International Erlang User Conference and Erlang University courses are now open. The first 100 people to register will receive a Very-Early Bird Discount and pay only SEK 750 including VAT! DON’T MISS OUT as last year's conference sold out.
The Sixteenth International Erlang User Conference will take place in Stockholm, on the 16th November 2010.
In addition to the conference itself, there will be the Erlang University - three-day Erlang training courses from 17th to 19th November. There will also be a day of Erlang Tutorials on the 15th.
Registering for one of the University courses: Erlang Express or OTP Express includes entry to the Erlang User Conference, so don't waste time and register now!
Speakers and talks will be announced shortly.
Erlang Factory News
Erlang User Conference Registration Open with a Very-Early Bird Rate!
Registration for the Sixteenth International Erlang User Conference and Erlang University courses are now open. The first 100 people to register will receive a Very-Early Bird Discount and pay only SEK 750 including VAT! DON’T MISS OUT as last year's conference sold out.
August 21, 2010
Damien Katz
The Little Comedian
Gwen: Knock knock.
Me: Who's there?
Gwen: Knock knock.
Me: Who's there?
Gwen: Knock knock.
Me: Who's there?
Gwen: Banana!
Me: Banana who?
Gwen: Orange you glad I didn't say orange again?
Us: BWAHAHAHA!
by Damien Katz at August 21, 2010 01:53 AM
August 19, 2010
Process-one Blogs
Tsung 1.3.3 has been released
Tsung 1.3.3 fixes severals bugs. It fixes support for SSL with erlang R14A.
Tsung 1.3.3 brings some minor bugfixes.
- fixed parent proxy not working in 1.3.x (tested with 1.3.2 and 1.3.0).
- fixed url substitution is broken in some cases
- fixed Tsung not using sessions with low probabilities
- fixed SSL not working with erlang R14A
- fixed failure when a proxy is used and an URL substitution is set
- fixed HTTP cookies support when a proxy is used
- fixed hanging at the beginning using distributed setup
- fixed "if" statement, which is not allowed in a transaction
by Marek Foss at August 19, 2010 04:18 PM
Erlang Solutions
- News
19 August 2010: Ulf Wiger CTO of Erlang Solutions will be presenting at Cracow Grid Workshop ‘10.
Presenting at the conference which runs October 11th - 13th in Krakow, Poland, Ulf will look at how Erlang is breaking out of the clusters of the last century and entering today's cloud computing environments.
The main objective of the Cracow Grid Workshops, which were initiated in 2001, is to support the community of researchers, developers, and practitioners who work in the fascinating field of e-Science, grid systems, and their applications. It will also be celebrating its 10th Anniversary this year.
For more information please visit the CGW ’10 website.
August 17, 2010
Erlang Solutions
- News
17 August 2010: Ulf Wiger of Erlang Solutions will be presenting at Yow! Australia 2010 in Brisbane and Melbourne
Ulf will be giving a talk titled, Erlang Warps Your Mind: Concurrency-Oriented Programming , and two workshops, Erlang: A Language for Programming Reliable Systems and Erlang/OTP System Principles.
During “Erlang Warps Your Mind: Concurrency-Oriented Programming” he will try to show how learning Erlang will make you a better programmer.
“Erlang: A Language for Programming Reliable Systems”, a hands on tutorial, will give you an introduction to the Erlang programming language.
During “Erlang/OTP System Principles" you will get an insight in to the theory and concepts behind Erlang design principles, learning how concurrency design patterns they are used to build industrial grade systems.
The YOW! Australia 2010 Developer Conference offers outstanding opportunities to learn more about the latest practices, technologies and methods and for building innovative software solutions with the opportunity to hear and meet international software experts and network with the other talented developers in Australia.
Melbourne Dates: The talk will be 2-3 December with the workshops on November 30th to December 1st.
Brisbane Dates: The Talk will be 6December 6th-7th with the workshops on December 8th-9th.
For more information on the conference, click here and for more information on Ulf’s presentations click here.
August 14, 2010
Erlware
ErlangCamp - Erlang and OTP Workshop in Chicago Oct 23 and 24
ErlangCamp is here! You may have seen the announcement on the erlang.org already. ErlangCamp is a two day hands on workshop for those interested in learning how to go from novices or experienced levels of programming Erlang to being able to confidently write production grade Erlang/OTP services. ErlangCamp is an opportunity to learn from those who have done a ton with OTP and Erlang and put many
by Martin J. Logan (martinjlogan@erlware.org) at August 14, 2010 01:18 PM
August 13, 2010
Damien Katz
WARNING: CouchDB 1.0.0 Data Loss bug
Update August 13, 2010. A data recovery tool now available: http://wiki.couchone.com/page/repair-tool
if you are running CouchDB 1.0.0 with the default delayed commit setting, you are subject to serious data loss on restart. See this page for instructions how to force all outstanding commits and configure your server at runtime to run in the safer full commit mode: http://couchdb.apache.org/notice/1.0.1.html
The page also includes details of the bug and a postmortem.
0.11.1 and earlier are unaffected. Servers with delayed commits turned off are unaffected. 1.0.1 will be coming shortly that fixes the problem in all configurations.
DO NOT COMPACT THE DATABASE! Compaction throws away any lost updates permanently.
Data recovery is coming. The CouchDB core contributors are working on a utility to reliably recover lost updates, so no data is lost as long the database file is not compacted.
by Damien Katz at August 13, 2010 06:42 PM
August 12, 2010
Erlang Solutions
- News
12 August 2010: Hans Nilsson of Erlang Solutions will be presenting at Java Zone 2010
In his talk entitled “Introducing Erlang to the OO Community”. Hans will look at whether anything at all can be modelled without objects? He will describe why Erlang, originally invented to handle the next generation of Telecom products, has become successful in a much wider range of sectors including embedded devices, messaging systems, banking and e-commerce.
He will also introduce the Erlang programming language, describing how to do more with less. Hans will be giving examples on the syntax and constructs which allow Erlang programs to be 4 : 10 times shorter than their counterparts in Java, C and C++ while achieving 99,999% availability. He will provide examples not only of the Ericsson success stories, but also from banking, finance, distributed databases, instant messaging and web2.0, describing how Erlang has found its role in these market segments.
For more information click here.
August 09, 2010
Jordan Wilberding
ErlangCamp Chicago 2010
I am happy to to announce ErlangCamp Chicago 2010 (http://erlangcamp.com/) has gone live and is ready to take registrations. This has been in planning for quite a while between Martin Logan, Eric Merritt, Tristan Sloughter, and myself. We are trying to help build the Erlang community here in the U.S. We hope by providing an [...]![]()
by diginux at August 09, 2010 07:29 PM
Chicago Erlang User Group
ErlangCamp Chicago 2010 Registration Open
We are pleased to announce ErlangCamp Chicago 2010 (http://erlangcamp.com/) has gone live and is ready to take registrations. If you want to learn how to build production ready Erlang/OTP systems, this workshop is for you.
by noreply@blogger.com (Jordan Wilberding) at August 09, 2010 01:31 AM
August 07, 2010
EazyErl!
erlang: Simple Debug macro
When testing things I need some quick way to debug "a la" printf() style. Old habits :)
Here's is the simple debug macro I use:
-ifdef(debug).Write it down in a "debug.hrl" file, then you only need to add this line in any file header:
-define(DEBUG(Format, Args), io:format("~s.~w: DEBUG: " ++ Format, [ ?MODULE, ?LINE | Args])).
-else.
-define(DEBUG(Format, Args), true).
-endif.
-include("debug.hrl").
This simple macro gives you the module name and the line number. This saves me a lot of time.Then you need to define the "debug" atom to let your macro do what you want. The compile:file/2 handles options for this, the syntax is {d, debug}
You can also use some simple helper module to compile multiples files using simple regexp:
Here's the code:
-module(utils_compile).
-export([c/1, c/2, d/1, d/2]).
c(FilePattern) ->
c(FilePattern, "../ebin").
c(FilePattern, OutDir) ->
filelib:fold_files(".", FilePattern ++ ".erl$", false,
fun(X, _Acc) ->
io:format("Compiling ~p~n", [ X ]),
compile:file(X, [{outdir, OutDir}, report]) end, []).
d(FilePattern) ->
d(FilePattern, "../ebin").
d(FilePattern, OutDir) ->
filelib:fold_files(".", FilePattern ++ ".erl$", false,
fun(X, _Acc) ->
io:format("Compiling (debug) ~p~n", [ X ]),
compile:file(X, [{outdir, OutDir}, {d, debug}, report]) end, []).
by rolphin (noreply@blogger.com) at August 07, 2010 02:46 PM
August 06, 2010
ejabberd@jabber.ru
ejabberd 3.0.0-alpha-1 - for alpha-testing only
This first alpha includes three major changes compared to ejabberd 2.1.5: exmpp library is used, gen_storage for a database abstraction layer, and Massive Hosting which isn't yet usable.
Many tables have changed both in Mnesia and MySQL/PgSQL/ODBC. Fortunately, now ejabberd is able to create tables, update the tables and reformat their content in Mnesia and also in external databases. Or at least it should do.
by badlop at August 06, 2010 10:01 PM
Erlang Inside
ErlangCamp Chicago 2010 – Oct 23rd/24th
Incredibly cheap at $100.00 USD - Two days of Erlang/OTP sessions in Chicago - check it out. http://erlangcamp.com/
by Chad DePue at August 06, 2010 05:35 PM
1011 Ltd Blog
Why Google Wave "failed"
Google Announced this week that they "don't plan to continue Wave as a standalone product", which was a surprise. The twitterverse and technology press went crazy with the news. Even the Financial Times reported on the demise of Wave. I've been involved on the fringes of Wave, building clients, gadgets, prototyping servers, using the web client extensively, but since Google I/O 2010 I don't think I've touched it. Why did it "fail", and how can other projects learn from the mistakes?
Damien Katz
CouchDB Diplom Thesis
It's whooping 163 pages containing all the nitty-gritty-researchy details on why CouchDB is the number one choice for writing distributed applications in both the small and large scale.
by Damien Katz at August 06, 2010 12:30 AM
August 05, 2010
Erlang Solutions
- News
05 August 2010: Announcing the call for submissions for the Erlang User Conference 2010 in Stockholm.
The 2010 Erlang User Conference in Stockholm will be held on Tuesday the 16th of November. Monday the 15th of November will be dedicated to Erlang Tools Tutorials, the Erlang User Conference will take place on the 16th November. With The Erlang University training courses being held on the 17th - 19th November.
We have now opened the call for talks and tutorials for the 2010 conference. Talk submissions should be 30 minutes in length, including five minutes for a Q&A session. Tutorial submissions can be of 1.5 or 3 hours in duration and should be aimed at a technical audience. For your chance to present at the Erlang User conference 2010 submit a talk via the EUC2010 Submissions page. The deadline is the 10th September at the latest.
August 04, 2010
Damien Katz
We are hiring open source contributors!
We are hiring front end and back end engineers, documentation writer, trainer, release engineer and managers. Must have an open source background. See our jobs page for more info:
by Damien Katz at August 04, 2010 11:36 PM
August 03, 2010
ejabberd@jabber.ru
ejabberd 2.1.5 - Fifth bugfix release
ejabberd 2.1.5 has been released. It contains several minor bugfixes and a few improvements.
This is a short list of changes:
- Erlang/OTP R12 support fixed
- Erlang/OTP R14A support added
- OpenSSL 0.9.8 or higher is required
- BOSH: New optional connection attribute process-delay
- C2S: Don't ask for client certificate when using tls
- C2S: Inform client that SSL session caching is disabled
by badlop at August 03, 2010 04:35 PM
Process-one Blogs
ejabberd 2.1.5 and exmpp 0.9.5 bugfix releases
We are pleased to announce the bugfix releases ejabberd 2.1.5 and exmpp 0.9.5.
Regarding ejabberd 2.1.5:
The main changes are:
- Erlang/OTP R12 support fixed
- Erlang/OTP R14A support added
- OpenSSL 0.9.8 or higher is required
- BOSH: New optional connection attribute process-delay
- C2S: Don't ask for client certificate when using TLS
- C2S: Inform client that SSL session caching is disabled
- CTL: Fix problem when FIREWALL_WINDOW options for erl kernel were used
- CTL: Some systems delete the lock dir; in such case don't use Flock at all
- Caps: Support all the hash functions required by XEP-0115
- Config: Fix typo in --enable-transient_supervisors
- Config: New configure option: --enable-nif
- Extauth: Support parallel script running
- MUC: Allow admins to see private rooms in disco
- ODBC: Correct handling of SQL boolean types
- ODBC: Discard too old queued requests (the caller has already got a timeout)
- ODBC: Fixes wrong SQL escaping when --enable-full-xml is set
- ODBC: Use ets instead of asking supervisor in ejabberd_odbc_sup:get_pids/1
- Pubsub: Enforce disco features results
- S2S: When logging s2s out connection attempt or success, log if TLS is used
- Shared Rosters: When account is deleted, delete also member of stored rosters
Release Notes
Check the Release Notes for a more complete list of changes:
http://www.process-one.net/en/ejabberd/release_notes/release_note_ejabberd_2.1.5
If you upgrade from ejabberd 2.0.5 or older, read carefully the release notes of ejabberd 2.1.0 too, because there were several changes in the installation path and the configuration options.
Links
The list of solved tickets since previous version is available on ProcessOne bug tracker:
http://redir.process-one.net/ejabberd-2.1.5
ejabberd 2.1.5 is available as source code package and binary installers for Linux 32 bits, 64 bits, Mac OS X Intel, and Windows:
http://www.process-one.net/en/ejabberd/downloads
Regarding exmpp 0.9.5:
Brief summary of changes:
- Add method to retrieve underling connection properties
- Configurable Zlib support
- Fix BOSH that didn't work
- Modify exmpp_component to use exmpp_socket instead of exmpp_tcp
- Negotiate zlib compression before OR after SASL
- Raise requirement to Erlang/OTP R12B-5
- Replace calls to OTP module ssl_pkix with public_key
- STARTTLS support
- Session enhancements
- Stream compression support for session
Links
exmpp home page:
http://support.process-one.net/doc/display/EXMPP/ or easier to remember: http://exmpp.org/.
Download exmpp 0.9.5 source code package from:
http://download.process-one.net/exmpp/
You can also check the ProcessOne Labs page:
http://www.process-one.net/en/labs/
by Jérôme Sautret at August 03, 2010 03:35 PM
August 01, 2010
Damien Katz
Getting Your Open Source Project to 1.0
The project I founded, Apache CouchDB, recently hit 1.0. I'm very proud :)

Awesome 1.0 cupcakes from Sauce Labs.
It's been a long time, but we finally produced a release that's complete, performs well and is rock solid.
Already CouchDB is on over 10 million machines. It's used by big respected websites (like the BBC) and groundbreaking organizations (Mozilla and Canonical). We run on most *nix, OS X, Windows, and even Android phones. Have dozens of frameworks and client libraries available. There are 2 books available for sale right now. There is a venture capital backed startup, Cloudant, that offers CouchDB hosting and scales to huge datasets. And I'm CEO of another venture backed ($2 million invested) 12 person start-up, Couchio.
So how did I get here? It took a lot of time and effort (almost 5 years!), and the help of a lot of people. Here are some tips of what it took to get CouchDB to 1.0.
Why?
Successful open source projects need a reason for being. You need to decide why you are creating a project and what problems it solves. Whether it's one or many reasons, you need to figure out what they are and explain them.
Perhaps you are making something new, that hasn't existed. Why hasn't it existed it before? No had the idea? No one had the will to carry it through? Or maybe you are making something that's already in existence, like an HTTP server. What are your reasons? Simpler, faster, more features, different license?
If you are just doing it as a learning exercise, that's fine. But don't expect to attract a community until you can explain why it's useful beyond you own personal goals.
With CouchDB, my reasons were:
1. A schemaless document database with views, bi-directional replication and conflict detection to enable disconnected operation would be really useful.
2. I wanted to understand more about creating distributed systems and database internals.
No one cares about reason #2 except for me. But the first reason is compelling.
Make sure you can tell people why your project exists and what it's good for. And put the reasons on your project site where people can find them.
Code Comes First
Don't start a project unless you have a deep commitment to being a strong coder.
Now I'm not saying you must be a strong coder to participate in a project. Not at all. I'm saying that you must be strong coder to lead one. Maybe you'll get lucky and somehow attract a some really good coders to your project. But most really good coders go to projects with already solid codebases, or start their own.
Also, you don't have to be a strong coder when you start out, but you should know the basics and have a strong desire to learn and get better. Don't expect to attract anyone to your project until you have a substantial amount of working code that isn't a big ball of spaghetti.
With CouchDB, I always emphasized the quality of the high-level design and code implementation. We cannot under any circumstances lose or corrupt your committed data, or get things into an inconsistent state. Reliability and durability are absolutely imperative. Any design or implementation that doesn't meet these goals doesn't make it into the project.
Some projects might not have an emphasis on the reliability, but on absolute performance. That's a fine choice to make, but make sure your users know what they are trading off. And then actually deliver on the performance.
As the project moves along, you will need to ensure the code quality (reliability, performance, resource, usage, etc) is improving over time. If you aren't a good coder, you won't be able to do this.
Know What You Aren't
Almost as important as knowing what your project is trying to accomplish, is know what it isn't trying to accomplish.
When your project starts to get traction, but before it's done, you'll get a lot of people who want the project to work more like things they've used in the past. New users might think your goals and abilities are cool, but they'd trade it all for just a little more. They'll want everything your project does, plus a pony.
The problem is feature and scope creep. Even if you are successfully keeping the project on track, the community may get slowed down dealing with people trying to make it something it's not. Stating clearly what your project isn't trying to do or be helps make it much easier to explain what you can't implement or change.
Now, you can't define everything your project isn't. (It's not a video game. It's not accounting software. It's not a banana. It's not a rainbow. etc.). But you can find the things it's related to, overlaps with, or might be confused with, and explicitly say it's not those things.
With CouchDB, because we are a database, people often asked us to add features that were in traditional RDBMS's, but didn't fit well with the CouchDB data model. Not being intimately familiar with CouchDB's model and how it all fits together, they don't realize that what they're asking for simply doesn't work. But because we explicitly stated on the project site we aren't a relational database and aren't trying to replace relational databases, it made it much easier to explain why those features weren't a good fit for what CouchDB is trying to accomplish.
So if you don't clearly define what your project isn't, often people will try to make it into those things. This can damage the community, as moving forward is slower and people feel like they aren't being listened to. Be explicit what you aren't, and it makes it much easier to focus on what you actually are.
Don't Do Everything (Well)
So you are superstar coder, your code is clear and concise and high quality, you write clear complete documentation, your create all the tests, and you fix every bug. You are awesome!
Thing is, you might be awesome, but until you actually get a community behind the project, the project will be limited in an absolute sense by what a single person can produce. And if you are doing everything, that's not a whole lot. Trying to do everything well means you'll probably never actually release anything.
Unfortunately, at first, you _will_ need to do everything. But just don't do everything really well. Instead, you'll have do some things crappily, and then move on. In addition to writing all the code, you'll need to: Create a project site. Explain your project. Write documentation. Do the releases. Start a bug tracker. Create a mailing list and answer questions. And you'll have to do most of these things poorly if you want to keep moving the ball forward.
You'll have to do some things poorly. But you'll need to pick a few things that you do really well and execute on those things. (The code should be one of the things you do well).
And everything you do, you'll need to make it easy for others to participate. To add patches, to update and create documentation, make bug reports and send patches. And make it clear that help is desired.
Don't get hung up on trying to make everything perfect. That just paralyzes you. But by picking a few things to do well, you will attract people to help you with the things you aren't doing well.
Community Wants to Help
Open Source is awesome in the way it attracts people who just want to help make something cool. Many people want to contribute their time, but only if they think their help will amount to something in the long run. They don't want to spend time and effort on something that doesn't yet show potential or might be abandoned if the creators lose interest.
If you have a solid codebase, then it becomes much easier to attract people to your community. If people can recognize there is at least something high quality about your project, but it's lacking in some areas, people will want to help you in those areas. But you have to have the high quality pieces in place. People don't want to be the one excellent contributor to dreck. They'd rather not have their efforts associated at all.
They do want to be a part of something great. They want to add their work and make it even better. They want to contribute to projects where the total excellence of the project reflects well on them and their efforts. They want to make the world a better place, and don't want their efforts wasted.
And people who like making the world a better place are exactly the kind of people you want to attract. You want people to have pride in their contributions, and to feel like they are really positively affecting the things they care about. Those people have lots of projects to choose where they can add their time and talents. If they feel their efforts on your project are wasted, they are gone. Make sure the people who show a strong desire to contribute aren't ignored, and feel like their efforts will eventually amount to something.
Being a part of Apache has helped CouchDB tremendously. Partially it's because Apache has helped our visibility and credibility. But it's also because we've adopted the "Apache Way", which is more focused on the community aspects of a project than on any specific contributor. Without our amazingly active community, CouchDB would be far behind where it is now.
Community Is Often Incompetent
Unfortunately, many people who will want to help you will produce contributions of poor quality. You will have deal with this "help", and do so diplomatically. The best way to point out the shortcomings with their contributions is to identify what needs improvement without denigrating their overall effort. This can be hard, and many don't want to hear why their efforts aren't up to the project's standards.
Sometimes you have to hurt peoples feelings. But it's better to be honest then to have the quality of your project brought down. If they can't handle the feedback, so be it. The good news is the people who do listen to constructive criticism and actually improve the quality of their contributions are incredibly valuable. Look for these people and nurture their involvement.
With CouchDB, we try to listen to all members of our community, but we only grant commit access to the ones who have shown high quality contributions. Our committers are our first line of defense against poor code and design.
Paul Graham Was Right
It seems to make sense to choose a mainstream language for your project. The more mainstream it is, the larger the potential community you can attract. While that's true to an extent, the quality of the community is more important than its absolute size. Much more important.
Using a mainstream language means you are also competing for contributor's time from other projects in the same language. So the pool is large, but in the end, you still have to attract quality developers from other things competing for their attention. And the competition might actually be stronger in that larger pool.
The more mainstream a language, the more likely it is that a random developer knows it because it's what they use at work. They aren't necessarily interested in being more productive, being more reliable, or whatever. They are interested in getting paid, and they choose their language not for elegance, power or performance, but for the number of job openings available.
If you pick a non-mainstream, more esoteric language, you tend to get a higher quality of developer. You tend to find people who absolutely love programming and building, and choose their languages not based on the scale of pay, but because they make the developers and projects more powerful. So while the total pool of contributors is smaller, they tend to give a higher quality of contribution. You get a much better signal to noise ratio.
As Paul Graham explained in Beating the Averages, the exotic languages tend to attract devs who love to learn and expand their toolbox. You'll attract more of the types of devs who don't mind creating new code to fill in the gaps, or diving into source to find a bug. They aren't afraid of what they don't know, they actually get excited by the chance to learn and do something new.
But if you pick enterprisey language X, you might find you are spending more of your time fixing problems and dealing with developers who just don't "get it". If you aren't careful, this can drown your project and bring the total code quality down to the point where you can't find good devs to help you anymore. With the less popular, esoteric languages, that tends to be less of a problem and you get a higher quality of contribution in general.
Use Your Brain
I can keep listing all the stuff we did, but you aren't creating the same project under the same circumstances. Pretty much everything I've said here, we've not followed at some point during the project. Often it was to the detriment of the project, but sometimes it just didn't make sense to blindly follow a rule or guideline.
You have a brain, and using it is the most important thing to remember at anytime. Projects can't follow cookie cutter rules. Even the "Apache Way", as I've discovered, means different things to different people, often at different times.
So take my advice here with a grain of salt, and use your brain to figure out what's actually important to you, your project and it's community. Good luck!
by Damien Katz at August 01, 2010 05:38 PM
July 30, 2010
Hypothetical Labs
Part 1: Introducing riak_core
-
What is riak_core?
riak_coreis a single OTP application which provides all the services necessary to write a modern, well-behaved distributed application.riak_corebegan as part of Riak. Since the code was generally useful in building all kinds of distributed applications we decided to refactor and separate the core bits into their own codebase to make it easier to use.Distributed systems are complex and some of that complexity shows in the amount of features available in
riak_core. Rather than dive deeply into code, I’m going to separate the features into broad categories and give an overview of each.Note: If you’re the impatient type and want to skip ahead and start reading code, you can check out the source to
riak_corevia hg or git.Node Liveness & Membership
riak_core_node_watcheris the process responsible for tracking the status of nodes within a riak_core cluster. It usesnet_kernelto efficiently monitor many nodes.riak_core_node_watcheralso has the capability to take a node out of the cluster programmatically. This is useful in situations where a brief node outage is necessary but you don’t want to stop the server software completely.riak_core_node_watcheralso provides an API for advertising and locating services around the cluster. This is useful in clusters where nodes provide a specialized service, like a CUDA compute node, which is used by other nodes in the cluster.riak_core_node_watch_eventscooperates withriak_core_node_watcherto generate events based on node activity, i.e. joining or leaving the cluster, etc. Interested parties can register callback functions which will be called as events occur.Partitioning & Distributing Work
riak_coreuses a master/worker configuration on each node to manage the execution of work units. Consistent hashing is used to determine which target node(s) to send the request and the master process on each node farms out the request to the actual workers.riak_corecalls worker processesvnodes. The coordinating process is thevnode_master.The partitioning and distribution logic inside
riak_corealso handles hinted handoff when required. Hinted handoff occurs as a result of a node failure or outage. In order to assure availability, most clustered systems will use operational nodes in place of down nodes. When the down node comes back the cluster needs to migrate the data from its temporary home on the substitute nodes to the data’s permanent home on the restored node. This process is called hinted handoff and is managed by components insideriak_core.riak_corealso handles migrating partitions to new nodes when they join the cluster such that all work continues to be evenly partitioned to all cluster members.riak_core_vnode_masterstarts all the worker vnodes on a given node and routes requests to
the vnodes as the cluster runs.riak_core_vnodeis an OTP behavior wrapping all the boilerplate logic required to implement a vnode. Application-specific vnodes need to implement a handful of callback functions in order to participate in handoff sessions and receive work units from the master.Cluster State
A
riak_corecluster stores global state in a ring structure. The state information is transferred between nodes in the cluster in a controlled manner to keep all cluster members in sync. This process is referred to as “gossiping”.riak_core_ringis the module used to create and manipulate the ring state data shared by all nodes in the cluster. Ring state data includes items like partition ownership and cluster-specific ring metadata. Riak KV stores bucket metadata in the ring metadata, for example.riak_core_ring_managermanages the cluster ring for a node. It is the main entry point for application code accessing the ring, viariak_core_ring_manager:get_my_ring/1, and also keeps a persistent snapshot of the ring in sync with the current ring state.riak_core_gossipmanages the ring gossip process and insures the ring is generally consistent across the cluster. -
What’s the plan?
Over the next several months I’m going to cover the process of building a real application in a series of posts to this blog where each post covers some aspect of system building with
riak_core. All of the source to the application will be published under the Apache2 licensed and shared via a public repo on github.And what type of application will we build? Since the goal of this series is to illustrate how to build distributed systems using
riak_coreand also satisfy my own technical curiosity I’ve decided to build a distributed graph database. A graph database should provide enough use cases to really exerciseriak_corewhile at the same time not obscuring the core learning experience in tons of complexity.Thanks to Sean Cribbs and Andy Gross for providing helpful review and feedback.
by kevin at July 30, 2010 05:30 PM
July 29, 2010
Learn You Some Erlang
Errors and Processes
Errors and Processes might be the last chapter released before Learn You Some Erlang hits its one year mark (see: http://ferd.ca/learn-you-some-erlang-a-year-in.html). Thanks to all dedicated readers and reviewers. This chapter covers the building blocks of error management with concurrent Erlang: linking processes together, handling different signals sent between processes when they crash, monitoring actors and naming them. This should be the last material required before we build a real concurrent application in Erlang.
Programming in the 21st Century
Stop the Vertical Tab Madness
In One Small Step Toward Reducing Programming Language Complexity I added "Who even knows what "\v" (vertical tab) does?" as an off the cuff comment. Re-reading that made me realize something that's blatantly obvious in retrospect, so obvious that I've gone all this time without noticing it:
No one is actually using the vertical tab escape sequence.
And I truly mean "no one." If I could stealthily patch the compiler for any language supporting the "\v" escape so I'd receive mail whenever it occurred in source code, then I could trace actual uses of it. I'm willing to bet that all the mail would come from beginners trying to figure out what the heck "\v" actually does, and then giving up when they realize it doesn't do anything. That's because it doesn't do anything, except with some particular printers and terminal emulators, and in those cases you're better off not relying on it anyway.
And yet this crazy old feature, one that no one understands or uses, one that doesn't even do anything in most cases, not only gets special syntax in modern programming languages, it's consistently given space in the documentation, even in tutorials. It's in the official Lua docs. It's in MIT web course notes about printf. It's in the books Programming in Python 3 and Python Essential Reference. It's in an introduction to Python strings. It's in the standard Erlang documentation, too.
[Insert conspiracy theory involving the Illuminati here.]
Here's my simple plea: stop it. Stop mentioning vertical tabs in tutorials and language references. Drop the "\v" sequence in all future programming languages. Retroactively remove it from recent languages, like Python 3.0. Yes, ASCII character number 11 isn't going away, but there's no reason to draw attention to a relic of computing past.
Surprisingly, the "\v" sequence was removed from one language during the last decade: Perl. And even more surprisngly, there's a 2010 proposal to add escaped character sequences, including vertical tab, to the famously minimal language, Forth.
(If you liked this, you might like Kilobyte Constants, a Simple and Beautiful Idea that Hasn't Caught On.)
by James Hague at July 29, 2010 06:00 AM
July 28, 2010
Joe's Blog
SurgeCon 2010

If you haven’t heard about Surge, it’s a new web operations conference presented by the smart folks at OmniTI. They have amassed a good list of speakers including guys like John Allspaw and Theo Schlossnagle. I also happen to have been invited to talk about the cloud, Cloudant and all sorts of good stuff.
by joe at July 28, 2010 03:00 AM
July 26, 2010
Damien Katz
CouchCamp is Coming Soon!
This is the place to be to learn and hack on Apache CouchDB. In honor of the recent 1.0 release, for a limited time it's only $500, with accommodations.
In addition to unconference style discussions, we've got some great speakers: Selena Deckelman, Stuart Langridge, Ted Leung, Josh Berkus, Dion Almaer and me :)
One thing I'm really excited to talk about is our work porting CouchDB to mobile platforms. Android, iOS, RIM, etc. We've got some very cool stuff coming :)
by Damien Katz at July 26, 2010 05:10 PM
July 24, 2010
Programming in the 21st Century
One Small Step Toward Reducing Programming Language Complexity
I've taught Python a couple of times. Something that experience made clear to me is just how many concepts and features there are, even in a language designed to be simple. I kept finding myself saying "Oh, and there's one more thing..."
Take something that you'd run into early on, like displaying what's in a dictionary:
for key, value in dictionary.iteritems(): print key, valueTuples are a bit odd in Python, so I put off talking about them as long as possible, but that's what iteritems returns, so no more dodging that. There's multiple assignment, too. And what the heck is iteritems anyway? Why not just use the keys method instead? Working out a clean path that avoids constant footnotes takes some effort.
This isn't specific to Python. Pick any language and it likely contains a larger interconnected set of features than it first appears. Languages tend to continually grow, too, so this just gets worse over time. Opportunities to reverse that trend--backward compatibility be damned!--would be most welcome. Let me propose one.
The humble string constant has a few gotchas. How to print a string containing quotes, for example. In Python that's easy, just use single quotes around the string that has double quotes in it. It's a little more awkward in Erlang and other languages. Now open the file "c:\my_project\input.txt" under windows. You need to type "c:\\my_projects\\input.txt", but first you've got to say "Oh, and there's one more thing" and explain about how backslashes work in strings.
Which would be fine...except the backslash notation for string constants is, in the twenty-first century, an anachronism.
Who ever uses "\a" (bell)? Or "\b" (backspace)? Who even knows what "\v" (vertical tab) does? The escape sequence that gets used more than all the others combined is "\n" (newline), but you rarely want to use it directly because end-of-line markers vary between operating systems. It's simpler to have a print function that puts a "return" at the end one that doesn't. Then there's "\t" (tab), but it has it's own set of quirks, and it's almost always better to use spaces instead. The price for supporting a feature that few people use is core confusion about what a string literal is in the first place. "The length of "\n\n" isn't four? What?"
There's an easy solution to all of this. Strings are literal, with no escapes of any kind. Special characters are either predefined constants (e.g., TAB, CR, LF) or created through a few functions (e.g., char(Value), unicode(Name)). Normal string concatenation pastes them all together. In Python:
"Content-type: text/plain" + NL + NLIn Erlang:
"Content-type: text/plain" ++ NL ++ NLIn both cases, the compiler mashes everything together into one string. There's no actual concatenation taking place at runtime.
Note that in Python you can get rid of backslash notation by preceding a string with the "r" character (meaning "raw"), like this:
r"c:\my_projects\input.txt"But that adds another feature to the language, one to patch up the problems caused by the first.
(If you liked this, you might like In Praise of Non-Alphanumeric Identifiers.)
by James Hague at July 24, 2010 06:00 AM
July 22, 2010
Erlang Inside
Erlang and REST – an interview with Steve Vinoski
Interview recorded at Erlang Factory, where Steve Vinoski discusses the key concepts of RPC frameworks such as CORBA, and how that compares to REST, and how Erlang fits into both worlds
by Chad DePue at July 22, 2010 12:23 PM
July 19, 2010
Joe's Blog
Adding Health Checks to Deckard from Chef.
Recently, we (at Cloudant) open sourced Deckard, a HTTP content check monitoring system based on CouchDB. One of the best bits about using Couch is that it gives you a ReST API and with Deckard it can be used to add new health checks. Doing a simple PUT adds new URLs to monitor. At Cloudant we love Chef and use it for everything. Chef has things called resources and providers. Resources are abstractions that describe the state you want a machine to be in. Providers perform the actions described by a resource. A good example is using the package resource on Centos uses yum while on Ubuntu it uses apt-get. The resource abstracts that away, letting the provider (and node) deal with the specifics on how to install the package. This makes your recipes nice and DRY, use the same code to install packages on all sorts of platforms. There are resources and providers for anything from installing packages to even one I wrote for executing Erlang code via erl_call. One resource that works well with Deckard is the HTTP request resource, using it makes it very easy to add health checks from your cookbooks. We use something like the following code to add checks to new nodes at Cloudant:
This code will add the document describing the check to the monitor_content_check database and then create a file so we can use “not_if” and Chef won’t attempt to add the check twice. Pretty cool stuff and even more reason that everything should have an API. Even cooler than this example would be to use Chef Search to do the same thing but I’ll save that for another blog post.
by joe at July 19, 2010 08:52 PM
July 17, 2010
Trapexit's Erlang Blog Filter
New Column, New Interview
A couple newsworthy items:
-
The July/August 2010 issue (PDF) of The Functional Web column is available, this time with guest columnist Aaron Bedra writing about using Clojure and the Compojure web framework on the Google App Engine platform. Pretty interesting read, and plenty of code examples.
-
Sadek Drobi interviewed me about Erlang and REST at Erlang Factory back in March, and the interview is now up at InfoQ.
by steve at July 17, 2010 06:01 PM
Programming in the 21st Century
Free Your Technical Aesthetic from the 1970s
In the early 1990s, I used Unix professionally for a few years. It wasn't the official Unix, nor was it Linux, but Sun's variant called SunOS. By "used" I mean I wrote commercial, embedded software entirely a Unix environment. I edited 10,000+ line files in vi. Not vim. The original "one file loaded at a time" vi.
At the time, Unix felt clunky and old. I spent a lot of time in a library room down the hall, going through the shelves of manuals. It took me a long time to discover the umask command for changing the default file permissions and to understand the difference between .bashrc and .bash_profile and how to use tar.
By way of comparison, on my home PC I used a third-party command shell called 4DOS (later 4NT, and it's still available for Windows 7 as TCC LE). It had a wonderful command line history mechanism: type part of a command, then press up-arrow. The bash bang-notation felt like some weird mainframe relic. 4DOS had a built-in, full-screen text file viewer. The Unix equivalent was the minimalist less command. 4DOS help was colorful and pretty and hyperlinked. Documentation paged through as man pages was several steps backward.
The Unix system nailed the core tech that consumer-level computers were way behind on: stability and responsiveness in a networked, multitasking environment. It was ugly, but reliable.
In 2006, I got back into using Unix again (aside from some day-job stuff with Linux ten years ago) in the guise of OS X on a MacBook. The umask command is still there. Ditto for .bashrc and .bash_profile and all the odd command line switches for tar and the clunky bang-notation for history. I'm torn between wonderment that all those same quirks and design choices still live on...and shocked incredulity that all those same quirks and design choices live on.
Enough time has passed since the silly days of crazed Linux advocacy that I'm comfortable pointing out the three reasons Unix makes sense:
1. It works.
2. It's reliable.
3. It stays constant.
But don't--do not--ever, make the mistake of those benefits being a reason to use Unix as a basis for your technical or design aesthetic. Yes, there are some textbook cases where pipelining commands together is impressive, but that's a minor point. Yes, having a small tool for a specific job sometimes works, but it just as often doesn't. ("Those days are dead and gone and the eulogy was delivered by Perl," Rob Pike, 2004.) Use Unix-like systems because of the three benefits above, and simultaneously realize that it's a crusty old system from a bygone era. If you put it up on a pedestal as a thing of beauty, you lose all hope of breaking away from a sadly outdated programmer aesthetic.
(If you liked this, you might like My Road to Erlang.)
by James Hague at July 17, 2010 06:00 AM
July 14, 2010
Erlang Factory News
Erlang User Conference 2010 Talk Submission Open!
The 2010 Erlang User Conference in Stockholm will be held on Tuesday 16th November 2010. The venue will again be the Old Astoria Cinema in Nybrogatan.
On Monday November 15th there will be a day of tutorials. This will allow delegates to again optimise their visit to Stockholm to take in both these events.
We have opened the submissions page. To submit a proposal for a talk or tutorial, visit the Talk Submission page.
More details will be forthcoming in the near future. Keep a look out or join the Erlang Factory Mailing list!
July 09, 2010
Programming in the 21st Century
Explaining Functional Programming to Eight-Year-Olds
"Map" and "fold" are two fundamentals of functional programming. One of them is trivially easy to understand and use. The other is not, but that has more to do with trying to fit it into a particular view of functional programming than with it actually being tricky.
There's not much to say about map. Given a list and a function, you create a new list by applying the same function to each element. There's even special syntax for this in some languages which removes any confusion about whether the calling sequence is map(Function, List) or map(List, Function). Here's Erlang code to increment the values in List:
[X + 1 || X <- List]Fold, well, it's not nearly so simple. Just the description of it sounds decidedly imperative: accumulate a result by iterating through the elements in a list. It takes three parameters: a base value, a list, and a function. The last of these maps a value and the current accumulator to a new accumulator. In Erlang, here's a fold that sums a list:
lists:foldl(fun(X, Sum) -> X + Sum end, 0, List)It's short, but it's an awkward conciseness. Now we've two places where the parameter order can be botched. I always find myself having to stop and think about the mechanics of how folding works--and the difference between left and right folding, too (lists:foldl is a left fold). I would hardly call this complicated, but that step of having to pause and run through the details in my head keeps it from being mindlessly intuitive.
Compare this to the analog in array languages like APL and J. The "insert" operation inserts a function between all the elements of a list and evaluates it. Going back to the sum example, it would be "+/" in J, or "insert addition." So this:
1 2 3 4 5 6turns to this:
1 + 2 + 3 + 4 + 5 + 6giving a result of 21. The mechanics here are so simple that you could explain them to a class of second graders and not worry about them being confused. There's nothing about iterating or accumulating or a direction of traversal or even parameters. It's just...insertion.
Now there are some edge cases to worry about, such as "What does it mean to insert a function between the elements of a list of length 1"? Or an empty list for that matter. The standard array language solution is to associate a base value with operators, like addition, so summing a list containing the single value 27 is treated as 0 + 27. I'm not going to argue that APL's insert is more general than fold, because it certainly isn't. You can do all sorts of things with the accumulator in a traditional fold (for example, computing the maximum and minimum values of a list at the same time).
But in terms of raw simplicity of understanding, insert flat-out beats fold. That begs the question: Is the difficulty many programmers have in grasping functional programming inherent in the basic concept of non-destructively operating on values, or is it in the popular abstractions that have been built-up to describe functional programming?
(If you liked this, you might like Functional Programming Archaeology.)
by James Hague at July 09, 2010 06:00 AM
July 08, 2010
Erlang Inside
PostgreSQL Erlang client library epgsql supports asynchronous messages from LISTEN/NOTIFY events
If you use PostgreSQL with Erlang, you're probably already familiar with the epgsql client library. Something that slipped my attention was the addition of...
by Chad DePue at July 08, 2010 07:27 PM
Erlware
A Brief Overview of Concurrency.
Introduction Over the last few weeks I have had several conversations with people about concurrency, more specifically the ways in which shared information is handled in concurrent languages. I have gotten the impression that there isn't really a good understanding of whats out there in the world of concurrency. That being the case it would be a good idea to just give a quick overview of some of
by Eric Merritt (noreply@blogger.com) at July 08, 2010 04:33 PM
July 05, 2010
Process-one Blogs
ProcessOne releases OneCached, a Memcached in erlang
ProcessOne has just released OneCached, a Memcached server and client implementation written in Erlang.
OneCached is a new Memcached server and client implementation written from scratch in Erlang by ProcessOne.
From the Memcached website:
What is Memcached?
Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.
OneCached supports the set, add, replace, get, incr, decr, delete, flush_all and quit commands. It doesn't handle expiration time.
You call pull the source code from the public repository at: https://git.process-one.net/onecached
git clone git://git.process-one.net/onecached/mainline.git
To compile, just run make, and to start, just type:
bin/onecachedctl start
OneCached is released under the Erlang Public License (EPL), version 1.1. It is available from ProcessOne Labs.
by Nicolas Vérité at July 05, 2010 04:29 PM
Erlang Inside
New Erlang job board – totally-erlang.com
The Zotonic guys put together a new Erlang job board at http://totally-erlang.com/
by Chad DePue at July 05, 2010 11:27 AM
July 03, 2010
RedHotErlang
Playing with LFE macros
Summertime, it's warm, it's sunny, I'm on vaccation, it's [LFE][1]-time. [Lisp macros][2] are cool. With a Lisp macro you do program transformations where you have the full language available to express these transformations. This means that you *ea...
by tobbe at July 03, 2010 06:48 AM
July 01, 2010
Programming in the 21st Century
What Do People Like?
I wrote Flickr as a Business Simulator in earnest, but I think it was interpreted more as a theoretical piece. When you build something with the eventual goal of releasing it to the world, the key question is "Will people like this?" And, really, you just won't know until you do it. There's nothing like the actions of tens of thousands of independently acting individuals who have no regard for your watertight theories. What Flickr provides is a way to make lots of quick little "product" releases, and see if your expectations line up with reality. Is this my primary use of Flickr? No! But the educational opportunity is there, regardless. Click on a photo to go to the Flickr page.
The rest of this entry is an annotated list of some photos I've posted to Flickr, with both my conjectures of how they'd be received and what actually happened. In each case the photo comes first with the commentary following.
I sat on this photo for a while after shooting it. I thought it was cliche, something everyone had already seen many times. A real photographer wouldn't bother to recreate such an image. Then I posted it...and it got an immediate string of comments and favorites. It's still one my top ten overall Flickr photos according to the stats system. My invented emphasis on originality didn't matter.
I thought these skid marks in front of a local liquor superstore were photoworthy, but the result didn't grab me. Like the sunset wheat photo, it took on a life of its own on Flickr. Was the hook in the impossibility of those tire tracks? That they look like a signature? Why was I unable to see the appeal before uploading it? It even ended up--with permission--in Scott Berkun's The Myths of Innovation (O'Reilly, 2007).
This one I liked immediately. The red arrow. The odd framing. The blown-out white background that makes the rust pop. The Flickr reaction...well there wasn't one. Is the industrial decay photo niche saturated? Would it have been a hit if I worked at getting hundreds of dedicated followers first? Or maybe I like it because it's better than other photos I've taken recently, but not all that great in absolute terms?
Oh so cleverly titled "I'm Lovin' IT!" I knew this was a novelty. It pulled in some novelty linkage as a ha-ha photo of the day sort of thing. It didn't get anywhere near the exposure of that Yahoo ad next to the 404 distance on a home run fence. The traffic from "I'm Lovin' IT!" was transient, adding points to the view counter, but as they weren't Flickr users they didn't add comments or favorites. In the end it was an empty success.
by James Hague at July 01, 2010 06:00 AM
June 30, 2010
Process-one Blogs
Hosted.IM gets gateways to legacy IM systems
The XMPP service for your domains has just received a much demanded feature: gateways to legacy IM systems.
Hosted.IM is the cloud service for everything IM, by ProcessOne. This service is free for up to 5 users teams.
We have added gateways to main legacy IM systems in the world:
- AOL: aol.hosted.im
- ICQ: icq.hosted.im
- MSN: msn.hosted.im
- Twitter: twitter.hosted.im
- Yahoo: yahoo.hosted.im
These gateways are also free for up to 5 users teams.
by Nicolas Vérité at June 30, 2010 03:08 PM
June 29, 2010
Erlang Inside
erldocs.com updated with R14A support, mochiweb, and available for your own projects
Dale Harvey just recently updated erldocs.com with R14A support. If you are doing any erlang development, or even looking to just learn a bit about erlang, I highly recommend using erldocs over the official documentation.
by Chad DePue at June 29, 2010 12:53 PM
Programming in the 21st Century
Tricky When You Least Expect It
Here's a problem: You've got a satellite dish that can be rotated to any absolute angle from 0 to 360 degrees. If you think of the dish as being attached to a pole sticking out of the ground, that's what the dish rotates around. Given a starting angle and a desired angle, how many degrees do you rotate the dish by?
An example should clarify this. If the initial angle is 0 degrees, and the goal is to be at 10 degrees, that's easy. You rotate by 10 degrees. If you're at 10 degrees and you want to end up at 8 degrees, then rotate -2 degrees. It looks at lot like all you have to do is subtract the starting angle from the ending angle, and that's that.
But if the starting angle is 10 and the ending angle is 350...hmmm. 350 - 10 = 340, but that's the long way around. No one would do that. It makes more sense to rotate by -20 degrees. With this in mind and some experimenting, here's a reasonable looking solution (in Erlang, but it could easily be any language):
angle_diff(Begin, End) ->
D = End - Begin,
DA = abs(D),
case DA > 180 of
true -> -(360 - DA);
_ -> D
end.
It seems to cover some quickie test cases, including those listed above. Now try angle_diff(270, 0). The expected answer is 90. But this function returns -90. Oops.
This is starting to sound like the introduction to a book by Dijkstra. He'd have called this problem solving method "guessing," and it's hard to disagree with that assessment. When I run into problems like this that look so simple, and I feel like I'm randomly poking at them to get the right answers, I'm always surprised. So many messy problems are solved as part of the core implementation or standard library in most modern languages, that it's unusual to run into something this subtle.
In Python or Erlang I never worry about sorting, hash functions, heap management, implementing regular expressions, fancy string comparison algorithms such as Boyer-Moore, and so on. Most of the time I write fairly straightforward code that's just basic logic and manipulation of simple data structures. Behind the scenes, that code is leaning heavily on technically difficult underpinnings, but that doesn't change how pleasant things are most of the time. Every once in a while, though, the illusion of all the hard problems being solved for me is shattered, and I run into something that initially seems trivial, yet it takes real effort to work out a correct solution.
Here's a version of the angle_diff function that handles the cases the previous version didn't:
angle_diff(Begin, End) ->
D = End - Begin,
DA = abs(D),
case {DA > 180, D > 0} of
{true, true} -> DA - 360;
{true, _} -> 360 - DA;
_ -> D
end.
Don't be surprised if it takes some thought to determine if this indeed handles all cases.
(If you liked this, you might like Let's Take a Trivial Problem and Make it Hard.)
by James Hague at June 29, 2010 06:00 AM
June 28, 2010
BGH's Blog
Erlang Programming Exercise: 5-2
Exercise 5-2 involves changing the frequency server from earlier in the chapter. Here is the task list:
- Restrict the deallocation of a frequency so that only the client that allocated it can deallocate it.
- Fix a bug: Deallocating a frequency that isn't allocated crashes the server
- Only allow shutdown of the frequency server if there are no allocated frequencies
- Limit the number of frequencies a client can allocate to 3
I worked through the tasks and then had a bit of fun with the server. I changed the shutdown sequence so that deallocations work while shutting down but allocations return an error. Once all of the outstanding frequencies have been returned it will complete the shutdown.
As you can see in the code below, I was playing around with typer and dialyzer. Please take a look and let me know if you have any suggestions.
Thanks!
Halzy
[erlang]
-module(frequency).
-export([start/0, stop/0, allocate/0, deallocate/1, deallocate_all/0]).
-export([init/0]).
-define(SERVER, ?MODULE).
-type frequency() :: pos_integer().
-type used_frequency() :: { frequency(), pid() }.
-record(state, {
free = [] :: [frequency()],
allocated = [] :: [used_frequency()],
shutting_down = false :: boolean(),
max_allocations = 3 :: pos_integer()
}).
%% These are the start functions used to create and
%% initialize the server.
start() ->
register(?SERVER, spawn(?MODULE, init, [])).
-spec init() -> ok.
init() ->
State = #state{
free=get_frequencies()
},
loop(State).
% Hard Coded
-spec get_frequencies() -> [frequency()].
get_frequencies() ->
[10, 11, 12, 13, 14, 15].
%% The client Functions
-spec stop() -> ok.
stop() ->
call(stop).
-spec allocate() -> {error, atom()} | pos_integer().
allocate() ->
call(allocate).
-spec deallocate(frequency()) -> ok.
deallocate(Freq) ->
call({deallocate, Freq}).
-spec deallocate_all() -> ok.
deallocate_all() ->
call(deallocate_all).
%% We hide all message passing and the message
%% protocol in a functional interface
call(Message) ->
?SERVER ! {request, self(), Message},
receive
{reply, Reply} ->
Reply
end.
%% The Main Loop
-spec loop(#state{}) -> ok.
%% [bgh] if we are shutting down, and have no outstanding frequencies, end
loop(#state{shutting_down=true, allocated=[]}) ->
ok;
loop(#state{shutting_down=ShuttingDown}=State) ->
receive
{request, Pid, allocate} when false==ShuttingDown ->
{UpdatedState, Reply} = allocate(State, Pid),
reply(Pid, Reply),
loop(UpdatedState);
{request, Pid, stop} when false==ShuttingDown ->
reply(Pid, ok),
loop(State#state{shutting_down=true});
{request, Pid, {deallocate, Freq}} ->
UpdatedState = deallocate(State, Pid, Freq),
reply(Pid, ok),
loop(UpdatedState);
{request, Pid, deallocate_all} ->
UpdatedState = deallocate_all(State, Pid),
reply(Pid, ok),
loop(UpdatedState);
{request, Pid, _} when true == ShuttingDown ->
reply(Pid, {error, shutting_down}),
loop(State)
end.
reply(Pid, Reply) ->
Pid ! {reply, Reply}.
%% The Internal Help Functions used to allocate and
%% deallocate frequencies.
-spec allocate(#state{free::[]}, pid()) ->
{#state{}, {error, no_frequency}};
(#state{free::[frequency(),...]}, pid()) ->
{#state{}, {error, max_allocations}} |
{#state{}, {ok, frequency()}}.
allocate(#state{free=[]}=State, _Pid) ->
{State, {error, no_frequency}};
allocate(#state{free=[Freq|Free], allocated=Allocated}=State, Pid) ->
case can_allocate(Allocated, Pid, State#state.max_allocations) of
false ->
{State, {error, max_allocations}};
true ->
{State#state{free=Free, allocated=[{Freq, Pid}|Allocated]}, {ok, Freq}}
end.
-spec deallocate(#state{}, pid(), frequency()) -> #state{}.
deallocate(#state{free=Free, allocated=Allocated}=State, Pid, Freq) ->
case lists:keytake(Freq, 1, Allocated) of
false ->
State;
{value, {Freq, Pid}, NewAllocated} ->
State#state{free=[Freq|Free], allocated=NewAllocated};
{value, {Freq, _WrongPid}, _NewAllocated} ->
State
end.
-spec pid_match(used_frequency(), pid()) -> boolean().
pid_match({_Freq, Pid}, Pid) -> true;
pid_match({_Freq, _OtherPid}, _Pid) -> false.
-spec deallocate_all(#state{}, pid()) -> #state{}.
deallocate_all(#state{free=Free, allocated=Allocated}=State, Pid) ->
{ToDeallocate, UpdatedAllocated} = lists:partition(fun(Elem) -> pid_match(Elem, Pid) end, Allocated),
{ReleasedFreqs, _Pids} = lists:unzip(ToDeallocate),
UpdatedFree = ReleasedFreqs ++ Free,
State#state{free=UpdatedFree, allocated=UpdatedAllocated}.
-spec can_allocate([used_frequency()], pid(), pos_integer()) -> boolean().
can_allocate(Allocated, Pid, MaxFrequencies) ->
{PidFrequencies, _Other} = lists:partition(fun(Elem) -> pid_match(Elem, Pid) end, Allocated),
length(PidFrequencies) MaxFrequencies.
[/erlang]
by halzy at June 28, 2010 03:19 PM
June 25, 2010
Erlang Inside
Spanish Language Erlang List
If you’re looking for Spanish language group to discuss Erlang, Mariano Guerra recently started “ErlAr“, a mailing list for all things Erlang, but in Castellano. Mariano is the author of Efene, a Javascript-syntax language that compiles to Erlang bytecode. I’m planning an interview with Mariano on Efene soon. There is a small but growing group [...]
by Chad DePue at June 25, 2010 01:52 AM
June 24, 2010
1011 Ltd Blog
Elegant XML SAX parsing using Erlang's pattern matching
Yesterday I wrote some code for parsing an XML file with Erlang's built-in SAX parser. It turned out that the events generated by the SAX parser, combined with the pattern matching in Erlang yielded a really elegant solution.
Learn You Some Erlang
More On Multiprocessing
This chapter's a bit of an extension on the practical aspects of the Hitchhiker's Guide to Concurrency. New multiprocessing and concurrent aspects of Erlang are seen, including how to hold state in processes, useful abstractions when passing messages, how to handle timeouts and then selective receives for prioritizing messages. I'm publishing this chapter in English on the night of our French-Canadian national holiday, so enjoy!
June 23, 2010
Process-one Blogs
Case study: Arc International
Arc International has migrated away from a proprietary solution to the open source, and open standards ejabberd and Psi, realising cost-savings and productivity increase.
Arc International is well known for distributing famous tableware brands such as Luminarc®, Arcoroc, Chef&Sommelier, Pyrex and Cristal d’Arques Paris. With 12,000 employees around the world, from Europe to Asia, and the Middle East to North America, they needed to lower the costs of their previous solutions.
They have chosen ejabberd, as an open-source, scalable XMPP platform. In conjunction, with the Psi cllent Arc International has achive their goals of cost-savings and high-quality service.
The cost-savings have benefitted from a lower TCP on IT, as well as reduced telephone bills, while providing a same feature-set to the employees worldwide.
Read our case study on the website, or as a PDF (582 KB).
by Nicolas Vérité at June 23, 2010 10:22 AM
June 22, 2010
RedHotErlang
Dizzy thoughts
On the bus home today I was reading the first chapter of [Programming Clojure][1]. The text, which is excellent, discuss the motives behind Clojure. The bus however, was stinking hot and I started to doze off. I was in a strange state of being half a...



Digg It
Del.icio.us
Reddit
Facebook
Stumble Upon
Technorati

