Comments (2)
Great question!
do I understand correctly that we want to implement paste() as a primitive (written in Rust?) function
Quick answer first - then more discussion:
Yep, that's what I was thinking. If your goal is to use this as an opportunity to implement some R concepts in rust, I would say go for it.
But this also brings up a good question about what our goals should be. My original goal was to use this little exercise to learn some rust and experiment with what I thought would be cool enhancements to R, but the project has gotten a bit of momentum now and if others want to see it as a practical replacement, we might need to go back to the drawing board in terms of how we approach the problem.
A more pragmatic approach would be to call into R's internal implementations to bootstrap a new implementation, allowing for a slow migration from C to rust. In this case, we can find R's paste
code here. Probably this would involve first building a rust interface to the libR
shared library.
Interfacing with R's internals would be a big shift in the project, though. It would mean that the rust representations of R objects need to be more direct analogs of the C implementations, or at least add a translation layer to and from rust representations.
from r.
Thanks Doug!
Since I want to learn Rust, I will go with pure Rust for now :) I can not believe that paste() is 757 lines of code in C, let's see if Rust can do it with a shorter logic.
I was thinking to grab the unit test from R source code and I could not find a test for paste(), my search.
from r.
Related Issues (20)
- Bug due to some lingering evaluations HOT 2
- Capture invalid syntax HOT 3
- print does not work in the demo repl HOT 1
- for loop should *maybe* return `null` HOT 5
- Bug when assigning to vector subset HOT 1
- Forcing closures should update environment
- Tracking promise expression for substitute HOT 4
- Proposal: partial function evaluation HOT 1
- Object shared references architecture HOT 3
- Allowed Vector Subsets during assignment HOT 2
- Heuristics for materializing vectors HOT 1
- List declaration using paren syntax doesn't force promise evaluation
- Internal Character representation should maybe use `Rc<String>` instead of `String` HOT 1
- Ellipsis is exposed through evaluation environment of functions HOT 5
- Suggestion: ability to wite tests in R HOT 2
- Bug when mutating promise HOT 5
- Suggestion: Abandon named Lists in favor our Hashmaps with value semantics HOT 14
- use a different hash function for environments HOT 2
- quote drops parenthesis HOT 2
- Bug when function is passed an expression that contains an assignment HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r.