These are chat archives for synrc/n2o

11th
Jul 2016
fbrau
@fbrau
Jul 11 2016 18:32
hi. how I'm I supposed to stop the n2o node I started with mad? ./mad stop isn't working
Andy
@m-2k
Jul 11 2016 18:40
$(./mad attach) & q().
rusjava8
@rusjava8
Jul 11 2016 18:40
Hi. Yes, it does not work at the moment, use ps aux | grep beam after kill PIDofProcess. Will soon Fix This.
fbrau
@fbrau
Jul 11 2016 18:42
oh thanks I was doing that and thinking a was doing it wrong..
fbrau
@fbrau
Jul 11 2016 19:25
I'm strggling making just a simple page project... I have a bare bones tree ... could anyone check what I'm doing wrong? the node starts but when getting GET it doesnt render anything... i triple checked but nothing.. anyone please
fbrau
@fbrau
Jul 11 2016 19:38
don't worry .... i guess I don't know how to use ./mad
Andrii Zadorozhnii
@doxtop
Jul 11 2016 19:40
make deps, compile, plan applications, repl - ./mad deps com pla repl where is your problem?
send your project on doxtop@synrc.com i'll check, or give a link to repo
fbrau
@fbrau
Jul 11 2016 20:01
I guess mad nees some description on the commands. "repl", "plan" for example aren't listed.
would the authors accept enhncements to the help text ? because that BNF lacks at least some descriptions
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:12
repl its repl - read–eval–print loop
nice mod for development
i think that Maxim will accept the enhancement easily :)
fbrau
@fbrau
Jul 11 2016 20:14
static watch: serves static content? right?
static [min]: just compiles
,right?
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:17
http://synrc.com/apps/mad/ - here should be some version of the mad documents, however its really doesn't needed in development
the only dep,com,pla, repl - will be ok
i don't get about static watch and static[min ]
what is it?
fbrau
@fbrau
Jul 11 2016 20:22
both call: npm install mincer-erl... then one serves, the other compiles
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:24
sorry, something new I don't know about :) with npm its probably some nodejs way to do something with js or css
static are server with modules you will configure in cowboy web-server
so as soon as you have for example {"/static/[...]", n2o_static, static()} in your parameters to cowboy_router:compile - you /static folder will be threated as static. and no diference how you will put the files there
where static() is static() -> { dir, "apps/review/priv/static", mime() }.
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:30
ok, I've just run the ./mad static min :)
it just run the uglifyjs and make all of the n2o jses as one file
fbrau
@fbrau
Jul 11 2016 20:31
"compiles"
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:31
may be actually helpfull for production, but it not related to mad or to n2o in fact
fbrau
@fbrau
Jul 11 2016 20:31
the watch then ?
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:32
you can chose you own way to use the js, for dev mode just add them all separately in your template
fbrau
@fbrau
Jul 11 2016 20:32
good point... gonna separate medular mad/n2o commands and below secondary utilities
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:34
:)
fbrau
@fbrau
Jul 11 2016 20:35
release commmands
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:35
watch = install_deps(), serve_static(Port) = npm install mincer-erl sh:oneliner([?NODE("mincer-erl-serve")
so its just the nodejs https://www.npmjs.com/package/mincer-erl wrapper
fbrau
@fbrau
Jul 11 2016 20:37
but it doesnt' care if it fails or not, in the end one "compiles" and the other "serves" the contents... but serve what? launch cowboy with just the static routes?
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:37
its node packages - when you don't have one, its does nothing
i thing that npm install should succed first
cowbow will serve the static route provided in config whithout any nodejs deps
it will be just the folder you point in config
fbrau
@fbrau
Jul 11 2016 20:41
ok... (i'm taking notes btw enhancing the help text)... now, release, there are several release subcomands (depot, beam, ling,)
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:41
https://github.com/artemeff/mincer-erl/blob/master/bin/watch.js from this i can say that the /priv/source/ -> /priv/static/ by default
but this may be configuredd
actually release process - its up to you, its erlang application at the end and you can go with official OTP releases or with some make files with otp.mk - https://github.com/synrc/otp.mk, i'd select the last way. i can't really say how the mad support the normal releases :) not one which goes to ling or something which should run on xen
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:46
i'am just a user of this build tool like you, and its really simple for development
haven't tried all the commands and hidden features
Andy
@m-2k
Jul 11 2016 20:50
{_,0,_} -> {ok,static};
:trollface:
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:52
actually before you release something its better to start some development, make some project and become more involved into the erlang applications, github source code browsing etc, the more expirience you will hav the less question will ask here :) some things will become obvious :) to start just use ./mad in repl mode :)
fbrau
@fbrau
Jul 11 2016 20:53
release commands generates a "sample" file
Andrii Zadorozhnii
@doxtop
Jul 11 2016 20:59
release, rel, bundle, bun
Taking all dependecies and resolve boot sequence according to dependecy order. Storing this value in .applist. If release type is not defined (beam in following example), then script release will be taken as a default.
you just get the script by default
if you need all the details check some erlang docs, http://learnyousomeerlang.com/release-is-the-word for example
Andrii Zadorozhnii
@doxtop
Jul 11 2016 21:05
so you can really value mad or otp.mk after all :)
fbrau
@fbrau
Jul 11 2016 21:11
is it me or nitrogen framwork holds you by the hand, instead n2o requires more classic erlang knowledge
Andy
@m-2k
Jul 11 2016 21:12
hah
erlang is simple
fbrau
@fbrau
Jul 11 2016 21:17
want to love it... but my hair are spliting
Andrii Zadorozhnii
@doxtop
Jul 11 2016 21:17
this is erlang tools, not the erlang :)
but here in this chat you just have a simpe 4 commands mad :)
Andy
@m-2k
Jul 11 2016 21:19
@doxtop как дела, когда макс PR помержит?
fbrau
@fbrau
Jul 11 2016 21:20
... is it possible to interleave html like this? : [ #span{...}, #span2{...}, "verbatim html"]
Andy
@m-2k
Jul 11 2016 21:20
@fbrau yep
Andrii Zadorozhnii
@doxtop
Jul 11 2016 21:21
я хз, я бы помержил но я не знаю шо там уже гг :)
макс скоро вернется с отдыха помержит навреное
Andy
@m-2k
Jul 11 2016 21:21
@fbrau just save code-file and see into erlang console for recompilation output
@doxtop скоро эт когда, он там уже полтора месяца
Andrii Zadorozhnii
@doxtop
Jul 11 2016 21:22
ну богатые по другому отдыхают :)
Andy
@m-2k
Jul 11 2016 21:22
))))
Andrii Zadorozhnii
@doxtop
Jul 11 2016 21:23
полтора месяца всего а не уже :)
Andy
@m-2k
Jul 11 2016 21:23
ну-ну
надо wf:jse/1 переписать, она скрипты позволяет вставлять :-)
Andrii Zadorozhnii
@doxtop
Jul 11 2016 21:26
классический ?><img src onerror в фф? :) или шото злее?
Andy
@m-2k
Jul 11 2016 21:27
 wf:jse("<Script>lol();</Script>").
"<Script>lol();</Script>"
Andrii Zadorozhnii
@doxtop
Jul 11 2016 21:30
а шо там за ескейпы, зачем эта ф-ция уже нужна, а то я забыл?:)
Andy
@m-2k
Jul 11 2016 21:30
шобы js код засылать с переносами строк и кавычками
Andrii Zadorozhnii
@doxtop
Jul 11 2016 21:30
ну так засылает же :)
я думал это какая-то хуйня с клиента типа
хакирство :)
Andy
@m-2k
Jul 11 2016 21:32
зачем это тогда Расти написал https://github.com/synrc/n2o/blob/master/src/formatters/wf_convert.erl#L136-L137
очень наивный код )
Andrii Zadorozhnii
@doxtop
Jul 11 2016 21:33
я хз, мало ли шо он там написал :)
а шо за идеи к этому?
Andy
@m-2k
Jul 11 2016 21:36

https://github.com/synrc/n2o/blob/master/src/formatters/wf_convert.erl#L56

вот это ещё странная хрень

Andrii Zadorozhnii
@doxtop
Jul 11 2016 21:36
как переписать?
это же елементы там всякие, ты же тексты в них сам пишешь ну или экшены там, это ж никакой пират тебе такой скрипт не подсунет, просто сам можешь понаписывать хуйни :)
Andy
@m-2k
Jul 11 2016 21:37
не
html_encode - это да, рендерит убирая </>
fbrau
@fbrau
Jul 11 2016 21:38
I have: event(init) -> skip.
I still get n2o_nitrogen:Event Init: error:function_clause
[{inicio,event,[init],22},
Andy
@m-2k
Jul 11 2016 21:38
а если надо впихнуть в текстбокс, тут уже через jse
fbrau
@fbrau
Jul 11 2016 21:38
if I dont define the init callback I still get the error
Andy
@m-2k
Jul 11 2016 21:39
compiled without errors?
fbrau
@fbrau
Jul 11 2016 21:39
nevermind.... syntax
. instead of ;
Andy
@m-2k
Jul 11 2016 21:40
yep
not c++
not java, not ruby
Andrii Zadorozhnii
@doxtop
Jul 11 2016 21:41
ну я знаю как впихнуть, но впихиваешь же ты сам
тоесть никакой опасности что впихнет кто-то нет :)
лана, я спать пошел :) жсе нада дето спиздить если тебе не нравится :)
Andy
@m-2k
Jul 11 2016 21:43
почему я сам? вот у тебя вики. все могут редактировать страничку. один впихнул и сохранил. второй нажал редактировать и выполнил
надо бы расписать где нибудь векторы использования, кто как юзает, бест практикс
а то до сих пор костыли пишу
fbrau
@fbrau
Jul 11 2016 21:50
I dont use c++ nor java neither ruby, btw
Andy
@m-2k
Jul 11 2016 21:50
u'r way
fbrau
@fbrau
Jul 11 2016 21:51
does wf:session data survive after server reboots?
I mean, should I use wf:session to store the 100.000 users data I expect to have :)?
Andy
@m-2k
Jul 11 2016 21:57
session is RAM storage