-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Erlang language run support. #1108
Conversation
package.json
Outdated
@@ -184,7 +184,8 @@ | |||
"fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", | |||
"fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", | |||
"sml": "cd $dir && sml $fileName", | |||
"mojo": "mojo run" | |||
"mojo": "mojo run", | |||
"erlang": "cd $dir && erlc $fileName && erl -noshell -s $fileNameWithoutExt start -s init stop" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that start
is a dynamic value? Any better way to improve this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use escript
to take the place of this command. Since Erlang use VM and we can specify the entrance function, the guide I'm learning uses start
as entrance. However, I found that I can use escript to run short Erlang programs and this program use main
as entrance. In other words, I can use erlc $filename && erl -noshell -s $fileNameWithoutExt main -s init stop
, which maybe equals to escript $filename
. But it seems that escript
is the best way solve this problem, so I use it at last.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now! Just leave two small comments.
Co-authored-by: Jun Han <[email protected]>
Co-authored-by: Jun Han <[email protected]>
Done. |
For the program cannot support erlang file currently, I edited the packages.json in order to support erlang.