Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 82898 invoked from network); 23 Apr 2009 16:36:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Apr 2009 16:36:17 -0000 Received: (qmail 36354 invoked by uid 500); 23 Apr 2009 16:20:20 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 36328 invoked by uid 500); 23 Apr 2009 16:20:20 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 36318 invoked by uid 99); 23 Apr 2009 16:20:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2009 16:20:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of zachary.zolton@gmail.com designates 209.85.220.163 as permitted sender) Received: from [209.85.220.163] (HELO mail-fx0-f163.google.com) (209.85.220.163) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2009 16:20:11 +0000 Received: by fxm7 with SMTP id 7so709130fxm.11 for ; Thu, 23 Apr 2009 09:19:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=H1zW4AepSYzlJ53HeGcS+56nPBfhSz5V9jgVZMU0/n4=; b=asmE9ZGwan1z18NHxb0rLyTpHtFldBT9Fs7vm3w6E0Y6SYA3XMyPthvr/3jCFDycFK s/sDOP2MqJuBhHrlk10f+pHlJwjYD1eWVc4GhjPYUJVLNLrUnZLd3hcZPdG+fbxQH3GO BhqIr8MfnNiDFlnruHcX5IptAHFGG2mXRMK04= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=BIdkyLEyMRhrQ2MJ5Ot4r0nR5aLPPxp67oeZzdDkecAy+9M6ieTQi3NAjRPxesCvaw reO1Mjr1MkwcaD5LcgGgVKNngBuWM+CMmAxbaxDboKdhaQiCTQGPUDVYHFJjcHECgdVg gzGti65Yo6iMQlIgLO+h7USHCGC5x2dzbGCAw= MIME-Version: 1.0 Received: by 10.223.113.136 with SMTP id a8mr375545faq.76.1240503590121; Thu, 23 Apr 2009 09:19:50 -0700 (PDT) In-Reply-To: <49F08409.8010507@vpro.nl> References: <51fbc8f50904220655r2d05f439n1ac9b71784ef9baf@mail.gmail.com> <9acd6e550904220700m2657cca8sdf51dae370e84d48@mail.gmail.com> <3556FE37-0659-42E6-A3CD-FCF719C51169@vpro.nl> <49F08409.8010507@vpro.nl> From: Zachary Zolton Date: Thu, 23 Apr 2009 11:19:35 -0500 Message-ID: Subject: Re: The sum function (used in reduce) To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org CouchApp =3D=3D Not necessarily much help to the rest of us. Seriously, though, I've heard this before and decided instead to handle this in my application code... On Thu, Apr 23, 2009 at 10:06 AM, Nils Breunese wrote: > Nils Breunese wrote: > >> Adam Wolff wrote: >> >>> It'd be great to make it so that _design docs can define helper >>> functions too, so that two views can share a helper. >> >> You can already define functions in a separate file and use macros to >> =A0'import' them when defining view functions. > > For clarity: macros are a couchapp feature. Examples of the use of !json = and > !code macros can be found in Sofa [0], for instance in lists/index.js. Th= ey > look like comments (starting with '//' and all), but those lines are > processed by couchapp when pushing an app to CouchDB. > > Nils Breunese. > > [0] http://github.com/jchris/sofa/tree/master >