Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(liii bitwise) and (srfi srfi-151) #67

Open
8 of 11 tasks
da-liii opened this issue Oct 3, 2024 · 6 comments
Open
8 of 11 tasks

(liii bitwise) and (srfi srfi-151) #67

da-liii opened this issue Oct 3, 2024 · 6 comments
Assignees
Labels

Comments

@da-liii
Copy link
Contributor

da-liii commented Oct 3, 2024

https://srfi.schemers.org/srfi-151/srfi-151.html

We need to create two new library to add bitwise support.

There are already logand, logor available in S7 Scheme, and adding srfi-151 support could make Goldfish Scheme more portable!

@da-liii da-liii added the SRFI label Oct 3, 2024
@JackYansongLi
Copy link
Collaborator

I've made a pull request which implemented bitwise-or and bitwise-and. A new library srfi-151 was added in Section 2.8 which is automatically imported by (liii base).

@da-liii
Copy link
Contributor Author

da-liii commented Oct 5, 2024

I suggest we should keep the srfi-151 related code in (liii bitwise). That's my initial design. Bitwise operations are not defined in R7RS. We should not keep it in (liii base)

@da-liii
Copy link
Contributor Author

da-liii commented Oct 5, 2024

(srfi srfi-151) is the impl, and (liii bitwise) is the interface

@da-liii
Copy link
Contributor Author

da-liii commented Oct 5, 2024

The reason why SRFI-2 and SRFI-8 is exported in (liii base) is that there is only 1 routine in SRFI 2 and SRFI-8.

But for SRFI-151, there are many routines to be implemented. That's why it should be organized in (liii bitwise).

@JackYansongLi
Copy link
Collaborator

I've made a new pull request.

@da-liii
Copy link
Contributor Author

da-liii commented Nov 25, 2024

Bit Twiddling Hacks

https://graphics.stanford.edu/~seander/bithacks.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants