<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:Arial;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
span.Typed
{font-family:"Courier New";}
span.tty
{font-family:"Courier New";}
span.Name
{font-style:italic;}
span.Variable
{font-family:"Times New Roman";
font-style:italic;}
span.EmailStyle21
{font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><span style='color:navy'>This reminds me of a suggestion
months ago to compile regular expressions into modules “on-the-fly”
for better performance. I thought that was a neat idea and put in on my list
as a possible project for myself. Have not yet gotten around to it, but
planned to it and benchmark against the regexp module to see if it is any better.
Thought I might learn something from it, too…</span></p>
<p class=MsoNormal><span style='color:navy'> </span></p>
<p class=MsoNormal><span style='color:navy'>DBM</span></p>
<p class=MsoNormal><span style='color:navy'> </span></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=2 width="100%" align=center tabindex=-1>
</div>
<p class=MsoNormal><b><span style='font-family:Tahoma'>From:</span></b><span
style='font-family:Tahoma'> erlang-questions-bounces@erlang.org
[mailto:erlang-questions-bounces@erlang.org] <b>On Behalf Of </b>Hynek Vychodil<br>
<b>Sent:</b> Sunday, June 08, 2008 04:01<br>
<b>To:</b> Jacob Perkins<br>
<b>Cc:</b> erlang-questions@erlang.org<br>
<b>Subject:</b> Re: [erlang-questions] dynamic module compilation</span></p>
</div>
<p class=MsoNormal> </p>
<p class=MsoNormal style='margin-bottom:12.0pt'>compile:file<br>
<br>
or <br>
<br>
compile:forms with erl_parse and erl_scan<br>
<br>
than use code:purge and code:load or code:load_file<br>
<br>
But in your use case I think there could be better solution with ets from file
or dets.</p>
<div>
<p class=MsoNormal>2008/6/8 Jacob Perkins <<a href="mailto:japerk@gmail.com">japerk@gmail.com</a>>:</p>
<p class=MsoNormal>Hi all,</p>
<div>
<p class=MsoNormal> </p>
</div>
<div>
<p class=MsoNormal>I need some help understanding how to dynamically
compile/generate an erlang module. I've seen other projects do this kind of
thing, such as erlydtl, but my needs are much simpler.</p>
</div>
<div>
<p class=MsoNormal> </p>
</div>
<div>
<p class=MsoNormal>I have a few files that are basically lists of words. What I
want to do is generate a module whose functions will return each list of words.
So if I have two files named "adjectives" and "nouns", then
the generated module (let's call it 'grammar') should have two functions,
adjectives() and nouns(), that return their respective list of words.</p>
</div>
<div>
<p class=MsoNormal> </p>
</div>
<div>
<p class=MsoNormal>How can I do this?</p>
</div>
<div>
<p class=MsoNormal> </p>
</div>
<div>
<p class=MsoNormal>Thanks,</p>
</div>
<div>
<p class=MsoNormal>Jacob</p>
</div>
<p class=MsoNormal><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions"
target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a></p>
</div>
<p class=MsoNormal><br>
<br clear=all>
<br>
-- <br>
--Hynek (Pichi) Vychodil </p>
</div>
</div>
</body>
</html>