Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 07 2017 15:32
    @listochkin banned @yanyonggege
Andrew E. Titov
@titov-andrei
@m-2k - так какой пароль нужен? его где задавать изначально?
Andy
@m-2k
Я нe особо знаток PG, но предлагаю оставить в покоe роль супeрадмина PG и подключаться к нeй как и раньше из под рута. А для приложения создать обычного юзeра с возможностью авторизации по паролю https://www.postgresql.org/docs/9.3/static/app-createuser.html http://eax.me/postgresql-install/ можeшь сдeлать это чeрeз CLI или SQL запросом на выбор. Потом это почитай, тожe пригодится https://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html
Andrew E. Titov
@titov-andrei
@m-2k - да, спасибо, я уже понял, что PG с наскоку не объедешь, хотел просто феникс пощупать, ну и как всегда, одно за другое и понимаешь, что жил - всё зря ))
Bas Kamer
@basz
hi! does anyone know of a cli editor for Erlang configuration files?
i’m new to erlang. I need to add/remove to/from an existing erlang configuration file. somebin set xxx yyy path/to/some/config.conf
Andy
@m-2k
application:set_env/3
Bas Kamer
@basz
That is not to edit a configuration file is it?
Bas Kamer
@basz
I’m trying to modify a rabbitmq configuration file via automation
Andy
@m-2k
what is "configuration file" for u?
Bas Kamer
@basz
/etc/rabbitmw/rabbit.config
i am hoping some cli tool exists to edit this
but not vim ;-)
something like puppet config set https://docs.puppet.com/puppet/4.10/config_set.html but then for erlang
Andy
@m-2k
this is erlang channel, not rabbitmq. but anyway:
erl -noshell -eval 'application:set_env(rabbit, vm_memory_high_watermark, 0.25)'
rabbitmqctl eval "application:set_env(rabbit, vm_memory_high_watermark, 0.25)."
rabbitmqctl set_vm_memory_high_watermark 0.25
rabbitmqctl -n instance1 set_vm_memory_high_watermark 0.25
(https://books.google.com/books?isbn=1783984570)
Bas Kamer
@basz
am aware of that… what i’m trying to do is not set an env var for an application but modify its configuration file but add or change plugin configuration. and since the config file is standard erlang config i was hoping for a tool persist those changes...
Andy
@m-2k
if u want modify files, use perl
Andy
@m-2k
find function for parse sys.config file in erlang/opt repo
Bas Kamer
@basz
goes a bit beyond me… but thank you for the pointers
Andy
@m-2k
check application:get_all_env(Application)
Andy
@m-2k
yay!
read file and modify with lists module
13>  {ok, T, _} = erl_scan:string("{1,2,[hello], % comment \n [hulo]}."), erl_parse:parse_term(T).
{ok,{1,2,[hello],[hulo]}}
write simple fun and run with erl -noshell -eval
Edwin Harly
@edwinharly
Hi guys, can you recommend me some good tutorial other than learnyousomeerlang.com ?
Nishant Vishwakarma
@nishantv12
I was reading Joe Armstrong's thesis and I am not able to understand this philosophy >We require that the names of processes are unforgeable. This means that it should be impossible to guess the name of a process, and thereby interact with that process.> If sending message to a process is something which should be done rarely, then what's the purpose of such a process. The processes are in command of what message it can handle and chooses to ignore others anyways. Can someone please help me understand the idea.
anthousecode
@anthousecode
Hi guys, share please with some info for beginners (topics, books, blogs).
Palash Nigam
@palash25

Hi there I completely new to elixir and I'm trying to write a wrapper for an elixir linter (credo). While running CI checks I'm getting errors while installing dependencies. This is what I get on travis CI
erldoc.el:64:1:Error: Cannot open load file: cl-lib

ERROR: install script from erlang-mode package failed

dpkg: error processing package erlang-mode (--configure):

subprocess installed post-installation script returned error exit status 1

Setting up erlang-src (1:20.1-1) ...

Processing triggers for libc-bin (2.19-0ubuntu6.13) ...

Errors were encountered while processing:

erlang-mode

E: Sub-process /usr/bin/dpkg returned an error code (1)
Here a link to my PR coala/coala-bears#2172 Can anyone check it tell me whats the problem?

sriharipreddy
@sriharipreddy
getting error when installing: mix lang.hex

ERROR: ** (Mix) httpc request failed with: {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], {:eoptions, {{:function_clause, [{:gen, :get_proc_name, [{:state, :client, {#Reference<0.2006747350.4111990785.189431>, #PID<0.105.0>}, :gen_tcp, :tls_connection, :tcp, :tcp_closed, :tcp_error, 'repo.hex.pm', 443, #Port<0.5037>, {:ssl_options, :tls, [{3, 3}, {3, 2}, {3, 1}], :verify_none, {#Function<7.9395691/3 in :ssl.handle_verify_options/2>, []}, #Function<8.9395691/1 in :ssl.handle_verify_options/2>, false, false, :undefined, 1, "", :undefined, "", :undefined, [], :undefined, "", :undefined, :undefined, :undefined, :undefined, ...}, {:socket_options, :binary, 0, 0, 0, false}, {:connection_states, 1, {:connection_state, {:security_parameters, <<0, 0>>, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, :undefined, ...}, :undefined, :undefined, :undefined, :undefined, 0, :undefined, :undefined, :undefined, :one_n_minus_one}, {:connection_state, {:security_parameters, :undefined, 1, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, ...}, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :one_n_minus_one}, {:connection_state, {:security_parameters, <<0, 0>>, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...}, :undefined, :undefined, :undefined, :undefined, 0, :undefined, :undefined, :undefined, :one_n_minus_one}, {:connection_state, {:security_parameters, :undefined, 1, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, ...}, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :one_n_minus_one}}, {:protocol_buffers, [], "", "", []}, {[], []}, #Reference<0.2006747350.4112121857.189277>, {:session, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :new, -576460751430510000, :undefined}, #Reference<0.2006747350.4112121857.189285>, :ssl_session_cache, {:ssl_crl_cache, {{#Reference<0.2006747350.4112121857.189280>, #Reference<0.2006747350.4112121857.189281>}, []}}, :undefined, false, :undefined, {:undefined, :undefined}, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, :undefined, ...}], [file: 'gen.erl', line: 341]}, {:gen_statem, :enter, 7, [file: 'gen_statem.erl', line: 609]}, {:tls_connection, :init, 1, [file: 'tls_connection.erl', line: 172]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]}, {:gen_statem, :call, [#PID<0.109.0>, {:start, :infinity}, :infinity]}}}}]}

Could not install Hex because Mix could not download metadata at https://repo.hex.pm/installs/hex-1.x.csv.

please any one help me on this
Federico Igne
@dyamon
Hi, quick question. I'm currently building a lexer+parser for a small language using leex and yecc (I used flex/bison and alex/happy in the past). I'd like to make the language indentation sensitive... usually a simple way to do it is at the lexer level keeping in your state the current indentation. I searched a bit but I can't seem to find any way to keep a state during the lexing procedure. Anyone can give me an hint? Thanks in advance!
sophg61
@sophg61
Hi all - I'm looking for erlang developers open to new opportunities in Stockholm. Please drop me a message if interested - sophie.gould@evolution-contract.co.uk
satish-zol
@satish-zol
any opportunity for erlang dev having beginner experience in erlang?
really need help!
thank you!!
Igor Kopestenski
@Laymer
@Yuandong-Chen I tried to answer your question on stackoverflow :)
but feel free to ask and I would be happy to try to provide you further explanations if you need :)
Yuandong-Chen
@Yuandong-Chen
@Laymer Thank you very much!
So do node in Erlang only have topology knowledge of its directed connected neighbors? Since it is default clique topology, do any node just presume the neighbor is down (no matter if it connected indirectly) if network disruption happens?
I posted these following up questions on stackoverflow. Thank you again!
dan-klasson
@dan-klasson
what's a good way to convert hashes like these to just a list with hashes?
{"0",   
 [
   %{
     "children" => [],
     "id" => 10,
     "level" => 0,
     "parent_id" => nil,
     "title" => "House"
   }
 ]}
Matteo Stefanini
@mstefanini

Hi guys! I've a noob problem :'(
I'm trying to read an input from cli, with this code:

-author("mstefanini").

%% API
-export([start/0, loop/0]).

start() ->
  spawn(?MODULE, loop, []).

loop() ->
  timer:sleep(100),
  _ = lager:info("(~p) init", [?MODULE]),
  Value = io:get_line("input : "),
  timer:sleep(100),
  _ = lager:info("(~p) loop: ~p", [?MODULE, Value]),
  loop.

what i received is this output:

21:24:18.166 [info] (sockclient_manual_user_keyboard) init
input : 10.
10
2> ;
2> .
* 1: syntax error before: ';'
2>

I'm unable to cope with this problem, can someone help me?

SunnyMaximo
@SunnyMaximo
I have one question - How can we create the record at runtime in Erlang ?
Any body interested in doing one POC for money ? Please ping me, I will discuss it with you . I need it in POC in erlang and postgres .
russ
@russmack
@mstefanini A few months late, but for my exercise: last line loop. should be loop().