[erlang-questions] where did my code come from?
Tue Sep 13 22:28:56 CEST 2011
Am 13.09.11 21:53, schrieb Joe Armstrong:
> On Tue, Sep 13, 2011 at 9:44 PM, David Goehrig <> wrote:
> I was thinking of statically using the information to fetch and
> update the code. But you could do it dynamically by hacking the
> code loader and caching the results. I guess you could just say
Sorry for my ignorance, I have not written much erlang (unfortunately).
But just to get this concept -location is a clause directing the laoder,
So you have three entities:
a) the exporter site (exporting mymod)
b) the importer site (depending on mymod)
c) the loader (knowing where to find mymod)
Where a) and b) should be transparent of c). So you can plug in
different loders and load code from different sources.
Where is code depended by mymod loaded then?
site as a closure and pass in a function called require as a parameter
(for hygenic reasons) when evaluating the code loaded from a location,
that has a certain lookup rule for again loading code (relative to that
What about security issues - can you trust www.a.b even if it depends on
some internal modules (that are not sandboxed)?
Where would such a -location annotation typically be placed? Can you
give me an example?
Since you have more deployments than libraries and applications there
needs to be some wiring.
More information about the erlang-questions