From owner-freebsd-arch@FreeBSD.ORG Thu Jul 31 03:41:11 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD6A6FB; Thu, 31 Jul 2014 03:41:11 +0000 (UTC) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2lp0204.outbound.protection.outlook.com [207.46.163.204]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9EF502CEC; Thu, 31 Jul 2014 03:41:10 +0000 (UTC) Received: from BLUPR05CA0081.namprd05.prod.outlook.com (10.141.20.51) by DM2PR05MB733.namprd05.prod.outlook.com (10.141.178.18) with Microsoft SMTP Server (TLS) id 15.0.995.14; Thu, 31 Jul 2014 03:41:07 +0000 Received: from BL2FFO11FD015.protection.gbl (2a01:111:f400:7c09::176) by BLUPR05CA0081.outlook.office365.com (2a01:111:e400:855::51) with Microsoft SMTP Server (TLS) id 15.0.995.14 via Frontend Transport; Thu, 31 Jul 2014 03:41:07 +0000 Received: from P-EMF02-SAC.jnpr.net (66.129.239.16) by BL2FFO11FD015.mail.protection.outlook.com (10.173.160.223) with Microsoft SMTP Server (TLS) id 15.0.990.10 via Frontend Transport; Thu, 31 Jul 2014 03:41:07 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF02-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Wed, 30 Jul 2014 20:41:04 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.21.16.28]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id s6V3eVn27065; Wed, 30 Jul 2014 20:41:01 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id B2FC5580A2; Wed, 30 Jul 2014 20:40:31 -0700 (PDT) To: Garance A Drosehn Subject: Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML In-Reply-To: <82CFA67F-BA93-44EE-BD4B-9105F89AD157@rpi.edu> References: <20140725044921.9F0D3580A2@chaos.jnpr.net> <82CFA67F-BA93-44EE-BD4B-9105F89AD157@rpi.edu> Comments: In-reply-to: Garance A Drosehn message dated "Wed, 30 Jul 2014 21:37:54 -0400." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Wed, 30 Jul 2014 20:40:31 -0700 Message-ID: <20140731034031.B2FC5580A2@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:66.129.239.16; CTRY:US; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(979002)(6009001)(189002)(199002)(69596002)(77156001)(4396001)(77982001)(50226001)(76176999)(21056001)(93546004)(110136001)(102836001)(80022001)(107046002)(102176002)(81542001)(79102001)(68736004)(50466002)(50986999)(64706001)(93916002)(62966002)(76506005)(57986006)(101356003)(99396002)(81342001)(85852003)(33656002)(83072002)(90896003)(48376002)(83322001)(76482001)(46102001)(44976005)(92726001)(20776003)(84676001)(6806004)(89996001)(47776003)(88136002)(2171001)(87286001)(87936001)(31966008)(81156004)(106466001)(92566001)(95666004)(86362001)(97736001)(104166001)(70486001)(85306003)(105596002)(74662001)(74502001)(42262001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:; SCL:1; SRVR:DM2PR05MB733; H:P-EMF02-SAC.jnpr.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; LANG:en; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 0289B6431E Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.16 as permitted sender) Authentication-Results: spf=softfail (sender IP is 66.129.239.16) smtp.mailfrom=sjg@juniper.net; X-OriginatorOrg: juniper.net Cc: arch@freebsd.org, marcel@freebsd.org, phil@juniper.net 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: Thu, 31 Jul 2014 03:41:12 -0000 On Wed, 30 Jul 2014 21:37:54 -0400, Garance A Drosehn writes: >It's hard to tell based on your sample output, but there's also >the question of truncating strings. In the text output of your Perhaps more than a "yes" answer is warranted. w(1) sizes those strings based on its expectation of the width of the tty. That can obviously be fixed/improved - but involves exposing knowledge of the out format (or at least that it isn't TXT) to the application. I'm sure there will be many cases where that sort of thing may be needed/useful, but that's almost orthogonal to the API question. As I mentioned, this patch was demoing the API not changing how w(1) works, when apps are converted for real people can go as crazy as they like (ok not true; it really is important to have consitency in terms of the structure eg that the same XML tags are used for the same data regardless of application - we have a team of people to keep an eye on that stuff). --sjg