Skip to content
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

Added simple Erlang Selection Based Evaluation. ;) #70

Merged
merged 2 commits into from
Mar 13, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/example.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-module(example).
-export([hello/0]).

hello() ->
io:format("Hello, World!~n").
4 changes: 4 additions & 0 deletions lib/grammars.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ module.exports =
"File Based": (filename) -> [filename]
#command: "ghc"
#"Selection Based": (code) -> ['-e', code]

Erlang:
command: "erl"
"Selection Based": (code) -> ['-noshell', '-eval', code+', init:stop().']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment about how the code has to be appended with , init:stop(). to get it to run (and stop apparently) in erl?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, English is not my native language, I can't fully understand what you write :)
But, this , init:stop(). we need to kill erl, because it can't be killed by itself. ;) The code should be simple expression, there is no support for functions for example, because now that command (in this pull request) only can do some simple things (printing, for example) yet. But I'll do my best to understand how to use real REPL with this awesome plugin :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erlang is a strange beast.

Will this still be practical with only simple evaluation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course it is :)
Erlang is not a strange, it's just different :)