good old paper on quasi-quotation

Graves, Ian L ian.l.graves at intel.com
Fri Aug 5 15:56:18 UTC 2016


The Bawden paper is a really good paper that I hadn't read, yet.  Thanks!  I've been thinking about quasiquotation a lot lately as it relates to the syntax-constructor approach I've been considering for the vector API in project Panama.  In particular, the notion of nested loops that feed induction variables inward.  Originally I had thought that perhaps this was an issue that I could solve via 'libraryizing' loops in specialized forms (reduction, etc.) but now I'm not so sure.  Quasiquoting with variable fields seems like something one could construct over a combination of MethodHandle and VarHandle combinators.  The issue I'm trying to wrap my brain around right now is inward dependency, or inward variable capture that you'd see in something like:

for(int a = Z;;)
   for(int b = X;;)
      for(int c = Y;;)
         //a,b,c captured here.  How to model this dependency in a DSL/constructor?

I suppose we can use a varargs/spreader/collector-based approach where the user track their captured variables using a scheme like De Bruijn[1] indexing or otherwise.  It's not something you can statically check, but those may be the breaks.

Coincidentally, I "grew up" with a different flavor of quasiquoting from the ML and Haskell communities that involves staged compilation and concrete DSLs that were parsed and transformed back to the host language's syntax before the final state of program compilation.  Not sure how relevant that is to this topic, but here it is all the same[2].

--Ian

[1] https://en.wikipedia.org/wiki/De_Bruijn_index
[2] Mainland, Why It's Nice to be Quoted: Quasiquoting for Haskell http://www.cs.tufts.edu/comp/150FP/archive/geoff-mainland/quasiquoting.pdf




-----Original Message-----
From: mlvm-dev [mailto:mlvm-dev-bounces at openjdk.java.net] On Behalf Of John Rose
Sent: Tuesday, August 2, 2016 4:28 PM
To: Da Vinci Machine Project <mlvm-dev at openjdk.java.net>
Subject: FTR: good old paper on quasi-quotation

Related to some discussion at the JVMLS about quasi-constants (templates, constants with holes), here is the early history of quasi-quoting in computing, as reported by someone who was there.

Alan Bawden, Quasiquotation in Lisp (1999) http://repository.readscheme.org/ftp/papers/pepm99/bawden.pdf

Also regarding the history of quasiquotes, I found this little gem, showing one of our own community, in his tender years, innocently confounding the Boffins of Quotation.

Boolos & Jeffrey, Logic, Logic, Logic (1999), p. 393 https://books.google.com/books?id=2BvlvetSrlgC&pg=PA393&lpg=PA393&source=bl&ots=sYbY0uDPnJ&sig=HWnkaAHgQOG45MGn5_KyYbPicsk&hl=en&sa=X&ved=0ahUKEwjEpL_33KPOAhVK7GMKHdU0BbwQ6AEISTAL#v=onepage&q&f=false

_______________________________________________
mlvm-dev mailing list
mlvm-dev at openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev


More information about the mlvm-dev mailing list