[RFC]: achieve ndarray API parity with built-in JavaScript arrays #137
Labels
2025
2025 GSoC proposal.
received feedback
A proposal which has received feedback.
rfc
Project proposal.
Full name
Gaurav Jadhav
University status
Yes
University name
Vishwakarma Institute of Information Technology
University program
Bachelor of Technology in Computer science Engineering ( Cyber security )
Expected graduation
2027
Short biography
I am currently in the 2nd year of Undergraduate in Vishwakarma Institute of Information Technology. I started my coding with c/c++ to learn all the basics of coding, then continuing to Data Structure Algorithms, Database Management Systems. I started to get interest in web development, for which I got experience in JavaScript, typescript, react, handling data in mongodb, express etc. I have also some knowledge of some machine learning.
Timezone
Indian Standard Time ( IST ), UTC+5:30
Contact details
[email protected]
Platform
Windows
Editor
I use vs code as my preferred code editor as it was also my first editor used. I tried different IDE's (eclipse, vim, nvim etc) but I keep going back to vs code for vs code being very easy to work with any kind of coding I would like to do with its vast collection of extensions for almost everything making the experience very smooth.
Programming experience
I have got a lot of experience in programming in c/c++, java as part of my college projects, assignments and exams.
On top of that I have worked on some projects -
Web Scrapper -
Register and log in to access the application features
Create and manage scrapers with custom extraction rules
View scraped data and export it in different formats (CSV, JSON)
Configure webhooks to send data to other applications
Schedule scraping jobs to run automatically
finance tracker (College project) -
The app includes features like easy income and expense tracking
Category-wise breakdowns (such as food, travel, and study materials)
Dashboard to view daily and monthly spending summaries
Budget-setting options to help users stay within limits
blood donation database frontend (College project) -
The frontend includes features responsive UI for browsing donor information
Search and filter options based on blood group, location, or availability
Simple form for adding new donors
Sections like donor lists, registration, and contact details
JavaScript experience
I have worked in JavaScript mainly while learning web development and while working on the projects for them. I was enrolled in an cohort where I also got some tasks and assignment that help me get the much-needed experience in JavaScript.
While learning JavaScript the first uphill is when learning about the async callbacks, awaits, promises etc, it was s
Node.js experience
For all the projects I have made I have used node.js as backend. I used things like express for http server, jwt for authentication, axios, fs and many more.
C/Fortran experience
I had experience of c in college while starting to learn programming. I don't have much experience in that. I don't have any experience in fortran but always ready to take a deep dive in it
Interest in stdlib
todo
Version control
Yes
Contributions to stdlib
Open
Closed or Merged
todo
stdlib showcase
todo
Goals
The goal of this project is to implement array methods for ndarrays which are efficient, well documented and well tested.
There are some base implementation that has c APIs c-API funtions.pdf for much efficient operations that can we used in our implementions example.pdf
List of eqvivalent method to be implemented
Array.prototype.reverse
Array.prototype.toReversed
Array.prototype.with (A PR exists)
Array.prototype.fill (ndarray/fill-slice)
Array.prototype.includes
Array.prototype.indexOf
Array.prototype.lastIndexOf
Array.prototype.some
Array.prototype.concat
Array.prototype.copyWithin
Array.prototype.find
Array.prototype.findIndex
Array.prototype.findLast
Array.prototype.findLastIndex
Why this project?
For most of the time i was seeing stdlib, most of the interesting issues that i worked on happened to be related to arrays and arrays remained to be favorite section to work on. The ndarray help me to elevate this interest in arrays by taking it to next level with it new complexities and challenges of which glimpses i saw
Qualifications
The time I spend on stdlib has given me a lot of knowledge with working on arrays like
Implementation of toSorted --
it was help me understand how to does an method on array actually work and the basic, small yet important things that should be known.
Implementation of broadcasted-quinary5d --
It was a jump from simple to-sorted implementation that introduced the complexity and how to write full implementations of methods
Implementation of copyWithin --
This filled the gap of experience of working with typed-arrays and the opportunity that comes with them to squeeze more efficiency from them
Prior art
I know that NumPy has range of functions for multi-dimensional arrays and had seen some like concat etc and
Ndarray https://numpy.org/neps/nep-0020-gufunc-signature-enhancement.html
math.js also have some implementations. https://mathjs.org/docs/datatypes/matrices.html
Commitment
I am ready to invest 15 hr/week or more for 12-week schedule as I don't have any other commitment, and I also have months long holidays allowing me to focus completely on this project. I will not have any exam or not going on any vacation during the program
Schedule
Assuming a 12 week schedule,
Community Bonding Period:
Week 1:
Implement Array.prototype.some with tests
Begin implementation of Array.prototype.reverse
Write documentation for both methods
Week 2:
Complete implementation of Array.prototype.reverse (if not finished)
Implement Array.prototype.toReversed building on reverse
Write tests and documentation
Week 3:
Implement ndarray/fill-slice extending existing fill functionality
Write tests for edge cases and documentation
Begin work on Array.prototype.concat design
Week 4:
Complete Array.prototype.concat implementation
Add comprehensive tests for concat with various dimensions
Finalize documentation
Prepare midterm evaluation materials
Week 5:
Implement Array.prototype.includes with tests
Begin documentation for includes
Implement Array.prototype.indexOf with tests
Week 6: (midterm)
Implement Array.prototype.lastIndexOf with tests
Add documentation for both methods
Address feedback from previous PRs
Week 7:
Begin Array.prototype.copyWithin implementation
Write tests for basic functionality
Week 8:
Complete Array.prototype.copyWithin to handle complex cases:
Strided arrays
Overlapping regions
Add additional tests and documentation
Week 9:
Create shared code infrastructure for find family of methods
Implement Array.prototype.find with tests
Implement Array.prototype.findIndex with tests
Week 10:
Implement Array.prototype.findLast with tests
Implement Array.prototype.findLastIndex with tests
Write documentation for all find methods
Week 11:
Code freeze, no new feature implementations
Address feedback from previous PRs
Enhance test coverage to address edge cases
Improve documentation with more examples
Week 12:
Finalize all documentation
Begin preparation of final report
Final Week:
Submit final project report
This is the 12 week plan
Related issues
There is an rfc tracking issue #2656 that list the potential method for ndarray and the status.
Checklist
[RFC]:
and succinctly describes your proposal.The text was updated successfully, but these errors were encountered: