[e-lang] a few notes about E install/basic usage

Kevin Reid kpreid at mac.com
Thu Jun 28 12:58:23 EDT 2007


On Jun 28, 2007, at 12:41, Zooko O'Whielacronx wrote:

> Folks:
>
> I just tried to install E again.  First I tried compiling from
> source, which failed, and I didn't diagnose why (yet) but instead
> downloaded the "pure j" tarball.  I executed my old inst-e.bash
> script, and it complained that it couldn't find a "dist" directory,
> so I mkdir'ed a dist directory and moved everything except for inst-
> e.bash into it and then, I was glad to see, inst-e.bash just worked.

inst-e.bash was apparently written to work on a source distribution  
root. dist/ is the directory from which compiled distributions are made.

Please rewrite inst-e.bash to work with the purej distribution --  
right now, there's a nonworking copy of it included, and that's bad.  
If you supply a fix I'll commit it.

> I finally hit an irritating snag and stopped for now.  This was when
> I wanted to import some E code from a file into the interpreter.  To
> do so, according to Walnut [1], I need to import my module as
> something like <import:com.yourdomain.e.makeQueue>.

You can do this:

<elang:syntax.EParser>(<file:makeQueue>.getTwine()).eval(safeScope)

Or if you want to get the bindings and not just the return value:

def load(file) {
    def [v, s] := <elang:syntax.EParser>(file.getTwine()) \
                      .evalToPair(interp.getTopScope())
    interp.setTopScope(s)
    return v
}

(This will execute the code as if you'd entered it in the REPL.)

> 4.  After I held my nose and went through the hassle of mkdir "/
> System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/
> ext/emakers" and symlink my file so that it is reachable from that
> directory, then it still didn't work.

Ack, don't do this. Use the -cpa option to rune instead.

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list