These are chat archives for synrc/n2o

28th
Sep 2016
Namdak Tonpa
@5HT
Sep 28 2016 00:00
gists inside gitter too, use that style of code posting
-module(page_index).
-compile(export_all).
-include_lib("nitro/include/nitro.hrl").
main() ->  #dtl{ file = "master",  ext = "html", app  = "ggs", bindings = [ ]  }.
event(init) ->  wf:info(?MODULE, "Websocket connection established~n", []).
clean and compact
@alexpopov are you there?
Namdak Tonpa
@5HT
Sep 28 2016 00:05
I confirment degradation in n2o current
wait for fix
just use 3.4 not master
master branch is for developers
Namdak Tonpa
@5HT
Sep 28 2016 00:25
I found the reason
Here is your fix : synrc/n2o@912de29
bug was introduced with new PHP FCGI functionality, @AstRonin please consider this change
now master is OK
enjoy!
Alex Popov
@alexpopov
Sep 28 2016 00:57
Sorry, was going home from work!
Will test and report back, thanks for looking into it so quickly.
And thanks for the heads up regarding master vs tags
Namdak Tonpa
@5HT
Sep 28 2016 01:57
you are welcome
Alex Popov
@alexpopov
Sep 28 2016 03:01
Worked like a charm 🙂
Roman
@AstRonin
Sep 28 2016 04:41
э... но эта строка не приводит к циклическим рефрешам, у меня же все нормально, она добавлена, чтоб память не текла. может в чем-то другом проблема?
Roman
@AstRonin
Sep 28 2016 06:40
забавно, пример и вправду рефрешиться... ща разберемся
Matti Katila
@mudyc
Sep 28 2016 08:16
I use mad but sys.config is not overwriting .app specific values. Is this mad specific issue or is there some workaround other than removing keys from .app file (which are coming from dependency and I don't want to fix by forking a repo)
Namdak Tonpa
@5HT
Sep 28 2016 12:19
could you provide more detailed sample, how do you check this?
Matti Katila
@mudyc
Sep 28 2016 12:32
https://github.com/lookio/eaws/blob/master/src/eaws.app.src defines aws keys. when I take that lib into use and define my own keys with sys.config it reads the .app specific ones.
Namdak Tonpa
@5HT
Sep 28 2016 12:33
show me sys.config
Matti Katila
@mudyc
Sep 28 2016 12:34
[{n2o, [{port,8001},{route,routes},{log_modules,stoning_rosetta}]},
{eaws, [
{ses_api_host, "email.eu-west-1.amazonaws.com"},
{access_key_id, "asdf"},
{secret_access_key, "asdf" }]}
].
Namdak Tonpa
@5HT
Sep 28 2016 12:35
and show me .applist
Matti Katila
@mudyc
Sep 28 2016 12:36
still learning erlang things - what is that?
Namdak Tonpa
@5HT
Sep 28 2016 12:37
this is sequence of applications to boot
generated from deps/ebin/*.app
in your current folder
this file is generated with mad plan
Matti Katila
@mudyc
Sep 28 2016 12:38
Ordered: [public_key,kernel,stdlib,fs,ranch,ibrowse,compiler,inets,crypto,
syntax_tools,xmerl,gproc,cowlib,goldrush,ssl,lager,cowboy,n2o,
stoning_rosetta,active,ddb,eaws,erlydtl,jsone,jsx,mad,mochiweb,
nitro,sh]
what name is the file, i don't find anything generated with .applist extension but this is a print out
Namdak Tonpa
@5HT
Sep 28 2016 12:41
cat .applist
Matti Katila
@mudyc
Sep 28 2016 12:41
ah, hidden
anyway the content is same
Namdak Tonpa
@5HT
Sep 28 2016 12:43
yes I confirmed the issue
wait for a fix
Matti Katila
@mudyc
Sep 28 2016 12:43
so it was a bug
Namdak Tonpa
@5HT
Sep 28 2016 12:43
yep
Namdak Tonpa
@5HT
Sep 28 2016 13:34
@mudyc how do you get mad in your system?
from n2o/sample or directly from synrc/mad ?
we should create brew formula for mad
Namdak Tonpa
@5HT
Sep 28 2016 13:44
@sokal32 мне @cystbear говорит что вы уже не используете synrc stack
Oleg Zinchenko
@cystbear
Sep 28 2016 13:45
Виталька aka @sokal32 вернулся в ПХП мир
мы юзаем идейный форк n2o и kvs
Namdak Tonpa
@5HT
Sep 28 2016 13:45
меня интересует mad
Oleg Zinchenko
@cystbear
Sep 28 2016 13:46
от mad`а отказались в пользу ребар3, надеюсь это не послужит поводом для записи нас в ряды erl-ебанатов
Andy
@m-2k
Sep 28 2016 13:47
)))))
Namdak Tonpa
@5HT
Sep 28 2016 13:47
он же медленный как сто чертей
ну я тоже исплользую rebar когда надо какого-то говно типа riak сбилдить
Oleg Zinchenko
@cystbear
Sep 28 2016 13:48
ребар3 теперь уже в корневом неймспейсе erlang https://github.com/erlang/rebar3
Namdak Tonpa
@5HT
Sep 28 2016 13:48
но нафига rebar с tapsters
та хоть в самом репозитории otp
Oleg Zinchenko
@cystbear
Sep 28 2016 13:48
tapsters использует mad -- то мы в нашем проекте на ребар3 перешли
Matti Katila
@mudyc
Sep 28 2016 13:50
@5HT I copied it from somewhere, probably mad's git repo
many erlang projects seem to have rebar included
Namdak Tonpa
@5HT
Sep 28 2016 13:53
ok I fixed
Matti Katila
@mudyc
Sep 28 2016 13:54
could "mad deps" check if there is new version of mad? it is a bit chicken-egg problem
Namdak Tonpa
@5HT
Sep 28 2016 13:55
it could
but for now use that
check you app env settings issue
@cystbear я дам ссылку на вас если кто-то будет спрашивтаь о тестимониалах )
Oleg Zinchenko
@cystbear
Sep 28 2016 13:59
конечно, всегда пожалуйста
Andy
@m-2k
Sep 28 2016 14:01
что такое тестимониалы?
котаны черкатине ваши тесимониалы
Andy
@m-2k
Sep 28 2016 14:04
http://crashkeeper.com удален уже с полгода наверн
Matti Katila
@mudyc
Sep 28 2016 14:07
@5HT didn't help yet, same issue with .app defining environment variable
Namdak Tonpa
@5HT
Sep 28 2016 14:10
2> mad_repl:load_config(tcp).
{application,tcp,
             [{description,"TCP Server"},
              {vsn,"1.0"},
              {registered,[]},
              {applications,[kernel,stdlib]},
              {env,[{tcp_timeout,0}]},
              {mod,{tcp,[]}},
              {modules,[tcp,tcp_conn,tcp_lsn,tcp_tables]}]}
3> wf:config(tcp,tcp_timeout).
1
> mad_repl:load_config().
[{active,[{compile_on_static,false}]},
 {tcp,[{tcp_timeout,1}]},
 {kvs,[{dba,store_mnesia},
       {schema,[kvs_feed,kvs_user,kvs_subscription]}]}]
should work, check twice
Matti Katila
@mudyc
Sep 28 2016 21:50

@5HT I think it is not yet correct. My problem is early use of env variables. Instead of application:start mad should first use application:load, then application:set_env and finally application:start.

"The application can be specified by its name Application. In this case, the application controller searches the code path for the application resource file Application.app and loads the specification it contains." http://erlang.org/doc/apps/kernel/application.html#load-1

since application:start uses application:load internally
Matti Katila
@mudyc
Sep 28 2016 22:39
hmm, that trick does not help either
Namdak Tonpa
@5HT
Sep 28 2016 23:07
ah, you mean application:start in wrong place!
let me check
Namdak Tonpa
@5HT
Sep 28 2016 23:37
you mean I should use tcp_timeout variable from my example inside tcp application and it should be 1, right?