erlang

How many CPUs are needed before Erlang is faster than single-threaded Java [closed]

…衆ロ難τιáo~ 提交于 2019-12-09 09:51:41
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . I am currently using Java, I've read a lot about Erlang on the net, and I have 2 big questions: How much slower (if any) will Erlang be over simple Java? I'm assuming here that Java is going to be faster from the shootout benchmarks on the net (Erlang doesn't do that well). So,

Large mutable byte array in Erlang

 ̄綄美尐妖づ 提交于 2019-12-09 09:42:08
问题 As I am writing a simple Minecraft server application in Erlang, I am now concerned with the question of how to efficiently store and modify chunk data. For those who don't know about Minecraft's internals: I need to store a lot of binaries (100-1000) of up to 32kB size in memory. Until this point Erlang's builtin binaries are sufficient. But the server has to read and change some bytes (by their id) in these binaries quite often and I don't want to copy them around all the time. A nice to

How do you unbind variables in an interactive Erlang session?

不打扰是莪最后的温柔 提交于 2019-12-09 07:46:38
问题 In the Erlang interactive shell you can bind variables to values. If I would like to clear everything and start from scratch without exiting the session and starting a new one, how do I do that? And if I just wanted to re-use a single variable, is it possible to re-bind? 回答1: Use f() and f(Var): 1> A = 1, B = 2. 2 2> f(A). ok 3> A. * 1: variable 'A' is unbound 4> B. 2 5> f(). ok 6> B. * 1: variable 'B' is unbound 7> Shell commands are actually functions in the 'c' module: http://www.erlang

Building Erlang Client for Couch Base Server 1.8 and 2.0

点点圈 提交于 2019-12-09 06:45:04
问题 We have used Couchbase Server in our product. Its an Intranet application whose front end is pure JavaScript. We however use Erlang/OTP for the Business Logic, authentication ( Mnesia ), yaws web server and a bunch of other erlang libraries. Now, we are still using the Couch Base Single Server whose download has been removed from the Couch base site. We have found it very stable. In now, 5 months of running live, it has never gone down. We are running it on top of Ubuntu Server. So, our

Maximum number of globally registered processes

a 夏天 提交于 2019-12-09 05:59:58
问题 Is there a limit to the number of processes that can be register globally? Or is this only limited by the memory/ max number of atoms ? Ubuntu 12.04 and Erlang R15B01. 回答1: Good question! I'd bet on the number of atoms, if you take into account the following. The Efficiency Guide has a section on system limits: Processes The maximum number of simultaneously alive Erlang processes is by default 32768. This limit can be raised up to at most 268435456 processes at startup (see documentation of

Compiling Erlang code on Windows

点点圈 提交于 2019-12-09 05:21:50
问题 I installed Erlang 13B and tried to follow the tutorials. Every time I get to c(tut) , I get an error instead of (ok, tut) , so it seems like there are no modules installed. Can anyone point me in the right direction? I've tried Emacs but I don't really know how to use it and haven't even got close to getting the Erlang mode working. For instance, where do I type: (setq load-path (cons "C:/Program Files/erl5.6.2/lib/tools-<ToolsVer>/emacs" load-path)) (setq erlang-root-dir "C:/Program Files

Why is Erlang crashing on large sequences?

こ雲淡風輕ζ 提交于 2019-12-09 05:07:14
问题 I have just started learning Erlang and am trying out some Project Euler problems to get started. However, I seem to be able to do any operations on large sequences without crashing the erlang shell. Ie.,even this: list:seq(1,64000000). crashes erlang, with the error: eheap_alloc: Cannot allocate 467078560 bytes of memory (of type "heap"). Actually # of bytes varies of course. Now half a gig is a lot of memory, but a system with 4 gigs of RAM and plenty of space for virtual memory should be

Erlang clusters

大憨熊 提交于 2019-12-09 04:42:42
问题 I'm trying to implement a cluster using Erlang as the glue that holds it all together. I like the idea that it creates a fully connected graph of nodes, but upon reading different articles online, it seems as though this doesn't scale well (having a max of 50 - 100 nodes). Did the developers of OTP impose this limitation on purpose? I do know that you can setup nodes to have explicit connections only as well as have hidden nodes, etc. But, it seems as though the default out-of-the-box setup

how to animate picture without making it flicker using wxWidgets in erlang?

萝らか妹 提交于 2019-12-09 04:34:30
I am trying to make images seems like moving. I clear the screen and put the images back on it, but the screen is flickering a lot. Is there a way to make it seems like moving without flicker that much? the "draw_asteroids" is called every 100 ms since I want the movement of the image to be as much as continuous as possible, plus i have many other elements that move on screen as well (the code is similar to the spaceship). my code: start-> Wx = wx:new(), Frame = wxFrame:new(Wx, -1, "Main Game Frame", [{size, {?max_x, ?max_y}}]), MenuBar = wxMenuBar:new(), wxFrame:setMenuBar(Frame, MenuBar),

Is F# really faster than Erlang at spawning and killing processes?

萝らか妹 提交于 2019-12-09 04:13:13
问题 Updated: This question contains an error which makes the benchmark meaningless. I will attempt a better benchmark comparing F# and Erlang's basic concurrency functionality and inquire about the results in another question. I am trying do understand the performance characteristics of Erlang and F#. I find Erlang's concurrency model very appealing but am inclined to use F# for interoperability reasons. While out of the box F# doesn't offer anything like Erlang's concurrency primitives -- from