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

Tracking issue for bit arrays on javascript target #3842

Open
1 of 8 tasks
GearsDatapacks opened this issue Nov 17, 2024 · 2 comments
Open
1 of 8 tasks

Tracking issue for bit arrays on javascript target #3842

GearsDatapacks opened this issue Nov 17, 2024 · 2 comments
Labels
help wanted Contributions encouraged priority:medium

Comments

@GearsDatapacks
Copy link
Member

GearsDatapacks commented Nov 17, 2024

There are still many features of bit arrays that are not yet implemented on the javascript target. We want to have all of them eventually, but it's a lot to implement in one go, and a lot to have a separate issue for each one. So I've decided to create a tracking issue to list them all, and these can be slowly ticked off when people implement specific features.

  • Non byte-aligned access

  • Non-constant sizes when pattern matching: <<bits:size(some_variable)>>

  • Non byte-aligned segments

  • Non-utf8 strings: utf16, utf32, utf16_codepoint and utf32_codepoint

  • Signedness: signed and unsigned

  • Endianness: Missing native

  • Unit specification: unit

  • 16-bit floats

Please let me know if I've missed any. I'm not super familiar with bit array syntax so I mostly just looked through the compiler and found where an error was thrown on javascript.

@lpil lpil added help wanted Contributions encouraged priority:medium labels Nov 17, 2024
@richard-viney
Copy link
Contributor

Good to have a tracking issue for this. I've been slowly improving the bit array experience in JS this year, both in features and performance. I believe I got to full signedness support in Gleam 1.4, unless there's still a gap somewhere?

What's your sense as to which of the missing bit array features on JS are the highest value to support? If you were to order them, what are the top items? I suspect it's the last 3 in the above list (dynamic sizes when matching, and removing the byte-alignment constraints).

16-bit floats can go on the list of unsupported features on JS too.

@GearsDatapacks
Copy link
Member Author

Thanks! I saw that you had mentioned somewhere in an issue which is currently open about signedness, so I assumed that was still unimplemented. I'll cross that off and add 16-bit floats.
I would agree that the bottom three are the highest priority, although they are probably going to be the hardest to implement. I'll move those up to the top of the list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions encouraged priority:medium
Projects
None yet
Development

No branches or pull requests

3 participants