From owner-freebsd-arch@FreeBSD.ORG Tue Jul 29 06:04:03 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 337995CF for ; Tue, 29 Jul 2014 06:04:03 +0000 (UTC) Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BA0F299C for ; Tue, 29 Jul 2014 06:04:02 +0000 (UTC) Received: by mail-pd0-f169.google.com with SMTP id y10so11187037pdj.28 for ; Mon, 28 Jul 2014 23:03:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=LjTEwycfJJsc6fKOCgXaEHgGX7auEN4+hJFJ8NSkjTE=; b=irJUG6ec3w0zKIo2/XGMN2amesfLmIWGUfSg3w8UuDH+wnrck30pphcH2gX56zVpOp 8xh4oqjGGvmt5V7iPRELxgdj33tks9NdxwLgTeyK1SVjm874DAFCeEwVQ3HZ5vxaRuB0 yOEkT8tKdeD5G7Loev8rCpIEE7ic9ABpBtkNkdwWjPBfKilcRt+GRHWHT6U+8IGVYYh7 R7QimcMq9vtb9zG5i9sd1UHg2ZzhPB9IHCT1fg38nvqxHp1epzDk1GsW+wB/XhNLU09A RB7BTBueeeq4iXHMdfVzTgL76QH5o3Ts8hyizIqijC737+G9FQe4vXJi5F3ZkDn9F+73 accw== X-Gm-Message-State: ALoCoQklQGtRYO5ur25C/gq7RDDje0iCJTIab9L4jlF7B7NDg/E061ypta1gzeJKPen+J1qH+AOe MIME-Version: 1.0 X-Received: by 10.68.225.105 with SMTP id rj9mr43732209pbc.108.1406613835798; Mon, 28 Jul 2014 23:03:55 -0700 (PDT) Received: by 10.70.101.41 with HTTP; Mon, 28 Jul 2014 23:03:55 -0700 (PDT) Received: by 10.70.101.41 with HTTP; Mon, 28 Jul 2014 23:03:55 -0700 (PDT) In-Reply-To: References: <20140725044921.9F0D3580A2@chaos.jnpr.net> <20140728054217.AC1A0580A2@chaos.jnpr.net> <20140728055336.GJ50802@ivaldir.etoilebsd.net> Date: Mon, 28 Jul 2014 23:03:55 -0700 Message-ID: Subject: Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML From: Jos Backus To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: arch@freebsd.org, Jordan Hubbard X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jul 2014 06:04:03 -0000 On Jul 28, 2014 10:57 PM, "Adrian Chadd" wrote: > > Holy ... ! > > What really matter is whether the library API that you're going to > shoehorn into plenty of utilities is expressive enough to express a > whole bunch of different output types. > > So it doesn't matter if you want JSON, or YAML, or XML, or the native > tool output. The trick is whether the library API is good enough. > > So if you want to win people over, just make sure it gets adopted > throughout other tools. :) Wouldn't the API be a way to build up an in-memory combination of lists and maps in most cases, which then gets serialized out at emission time? Kind of like calling object.to_yaml, where object is a Hash, but in C? Jos > > -a