Wednesday, March 2, 2011

OCaml Pattern Matching and etc.

I've a midterm tomorrow, in 3 classes. Anyway, calculus isn't hard. German will be alright. But programming languages, not that it will be hard, but just.... Ok so, we're allowed to use our notes we've taken in class as well as the daily summaries that he has given us in the past. Unfortunately, I've been taking all my notes in LaTeX on my computer. Which means I need to print them. Which means I need a printer, which means I needed to get my roommate to print it out. Which means I went and did something fun and asked him to do it. I came back a while later, and bam. Thirty Five Pages. THIRTY FIVE BLOODY PAGES of notes. Granted that's for the entire first half of this semester. But... It's computer paper! Formatted! To what looks like 10 size font. That's a lot of characters. Plenty of bits.

Anyway, besides that, I've just completed programming a reverse polish notation calculator in OCaml. The powers of pattern matching are spectacular. For anyone who has never programmed in Objective OCaml, I'd recommend attempting to. The type system is very nice, even if trying to figure out your error messages is a pain in the ass. I normally love my C++ but I do enjoy OCaml's elegance factor.

This semester seems like it's been quite a jump in what I've learned as far as CS goes. Before this semester I had no idea how to use php, javascript, server side includes, ocaml, unix file commands, batch file commands, and some directX code. Its a trend I would like to keep, this upward mobility of my learning. I like.

No comments:

Post a Comment