{Thoughts}

Secrets revealed.

Category: Computer Science

Integral Calculus in Haskell

We started learning Haskell in Professor Misra’s class. Since this is the first functional programming language I have been exposed to, I decided to write an integrator.

small_dx = 0.0001

– integrate a function f from a to b
integrate f a b = integrateGen f a b small_dx 0

– Generalize the integrate function to take
– advantage of [...]

Playing with Memory in C++

I gave a two-hour lecture over C++ a couple of months ago. It was oriented towards Java programmers, so naturally I bashed in pointers and stack versus heap memory allocations into their heads. One of the examples I demoed was this:

// The outputs given is based on my machine; it may
// be different on yours.

#include [...]