thephoeron / bit-smasher Goto Github PK
View Code? Open in Web Editor NEWCommon Lisp library for handling bit vectors, bit vector arithmetic, and type conversions.
Home Page: https://thephoeron.github.io/bit-smasher/
License: MIT License
Common Lisp library for handling bit vectors, bit vector arithmetic, and type conversions.
Home Page: https://thephoeron.github.io/bit-smasher/
License: MIT License
Both performance and accuracy can be significantly improved by re-implementing the binary arithmetic algorithms directly using the new bit-ops library. This will also make it easier to work with signed integers, and other arbitrary binary structures, encoded as bit-vectors.
CC: @guicho271828
The BIT-SMASHER library would be more generally useful, and less naive, if it supported handling of signed-bytes, the option of converting between little- and big-endian, and direct bit-shifting implementations of all arithmetic operations.
There are a few libraries already available in Quicklisp that will make this enhancement more or less painless.
I used the library before the order
parameter was removed from the bits->octets
function and just maintained a local small patch to add it back - I can see how it's complicating the interface, so I could probably just use ironclad:integer-to-octets
and supply the value myself. That said, the docstring still mentions the parameter.
Building with SBCL 2.2.3 / ASDF 3.3.5 for quicklisp dist creation.
Trying to build commit id 78144ca
bit-smasher-test fails to build because of a failure in bit-smasher.
bit-smasher fails to build with the following error:
; caught ERROR:
; READ error during COMPILE-FILE: Package BIT-SMASHER-ASD does not exist. Line: 29, Column: 75, File-Position: 969 Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/quicklisp/quicklisp-controller/dist/build-cache/bit-smasher/be8e97d25483ed8f0d7bc470584ba5dc30ef356e/bit-smasher-20220707-git/src/packages.lisp" {1005F985C3}>
...
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {1001BF0003}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "bit-smasher" "packages">
Lines 8 to 24 in c2dcb3b
Perhaps you could try to use ALEXANDRIA:DEFCONSTANT
with :TEST #'EQUALP
to turn this into a constant, in order to avoid (dynamic) variable lookup at runtime.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.