Andrej Bauer maintains a “programming languages zoo” of languages like this: <a href="http://plzoo.andrej.com" rel="nofollow">http://plzoo.andrej.com</a><p><i>> The Programming Languages Zoo is a collection of miniature programming languages which demonstrates various concepts and techniques used in programming language design and implementation. It is a good starting point for those who would like to implement their own programming language, or just learn how it is done.</i>
I'm very fond of small, specific and simple languages without sacrificing inherent complexity. For me, that includes IP adresses, UUIDs, timestamps, URIs, println formatting, et cetera.<p>It's a shame though that we don't represent them as such in the current state of affairs but choose to implement them separately in every language. Can we have a fast, universal, feature complete parser generator that is natively supported in our mainstream languages?<p>For instance, think adding an ANTLR grammar into a .NET project and then be able to just do `var ipAddress = ip"127.0.0.1";` and get full editor support with that.
Scheme sounds like it's pretty close to what the author is describing. It's a very small and simple core that you can build on, and even create mini languages on top of. The macro system allows you to pretty much express any idea without having to change the core language. As a bonus the runtime is interactive allowing you to explore ideas and see the results immediately.
In my mind, there are three really great little languages:<p>* datafun - attempt to extend datalog to more generic computation. <a href="http://www.rntz.net/datafun/" rel="nofollow">http://www.rntz.net/datafun/</a> I liked simillar exploration of computing with latices with the concept of propagators: <a href="http://web.mit.edu/~axch/www/art.pdf" rel="nofollow">http://web.mit.edu/~axch/www/art.pdf</a><p>* dhall - configuration language that has user defined functions, but is total :) <a href="https://github.com/dhall-lang/dhall-lang" rel="nofollow">https://github.com/dhall-lang/dhall-lang</a><p>* the gamma - a visualization/data query language : <a href="http://tomasp.net/blog/2017/thegamma-getting-started/" rel="nofollow">http://tomasp.net/blog/2017/thegamma-getting-started/</a>
I worked through the CTM book[0] a while ago and I think this was the general approach taken using the Oz programming language. Each programming paradigm was split into a kernel language that would demonstrate specific programming features. I'd highly recommend trying it out.<p>I really like the diagram they use to split up the languages + paradigms[1]<p>[0]<a href="https://en.wikipedia.org/wiki/Concepts,_Techniques,_and_Models_of_Computer_Programming" rel="nofollow">https://en.wikipedia.org/wiki/Concepts,_Techniques,_and_Mode...</a><p>[1]<a href="https://www.info.ucl.ac.be/~pvr/paradigmsDIAGRAMeng108.jpg" rel="nofollow">https://www.info.ucl.ac.be/~pvr/paradigmsDIAGRAMeng108.jpg</a>
I was expecting this to be about <a href="http://wiki.c2.com/?LittleLanguage" rel="nofollow">http://wiki.c2.com/?LittleLanguage</a><p>But instead it's almost the opposite. Bentley's original use of the little language term was about optimizing the languages for specific tasks. Not about building them around explaining a single concept
Wikipedia knows of this thing called XL, or ‘Extensible Language,’ though I haven't seen it anywhere else: <a href="https://en.wikipedia.org/wiki/XL_(programming_language)" rel="nofollow">https://en.wikipedia.org/wiki/XL_(programming_language)</a><p>> XL features programmer-reconfigurable syntax and semantics. Compiler plug-ins can be used to add new features to the language. A base set of plug-ins implements a relatively standard imperative language. Programmers can write their own plug-ins to implement application-specific notations, which can then be used as readily as built-in language features.<p>> XL is defined at four different levels: XL0 defines how an input text is transformed into a parse tree. XL1 defines a base language with features comparable to C++. XL2 defines the standard library, which includes common data types and operators. XLR defines a dynamic runtime for XL based on XL0.<p>> XL has no primitive types nor keywords. All useful operators and data types, like integers or addition, are defined in the standard library (XL2). XL1 is portable between different execution environments. There is no such guarantee for XL2: if a particular CPU does not implement floating-point multiplication, the corresponding operator definition may be missing from the standard library, and using a floating-point multiply may result in a compile-time error.<p>Frankly, I'm not sure if this is much different from implementing a language with a parser generator, but apparently the ‘semantics plugins’ are written in a version of the language itself, instead of something like the eternal C[++].
Hmm. I wanted to offer a course based on Idris this time around, and found that I would have to cover a lot of Haskell to get to the main parts of Idris. As I was about to teach this semester, somebody pointed out the new book "The Little Typer", along the lines of "The Little Lisper" and "The Little Schemer". Looks like Pie is a toy language in "The Little Typer". Pie looks promising - I'll dig in and spend a weekend on it :)
As I was reading, I kept thinking, he should really look at The Little Typer and Pie. Then that was Section V!<p>(Really, many of the books in that series do this. The Reasoned Schemer for logic programming, The Little Prover for ACL2-style first-order logic.)
What an interesting idea. Sort of, isolate out a graph of concepts from a language, and pull it out into its own language.<p>I do wonder why the author believes you need a separate language for this. Why not a DSL, or even a regular library in your popular language of choice (Scala, Haskell, JS, etc.).<p>Is that a reasonable approach too? Or is some part of the toy language approach lost without perfect domain-specific syntax, or because of parts of your host language leaking in?
Wonder, how everyone forget BibTeX, the (stack based) language for formating bibligraphy databases:<p><a href="http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/biblio/bibtex/base/btxhak.pdf" rel="nofollow">http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/b...</a>
When I first read the title, I thought the article was about awk. After all the definitive book about awk has a whole chapter on little languages. In that context, little languages means languages with specialized applications, and not general-purpose.