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

[RFC]: add C implementations for base special mathematical functions #42

Closed
5 tasks done
Rejoan-Sardar opened this issue Mar 18, 2024 · 4 comments
Closed
5 tasks done
Labels
2024 2024 GSoC proposal. rfc Project proposal.

Comments

@Rejoan-Sardar
Copy link

Rejoan-Sardar commented Mar 18, 2024

Full name

Rejoan Sardar

University status

Yes

University name

Lovely Professional University, Punjab

University program

BTech. Computer Science and Engineering

Expected graduation

2026

Short biography

I am a 2nd year B.Tech. Student in the department of Computer Science and Engineering at Lovely Professional University, Punjab.
In College I have completed many courses like Problem Solving with Programming in C and C++, Object Oriented Programming, Data Structure and Algorithms and many more.
Currently attending courses of Database Management Systems, Computer Network, Design Analysis of Algorithms, Operating System.
My Interests lies in Web Development.

Timezone

IST (UTC + 5:30)

Contact details

email:rejoansardar4@gmail.com github:Rejoan-Sardar

Platform

Windows

Editor

Visual Studio Code stands as my preferred code editor due to its seamless functionality and user-friendly interface, making it the ideal choice from my extensive experience.

Programming experience

  • Diverse Programming Background: My programming journey commenced in high school, where I was captivated by the versatility of Python. This early exposure laid a solid foundation for my subsequent endeavors in the field.

  • Focus on Web Development: As my interests gravitated towards Web Development, I delved deeper into JavaScript, recognizing its pivotal role in modern web applications. Mastering frameworks like React further solidified my proficiency in front-end development.

  • Engagement in Open Source: Motivated by a thirst for knowledge and discovery, I actively contributed to Open Source projects. This not only expanded my skill set but also provided invaluable opportunities to collaborate with talented individuals and gain real-world experience.

  • Expertise in Problem Solving: My proficiency extends beyond mere coding; I excel in Problem Solving with Programming. Particularly, I have honed my skills in C and C++, demonstrating a deep understanding of Data Structures and Algorithms.

  • Algorithmic Analysis and Data Manipulation: Through extensive training in Data Structures and Algorithms, I have developed a keen ability to analyze algorithms and manipulate data efficiently. This skill set empowers me to tackle a wide range of programming challenges with precision and effectiveness.

  • Real-World Application: The culmination of my diverse experiences has equipped me to navigate real-world programming challenges with confidence. Whether it's developing robust web applications or optimizing algorithms for performance, I approach each task with a blend of expertise and creativity.

JavaScript experience

While contributing to stdlib-js development, I integrated JavaScript and C implementations for essential mathematical functions like boxcox1p, xlog1py, asinh, atanh, odd and even. This involved enhancing the standard library for both JavaScript and Node.js environments. My contributions aimed to improve the efficiency and functionality of these mathematical operations within the library, benefiting users across different platforms. Despite its flexibility, JavaScript's dynamic typing can pose challenges without tools such as TypeScript to enforce type safety. While JSDoc aids in documentation, it lacks the capability to enforce strict typing. With my proficient skills, I ensure robust code quality by utilizing TypeScript to maintain type safety and enhance overall code reliability.

Node.js experience

My proficiency in Node.js is evident from my experience working on substantial projects, where I've utilized JavaScript and Node.js extensively. I've contributed to the development of complex systems, demonstrating my ability to handle large-scale applications effectively. Through my work, I've honed my skills in designing scalable architectures and optimizing performance in Node.js environments. Whether it's implementing RESTful APIs, handling asynchronous operations, or integrating with databases, I've tackled diverse challenges with confidence. My deep understanding of Node.js ecosystems, coupled with strong problem-solving abilities, enables me to deliver high-quality solutions that meet both functional and performance requirements. Moreover, I continuously stay updated with the latest trends and best practices in Node.js development to ensure the success of my projects. Throughout my experience with Node.js, I've leveraged stdlib, ensuring consistent and reliable functionality across projects. By utilizing stdlib's extensive modules and functions, I've streamlined development processes and enhanced the scalability of Node.js applications.

C/Fortran experience

My proficiency in C programming and problem-solving skills have been refined through my extensive engagement in competitive programming. I excel in crafting efficient algorithms and implementing them effectively in C to solve a variety of challenges. With a solid foundation in data structures and algorithms, coupled with my ability to optimize code for performance, I consistently deliver robust solutions in competitive programming contests. My track record showcases my capability to tackle complex problems, demonstrating my dedication to mastering C programming and problem-solving at a competitive level.

Interest in stdlib

While I continue to refine my problem-solving skills in C/C++, I've been intrigued by the capabilities of the stdlib-js/stdlib library. Its modular structure, comprising smaller, focused packages, aligns with my preference for efficient solutions. I'm particularly fascinated by its potential for executing complex algorithms directly in the browser, with the plotting API serving as a prime example. Moreover, I've found the stdlib community to be incredibly welcoming and supportive.

Version control

Yes

Contributions to stdlib

Here, are the statuses of some PR's which I have authored.At present I have 20 PRs merged and
4 issues closed.

All PRs which are merged

Status Opened

All Prs which are opened

Issues Opened
All issues which are currently opened

Resolved Issue

Goals

  • After successfully competing, users will be able to leverage C implementations for use in Node.js native add-ons, and stdlib will be able to expose element-wise APIs for evaluating base special math functions over ndarrays. This integration not only enhances performance but also facilitates seamless computation within Node.js environments. With the added expertise gained through successful competition, users can harness the full potential of stdlib's capabilities to optimize their applications and achieve superior results in computational tasks.

  • I am committed to enhancing the stdlib-js/stdlib library by implementing all necessary functions in math/base/special, ensuring comprehensive coverage of mathematical tools. My dedication to this endeavor will contribute to enriching the library's functionality and providing users with a robust suite of resources for their projects.

  • In addition to the existing C implementations, I've integrated several new functions into the stdlib-js/stdlib library, including arange, meshgrid, reshape, transpose, dot, cross, vdot, matmul, det, and more. These additions enhance the library's functionality and provide users with a broader range of mathematical tools for their projects.

Why this project?

This project is crucial because it aims to enhance the stdlib-js/stdlib library, ensuring it remains a comprehensive resource for mathematical computation in the JavaScript ecosystem. By incorporating all necessary functions, we empower developers with a versatile toolkit, enabling them to tackle complex tasks efficiently. This endeavor is driven by a commitment to fostering innovation and supporting the diverse needs of users across various projects. With over 20 functions already implemented, our dedication to completeness ensures the library's relevance and utility in real-world applications. Our goal is to uphold stdlib's reputation as a trusted and indispensable tool for mathematical computation in JavaScript.

Qualifications

  • Proficiency in C Programming: I possess strong programming skills in C, which form the foundation for implementing efficient and robust solutions within the stdlib-js/stdlib library.

  • Problem-Solving Expertise in C: With a wealth of experience in problem-solving, I excel in devising effective algorithms and data structures, crucial for implementing mathematical functions accurately.

  • Competitive Programming Success: My achievements in competitive programming attest to my ability to tackle challenging problems efficiently, showcasing my capacity to deliver high-quality solutions under pressure.

  • Knowledgeable in JavaScript and Node.js: Through extensive project development, I have acquired in-depth knowledge of JavaScript and Node.js, enabling me to understand the nuances of integrating C implementations effectively within these environments.

  • Experience with Large-Scale Projects: Having worked on significant projects, I am accustomed to managing complexities and ensuring the scalability and reliability of codebases, essential qualities for contributing to a library like stdlib-js/stdlib.

  • Versatility in Programming Environments: My proficiency spans across both C and JavaScript ecosystems, allowing me to bridge the gap between low-level computation and high-level application development seamlessly.

  • Commitment to Project Success: I am dedicated to the success of this project, driven by a passion for advancing mathematical computation capabilities and empowering developers with a comprehensive toolkit.

  • Team Collaboration Skills: I am adept at working collaboratively within teams, leveraging collective expertise and fostering an environment conducive to innovation and progress.

Prior art

For this project, we're building upon an already-established groundwork, as evidenced by the successful implementation of 20 functions. This achievement signifies a significant milestone, showcasing our ability to tackle complex tasks and deliver tangible results. Each implemented function represents a step forward in enhancing the project's capabilities, demonstrating our commitment to excellence and innovation. With this solid foundation in place, we are well-positioned to expand upon our achievements, driving the project towards even greater success.

Commitment

In the upcoming summer, I intend to focus solely on this project, with no other professional obligations. This allows me to commit to a standard 40-hour workweek throughout the coding period. Additionally, my academic commitments will wrap up prior to the coding period and won't resume until after the project deadline, guaranteeing my full availability for the entirety of the project.

Schedule

Assuming a 12 week schedule,

  • Community Bonding Period: In this phase, I will conduct an exhaustive analysis to discern packages lacking C implementations but already reliant on C-coded dependencies. Subsequently, I will initiate the implementation of discrete, self-contained packages, strategically setting the groundwork for subsequent developmental strides.

  • Weeks 1: I will implement crucial building blocks for various other packages such as round, gcd, pow ,lcm, log10, rempio2, sin, cos,tan, cot, sec, csc it with per PRs. . These implementations serve as crucial building blocks for various other packages, ensuring their smooth integration and functionality. And aim to other implementations of packages whose dependencies have C implementations.

  • Week 2 - 5: Aim to complete all C implementations for all packages in math/base/special.

  • Week 6: (midterm) During this week, I would be focusing on any backlogs which are left to be done from previous weeks, and taking suggestions and feedback from the mentors.

  • Week 7: I'll address any missed deadlines from till midterm as a priority. If none are outstanding, I'll focus on identifying files that aren't compiling, creating minimal code to reproduce errors, and then rectifying them based on the assigned package priorities.

  • Week 8 - 9: We can work on new functions such as arange, meshgrid, reshape, transpose, dot, cross, vdot, matmul, det, and more.

  • Last few weeks: Now, we can implement some compIex function also such as eig: compute the eigenvalues and eigenvectors of a square matrix, svd: perform singular value decomposition on a matrix, solve: solve a linear matrix equation. And reviewing the project with mentors and documenting the rest of the codebase as needed.

  • Post-GSoC Period: Upon completing the project, future endeavors for the stdlib-js/stdlib library include optimizing implemented functions for enhanced performance, expanding its functionality by adding more mathematical operations, fostering integration with other platforms, ensuring comprehensive documentation for user understanding, active community engagement, and continued research and development for innovation.

Notes:

  • The community bonding period is a 3 week period built into GSoC to help you get to know the project community and participate in project discussion. This is an opportunity for you to setup your local development environment, learn how the project's source control works, refine your project plan, read any necessary documentation, and otherwise prepare to execute on your project project proposal.
  • Usually, even week 1 deliverables include some code.
  • By week 6, you need enough done at this point for your mentor to evaluate your progress and pass you. Usually, you want to be a bit more than halfway done.
  • By week 11, you may want to "code freeze" and focus on completing any tests and/or documentation.
  • During the final week, you'll be submitting your project.

Checklist

  • I have read and understood the Code of Conduct.
  • I have read and understood the application materials found in this repository.
  • I have read and understood the patch requirement which is necessary for my application to be considered for acceptance.
  • The issue name begins with [RFC]: and succinctly describes your proposal.
  • I understand that, in order to apply to be a GSoC contributor, I must submit my final application to https://summerofcode.withgoogle.com/ before the submission deadline.
@Rejoan-Sardar Rejoan-Sardar added 2024 2024 GSoC proposal. rfc Project proposal. labels Mar 18, 2024
@Rejoan-Sardar Rejoan-Sardar changed the title [RFC]: develop C implementations for base special mathematical functions [RFC]: add C implementations for base special mathematical functions Mar 18, 2024
@Pranavchiku
Copy link
Member

Hello @Rejoan-Sardar , a few changes that I think will make your proposal sound better:

  • Can you please link projects you worked on which utilises javascript, node.js, etc?

NOTE:

The following lines in commitment section is copied over from #40, please refer https://github.com/stdlib-js/google-summer-of-code?tab=readme-ov-file#plagiarism to know consequences of plagiarism.

my classes will conclude well before the coding period starts and won't resume until after the pencils down date, ensuring I'm fully available for the entire duration of the project.

@Rejoan-Sardar
Copy link
Author

Rejoan-Sardar commented Mar 18, 2024

@Pranavchiku Sure, I'll do that.

@kgryte
Copy link
Member

kgryte commented Mar 26, 2024

@Rejoan-Sardar One comment. You identify various APIs for extension in weeks 8-12. A principle difficulty with implementing these is that they will likely rely on various BLAS and LAPACK functionality, which is beyond the scope of the associated project idea for this proposal.

A couple of other possibilities:

  1. We base our implementations on upstream reference implementations (e.g., Cephes, Golang, flibm, Boost, etc). Some of our implementations are outdated relative to their upstream reference implementations. It would be nice to go back through and audit our existing implementations and ensure that they are up-to-date (e.g., with any perf/accuracy improvements).
  2. Another stretch goal for this project could be creating higher level wrappers for the base functionality (e.g., strided, ndarray, iterator, array).

@Rejoan-Sardar
Copy link
Author

@kgryte Thank you for taking the time to review my project proposal and for your insightful comments.

Regarding your comment about the potential difficulties with implementing various APIs in weeks 8-12 due to reliance on BLAS and LAPACK functionality, I agree that it's crucial to carefully consider the scope and feasibility of the project. Your input has prompted me to reassess those aspects and make necessary adjustments to ensure a more focused approach.

I appreciate your alternative suggestions for enhancing the project:

Auditing existing implementations against upstream reference implementations is a valuable step to ensure our work remains current and aligned with industry standards. I will prioritize this as part of the project plan.

Creating higher-level wrappers for the base functionality is an excellent idea that aligns well with our goal of improving usability. I will explore incorporating this as a stretch goal to enhance the project's overall value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2024 2024 GSoC proposal. rfc Project proposal.
Projects
None yet
Development

No branches or pull requests

3 participants