Skip to content
New issue

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

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

Already on GitHub? # to your account

Native functions and a standard library #65

Merged
merged 23 commits into from
Sep 29, 2023
Merged

Native functions and a standard library #65

merged 23 commits into from
Sep 29, 2023

Conversation

ahdinosaur
Copy link
Owner

@ahdinosaur ahdinosaur commented Sep 23, 2023

@ahdinosaur ahdinosaur added the work in progress This is currently being worked on label Sep 23, 2023
@vercel
Copy link

vercel bot commented Sep 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rimu-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 29, 2023 8:53am
rimu-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 29, 2023 8:53am

@ahdinosaur
Copy link
Owner Author

ahdinosaur commented Sep 23, 2023

uh oh, to implement map, we need to evaluate the given function inside the map native function.

which means a native function needs to be able to return an EvalError

which means rimu-value depends on rimu-eval which depends on rimu-value

hmm...


possible solutions:

  1. merge rimu-value into rimu-eval
  2. create a new rimu-error crate, where errors live.
  3. create a new EvalValue, where functions and things live. rimu-value is only data.

@ahdinosaur
Copy link
Owner Author

ahdinosaur commented Sep 24, 2023

okay so,

  • spanned values all the way

next steps:

  • finish conversion of eval to spanned values
  • current Value becomes SerdeValue.
  • have conversions from Value to SerdeValue
    • Value -> SerdeValue: remove spans
  • figure out what to do with tests, how to make empty spans for tests.
  • how will env values work?
    • from_value uses SerdeValue
    • when evaluating an env (via an identifier), add span of identifier

@ahdinosaur
Copy link
Owner Author

okay, mostly works, some notes:

@ahdinosaur ahdinosaur removed the work in progress This is currently being worked on label Sep 29, 2023
@ahdinosaur ahdinosaur changed the title Native functions Native functions and a standard library Sep 29, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stdlib: Map Eval should return spanned values Start the Standard Library
1 participant