From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Newsgroups: gmane.lisp.guile.user Subject: Re: SRFI-151 (Bitwise Operations) Implementation Date: Thu, 09 Jan 2020 08:15:18 +0100 Message-ID: References: <87y2uh2qyu.fsf@ft.bewatermyfriend.org> Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="168237"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Cyrus-JMAP/3.1.7-740-g7d9d84e-fmstable-20200109v1 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jan 09 08:17:33 2020 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ipS3K-000HOw-Sg for guile-user@m.gmane.org; Thu, 09 Jan 2020 08:16:24 +0100 Original-Received: from localhost ([::1]:56578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipS3J-00031D-Km for guile-user@m.gmane.org; Thu, 09 Jan 2020 02:16:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49051) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipS2h-000311-Ha for guile-user@gnu.org; Thu, 09 Jan 2020 02:15:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipS2f-0001U9-2w for guile-user@gnu.org; Thu, 09 Jan 2020 02:15:43 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52213) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ipS2e-0001Q0-KA for guile-user@gnu.org; Thu, 09 Jan 2020 02:15:41 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D65CE21B2B for ; Thu, 9 Jan 2020 02:15:39 -0500 (EST) Original-Received: from imap1 ([10.202.2.51]) by compute1.internal (MEProxy); Thu, 09 Jan 2020 02:15:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.se; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type:content-transfer-encoding; s=fm2; bh=rLuuK AJCsHhz1DOhviO7B//XeAcNgPY2gtwdIBFhjl8=; b=p/pGbFctVspg1S3HAiLwg ZyUAnL8zrWMptwVD+AUaun/4rWD1N6/wr5B3eS7aaPSRXMotmhlOMv0eGbwr0iwF 41n+e/SIXpgQF34uLets3ZSTZCpb8TtA8KH74bi7G4Fm1Yn5OCB6c2mTLUUwhQU/ /MQ4OqGglRTqa/Vgs4naTQ3s6MqatkA/bBVfKjkYV+K8U8CYmpKQBW/mhATrPAuM LjOONrrM2ZaUEWJ/hJ7wzJiMTVVZvubhUr/g7JZjJmigu8pDfxiN+0mBV309ipnu b0HBl85gz4uAmCZrwZ19zMc0XSXwbiL4TjvaAq681mXHN8A213MqehWA9pVUIzmn Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=rLuuKAJCsHhz1DOhviO7B//XeAcNgPY2gtwdIBFhj l8=; b=aPUe9JAsLeuuWQ0MeB+pBsJfbBlVcisSBjOFmRtgssoLrerTCu4295ysv TMWVkUEkufMU4L+/rtm+qcqIoap3evGwWiF4p58Z7xfTZZ/xfH2QSc16RGJucIVL dqMLNVK8PZL7SYwyZ7guXZQI+ZoLjxNoywF8ci5ufU20nlbeNfMpcUPVeoMbu4pD f0lToUo/G4XF1WAVwJ/SnRE+DS9Jh+Ux7gem68nv0aV3ei4fmx6i92jTv0wlSDY0 ZMCG5Jkl0wV4vKuANlghr/ESwYmWQZu1yAJb4MWZSbPnELIJBH3DeesA/SU2Ho5t fnnHzZO5TZ2R1Fv+Gz/apjLXYJPVA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdehledgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtgfesth hqredtreerjeenucfhrhhomhepnfhinhhushgpuehjnphrnhhsthgrmhcuoehlihhnuhhs rdhinhhtvghrnhgvthesfhgrshhtmhgrihhlrdhsvgeqnecuffhomhgrihhnpehmrghilh dqrghrtghhihhvvgdrtghomhdpghhithhlrggsrdgtohhmpdgsihhtsghutghkvghtrdho rhhgpdhstghhvghmvghrshdrohhrghenucfrrghrrghmpehmrghilhhfrhhomheplhhinh hushdrihhnthgvrhhnvghtsehfrghsthhmrghilhdrshgvnecuvehluhhsthgvrhfuihii vgeptd X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 8728DC200A4; Thu, 9 Jan 2020 02:15:39 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <87y2uh2qyu.fsf@ft.bewatermyfriend.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:16015 Archived-At: I have a port of the SRFI code as well, using renaming of guile and srfi= -60 procedures as necessary. It has the make-bitwise-generator from srfi= -151. https://bitbucket.org/bjoli/guile-srfi-151/ I will move all that code to sourcehut whenever I have the time since bi= tbucket is shutting down HG support. It passes all of John's tests. --=20 Linus Bj=C3=B6rnstam On Thu, 9 Jan 2020, at 05:28, Frank Terbeck wrote: > Hey Guilers! >=20 > Since I got a project that uses (potentially large) integers to enco= de > bits in registers, I was looking at SRFIs that deal with that type = of > domain. The most recent entry is SRFI-151, which is in final status. >=20 > Since Guile currently doesn't have an implementation of this SRFI, I f= i- > gured I might as well add one. >=20 > I tried to reuse as many facilities that are already in Guile to get = to > a complete implementation. So it reuses stuff from the R6RS bitwise l= i- > brary, as well as SRFI-60 (which is titled =E2=80=9CIntegers as Bits=E2= =80=9D) and other > functions from Guile's core. >=20 > SRFI-151 has one API that returns a SRFI-121 generator=C2=B9 to trav= erse an > integer. Since Guile currently doesn't have a SRFI-121 implementation= =C2=B2, > this function=C2=B3 is missing from this implementation. >=20 > The implementation can be found here: https://gitlab.com/ft/srfi-1= 51 >=20 > The test-suite reproduces the examples from the specification, plus= a > couple of additional ones. Maybe this is useful for someone. >=20 >=20 > Regards, Frank >=20 > =C2=B9 http://srfi.schemers.org/srfi-121/srfi-121.html > =C2=B2 https://www.mail-archive.com/guile-devel@gnu.org/msg14950.html > =C2=B3 make-bitwise-generator >=20 > --=20 > In protocol design, perfection has been reached not when there is > nothing left to add, but when there is nothing left to take away. > -- RFC 1925 >=20 >