Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chewbranca
chewbranca / test_couch_file_migration.py
Created June 17, 2014 21:59
Rough script to test migrating a file from CouchDB --> BigCouch
#!/usr/bin/env python
import os
import sys
import json
import time
import shutil
import inspect
import requests
# Copyright 2012 Erlware, LLC. All Rights Reserved.
#
# This file is provided to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,

On the Viability of Erlang Releases and CouchDB

There has been some discussion on what versions of Erlang CouchDB should support, and what versions of Erlang are detrimental to use. Sadly there were some pretty substantial problems in the R15 line and even parts of R16 that are landmines for CouchDB. This post will describe the current state of things and make some potential recommendations on approach.

Scheduler Collapse

foo() ->
this_is_a_really_long_function_name(foo,
bar,
baz).
@chewbranca
chewbranca / emacs_edts_couch_setup.md
Created March 25, 2014 20:34
Emacs + EDTS + (big)CouchDB... a journey

Emacs + EDTS + (big)CouchDB... a journey

If you use Emacs to write Erlang, you might have heard of EDTS. It's a recent Erlang development suite for Emacs, and it has some impressive features, but it can be a beast to get setup and working properly with CouchDB and the BigCouch merge branch.

Current CouchDB master's folder hierarchy is non standard for Erlang applications, and as a result it does not work well with EDTS. There

var floatToArray = function(f, n) {
n = n || 3;
var p = Math.pow(10, n-1);
f = Math.round(f * p) / p;
var r = [];
for (var i = z = 0; i < n; i++) {
z *= 10;
r.push(parseInt(f * Math.pow(10, i)) - z);
z += r[i];
}
% from: http://learnyousomeerlang.com/static/erlang/fifo_types.erl
%
-module(fifo).
-export([new/0, push/2, pop/1, empty/1]).
-export([test/0]).
-spec new() -> {fifo, [], []}.
new() -> {fifo, [], []}.
-spec push({fifo, In::list(), Out::list()}, term()) -> {fifo, list(), list()}.

Fauxton Tidings

It's been some time since we've had a Fauxton update. There's been a number of exciting updates with active tasks, replication, UI updates and more. So let's dive in.

Active Tasks

Active tasks is an interesting item. Traditionally in Futon, active tasks have been relegated to the status page, but I'm of the opinion

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />