Giter Club home page Giter Club logo

elixir_v8's Introduction

elixir_v8's People

Contributors

le0pard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

elixir_v8's Issues

Pending Release version - 0.3

Pending merged PR's to be released.

  • Support the latest erlang_v8: #6
  • Fix warning of mix: "please use parentheses to remove the ambiguity": #4
  • Tiny fix of README: #3

Could not compile dependency erlang_v8

I am trying to run this within phoenix and I get the error: Could not compile dependency erlang_v8, ~/.mix/rebar command failed. If you want to recompile this dependency, please run: mix deps.compile erlang_v8. Any ideas?

Error: `could not find application file: erlang_v8.app`

In my personal project, after I put {:elixir_v8, "~> 0.2.2"} as deps in mix.exs, hit $ mix deps.get and $ iex -S mix, I see this:

Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Compiling 1 file (.ex)
Generated elixir_v8_try app

=INFO REPORT==== 16-Feb-2017::17:21:05 ===
    application: logger
    exited: stopped
    type: temporary
** (Mix) Could not start application erlang_v8: could not find application file: erlang_v8.app

Did I miss something?

Including http libraries

Have you had any success including node libraries like 'request' or others? I would like to add the ability to make http calls? what about jquery?

Cannot load JavaScript file over 130KB

Here is a simple elixir script running totally fine.

ElixirV8.create_pool(:main, 10, file: "a.js")
IO.inspect ElixirV8.eval({:global, :main}, "a()")

But when the "a.js" gets larger, it shows error like this.

[pig@localhost phoenix_react]$ ls -lh a.js ; mix run run.exs
-rw-r--r-- 1 pig pig 130K Feb 25 10:40 a.js
** (exit) exited in: :gen_server.call({:global, :main}, {:checkout, #Reference<0.0.7.2642>, true}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (kernel) global.erl:198: :global.send/2
    (stdlib) gen_server.erl:219: :gen_server.cast/2
    (poolboy) src/poolboy.erl:58: :poolboy.checkout/3
    (poolboy) src/poolboy.erl:74: :poolboy.transaction/3
    run.exs:2: (file)
    (elixir) lib/code.ex:370: Code.require_file/2
    (mix) lib/mix/tasks/run.ex:82: Mix.Tasks.Run.run/1
    (mix) lib/mix/task.ex:294: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2
    (elixir) lib/code.ex:370: Code.require_file/2

[error] GenServer #PID<0.273.0> terminating
** (MatchError) no match of right hand side value: {:error, {{:badmatch, {:error, :vm_unresponsive}}, [{ElixirV8.VM, :init, 1, [file: 'lib/elixir_v8/vm.ex', line: 19]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 328]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]}}
    (poolboy) src/poolboy.erl:275: :poolboy.new_worker/1
    (poolboy) src/poolboy.erl:296: :poolboy.prepopulate/3
    (poolboy) src/poolboy.erl:145: :poolboy.init/3
    (stdlib) gen_server.erl:328: :gen_server.init_it/6
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {:EXIT, #PID<0.272.0>, {{:badmatch, {:error, {{:badmatch, {:error, :vm_unresponsive}}, [{ElixirV8.VM, :init, 1, [file: 'lib/elixir_v8/vm.ex', line: 19]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 328]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]}}}, [{:poolboy, :new_worker, 1, [file: 'src/poolboy.erl', line: 275]}, {:poolboy, :prepopulate, 3, [file: 'src/poolboy.erl', line: 296]}, {:poolboy, :init, 3, [file: 'src/poolboy.erl', line: 145]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 328]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]}}
State: {:state, {#PID<0.273.0>, :poolboy_sup}, :simple_one_for_one, [{:child, :undefined, ElixirV8.VM, {ElixirV8.VM, :start_link, [[file: "a.js"]]}, :temporary, 5000, :worker, [ElixirV8.VM]}], {:set, {:set, 0, 16, 16, 8, 80, 48, {[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []}, {{[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []}}}}, 0, 1, [], 0, :poolboy_sup, {ElixirV8.VM, [file: "a.js"]}}

It's nicer when it prints kinder error message or document about it in readme.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.