[erlang-questions] [ANN] TryErl: run Erlang code online
Wed Feb 11 14:25:41 CET 2015
Yeah, that's ok. It's still inside sandbox. You may also try to explore
or see process list
2015-02-11 16:10 GMT+03:00 Vladimir Dronnikov <dronnikov@REDACTED>:
> % -*- coding: utf8 -*-
> -export([loop/0, main/0]).
> -import(lists, [map/2]).
> -import(pg2, [pid/0, join/2, get_members/1]).
> loop() ->
> join(forks, pid()),
> _ -> spawn(bomb, loop, ),
> main(_) ->
> spawn(bomb, loop, ),
> case get_members(forks) of
> [Pid|Pids] -> map(fun(P) -> P ! 1 end, [Pid|Pids]);
> _ -> error
> main() -> main(0).
> exposes some internal guts to the browser ;) Please check if it's
> harmless. Good resource. Thank you.
> On Wed, Feb 11, 2015 at 3:24 PM, Сергей Прохоров <seriy.pr@REDACTED>
>> I'm glad to announce a service, which allow to run arbitrary Erlang code
>> from your browser. For now it is there:
>> How it works
>> Each request is handled by Cowboy web server, which launches new Erlang
>> VM instance per request inside lightweight linux container, based on
>> https://github.com/thestinger/playpen. There are restrictions on
>> networking, memory and execution time, but nothing else.
>> What does it have
>> As you already heard, there is erlang code evaluation, but also
>> compilation to several intermediate formats, like core erlang, macros
>> expanding, beam and erlang assemblers and so on. And all this can be
>> launched under any erlang release version (for now it's only the latter 8,
>> but I can add more by demand).
>> Of course, there is 'pastebin' functionality, so you can save and share
>> snippet with somebody else.
>> Possible use-cases:
>> * Explore code compatibility with all Erlang releases
>> * Share runnable erlang snippet with somebody
>> * Try to launch some dangerous code
>> * Quickly explore how your code is compiled to erlang asm instructions
>> * Maybe, for some online studying / webinars. Students are don't even
>> need to install erlang on their computers
>> * In blog posts / articles / documentation - to make code snippets more
>> Idea was borrowed from https://play.rust-lang.org/.
>> P.S.: it will be great, if you suggest some funny / interesting code
>> snippets for «Examples» section.
>> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions