erlang

How do I make an already written concurrent program run on a GPU array?

廉价感情. 提交于 2019-12-18 10:35:44
问题 I have a neural network written in Erlang, and I just bought a GeForce GTX 260 card with a 240 core GPU on it. Is it trivial to use CUDA as glue to run this on the graphics card? 回答1: No, using CUDA is not a trivial matter. The CUDA programming model basically uses C (with some additions) but in order to get the most of the GPGPU's capabilities you would have to ensure that your algorithms follow the CUDA guidelines. (see NVidia CUDA Programming Guide) For example in order to get the best

How do I make an already written concurrent program run on a GPU array?

徘徊边缘 提交于 2019-12-18 10:35:24
问题 I have a neural network written in Erlang, and I just bought a GeForce GTX 260 card with a 240 core GPU on it. Is it trivial to use CUDA as glue to run this on the graphics card? 回答1: No, using CUDA is not a trivial matter. The CUDA programming model basically uses C (with some additions) but in order to get the most of the GPGPU's capabilities you would have to ensure that your algorithms follow the CUDA guidelines. (see NVidia CUDA Programming Guide) For example in order to get the best

best way to integrate erlang and python

落爺英雄遲暮 提交于 2019-12-18 10:34:22
问题 What's the best way to integrate erlang and python? We need to call python functions in erlang and call erlang functions in python. At this moment we are trying to use SOAP as a intermediate layer between these two languages, but we have a lot of "not compatible" troubles. Could you advise the best way to perform integration? 回答1: As already mentioned with erlport you can use Erlang port protocol and term_to_binary/binary_to_term functions on Erlang side. On Python side there are low level

Why did you decide “against” using Erlang?

吃可爱长大的小学妹 提交于 2019-12-18 09:59:46
问题 Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. Have you actually "tried" (means programmed in, not just read an article on it) Erlang and decided against it for a project? If so, why? Also, if you have opted to go back to your old language, or to use another functional language like F#, Haskell, Clojure, Scala, or something else then this counts too, and state why.

How does shared memory vs message passing handle large data structures?

白昼怎懂夜的黑 提交于 2019-12-18 09:59:09
问题 In looking at Go and Erlang's approach to concurrency, I noticed that they both rely on message passing. This approach obviously alleviates the need for complex locks because there is no shared state. However, consider the case of many clients wanting parallel read-only access to a single large data structure in memory -- like a suffix array. My questions: Will using shared state be faster and use less memory than message passing, as locks will mostly be unnecessary because the data is read

Are there things Elixir can do that Erlang cannot, or vice versa?

為{幸葍}努か 提交于 2019-12-18 09:58:53
问题 This question is in the context of the Beam VM and the capabilities that it provides, not in the general context of what a Turing complete language can do. I want to invest some time to learn either pure Erlang or Elixir. I get the basic differences between the two and I am leaning towards Elixir because of the macros, better syntax and faster development of the language this day. My question is: if I choose Elixir, will I stumble on something that I cannot do in it, but can do in Erlang? Can

I am unable to use `ejabberd_auth` in my **helloworld** project

只愿长相守 提交于 2019-12-18 08:48:53
问题 I am unable to use ejabberd_auth in my helloworld project. -behaviour(ejabberd_auth). ... .... try_register(<<"username">>, <<"example.com">>, <<"secret_password">>). With that I get the error warning: helloworld.erl:15: Warning: behaviour ejabberd_auth undefined -import(ejabberd_auth, [try_register/3]). ... .... try_register(<<"username">>, <<"example.com">>, <<"secret_password">>). With this I get: exception error: undefined function ejabberd_auth:try_register/3 Why am I unable to access

Erlang compilation: mixed of “HiPE object code” and “opcode”?

杀马特。学长 韩版系。学妹 提交于 2019-12-18 08:45:06
问题 Is it possible to have a VM instance that executes both HiPE code and the usual "opcode" based objects at the same time? This question is related to : Erlang OTP release compiles with HiPE? 回答1: Yes, that is how the native compiler is integrated. Only those modules that are compiled with the +native option are executing in native machine code, and the rest are interpreted by the BEAM emulator as usual. When you make calls between modules compiled in different ways, a "mode switch" happens.

Erlang compilation: mixed of “HiPE object code” and “opcode”?

↘锁芯ラ 提交于 2019-12-18 08:44:22
问题 Is it possible to have a VM instance that executes both HiPE code and the usual "opcode" based objects at the same time? This question is related to : Erlang OTP release compiles with HiPE? 回答1: Yes, that is how the native compiler is integrated. Only those modules that are compiled with the +native option are executing in native machine code, and the rest are interpreted by the BEAM emulator as usual. When you make calls between modules compiled in different ways, a "mode switch" happens.

Connection closed - strange error, unable to connect from erlang VM to certain host

。_饼干妹妹 提交于 2019-12-18 08:29:26
问题 IMPORTANT Proved that migration from 18.3 to 18.3.4 causes this issue, and migration back to 18.3 removes it. Everything worked until one moment. Then it just stoped to work. def work do HTTPotion.get("https://ssl-third-party.com", ibrowse: [ is_ssl: true, ssl_options: [ certfile: Path.join(File.cwd!, "cert_dev.pem"), password: "pass" |> to_charlist, ] ]) end Which responds with: %HTTPotion.ErrorResponse{message: "closed"} I tried several erlang libs without elixir wrapping(hackney + ibrowse)