|
|
| Author |
Message |
|
| vlad.dumitrescu at flashm |
Posted: Mon Aug 02, 1999 6:49 pm |
|
|
|
Guest
|
Hi all!
I have a few questions |
|
|
| Back to top |
|
| tobbe at serc.rmit.edu.au |
Posted: Tue Aug 03, 1999 12:48 am |
|
|
|
Guest
|
> Is there any way to find out whether a specific VM is installed on a
> node, or it is safe to assume both JAM and BEAM are present? (the
> latter restricts the possible use of other VMs)
One way of doing this is to compile a module with:
erl -compile <MOD>
and then test if the resulting file suffix is beam or jam.
I've done this in combination with autoconf.
So in the configure.in I have:
dnl find out the type of Erlang machine which is used
AC_MSG_CHECKING([checking for Erlang machine type])
rm -f rootdir.{jam,beam}
$ac_cv_erl -compile rootdir
EDDIE_ROOTDIR_FILES=`echo rootdir.*`
case "rootdir_FILES"in
*jam*)
EMULATOR=jam
AC_SUBST(EMULATOR)
AC_MSG_RESULT([jam])
;;
*beam*)
EMULATOR=beam
AC_SUBST(EMULATOR)
AC_MSG_RESULT([beam])
;;
*)
AC_MSG_RESULT([no])
AC_MSG_ERROR("Unable to determine Erlang machine type: jam/beam")
;;
esac
I also uses the module 'rootdir' to get hold of where
the Erlang root directory is, so:
-module(rootdir).
-author('tobbe_at_eddieware.org').
%%% --------------------------------------------------------------------
%%% Created : 26 Mar 1999 by tobbe_at_eddieware.org
%%% Function: Write the Erlang root dir to the file: root_dir.result
%%% --------------------------------------------------------------------
-vc('$Id: eddie_rootdir.erl,v 1.3 1999/05/13 02:36:03 ttey Exp $ ').
-export([start/1]).
start([ResultFile]) when atom(ResultFile) ->
case file:open(atom_to_list(ResultFile),[write,raw]) of
{ok,Fd} ->
file:write(Fd,code:root_dir()),
file:sync(Fd),
file:close(Fd);
_ ->
false
end,
halt().
In the configure.in this is used as:
dnl find out where the Erlang root dir is located
AC_MSG_CHECKING([checking for the Erlang root dir])
ROOTDIR_RESULT=rootdir.result
rm -f ROOTDIR_RESULT
$ac_cv_erl +B -noshell -s rootdir start rootdir_result
ERLDIR=`cat $ROOTDIR_RESULT`
AC_SUBST(ERLDIR)
AC_MSG_RESULT([$ERLDIR])
Cheers /Tobbe
Post generated using Mail2Forum (http://m2f.sourceforge.net) |
|
|
| Back to top |
|
| tobbe at serc.rmit.edu.au |
Posted: Tue Aug 03, 1999 2:05 am |
|
|
|
Guest
|
> Is there any way to find out whether a specific VM is installed on a
> node, or it is safe to assume both JAM and BEAM are present? (the
> latter restricts the possible use of other VMs)
One way of doing this is to compile a module with:
erl -compile <MOD>
and then test if the resulting file suffix is beam or jam.
I've done this in combination with autoconf.
So in the configure.in I have:
dnl find out the type of Erlang machine which is used
AC_MSG_CHECKING([checking for Erlang machine type])
rm -f rootdir.{jam,beam}
$ac_cv_erl -compile rootdir
EDDIE_ROOTDIR_FILES=`echo rootdir.*`
case "rootdir_FILES"in
*jam*)
EMULATOR=jam
AC_SUBST(EMULATOR)
AC_MSG_RESULT([jam])
;;
*beam*)
EMULATOR=beam
AC_SUBST(EMULATOR)
AC_MSG_RESULT([beam])
;;
*)
AC_MSG_RESULT([no])
AC_MSG_ERROR("Unable to determine Erlang machine type: jam/beam")
;;
esac
I also uses the module 'rootdir' to get hold of where
the Erlang root directory is, so:
-module(rootdir).
-author('tobbe_at_eddieware.org').
%%% --------------------------------------------------------------------
%%% Created : 26 Mar 1999 by tobbe_at_eddieware.org
%%% Function: Write the Erlang root dir to the file: root_dir.result
%%% --------------------------------------------------------------------
-vc('$Id: eddie_rootdir.erl,v 1.3 1999/05/13 02:36:03 ttey Exp $ ').
-export([start/1]).
start([ResultFile]) when atom(ResultFile) ->
case file:open(atom_to_list(ResultFile),[write,raw]) of
{ok,Fd} ->
file:write(Fd,code:root_dir()),
file:sync(Fd),
file:close(Fd);
_ ->
false
end,
halt().
In the configure.in this is used as:
dnl find out where the Erlang root dir is located
AC_MSG_CHECKING([checking for the Erlang root dir])
ROOTDIR_RESULT=rootdir.result
rm -f ROOTDIR_RESULT
$ac_cv_erl +B -noshell -s rootdir start rootdir_result
ERLDIR=`cat $ROOTDIR_RESULT`
AC_SUBST(ERLDIR)
AC_MSG_RESULT([$ERLDIR])
Cheers /Tobbe
Post generated using Mail2Forum (http://m2f.sourceforge.net) |
|
|
| Back to top |
|
| per at erix.ericsson.se |
Posted: Tue Aug 03, 1999 10:48 pm |
|
|
|
Guest
|
Vlad Dumitrescu wrote:
>how is the free source version of Erlang related to the professional
> version? Will it always be one step back? (since the pro version now
> is 4.8)
I hope you don't think we're just sitting on the "pro" version for a
release interval until we release it as free source... The problem is
that it's currently a lot of work, much of it manual, to turn "pro" into
something that can decently be released in source form, due to "pro"
being interwowen with the local development environment (ClearCase etc),
being targeted for binary-only releases, having portability problems,
etc.
That work has *so far* only been done once, with 4.7.4 -> open-source
47.4.0 - and the goal is that it shouldn't have to be done again;
quoting Sebastian Strollo from a message here back in May:
Right now we are working hard
to make sure that in the future we will make the main release the same
as the open source release. The aim right now is to make the next
major product release (beginning of November) this new unified source
release.
I.e. we could in theory tar up the current "pro" and put it on the web
site, but virtually no one would be able to build it, and I don't think
that would benefit either the Erlang user community or Erlang's
reputation.
>is the VxWorks port just a regular port, or it does use the special
> facilities of the OS in order to be more efficient?
I believe it's pretty regular, special facilities being used mostly to
overcome the mismatch between what the OS provides and what the Erlang
runtime system expects. (E.g. it really doesn't have an equivalent of
a Unix pipe, so someone wrote a ("real OS") driver that implemented it.)
Basically, what is a Unix process in Unix is a "task" in VxWorks, rather
than (e.g.) Erlang processes being mapped to VxWorks tasks. Context
switches between VxWorks tasks should be less expensive than between
Unix processes, meaning that using "port programs" should be "cheaper"
in VxWorks, but as far as I know no measurements of this have been done.
--Per Hedeland
per_at_erix.ericsson.se
Post generated using Mail2Forum (http://m2f.sourceforge.net) |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|