Zotonic
Zotonic
zotonic@conference.zotonic.com
Monday, 27 August 2012< ^ >
arjan has set the subject to: Zotonic - the Erlang CMS
Room Configuration

GMT+2
[06:50:27] Ilya Rezvov leaves the room: Replaced by new connection
[06:50:28] Ilya Rezvov joins the room
[07:13:29] Ilya Rezvov leaves the room
[08:20:55] Ilya Rezvov joins the room
[09:17:31] Ilya Rezvov leaves the room
[09:26:32] Ilya Rezvov joins the room
[09:34:17] <Ilya Rezvov> hi
[09:34:26] <Ilya Rezvov> how i can rewrite this code
[09:34:28] <Ilya Rezvov> <td class="b-order-props__value">
{% if o.status == 'new' %} {_ Новый _} {% endif %}
{% if o.status == 'in_progress' %} {_ В обработке _} {% endif %}
{% if o.status == 'ready' %} {_ Готово к выдаче _} {% endif %}
{% if o.status == 'done' %} {_ Выдано _} {% endif %}
</td>
[09:34:43] <Ilya Rezvov> in true zotonic way
[10:37:35] <Marc Worrell> Like you did, but we also have an " {% elseif … %} " which helps a lot with such code
[10:42:19] <Ilya Rezvov> but it is very blibly
[10:42:43] <Ilya Rezvov> and error-pron
[10:42:55] <Ilya Rezvov> maybe make filter for each case
[10:43:03] <Ilya Rezvov> •such case
[10:44:15] <Ilya Rezvov> but i can not imagine how it might look
[10:46:42] <Marc Worrell> that is the problem :-) It is a bit nasty, this kind of mappings. one possibility might be using english for the statys and then translations. but that is a lot of work when you only need to show Russian (it is Russian, isn't it?) text
[10:47:23] <Marc Worrell> And something like a "case/switch" only cuts out some of the clutter.
[11:07:47] <Ilya Rezvov> yes, it is russian
[11:08:40] <Ilya Rezvov> hack with translations not solve problem in common case
[11:09:04] <Ilya Rezvov> i have other case where i use this if-hack
[11:47:54] <Ilya Rezvov> Marc Worrell: http://detalkupi.ru/
[11:48:00] <Ilya Rezvov> what is happen?
[11:48:19] <Ilya Rezvov> i don't change anything
[11:48:50] <Ilya Rezvov> dont change environment on vps
[11:49:06] <Ilya Rezvov> and i dont know how it happens
[11:49:12] <Ilya Rezvov> {erlang,iolist_to_binary,
[[<<"\n>,"ru",
[11:50:40] <Ilya Rezvov> i restart zotonic, coz client call me
[11:50:46] <Ilya Rezvov> but i make screenshot
[11:51:22] <Ilya Rezvov> http://yadi.sk/d/P6DdfTnaNvgX
[11:52:13] <Marc Worrell> there must be some non-iolist part somewhere lower on the screen.
[11:52:32] <Marc Worrell> I would love to know what it is
[11:53:16] <Marc Worrell> can you check the sasl logs? maybe there is some more information there.
[11:55:42] <Ilya Rezvov> where i can find it?
[11:56:05] <Ilya Rezvov> it repeated on another machine
[11:56:57] <Ilya Rezvov> i restart zotonic and it repair on my computer, but not on client's machine
[11:57:36] <Ilya Rezvov> 3:54:02.868 [info] DEBUG: webmachine_decision_core:34 badarg
13:54:02.868 [error] webmachine error: path="/": [{erlang,iolist_to_binary,[[<<"<!DOCTYPE html>\n<html lang="">>,"ru",<<"">\n\t<head>\n\t\t<meta charset="utf-8" />\n\t\t<title>">>,[<<"Home">>],<<" &mdash; ">>,<<"Detalkupi.ru">>,<<"</title>\n\n\t\t<meta n
[11:57:38] <Ilya Rezvov> in log
[11:59:03] <Ilya Rezvov> it repeated after login
[12:03:38] <Ilya Rezvov> Marc Worrell: if u logon as admin ( password: admin )
[12:03:49] <Ilya Rezvov> u see error page
[12:04:00] <Ilya Rezvov> and call stack on end page
[12:04:46] <Ilya Rezvov> i not see something strange
[12:13:10] <Ilya Rezvov> and it happen only i logged as admin
[12:13:25] <Marc Worrell> it is weird
[12:13:36] <Marc Worrell> I see a negative number in the iolist:
[12:13:37] <Marc Worrell> <<"/ru/profile">>,<<"\">">>,
<<208,145,208,176,208,187,208,176,208,189,209,129,58>>,
<<" ">>,
["-6,206",46,48,-42],
[12:14:21] <Marc Worrell> part of this block:
[12:14:22] <Marc Worrell> <<"\n </div>\n ">>,
[[<<"<div class=\"b-auth\">\n ">>,
[<<"\n ">>,
[<<"\n <p class=\"b-auth__title\">">>,
<<208,151,208,180,209,128,208,176,208,178,209,129,209,130,209,
131,208,185,209,130,208,181>>,
<<", ">>,<<>>,<<" ">>,<<>>,
<<"</p>\n <a class=\"b-auth__title\" href=\"">>,
<<"/ru/profile">>,
<<34,62,208,155,208,184,209,135,208,189,209,139,208,185,32,208,
186,208,176,208,177,208,184,208,189,208,181,209,130,60,47,97,
62,10,32,32,32,32,32,32,32,32,60,112,32,99,108,97,115,115,61,
34,98,45,97,117,116,104,95,95,116,105,116,108,101,34,32,104,
114,101,102,61,34>>,
<<"/ru/profile">>,<<"\">">>,
<<208,145,208,176,208,187,208,176,208,189,209,129,58>>,
<<" ">>,
["-6,206",46,48,-42],
<<32,209,128,209,131,208,177,46,60,47,112,62,10,32,32,32,32,32,
32,32,32,60,97,32,105,100,61,34,108,111,103,111,117,116,34,32,
99,108,97,115,115,61,34,98,45,108,105,110,107,32,115,101,116,
99,111,111,107,105,101,34,32,104,114,101,102,61,34,35,47,108,
111,103,111,117,116,34,62,208,146,209,139,208,185,209,130,208,
184,60,47,97,62,10,32,32,32,32,32,32,32,32>>,
[],<<"\n ">>],
<<"\n ">>],
<<"\n</div>">>]],
<<"\n ">>,
[12:14:41] <Marc Worrell> do you know where that might come from?
[12:15:49] <Ilya Rezvov> {% else %}
{% with m.rsc[m.acl.user] as u %}
<p class="b-auth__title">{_ Здравстуйте_}, {{ u.name_first }} {{ u.name_surname }}</p>
<a class="b-auth__title" href="{% url profile_rule %}">Личный кабинет</a>
<p class="b-auth__title" href="{% url profile_rule %}">{_ Баланс: _} {{ u.balance | default:0 | format_price }} руб.</p>
<a id="logout" class="b-link setcookie" href="#/logout">Выйти</a>
{% wire id="logout" action={logoff} %}
{% endwith %}
{% endif %}
[12:18:11] <Ilya Rezvov> if i comment this snippet
[12:18:27] <Ilya Rezvov> error disappear
[12:20:01] <Ilya Rezvov> problem in <p class="b-auth__title" href="{% url profile_rule %}">{_ Баланс:  _} {{ u.balance | default:0 | format_price }} руб.</p>
[12:20:40] <Ilya Rezvov> hm
[12:20:50] <Ilya Rezvov> u.balance is negative number
[12:20:56] <Ilya Rezvov> it wrong invariant
[12:34:49] <Ilya Rezvov> thx for your time :)
[12:35:05] <Ilya Rezvov> how i use zotonic?
[12:35:19] <Ilya Rezvov> s/i/you/
[12:36:18] <Ilya Rezvov> despite the fact what u are his developer
[12:57:33] <Marc Worrell> we have a couple of customers running zotonic
[12:57:46] <Marc Worrell> and i am involved in one larger project using it as well
[12:57:50] <Marc Worrell> http://maxclass.com/
[12:58:01] <Marc Worrell> recent customer: http://womenonwaves.org/
[12:58:16] <Marc Worrell> older customer example: http://mediafonds.nl/
[13:07:47] <Ilya Rezvov> u are from NL?
[13:08:42] <Marc Worrell> yes, quite some people of the zotonic team are based here in Amsterdam
[13:10:13] <Ilya Rezvov> cool, i very want to visit amsterdam :)
[13:10:32] <Ilya Rezvov> it is in my todo list :)
[13:11:26] <Marc Worrell> you are very welcome :)
[13:11:41] <Ilya Rezvov> many companies in NL interested in Erlang?
[13:11:58] <Marc Worrell> there are some
[13:12:27] <Ilya Rezvov> i want change my speciality from frontend JS to Erlang
[13:12:28] <Marc Worrell> like Spil games, whatsapp, etc
[13:12:42] <Ilya Rezvov> but in russia erlang is very rare
[13:13:04] <Ilya Rezvov> i work in Yandex
[13:13:41] <Marc Worrell> Yandex, that is a good place, isn't it?
[13:13:52] <Ilya Rezvov> yes
[13:14:00] <Ilya Rezvov> russian google :)
[13:14:02] <Marc Worrell> Quite some Erlang people in Russia and eastern europe though
[13:14:29] <Marc Worrell> some companies want to use Erlang, but they can't get the people
[13:14:37] <Ilya Rezvov> they are freelanceres
[13:14:44] <Marc Worrell> we are :)
[13:14:44] <Ilya Rezvov> yes
[13:14:49] <Ilya Rezvov> it big problem
[13:14:54] <Ilya Rezvov> it is •
[13:15:26] <Ilya Rezvov> managers think what it have hight risks
[13:15:33] <Marc Worrell> but a good place to be right now - was a bit of a guess in 2008 when I start digging in Erlang
[13:16:19] <Marc Worrell> I always say the getting good people is the problem, not Erlang people. Because good people can learn Erlang very fast.
[13:16:43] <Ilya Rezvov> yes, erlang very simple lang
[13:16:46] <Ilya Rezvov> is
[13:16:51] <Ilya Rezvov> i miss verbs :)
[13:17:27] <Ilya Rezvov> in russian sentence not keep it
[13:18:46] <Ilya Rezvov> i can do some work for you as volunter
[13:19:01] <Ilya Rezvov> i need in real expiriense
[13:24:09] <Marc Worrell> you are welcome to tinker with zotonic, see what you can make better or add.
[13:24:15] <Marc Worrell> maybe some yandex stuff :p
[13:24:44] <Marc Worrell> or whatever makes using it better for you
[13:26:42] <Ilya Rezvov> i trying :)
[13:27:21] <Ilya Rezvov> year ago i make metrika module for zotonic
[13:27:28] <Ilya Rezvov> metrika.yandex.ru
[13:27:38] <Ilya Rezvov> metrika.yandex.com :)
[13:28:00] <Ilya Rezvov> but i didnt compate this
[13:28:08] <Ilya Rezvov> and lost notebook
[13:37:55] <Marc Worrell> look great
[13:37:59] <Marc Worrell> lookS
[13:38:21] <Ilya Rezvov> try to restore and to complate it
[13:50:10] <Marc Worrell> for the distributed version (zynamo) we are working on some live stats.
[13:50:35] <Marc Worrell> http://zotonic.com/blog/927/sneak-preview-of-live-statistics
[13:52:09] <Ilya Rezvov> hm, where i can read about zynamo?
[13:54:39] <Ilya Rezvov> i see zynamo branch
[13:55:38] <Ilya Rezvov> last commit 6 month ago
[14:07:04] <Ilya Rezvov> zotonic support coffeescript?
[14:07:31] <Ilya Rezvov> i reading blog post about 2011 summary :)
[14:30:31] <Marc Worrell> yes, the mod_development has some support in translating it.
[14:32:05] <Ilya Rezvov> i can just write on coffee
[14:32:16] <Ilya Rezvov> and include file
[14:32:30] <Ilya Rezvov> as {% lib "myfile.coffee" %} ?
[14:38:58] <Marc Worrell> yes, i have been looking into that as well
[14:39:08] <Marc Worrell> we might be able to do that with some extra dependencies
[14:39:50] <Marc Worrell> would be nice to make it generic though, that we know that we can translate a certain file type to css/js using some external command
[14:40:00] <Marc Worrell> and then cache the result (in a file preferably)
[14:44:33] <Ilya Rezvov> ok, its cool :)
[15:11:28] Ilya Rezvov leaves the room
[15:22:28] Ilya Rezvov joins the room
[17:20:40] Ilya Rezvov leaves the room
[18:16:22] Ilya Rezvov joins the room
Powered by ejabberd Powered by Erlang Valid XHTML 1.0 Transitional Valid CSS!