erlang

rabbitmq安装 Windows10

放肆的年华 提交于 2020-01-14 17:30:01
到今天我依旧不能忘记那天让rabbitmq支配的我,到头来还是坑了自己 为什么这样说呢?因为通过这次rabbitmq的安装,我充分了解到: 英语好是很重要的一件事情,特别当你神志不清时,着急只会让你更加着急,而不能对你有丝毫的帮助 讲了一堆废话0o 0下面讲一下我悲惨的安装历程,希望能够给大家提供一点帮助 当我了解到我要学习一些不一样的东西时,我是很开心的,只能说人类果然还是对未来看的太美好啊! 假如你不是第一次安装rabbitmq 这不是你的第一次安装,所以在你安装新的rabbitmq请确保erlang文件和rabbitmq文件已经完全删除 删除erl文件时有empd.exe文件运行导致不能不删除,请在任务管理器中找到该进程并停止运行后删除 当然你也可能会找不到这个进程,那么就请重启然后就能删除erlang文件了 通过regedit打开注册表 找到HKEY_LOCAL_MACHINE\SOFTWARE\Ericsson\Erlang\ErlSrv 把其下所有项删除 检查端口是否被占用 netstat -ano 查看所有打开的端口 netstat -aon|findstr "4369" 检查4369端口情况 tasklist|findstr "13876" 返回对应pid进程 环境配置,erlang 本人参照教程http://www.cnblogs.com/ericli

Buffer size in Erlang / Golang port example

被刻印的时光 ゝ 提交于 2020-01-14 14:33:10
问题 I have a crude Erlang-to-Golang port example, passing data from Erlang to Golang and echoing the response. Problem is the amount of data I can transfer seems to be limited to 2^8 bytes (see below). I thought the problem was probably on the Golang side (not creating a big enough buffer) but replacing bufio.NewReader with bufio.NewReaderSize didn't work. So am now thinking the problem is maybe on the Erlang side. What do I need to do to increase the buffer size / be able to echo a message

Why do I get syntax error before: '{'?

故事扮演 提交于 2020-01-14 13:55:43
问题 While playing with Erlang getting started section I have met bizarre syntax error on trivial use case (simple map initialization). Are there any suggestion why does that happen? 1> #{ "key" => 42}. 1: syntax error before: '{' Details: Erlang R16B03 (erts-5.10.4), Eshell V5.10.4. 回答1: Because maps were introduced in Erlang 17. You have to upgrade your installation or do not use maps. 来源: https://stackoverflow.com/questions/31589190/why-do-i-get-syntax-error-before

What's the purpose to introduce 'save queue' in erlang receive statement

一世执手 提交于 2020-01-14 11:52:33
问题 I am new to erlang and starting tutorial from 'Programming Erlang' by Joe Armstrong. I feel puzzled about the 'save queue' mentioned in the selective receive in 8.6. If the message is not matched at all, why not drop it directly? What's the purpose of putting it back to the mailbox for later processing? If it's default behavior, those garbage messages (meaning that they cannot be matched) could lead to performance penalties as they will accumulate without release. I would like to know whether

Elixir: rationale behind allowing rebinding of variables

醉酒当歌 提交于 2020-01-14 07:20:10
问题 What is the rationale behind allowing rebinding of variables in Elixir, when Erlang doesn't allow that? 回答1: Most functional languages don't allow rebinding of variables in the same scope. So Elixir allowing this does definitely give it an non-functional, imperative feel. Erlang's problem is rather lack of scope, or to be more precise that there is only one scope in a whole function clause. We did have serious discussions whether to introduce scope but in the end we decided against it as it

Dstributed Erlang, networking, echo server

偶尔善良 提交于 2020-01-14 03:03:08
问题 so my year long project involves doing some pretty nasty stuff with Erlang. I am just starting to get to grips with it. I have very limited knowledge of networking and need to ask how/why something doesn't work. I followed the code from this guide, http://20bits.com/article/network-programming-in-erlang, that provides Erlang code for a server to echo back text that is fed into it The instructions to run it is to start the erlang code, he reccomends port 8888, and then telnet to the localhost

erlang - how to limit message queue or emulate it?

送分小仙女□ 提交于 2020-01-13 10:44:07
问题 Right now I am doing Process ! Message, but as i googled a bit, a message queue size is only limited to memory. I have a tree of processes where leaves generate messages and feed up to the root and i need to limit queue or switch to some another method of doing the same. more of it, sometimes Process gets messages from one leaf and sometimes from two leaves. In the second case I need different finite queues for eave leaf. 回答1: There are no built-in mechanisms to limit the size of the message

Erlang gen_tcp connect question

自作多情 提交于 2020-01-13 10:09:55
问题 Simple question... This code .. client() -> SomeHostInNet = "localhost" % to make it runnable on one machine {ok, Sock} = gen_tcp:connect(SomeHostInNet, 5678, [binary, {packet, 0}]), ok = gen_tcp:send(Sock, "Some Data"), ok = gen_tcp:close(Sock). is very clear except that I don't quite understand what [binary, {packet,0}] means ? Any one cares to explain ? MadSeb 回答1: As per the gen_tcp:connect documentation: [binary, {packet, 0}] is the list of options that's passed to the connect function.

Does it make sense to use a pool of Actors?

拈花ヽ惹草 提交于 2020-01-13 08:36:28
问题 I'm just learning, and really liking, the Actor pattern. I'm using Scala right now, but I'm interested in the architectural style in general, as it's used in Scala, Erlang, Groovy, etc. The case I'm thinking of is where I need to do things concurrently, such as, let's say "run a job". With threading, I would create a thread pool and a blocking queue, and have each thread poll the blocking queue, and process jobs as they came in and out of the queue. With actors, what's the best way to handle

How do I modify a record in erlang?

你。 提交于 2020-01-13 08:35:08
问题 I to need modify the values {place} and {other_place} in the op record. #op{ action = [walk, from, {place}, to, {other_place}], preconds = [[at, {place}, me], [on, floor, me], [other_place, {place}, {other_place}]], add_list = [[at, {other_place}, me]], del_list = [[at, {place}, me]] } But erlang don´t allow modifying variables. Is there a data type for that? 回答1: erlang doesn't let you modify variables it is true. But nothing prevents you from making modified copies of a variable. Given your