I feel like I'm missing something stupid obvious, but I've looked all over and can't find the answer to my question. Suppose I have an application release that I've built with rebar and I start it a la rel/my_app/bin/my_app start I let it happily go about its business for a while, and then I want to attach a console to check on things, so I do rel/my_app/bin/my_app attach and get a shell. I muck a
I think your client is faulty because it specifies: {packet, 2} yet the server specifies (in code not shown) : {packet, 0} In Programming Erlang (2nd) on p. 269 it says: Note that the arguments to packet used by the client and the server must agree. If the server was opened with {packet,2} and the client with {packet,4}, then nothing would work. The following client can successfully receive text f
Printed process ids < A.B.C > are composed of 6: A, the node number (0 is the local node, an arbitrary number for a remote node) B, the first 15 bits of the process number (an index into the process table) 7 C, bits 16-18 of the process number (the same process number as B) 7 Internally, the process number is 28 bits wide on the 32 bit emulator. The odd definition of B and C comes from R9B and ear
I have code like: PID = spawn_link(DistrNode, ...... io:format("~p debug1 ~n",[PID]), io:format("~p debug2 ~n",[pid_to_list(PID)]), and I get like: <10062.97.0> debug1 "<9453.97.0>" debug2 I want grab PID as string but not change value like it did above- what is happening here? I looked convert pid to atom, but no function there. I wanted to get "<10062.97.0>" EDIT it spawn_link() not spawn() this
I have the following function: def join(id) do if Node.connect(:"#{id}@127.0.0.1") do send :global.whereis_name(id), {:join, id} end end I receive the error: (ArgumentError) argument error :erlang.send(:undefined, ... which I assume is because Node.connect does some gathering of information and when I call :global.whereis_name it has not finished yet. If I throw in a :timer.sleep(1000) sure enough
I'm currently picking up Erlang, and its pattern matching is one of the coolest things I've seen in awhile. One little toy function I've come up with in my exercises is as follows: b_and(true, true) -> true; b_and(true, false) -> false; b_and(false, true) -> false; b_and(false, false) -> false; b_and(_, _) -> {error, invalid_object}. I was wondering, though, is there syntax for telling a Variable
I want to write a some kind of supervisor and I'm trying to implement function that closes an external program. The external process is connected to an erlang's code with a port. I have no idea how to close this program, by sending a signal or anything else. Closing a port is not a solution, becouse I've checked that many programs doesn't exit on SIGPIPE. Have you got any ideas how to do it?
I am trying to create a distributed client network using Tsung. I have a cluster of 14 different machines. I want to use m01 as the server and machines m02 and m03 as the clients (or simulated users). Here is what I wrote: <!-- Client side setup --> <clients> <client host="localhost" maxusers="400" cpu="1"><ip value="192.168.1.2"/></client> <client host="m03" maxusers="400" cpu="1"><ip value="192.
I'm looking for an Erlang library function that will return the index of a particular element in a list. So, if X = [10,30,50,70] lists:index_of(30, X) would return 1, etc., just like java.util.List's indexOf() method. Does such a method exist in the Erlang standard lib? I tried looking in the lists module but no luck. Or should I write it myself?
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く