Interpreter 5: Pike

Nov 13, 2011 01:11

Definitely downshifting to one every two days, so 15 interpreters for the month. It's a much more feasible speed. (And I'm already a day behind it! But I have a hope of catching up this time. ;-)

Notes )

Leave a comment

Comments 3

zahariel November 13 2011, 08:35:02 UTC
Is there an obvious reason get_internal() redirects to has_internal() if it doesn't find the key in the first map? Or is this just a bug? I can see you coding this and saying "Dammit, this is supposed to have an implicit progn. How do I do that? Ooh, I know, I'll make it an EXPLICIT progn! Problem solved!"

Also, higher-order abstract syntax! <3

I recommend Scala next. Or Fortran.

Reply

gwillen November 13 2011, 08:47:14 UTC
Waaaugh, that's a copy-paste bug. ;_;

As I understand it, what I'm doing here is not technically HOAS, because it fails adequacy: the set of terms admitted by the type I'm using is larger than the set of terms actually allowed in the language I'm interpreting. It's only allowed to be called HOAS if the two sets are the same.

Mind you, inside the interpreter itself, adequacy should be perfectly preserved; it should be impossible, from within interpreted code, to create an element of the representation outside the set of permissible terms. Pragmatically, that saves me; I don't know if the type theorists have a name for such a thing other than "bad HOAS".

Scala is likely. Fortran is... not. With only 15 languages I'm concentrating on the ones I have some actual reason to care about, which Fortran is... not.

Reply


lordspaz November 13 2011, 17:05:27 UTC
I,I "OCaml, go forth!"

Reply


Leave a comment

Up