Skip to content

Instantly share code, notes, and snippets.

@krestenkrab
Created February 28, 2010 23:13
Show Gist options
  • Save krestenkrab/317889 to your computer and use it in GitHub Desktop.
Save krestenkrab/317889 to your computer and use it in GitHub Desktop.
The Erjang/OTP shell in action!
(For some reason it does not print the prompt; don't let yourself be confused by that).
krab$ ./erl.sh
Eshell V5.7.3 (abort with ^G)
erlang:display("hello world!").
"hello world!"
true
erlang:processes().
[PID<:39>,PID<:349>,PID<erl_prim_loader:3>,
PID<error_logger:24>,PID<:38>,PID<inet_db:57>,PID<init:1>,
PID<kernel_sup:43>,PID<:354>,PID<global_name_server:51>,
PID<:54>,PID<global_group:72>,
PID<application_controller:26>,PID<:53>,PID<:273>,
PID<rex:47>,PID<:548>,PID<kernel_safe_sup:357>,
PID<code_server:83>,PID<standard_error:267>,PID<:55>,
PID<file_server_2:75>,PID<standard_error_sup:266>,
PID<user:284>]
erlang:system_info(allocated_areas).
[{'non_heap:CMS Perm Gen',45293568,39785736},
{'heap:CMS Old Gen',50331648,11012616},
{'heap:Par Survivor Space',2097152,2097152},
{'heap:Par Eden Space',12582912,3554304},
{'non_heap:Code Cache',3903488,3875648}]
erlang:system_info(heap_type).
shared
erlang:system_info(os_type).
{unix,"Mac OS X"}
foobar:non().
[compiling lib:219ms]** exception error: undefined function apply/2
in function erl_eval:do_apply/5
in call from shell:exprs/6
in call from shell:eval_exprs/6
in call from shell:eval_loop/3
in call from apply/2
erlang:halt().
krab$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment