Sunday 20 January 2013

Dog Programming Language





Developed by Sep Kamvar, Salman Ahmad and Zahan Malkani at MIT, this high-level Programming language, Dog, allegedly "makes it easy to create social applications by employing natural language commands.

The language emerged from Kamvar’s frustration with writing tonnes of code for defining social interactions in conventional languages like Java. He felt simple and intuitive interactions, say listening for someone’s facebook posts, had to be thought of in the realm of data storage and protocols. According to him these are better and more intuitively described using the natural language.

"I had to write code at a lower level of abstraction than I had to think about the interactions," he says. "And so I thought it would be interesting to start writing a programming language that allowed me to write at the same level of abstraction that I think."

And so he set out to create a new programming language, Dog (named such perhaps to convey the friendliness of the language, except to Cynophobes and cat people).Kamvar and his team of students have been developing the compiler for the language along with some demo programs. The public version of Dog is slated for release by summer this year. The language will be kept free and open source.

Dog identifies people as a basic data type, Kamvar believes that the major problem in defining social interaction using conventional languages is the notion of people. Following his approach of natural language, he created a syntax for the language utilizing simple words like listen, notify, ask, compute etc.

The promised product does indeed look much less intimidating than languages like Java. For example creating a group “students” can be simply done as: students = PEOPLE FROM facebook WHERE university = 'iit' AND degree = 'computer science'. Which resembles our ever so friendly Structured Query Language.

The use case of Dog is expected to be as follows, suppose you want to create a social application which requires standard computational tasks as well as a variety of social tasks say, listening to news feeds, messaging people, handle interaction events. Doing all this in a traditional language is a daunting task, especially the social aspects. By using Dog, you can abstract such things to simple code, which will be taken care of by Dog, while other programming languages can still be used for the non-social aspects of the application.

  
According to the MIT media page, 
"Dog is a new programming language that makes it easy and intuitive to create social applications. Dog focuses on a unique and small set of features that allows it to achieve the power of a full-blown application development framework. One of Dog’s key features is built-in support for interacting with people. Dog provides a natural framework in which both people and computers can be given instructions and return results. It can perform a long-running computation while also displaying messages, requesting information, or even sending operations to particular individuals or groups. By switching between machine and human computation, developers can create powerful workflows and model complex social processes without worrying about low-level technical details."

As of now, the language is for server side applications, but the team is also developing similar mechanisms for the client side.

Kamvar believes that Dog will enable non-programmers such as interaction designers or product managers to easily understand what the website is doing and what all functions are being used internally.
Salient features of the language
  • Identifies people using SQL query like commands, like
    good_students = PEOPLE FROM iit WHERE gpa < 9
  • Makes communication tasks, like sending messages, emails, listening to posts easier,
    LISTEN TO students VIA email FOR assignments
  • Supports integration with other languages, such as imports from Python
  • Simplifies asynchronous state management,
    LISTEN TO users FOR tickets

    ON ticket DO


Will this be a game changer for the social application developers? We cannot say.
Would it help students enrolled in the Complex Networks course with their projects? Not with these timelines it won’t.
But what it does do, is bring up this interesting debate of whether Programming languages are indeed unnecessarily hard and more work could be put into them, to make them more accessible.

Links


No comments:

Post a Comment