Wednesday, May 16, 2012

Resurrecting Object Curry - Part 2 : To Write is to think

In my earlier post I indicated that I plan to resurrect "my" language Object Curry. The source of this "inspiration" was my handwritten notes that I have kept from college days.
Many of the writeups seem silly ( but sme are really interesting) and had some new ideas.
But what are these "notes" and why I have kept them for so long ?

To teach is to understand - To write is to think.
I have just too many teachers in my family. My grandma was a teacher , my father is a medical doctor and of course a head of the department in a medical college. My mom was a principal of  high school. My other grandma's sister was teacher. Both my uncles married  teachers and my other aunt married a english professor and one of my cousin ... well you get the point. Something like Marisa Tomei in My Cousin Vinny.
The point is that my father says that to teach is to really understand. When you teach something to someone, you benifit the most during the process. You aquire clearer , crisper and potentially profound understanding ...
Somewhere in my my highschool years I started writing notes for myself as if I am teaching it myself! That habit remained though out the college days and even trace of it today .
Though I am writing for myself my tone was always as if I am teaching class or writing a tutorial.

Putting your fuzzy thoughts in writting helps make them concrete, crystal clear and most importantly durable.

Language is defined by how it is used.
Any language is ultimately defined by how it is used and how it feels to program in it. So instead of defing a precise spec and BNF grammar I will just go with sketch of an idea. Language is what my compiler will implement it ! 
I have tried thousands of syntax variations on my whiteboard and every time I try something out I discover some problem with it.


What's the plan then ?
  1. I will go through with my old writeups and try to see what is still useful and what can be extended. May be create new write ups. Benefit: may be I'll come up with something cool. 
  2. Implement parser in at least three langauges ( one of  C#, java, Objective C) Benefit: I will practice parser writing and practice writing in 4 different dev environments.
  3. Write as many algorithms in Object Curry as you possibly can. (Graph colouring or k-mean or page rank etc) Benefit: Revise my algorithms ! Make my Object Curry truely useful.
Unless of course I take project some place else or come up with even better idea.

Ground Rules for Parser
I am going to use parsing strategy that is recursive descent styled. But a twist taken from Generalized Phrase Structure Grammar. where child nodes may not be ordered and where there are still partial ordering.

The parser will for now output C++11 source code for now. 

1 comment: