Hacker News new | past | comments | ask | show | jobs | submit login
The Programming Languages Zoo (andrej.com)
147 points by creata 5 days ago | hide | past | favorite | 13 comments

The primary (?) author of this site (Andrej Bauer) is a professor at the University of Ljubljana. I'm currently in his Principles of Programming Languages course and I have to say, it is the one and only "theoretical" CS subject that I've really enjoyed!

Old recordings of his other classes are also the only thing that helped me actually understand proofs of program correctness last semester. Seriously, I went through all our lectures and basic materials twice and still didn't get it. Then someone sent me one of his recordings and in 30 minutes, it all just clicked for me. Ended up getting 100% on that part of the exam, where before I wasn't sure I'd even pass.

Which video was it?

ISRM-PPJ-2020-03-04 https://vimeo.com/396885838

I'm not expecting anyone to actually already have this done, but I would like to suggest that with the toy languages that a walk through of how to set up a language server protocol for the language would be rather helpful, and educational. This page claims to be a good starting point https://microsoft.github.io/language-server-protocol/

This is cool, and amusingly I wrote a simple calculator over the weekend (and will be adding variables this week when I get back to it) for a demo for work. minikanren or microkanren would be a good addition to this. There's already miniprolog so there's some overlap, but it's a well-defined language that's about the same size as some of these.

I think there is still value in minikanren since it uses a different evaluation strategy than Prolog. While Prolog just has to support backtracking when things fail, minikanren requires much more interleaving of code paths.

In terms of implementation, you can probably implement backtracking good enough for Prolog via backtracking, but you really need immutable maps for minikanren due to the interleaving. On the prolog side of things, prolog implementations typically care a lot more about being able to dynamically interact with the database including adding/retracing goals. Finally, minikanren tends to play nicer when combined with another language compared to prolog so it might be interesting to do include have it embedded in another language.

Mini languages are so fun! I wrote an absurd language for my GraalVM internship application that’s implemented in Ruby, Java and JavaScript. Quite absurd but a lot of fun: https://github.com/nicholaslyang/for-the-graal

Some past threads:

The Programming Languages Zoo - https://news.ycombinator.com/item?id=18638290 - Dec 2018 (13 comments)

The new and improved Programming Languages Zoo - https://news.ycombinator.com/item?id=12441903 - Sept 2016 (2 comments)

Some of them also have compilers to a simplified machine object code. This is seriously amazing. I doubt I'll get anything else done for the rest of the day :D

Could Ada++ be part of the Zoo? xD

It's not a miniature language, nor is it a real language.

Sounds like a pedantic distinction without a difference ; )

Is it pedantic to point out that Ada++ is inconsistent with the objective of the site:

> 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. [emphasis added]

And I know you've posted about Ada++ a few times (I thought I recognized your name, you were the submitter the day after April Fool's Day), but Ada++ is still not a real language. At best it's a cosmetic (and poorly done) transformation of Ada itself. I mean, this is a code sample from the site:

  case Variable:
    when 0      => Put_Line ("Zero");
    when 1 .. 9 => Put_Line ("Positive Digit");
    when 10 | 12 | 14 | 16 | 18 =>
      Put_Line ("Even Number between 10 and 18");
    when others => Put_Line ("Something else");
Note the weird mismatch of the : as the starting delimiter for the block and } for the closing delimiter. Because literally `is` becomes `:` and `end` becomes `}`, and `begin` becomes `{`. Since `case` statements in Ada don't use `begin` but do use `is` you end up with this gross translation.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact