TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Little Languages

150 pointsby maxhallinanover 6 years ago

13 comments

panicover 6 years ago
Andrej Bauer maintains a “programming languages zoo” of languages like this: <a href="http:&#x2F;&#x2F;plzoo.andrej.com" rel="nofollow">http:&#x2F;&#x2F;plzoo.andrej.com</a><p><i>&gt; 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>
评论 #18638403 未加载
评论 #18646672 未加载
sharpercoderover 6 years ago
I&#x27;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&#x27;s a shame though that we don&#x27;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&quot;127.0.0.1&quot;;` and get full editor support with that.
评论 #18637600 未加载
评论 #18637507 未加载
评论 #18640359 未加载
评论 #18639874 未加载
评论 #18637781 未加载
评论 #18637027 未加载
评论 #18653137 未加载
评论 #18637184 未加载
yogthosover 6 years ago
Scheme sounds like it&#x27;s pretty close to what the author is describing. It&#x27;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.
评论 #18638590 未加载
评论 #18637169 未加载
a-salehover 6 years ago
In my mind, there are three really great little languages:<p>* datafun - attempt to extend datalog to more generic computation. <a href="http:&#x2F;&#x2F;www.rntz.net&#x2F;datafun&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.rntz.net&#x2F;datafun&#x2F;</a> I liked simillar exploration of computing with latices with the concept of propagators: <a href="http:&#x2F;&#x2F;web.mit.edu&#x2F;~axch&#x2F;www&#x2F;art.pdf" rel="nofollow">http:&#x2F;&#x2F;web.mit.edu&#x2F;~axch&#x2F;www&#x2F;art.pdf</a><p>* dhall - configuration language that has user defined functions, but is total :) <a href="https:&#x2F;&#x2F;github.com&#x2F;dhall-lang&#x2F;dhall-lang" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dhall-lang&#x2F;dhall-lang</a><p>* the gamma - a visualization&#x2F;data query language : <a href="http:&#x2F;&#x2F;tomasp.net&#x2F;blog&#x2F;2017&#x2F;thegamma-getting-started&#x2F;" rel="nofollow">http:&#x2F;&#x2F;tomasp.net&#x2F;blog&#x2F;2017&#x2F;thegamma-getting-started&#x2F;</a>
评论 #18639968 未加载
greenyouseover 6 years ago
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&#x27;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:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Concepts,_Techniques,_and_Models_of_Computer_Programming" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Concepts,_Techniques,_and_Mode...</a><p>[1]<a href="https:&#x2F;&#x2F;www.info.ucl.ac.be&#x2F;~pvr&#x2F;paradigmsDIAGRAMeng108.jpg" rel="nofollow">https:&#x2F;&#x2F;www.info.ucl.ac.be&#x2F;~pvr&#x2F;paradigmsDIAGRAMeng108.jpg</a>
jsnellover 6 years ago
I was expecting this to be about <a href="http:&#x2F;&#x2F;wiki.c2.com&#x2F;?LittleLanguage" rel="nofollow">http:&#x2F;&#x2F;wiki.c2.com&#x2F;?LittleLanguage</a><p>But instead it&#x27;s almost the opposite. Bentley&#x27;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
评论 #18637894 未加载
aasasdover 6 years ago
Wikipedia knows of this thing called XL, or ‘Extensible Language,’ though I haven&#x27;t seen it anywhere else: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;XL_(programming_language)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;XL_(programming_language)</a><p>&gt; 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>&gt; 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>&gt; 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&#x27;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[++].
sn41over 6 years ago
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 &quot;The Little Typer&quot;, along the lines of &quot;The Little Lisper&quot; and &quot;The Little Schemer&quot;. Looks like Pie is a toy language in &quot;The Little Typer&quot;. Pie looks promising - I&#x27;ll dig in and spend a weekend on it :)
alew1over 6 years ago
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.)
bchernyover 6 years ago
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?
评论 #18639093 未加载
评论 #18639092 未加载
pgtanover 6 years ago
Wonder, how everyone forget BibTeX, the (stack based) language for formating bibligraphy databases:<p><a href="http:&#x2F;&#x2F;vesta.informatik.rwth-aachen.de&#x2F;ftp&#x2F;pub&#x2F;mirror&#x2F;ctan&#x2F;biblio&#x2F;bibtex&#x2F;base&#x2F;btxhak.pdf" rel="nofollow">http:&#x2F;&#x2F;vesta.informatik.rwth-aachen.de&#x2F;ftp&#x2F;pub&#x2F;mirror&#x2F;ctan&#x2F;b...</a>
xellisxover 6 years ago
Does brainfuck count as a small language?
评论 #18646702 未加载
kccqzyover 6 years ago
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.