Scheme for Fun!!
Today, Mr. Gavin Sathan took the slot of our “favourite” lecturer Dr. Sonah. Mr. Gavin Sathan is our new lecturer with a good sense of humour having incredible patience to re-explain a concept not too clear in mind. I honestly do not hesitate to ask him questions to clarify my doubts about C++/Programming Concepts.
The first time today, I brought my OS and IDE. I was happy, something new, exciting was going to happen! Geany enabled me to work at an astonishing speed, debugging is easy and I like the tab feature.
In the small lab, as we were downloading the slides for revision: Arrays, Functions and recursion, by utmost co-incidence, Mr. Sathan was in the PC besides me administer his new blog.
Then, having a glance at the screen, I saw a new comment on programming and then the issue of programming in Scheme was raised. I told him that I successfully installed DrScheme and configured it for the Beginning Student Language mode, but sadly, I didn’t know how to proceed with…
Then to my great surprise: “Attan mo large toi ladan”. I was hyper happy!! And this was the first simple program typed in quickly:
(define chk (lambda(a) (+ 3 a)) ) The astonishing elements that I could take note was:
- the braces () used almost “madly” everywhere, God knows why
- no ; at the end of each statement(unlike c++)
- postfix notation
- functional programming (maybe like Haskell in HSC!)
He then told me about CSE Programming Languages & Algorithms, where there are notes on learning Scheme. Instantly I entered the CSE website and started to study the slides, which were interesting and even funny:
In Dr.Scheme, I tried running the following program: (define (area-of-circle r) (* 3.14 (* r r))) (define (area-ring r1 r2) (- (area-of-circle r1) (area-of-circle r2))) and it works! but the problem is how to display the results in floating? eg. instead of 314, 314.0.
Mr. Sathan, then proposed me to attend the PL & Algo classes on Friday from 09:00 to 11:00 after which we have Programming Methodology with him. i.e after Scheme, C++. This was a super cool idea!
But the problem that this module is intended for 2nd year CSE students. Will I be allowed to attend this class, if I make an effort to come as early as 09:00 am?
Learning Functional programming was always a mystery for me. I could not understand Haskell as properly as Pascal in HSC.
The main reason for me to have such a keen interest to learn Scheme lies in the following quote: “Learning by experimenting is the best way to learn. Learning programming using Scheme is fun and rewarding as the language is so malleable. A University is not only a place where people go to get a degree. Rather it’s a place where intelligent people (students + academics) meet to share knowledge”
I hope, despite being at first year level, be able to enjoy experimenting with Scheme, if time permits.