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]: Implementing Symbolic Math in stdlib.js #130

Open
7 tasks done
Kavyansh-Bagdi opened this issue Apr 1, 2025 · 0 comments
Open
7 tasks done

[RFC]: Implementing Symbolic Math in stdlib.js #130

Kavyansh-Bagdi opened this issue Apr 1, 2025 · 0 comments
Labels
2025 2025 GSoC proposal. rfc Project proposal.

Comments

@Kavyansh-Bagdi
Copy link

Full name

Kavyansh Bagdi

University status

Yes

University name

Malaviya National Institute of Technology, Jaipur

University program

Computer Science and Engineering

Expected graduation

July, 2027

Short biography

I am currently a second-year Computer Science student, learning programming through online resources. It has been two years since I formally started programming, and from the beginning, I have loved creating things that add value to others lives.
My interest in machine learning and backend development continues to push me forward, often leaving me amazed at how developers come up with innovative ideas and bring them to life.

Timezone

(GMT+05:30) Asia/Kolkata - IST

Contact details

email : [email protected] , github.com : Kavyansh-Bagdi

Platform

Linux

Editor

I prefer VS Code because it offers customizable key bindings, a wide range of extensions, and powerful debugging tools, making coding faster and more efficient for me. I also use the Nano editor for quick fixes.

Programming experience

  • JavaScript & NodeJS Experience

    1. Developed the Blitzschlag website (Cultural Festival of MNIT Jaipur) for managing events, registrations, and payments.
    2. Currently building a full-stack Crime Management Web App as part of my Database Management Systems project for this semester.
  • C/C++ & Fortan Experience

    1. Solve Data Structures & Algorithms problems on LeetCode.
  • Python

    1. Implemented Machine Learning algorithms as part of my studies. Github

During COVID-19, I built a basic application to automatically join my online school classes, eliminating the need to search for links or check the timetable. It was developed using the Pygame library, with Excel to store class links. Although Pygame wasn't the best choice for this, it was a valuable learning experience and my first project. (At the time, I didn't know about GitHub, so I can't share the code.)

JavaScript experience

Last summer, I started learning JavaScript using resources like YouTube and JavaScript.info. I built some basic projects to understand the language, such as a Spotify clone and a recreation of Conway's Game of Life.
At first, I appreciated that JavaScript didn’t have strict data types or indentation rules—it felt like a language that allowed you to go with the flow. However, I later realized that working within constraints can be helpful, which led me to switch to TypeScript.
While working with APIs, I was amazed by how the async/await functionality helped eliminate "callback hell." This was also my first introduction to asynchronous programming.

Node.js experience

I learned Node.js with JavaScript and developed the backend for my college's cultural festival website using the Express library and Firebase for both the database and authentication.
Currently, I am working on my semester project, where I am responsible for the backend development of a Crime Management System. For this project, I am using Next.js, the Shadcn UI library, and Tailwind CSS

C/Fortran experience

C was the first programming language that introduced me to low-level operations and how things work under the hood. I learned basic data structures in C and later switched to C++ for solving LeetCode problems, where I understood about object-oriented programming.

Note: I have no prior experience with Fortran, but I am willing to learn if required.

Interest in stdlib

I am interested in stdlib as I am currently studying Machine Learning in Python, working with libraries like SymPy, Matplotlib, and Pandas. Additionally, my experience with JavaScript and Node.js through previous projects aligns well with stdlib project Symbolic Math , making it a suitable choice for my first open-source contribution. The best part of open-source contribution is the feeling when your pull request gets merged and your piece of code will be used by so many people to build different things that we can't imagine.

Version control

Yes

Contributions to stdlib

  • Fixes Javascript lint errors (Status : Merged) #6312
  • Added stats/incr/nanmmeanabs package (Status : Open) #5589
  • Fixes Javascript Indentation errors (Status : Merged) #6413

stdlib showcase

In Progress

Goals

The goal of this project to implement symbolic mathematices in Javascript.

Primary Goals:

  • Implement Lexer and Parser from scratch.
  • Provide support for basic mathematical operations.
  • Implement simplify, factor, expand, and solve functionalities for mathematical expressions.
  • Add support for mathematical symbols (π, Σ, α, etc.) and functions (sin, cos, tan, log, etc.).
  • Introduce differentiation and integration capabilities.

Additional Goals:

  • Implement Symbolic Matrix Algebra for advanced computations.
  • Extend support to Vector Algebra & Complex Numbers operations.

Why this project?

As a computer science student, I've always been curious about how developers build libraries and programming languages that power everything—from ordering a pizza to sending rovers to Mars. The endless possibilities that programming offers give individuals the tools to create whatever they imagine.

This project is a great opportunity for me to build something that developers can actually use, especially in JavaScript, one of the most widely used programming languages.

Also, since i am a interest in Math, I feel this project will help users write and manipulate math just as they would on paper, making it more intuitive and accessible.

Qualifications

I’ve gained hands-on experience with symbolic computation, particularly through working with libraries like SymPy in Python. On top of that, I’m quite comfortable with the JavaScript ecosystem, which has allowed me to integrate my knowledge of symbolic math into real-world projects. My academic background in Data Structures and Algorithms has also strengthened my problem-solving skills, giving me a solid foundation to tackle complex challenges.

Additionally, I’ve started diving into topics related to this project, such as building a Lexer and parser using JavaScript’s regular expressions (RegEx). This has given me valuable insight into tokenizing and parsing mathematical expressions, which will be crucial for developing symbolic computation tools.

Prior art

There are several references for this project, such as SymPy in Python, Math.js, and Nerdamer, which have already implemented symbolic math. Among these I think, SymPy stands out as the most comprehensive, widely used in Machine Learning and Artificial Intelligence, making it a reliable source of inspiration. However, its large library size, due to being purely written in Python, can be a limitation.

Commitment

I am willing to dedicate more than 35 hours per week. My college's summer vacation runs from mid-May to the last week of July, so I am fully available during June and July. Once my college reopens, I can commit to 20 hours per week.

During this period, I typically work from 8 PM to 1 AM IST ( 2:30 PM to 7:30 PM UTC ) but can adjust if needed. If there are any changes to my schedule, I will promptly inform the community. Additionally, I will provide weekly status reports to maintain transparency and integrity in the project.

Schedule

Assuming 12 weeks schedule.

Date (from and to) What I do
Pre GSOC Period
8 April to 7 May Resolving more issues & exploring codebase
GSOC Period
8 May to 1 June Discussion with mentors and community members about the project, its features, and implementation methods. Exploring libraries like SymPy, Math.js, and Nerdamer, while researching about lexer/tokenizer, and parsers.
Coding Period
2 June to 7 June (Week 1) Implement Lexer to tokenize mathematical expressions. Develop a tokenizer that recognizes symbols, numbers, and operators.
8 June to 14 June (Week 2) Implement Parser to convert tokens into an Abstract Syntax Tree (AST). Test basic parsing of mathematical expressions.
15 June to 21 June (Week 3) Implement basic mathematical operations (+, -, *, /, ^). Support evaluation of simple expressions.
22 June to 28 June (Week 4) Implement simplification, factoring, and expansion. Write unit tests for simplification and factoring.
1 July to 7 July (Week 5) Implement solving for basic algebraic equations. Validate equation-solving capabilities with test cases.
8 July to 13 July (Week 6) Add support for mathematical symbols (π, Σ, α, etc.). Introduce function support (sin, cos, tan, log, etc.).
14 July to 18 July
[Mid Term Evaluation and Report]
Prepare a mid-term report covering progress, challenges, and next steps.
19 July to 26 July (Week 7) Implement differentiation of mathematical expressions. Validate differentiation with test cases.
27 July to 2 August (Week 8) Implement integration for mathematical expressions. Write unit tests for integration.
3 August to 9 August (Week 9) Add support for fractional and complex numbers and Develop test cases to validate each function.
10 August to 16 August (Week 10) Writing documentation, conducting extensive testing, and preparing tutorials for users.
17 August to 23 August (Week 11) Addressing feedback from mentors and the community, and refactoring code.
24 August to 31 August (Week 12) Buffer week for any pending tasks.
1 September to 9 September
[Final Evaluation]
Submitting the final project report and demonstrating results.
From 9 September Onwards
[Post & Extended GSOC Period]
Continue improving the project based on mentor and community feedback. Expand functionality with additional features as needed. Work on potential integration with other mathematical libraries.

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.

Related issues

GSOC #25

Checklist

  • I have read and understood the Code of Conduct.
  • I have read and understood the application materials found in this repository.
  • I understand that plagiarism will not be tolerated, and I have authored this application in my own words.
  • I have read and understood the patch requirement which is necessary for my application to be considered for acceptance.
  • I have read and understood the stdlib showcase 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.
@Kavyansh-Bagdi Kavyansh-Bagdi added 2025 2025 GSoC proposal. rfc Project proposal. labels Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2025 2025 GSoC proposal. rfc Project proposal.
Projects
None yet
Development

No branches or pull requests

1 participant