[erlang-questions] Dynamic Code Loading in ERTS

Björn-Egil Dahlberg wallentin.dahlberg@REDACTED
Tue Feb 19 22:32:10 CET 2013


A source for examples is often the test suites. In this particular case it
could be hard to find.

https://github.com/erlang/otp/blob/master/erts/emulator/test/code_parallel_load_SUITE.erl

Uses dynamic a dynamic generate and load approach. Not really meant as a
tutorial but could give a few pointers. =)

// Björn-Egil

2013/2/19 Paul Davis <paul.joseph.davis@REDACTED>

> Tyron,
>
> Bob's also a got a pretty easy to understand example in mochiglobal
> [1] that helped me pick up on some of the compilation parts.
>
> [1] https://github.com/mochi/mochiweb/blob/master/src/mochiglobal.erl
>
> On Tue, Feb 19, 2013 at 12:08 PM, Bob Ippolito <bob@REDACTED> wrote:
> > http://www.erlang.org/doc/man/code.html#load_binary-3
> >
> >
> > On Tuesday, February 19, 2013, Tyron Zerafa wrote:
> >>
> >> Does anyone know of a way in which one can execute a function's abstract
> >> syntax tree WITHOUT using erl_eval?
> >>
> >> The only (naive) way I have managed to come up with so far is to write
> the
> >> function to a file, compile and load it? Is there a practical way which
> >> avoids this overhead (of writing to a file) allowing code to be loaded
> >> directly in the ERTS??
> >>
> >> Thanks for all your help :)
> >
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://erlang.org/mailman/listinfo/erlang-questions
> >
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130219/53639568/attachment.htm>


More information about the erlang-questions mailing list