From owner-freebsd-arch@freebsd.org Mon Jan 7 18:36:18 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0464C149B97E for ; Mon, 7 Jan 2019 18:36:18 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABEFE72D1D for ; Mon, 7 Jan 2019 18:36:16 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: by mail-vs1-xe31.google.com with SMTP id x1so848109vsc.10 for ; Mon, 07 Jan 2019 10:36:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=pfvCv52RRTU9RDpYxFNWpxN/hgqZP/LXDv24+KxPxE4=; b=AM+PqbVykgDOjaY2lZb6Hg6bUMhjjuYtG/jHEwstp19jo526pZuLaE0zYT53iXzZFc Z4Z2ZHf5+YcGJuJ6yhF/g5Lid+nUqwTUeEv0JZq17GeB+9WlLbwO8v3BvGAV2xAz2Ic8 mS6dRsTpqpWJrTVh1RJOoy0YS6/FcsYfSpFzobK+uCtA87FJ60BKAOvXZXhpn5ZUDKaH 4Ji4ADv8v9DCrhFQlC2aYUsPz++HCwlt3ke+A+0YKYKT6UjZMfbrEkpZSdaPnnG9jr6k 9MrzQZMNReyJtW5+edgKeSK8PANydZjUtrCUyV6Lkohk7FtYb6CWY9wXA2N86TeP1+KM Pa+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=pfvCv52RRTU9RDpYxFNWpxN/hgqZP/LXDv24+KxPxE4=; b=pyQvehIk3RnmI68GnfJbQdraMOEurn4Uk3xAydiMCt2I8ZHy85fN0xyDTco592CgZO 3nLKnq4Io+yL5vhRwkYczibTfe6MNctS+tpFFJjm2ECjkGlM+B3YkMr+PDf3MSo3SE2y CXbVDETse6tsPS3ZtkLUvD5QT8luzev6W2YHqECyxcn9YmfzunzFM8uibaZ6FDkDylRZ Z7w2pDOxC4bpjvXqbGUvuKU5RY4Z65hJYvK8KQEjId7ZEGuAuRD5qlt8Y5GXBOsTNjKU C15sz8hhMvPA5CkEV+n5TtUoMXVcoeQrmjwAe/IiSAROaw36/tkfd0zgqv/hfV/MAidh dUCg== X-Gm-Message-State: AA+aEWbCqvpuc1cvUtyeP5xUeGCiF2Xw+enkBxYYBzfr+vG+ERvmcVJf hoVpqFdZkBjYjSuc6BMSPlDk42bsG5BB1saoLhXexw== X-Google-Smtp-Source: ALg8bN5svRrmzYJDOoIkjoHfGvZwF+WQopBM63N1eef7uqhVURqa3+fiOgk+1fYDhHj1rEPfnGjUgCQ/847bX7K55Kc= X-Received: by 2002:a67:7c03:: with SMTP id x3mr26158739vsc.44.1546886175845; Mon, 07 Jan 2019 10:36:15 -0800 (PST) MIME-Version: 1.0 From: Gavin Howard Date: Mon, 7 Jan 2019 11:35:39 -0700 Message-ID: Subject: GNU-compatible, BSD-licensed bc To: freebsd-arch@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: ABEFE72D1D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=AM+PqbVy; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gavindhoward@gmail.com designates 2607:f8b0:4864:20::e31 as permitted sender) smtp.mailfrom=gavindhoward@gmail.com X-Spamd-Result: default: False [-6.72 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-2.77)[ip: (-9.87), ipnet: 2607:f8b0::/32(-2.20), asn: 15169(-1.68), country: US(-0.08)]; RCVD_IN_DNSWL_NONE(0.00)[1.3.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 18:36:18 -0000 Hello, I am the author of a GNU-compatible, BSD-licensed bc (https://github.com/gavinhoward/bc). I noticed (on https://wiki.freebsd.org/GPLinBase) that FreeBSD used to use the GNU bc until it was taken out because of the GPL. My bc is not licensed under the GPL; it is under the 0BSD license. Thus, I think my bc might be a great fit for FreeBSD. My bc is well-tested. I make sure that every single memory bug that I can find is out before every single release. I also make sure that my bc's math is correct by running millions of random math problems before every release. My bc is extremely portable; it easily builds on any POSIX platform. And it includes a full dc as well (except for the "!" command). I would love to work with the core team to get my bc into FreeBSD, if there is interest. I am about to do a release, and I am willing to delay the release to get it up to par for FreeBSD. Would there be interest? Gavin Howard From owner-freebsd-arch@freebsd.org Mon Jan 7 19:05:36 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41378149C5D7 for ; Mon, 7 Jan 2019 19:05:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D62C174669 for ; Mon, 7 Jan 2019 19:05:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::31e0:f388:a16f:8e6c] (unknown [IPv6:2001:470:7a58:0:31e0:f388:a16f:8e6c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2B09E9E1D; Mon, 7 Jan 2019 20:05:34 +0100 (CET) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_39FB14BE-4F37-4661-B798-3B9D7959741F"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: GNU-compatible, BSD-licensed bc Date: Mon, 7 Jan 2019 20:05:33 +0100 In-Reply-To: Cc: freebsd-arch@freebsd.org To: Gavin Howard References: X-Mailer: Apple Mail (2.3445.102.3) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 19:05:36 -0000 --Apple-Mail=_39FB14BE-4F37-4661-B798-3B9D7959741F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 7 Jan 2019, at 19:35, Gavin Howard wrote: >=20 > I am the author of a GNU-compatible, BSD-licensed bc > (https://github.com/gavinhoward/bc). I noticed (on > https://wiki.freebsd.org/GPLinBase) that FreeBSD used to use the GNU > bc until it was taken out because of the GPL. My bc is not licensed > under the GPL; it is under the 0BSD license. Thus, I think my bc might > be a great fit for FreeBSD. >=20 > My bc is well-tested. I make sure that every single memory bug that I > can find is out before every single release. I also make sure that my > bc's math is correct by running millions of random math problems > before every release. >=20 > My bc is extremely portable; it easily builds on any POSIX > platform. And it includes a full dc as well (except for the "!" > command). >=20 > I would love to work with the core team to get my bc into FreeBSD, if > there is interest. I am about to do a release, and I am willing to > delay the release to get it up to par for FreeBSD. >=20 > Would there be interest? You are 9 years late. :-) = https://github.com/freebsd/freebsd/commit/bc4e1f6f87a770761be30eb708cbef88= bc4d9536 That said, are you aware of any great differences between your bc and the one originally from OpenBSD? -Dimitry --Apple-Mail=_39FB14BE-4F37-4661-B798-3B9D7959741F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXDOi/QAKCRCwXqMKLiCW oyy+AJwKqq05YcJtbXlgGbBaHj7bveC+wgCeKEye21ddMvRQucP8isWRKtNSEMs= =k2N8 -----END PGP SIGNATURE----- --Apple-Mail=_39FB14BE-4F37-4661-B798-3B9D7959741F-- From owner-freebsd-arch@freebsd.org Mon Jan 7 19:46:24 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7834B149D89D for ; Mon, 7 Jan 2019 19:46:24 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: from mail-vk1-xa44.google.com (mail-vk1-xa44.google.com [IPv6:2607:f8b0:4864:20::a44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E80475F7E; Mon, 7 Jan 2019 19:46:23 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: by mail-vk1-xa44.google.com with SMTP id y14so368540vkd.1; Mon, 07 Jan 2019 11:46:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8a5UVNbjbbCfQpXoK9lpPKfp79fISrPdNGtyhlunIoA=; b=eVr36dnSqi36D+/3wGpOmyNN0jiKnBQJqbQ2EXK2BN7zFmX0ajnW4u6j0NX6F+FTif wtVrRsAw2LCrxgTc5m0N+jmOR7xU0ubObdflIgoTpn8esE3hT9hzajfkJj00btevThDi paLe/bKPDHHJUJSrgZXPSNR5ztpUmnl8UOKCPzDGBSnjg7yRJ4H+L0nL4uwgxzu9YRtv fW6R9SZm2+qKdOvWTEGPsw8lmFSluBGZ0aVH6d869mr7Ur2UUWllILL54mDyTtgDiqCS 7YjMv53ze+E7D5s9Hky+O4P8Y8McahREcMHs7CrsYaGcZtdKOWT0SEP9lC6SpQ012zte 5CHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8a5UVNbjbbCfQpXoK9lpPKfp79fISrPdNGtyhlunIoA=; b=FIifIbAeoiR8FJRsRcSKZ1vPMLmeedQmdCkSUSGUBaoYPsZ9n6i8l+lmAdHzcjSWcT B9JZM0vFefmGPIrXgZMk3Q1FN+tqBC+Ht3xegKLJiooL4ci4mKHm4XtCjCv98iLBqEeP eRslaBZDvhRHflYPrar3Vosxq7inxfvueFkGxBx39vbCfhvGI7r+raSn73Jwh88fz9uZ 63DSMZcM9IpVcmEyAQUwOoTqr1N5mdwLjvfCaPWHa117S3aZBW4kaXAfG7enZAuhIqBd J6Wkv7HcL7fFoECM52jsiZp01mDuIRU/WDbW6qUFub1BrMX2i1lRMyKrZaPOjGmdiPmx MGtA== X-Gm-Message-State: AJcUukc5WexyoC/ujvZvfKxLW2sFMfn9DLbq/VO9ma5W7MiD2VhMFaz4 m7m7hx1oPussQTNOvdEHtE9+RgZe6H8EjL97kQ9jOOak X-Google-Smtp-Source: ALg8bN65KL6eoooV0RQl4x7a2QWFAZUovM8ircCufKlgcIG4EhgXaBOW6glDZO2CSk/H7soX6csLnpvMzmhgK3uYHfM= X-Received: by 2002:a1f:4d47:: with SMTP id a68mr22487673vkb.34.1546890382454; Mon, 07 Jan 2019 11:46:22 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Gavin Howard Date: Mon, 7 Jan 2019 12:45:46 -0700 Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: cem@freebsd.org Cc: Dimitry Andric , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 8E80475F7E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=eVr36dnS; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gavindhoward@gmail.com designates 2607:f8b0:4864:20::a44 as permitted sender) smtp.mailfrom=gavindhoward@gmail.com X-Spamd-Result: default: False [-2.60 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.950,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-0.22)[ip: (2.84), ipnet: 2607:f8b0::/32(-2.21), asn: 15169(-1.68), country: US(-0.08)]; NEURAL_SPAM_SHORT(0.58)[0.583,0]; RCVD_IN_DNSWL_NONE(0.00)[4.4.a.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 19:46:24 -0000 On Mon, Jan 7, 2019 at 11:06 AM Dimitry Andric wrote: > > On 7 Jan 2019, at 19:35, Gavin Howard wrote: > > > > I am the author of a GNU-compatible, BSD-licensed bc > > (https://github.com/gavinhoward/bc). I noticed (on > > https://wiki.freebsd.org/GPLinBase) that FreeBSD used to use the GNU > > bc until it was taken out because of the GPL. My bc is not licensed > > under the GPL; it is under the 0BSD license. Thus, I think my bc might > > be a great fit for FreeBSD. > > > > My bc is well-tested. I make sure that every single memory bug that I > > can find is out before every single release. I also make sure that my > > bc's math is correct by running millions of random math problems > > before every release. > > > > My bc is extremely portable; it easily builds on any POSIX > > platform. And it includes a full dc as well (except for the "!" > > command). > > > > I would love to work with the core team to get my bc into FreeBSD, if > > there is interest. I am about to do a release, and I am willing to > > delay the release to get it up to par for FreeBSD. > > > > Would there be interest? > > You are 9 years late. :-) > > https://github.com/freebsd/freebsd/commit/bc4e1f6f87a770761be30eb708cbef88bc4d9536 > > That said, are you aware of any great differences between your bc and > the one originally from OpenBSD? Yes. See below for the important one. The non-important ones include the fact that I support *every* GNU extension. That includes array references, void functions, the "halt" keyword, etc. On Mon, Jan 7, 2019 at 12:24 PM Conrad Meyer wrote: > > Thanks Gavin, > > I think this could be valuable for us. Our bc is not GNU-compatible > today and that causes some pain. > > For example, fusefs-lkl requires the gnubc port to build because the > base bc lacks some functionality that GNU has, and of course lkl uses > the gnu bc functionality. So a BSDL bc that is actually > GNU-compatible seems attractive to me. > > The script in question can be found here: > https://github.com/torvalds/linux/blob/master/kernel/time/timeconst.bc > and it is invoked like: "echo 100 | bc -q path/to/timeconst.bc". > > It can be reduced to the following short test case with the same invocation: > > a = read(); > print "a: ", a, "\n" > > In-tree BSD bc prints "dc: not a string" on stderr and with the > simplified test case, "a: 0\n100\n" on stdout. > > GNU bc prints "a: 100\n" on stdout, as expected. (I have not tried Gavin's bc.) > > Best, > Conrad My bc handles the Linux timeconst.bc script with aplomb from 0 to (at least) 1000. It is part of my test suite, actually. You can try it out by running the following command after building my bc (where BC_ROOT is the root directory of my bc): $ "$BC_ROOT/tests/bc/timeconst.sh" /location/of/timeconst.bc It won't have any output besides "Running timeconst.bc..." unless it didn't pass the test. Also, this bc builds out of the box on FreeBSD. I have already made sure of that. Just use: $ cd "$BC_ROOT" $ ./configure.sh -O3 $ make Gavin Howard From owner-freebsd-arch@freebsd.org Mon Jan 7 19:55:27 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB082149DD0A for ; Mon, 7 Jan 2019 19:55:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f179.google.com (mail-it1-f179.google.com [209.85.166.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C50876835; Mon, 7 Jan 2019 19:55:26 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f179.google.com with SMTP id b5so2851380iti.2; Mon, 07 Jan 2019 11:55:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=5p3xY3RaDyYdl5e9dvHcJy/y3tNX/aRT4eyyNi/5gn4=; b=kmTpxCjEG5d6rMyzhBX+Sen16xSprFAqCvVFQ5LVleiaCLXpiWIbuJf3LKQmig2Yer cZO8LWcA41Gg9k2ikSkuYBgM4DoOTQuIpcsgdsH4x6eW8NwxsZdA465NrYr6Bzwz39HN 6/ca8zCO7huPFe1wY1I6UaVA++CGuPBReXouwSF1wkhT8jcIuCVz3vNdUWynuB+gYrcc yeXV94sok781sggSgNC4+uU3cbRbg58p2/d6+dt2qUJi1RQo4J90t4/amt9HDAhnNcj/ UJ5lVm91zDDVIWIWTpPt+qHfb535c3KH9r7etSb1GXKqlBhTTMyAxOAi2QQ67zv3ipwz Tddw== X-Gm-Message-State: AJcUukc4fxT6KoBreYD7gmEDh5TVLjEGmCmj6HU5dP3P0OkD/urgiS6N El4naN2ZCtAmYVFxrfBPnvglVlDs X-Google-Smtp-Source: ALg8bN6JfRriNQ4i7BBVbaHNIxlU4xy4Xq7BaNVSSm6SqIh6SCcVikZnq2m43LKqhHFDmIcr7ytMhw== X-Received: by 2002:a24:bc1:: with SMTP id 184mr8605927itd.50.1546889082252; Mon, 07 Jan 2019 11:24:42 -0800 (PST) Received: from mail-it1-f176.google.com (mail-it1-f176.google.com. [209.85.166.176]) by smtp.gmail.com with ESMTPSA id v3sm12952433ioj.79.2019.01.07.11.24.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jan 2019 11:24:42 -0800 (PST) Received: by mail-it1-f176.google.com with SMTP id a6so2701849itl.4; Mon, 07 Jan 2019 11:24:42 -0800 (PST) X-Received: by 2002:a24:b64a:: with SMTP id d10mr8236473itj.149.1546889081847; Mon, 07 Jan 2019 11:24:41 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 7 Jan 2019 11:24:30 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: Dimitry Andric Cc: Gavin Howard , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 7C50876835 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; TAGGED_RCPT(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 19:55:27 -0000 Thanks Gavin, I think this could be valuable for us. Our bc is not GNU-compatible today and that causes some pain. For example, fusefs-lkl requires the gnubc port to build because the base bc lacks some functionality that GNU has, and of course lkl uses the gnu bc functionality. So a BSDL bc that is actually GNU-compatible seems attractive to me. The script in question can be found here: https://github.com/torvalds/linux/blob/master/kernel/time/timeconst.bc and it is invoked like: "echo 100 | bc -q path/to/timeconst.bc". It can be reduced to the following short test case with the same invocation: a = read(); print "a: ", a, "\n" In-tree BSD bc prints "dc: not a string" on stderr and with the simplified test case, "a: 0\n100\n" on stdout. GNU bc prints "a: 100\n" on stdout, as expected. (I have not tried Gavin's bc.) Best, Conrad On Mon, Jan 7, 2019 at 11:06 AM Dimitry Andric wrote: > > On 7 Jan 2019, at 19:35, Gavin Howard wrote: > > > > I am the author of a GNU-compatible, BSD-licensed bc > > (https://github.com/gavinhoward/bc). I noticed (on > > https://wiki.freebsd.org/GPLinBase) that FreeBSD used to use the GNU > > bc until it was taken out because of the GPL. My bc is not licensed > > under the GPL; it is under the 0BSD license. Thus, I think my bc might > > be a great fit for FreeBSD. > > > > My bc is well-tested. I make sure that every single memory bug that I > > can find is out before every single release. I also make sure that my > > bc's math is correct by running millions of random math problems > > before every release. > > > > My bc is extremely portable; it easily builds on any POSIX > > platform. And it includes a full dc as well (except for the "!" > > command). > > > > I would love to work with the core team to get my bc into FreeBSD, if > > there is interest. I am about to do a release, and I am willing to > > delay the release to get it up to par for FreeBSD. > > > > Would there be interest? > > You are 9 years late. :-) > > https://github.com/freebsd/freebsd/commit/bc4e1f6f87a770761be30eb708cbef88bc4d9536 > > That said, are you aware of any great differences between your bc and > the one originally from OpenBSD? > > -Dimitry > From owner-freebsd-arch@freebsd.org Mon Jan 7 21:16:54 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CF59149FC8B for ; Mon, 7 Jan 2019 21:16:54 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com [209.85.166.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BE0E818FF; Mon, 7 Jan 2019 21:16:53 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f52.google.com with SMTP id k2so1496770iog.7; Mon, 07 Jan 2019 13:16:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=0m1JSu8H5qJ6JW02NmNwZ0MZvvFYb8ygs31D6mGZydg=; b=IBTj6SH0o6AJ49n+KheAmRB/Z/A5TFa86CL1MYnoTTAFNq+Gp5LM37GstALq8ULch7 OcCPp/wnUJSwZW2Ar/72TYsMadN/nHmmIVEDyKluuPaCaMNtds7ym6BBBloO7etylLaV A34HUcInviOWzmAMsAvQsTFe587C2dmvf3iO0PbP/T6NSnPhCuGG40wpT4EPtHjJzv2n OIVLgckPuYatoL9oyt+921ZOGuSXNNwHI3GLs8JgEJQ9oz15R8aRYMyRP3yWseYW9Oj5 C3QsFGaYB0mF9YlrDVQ5fL5fs74oY02yXIM3ncVYlnC0KJ8hFrHsZn463ITNBTyipCS9 YYSQ== X-Gm-Message-State: AJcUukeZhJgUodCdOGMRr2tI2G8AGb3AzzLedGJCI3rmOmH/9RVUSAQ3 7GxKpz02DUiguj76QyZFVr9cwGyp X-Google-Smtp-Source: ALg8bN7li+weLljwl0u8Vw2IdlbfHAxVamZvotU7s/XuD9XfcY2KoM8VOW0UXu/EdzPCNfRHDBsJoA== X-Received: by 2002:a6b:c892:: with SMTP id y140mr41564238iof.192.1546895445406; Mon, 07 Jan 2019 13:10:45 -0800 (PST) Received: from mail-it1-f181.google.com (mail-it1-f181.google.com. [209.85.166.181]) by smtp.gmail.com with ESMTPSA id e22sm8727950iol.49.2019.01.07.13.10.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jan 2019 13:10:45 -0800 (PST) Received: by mail-it1-f181.google.com with SMTP id g85so3284917ita.3; Mon, 07 Jan 2019 13:10:45 -0800 (PST) X-Received: by 2002:a24:5411:: with SMTP id t17mr7880233ita.32.1546895444984; Mon, 07 Jan 2019 13:10:44 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 7 Jan 2019 13:10:34 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: Gavin Howard Cc: Dimitry Andric , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 8BE0E818FF X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.166.52 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-5.46 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.72)[-0.717,0]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[52.166.85.209.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.74)[ip: (-8.17), ipnet: 209.85.128.0/17(-3.76), asn: 15169(-1.68), country: US(-0.08)] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 21:16:54 -0000 On Mon, Jan 7, 2019 at 11:46 AM Gavin Howard wrote: > > On Mon, Jan 7, 2019 at 11:06 AM Dimitry Andric wrote: > > That said, are you aware of any great differences between your bc and > > the one originally from OpenBSD? > > Yes. See below for the important one. > > The non-important ones include the fact that I support *every* GNU > extension. That includes array references, void functions, the "halt" > keyword, etc. > >... > > My bc handles the Linux timeconst.bc script with aplomb from 0 to (at > least) 1000. It is part of my test suite, actually. > > You can try it out by running the following command after building my > bc (where BC_ROOT is the root directory of my bc): > > $ "$BC_ROOT/tests/bc/timeconst.sh" /location/of/timeconst.bc > > It won't have any output besides "Running timeconst.bc..." unless it > didn't pass the test. > > Also, this bc builds out of the box on FreeBSD. I have already made > sure of that. Just use: > > $ cd "$BC_ROOT" > $ ./configure.sh -O3 > $ make Gavin, This all sounds great to me. Consider me on-board with the idea. Thanks, Conrad From owner-freebsd-arch@freebsd.org Mon Jan 7 22:06:18 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FD9814A1395 for ; Mon, 7 Jan 2019 22:06:18 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout08.t-online.de (mailout08.t-online.de [194.25.134.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79B5783909; Mon, 7 Jan 2019 22:06:17 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd09.aul.t-online.de (fwd09.aul.t-online.de [172.20.27.151]) by mailout08.t-online.de (Postfix) with SMTP id F367C41B69B3; Mon, 7 Jan 2019 23:06:07 +0100 (CET) Received: from Stefans-MBP-WLAN.fritz.box (TQJ3-TZCrh3KxeFTYgbJ+mxcJdGmJXLA2icNKoLd49AZ5jdArHqlImXb62NrqT4Q1u@[93.200.55.94]) by fwd09.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1ggd27-1S3n720; Mon, 7 Jan 2019 23:06:07 +0100 Subject: Re: GNU-compatible, BSD-licensed bc To: Gavin Howard , cem@freebsd.org Cc: Dimitry Andric , "freebsd-arch@freebsd.org" References: From: Stefan Esser Openpgp: preference=signencrypt Autocrypt: addr=se@freebsd.org; prefer-encrypt=mutual; keydata= mQENBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAG0J1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPokBVAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+q BQkLJQETAAoJEEfrte9a/fVEOeMH/icmdK1eZQvB3U8quJo9VMaZsaTuCMbUE4NThyfsIvIm MCd+rb/yULmMYwqNfjyKB1x4ikR4x+94l+yJoz7K0Usks+eNKDmMGJM6pWWssTigaJubFdVd hVVC+C1QJi7JshYSib08uONoPmO4lv5Az0TDYGtsMzsES2sIlc62c9go5WPGYhQFRbX3Lk6y V6m8OHh+G9XGSj3oPO4UteRwu+SzTdOLunZBWG1wu34+IeZm663D+2gOppQLWpLa2qaTerqw THu377ayZ2B2LPJ5JkvkZeHYPkwDQ+b5PGn0UhfkxPnDVYki5F7qKxvQ5uq1/q9YaCX7mmOl H2yO7tgVsrW5AQ0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAYkBPAQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+rBQkL JQEZAAoJEEfrte9a/fVEuesH/2DNxGWnHvWwMyiyhlQtafvDKwEn/wAgR8gHJFodB7emf8rA TnukH7MVttCoHtjN5lvv9RSBHjNTZls5wR/ANlwdRuPQHd8ZGxLe3S6IuUB3zDSwFltLGurO N2kOMhs5mTGyypSa+uw3rtQbUAVYf1oPbiR4FLtiM8FLyEvE95hX5fPq9Qvx9FmN79kmCIEw jDKPqDaUf/OR2fEF0LSIbXHEk4tNqCEwx5DIJ0fp5/z5UzICUAmwxyRs5O/Hre1jzPsMVyud Ml9t7UTOJGKVWwRory1PMnOFxN+iz5/d4FhYSKXF7kfMiFgol4LuWaxJRwbBrr71VGBrRy2a L1nw6Bc= Message-ID: <1e025f53-fc5e-5b1e-013d-ab9330a0e9db@freebsd.org> Date: Mon, 7 Jan 2019 23:06:06 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ID: TQJ3-TZCrh3KxeFTYgbJ+mxcJdGmJXLA2icNKoLd49AZ5jdArHqlImXb62NrqT4Q1u X-TOI-MSGID: 72f13d6a-e61b-4f11-9fa2-cf6c7692ff2b X-Rspamd-Queue-Id: 79B5783909 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-0.996,0]; TAGGED_RCPT(0.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:3320, ipnet:194.25.0.0/16, country:DE] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 22:06:18 -0000 Am 07.01.19 um 20:45 schrieb Gavin Howard: > On Mon, Jan 7, 2019 at 11:06 AM Dimitry Andric wrote: >> >> On 7 Jan 2019, at 19:35, Gavin Howard wrote: >>> >>> I am the author of a GNU-compatible, BSD-licensed bc >>> (https://github.com/gavinhoward/bc). I noticed (on >>> https://wiki.freebsd.org/GPLinBase) that FreeBSD used to use the GNU >>> bc until it was taken out because of the GPL. My bc is not licensed >>> under the GPL; it is under the 0BSD license. Thus, I think my bc might >>> be a great fit for FreeBSD. >>> >>> My bc is well-tested. I make sure that every single memory bug that I >>> can find is out before every single release. I also make sure that my >>> bc's math is correct by running millions of random math problems >>> before every release. >>> >>> My bc is extremely portable; it easily builds on any POSIX >>> platform. And it includes a full dc as well (except for the "!" >>> command). >>> >>> I would love to work with the core team to get my bc into FreeBSD, if >>> there is interest. I am about to do a release, and I am willing to >>> delay the release to get it up to par for FreeBSD. >>> >>> Would there be interest? >> >> You are 9 years late. :-) >> >> https://github.com/freebsd/freebsd/commit/bc4e1f6f87a770761be30eb708cbef88bc4d9536 >> >> That said, are you aware of any great differences between your bc and >> the one originally from OpenBSD? > > Yes. See below for the important one. > > The non-important ones include the fact that I support *every* GNU > extension. That includes array references, void functions, the "halt" > keyword, etc. > > On Mon, Jan 7, 2019 at 12:24 PM Conrad Meyer wrote: >> >> Thanks Gavin, >> >> I think this could be valuable for us. Our bc is not GNU-compatible >> today and that causes some pain. >> >> For example, fusefs-lkl requires the gnubc port to build because the >> base bc lacks some functionality that GNU has, and of course lkl uses >> the gnu bc functionality. So a BSDL bc that is actually >> GNU-compatible seems attractive to me. >> >> The script in question can be found here: >> https://github.com/torvalds/linux/blob/master/kernel/time/timeconst.bc >> and it is invoked like: "echo 100 | bc -q path/to/timeconst.bc". >> >> It can be reduced to the following short test case with the same invocation: >> >> a = read(); >> print "a: ", a, "\n" >> >> In-tree BSD bc prints "dc: not a string" on stderr and with the >> simplified test case, "a: 0\n100\n" on stdout. >> >> GNU bc prints "a: 100\n" on stdout, as expected. (I have not tried Gavin's bc.) >> >> Best, >> Conrad > > My bc handles the Linux timeconst.bc script with aplomb from 0 to (at > least) 1000. It is part of my test suite, actually. > > You can try it out by running the following command after building my > bc (where BC_ROOT is the root directory of my bc): > > $ "$BC_ROOT/tests/bc/timeconst.sh" /location/of/timeconst.bc > > It won't have any output besides "Running timeconst.bc..." unless it > didn't pass the test. > > Also, this bc builds out of the box on FreeBSD. I have already made > sure of that. Just use: > > $ cd "$BC_ROOT" > $ ./configure.sh -O3 > $ make To be able to provide binary packages we'd need this "bc" in ports. Creating a port should be very simple and I'd be willing to work on getting a port committed tomorrow. Ports that currently depend on GNU bc from ports could be converted to use this version instead. Even if it was imported into base today, there'd be supported releases without that bc version for quite some time to come. A simple port Makefile that works for me is: # $FreeBSD$ PORTNAME= gh-bc PORTVERSION= 1.0 CATEGORIES= math MAINTAINER= se@FreeBSD.org COMMENT= GNU compatible bc/dc calculator LICENSE= BSD LICENSE_FILE= ${WRKSRC}/LICENSE.md USES= gmake USE_GITHUB= yes GH_ACCOUNT= gavinhoward GH_PROJECT= bc PLIST_FILES= bin/bc bin/dc do-install: ${INSTALL_PROGRAM} ${WRKSRC}/bin/bc ${STAGEDIR}${PREFIX}/bin/ ${LN} ${STAGEDIR}${PREFIX}/bin/bc ${STAGEDIR}${PREFIX}/bin/dc .include It could probably made to not require GNU make, but I did not bother to try this for this quickly written port Makefile. There are 2 open points: 1) There is no 0BSD license - I have set the license name to BSD and the LICENSE.md file is included in the package, but I do not think that this is completely right. 2) I have used the release tag 1.0, which does not include the latest changes committed to Github. If the port should actually be based on a later code base, a new release tag would be beneficial. To distinguish this port from other bc implementations I'd suggest to name it "math/gh-bc" ... Regards, STefan From owner-freebsd-arch@freebsd.org Mon Jan 7 22:25:48 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BA1614A18DA for ; Mon, 7 Jan 2019 22:25:48 +0000 (UTC) (envelope-from AWilcox@Wilcox-Tech.com) Received: from mail.wilcox-tech.com (mail.wilcox-tech.com [45.32.83.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.wilcox-tech.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69124842E5 for ; Mon, 7 Jan 2019 22:25:37 +0000 (UTC) (envelope-from AWilcox@Wilcox-Tech.com) Received: (qmail 6340 invoked from network); 7 Jan 2019 22:18:52 -0000 Received: from localhost (HELO ?IPv6:2600:1702:2a80:1b90::41?) (awilcox@wilcox-tech.com@127.0.0.1) by localhost with ESMTPA; 7 Jan 2019 22:18:52 -0000 Subject: Re: GNU-compatible, BSD-licensed bc To: freebsd-arch@freebsd.org References: From: "A. Wilcox" Openpgp: preference=signencrypt Message-ID: <9e103bf2-297d-9e00-f1f4-486894c9d794@Wilcox-Tech.com> Date: Mon, 7 Jan 2019 16:20:41 -0600 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3T20LCifDkSWP6rToRg6NVvJaty1jx7Fq" X-Rspamd-Queue-Id: 69124842E5 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dmarc=pass (policy=none) header.from=Wilcox-Tech.com; spf=pass (mx1.freebsd.org: domain of AWilcox@Wilcox-Tech.com designates 45.32.83.9 as permitted sender) smtp.mailfrom=AWilcox@Wilcox-Tech.com X-Spamd-Result: default: False [-5.55 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_ATTACHMENT(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(0.25)[asn: 20473(1.34), country: US(-0.08)]; MX_GOOD(-0.01)[mail.Wilcox-Tech.com,tarbaby.junkemailfilter.com,mail.Wilcox-Tech.com,tarbaby.junkemailfilter.com,mail.Wilcox-Tech.com,tarbaby.junkemailfilter.com,mail.Wilcox-Tech.com,tarbaby.junkemailfilter.com,mail.Wilcox-Tech.com,tarbaby.junkemailfilter.com,mail.Wilcox-Tech.com,tarbaby.junkemailfilter.com,mail.Wilcox-Tech.com,tarbaby.junkemailfilter.com,mail.Wilcox-Tech.com,tarbaby.junkemailfilter.com]; DMARC_POLICY_ALLOW(-0.50)[Wilcox-Tech.com,none]; NEURAL_HAM_SHORT(-0.90)[-0.895,0]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+]; ASN(0.00)[asn:20473, ipnet:45.32.64.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 22:25:48 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3T20LCifDkSWP6rToRg6NVvJaty1jx7Fq Content-Type: multipart/mixed; boundary="FNTGHAsfhZCyEbsflXUsSTd1HXE3P2LXb"; protected-headers="v1" From: "A. Wilcox" To: freebsd-arch@freebsd.org Message-ID: <9e103bf2-297d-9e00-f1f4-486894c9d794@Wilcox-Tech.com> Subject: Re: GNU-compatible, BSD-licensed bc References: In-Reply-To: --FNTGHAsfhZCyEbsflXUsSTd1HXE3P2LXb Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 01/07/19 15:10, Conrad Meyer wrote: > On Mon, Jan 7, 2019 at 11:46 AM Gavin Howard = wrote: >> The non-important ones include the fact that I support *every* GNU >> extension. That includes array references, void functions, the "halt" >> keyword, etc. >> >> My bc handles the Linux timeconst.bc script with aplomb from 0 to (at >> least) 1000. It is part of my test suite, actually. >> >> You can try it out by running the following command after building my >> bc (where BC_ROOT is the root directory of my bc): >> >> $ "$BC_ROOT/tests/bc/timeconst.sh" /location/of/timeconst.bc >> >> It won't have any output besides "Running timeconst.bc..." unless it >> didn't pass the test. >> >> Also, this bc builds out of the box on FreeBSD. I have already made >> sure of that. Just use: >> >> $ cd "$BC_ROOT" >> $ ./configure.sh -O3 >> $ make >=20 > Gavin, >=20 > This all sounds great to me. Consider me on-board with the idea. >=20 > Thanks, > Conrad If it means anything, we're using it as our sole bc(1) implementation in Ad=C3=A9lie Linux. No issues or complaints from here; it works flawlessl= y. Best, --arw --=20 A. Wilcox (awilfox) Open-source programmer (C, C++, more) https://ko-fi.com/K3K8MQZJ --FNTGHAsfhZCyEbsflXUsSTd1HXE3P2LXb-- --3T20LCifDkSWP6rToRg6NVvJaty1jx7Fq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjNyWOYPU1SaTSMHHyynLUZIrnRQFAlwz0LkACgkQyynLUZIr nRT08A/+KCJrw6Bv3gCxnt2jfPsqD1WyLUUa42OblGphmX6Hr5EfemqScLYM3eFw vSPRfNhw4wQ9yMAGwXI3WXvKReORqPfBQoMAergFOIGc5pCLUXaFolwZUyvQHr9F zYfyAD+a8kGadaG3KB53hNXQA5KxxdvLrAs6Q67BpXhFJAjAxo/U/bOrfTd8RUS5 Rh8qu4S/XrkVd2+iHkYgjyJ84etTlP2fM813jUMsp2v5StyPkNYin6WrFhNVHmXz OxKQzNMRqpTorx+pIxjshXr5IHBOEyEaTR9h75Vs9qx9D82Yo+9pD5GptXKUb+bg j+ueA0+san+BRhcMULq91FJECISaxHvDeHEwK8NVtRgHX8uf+y0PIkFWdzUEeqHA gRb5bQZWltIfogC7vPI9nBbmalBnJQf8HdXJ6MDuM7rMwO6dkuBBY0SFMVrbfFbL BIXo0Q0BvI6e1LO0FBqO70bkBd90IFKpx1sm5MW6R5NqnsSNt+/XiyeGvKEQwxH3 3zbucaAMRrBBfWzaZhvCXzdnzcYMQiFXtc2x2v2fF5IlVNN019ZDNmbJBnHPFZQ8 Gg1C8gdIEdeRCxSERiq3Ttsg757v8q4u90rYuUGXoWF7lMI5uuEkmEcHeFSuALkt TfeGhkW6w+5si1QSPqmIUlz+S4Oibs761rQprJQWvAKLn1NIufo= =Vf9R -----END PGP SIGNATURE----- --3T20LCifDkSWP6rToRg6NVvJaty1jx7Fq-- From owner-freebsd-arch@freebsd.org Mon Jan 7 23:59:38 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C2A314813F8 for ; Mon, 7 Jan 2019 23:59:38 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D1D5877F5; Mon, 7 Jan 2019 23:59:37 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=56358 helo=[10.1.7.18]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ggenp-0000hJ-Ho; Mon, 07 Jan 2019 15:59:29 -0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: GNU-compatible, BSD-licensed bc From: Devin Teske In-Reply-To: Date: Mon, 7 Jan 2019 15:59:28 -0800 Cc: Devin Teske , freebsd-arch@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> References: To: Gavin Howard X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: 1D1D5877F5 X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.48 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MX_GOOD(-0.01)[mail.shxd.cx]; FORGED_SENDER(0.30)[dteske@FreeBSD.org,devin@shxd.cx]; FREEMAIL_TO(0.00)[gmail.com]; IP_SCORE(0.25)[ip: (0.69), ipnet: 64.201.240.0/20(0.34), asn: 36734(0.27), country: US(-0.08)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:36734, ipnet:64.201.240.0/20, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[dteske@FreeBSD.org,devin@shxd.cx]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.96)[0.958,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.59)[0.586,0]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.997,0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 23:59:38 -0000 > On Jan 7, 2019, at 10:35 AM, Gavin Howard = wrote: >=20 > Hello, >=20 > I am the author of a GNU-compatible, BSD-licensed bc > (https://github.com/gavinhoward/bc). I noticed (on > https://wiki.freebsd.org/GPLinBase) that FreeBSD used to use the GNU > bc until it was taken out because of the GPL. My bc is not licensed > under the GPL; it is under the 0BSD license. Thus, I think my bc might > be a great fit for FreeBSD. >=20 > My bc is well-tested. I make sure that every single memory bug that I > can find is out before every single release. I also make sure that my > bc's math is correct by running millions of random math problems > before every release. >=20 > My bc is extremely portable; it easily builds on any POSIX > platform. And it includes a full dc as well (except for the "!" > command). >=20 > I would love to work with the core team to get my bc into FreeBSD, if > there is interest. I am about to do a release, and I am willing to > delay the release to get it up to par for FreeBSD. >=20 > Would there be interest? >=20 I quickly glanced at the Makefile.in and configure.sh and didn't see any = mention of crypto/ssl, hoping you had support for OpenSSL BIGNUM(3). How do you handle arbitrary arithmetic precision? --=20 Devin From owner-freebsd-arch@freebsd.org Tue Jan 8 00:37:53 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A465814827C8 for ; Tue, 8 Jan 2019 00:37:53 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f180.google.com (mail-it1-f180.google.com [209.85.166.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 734B089618; Tue, 8 Jan 2019 00:37:52 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f180.google.com with SMTP id h65so3811512ith.3; Mon, 07 Jan 2019 16:37:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=qKLFZPmETkQXETE6O9m/XoACaraMdoSr+rtYtmWAzLQ=; b=pXInKwf7P4odKHY8jyAqXQXmeVQFYeqmmkZIcUs8/dmmPiiuwUH1TUPWZiMlgAVR2w yWcXST/7/PWt0AfwniUF8PrJHqnoL4oRlq9lXUK4b4V3auXn9tP3uwCSu5O8iT7XexLD oggtr+gnswVtWESUS35IbXthk1rBJzPtTdKX6qdbcckcELeKWf1wL+EoDBLC7ST2QVdI e2MyLc/eNOVDiM5l2aTZiinLjpauV2L0Ngpx8v2qlYY0RYSatSFDrI9wdK1V933tiNhu j9otYZkLtf5sRJ/i8+mcK3F1lsHWZR1nH4v/Ekini8uDPLEiYoRcHUDCTniPmo68TMhq pTfw== X-Gm-Message-State: AA+aEWZ6ZXK4TgfuKGNG0Z7M1oLS8MOAUiBNQE/VUUAzNBk/aMq7yBwl C6jUxPnvpYcISeMVbNNzwx3ZqrVH X-Google-Smtp-Source: AFSGD/XkE4pzZLhcdCPKCt01ys02NDJ6IDMNCekX2n0TAFKyWw8ZlP5waaV5kKW+ICafaAxghnU4aw== X-Received: by 2002:a02:a397:: with SMTP id y23mr44300539jak.9.1546907866039; Mon, 07 Jan 2019 16:37:46 -0800 (PST) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com. [209.85.166.43]) by smtp.gmail.com with ESMTPSA id j129sm5178209itb.41.2019.01.07.16.37.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jan 2019 16:37:45 -0800 (PST) Received: by mail-io1-f43.google.com with SMTP id k2so1847033iog.7; Mon, 07 Jan 2019 16:37:45 -0800 (PST) X-Received: by 2002:a6b:ee16:: with SMTP id i22mr42555216ioh.124.1546907865593; Mon, 07 Jan 2019 16:37:45 -0800 (PST) MIME-Version: 1.0 References: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> In-Reply-To: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 7 Jan 2019 16:37:34 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: Devin Teske Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 734B089618 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.166.180 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-5.84 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.99)[-0.990,0]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[180.166.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.84)[ip: (-8.68), ipnet: 209.85.128.0/17(-3.75), asn: 15169(-1.68), country: US(-0.08)] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 00:37:53 -0000 On Mon, Jan 7, 2019 at 4:00 PM Devin Teske wrote: > How do you handle arbitrary arithmetic precision? Looks like https://github.com/gavinhoward/bc/blob/master/src/num.c . From owner-freebsd-arch@freebsd.org Tue Jan 8 00:42:59 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B03B71482A91 for ; Tue, 8 Jan 2019 00:42:59 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: from mail-vk1-xa44.google.com (mail-vk1-xa44.google.com [IPv6:2607:f8b0:4864:20::a44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D716689A6E; Tue, 8 Jan 2019 00:42:58 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: by mail-vk1-xa44.google.com with SMTP id o130so509202vke.10; Mon, 07 Jan 2019 16:42:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ApCutLvBUBOS4wfJ/cQa0cDCRBsEfUyw43hcdquPljk=; b=r4/lTD69KjgmESKwbrb5jUdkjluf+1mIs0zaZ22m4POKm5byI5yFWgq8WFCr0h9wHh BxALVQ4RQI4qCWqCfvP8G0sKy/NPoEAcRpoXFR5SyjIwEbY/QyisqyDrwtLdf2OFJoP4 buHsIIs2RRWN956G6H5lIQyMfvfy50jlb3W5yNTQcxXWL/xgzzPBRIa72LxvgtgaWMX8 MPK5uSIIPUYDhRvFMRadxrGjsYJEHpGdcCYDwv1oHPWEP/CWQsntfM9oqX+GSCnFYsak 211UUz0pRfnJbrvkbteUFdFQHUe/9W3yfWIytQDUZfZE0sLzkoJ3jvPwCOB0FpRTmD8Y slMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ApCutLvBUBOS4wfJ/cQa0cDCRBsEfUyw43hcdquPljk=; b=ANktPllQht7mt+Iu9lYeo6vOfKRJg1Ux7uxznJWHoXumnGFLKk5flbX/V/LbF40BXl CEkrwhWwb6BawzD9f72YBNZTrJ4Bhb1Z2bC51i0F/B1EuNHJiPMxCntFFo02Nmwce51+ adnqoruXrysJMoPRyezV4UuRUKndKGFYU/3M04xvS45QqS0vXCGWVPx/HQ/4+6nnkrqW 4Hh7iphgecs+xYYnJ9Xu7c20c00xusJKU0wDgWacDwfSnc7saOJbYfB6yJzH049ghLOl /yL66fLl/am24pNOtqTFTmRyza+jEYHcphdfVr23OtOTlNC01CeATX2rNgsNfftqfcsL 5UUA== X-Gm-Message-State: AJcUukd8PobHS/DkREDyTN2ozmfxEEbBBRJMW0NthELuclEPrqsyA24L GWbrNvfmicrXelRmsT90Ri9xy3VoJZP4YZJPqPLRiQ== X-Google-Smtp-Source: ALg8bN6HPnY8SR0kUQovHMIZGFvmcULfj5k7Xnax9to8jiyanR1cs9E/4XnD1uQOiP99nZkc9NcUXiEQsZlR+qoIG5c= X-Received: by 2002:a1f:5f55:: with SMTP id t82mr22934681vkb.60.1546908178055; Mon, 07 Jan 2019 16:42:58 -0800 (PST) MIME-Version: 1.0 References: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> In-Reply-To: From: Gavin Howard Date: Mon, 7 Jan 2019 17:42:21 -0700 Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: cem@freebsd.org Cc: Devin Teske , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: D716689A6E X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=r4/lTD69; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gavindhoward@gmail.com designates 2607:f8b0:4864:20::a44 as permitted sender) smtp.mailfrom=gavindhoward@gmail.com X-Spamd-Result: default: False [-4.09 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.75)[-0.752,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-0.34)[ip: (2.28), ipnet: 2607:f8b0::/32(-2.21), asn: 15169(-1.68), country: US(-0.08)]; RCVD_IN_DNSWL_NONE(0.00)[4.4.a.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 00:43:00 -0000 On Mon, Jan 7, 2019 at 5:38 PM Conrad Meyer wrote: > > On Mon, Jan 7, 2019 at 4:00 PM Devin Teske wrote: > > How do you handle arbitrary arithmetic precision? > > Looks like https://github.com/gavinhoward/bc/blob/master/src/num.c . That is correct. Because this bc is meant to help bootstrap the Linux kernel and have no dependencies other than POSIX 2008, I wrote my own. Also, the POSIX bc standard mandates doing math in decimal. OpenSSL would not be smart if they did that. There are also a few peculiarities with the POSIX bc standard that (more or less) require a standalone implementation. Also, right now I am working on getting a release candidate out that will enable me to make a quick port that Stefan could use as a jumping off point. My build system changed between 1.0 and now, and I would like to be able to test it. Gavin Howard From owner-freebsd-arch@freebsd.org Tue Jan 8 00:59:10 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 274321482D11 for ; Tue, 8 Jan 2019 00:59:10 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f195.google.com (mail-it1-f195.google.com [209.85.166.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A336F89EC0; Tue, 8 Jan 2019 00:59:08 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f195.google.com with SMTP id g76so3992330itg.2; Mon, 07 Jan 2019 16:59:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=nVorF6BUA6BBFUaqSK89SvpmSkV8W6v/IoGP0NSUeHA=; b=L0SVgcyzKycFKRJAyPkLFNJUPc9rGEl9d8HlqtEAxT+4uvGHWhPXvmfm5J5SvaSpfd /wy04eG21NIPn0K6zgssdjNGM3tFZRv+TxKeXZpm0W1ofDzfudbYziV5en3otv/oERLR MROamsL/tyiKLLReZKZBVXVxZn0OOEfqefouNqJC7qJzgvVDmDuLcOCXV5rRCGbcP2wK qxLIzsUe7XX1qtmoEnYQKTsbaAKbhLLYTpk2Dza+Ilk1e9GiG7Mh/mP8WHVACmTzsYXY zh5no9/5F6RvUe3GHOImrtnLfTwbyEcYpvmX7RbNJEgZTspt0BPX49O3/igzwSSpMGay 2nOw== X-Gm-Message-State: AJcUukcUjqOdAqMxGlCVZbUilBTjV5u/Itpx/ZC7/98GszWq/PcO/6fe BKgM/jJytDH6sYIQBtIUkigX1knZ X-Google-Smtp-Source: ALg8bN6yP4+dvgEC2VDjhYcu8a6LWXvYl4WnKupldG0iJ1KrorEKA365XALZgiU+LUEslF+Y4OC82A== X-Received: by 2002:a24:b34f:: with SMTP id z15mr19959iti.61.1546907487865; Mon, 07 Jan 2019 16:31:27 -0800 (PST) Received: from mail-it1-f177.google.com (mail-it1-f177.google.com. [209.85.166.177]) by smtp.gmail.com with ESMTPSA id q197sm5029538itb.22.2019.01.07.16.31.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jan 2019 16:31:27 -0800 (PST) Received: by mail-it1-f177.google.com with SMTP id h193so3785108ita.5; Mon, 07 Jan 2019 16:31:27 -0800 (PST) X-Received: by 2002:a24:b64a:: with SMTP id d10mr12036itj.149.1546907487041; Mon, 07 Jan 2019 16:31:27 -0800 (PST) MIME-Version: 1.0 References: <1e025f53-fc5e-5b1e-013d-ab9330a0e9db@freebsd.org> In-Reply-To: <1e025f53-fc5e-5b1e-013d-ab9330a0e9db@freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 7 Jan 2019 16:31:16 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: Stefan Esser Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: A336F89EC0 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.166.195 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.88)[-0.885,0]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[195.166.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.10)[ipnet: 209.85.128.0/17(-3.75), asn: 15169(-1.68), country: US(-0.08)]; RWL_MAILSPIKE_POSSIBLE(0.00)[195.166.85.209.rep.mailspike.net : 127.0.0.17] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 00:59:10 -0000 Hi Stefan, I don't think there's any reason to put this in ports instead of base. If you're arguing that we shouldn't ship any bc in base, that's a fine argument to make, but it's off-topic for this discussion. If at some point after that you want to remove bc from base and fix all of the fallout of that much larger change, you are welcome to take on that (much larger) project. Best, Conrad On Mon, Jan 7, 2019 at 2:06 PM Stefan Esser wrote: > > Am 07.01.19 um 20:45 schrieb Gavin Howard: > > On Mon, Jan 7, 2019 at 11:06 AM Dimitry Andric wrote: > >> > >> On 7 Jan 2019, at 19:35, Gavin Howard wrote: > >>> > >>> I am the author of a GNU-compatible, BSD-licensed bc > >>> (https://github.com/gavinhoward/bc). I noticed (on > >>> https://wiki.freebsd.org/GPLinBase) that FreeBSD used to use the GNU > >>> bc until it was taken out because of the GPL. My bc is not licensed > >>> under the GPL; it is under the 0BSD license. Thus, I think my bc might > >>> be a great fit for FreeBSD. > >>> > >>> My bc is well-tested. I make sure that every single memory bug that I > >>> can find is out before every single release. I also make sure that my > >>> bc's math is correct by running millions of random math problems > >>> before every release. > >>> > >>> My bc is extremely portable; it easily builds on any POSIX > >>> platform. And it includes a full dc as well (except for the "!" > >>> command). > >>> > >>> I would love to work with the core team to get my bc into FreeBSD, if > >>> there is interest. I am about to do a release, and I am willing to > >>> delay the release to get it up to par for FreeBSD. > >>> > >>> Would there be interest? > >> > >> You are 9 years late. :-) > >> > >> https://github.com/freebsd/freebsd/commit/bc4e1f6f87a770761be30eb708cbef88bc4d9536 > >> > >> That said, are you aware of any great differences between your bc and > >> the one originally from OpenBSD? > > > > Yes. See below for the important one. > > > > The non-important ones include the fact that I support *every* GNU > > extension. That includes array references, void functions, the "halt" > > keyword, etc. > > > > On Mon, Jan 7, 2019 at 12:24 PM Conrad Meyer wrote: > >> > >> Thanks Gavin, > >> > >> I think this could be valuable for us. Our bc is not GNU-compatible > >> today and that causes some pain. > >> > >> For example, fusefs-lkl requires the gnubc port to build because the > >> base bc lacks some functionality that GNU has, and of course lkl uses > >> the gnu bc functionality. So a BSDL bc that is actually > >> GNU-compatible seems attractive to me. > >> > >> The script in question can be found here: > >> https://github.com/torvalds/linux/blob/master/kernel/time/timeconst.bc > >> and it is invoked like: "echo 100 | bc -q path/to/timeconst.bc". > >> > >> It can be reduced to the following short test case with the same invocation: > >> > >> a = read(); > >> print "a: ", a, "\n" > >> > >> In-tree BSD bc prints "dc: not a string" on stderr and with the > >> simplified test case, "a: 0\n100\n" on stdout. > >> > >> GNU bc prints "a: 100\n" on stdout, as expected. (I have not tried Gavin's bc.) > >> > >> Best, > >> Conrad > > > > My bc handles the Linux timeconst.bc script with aplomb from 0 to (at > > least) 1000. It is part of my test suite, actually. > > > > You can try it out by running the following command after building my > > bc (where BC_ROOT is the root directory of my bc): > > > > $ "$BC_ROOT/tests/bc/timeconst.sh" /location/of/timeconst.bc > > > > It won't have any output besides "Running timeconst.bc..." unless it > > didn't pass the test. > > > > Also, this bc builds out of the box on FreeBSD. I have already made > > sure of that. Just use: > > > > $ cd "$BC_ROOT" > > $ ./configure.sh -O3 > > $ make > > To be able to provide binary packages we'd need this "bc" in ports. > > Creating a port should be very simple and I'd be willing to work on > getting a port committed tomorrow. > > Ports that currently depend on GNU bc from ports could be converted > to use this version instead. > > Even if it was imported into base today, there'd be supported releases > without that bc version for quite some time to come. > > A simple port Makefile that works for me is: > > # $FreeBSD$ > > > > PORTNAME= gh-bc > PORTVERSION= 1.0 > CATEGORIES= math > > MAINTAINER= se@FreeBSD.org > COMMENT= GNU compatible bc/dc calculator > > LICENSE= BSD > LICENSE_FILE= ${WRKSRC}/LICENSE.md > > USES= gmake > > USE_GITHUB= yes > GH_ACCOUNT= gavinhoward > GH_PROJECT= bc > > PLIST_FILES= bin/bc bin/dc > > do-install: > ${INSTALL_PROGRAM} ${WRKSRC}/bin/bc ${STAGEDIR}${PREFIX}/bin/ > ${LN} ${STAGEDIR}${PREFIX}/bin/bc ${STAGEDIR}${PREFIX}/bin/dc > > .include > > It could probably made to not require GNU make, but I did not bother to > try this for this quickly written port Makefile. > > There are 2 open points: > > 1) There is no 0BSD license - I have set the license name to BSD and the > LICENSE.md file is included in the package, but I do not think that > this is completely right. > > 2) I have used the release tag 1.0, which does not include the latest > changes committed to Github. If the port should actually be based on > a later code base, a new release tag would be beneficial. > > To distinguish this port from other bc implementations I'd suggest to > name it "math/gh-bc" ... > > Regards, STefan From owner-freebsd-arch@freebsd.org Tue Jan 8 02:20:37 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F4FA148BAA2 for ; Tue, 8 Jan 2019 02:20:37 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: from mail-vs1-xe41.google.com (mail-vs1-xe41.google.com [IPv6:2607:f8b0:4864:20::e41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4C0468313; Tue, 8 Jan 2019 02:20:36 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: by mail-vs1-xe41.google.com with SMTP id v205so1558312vsc.3; Mon, 07 Jan 2019 18:20:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fbecucwC8NGMPfG8WiPDEWRw9PFdcwmm7pGQI5W9sng=; b=qREJtnX9XeQo1SSu2lfLRAPEhrVWVx6GNrUBcHMlfLfH35ZmvvgT/h8jVfVMitY0Pd 50FQXLablq8ejfGW2XUhQ91FLficiBIOQTXyufj26v7RudNCRvpZakOSUuY9qpgnRHjB kQFbnTWW4xgIIxa2DuwCCQskxfkuLieNpq7opCw5lr3OhGwtRWZeTxfJlu6WTIitKuBy PhmskyZ2KwFVSGer0PrzKVWMgcKkAjsULe2eSvJpHlXQWNITIS0hG6y8IByUr6DPhG0r Li6nt1+nmhkLh/p01nc8lGph9mFSSICnopg5WEsY+SEJJ+7LjIhSH3AUPE97YnEWNOkz eJag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fbecucwC8NGMPfG8WiPDEWRw9PFdcwmm7pGQI5W9sng=; b=N8TzgvjneoNDY7EIxTCEAHa+cX42FzzvbXLSQqe7hsO/4QxFyEXJALFLpF+sd+ClQp OSDNWSkx2V6uipHUFIPtjzVy4SqF2wB2BrBp7ZmMpwDyDnQChMQjz/PLFMgMAHycP9QB MGd7M76+NqhzztcT+VVi44PYmcXwoClYjR9QoIDKEcr6vaX0v0HU5C1tXH/gETyUMMAF z37poJoKFJ5+5uzQAZeHZqeDNSGLvqEX6/AUoafT5WRAKQzwIpQ7kyeVbNf37OsWbbCE REf3sq51DS7hA3lYecu+aZkJaIOlTIPH5cR0w2HvASjoIG2yGC+2reNbzlR5X6ruQ2v1 QuMg== X-Gm-Message-State: AJcUukfHgdRHuO5tg9oUNa58jYOwyi3JxXcxIUq3nuxlCyJcyH4bU+Nr Tar+RGePzIv1Ow/EyqTyjLpKQTu+2wwtvbzEgQy8SsDK X-Google-Smtp-Source: ALg8bN4NjAnoucJbhOhJrbMuCoXDmJ9EeKyTYcG+yJLgDlXXRLVdCcVMgQTMz+jS84iGXRGbVMwPUeWTqD+6ocm5IiM= X-Received: by 2002:a67:6d42:: with SMTP id i63mr2760209vsc.158.1546913610169; Mon, 07 Jan 2019 18:13:30 -0800 (PST) MIME-Version: 1.0 References: <1e025f53-fc5e-5b1e-013d-ab9330a0e9db@freebsd.org> In-Reply-To: From: Gavin Howard Date: Mon, 7 Jan 2019 19:12:54 -0700 Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: cem@freebsd.org Cc: Stefan Esser , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: B4C0468313 X-Spamd-Bar: +++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=qREJtnX9; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gavindhoward@gmail.com designates 2607:f8b0:4864:20::e41 as permitted sender) smtp.mailfrom=gavindhoward@gmail.com X-Spamd-Result: default: False [9.76 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(0.00)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.98)[0.980,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.30)[ip: (5.47), ipnet: 2607:f8b0::/32(-2.21), asn: 15169(-1.68), country: US(-0.08)]; NEURAL_SPAM_MEDIUM(0.99)[0.992,0]; BAD_REP_POLICIES(0.10)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; RCVD_IN_DNSWL_NONE(0.00)[1.4.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; URIBL_SBL(6.50)[license.md]; RCVD_COUNT_TWO(0.00)[2]; GREYLIST(0.00)[pass,body] X-Spam: Yes X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 02:20:37 -0000 On Mon, Jan 7, 2019 at 5:59 PM Conrad Meyer wrote: > > Hi Stefan, > > I don't think there's any reason to put this in ports instead of base. > If you're arguing that we shouldn't ship any bc in base, that's a fine > argument to make, but it's off-topic for this discussion. > > If at some point after that you want to remove bc from base and fix > all of the fallout of that much larger change, you are welcome to take > on that (much larger) project. > > Best, > Conrad I would be plenty happy to just get my bc into ports, but I would be *ecstatic* to have it in base. Personally, I think it should be in base because POSIX requires it, and this bc would be more useful to a wide array of users. That said, I am not a FreeBSD contributor (yet), so my opinion should not really matter. > On Mon, Jan 7, 2019 at 2:06 PM Stefan Esser wrote: > > > > Am 07.01.19 um 20:45 schrieb Gavin Howard: > > > On Mon, Jan 7, 2019 at 11:06 AM Dimitry Andric wrote: > > >> > > >> On 7 Jan 2019, at 19:35, Gavin Howard wrote: > > >>> > > >>> I am the author of a GNU-compatible, BSD-licensed bc > > >>> (https://github.com/gavinhoward/bc). I noticed (on > > >>> https://wiki.freebsd.org/GPLinBase) that FreeBSD used to use the GNU > > >>> bc until it was taken out because of the GPL. My bc is not licensed > > >>> under the GPL; it is under the 0BSD license. Thus, I think my bc might > > >>> be a great fit for FreeBSD. > > >>> > > >>> My bc is well-tested. I make sure that every single memory bug that I > > >>> can find is out before every single release. I also make sure that my > > >>> bc's math is correct by running millions of random math problems > > >>> before every release. > > >>> > > >>> My bc is extremely portable; it easily builds on any POSIX > > >>> platform. And it includes a full dc as well (except for the "!" > > >>> command). > > >>> > > >>> I would love to work with the core team to get my bc into FreeBSD, if > > >>> there is interest. I am about to do a release, and I am willing to > > >>> delay the release to get it up to par for FreeBSD. > > >>> > > >>> Would there be interest? > > >> > > >> You are 9 years late. :-) > > >> > > >> https://github.com/freebsd/freebsd/commit/bc4e1f6f87a770761be30eb708cbef88bc4d9536 > > >> > > >> That said, are you aware of any great differences between your bc and > > >> the one originally from OpenBSD? > > > > > > Yes. See below for the important one. > > > > > > The non-important ones include the fact that I support *every* GNU > > > extension. That includes array references, void functions, the "halt" > > > keyword, etc. > > > > > > On Mon, Jan 7, 2019 at 12:24 PM Conrad Meyer wrote: > > >> > > >> Thanks Gavin, > > >> > > >> I think this could be valuable for us. Our bc is not GNU-compatible > > >> today and that causes some pain. > > >> > > >> For example, fusefs-lkl requires the gnubc port to build because the > > >> base bc lacks some functionality that GNU has, and of course lkl uses > > >> the gnu bc functionality. So a BSDL bc that is actually > > >> GNU-compatible seems attractive to me. > > >> > > >> The script in question can be found here: > > >> https://github.com/torvalds/linux/blob/master/kernel/time/timeconst.bc > > >> and it is invoked like: "echo 100 | bc -q path/to/timeconst.bc". > > >> > > >> It can be reduced to the following short test case with the same invocation: > > >> > > >> a = read(); > > >> print "a: ", a, "\n" > > >> > > >> In-tree BSD bc prints "dc: not a string" on stderr and with the > > >> simplified test case, "a: 0\n100\n" on stdout. > > >> > > >> GNU bc prints "a: 100\n" on stdout, as expected. (I have not tried Gavin's bc.) > > >> > > >> Best, > > >> Conrad > > > > > > My bc handles the Linux timeconst.bc script with aplomb from 0 to (at > > > least) 1000. It is part of my test suite, actually. > > > > > > You can try it out by running the following command after building my > > > bc (where BC_ROOT is the root directory of my bc): > > > > > > $ "$BC_ROOT/tests/bc/timeconst.sh" /location/of/timeconst.bc > > > > > > It won't have any output besides "Running timeconst.bc..." unless it > > > didn't pass the test. > > > > > > Also, this bc builds out of the box on FreeBSD. I have already made > > > sure of that. Just use: > > > > > > $ cd "$BC_ROOT" > > > $ ./configure.sh -O3 > > > $ make > > > > To be able to provide binary packages we'd need this "bc" in ports. > > > > Creating a port should be very simple and I'd be willing to work on > > getting a port committed tomorrow. > > > > Ports that currently depend on GNU bc from ports could be converted > > to use this version instead. > > > > Even if it was imported into base today, there'd be supported releases > > without that bc version for quite some time to come. > > > > A simple port Makefile that works for me is: > > > > # $FreeBSD$ > > > > > > > > PORTNAME= gh-bc > > PORTVERSION= 1.0 > > CATEGORIES= math > > > > MAINTAINER= se@FreeBSD.org > > COMMENT= GNU compatible bc/dc calculator > > > > LICENSE= BSD > > LICENSE_FILE= ${WRKSRC}/LICENSE.md > > > > USES= gmake > > > > USE_GITHUB= yes > > GH_ACCOUNT= gavinhoward > > GH_PROJECT= bc > > > > PLIST_FILES= bin/bc bin/dc > > > > do-install: > > ${INSTALL_PROGRAM} ${WRKSRC}/bin/bc ${STAGEDIR}${PREFIX}/bin/ > > ${LN} ${STAGEDIR}${PREFIX}/bin/bc ${STAGEDIR}${PREFIX}/bin/dc > > > > .include > > > > It could probably made to not require GNU make, but I did not bother to > > try this for this quickly written port Makefile. I have a Makefile that works without GNU make: ``` # $FreeBSD$ PORTNAME= gh-bc PORTVERSION= 1.1rc3 CATEGORIES= math MAINTAINER= se@FreeBSD.org COMMENT= GNU compatible bc/dc calculator LICENSE= BSD LICENSE_FILE= ${WRKSRC}/LICENSE.md USE_GITHUB= yes GH_ACCOUNT= gavinhoward GH_PROJECT= bc HAS_CONFIGURE= yes CONFIGURE_ARGS= -O3 PLIST_FILES= bin/bc bin/dc do-install: ${INSTALL_PROGRAM} ${WRKSRC}/bin/bc ${STAGEDIR}${PREFIX}/bin/ ${LN} ${STAGEDIR}${PREFIX}/bin/bc ${STAGEDIR}${PREFIX}/bin/dc .include ``` There is only one thing I could not get to work: running `make package` as a user. It always gave me permissions issues, and I am a FreeBSD noob, so I did not know how to fix it. For the `pkg-descr` file, I mostly copied the one from gnubc: ``` bc is an arbitrary precision numeric processing language. Its syntax is similar to C but differs in many substantial areas. It supports interactive execution of statements. The bc utility is included in the POSIX 1003.1-2008 standard. WWW: https://github.com/gavinhoward/bc ``` > > There are 2 open points: > > > > 1) There is no 0BSD license - I have set the license name to BSD and the > > LICENSE.md file is included in the package, but I do not think that > > this is completely right. Ah, yes, sorry. There *is* one (https://spdx.org/licenses/0BSD.html), but SPDX only added it in December, IIRC. > > 2) I have used the release tag 1.0, which does not include the latest > > changes committed to Github. If the port should actually be based on > > a later code base, a new release tag would be beneficial. To make the above Makefile work, I put out a release candidate. When I do an actual release (within two or three weeks), we can update it to the *actual* version 1.1. But the Makefile above uses my current build system, so changing it for the new version should be as simple as removing "rc3" from the version. Also, the build sequence changed for git clones: $ ./configure -O3 $ make (I decided to make the port easier to do by renaming `configure.sh` to the more standard `configure`.) > > To distinguish this port from other bc implementations I'd suggest to > > name it "math/gh-bc" ... Whatever works. That was the name I put into the Makefile itself. Gavin Howard From owner-freebsd-arch@freebsd.org Tue Jan 8 05:57:48 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E861149048E for ; Tue, 8 Jan 2019 05:57:48 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DFEF70014; Tue, 8 Jan 2019 05:57:47 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [76.77.180.168] (port=57277 helo=eskarina.lan) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ggkO1-0007MW-BE; Mon, 07 Jan 2019 21:57:13 -0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: GNU-compatible, BSD-licensed bc From: Devin Teske In-Reply-To: Date: Mon, 7 Jan 2019 21:57:43 -0800 Cc: Devin Teske , cem@freebsd.org, "freebsd-arch@freebsd.org" Content-Transfer-Encoding: 7bit Message-Id: <61F802DC-2E59-4E0A-955D-899EBD7874A1@FreeBSD.org> References: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> To: Gavin Howard X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: 5DFEF70014 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.93 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MX_GOOD(-0.01)[cached: mail.shxd.cx]; FORGED_SENDER(0.30)[dteske@FreeBSD.org,devin@shxd.cx]; FREEMAIL_TO(0.00)[gmail.com]; IP_SCORE(0.24)[ip: (0.68), ipnet: 64.201.240.0/20(0.34), asn: 36734(0.27), country: US(-0.08)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:36734, ipnet:64.201.240.0/20, country:US]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[dteske@FreeBSD.org,devin@shxd.cx]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.68)[0.678,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.33)[0.326,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.995,0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 05:57:48 -0000 > On Jan 7, 2019, at 4:42 PM, Gavin Howard wrote: > > On Mon, Jan 7, 2019 at 5:38 PM Conrad Meyer wrote: >> >> On Mon, Jan 7, 2019 at 4:00 PM Devin Teske wrote: >>> How do you handle arbitrary arithmetic precision? >> >> Looks like https://github.com/gavinhoward/bc/blob/master/src/num.c . > > That is correct. Because this bc is meant to help bootstrap the Linux > kernel and have no dependencies other than POSIX 2008, I wrote my own. Impressive. It might be worth turning this into a library itself. > Also, the POSIX bc standard mandates doing math in decimal. OpenSSL > would not be smart if they did that. Not sure I understand what you mean here. > There are also a few > peculiarities with the POSIX bc standard that (more or less) require a > standalone implementation. > How hard would it be to convert a bn(3)-based library to use your code? Would there be any performance impact -- I've benchmarked bn(3) to be pretty fast. > Also, right now I am working on getting a release candidate out that > will enable me to make a quick port that Stefan could use as a jumping > off point. My build system changed between 1.0 and now, and I would > like to be able to test it. > Cool. Looking forward to it. -- Cheers, Devin From owner-freebsd-arch@freebsd.org Tue Jan 8 07:46:09 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E11081492E03 for ; Tue, 8 Jan 2019 07:46:08 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: from mail-vs1-xe41.google.com (mail-vs1-xe41.google.com [IPv6:2607:f8b0:4864:20::e41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BBE40734E2; Tue, 8 Jan 2019 07:46:07 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: by mail-vs1-xe41.google.com with SMTP id y27so1917760vsi.1; Mon, 07 Jan 2019 23:46:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zIU2qWvNz3Li8iVCmed/uynXGeJm5Qmt2Oaf+p34PL0=; b=pB1qgIPW/VnnCTt80t1qBaJtj94GTiSNcwiPUF3p6+XnAMj1wr9hlrnOcwyujbkA2E au5Ihu/+q5lb4lMCg+wzURE4+jh6rcPpzrpkvOlAO6h5a13zTpLsHC3sSTg1GPt5qqYZ BVJXb9GPfq7EN+NlCXKOd+ZySvn94Rtl2mzxTigBhLhKqWxu7SZBqDL+nRE5CKalTyOR UeVDsaJndsvoFS2wK3iomD18A+i0bkIGb1RwYHLhKuZmILmCu4XJxypWcps/Vrp7CleU p8JbA7uFN39ef47h8jgW4i1idlrMc2oPSJeWWo5r7KHI0i/gYnLzRCAm0/5KCUvxCAYr vwXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zIU2qWvNz3Li8iVCmed/uynXGeJm5Qmt2Oaf+p34PL0=; b=Y7yApt1yfikI8GvAA1bfeYg4j93GxQkDEAtQgvPUbHDFuM6hIq1ldyqAccp8EoOclE fp5sXAsxw7kNtnyYSiMY3sb09AhpwII04bte/MPPcls0lAE3Ktf1fAIFLMdLS9UdfLiB gRg95XAZBwRAfhpxF+W1uT4ngMQtc2/p3AAzScKpmO90GN77f36wXtwz+/4rmD41qsap fGb6wtsuqoMirunWJ+5fnrM8aDE//Ws347yh1I4jz/zOzLeLZVufs9h9XalE6E6xs9+5 UYNPQ0VSEDt4re2qP/5tp7ye0S6+0tykqnEHrOVcl11vJe2uO2o4Lx/HHI9xZkspXg7j wVnA== X-Gm-Message-State: AJcUuketeHxvguKS76dRqjLZqvYRUDPDpjPRhHaxPx57RReP2XfjAOMI bggiqdDWy8xDfTDxKAy6y7BYzz/ds+KyPqhvFMR2HrZv X-Google-Smtp-Source: ALg8bN5mfWbiY7eDW3dZ5XdtX+si8vK4i9joFyXolmlJlAHX1Wr7NJVWdPWVvqZ34R+cIeVFcRPCJwU1zaJgO6Q74i8= X-Received: by 2002:a67:fa59:: with SMTP id j25mr304544vsq.18.1546933566868; Mon, 07 Jan 2019 23:46:06 -0800 (PST) MIME-Version: 1.0 References: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> <61F802DC-2E59-4E0A-955D-899EBD7874A1@FreeBSD.org> In-Reply-To: <61F802DC-2E59-4E0A-955D-899EBD7874A1@FreeBSD.org> From: Gavin Howard Date: Tue, 8 Jan 2019 00:45:30 -0700 Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: Devin Teske Cc: cem@freebsd.org, "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: BBE40734E2 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=pB1qgIPW; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gavindhoward@gmail.com designates 2607:f8b0:4864:20::e41 as permitted sender) smtp.mailfrom=gavindhoward@gmail.com X-Spamd-Result: default: False [-1.37 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.59)[-0.588,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.63)[-0.627,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.26)[ip: (5.26), ipnet: 2607:f8b0::/32(-2.21), asn: 15169(-1.68), country: US(-0.08)]; NEURAL_SPAM_SHORT(0.60)[0.601,0]; RCVD_IN_DNSWL_NONE(0.00)[1.4.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 07:46:09 -0000 On Mon, Jan 7, 2019 at 10:57 PM Devin Teske wrote: > > > > > On Jan 7, 2019, at 4:42 PM, Gavin Howard wrote: > > > > On Mon, Jan 7, 2019 at 5:38 PM Conrad Meyer wrote: > >> > >> On Mon, Jan 7, 2019 at 4:00 PM Devin Teske wrote: > >>> How do you handle arbitrary arithmetic precision? > >> > >> Looks like https://github.com/gavinhoward/bc/blob/master/src/num.c . > > > > That is correct. Because this bc is meant to help bootstrap the Linux > > kernel and have no dependencies other than POSIX 2008, I wrote my own. > > Impressive. It might be worth turning this into a library itself. Eh...it is completely tuned for bc. And it won't be fast, unfortunately. See below. > > Also, the POSIX bc standard mandates doing math in decimal. OpenSSL > > would not be smart if they did that. > > Not sure I understand what you mean here. Well, for starters, OpenSSL's BIGNUM is integer only. Yes, those integers can be any size, but they are only integers. That is not good enough for bc; it has to allow arbitrary precision, including non-integers, and its fractional part can be any size, up to a certain limit, which you can get from my bc by typing "limits" at the prompt and looking for the value of BC_NUM_MAX (which is actually the maximum number of decimal digits, period). Also, while bc requires arithmetic to be in decimal, OpenSSL probably uses unsigned integers to do binary-based arithmetic. Let me explain. (And yes, I am explaining in detail, even though you probably know this already. I am just making sure I cover my bases.) In any (normal) bignum implementation, a bignum is going to be an array of hardware-based integers (in the case of OpenSSL, probably unsigned ints). A normal bignum implementation would use the entire range (or almost the entire range) of that integer type. For 32-bit unsigned integers, that means that each "limb" (item in the bignum array) can hold 2^32 integers. For a hardware-based, unsigned integer implementation, that means that it only needs one item in the array until the bignum is bigger than 2^32-1. Once it overflows that, another unsigned integer will be added to the array and gets the overflow. This allows the bignum implementation at least 2 advantages: 1) it can use very fast hardware types, and 2) the size of the bignum array is kept as small as possible. I could not do that for bc. Each "limb" could only hold one decimal digit, meaning that each item in the array was limited to 10^1 numbers. Obviously, that is *much* smaller than 2^32. Now, in my bc, I use unsigned chars, so my limbs are 1/4 the size of the limbs in a 32-bit-based bignum, but each limb can only use a small fraction of the range of an unsigned char. This means three things: 1) I have to manually check for overflow over 9, which adds code, 2) math on each limb in the bc takes longer than in a 32-bit-based bignum, since unsigned chars have to be zero-extended to the size of an unsigned int before doing the actual math, and 3) the amount of memory needed (on average) is much higher (though it would be astronomical if I used unsigned ints). I also have to store the location of the radix (decimal point) and sometimes perform more expensive operations when doing math on digits behind the radix. I would not have written it that way, but the POSIX bc spec mandated it. (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html#tag_20_09_13_03, where it says "Internal computations shall be conducted as if in decimal, regardless of the input and output bases, to the specified number of decimal digits.") So, in essence, a bc-based bignum library is never going to be very fast. And it generally doesn't have to be; it interacts directly with a user most of the time, and users are slow compared to computers. Now, I have taken a few pains to make sure my bc is as fast as possible, under the circumstances, but the math is still the most expensive part. It's kind of freaky, actually. My parser zips through my math library fast enough that the user doesn't even notice the load lag, and though my bytecode interpreter is not slow, it is not fast either, since my parser does not optimize the bytecode. Despite that, the math is consistently taking about 80+ percent of the time, and that percentage goes *way* up when there are bigger numbers, since only addition and subtraction are linear. (I do use Karatsuba for multiplication, and it is a miracle, but it is still superlinear.) > > There are also a few > > peculiarities with the POSIX bc standard that (more or less) require a > > standalone implementation. > > > > How hard would it be to convert a bn(3)-based library to use your code? > Would there be any performance impact -- I've benchmarked bn(3) to > be pretty fast. It would not be terribly hard, but as I said above, it would not be fast at all, at least compared to a well-written hardware-based, binary bignum implementation. But if you want to, go ahead; I would appreciate the credit (though the license does not even require that). > > Also, right now I am working on getting a release candidate out that > > will enable me to make a quick port that Stefan could use as a jumping > > off point. My build system changed between 1.0 and now, and I would > > like to be able to test it. > > > > Cool. Looking forward to it. It's out. It works great. The Makefile that I sent to the mailing list a few messages back does the job well enough, though I was told in a private message not to use the GNU bc port's pkg-descr file, since it might be under the GPL. However, note that this is not the final 1.1 release; it is just for testing, even though it is high quality. Gavin Howard From owner-freebsd-arch@freebsd.org Tue Jan 8 07:56:40 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDEE4149350D for ; Tue, 8 Jan 2019 07:56:39 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3825574361; Tue, 8 Jan 2019 07:56:39 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 13A952D1D5; Tue, 8 Jan 2019 07:56:39 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 7CB73C8619; Tue, 8 Jan 2019 08:56:37 +0100 (CET) Date: Tue, 8 Jan 2019 08:56:37 +0100 From: Baptiste Daroussin To: Conrad Meyer Cc: Gavin Howard , Dimitry Andric , "freebsd-arch@freebsd.org" Subject: Re: GNU-compatible, BSD-licensed bc Message-ID: <20190108075637.s4j5ntm7pygkjvip@ivaldir.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jawj4q4ozx3rnqet" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Rspamd-Queue-Id: 3825574361 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; TAGGED_RCPT(0.00)[]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 07:56:40 -0000 --jawj4q4ozx3rnqet Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 07, 2019 at 01:10:34PM -0800, Conrad Meyer wrote: > On Mon, Jan 7, 2019 at 11:46 AM Gavin Howard w= rote: > > > > On Mon, Jan 7, 2019 at 11:06 AM Dimitry Andric wrote: > > > That said, are you aware of any great differences between your bc and > > > the one originally from OpenBSD? > > > > Yes. See below for the important one. > > > > The non-important ones include the fact that I support *every* GNU > > extension. That includes array references, void functions, the "halt" > > keyword, etc. > > > >... > > > > My bc handles the Linux timeconst.bc script with aplomb from 0 to (at > > least) 1000. It is part of my test suite, actually. > > > > You can try it out by running the following command after building my > > bc (where BC_ROOT is the root directory of my bc): > > > > $ "$BC_ROOT/tests/bc/timeconst.sh" /location/of/timeconst.bc > > > > It won't have any output besides "Running timeconst.bc..." unless it > > didn't pass the test. > > > > Also, this bc builds out of the box on FreeBSD. I have already made > > sure of that. Just use: > > > > $ cd "$BC_ROOT" > > $ ./configure.sh -O3 > > $ make >=20 > Gavin, >=20 > This all sounds great to me. Consider me on-board with the idea. >=20 Nice, Count me on board as well :) Best regards, Bapt --jawj4q4ozx3rnqet Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlw0V7AACgkQY4mL3PG3 Plrnyg/8Cb7Tdg1iIX32avgNBtYS5D1k1EhsbbsKOAvdCSeGNyF4m1wi338gj26N JGtuUva8AkU4RQkeFg8Y9m7MjWWUXW0J7E8OCJyccbSR0DHsKV6+Kdo5A0c2XNui didhvJDz8Qf4R/kjZdbxZ0/CeYegSkL0Mr2+3w3aZTMP/k1jnrLsa943yT4AjZEH I7CFp3OvvtWBL0Vh4p9sLXO2+Pcaw4IhJdZeewfhQTAIeAAn0fLmxO/B1Mmknsl3 MeJXzvJPxYnGjlNL0Dy8kmcV4CP+f4P3GvKk8BdhkSnLf7IUP8HOrschY4QQKpCA XEmQSa2zNiYcFkETm01Mihjpp9JPTisu3oli2arZFRD7hir5GRssJPdW3fbvWMie wcZ/tujBUwY0YLqyQGPB4KKFUb33/q9ULzIe9jZMstrPxPGfYl79V6HZ9fJaAOR9 n+wFKtqSdPh2pSKuaaDGJQyv3Ms1IaK3V+ecGqJ2mGgElBFdMcd3D6SauCDdxa1H EeCLE5Uo1D8ozKn7jAmHnq5gwtCA/BDtN8296X5UuYCFYTz3zPuU/mtHifhbh8Ti FQmUIl1yz7ZQvB2GHlODitbjQ3VnHDdnoEmiO2z6ky5xMCNC1Z8x5OTxc1I907a0 +OD5huYiIVqoLSa8fURuxrVUoOODgJ73WgitiIJ7yht0WSvtVNE= =xMUd -----END PGP SIGNATURE----- --jawj4q4ozx3rnqet-- From owner-freebsd-arch@freebsd.org Tue Jan 8 10:28:00 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3DE6149ABF8 for ; Tue, 8 Jan 2019 10:27:59 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout09.t-online.de (mailout09.t-online.de [194.25.134.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47E3383BFC; Tue, 8 Jan 2019 10:27:59 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd30.aul.t-online.de (fwd30.aul.t-online.de [172.20.26.135]) by mailout09.t-online.de (Postfix) with SMTP id 13BB5426A58D; Tue, 8 Jan 2019 11:27:50 +0100 (CET) Received: from Stefans-MBP-WLAN.fritz.box (XNybEyZHYhZK8uHs0+nid-783EB4RJqirZBg6JqEp0-6YssrjUU1QvCdbzY309gQES@[93.200.55.94]) by fwd30.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1ggobr-4Vfq080; Tue, 8 Jan 2019 11:27:47 +0100 Subject: Re: GNU-compatible, BSD-licensed bc To: cem@freebsd.org Cc: "freebsd-arch@freebsd.org" References: <1e025f53-fc5e-5b1e-013d-ab9330a0e9db@freebsd.org> From: Stefan Esser Openpgp: preference=signencrypt Autocrypt: addr=se@freebsd.org; prefer-encrypt=mutual; keydata= mQENBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAG0J1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPokBVAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+q BQkLJQETAAoJEEfrte9a/fVEOeMH/icmdK1eZQvB3U8quJo9VMaZsaTuCMbUE4NThyfsIvIm MCd+rb/yULmMYwqNfjyKB1x4ikR4x+94l+yJoz7K0Usks+eNKDmMGJM6pWWssTigaJubFdVd hVVC+C1QJi7JshYSib08uONoPmO4lv5Az0TDYGtsMzsES2sIlc62c9go5WPGYhQFRbX3Lk6y V6m8OHh+G9XGSj3oPO4UteRwu+SzTdOLunZBWG1wu34+IeZm663D+2gOppQLWpLa2qaTerqw THu377ayZ2B2LPJ5JkvkZeHYPkwDQ+b5PGn0UhfkxPnDVYki5F7qKxvQ5uq1/q9YaCX7mmOl H2yO7tgVsrW5AQ0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAYkBPAQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+rBQkL JQEZAAoJEEfrte9a/fVEuesH/2DNxGWnHvWwMyiyhlQtafvDKwEn/wAgR8gHJFodB7emf8rA TnukH7MVttCoHtjN5lvv9RSBHjNTZls5wR/ANlwdRuPQHd8ZGxLe3S6IuUB3zDSwFltLGurO N2kOMhs5mTGyypSa+uw3rtQbUAVYf1oPbiR4FLtiM8FLyEvE95hX5fPq9Qvx9FmN79kmCIEw jDKPqDaUf/OR2fEF0LSIbXHEk4tNqCEwx5DIJ0fp5/z5UzICUAmwxyRs5O/Hre1jzPsMVyud Ml9t7UTOJGKVWwRory1PMnOFxN+iz5/d4FhYSKXF7kfMiFgol4LuWaxJRwbBrr71VGBrRy2a L1nw6Bc= Message-ID: <753bc6bf-9269-1ca2-550c-cb7622812a01@freebsd.org> Date: Tue, 8 Jan 2019 11:27:46 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ID: XNybEyZHYhZK8uHs0+nid-783EB4RJqirZBg6JqEp0-6YssrjUU1QvCdbzY309gQES X-TOI-MSGID: b45d3ad6-c5d6-465d-8b44-0f86ff00de2d X-Rspamd-Queue-Id: 47E3383BFC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; ASN(0.00)[asn:3320, ipnet:194.25.0.0/16, country:DE] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 10:28:00 -0000 Am 08.01.19 um 01:31 schrieb Conrad Meyer:> Hi Stefan, > > I don't think there's any reason to put this in ports instead of base. > If you're arguing that we shouldn't ship any bc in base, that's a fine > argument to make, but it's off-topic for this discussion. Hi Conrad, yes, sure, if it passes our tests (I understand that it passes its own test suite) it should definitely be considered for base. I did not want to suggest a removal of bc from base at this time. But given our release cycle it will take a long time for this bc to actually occur in a release - that's why I proposed to create a port that could be depended on by other ports that currently require GNU bc. This would also provide us with more confidence, that this version is actually a fully compatible replacement for GNU bc. > If at some point after that you want to remove bc from base and fix > all of the fallout of that much larger change, you are welcome to take > on that (much larger) project. No, that's not what I wanted to suggest at this time. An existing port will reduce the effort required to test removal of bc from base (if only slightly), but bc is quite useful in base (unlike e.g. ctm or timed), and I'd expect it to stay ... Regards, STefan From owner-freebsd-arch@freebsd.org Tue Jan 8 21:35:41 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF62E148C081 for ; Tue, 8 Jan 2019 21:35:41 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB07D80E3D; Tue, 8 Jan 2019 21:35:40 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f45.google.com with SMTP id v10so4332935ios.13; Tue, 08 Jan 2019 13:35:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=7kQID+jB9am3gOkAa5QkdB4urcfW3HNh4FsjcGtLkNI=; b=A6ylsC/gWllTiWIE87KoPpJ2DZmrOP0ltPJHpVHoXFCabtyqPStVoS6eFsIpA5IwqO Ok1MuHhMwzFXDN9w3EREy8PGRgDblfRFnqGp7nkX7srUXxkgVf4EeRLhjgYvpdYAdBcL i+Hf+RUviVbr6FFq3xiuvxDND+zC8sfT1+/p/PkLVr+3xcuQ326pNroBwemNLiEEU6+9 CpUuDKv68ocOCiXtF2J7YlH+p7dAOVIIjofAxRFl20eysCzFtj3Cr4WnqFmiW3QPfKkN VS/MVQdNAqwNVZGk+KDqejLWb96l2KeOhR5YpQk/QCtCTiVcwROqJ5Nb0IOvl6xMx9DY 6k9w== X-Gm-Message-State: AJcUukcEbBH3CTrESq1cLBTKAgFp4vdPsbTcp/oX7KWmHaX3hKcoSgGz AXKBflVTW+MkDV4/DtASSTcwf8kp X-Google-Smtp-Source: ALg8bN6wtfa5U406yGyFEia10QS7YTWYoLmjVAJ4QjqJa6SBc/LAFk7PWb7QPbsh57BQICGo4t5KhQ== X-Received: by 2002:a6b:c8c9:: with SMTP id y192mr2077473iof.183.1546983333662; Tue, 08 Jan 2019 13:35:33 -0800 (PST) Received: from mail-it1-f171.google.com (mail-it1-f171.google.com. [209.85.166.171]) by smtp.gmail.com with ESMTPSA id d199sm9538437itd.31.2019.01.08.13.35.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 13:35:33 -0800 (PST) Received: by mail-it1-f171.google.com with SMTP id h65so8128335ith.3; Tue, 08 Jan 2019 13:35:33 -0800 (PST) X-Received: by 2002:a02:c88:: with SMTP id 8mr2257771jan.87.1546983333108; Tue, 08 Jan 2019 13:35:33 -0800 (PST) MIME-Version: 1.0 References: <1e025f53-fc5e-5b1e-013d-ab9330a0e9db@freebsd.org> <753bc6bf-9269-1ca2-550c-cb7622812a01@freebsd.org> In-Reply-To: <753bc6bf-9269-1ca2-550c-cb7622812a01@freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 8 Jan 2019 13:35:22 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: Stefan Esser Cc: "freebsd-arch@freebsd.org" X-Rspamd-Queue-Id: CB07D80E3D X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.166.45 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-5.59 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.68)[-0.684,0]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; MIME_TRACE(0.00)[0:+,1:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; IP_SCORE(-2.89)[ip: (-8.96), ipnet: 209.85.128.0/17(-3.74), asn: 15169(-1.70), country: US(-0.08)]; RCVD_IN_DNSWL_NONE(0.00)[45.166.85.209.list.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2019 21:35:42 -0000 Hi Stefan, Apologies, I misunderstood the idea. However, it seems like any port that depends on gnubc today could continue to depend on gnubc on older branches until a suitable replacement propagates into stable. (And that would be less work :-).) Best, Conrad On Tue, Jan 8, 2019 at 2:28 AM Stefan Esser wrote: > Am 08.01.19 um 01:31 schrieb Conrad Meyer:> Hi Stefan, > > > > I don't think there's any reason to put this in ports instead of base. > > If you're arguing that we shouldn't ship any bc in base, that's a fine > > argument to make, but it's off-topic for this discussion. > > Hi Conrad, > > yes, sure, if it passes our tests (I understand that it passes > its own test suite) it should definitely be considered for base. > I did not want to suggest a removal of bc from base at this time. > > But given our release cycle it will take a long time for this bc > to actually occur in a release - that's why I proposed to create > a port that could be depended on by other ports that currently > require GNU bc. > > This would also provide us with more confidence, that this version > is actually a fully compatible replacement for GNU bc. > > > If at some point after that you want to remove bc from base and fix > > all of the fallout of that much larger change, you are welcome to take > > on that (much larger) project. > > No, that's not what I wanted to suggest at this time. An existing > port will reduce the effort required to test removal of bc from > base (if only slightly), but bc is quite useful in base (unlike > e.g. ctm or timed), and I'd expect it to stay ... > > Regards, STefan > From owner-freebsd-arch@freebsd.org Wed Jan 9 12:32:45 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B51114A20BC for ; Wed, 9 Jan 2019 12:32:45 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout04.t-online.de (mailout04.t-online.de [194.25.134.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB7E08425E; Wed, 9 Jan 2019 12:32:44 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd16.aul.t-online.de (fwd16.aul.t-online.de [172.20.26.243]) by mailout04.t-online.de (Postfix) with SMTP id BCA3641B21F3; Wed, 9 Jan 2019 13:32:36 +0100 (CET) Received: from Stefans-MBP-WLAN.fritz.box (G-aMgEZSZhOfyWibBpGgnOzKkekqMwieKIfgIz+xsvBhGVdxVBlU9SCPeMDiq+aZIe@[80.128.100.252]) by fwd16.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1ghD2C-0qSDQW0; Wed, 9 Jan 2019 13:32:36 +0100 Subject: Re: GNU-compatible, BSD-licensed bc To: cem@freebsd.org References: <1e025f53-fc5e-5b1e-013d-ab9330a0e9db@freebsd.org> <753bc6bf-9269-1ca2-550c-cb7622812a01@freebsd.org> From: Stefan Esser Openpgp: preference=signencrypt Autocrypt: addr=se@freebsd.org; prefer-encrypt=mutual; keydata= mQENBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAG0J1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPokBVAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+q BQkLJQETAAoJEEfrte9a/fVEOeMH/icmdK1eZQvB3U8quJo9VMaZsaTuCMbUE4NThyfsIvIm MCd+rb/yULmMYwqNfjyKB1x4ikR4x+94l+yJoz7K0Usks+eNKDmMGJM6pWWssTigaJubFdVd hVVC+C1QJi7JshYSib08uONoPmO4lv5Az0TDYGtsMzsES2sIlc62c9go5WPGYhQFRbX3Lk6y V6m8OHh+G9XGSj3oPO4UteRwu+SzTdOLunZBWG1wu34+IeZm663D+2gOppQLWpLa2qaTerqw THu377ayZ2B2LPJ5JkvkZeHYPkwDQ+b5PGn0UhfkxPnDVYki5F7qKxvQ5uq1/q9YaCX7mmOl H2yO7tgVsrW5AQ0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAYkBPAQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+rBQkL JQEZAAoJEEfrte9a/fVEuesH/2DNxGWnHvWwMyiyhlQtafvDKwEn/wAgR8gHJFodB7emf8rA TnukH7MVttCoHtjN5lvv9RSBHjNTZls5wR/ANlwdRuPQHd8ZGxLe3S6IuUB3zDSwFltLGurO N2kOMhs5mTGyypSa+uw3rtQbUAVYf1oPbiR4FLtiM8FLyEvE95hX5fPq9Qvx9FmN79kmCIEw jDKPqDaUf/OR2fEF0LSIbXHEk4tNqCEwx5DIJ0fp5/z5UzICUAmwxyRs5O/Hre1jzPsMVyud Ml9t7UTOJGKVWwRory1PMnOFxN+iz5/d4FhYSKXF7kfMiFgol4LuWaxJRwbBrr71VGBrRy2a L1nw6Bc= Cc: "freebsd-arch@freebsd.org" Message-ID: <7c5da163-e12d-2de0-761e-22436fb28b86@freebsd.org> Date: Wed, 9 Jan 2019 13:32:35 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ID: G-aMgEZSZhOfyWibBpGgnOzKkekqMwieKIfgIz+xsvBhGVdxVBlU9SCPeMDiq+aZIe X-TOI-MSGID: d4140b0d-fab6-4379-a8ea-41ff204e012d X-Rspamd-Queue-Id: AB7E08425E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:3320, ipnet:194.25.0.0/16, country:DE]; NEURAL_HAM_LONG(-1.00)[-0.997,0] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 12:32:45 -0000 Am 08.01.19 um 22:35 schrieb Conrad Meyer: > Hi Stefan, > > Apologies, I misunderstood the idea. > > However, it seems like any port that depends on gnubc today could continue > to depend on gnubc on older branches until a suitable replacement > propagates into stable. (And that would be less work :-).) Yes, but the work has already been done ;-) I've been exchanging private mails with Gavin and he has worked on his "bc", e.g. to make the included tests run on FreeBSD out of the box (they used to require GNU bc). A few small issues have been fixed and he is looking into another one (^D handling). Working on the port (and tests performed with its preliminary version) has already improved the quality of the code that is about to be imported into base ... If users actually try running with Gavin's bc (as a port) before it makes it into a release, there is a good chance that any unexpected incompatibilitiy (e.g., if it is compatible with GNU bc, but behaves differently from our current bc in base) is found in time. So, I intend to proceed with an import as a port, independently of the import into base, which I appreciate, too. Regards, STefan From owner-freebsd-arch@freebsd.org Wed Jan 9 15:28:34 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80A5E1483301 for ; Wed, 9 Jan 2019 15:28:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E5308BC28 for ; Wed, 9 Jan 2019 15:28:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82c.google.com with SMTP id t33so8702857qtt.4 for ; Wed, 09 Jan 2019 07:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E0wI+6kV0ps+RqAzJlB4E9SffF3H/trooR7ro4Eqbo4=; b=vtqFwtF4dcKfGRHftAGTiZw+DuC14Gmax7Cmcz2c+bhGCdcVYAJ+j9t6esexbEbH6o i1jYu8O5PiL+ithcCpvYLJv6wGpsuHaR5vW9e8cGcx3wGPsqsUUQdE4bLxLD7p2jWSiU BDYWecyprCJA1aTsPQtXOgS52R28TNomt32Uwi41yr12z6d6eDajtR4Y+JGKWDdEPMbS ZIbwCRUet+A8flycP+QMbM1jfDMVm17Sl2eWyFgAU1tgsQ4C3adQQWg74lVnmhKEE55E 5JBV8oO6jGs1HQpdOA4ehYj1cJRV1ELi/TCLKZx9gKAfF1cvvXYiHYRxhSGZ5vwqlsf0 FqaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E0wI+6kV0ps+RqAzJlB4E9SffF3H/trooR7ro4Eqbo4=; b=IYfFFC/DHIf87hIqRvHsAPcFCIuKjqQWzZOpzGFOCdOGocDPz4PFvkimHV47/Nejg7 +FA9Yp+Rp3Q76MFO5wnPQUf798ffVckxA/CFOHl+jaUNztncIGc4d7IHS8MM9EcjP8vI Gce/zj+GSnj2i11gAXzXJ4N6hM8Kj80LHrSKkA+cNQ916Bjyoxm/YKg/LsyX4QmntZMt d2JlQa2PkFjC9W6UVvH0cjryimYZoPHwcfNdF2Jxuq5ZkMSsCj14XcVvlbpp0PaoYQNE anoJ85ZSIBxLUvakWe7unZ9ixXptKw30S+D41rkzDddt2v5oxftaWo4ogHyRUdGg/5Ny g9Mg== X-Gm-Message-State: AJcUukeqgIAYk6o1A7GzQrEbLdPeFH1K0gYakbu7z+OwXD52zX/Ci6gv 9RRUXvgw2NeuuE7fcWXKPU1mo6S45t2PLGvFKYWYS2hw X-Google-Smtp-Source: ALg8bN64Bb6tNuxb8M8qeYMFyeM1OSlArw+VxTD47jiuQ8o9xcGC4Y2B0VZghIjwAyuGpgr0z9pPOtGsPqX/nU5AAGw= X-Received: by 2002:ac8:548a:: with SMTP id h10mr6188316qtq.15.1547047712265; Wed, 09 Jan 2019 07:28:32 -0800 (PST) MIME-Version: 1.0 References: <1e025f53-fc5e-5b1e-013d-ab9330a0e9db@freebsd.org> <753bc6bf-9269-1ca2-550c-cb7622812a01@freebsd.org> <7c5da163-e12d-2de0-761e-22436fb28b86@freebsd.org> In-Reply-To: <7c5da163-e12d-2de0-761e-22436fb28b86@freebsd.org> From: Warner Losh Date: Wed, 9 Jan 2019 08:28:21 -0700 Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: Stefan Esser Cc: "Conrad E. Meyer" , "freebsd-arch@freebsd.org" X-Rspamd-Queue-Id: 1E5308BC28 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=vtqFwtF4 X-Spamd-Result: default: False [-5.49 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[c.2.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.82)[-0.819,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; IP_SCORE(-2.66)[ip: (-9.26), ipnet: 2607:f8b0::/32(-2.26), asn: 15169(-1.71), country: US(-0.08)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 15:28:34 -0000 On Wed, Jan 9, 2019 at 5:33 AM Stefan Esser wrote: > Am 08.01.19 um 22:35 schrieb Conrad Meyer: > > Hi Stefan, > > > > Apologies, I misunderstood the idea. > > > > However, it seems like any port that depends on gnubc today could > continue > > to depend on gnubc on older branches until a suitable replacement > > propagates into stable. (And that would be less work :-).) > > Yes, but the work has already been done ;-) > > I've been exchanging private mails with Gavin and he has worked > on his "bc", e.g. to make the included tests run on FreeBSD out > of the box (they used to require GNU bc). > > A few small issues have been fixed and he is looking into another > one (^D handling). Working on the port (and tests performed with > its preliminary version) has already improved the quality of the > code that is about to be imported into base ... > > If users actually try running with Gavin's bc (as a port) before > it makes it into a release, there is a good chance that any > unexpected incompatibilitiy (e.g., if it is compatible with GNU > bc, but behaves differently from our current bc in base) is found > in time. > > So, I intend to proceed with an import as a port, independently > of the import into base, which I appreciate, too. > We've had several BSDL'd things that started life as a port. I think this is a great strategy: make it available TODAY as a port (since the barrier to entry is small), if it pans out, integrate into base. Warner From owner-freebsd-arch@freebsd.org Wed Jan 9 16:29:03 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDAE9148638C for ; Wed, 9 Jan 2019 16:29:02 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29D128F832 for ; Wed, 9 Jan 2019 16:29:02 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: by mail-vs1-xe2f.google.com with SMTP id n10so5084915vso.13 for ; Wed, 09 Jan 2019 08:29:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=FD7QZQk6I4g62LqRkmcvJq5mX5iQwsURYNTDm8tDCc4=; b=JfSlo4oe0KFB7de+Fx5kCCZUj6fGo2DNPyXqsHFYaTvx+nRGjSiLloejVqA1FE92UA OS9n0oqFOsTqm732r+FxoiQRrhBHDHMY81aNUSdVgeRu/tDZ5qRG6pNhzj3xOnInMmwB gO2KGNayRjpaAy9QeDRzTICjgHA5/I9HHVHPVoTHUoRUIbQe94lLNtydHqfMZqmDLM7X mwSUQlVDtv9YASnzRzTnA9jiQ0ItSxonzBpxinMzayrvcTbHkNYItfKMzErIzBdCysn9 duJQclpFmdQqqXzmoGnpStomBBt5ja0ZBzNMKXVyMItVIJvjYCk5RmbZ4Lx2z3EADvps rDLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=FD7QZQk6I4g62LqRkmcvJq5mX5iQwsURYNTDm8tDCc4=; b=UsaPtSSi396OLGwTCxfvuIPbg9DomDiJ+Q4rdmXaQUaNabCxiDptXX+DgIYnrlnAFG 48KFYLD/IyPgf7OaGowYFC3s9LHW85QIFCMEVQWQNzTNH2MFkoGgE6Ha/gydp1wsPhgU S2Ry4scyhQRK3VIDARZ7FP/aCNr6nDgUENxMgdKOAY+mIeNmoLpu76ii27/zJGGYEVkA EdTcHSSrv4V70DOXYEpl9NpQlzKHV5xLn2io3ixKXUQWNtM0U6NogJ6f5rX9Bji+LLRk HeGJt2YFV1B7y8+26Qp0h8ds4skTzaf9MwnQbWo+Ppz8mZ2mpKQuU8kffW5a+UIO1iR8 QkGQ== X-Gm-Message-State: AJcUukd3QOy/1JQm0+LfAPYFwKmHeiHdX68Bq8Lguj5dzg5ZOryo3OxG 9KeIvcg6E2GipN6osFxVyutDCVbRFZSA72fPL8264w== X-Google-Smtp-Source: ALg8bN6E8M+R0XBPaSbDbn/q3DrmkhX/nSARdkC+D47mTSutS2jq4tZC03VciMh0JQZHVIhh+IuCIg2kgBakHlM4adU= X-Received: by 2002:a67:7c03:: with SMTP id x3mr2860646vsc.44.1547051340531; Wed, 09 Jan 2019 08:29:00 -0800 (PST) MIME-Version: 1.0 References: <1e025f53-fc5e-5b1e-013d-ab9330a0e9db@freebsd.org> <753bc6bf-9269-1ca2-550c-cb7622812a01@freebsd.org> <7c5da163-e12d-2de0-761e-22436fb28b86@freebsd.org> In-Reply-To: From: Gavin Howard Date: Wed, 9 Jan 2019 09:28:24 -0700 Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 29D128F832 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=JfSlo4oe; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gavindhoward@gmail.com designates 2607:f8b0:4864:20::e2f as permitted sender) smtp.mailfrom=gavindhoward@gmail.com X-Spamd-Result: default: False [-6.52 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.79)[-0.788,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-2.72)[ip: (-9.56), ipnet: 2607:f8b0::/32(-2.26), asn: 15169(-1.71), country: US(-0.08)]; RCVD_IN_DNSWL_NONE(0.00)[f.2.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; TO_DN_EQ_ADDR_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 16:29:03 -0000 On Wed, Jan 9, 2019 at 8:29 AM Warner Losh wrote: > > On Wed, Jan 9, 2019 at 5:33 AM Stefan Esser wrote: > > > Am 08.01.19 um 22:35 schrieb Conrad Meyer: > > > Hi Stefan, > > > > > > Apologies, I misunderstood the idea. > > > > > > However, it seems like any port that depends on gnubc today could > > continue > > > to depend on gnubc on older branches until a suitable replacement > > > propagates into stable. (And that would be less work :-).) > > > > Yes, but the work has already been done ;-) > > > > I've been exchanging private mails with Gavin and he has worked > > on his "bc", e.g. to make the included tests run on FreeBSD out > > of the box (they used to require GNU bc). > > > > A few small issues have been fixed and he is looking into another > > one (^D handling). Working on the port (and tests performed with > > its preliminary version) has already improved the quality of the > > code that is about to be imported into base ... Yes, it has, and the fix for ^D handling is now in master. > > If users actually try running with Gavin's bc (as a port) before > > it makes it into a release, there is a good chance that any > > unexpected incompatibilitiy (e.g., if it is compatible with GNU > > bc, but behaves differently from our current bc in base) is found > > in time. I already know that there are differences, but it seems to be more from bugs in your current bc. For example, when running the `tests/bc/scripts/parse.bc` script, which generates a test of *just* numbers (and assignments to ibase), the current bc generates a colon (`:`) for some reason. I have no idea why, and it seems to me that it is probably a bug, since a colon is not a valid digit. I could be wrong, though; I haven't dug into it. > > So, I intend to proceed with an import as a port, independently > > of the import into base, which I appreciate, too. > > > > We've had several BSDL'd things that started life as a port. I think this > is a great strategy: make it available TODAY as a port (since the barrier > to entry is small), if it pans out, integrate into base. Sounds good to me too. I was going to wait until I had full manuals written before releasing, but if it will just be a port at first, I will release quickly (by the end of the week, hopefully) and work on manuals later. Then I can release again right before the next code freeze, or whatever would be desired. Gavin Howard From owner-freebsd-arch@freebsd.org Wed Jan 9 19:58:48 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43416148D729 for ; Wed, 9 Jan 2019 19:58:48 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39CA072BC8; Wed, 9 Jan 2019 19:58:47 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=44141 helo=[10.1.7.18]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ghJzn-000PfZ-OR; Wed, 09 Jan 2019 11:58:35 -0800 From: Devin Teske Message-Id: Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: GNU-compatible, BSD-licensed bc Date: Wed, 9 Jan 2019 12:00:29 -0800 In-Reply-To: Cc: Devin Teske , "freebsd-arch@freebsd.org" , cem@freebsd.org To: Gavin Howard References: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> <61F802DC-2E59-4E0A-955D-899EBD7874A1@FreeBSD.org> X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: 39CA072BC8 X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.45 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MX_GOOD(-0.01)[mail.shxd.cx]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[dteske@FreeBSD.org,devin@shxd.cx]; IP_SCORE(0.23)[ip: (0.65), ipnet: 64.201.240.0/20(0.33), asn: 36734(0.26), country: US(-0.08)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:36734, ipnet:64.201.240.0/20, country:US]; MIME_TRACE(0.00)[0:+,1:+]; FROM_NEQ_ENVFROM(0.00)[dteske@FreeBSD.org,devin@shxd.cx]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.97)[0.971,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.56)[0.563,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.995,0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 19:58:48 -0000 > On Jan 7, 2019, at 11:45 PM, Gavin Howard = wrote: >=20 > On Mon, Jan 7, 2019 at 10:57 PM Devin Teske > wrote: >>=20 >>=20 >>=20 >>> On Jan 7, 2019, at 4:42 PM, Gavin Howard = wrote: >>>=20 >>> On Mon, Jan 7, 2019 at 5:38 PM Conrad Meyer wrote: >>>>=20 >>>> On Mon, Jan 7, 2019 at 4:00 PM Devin Teske = wrote: >>>>> How do you handle arbitrary arithmetic precision? >>>>=20 >>>> Looks like https://github.com/gavinhoward/bc/blob/master/src/num.c = . >>>=20 >>> That is correct. Because this bc is meant to help bootstrap the = Linux >>> kernel and have no dependencies other than POSIX 2008, I wrote my = own. >>=20 >> Impressive. It might be worth turning this into a library itself. >=20 > Eh...it is completely tuned for bc. And it won't be fast, > unfortunately. See below. >=20 >>> Also, the POSIX bc standard mandates doing math in decimal. OpenSSL >>> would not be smart if they did that. >>=20 >> Not sure I understand what you mean here. >=20 > Well, for starters, OpenSSL's BIGNUM is integer only. Yes, those > integers can be any size, but they are only integers. That is not good > enough for bc; it has to allow arbitrary precision, including > non-integers, and its fractional part can be any size, up to a certain > limit, which you can get from my bc by typing "limits" at the prompt > and looking for the value of BC_NUM_MAX (which is actually the maximum > number of decimal digits, period). >=20 Thanks for explaining that further. [snip] >>> There are also a few >>> peculiarities with the POSIX bc standard that (more or less) require = a >>> standalone implementation. >>>=20 >>=20 >> How hard would it be to convert a bn(3)-based library to use your = code? >> Would there be any performance impact -- I've benchmarked bn(3) to >> be pretty fast. >=20 > It would not be terribly hard, but as I said above, it would not be > fast at all, at least compared to a well-written hardware-based, > binary bignum implementation. But if you want to, go ahead; I would > appreciate the credit (though the license does not even require that). >=20 Well, unfortunately, my needs are purely whole-integer arithmetic but speed is paramount. My application of OpenSSL bn(3) is here: https://reviews.freebsd.org/D16132 Though worth noting that I haven't updated the review since November. Since then, I have made many changes which can be seen on GitHub: https://FrauBSD.org/libcmb >>> Also, right now I am working on getting a release candidate out that >>> will enable me to make a quick port that Stefan could use as a = jumping >>> off point. My build system changed between 1.0 and now, and I would >>> like to be able to test it. >>>=20 >>=20 >> Cool. Looking forward to it. >=20 > It's out. It works great. The Makefile that I sent to the mailing list > a few messages back does the job well enough, though I was told in a > private message not to use the GNU bc port's pkg-descr file, since it > might be under the GPL. >=20 > However, note that this is not the final 1.1 release; it is just for > testing, even though it is high quality. >=20 I'm wondering why you chose to write your own configure.sh instead of leveraging autotools. Also, it looks like you have a high number of build-time options. I also notice that you're into writing tests for your software. It might be = interesting to apply my tool for combining all possible combinations of build = options. Seen here: = https://github.com/FrauBSD/pkgcenter/blob/master/depend/libcmb/release/Mak= efile = It's a great way to make sure all the various build options work = together. --=20 Cheers, Devin= From owner-freebsd-arch@freebsd.org Wed Jan 9 20:47:54 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 028CE148FE94 for ; Wed, 9 Jan 2019 20:47:54 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: from mail-ua1-x943.google.com (mail-ua1-x943.google.com [IPv6:2607:f8b0:4864:20::943]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70FED75C76 for ; Wed, 9 Jan 2019 20:47:52 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: by mail-ua1-x943.google.com with SMTP id c24so2892385uak.1 for ; Wed, 09 Jan 2019 12:47:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=W/K0QXZ/T31Q1KXu9scBMSWv9yAtB97KIxMWQhNVCXA=; b=PehLjtUSnVvqzzU6Ei9N0IIStsOGfSIev6SATgvDbLL7RQ54/qUkYyHymHwuASnzFB VZfh/xG2M3aZcCJkqRFYAclovnIJV84aVhYVhemrs8GG8KRpDGVmsC9fGpHL+Nm/Mkpz 9EcnRH22GY0K/tsagXwCXOZgIeNaiWY/wSkzQ+c8F5zZxLCd83FTWRmozIPo/9HbKssj 5SKia7HG69UFC6sECOY+dBdeiFvyUdmDWYyE3RsbkDwc+1WBYKLD5vj8Qutd3v8yjUNK YkafAUFU/EeNVgfxnMv8wQk3WCFZw6sT0ILo7dkzZ79ljTqUWP1GOjP9LCjtNjb+Wtkq kztg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=W/K0QXZ/T31Q1KXu9scBMSWv9yAtB97KIxMWQhNVCXA=; b=TTFWSyw+p4dNeW11wY03kUK/kWC3wM/8BmdNS/7eLkcQedcBkecfaMkd+05nFO8yk7 kUZ3STqGEGvQt22ticnn5KK8K/LqMUxRMwRCuO/6V9IAvr50MZjiIqLDyBIEq+QPt0Rp vCCpT7ohawpyM5Vzil0L/CqKoaJtvOKZX0TxIcwZwojk02/l9iLx/2LplSV2M4lTZcCZ WC316M3lNeT64t/VIqRIpn5M50UCKFpf26DTNApB73hj+ndR9GFMWW1MLS+UPX2anAIN K7uXN5r0Y0d9GmPObH6CRm3CyquduWa7fSgxiqFjsZjX8Li/efv/Sto8cL5Og+el6i43 YRbQ== X-Gm-Message-State: AJcUukcn7GUp2tv6kC04oc31ukHMv48XN+JYyBX2rfM1dLzbW3/qVrFr oh8z6zu2Fwla8r8SbvXIYqEesmxgURXmhm8JeA5kjw== X-Google-Smtp-Source: ALg8bN6Mtw3aYZ5LycTsLmHy9m4s+N31EgBHyoJNAL3BWBKN+Wkr++HcE/i1lYSxnkgVTyzN+MCsytNCLJ8UNdowd9I= X-Received: by 2002:a9f:376c:: with SMTP id a41mr2792458uae.131.1547066871370; Wed, 09 Jan 2019 12:47:51 -0800 (PST) MIME-Version: 1.0 References: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> <61F802DC-2E59-4E0A-955D-899EBD7874A1@FreeBSD.org> In-Reply-To: From: Gavin Howard Date: Wed, 9 Jan 2019 13:47:14 -0700 Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 70FED75C76 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=PehLjtUS; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gavindhoward@gmail.com designates 2607:f8b0:4864:20::943 as permitted sender) smtp.mailfrom=gavindhoward@gmail.com X-Spamd-Result: default: False [-3.55 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.30)[-0.296,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.990,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-0.25)[ip: (2.81), ipnet: 2607:f8b0::/32(-2.27), asn: 15169(-1.72), country: US(-0.08)]; RCVD_IN_DNSWL_NONE(0.00)[3.4.9.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; TO_DN_EQ_ADDR_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 20:47:54 -0000 On Wed, Jan 9, 2019 at 12:58 PM Devin Teske wrote: > > > > On Jan 7, 2019, at 11:45 PM, Gavin Howard wrote: > > On Mon, Jan 7, 2019 at 10:57 PM Devin Teske wrote: > > > > > On Jan 7, 2019, at 4:42 PM, Gavin Howard wrote: > > On Mon, Jan 7, 2019 at 5:38 PM Conrad Meyer wrote: > > > On Mon, Jan 7, 2019 at 4:00 PM Devin Teske wrote: > > How do you handle arbitrary arithmetic precision? > > > Looks like https://github.com/gavinhoward/bc/blob/master/src/num.c . > > > That is correct. Because this bc is meant to help bootstrap the Linux > kernel and have no dependencies other than POSIX 2008, I wrote my own. > > > Impressive. It might be worth turning this into a library itself. > > > Eh...it is completely tuned for bc. And it won't be fast, > unfortunately. See below. > > Also, the POSIX bc standard mandates doing math in decimal. OpenSSL > would not be smart if they did that. > > > Not sure I understand what you mean here. > > > Well, for starters, OpenSSL's BIGNUM is integer only. Yes, those > integers can be any size, but they are only integers. That is not good > enough for bc; it has to allow arbitrary precision, including > non-integers, and its fractional part can be any size, up to a certain > limit, which you can get from my bc by typing "limits" at the prompt > and looking for the value of BC_NUM_MAX (which is actually the maximum > number of decimal digits, period). > > > Thanks for explaining that further. > > [snip] > > There are also a few > peculiarities with the POSIX bc standard that (more or less) require a > standalone implementation. > > > How hard would it be to convert a bn(3)-based library to use your code? > Would there be any performance impact -- I've benchmarked bn(3) to > be pretty fast. > > > It would not be terribly hard, but as I said above, it would not be > fast at all, at least compared to a well-written hardware-based, > binary bignum implementation. But if you want to, go ahead; I would > appreciate the credit (though the license does not even require that). > > > Well, unfortunately, my needs are purely whole-integer arithmetic but > speed is paramount. > > My application of OpenSSL bn(3) is here: > https://reviews.freebsd.org/D16132 > > Though worth noting that I haven't updated the review since November. > Since then, I have made many changes which can be seen on GitHub: > https://FrauBSD.org/libcmb > > > > Also, right now I am working on getting a release candidate out that > will enable me to make a quick port that Stefan could use as a jumping > off point. My build system changed between 1.0 and now, and I would > like to be able to test it. > > > Cool. Looking forward to it. > > > It's out. It works great. The Makefile that I sent to the mailing list > a few messages back does the job well enough, though I was told in a > private message not to use the GNU bc port's pkg-descr file, since it > might be under the GPL. > > However, note that this is not the final 1.1 release; it is just for > testing, even though it is high quality. > > > I'm wondering why you chose to write your own configure.sh instead of > leveraging autotools. I had a goal of absolutely zero dependencies (that is one reason why I imported and adapted an existing history implementation instead of just making readline or editline an optional dependency). That was also why I wrote a custom parser, even though it is complicated, rather than using Lex/Flex and YACC/Bison. Autotools would be a dependency, so I wrote a custom one. > Also, it looks like you have a high number of build-time options. I also > notice that you're into writing tests for your software. It might be interesting > to apply my tool for combining all possible combinations of build options. > > Seen here: > https://github.com/FrauBSD/pkgcenter/blob/master/depend/libcmb/release/Makefile > > It's a great way to make sure all the various build options work together. > -- > Cheers, > Devin Thank you. It looks interesting, though unfortunately, some of my build options are exclusive (for example, the `-b` and `-d` flags to the `configure.sh` script cannot both be used at the same time), and from a cursory glance, I can't tell if libcmb can handle them. I do have a way of testing all of the (valid) build option combinations in `release.sh`, which is a script I run before every release. It tests that it compiles without error and/or warnings on gcc and clang, in debug, release, reldebug, and min size modes, running the test suite on every build. It also runs the test suite under ASan, UBSan, MSan, and Valgrind. (I think it runs 532 builds and does the test suite for all of them.) It takes 5 hours 20 minutes to run on my fast, custom-built machine. And then on top of that, I have a script to generate random math problems (`tests/randmath.py`), which I run for about 10 million iterations. And then I run the afl fuzzer for at least 100 cycles on both calculators, fixing every single crash it finds. I am doing the latter two right now, and if it passes, the release will be out right after that. Gavin Howard From owner-freebsd-arch@freebsd.org Wed Jan 9 21:26:28 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4DAD1490DFB for ; Wed, 9 Jan 2019 21:26:27 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 769DB7726A; Wed, 9 Jan 2019 21:26:26 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=51585 helo=[10.1.7.18]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ghLMm-00017p-GI; Wed, 09 Jan 2019 13:26:24 -0800 From: Devin Teske Message-Id: Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: GNU-compatible, BSD-licensed bc Date: Wed, 9 Jan 2019 13:26:23 -0800 In-Reply-To: Cc: Devin Teske , "freebsd-arch@freebsd.org" To: Gavin Howard References: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> <61F802DC-2E59-4E0A-955D-899EBD7874A1@FreeBSD.org> X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: 769DB7726A X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.27 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MX_GOOD(-0.01)[cached: mail.shxd.cx]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[dteske@FreeBSD.org,devin@shxd.cx]; IP_SCORE(0.23)[ip: (0.65), ipnet: 64.201.240.0/20(0.32), asn: 36734(0.26), country: US(-0.08)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:36734, ipnet:64.201.240.0/20, country:US]; MIME_TRACE(0.00)[0:+,1:+]; FROM_NEQ_ENVFROM(0.00)[dteske@FreeBSD.org,devin@shxd.cx]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.89)[0.889,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.47)[0.465,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.99)[0.994,0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 21:26:28 -0000 > On Jan 9, 2019, at 12:47 PM, Gavin Howard = wrote: >=20 > On Wed, Jan 9, 2019 at 12:58 PM Devin Teske > wrote: >>=20 >>=20 >>=20 >> On Jan 7, 2019, at 11:45 PM, Gavin Howard = wrote: >>=20 >> On Mon, Jan 7, 2019 at 10:57 PM Devin Teske = wrote: >>=20 >>=20 >>=20 >>=20 >> On Jan 7, 2019, at 4:42 PM, Gavin Howard = wrote: >>=20 >> On Mon, Jan 7, 2019 at 5:38 PM Conrad Meyer wrote: >>=20 >>=20 >> On Mon, Jan 7, 2019 at 4:00 PM Devin Teske = wrote: >>=20 >> How do you handle arbitrary arithmetic precision? >>=20 >>=20 >> Looks like https://github.com/gavinhoward/bc/blob/master/src/num.c . >>=20 >>=20 >> That is correct. Because this bc is meant to help bootstrap the Linux >> kernel and have no dependencies other than POSIX 2008, I wrote my = own. >>=20 >>=20 >> Impressive. It might be worth turning this into a library itself. >>=20 >>=20 >> Eh...it is completely tuned for bc. And it won't be fast, >> unfortunately. See below. >>=20 >> Also, the POSIX bc standard mandates doing math in decimal. OpenSSL >> would not be smart if they did that. >>=20 >>=20 >> Not sure I understand what you mean here. >>=20 >>=20 >> Well, for starters, OpenSSL's BIGNUM is integer only. Yes, those >> integers can be any size, but they are only integers. That is not = good >> enough for bc; it has to allow arbitrary precision, including >> non-integers, and its fractional part can be any size, up to a = certain >> limit, which you can get from my bc by typing "limits" at the prompt >> and looking for the value of BC_NUM_MAX (which is actually the = maximum >> number of decimal digits, period). >>=20 >>=20 >> Thanks for explaining that further. >>=20 >> [snip] >>=20 >> There are also a few >> peculiarities with the POSIX bc standard that (more or less) require = a >> standalone implementation. >>=20 >>=20 >> How hard would it be to convert a bn(3)-based library to use your = code? >> Would there be any performance impact -- I've benchmarked bn(3) to >> be pretty fast. >>=20 >>=20 >> It would not be terribly hard, but as I said above, it would not be >> fast at all, at least compared to a well-written hardware-based, >> binary bignum implementation. But if you want to, go ahead; I would >> appreciate the credit (though the license does not even require = that). >>=20 >>=20 >> Well, unfortunately, my needs are purely whole-integer arithmetic but >> speed is paramount. >>=20 >> My application of OpenSSL bn(3) is here: >> https://reviews.freebsd.org/D16132 >>=20 >> Though worth noting that I haven't updated the review since November. >> Since then, I have made many changes which can be seen on GitHub: >> https://FrauBSD.org/libcmb >>=20 >>=20 >>=20 >> Also, right now I am working on getting a release candidate out that >> will enable me to make a quick port that Stefan could use as a = jumping >> off point. My build system changed between 1.0 and now, and I would >> like to be able to test it. >>=20 >>=20 >> Cool. Looking forward to it. >>=20 >>=20 >> It's out. It works great. The Makefile that I sent to the mailing = list >> a few messages back does the job well enough, though I was told in a >> private message not to use the GNU bc port's pkg-descr file, since it >> might be under the GPL. >>=20 >> However, note that this is not the final 1.1 release; it is just for >> testing, even though it is high quality. >>=20 >>=20 >> I'm wondering why you chose to write your own configure.sh instead of >> leveraging autotools. >=20 > I had a goal of absolutely zero dependencies (that is one reason why I > imported and adapted an existing history implementation instead of > just making readline or editline an optional dependency). That was > also why I wrote a custom parser, even though it is complicated, > rather than using Lex/Flex and YACC/Bison. Autotools would be a > dependency, so I wrote a custom one. >=20 >> Also, it looks like you have a high number of build-time options. I = also >> notice that you're into writing tests for your software. It might be = interesting >> to apply my tool for combining all possible combinations of build = options. >>=20 >> Seen here: >> = https://github.com/FrauBSD/pkgcenter/blob/master/depend/libcmb/release/Mak= efile = >>=20 >> It's a great way to make sure all the various build options work = together. >> -- >> Cheers, >> Devin >=20 > Thank you. It looks interesting, though unfortunately, some of my > build options are exclusive (for example, the `-b` and `-d` flags to > the `configure.sh` script cannot both be used at the same time), and > from a cursory glance, I can't tell if libcmb can handle them. >=20 You likely would not use libcmb directly in the build process but rather the cmb utility to provide your combinations. For example, taking into account that -b and -d are exclusive: cmb -e -- -E -g -G -H "-k 64" "-O3" -S Produces 128 lines, each line representing a unique combination of the = above options. You could, for each unique combination, then perform one as-is, one with = "-d", one with "-B", etc. Latest version of cmb is here: https://FrauBSD.org/cmb Which depends on libcmb: https://FrauBSD.org/libcmb > I do have a way of testing all of the (valid) build option > combinations in `release.sh`, which is a script I run before every > release. It tests that it compiles without error and/or warnings on > gcc and clang, in debug, release, reldebug, and min size modes, > running the test suite on every build. release.sh could be enhanced to support more than 16 variants in = runtestseries() I have a similar release process for libcmb/cmb (previously linked) = except instead of just -Wall, I am a glutton for punishment by using with = clang: -Weverything -Werror > It also runs the test suite > under ASan, UBSan, MSan, and Valgrind. (I think it runs 532 builds and > does the test suite for all of them.) It takes 5 hours 20 minutes to > run on my fast, custom-built machine. >=20 Impressive! > And then on top of that, I have a script to generate random math > problems (`tests/randmath.py`), which I run for about 10 million > iterations. And then I run the afl fuzzer for at least 100 cycles on > both calculators, fixing every single crash it finds. I am doing the > latter two right now, and if it passes, the release will be out right > after that. >=20 Sweet, looking forward. Excellent work. --=20 Devin= From owner-freebsd-arch@freebsd.org Wed Jan 9 22:42:11 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C32A1492A40 for ; Wed, 9 Jan 2019 22:42:11 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: from mail-vs1-xe30.google.com (mail-vs1-xe30.google.com [IPv6:2607:f8b0:4864:20::e30]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7091481F01 for ; Wed, 9 Jan 2019 22:42:09 +0000 (UTC) (envelope-from gavin.d.howard@gmail.com) Received: by mail-vs1-xe30.google.com with SMTP id b74so5823266vsd.9 for ; Wed, 09 Jan 2019 14:42:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=lfV5PnVW+uq40hTiKTRH+4CCOE0j9UZj/8SFczFsA4I=; b=fOvpQkjoT94zqVKa1B18+L9Zw8g7K5UQDdt1dK0CjiPB5NHC2FUSJcc7JFjzZ/9HJv EB4l/LzbdHLYMEkMBcoiNPsNntoU5faI6Mc2RGf+iBO8nx4MTMviVJCrE8N6jkR8aBDw bEKGxQJSVYmk96BAa46k/VDzc+iGSC4/3leE2+5UygviwUbKLqqky0RNIUL8tq99Y0TP QWmGkB1tZTzpSMnGxKHfMpxh9OeTy93fsT54hiemKfCYp6v6upz5a4ZVAAx4byV64brQ C87C92aqnHLOTjoI2OSh1N1riadaGj+sQD+pDibsJ17Sp9ND0qiAackRVg1yA481l3/9 HSmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=lfV5PnVW+uq40hTiKTRH+4CCOE0j9UZj/8SFczFsA4I=; b=BlOdsoJ06VuXPB9wFjcEKeZmV+B2WU8b6KpEiwCRaYuOeomYie1kTdsoBDPVkLDech QCVrrkv53RAgtfq1gSI+2D7tvRs5vMRO57LugO8eGqpmq5W2MbLactTOch8xtnaVjDUA QIi3mMoyOeKfEknVwkOjUoe5TJ3LCTpSdIlN8Fal/wuKplW8Ftc5UDmcFG9G5JnzvM7N 6iEDmQ5vzDL3DWgAEcomLLyCAf/Ludku6OLNl2KL9mjN8UWHLdX7sreLsZ5n8m466dRG ZEZ6OOhIW2o4Qew0789B3NfDKwquY4PX+IwoSyLt0y8UlhQTQBvB17/7Wu+t4w3Xob0Z SPZQ== X-Gm-Message-State: AJcUukfoWaB7rC77htoxqoAm5LbIsjBtlxEJyXDDyKZ+nMC7QGwFIv6X 6AmpwiIXfvTk66LN46kR6SwrWwiHRLFzb9SnPbt8Ig== X-Google-Smtp-Source: ALg8bN7hqPOnA8/2Ip9NKTwoqbbBGvWC+VobyspI9Hx7+/z9bXphZA5iut9injL4A1b/POEc31CDW/U/KOqaImsZ5Tg= X-Received: by 2002:a67:5bdc:: with SMTP id w89mr3328907vsg.109.1547073726617; Wed, 09 Jan 2019 14:42:06 -0800 (PST) MIME-Version: 1.0 References: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> <61F802DC-2E59-4E0A-955D-899EBD7874A1@FreeBSD.org> In-Reply-To: From: Gavin Howard Date: Wed, 9 Jan 2019 15:41:29 -0700 Message-ID: Subject: Re: GNU-compatible, BSD-licensed bc To: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 7091481F01 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=fOvpQkjo; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gavindhoward@gmail.com designates 2607:f8b0:4864:20::e30 as permitted sender) smtp.mailfrom=gavindhoward@gmail.com X-Spamd-Result: default: False [-6.73 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.94)[-0.940,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-2.78)[ip: (-9.84), ipnet: 2607:f8b0::/32(-2.27), asn: 15169(-1.72), country: US(-0.08)]; RCVD_IN_DNSWL_NONE(0.00)[0.3.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; TO_DN_EQ_ADDR_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 22:42:11 -0000 On Wed, Jan 9, 2019 at 2:26 PM Devin Teske wrote: > > > > On Jan 9, 2019, at 12:47 PM, Gavin Howard wrote: > > On Wed, Jan 9, 2019 at 12:58 PM Devin Teske wrote: > > > > > On Jan 7, 2019, at 11:45 PM, Gavin Howard wrote: > > On Mon, Jan 7, 2019 at 10:57 PM Devin Teske wrote: > > > > > On Jan 7, 2019, at 4:42 PM, Gavin Howard wrote: > > On Mon, Jan 7, 2019 at 5:38 PM Conrad Meyer wrote: > > > On Mon, Jan 7, 2019 at 4:00 PM Devin Teske wrote: > > How do you handle arbitrary arithmetic precision? > > > Looks like https://github.com/gavinhoward/bc/blob/master/src/num.c . > > > That is correct. Because this bc is meant to help bootstrap the Linux > kernel and have no dependencies other than POSIX 2008, I wrote my own. > > > Impressive. It might be worth turning this into a library itself. > > > Eh...it is completely tuned for bc. And it won't be fast, > unfortunately. See below. > > Also, the POSIX bc standard mandates doing math in decimal. OpenSSL > would not be smart if they did that. > > > Not sure I understand what you mean here. > > > Well, for starters, OpenSSL's BIGNUM is integer only. Yes, those > integers can be any size, but they are only integers. That is not good > enough for bc; it has to allow arbitrary precision, including > non-integers, and its fractional part can be any size, up to a certain > limit, which you can get from my bc by typing "limits" at the prompt > and looking for the value of BC_NUM_MAX (which is actually the maximum > number of decimal digits, period). > > > Thanks for explaining that further. > > [snip] > > There are also a few > peculiarities with the POSIX bc standard that (more or less) require a > standalone implementation. > > > How hard would it be to convert a bn(3)-based library to use your code? > Would there be any performance impact -- I've benchmarked bn(3) to > be pretty fast. > > > It would not be terribly hard, but as I said above, it would not be > fast at all, at least compared to a well-written hardware-based, > binary bignum implementation. But if you want to, go ahead; I would > appreciate the credit (though the license does not even require that). > > > Well, unfortunately, my needs are purely whole-integer arithmetic but > speed is paramount. > > My application of OpenSSL bn(3) is here: > https://reviews.freebsd.org/D16132 > > Though worth noting that I haven't updated the review since November. > Since then, I have made many changes which can be seen on GitHub: > https://FrauBSD.org/libcmb > > > > Also, right now I am working on getting a release candidate out that > will enable me to make a quick port that Stefan could use as a jumping > off point. My build system changed between 1.0 and now, and I would > like to be able to test it. > > > Cool. Looking forward to it. > > > It's out. It works great. The Makefile that I sent to the mailing list > a few messages back does the job well enough, though I was told in a > private message not to use the GNU bc port's pkg-descr file, since it > might be under the GPL. > > However, note that this is not the final 1.1 release; it is just for > testing, even though it is high quality. > > > I'm wondering why you chose to write your own configure.sh instead of > leveraging autotools. > > > I had a goal of absolutely zero dependencies (that is one reason why I > imported and adapted an existing history implementation instead of > just making readline or editline an optional dependency). That was > also why I wrote a custom parser, even though it is complicated, > rather than using Lex/Flex and YACC/Bison. Autotools would be a > dependency, so I wrote a custom one. > > Also, it looks like you have a high number of build-time options. I also > notice that you're into writing tests for your software. It might be interesting > to apply my tool for combining all possible combinations of build options. > > Seen here: > https://github.com/FrauBSD/pkgcenter/blob/master/depend/libcmb/release/Makefile > > It's a great way to make sure all the various build options work together. > -- > Cheers, > Devin > > > Thank you. It looks interesting, though unfortunately, some of my > build options are exclusive (for example, the `-b` and `-d` flags to > the `configure.sh` script cannot both be used at the same time), and > from a cursory glance, I can't tell if libcmb can handle them. > > > You likely would not use libcmb directly in the build process but rather > the cmb utility to provide your combinations. > > For example, taking into account that -b and -d are exclusive: > > cmb -e -- -E -g -G -H "-k 64" "-O3" -S > > Produces 128 lines, each line representing a unique combination of the above options. > > You could, for each unique combination, then perform one as-is, one with "-d", one > with "-B", etc. > > Latest version of cmb is here: > https://FrauBSD.org/cmb > > Which depends on libcmb: > https://FrauBSD.org/libcmb Oh, okay. > I do have a way of testing all of the (valid) build option > combinations in `release.sh`, which is a script I run before every > release. It tests that it compiles without error and/or warnings on > gcc and clang, in debug, release, reldebug, and min size modes, > running the test suite on every build. > > > release.sh could be enhanced to support more than 16 variants in runtestseries() True... > I have a similar release process for libcmb/cmb (previously linked) except > instead of just -Wall, I am a glutton for punishment by using with clang: > > -Weverything -Werror I am not so good with compiler options. Is `-Weverything` more strict than `-Wall -Wextra`? > It also runs the test suite > under ASan, UBSan, MSan, and Valgrind. (I think it runs 532 builds and > does the test suite for all of them.) It takes 5 hours 20 minutes to > run on my fast, custom-built machine. > > > Impressive! > > > And then on top of that, I have a script to generate random math > problems (`tests/randmath.py`), which I run for about 10 million > iterations. And then I run the afl fuzzer for at least 100 cycles on > both calculators, fixing every single crash it finds. I am doing the > latter two right now, and if it passes, the release will be out right > after that. > > > Sweet, looking forward. Excellent work. > -- > Devin Thank you. Gavin Howard From owner-freebsd-arch@freebsd.org Wed Jan 9 23:03:01 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 545FB1493146 for ; Wed, 9 Jan 2019 23:03:01 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27F3182A9F; Wed, 9 Jan 2019 23:03:00 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=52289 helo=[10.1.7.18]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ghMsE-0002XG-8N; Wed, 09 Jan 2019 15:02:58 -0800 From: Devin Teske Message-Id: <54ECF149-5ACD-4568-ADF5-FB4736B35DA1@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: GNU-compatible, BSD-licensed bc Date: Wed, 9 Jan 2019 15:02:57 -0800 In-Reply-To: Cc: Devin Teske , "freebsd-arch@freebsd.org" To: Gavin Howard References: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> <61F802DC-2E59-4E0A-955D-899EBD7874A1@FreeBSD.org> X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: 27F3182A9F X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.63 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MX_GOOD(-0.01)[cached: mail.shxd.cx]; FORGED_SENDER(0.30)[dteske@FreeBSD.org,devin@shxd.cx]; FREEMAIL_TO(0.00)[gmail.com]; IP_SCORE(0.31)[ip: (0.85), ipnet: 64.201.240.0/20(0.42), asn: 36734(0.34), country: US(-0.08)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:36734, ipnet:64.201.240.0/20, country:US]; MIME_TRACE(0.00)[0:+,1:+]; FROM_NEQ_ENVFROM(0.00)[dteske@FreeBSD.org,devin@shxd.cx]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.98)[0.982,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.66)[0.660,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.997,0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 23:03:01 -0000 > On Jan 9, 2019, at 2:41 PM, Gavin Howard = wrote: >=20 > On Wed, Jan 9, 2019 at 2:26 PM Devin Teske > wrote: >>=20 >>=20 >> [snip] >> I have a similar release process for libcmb/cmb (previously linked) = except >> instead of just -Wall, I am a glutton for punishment by using with = clang: >>=20 >> -Weverything -Werror >=20 > I am not so good with compiler options. Is `-Weverything` more strict > than `-Wall -Wextra`? >=20 Yes. -Weverything is the strictest I have ever seen. Often times I find that software cannot be compiled with -Weverything = despite passing -Wall -Wextra because some of the system/library headers fail = checks. I've often considered a great accomplishment when I can pass = -Weverything. --=20 Devin= From owner-freebsd-arch@freebsd.org Wed Jan 9 23:07:24 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0423149321A for ; Wed, 9 Jan 2019 23:07:24 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (muon.bluestop.org [96.73.9.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A5A482C8D; Wed, 9 Jan 2019 23:07:23 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (localhost [127.0.0.1]) by muon.bluestop.org (Postfix) with ESMTP id 7FDF130183; Wed, 9 Jan 2019 16:08:12 -0700 (MST) Received: from muon.bluestop.org ([127.0.0.1]) by muon.bluestop.org (muon.bluestop.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zm64zx_VtFqI; Wed, 9 Jan 2019 16:08:12 -0700 (MST) Received: from Rebeccas-iPhone.mail (gw.bluestop.org [96.73.9.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTPSA; Wed, 9 Jan 2019 16:08:12 -0700 (MST) Date: Wed, 9 Jan 2019 16:04:32 -0700 From: Rebecca Cran To: Gavin Howard , Devin Teske Cc: Devin Teske , "=?utf-8?Q?freebsd-arch=40freebsd.org?=" Message-ID: In-Reply-To: <54ECF149-5ACD-4568-ADF5-FB4736B35DA1@FreeBSD.org> References: <54ECF149-5ACD-4568-ADF5-FB4736B35DA1@FreeBSD.org> Subject: Re: GNU-compatible, BSD-licensed bc MIME-Version: 1.0 X-Rspamd-Queue-Id: 9A5A482C8D X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.79 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; CC_EXCESS_QP(1.20)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[bluestop.org:+]; MX_GOOD(-0.01)[cached: mail.bluestop.org]; DMARC_POLICY_ALLOW(-0.50)[bluestop.org,quarantine]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(-2.99)[ip: (-9.66), ipnet: 96.64.0.0/11(-4.44), asn: 7922(-0.75), country: US(-0.08)]; MIME_TRACE(0.00)[0:+,1:+]; ASN(0.00)[asn:7922, ipnet:96.64.0.0/11, country:US]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bluestop.org:s=mail]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 23:07:25 -0000 On January 9, 2019 at 4:02:57 PM, Devin Teske (dteske=40freebsd.org(mailt= o:dteske=40freebsd.org)) wrote: > =20 > Yes. -Weverything is the strictest I have ever seen. > =20 > Often times I find that software cannot be compiled with -Weverything d= espite > passing -Wall -Wextra because some of the system/library headers fail c= hecks. > =20 > I've often considered a great accomplishment when I can pass -Weverythi= ng. =20 =46rom https://embeddedartistry.com/blog/2017/3/7/clang-weverything : =E2=80=9CClang helpfully provides a flag called -Weverything. Unlike -Wal= l, the -Weverything flag really will enable all warnings. This flag is es= pecially useful if you are a warning lover - new warnings will automatica= lly be enabled when you upgrade clang/Xcode. =20 Turning -Weverything can be an eye-opening experience, even for those who= religiously squash warnings. I often turn on -Weverything temporarily to= review any of the less-common warnings and see what's worth fixing in my= code base.=E2=80=9D From owner-freebsd-arch@freebsd.org Wed Jan 9 23:12:16 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FD8B14932D6 for ; Wed, 9 Jan 2019 23:12:16 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5592782FF6; Wed, 9 Jan 2019 23:12:15 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=52419 helo=[10.1.7.18]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ghN1B-0002fz-Ai; Wed, 09 Jan 2019 15:12:13 -0800 From: Devin Teske Message-Id: <9AEFA857-D93C-403C-B422-5A41B20E0DCA@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: GNU-compatible, BSD-licensed bc Date: Wed, 9 Jan 2019 15:12:12 -0800 In-Reply-To: Cc: Devin Teske , Gavin Howard , "freebsd-arch@freebsd.org" To: Rebecca Cran References: <54ECF149-5ACD-4568-ADF5-FB4736B35DA1@FreeBSD.org> X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: 5592782FF6 X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.57 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MX_GOOD(-0.01)[cached: mail.shxd.cx]; FORGED_SENDER(0.30)[dteske@FreeBSD.org,devin@shxd.cx]; IP_SCORE(0.30)[ip: (0.83), ipnet: 64.201.240.0/20(0.41), asn: 36734(0.33), country: US(-0.08)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:36734, ipnet:64.201.240.0/20, country:US]; MIME_TRACE(0.00)[0:+,1:+]; FROM_NEQ_ENVFROM(0.00)[dteske@FreeBSD.org,devin@shxd.cx]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.96)[0.955,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.63)[0.629,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.995,0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 23:12:16 -0000 > On Jan 9, 2019, at 3:04 PM, Rebecca Cran wrote: >=20 > On January 9, 2019 at 4:02:57 PM, Devin Teske (dteske@freebsd.org = ) wrote: >=20 >>=20 >> Yes. -Weverything is the strictest I have ever seen.=20 >>=20 >> Often times I find that software cannot be compiled with -Weverything = despite=20 >> passing -Wall -Wextra because some of the system/library headers fail = checks.=20 >>=20 >> I've often considered a great accomplishment when I can pass = -Weverything. > =46rom https://embeddedartistry.com/blog/2017/3/7/clang-weverything = : >=20 > =E2=80=9CClang helpfully provides a flag called -Weverything. Unlike = -Wall, the -Weverything flag really will enable all warnings. This flag = is especially useful if you are a warning lover - new warnings will = automatically be enabled when you upgrade clang/Xcode.=20 >=20 > Turning -Weverything can be an eye-opening experience, even for those = who religiously squash warnings. I often turn on -Weverything = temporarily to review any of the less-common warnings and see what's = worth fixing in my code base.=E2=80=9D >=20 >=20 >=20 With few exceptions, I've made it the default for one of my latest = projects: = https://github.com/FrauBSD/pkgcenter/blob/master/depend/libcmb/configure.i= n = AS_IF(test "$CC" =3D clang, [ CFLAGS=3D"${CFLAGS:+$CFLAGS }$( echo \ -Weverything \ -Wno-extra-semi \ -Wno-padded \ -Wno-reserved-id-macro \ -Wno-unused-macros \ )" ]) --=20 Devin= From owner-freebsd-arch@freebsd.org Thu Jan 10 15:02:01 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4C42148E2BC for ; Thu, 10 Jan 2019 15:02:01 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 815FF8721B; Thu, 10 Jan 2019 15:02:00 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [76.77.180.168] (port=53578 helo=eskarina.lan) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1ghbqI-000JZ0-F1; Thu, 10 Jan 2019 07:01:58 -0800 From: Devin Teske Message-Id: Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: GNU-compatible, BSD-licensed bc Date: Thu, 10 Jan 2019 07:01:57 -0800 In-Reply-To: Cc: Devin Teske , "freebsd-arch@freebsd.org" To: Gavin Howard References: <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> <61F802DC-2E59-4E0A-955D-899EBD7874A1@FreeBSD.org> X-Mailer: Apple Mail (2.3445.9.1) Sender: devin@shxd.cx X-Rspamd-Queue-Id: 815FF8721B X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.70 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MX_GOOD(-0.01)[cached: mail.shxd.cx]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[dteske@FreeBSD.org,devin@shxd.cx]; IP_SCORE(0.32)[ip: (0.88), ipnet: 64.201.240.0/20(0.44), asn: 36734(0.35), country: US(-0.08)]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:36734, ipnet:64.201.240.0/20, country:US]; MIME_TRACE(0.00)[0:+,1:+]; FROM_NEQ_ENVFROM(0.00)[dteske@FreeBSD.org,devin@shxd.cx]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.87)[0.867,0]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.83)[0.827,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[0.997,0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 15:02:02 -0000 > On Jan 9, 2019, at 2:41 PM, Gavin Howard = wrote: >=20 >> release.sh could be enhanced to support more than 16 variants in = runtestseries() >=20 > True... If you want, I wrote a pure-bourne shell version of libcmb 16 years ago. It provides a zero-dependency combinatoric engine that was built = specifically for the purpose of iterating over build options to test compilation = variants. https://pastebin.com/6BXx8kTq It's BSD-licensed, so you can take it and use it for whatever nefarious = purpose. --=20 Cheers, Devin ASIDE: Well, I guess, technically, it has *one* dependency -- /bin/sh= From owner-freebsd-arch@freebsd.org Fri Jan 11 11:45:02 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B3B7148BC55 for ; Fri, 11 Jan 2019 11:45:02 +0000 (UTC) (envelope-from yogimac@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8085E956A1 for ; Fri, 11 Jan 2019 11:45:01 +0000 (UTC) (envelope-from yogimac@gmx.de) Received: from YogisMacintosh5.fritz.box ([79.214.237.237]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LnPGI-1hC43n1SsY-00hcPt for ; Fri, 11 Jan 2019 12:44:53 +0100 To: freebsd-arch@FreeBSD.org From: "Yogi M. Schneider" Subject: FreeBSD mit Power 9 Prozessor Message-ID: Date: Fri, 11 Jan 2019 12:44:52 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: de-DE X-Provags-ID: V03:K1:18Ly0g126zRTVK/tJTWlr5sjksy5RVAtYOcenJoGQXHwG/3CEvl w190nA1KR+OGpk3lJdpde7p7waKUVViTIm9zuQuk3GxkInL3c0/A4GzpieIgbW4FMnUym// nicSwLUj6w54WRTGtKVDu7pZVNKJkzcEejxOq3iqgtni0FwZuDPS5BxzU2SGn2xKgsxry6C Dw+dLDXcyo8pgo3eIbY2g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:B/02Fq/N/5M=:fFzuk4FFvX6VmQ8kaMuWvV l/ANDZtKwaKUM/uOhSoDDD13czydbZx3uTR7PaGIPRAEb6UcEXmzPQQQnuJVLS8CJGkEIzLx1 iPnQf2pGiKxTZjKtbqO8ks9Cx/vt2lSF6MbyZ3mS0GujV0HH5AFDXk3s0mGELCkCQEN2kehwE +dC17XJfUczEqWby8TCkgb4Aq6vwP/MmjY5eCzVpgyKaWNfTX+/ajzgUNaEPJj4eWnJ61ORaV 8FLxsR0YffFZwADEED16w5WZJfuHYurN1pk3CA566SUZ2ZBl/2HkAMtdyHbgQXNjomvgqsfeW PN99PAj2YK73dkT/AvHrwyTY/31OE1R6gy74KXVI5B+tXycaFeKBVyKZr5/7nBIpqCIswvH4c G295bLN4wHcCuSsJyeo54Vao7uwuI11HBoniFYLSoXQLquX4EBIUOoXM8qGgu1R45Z6sI5hn/ ruithR3yohHccxeTW/ezc00TvugZATVL1ssLjiVDpceomM/WydhIQI/ACJxqvP8LjZE7/pBN1 cP+pdfBGDokaYI4NZODDBwm/mNU9FCclVwex8Cd7ysfvC0KOAeWe5XyKBOnfnwdA3qG1LfgsT 6EcfKdadNHWwvc9ze+5SevSKigSVGV+0yXxFT08wBVqidLejaTdeE1UsH82gtLTxDqF0x1H/w apVHNa55zTL69AvRJQuT/WiYLeYVX/R9+a0kax/iZ8YgHg2hRmg6dKws5bxHtKSxMiejAFkyO 20QLkqwYuo1YdpIkS+teyB4yWJlc+7E6FVzFe6BA/NLuZUVdmZkixf2O3dPkWLzr0xbBBkL2M sXqUvsiOF9nrkBCu4zJwFd/AX6LKQaxw9QnoOhTGHwj/UWrwjHHbDa4Z7xjjpOAMFya5VqmrA 5euEBo2l3rzWBh2aAtQWtM6DBjoelR4fkwxC09LsCVvLKpTvsHVhbKoa8DPcTo X-Rspamd-Queue-Id: 8085E956A1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of yogimac@gmx.de designates 212.227.15.18 as permitted sender) smtp.mailfrom=yogimac@gmx.de X-Spamd-Result: default: False [-4.17 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.227.15.0/25]; FREEMAIL_FROM(0.00)[gmx.de]; TO_DN_NONE(0.00)[]; MX_GOOD(-0.01)[mx00.emig.gmx.net,mx01.emig.gmx.net]; NEURAL_HAM_SHORT(-0.77)[-0.771,0]; RCVD_IN_DNSWL_LOW(-0.10)[18.15.227.212.list.dnswl.org : 127.0.3.1]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmx.de]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[237.237.214.79.zen.spamhaus.org : 127.0.0.10]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[gmx.de]; IP_SCORE(-0.99)[ip: (-4.99), ipnet: 212.227.0.0/16(-0.63), asn: 8560(0.69), country: DE(-0.01)]; RWL_MAILSPIKE_POSSIBLE(0.00)[18.15.227.212.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 11:45:02 -0000 Hallo, hat schon jemand FreeBSD auf einer IBM LC921 oder LC922  mit 2x Power 9 Prozessoren ausprobiert. Wäre Super wenn mir jemand hierüber Bescheid geben könnte, habe im Netz nichts gefunden. Thx, viele Grüße Yogi From owner-freebsd-arch@freebsd.org Fri Jan 11 12:52:41 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BC8E148EC1D; Fri, 11 Jan 2019 12:52:41 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5445569A5F; Fri, 11 Jan 2019 12:52:39 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 485C88D4A15F; Fri, 11 Jan 2019 12:52:36 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 3C625D20559; Fri, 11 Jan 2019 12:52:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id HPwNbebBRypX; Fri, 11 Jan 2019 12:52:34 +0000 (UTC) Received: from [146.179.202.57] (fresh-ayiya.sbone.de [IPv6:fde9:577b:c1a9:f001::2]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 9C31FD20555; Fri, 11 Jan 2019 12:52:33 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Yogi M. Schneider" Cc: freebsd-arch@FreeBSD.org, "FreeBSD PowerPC ML" Subject: Re: FreeBSD mit Power 9 Prozessor Date: Fri, 11 Jan 2019 12:52:42 +0000 Reply-To: "FreeBSD PowerPC ML" X-Mailer: MailMate (2.0BETAr6133) Message-ID: <7FF9D527-792D-48FE-B007-8676F626E4D2@lists.zabbadoz.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 5445569A5F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 2a01:4f8:13b:39f::9f:25 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net X-Spamd-Result: default: False [-6.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[freebsd-ppc@freebsd.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:13b:39f::9f:25]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[zabbadoz.net]; TO_DN_SOME(0.00)[]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cross.sbone.de]; NEURAL_HAM_SHORT(-0.92)[-0.924,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; IP_SCORE(-2.86)[ip: (-9.53), ipnet: 2a01:4f8::/29(-2.44), asn: 24940(-2.33), country: DE(-0.01)]; FREEMAIL_TO(0.00)[gmx.de]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[57.202.179.146.zen.spamhaus.org : 127.0.0.11] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 12:52:41 -0000 On 11 Jan 2019, at 11:44, Yogi M. Schneider wrote: Hi, please honor Reply-To: > hat schon jemand FreeBSD auf einer IBM LC921 oder LC922=C2=A0 mit 2x Po= wer = > 9 Prozessoren ausprobiert. > > W=C3=A4re Super wenn mir jemand hier=C3=BCber Bescheid geben k=C3=B6nnt= e, habe im = > Netz nichts gefunden. the mailing lists are usually in English. I don=E2=80=99t know if anyone= has = tried FreeBSD on that specific setup; I am Cc:ing freebsd-ppc where = people will more likely be able to help you: = https://lists.freebsd.org/mailman/listinfo/freebsd-ppc You might also be interested in the two status reports on the POWER: = https://www.freebsd.org/news/status/report-2018-01-2018-09.html#FreeBSD-o= n-POWER9 /bz From owner-freebsd-arch@freebsd.org Fri Jan 11 13:17:37 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CC35148F92E for ; Fri, 11 Jan 2019 13:17:37 +0000 (UTC) (envelope-from yogimac@gmx.de) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CE106AF03 for ; Fri, 11 Jan 2019 13:17:36 +0000 (UTC) (envelope-from yogimac@gmx.de) Received: from YogisMacintosh5.fritz.box ([79.214.237.237]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MXUmw-1go4fZ49Qc-00WTN2 for ; Fri, 11 Jan 2019 14:17:28 +0100 To: freebsd-arch@FreeBSD.org From: "Yogi M. Schneider" Subject: FreeBSD with Power 9 processor Message-ID: <7acbad69-ad3e-3837-98cb-e69c358c2855@gmx.de> Date: Fri, 11 Jan 2019 14:17:27 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Language: de-DE X-Provags-ID: V03:K1:ArsAacmNeibfTZGi8fo028HGtdC+kIZLR6bQyhHI5D0C6Rp3+8m Cc8hJmccgTlqVBL37kDNxfHxoq7zmBawvjBKBSbMb7eRJYEGWUZMO5G/8mO5MdLpj4fE6q+ p0OI0bpHdYfNMo9QnO4e0OUIl/g9AiX3nEWg/IrWY9Tr9X8mbQugV6kKDU+7kfd6RyRtO9c zTrspmpeK9R3DIKfkxkbw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:i2tmsdVYpso=:WATTHwUrzyvAUJXTBeWxH+ BZJ51IkVMg+U8nqt8jnGk7Kuux9VXVe9SLnj5TEc+RdTYJxyGb6+5o9cEaDp7PBD8yCcLwGNz BPMibv0zxmXpkvfEZrjVdiiL3jRVfylzOG51cWwpF/Qm1uFs6FMAB6BKyZDGyVF0093HLuqwH o1cqW7ggqrU9O8juNHG7FZTajgbB7phN8apcctjKMjWJzIkMVS8ZqNT8HHpCw5wA+1BEIYHvt Bc9F98TUDqAebG6fRDSnOU0XPyd1gvhDpQTbckidCBnE3cIOn3CdjHndsOWMLXZ9+paRyfI+y tYhdyUwFMNE7Nb9uKofVxqQfNCGNjdq1sYSRbrXPE5/z+JNWI72lEZZyoe4YYM8HqUX3TNJuI 1+EBxdV6ArGYPmqDO0PGLF7aBy7OQ+HOFyLtB/UZhVr7vXGURSh6jKQOLI8rn/tlCwDbZL+Zx IxJVctBR+x9H7ye0LhSew2oUHyL7E1g/50j2XxLS8IPWlNaBVqSCLteMDyrziTama5g00XlOL 5EfUm7mSx2MsCk4RPMF314X1jBUkSOfoqmPSB3e3FSV8eEZTcAhgoF7cMkaHKeEckb0tijrrp f3gRubb2yN2T4DyZh9APFrJLIc/AKKk95715RuIx4eOQ2Pn/3g7JBc/donUQbW0C9XPPO4Sky CyWHy8S2TfAlE9DSw6jrvj1BNZYj+wjbrIthuqAXw2eUP+aU0Hawh0QrworiaSlqbD8xqJBZ4 uqNL0+XHZIXcKJWq+m4BOwZy6eufQb79cJ4FCy14IQ1oJYF1PMsJ5MAn7j1VhLlFVDny3gu4m fak+pEPZM8yYisTivDsO4v/brxReDFUwANlE71tMwvPxemf0lKgAQhDuHa2l3nwgDxeD8SQDI OF+K/8CLqstP2ygytp4pZE2phXQDy0vMvugRjIUpTy33S47/iAQCiHiBVLEw1I X-Rspamd-Queue-Id: 7CE106AF03 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of yogimac@gmx.de designates 212.227.17.21 as permitted sender) smtp.mailfrom=yogimac@gmx.de X-Spamd-Result: default: False [-3.75 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.227.17.0/27]; FREEMAIL_FROM(0.00)[gmx.de]; TO_DN_NONE(0.00)[]; MX_GOOD(-0.01)[cached: mx00.emig.gmx.net]; NEURAL_HAM_SHORT(-0.67)[-0.671,0]; RCVD_IN_DNSWL_LOW(-0.10)[21.17.227.212.list.dnswl.org : 127.0.3.1]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmx.de]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[237.237.214.79.zen.spamhaus.org : 127.0.0.10]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MIME_TRACE(0.00)[0:+,1:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[gmx.de]; IP_SCORE(-0.67)[ip: (-3.38), ipnet: 212.227.0.0/16(-0.65), asn: 8560(0.68), country: DE(-0.01)]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 13:17:37 -0000 Hi, has anyone tried FreeBSD on an IBM LC921 or LC922 with 2x Power 9 processors? Would be great if someone could let me know about this, I didn't find anything on the net. Thanks, Yogi From owner-freebsd-arch@freebsd.org Fri Jan 11 15:40:52 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 752741493DA1 for ; Fri, 11 Jan 2019 15:40:52 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90A9970DF0 for ; Fri, 11 Jan 2019 15:40:51 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-io1-xd2f.google.com with SMTP id b16so12512041ior.1 for ; Fri, 11 Jan 2019 07:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ffHvLrACVRzGdqtK8zOOWZSZj/giXaom2MNBQIAx+TY=; b=cOur86dMJ1O5TZ3YNsTnKkoQC6LU9S6tQNRHhSdmgfEAWXa/qPiYaLk9LaNRriGNGV n3/Ux+pMtS0W+QYZSWX1negjqgK71+QWq+dofNTPoePNqcbveZbdsEt29mjNiYgf8uGG 7Nn9sD04EYPBRUl1x2aQl5uGMlYcGZjp7lDFdgJrFscs9oA20hbL0qzc6Enb5REA43th 1ZqGEPLEAc20Kjw5hHuRRU95OcZC7CUYAZQwynEw6mudT7/qs9rYQjWR9DgYDPvi0VWP yfDd0wVLp1uN4PWeeRUZXLDCwUilR7gXtAtvmCcNbI9safjOn0ZlP8tl3Sphie0QyQX7 oKvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ffHvLrACVRzGdqtK8zOOWZSZj/giXaom2MNBQIAx+TY=; b=V8wV9De5GWYd8SODOLrmABdfSgNtaFBwhfzkNl2GY6VfeO8xw4zMCT+3AYBTC1lLc4 7qHKHuwMbmfcDPrxkASp0O+euZQgxzStYpqDUdeGlN8fPTKoGqeH9ygw7puw7b7FwNDM uaZazZlqGB/yC7XTxBtBq5X0D3Po9ozgTZLP1ArHrqvMkwNEEDv4WuWSgainbqmlmTeq DooAs5xxqzm4fMdDEmKMa0fp6teCmoDwkS0/oJ0snYNibGh79p7cBjJFx+7yJMGqU6QP Z+huMCXcC/M69aPfv9wh6YWPN/b99K4y1/IXxFeDv/Wmh6GBeenXoxhJVd/bHnbpGckU HBPw== X-Gm-Message-State: AJcUuken+Vs7LjIIYu7sIHv5f/8XTYrWqmW0ujXI50EGJ72o28WChGF6 4Zq9Kww3jfnD/iH9SniLEos= X-Google-Smtp-Source: ALg8bN43wOQ1sKEvnXGcapp1tD+rouz9B12I27zsEI49h+g7KvaVoyCYjN7uk4LVE0MIKFx89tmbFw== X-Received: by 2002:a6b:8f8d:: with SMTP id r135mr9907424iod.5.1547221250546; Fri, 11 Jan 2019 07:40:50 -0800 (PST) Received: from ralga.knownspace (173-25-245-129.client.mchsi.com. [173.25.245.129]) by smtp.gmail.com with ESMTPSA id f10sm971318itf.41.2019.01.11.07.40.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 07:40:50 -0800 (PST) Date: Fri, 11 Jan 2019 09:40:42 -0600 From: Justin Hibbits To: "Yogi M. Schneider" Cc: freebsd-arch@FreeBSD.org Subject: Re: FreeBSD with Power 9 processor Message-ID: <20190111094042.5a701f6b@ralga.knownspace> In-Reply-To: <7acbad69-ad3e-3837-98cb-e69c358c2855@gmx.de> References: <7acbad69-ad3e-3837-98cb-e69c358c2855@gmx.de> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 90A9970DF0 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=cOur86dM; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of chmeeedalf@gmail.com designates 2607:f8b0:4864:20::d2f as permitted sender) smtp.mailfrom=chmeeedalf@gmail.com X-Spamd-Result: default: False [-6.57 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; FREEMAIL_TO(0.00)[gmx.de]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_LAST(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[f.2.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.61)[ip: (-8.90), ipnet: 2607:f8b0::/32(-2.31), asn: 15169(-1.75), country: US(-0.08)] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 15:40:52 -0000 On Fri, 11 Jan 2019 14:17:27 +0100 "Yogi M. Schneider" wrote: > Hi, > > has anyone tried FreeBSD on an IBM LC921 or LC922 with 2x Power 9 > processors? > Would be great if someone could let me know about this, I didn't find > anything on the net. > > Thanks, > Yogi > > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to > "freebsd-arch-unsubscribe@freebsd.org" Hi Yogi, I think some people have tried FreeBSD on those systems. It does work fairly well. NUMA is still nonexistent, so there will be performance penalties, but that's in the works and we hope to have that committed soon. There is still a lot of work left to do across the board, and a lot in-progress. We have several users with the Raptor Talos II systems, some with 2x CPUs, I currently have only one CPU, but plan to buy another one later this year. Installation should be straight forward. The biggest gotcha of it is to download the right image. The memstick image has for a long time been broken, but the .iso image can be used on a USB stick to do an install, and it works well. - Justin