trifork / erjang

A JVM-based Erlang VM
http://www.erjang.org
Apache License 2.0
727 stars 62 forks source link

LFE Interop #74

Closed sirinath closed 10 years ago

sirinath commented 11 years ago

Is it possible to have http://lfe.github.io/ compilation target erjang?

krestenkrab commented 10 years ago

Hi @sirinath. Here's how to run it with LFE with Erjang: The shell prints out extra N> for some reason (supposedly the erl shell is still seeing newlines somehow) but otherwise it looks just fine. /cc @rvirding

Krestens-MacBook-Pro:Projects krab$ git clone git://github.com/rvirding/lfe.git
Cloning into 'lfe'...
Checking connectivity... done
Krestens-MacBook-Pro:Projects krab$ cd lfe/
Krestens-MacBook-Pro:lfe krab$ . ~/erlang/r16b02/activate 
Krestens-MacBook-Pro:lfe krab$ ~/bin/rebar compile
==> lfe (compile)
Compiled src/lfe_scan.xrl
.....

Krestens-MacBook-Pro:lfe krab$ ../erjang/jerl -pa ./ebin/
** Erjang R16B02 **  [root:/Users/krab/erlang/r16b02] [erts:5.10.3] [smp S:2 A:10] [java:1.7.0_40] [unicode]
Eshell V5.10.3  (abort with ^G)
1> lfe_shell:start().
LFE Shell V5.10.3 (abort with ^G)
> <0.0.675>
2> (+ 1 2 3)
2> 6
2> > 2> ^C
krestenkrab commented 10 years ago

Actually, if you run it like this you avoid the above problem:

Krestens-MacBook-Pro:lfe krab$ ../erjang/jerl -pa ./ebin/ -noshell -s lfe_shell 
LFE Shell V5.10.3 (abort with ^G)
> (+ 1 2 3)
6
sirinath commented 10 years ago

Great!