![]() MATLAMP is a PHP project I started in the winter of 2008, and stopped working on in the spring of 2008 (reasons why later). It was a MATLAB-style web application that let you do calculations on scalars, vectors, etc. and plot simple graphs. I started when I got frustrated by a physics midterm and my inability to successfully transition into college life. I learned a lot about PHP, regular expressions, servers, and love along the way. I stopped during the Spring quarter, because a: I was really busy, and b: I realized the whole project should have been done in javascript instead of using PHP (much like an earlier project of mine that I actually sort of adapted to javascript). I learned later about context-free grammars and other things that would have been better than regular expressions for parsing user input. I stopped running the code on my server at about the same time, since I realized that there were a lot of "evals" in the code, which would (probably) be easy to exploit, but I have posted and annotated all the source files below (warning: some of these pages are pretty huge, thanks to the needless syntax highlighting I applied). They are exactly the way I left them, complete with useless/offensive/angsty comments. Enjoy: »0phpmath.php »editor.php »functions.php »help.html »helpbutton.php »imgview.php »index.php »logo.php »plot.php »runbutton.php »scriptz.js »style.css »updates.html »updatesbutton.html Looking back at this stuff a little more than a year later, the code is extremely badly written and completely unscalable. And it's in PHP. It's nice to know that I've come so far in so short a time. |