unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* SRFI-151 (Bitwise Operations) Implementation
@ 2020-01-09  4:28 Frank Terbeck
  2020-01-09  6:50 ` Zelphir Kaltstahl
  2020-01-09  7:15 ` Linus Björnstam
  0 siblings, 2 replies; 11+ messages in thread
From: Frank Terbeck @ 2020-01-09  4:28 UTC (permalink / raw)
  To: guile-user

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



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-01-10  6:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09  4:28 SRFI-151 (Bitwise Operations) Implementation Frank Terbeck
2020-01-09  6:50 ` 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

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).