From: Frank Terbeck <ft@bewatermyfriend.org>
To: guile-user@gnu.org
Subject: SRFI-151 (Bitwise Operations) Implementation
Date: Thu, 09 Jan 2020 05:28:41 +0100 [thread overview]
Message-ID: <87y2uh2qyu.fsf@ft.bewatermyfriend.org> (raw)
Hey Guilers!
Since I got a project that uses (potentially large) integers to encode
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.
Since Guile currently doesn't have an implementation of this SRFI, I fi-
gured I might as well add one.
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 li-
brary, as well as SRFI-60 (which is titled “Integers as Bits”) and other
functions from Guile's core.
SRFI-151 has one API that returns a SRFI-121 generator¹ to traverse an
integer. Since Guile currently doesn't have a SRFI-121 implementation²,
this function³ is missing from this implementation.
The implementation can be found here: https://gitlab.com/ft/srfi-151
The test-suite reproduces the examples from the specification, plus a
couple of additional ones. Maybe this is useful for someone.
Regards, Frank
¹ http://srfi.schemers.org/srfi-121/srfi-121.html
² https://www.mail-archive.com/guile-devel@gnu.org/msg14950.html
³ make-bitwise-generator
--
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
next reply other threads:[~2020-01-09 4:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-09 4:28 Frank Terbeck [this message]
2020-01-09 6:50 ` SRFI-151 (Bitwise Operations) Implementation Zelphir Kaltstahl
2020-01-09 7:15 ` Linus Björnstam
2020-01-09 9:10 ` Frank Terbeck
2020-01-09 12:13 ` Linus Björnstam
2020-01-09 12:52 ` Frank Terbeck
2020-01-09 17:50 ` John Cowan
2020-01-09 18:26 ` Frank Terbeck
2020-01-09 20:45 ` Linus Björnstam
2020-01-10 5:15 ` Frank Terbeck
2020-01-10 6:59 ` Linus Björnstam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2uh2qyu.fsf@ft.bewatermyfriend.org \
--to=ft@bewatermyfriend.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).