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

Ref/vec #180

Merged
merged 50 commits into from
Oct 9, 2024
Merged

Ref/vec #180

merged 50 commits into from
Oct 9, 2024

Conversation

sebffischer
Copy link
Collaborator

@sebffischer sebffischer commented Sep 27, 2024

(Description is still WIP)

Overview of Changes:

  • The Rep<T> now allows for non-atomic Ts. Specifically this now allows List to be simply represented as an Rep<T>. Furthermore this will also support named vectors because the (optional) naming mechanism was integrated into the Rep struct.
  • Some refactors were done to push Rep<T> towards a more stable API. E.g. it is now possible to iterate over immutable references of the vector representation, representing the subsets. This can be done via rep.pairs_ref().iter() (.pairs_ref_iter() would not work due due lifetime issues and the restrictions of the netxt(&mut self) signature in the Iterator trait; I think this might be achievable with unsafe but I want to refrain from this for the time being)
  • Added the is_null(x) and all(...), is_na(x) primitives that allow for better testing through via the R interpreter (r_expect!, r!). The documentation of all includes a section on 'Deviations from R'.
  • Setting a value in a list to null now does not remove this element anymore but actually sets it to null.

Bug Fixes:


Open Issues / Questions:


Next (bigger) steps

I would plan to continue focusing on the vector representation to polish the internals and further improve the behavior.
This includes:

  • Enforcing proper recycling rules.
  • I think it would also be nice to continue the work with the scalars WIP: Adding scalars and scalar indexing #135 to push the vector-internals further into a more stable API. But this is of course your call. I could also offer to help there if you are currently busy with other things :)

@dgkf
Copy link
Owner

dgkf commented Oct 1, 2024

Let me know when you're ready for review

@sebffischer sebffischer marked this pull request as draft October 2, 2024 05:00
@sebffischer sebffischer marked this pull request as ready for review October 9, 2024 16:14
@sebffischer sebffischer merged commit ebf4bc4 into dgkf:main Oct 9, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug when accessing nested list
2 participants