From: Chris Hibbert <chris@pancrit.org>
Date: Sun, 10 Nov 2002 19:59:51 -0800
Subject: [e-lang] quasi-questions

I'm using quasi-literals for the e program I'm currently playing with,  
and I've started to think that quasi-patterns might make more sense 
than what I'm currently doing with split().  (I'm building web pages 
from template pieces so I can make a set of pages that contain images 
and automatically loop through the pages.  It's an excuse to learn and 
play with E, while building web pages that I'll actually put on my site.) markm

There are a few paragraphs on quasi-things in Walnut; they refer to an 
example web server, which I haven't found.   "quasi" appears in the ELib 
API in a few places, which led me to the elang grammar doc 
(http://www.erights.org/elang/grammar/quasi-overview.html), which gives 
more examples of use of quasi-literals and -matchers.  It also refers 
to parseUpdoc.emaker as a source of more examples, but I couldn't find 
it.  I found makeUpdocParser.emaker instead, but it didn't seem relevant. markm

There is one thing I'd like to do that I don't see straightforward 
techniques for, and no documentation,  so I'll lay out what I know and 
what I wonder here.

It appears that wherever a quasi-literal appears, it is expanded in 
place, and the dynamic values that it refers to must accessible there,  
or it's an error.  In order to use a quasi-literal as a template and 
fill it in with different values in different places, it looks like I 
need to make a method (function) that holds the definition of the 
quasi-literal, and takes the free variables as parameters.  Have I 
missed something that would just let me define a quasi-literal as a 
pattern, and evaluate it later?

The usage of a method whose only purpose is expanding a quasi-literal 
isn't too bad; you end up with a method that takes as arguments all the  
free variables referred to in the literal.  It seems so close to the 
purpose of quasi-literals that I felt compelled to ask if there was a 
simpler way.

Thanks,
Chris 
-- 
It is easy to turn an aquarium into fish soup, but not so easy to turn
fish soup back into an aquarium.
-- Lech Walesa on reverting to a market economy.

Chris Hibbert
hibbert@mydruthers.com
http://discuss.foresight.org/~hibbert

_______________________________________________
e-lang mailing list
e-lang@mail.eros-os.org
http://www.eros-os.org/mailman/listinfo/e-lang