Skip to content
JinYonghao edited this page Oct 6, 2016 · 6 revisions

Welcome to the mmaclone wiki!(Under Construction)

About this project

I am a Wolfram Mathematica enthusiast, Mathematica is an ideal tool to let one fiddle around with equations, test ideas and do a lot of cool stuffs. Having spent plenty of time on it, I think it will serve as a good opportunity to test my understanding about it by writing my own implementation of Mathematica from scratch. Albeit I have spent a lot of time programming for the program, due to my limited knowledge in programming, the project is still in very pre-alpha stage. But I am still very gratified that this toy program runs smoothly and beats my original expectation.

I am a strong believer in Learn By Building. This project further corroborate my belief. I learned a lot from this project.

Details of implementation(still under construction)

Parser

I have no experience in parser of any kind before, and I always thought that it's too complicated for me. At first, I implemented a simple lisp-like parser, and paid more attention to the part that actually perform evaluation. I soon found the lisp-like syntax tedious, and it felt like I was not working on Mathematica but rather some dialect of Lisp, annoying! I finally made up my mind to mimic the whole syntax of Mathematica. It is a very challenging if not impossible work for me, I was not in the mood to learn parser systematically (probably a better choice), so I spent plenty of time reading tutorials and blogs. Thanks to the outstanding Parsec library, after numerous trial-and-errors, I finally implemented a two-pass parser with very similar behavior with Matheamtica. It's indeed a more trickier work than I previously thought.