HACKER Q&A
📣 shikaan

Ever made a programming language at work? Why?


I know the history of major programming languages and how they came to be, but the ones that make it "out there" tend to always be generic enough for me to not understand under which set of circumstances a company decides to invest in creating a programming language for a given use case.

Do you have experiences worth sharing?


  👤 kazinator Accepted Answer ✓
In the 2003-2005 time frame I worked on a new cellphone project. I had a C++ library of Lisp-like objects which ended up used in a few places, like for inter-process communication between several pieces, like between the mail transport and home screen p lugin. A programmer working on an IMAP4 transport noticed that it used Lisp and my stuff could be applied to it almost directly, including a pattern matching function I had, which turned out to work fine for classifying and validating IMAP4 responses.

It was not ever meant to be a language, but I eventually added function definition and evaluation which gave rise to VoqLisp. I have VoqLisp bindings to various APIs, and documented it; it ended up used by QA for testing.

VoqLisp had dynamic scope ("deep binding"), but with lexical capture. The initial dynamic frames of top-level forms, and of invoked functions, were marked with a lexical contour bit. There was a lambda which captured dynamic frames up to the closest containing lexical contour bit. When a lambda was invoked, the captured, lexically-delimited dynamic environment was inserted around it, after the parameter bindings, before the caller's dynamic environment. This made it possible for tests to use "let over lambda" to customize global parameters, and then run the lambda with the customized parameters in a separate thread.


👤 Leftium
Joel on Software explained why FogCreek made Wasabi: https://www.joelonsoftware.com/2006/09/01/wasabi/

Then a blog post on why they killed Wasabi 10 years later:

- https://web.archive.org/web/20150625182637/http://blog.fogcr...

- https://hw.leftium.com/#/item/9777829

---

I think you might be interested in\thinking about DSLs (Domain-Specific Languages). Lisp macros/meta-programming are often used to create DSLs.

Paul Graham describes writing a DSL for ViaWeb to stay ahead of the competition: https://hw.leftium.com/#/item/32053575

Interestingly, this seems to also have been replaced later: https://hw.leftium.com/#/item/10567685