Tuesday, 30 October 2012< ^ >
arjan has set the subject to: Zotonic - the Erlang Content Management Framework
Room Configuration

[00:24:35] Maas leaves the room
[06:53:37] Ilya Rezvov leaves the room
[07:13:30] maas.maarten.zeeman joins the room
[07:21:38] maas.maarten.zeeman leaves the room
[07:58:12] Ilya Rezvov joins the room
[08:29:38] andreas.stenius joins the room
[09:55:00] maas.maarten.zeeman joins the room
[10:23:02] Marc Worrell joins the room
[10:27:36] arjan joins the room
[10:32:29] <Marc Worrell> maas: did you check can.js ? seems to be a very nice (and small!) framework
[10:33:21] <Ilya Rezvov> i never listen about it
[10:33:48] <Marc Worrell> I had some quick checks, and it looks like a good framework, nice and responsive people as well
[10:34:22] <Marc Worrell> also need to check again the yandex "scomps" - is a good method of building blocks
[10:34:54] <Ilya Rezvov> i use it always
[10:35:01] <Ilya Rezvov> i think about new entity
[10:35:04] <Ilya Rezvov> block
[10:35:07] <Ilya Rezvov> for zotonic
[10:35:16] <Marc Worrell> :)
[10:35:26] <Ilya Rezvov> with js, css and sprites in single place
[10:35:36] <maas.maarten.zeeman> Looking now.
[10:36:05] <Marc Worrell> before we push the generated template we do walk through it to fix some non-iolist things. In that pass we can also collect all needed js and css
[10:38:48] <maas.maarten.zeeman> can does a little bit too much for my situation.
[10:39:15] <maas.maarten.zeeman> I now have this as a simple pub/sub:
[10:39:51] <maas.maarten.zeeman> ;(function(window, $) {
var channelme = {};
channelme.jQuery = $;
// tiny low weight pub/sub system
var topics = {};
channelme.observe = function(topic, callback) {
if(!topics[topic]) topics[topic] = $.Callbacks();
channelme.notify = function(topic, args) {
topics[topic] && topics[topic].fire.apply(channelme, [topic, args]);
window.channelme = channelme;
})(window, jQuery);
[10:40:12] <Marc Worrell> simple notifier :-)
[10:40:36] <Marc Worrell> is nice - maybe we can push js and notifications over the websocket/comet
[10:40:57] <Marc Worrell> just change the protocol a bit
[10:41:06] <Ilya Rezvov> i think about client-server named channel
[10:41:27] <Ilya Rezvov> z_channel:send(chan_name, Msg)
[10:41:44] <Ilya Rezvov> z.on('chan_name', callback)
[10:41:55] <Ilya Rezvov> z.channel.on
[10:42:26] <Ilya Rezvov> it make client-server communication transparent
[10:43:07] <Ilya Rezvov> know zotonic poorly adapted for RIA
[10:43:08] <Marc Worrell> yep, better integrated pubsub/mod_signal than now
[10:44:04] <Ilya Rezvov> and z.channel('chan').send(data); z_channel:sub(chan, fun).
[10:44:21] <Ilya Rezvov> for duplex channel :)
[10:44:31] <Marc Worrell> we could add "channel_observe_xxxx" ? just like the usual observe_xxx
[10:45:07] <Ilya Rezvov> as one option i think
[10:45:20] <Marc Worrell> I like the implicit z_notifier subscriptions we have now (you can also subscribe with calls)
[10:45:21] <Ilya Rezvov> and explicit way
[10:45:25] <arjan> isn't there aleady something that triggers notifications on the server?
[10:45:35] <Marc Worrell> yeah, but primitive
[10:45:45] <Marc Worrell> z_notify()
[10:46:16] <Marc Worrell> checks all observers for a match
[10:46:31] <Ilya Rezvov> but z_notify work only from serversid and for serverside
[10:46:49] <Ilya Rezvov> i need live data steam for charts
[10:47:02] <Ilya Rezvov> when i make bit import from csv
[10:47:15] <maas.maarten.zeeman> Now i communicate via postbacks. What is nice here is that it allows to add parameters which are secure.
[10:47:16] <Ilya Rezvov> i want monitor speed rates and errors
[10:47:53] <Ilya Rezvov> maas.maarten.zeeman: u call postback from js code or from templates wire?
[10:47:58] <Marc Worrell> Ilya: so a bit more flexible mod_signal? isn't it?
[10:48:07] <maas.maarten.zeeman> yes, from js
[10:48:10] <maas.maarten.zeeman> z_event
[10:48:30] <arjan> http://zotonic.com/docs/manuals/templates/calling-zotonic.html
[10:48:37] <Ilya Rezvov> Marc Worrell: i know about mod_signal very small
[10:48:51] <Ilya Rezvov> i see it more closely
[10:51:15] <Marc Worrell> ok, first doing some taxes and bills - must be done today :p oh the joys of administration....
[10:53:06] <maas.maarten.zeeman> busy refactoring to support synchronization of frames and iframes in channel :-) that is what the pub/sub is for :-)
[10:56:42] <maas.maarten.zeeman> was looking at fixing https://github.com/zotonic/zotonic/issues/368 for this too.
[11:10:27] andreas.stenius leaves the room
[11:10:41] andreas.stenius joins the room
[11:11:56] <Ilya Rezvov> Marc Worrell: where i can see example of using mod_signal?
[11:15:52] <maas.maarten.zeeman> The log page on the admin page uses it.
[11:16:12] <Ilya Rezvov> thx
[11:16:46] <maas.maarten.zeeman> It is used to display new log entries.
[11:20:21] <Ilya Rezvov> what -mod_schema(1). means ?
[11:21:21] <arjan> http://zotonic.com/docs/manuals/modules/versioning.html
[11:21:52] <Ilya Rezvov> cool new doc :)
[11:22:41] <arjan> uhu
[11:24:46] <maas.maarten.zeeman> Nice, didn't know that.
[11:25:21] <maas.maarten.zeeman> I have build something which can hibernate erlang processes to disk.
[11:25:31] <maas.maarten.zeeman> Once you do this you really need to version your state records
[11:26:53] <Ilya Rezvov> i know something new about zotonic every day :)
[11:27:05] <Ilya Rezvov> and it is cool
[11:36:19] <Ilya Rezvov> but mod_logging doesn't have client side
[11:36:34] <Ilya Rezvov> mod_signal work only for serverside?
[11:37:10] <arjan> there is an 'emit' action
[11:37:58] <maas.maarten.zeeman> That goes via the server so the session of other users can react to the signal.
[11:39:47] <Ilya Rezvov> i don't understand how bind to signal on client side
[11:40:11] <Ilya Rezvov> i find action https://github.com/zotonic/zotonic/blob/master/modules/mod_logging/actions/action_logging_addlog.erl
[11:40:38] <Ilya Rezvov> but it is just rendering string
[11:40:44] <Ilya Rezvov> row*
[11:42:00] <maas.maarten.zeeman> Client side is connected to log_message signal via admin_log.tpl
[11:42:03] <maas.maarten.zeeman> {% wire action={connect signal={log_message} action={addlog target="log-area"}} %}
[11:43:20] <Ilya Rezvov> hmm… it is difficult :)
[11:43:24] <maas.maarten.zeeman> The handling is all done on the server. When a new log message arrives a signal is emitted, and the addlog action is rendered.
[11:43:37] <Ilya Rezvov> yeah, i understand now
[11:44:24] <maas.maarten.zeeman> Did you expect something else?
[11:44:47] <arjan> http://zotonic.com/docs/ref/modules/mod_signal.html
[11:44:48] <Ilya Rezvov> yes, i think i can bind to signal from js
[11:45:53] <maas.maarten.zeeman> K. we can add that too I guess.
[11:47:01] <Ilya Rezvov> js layer is very poor, is part of an ideology?
[11:47:02] <maas.maarten.zeeman> This is done when the page is rendered on the server, so it doesn't have to wait for a roundtrip back to the server.
[11:47:15] <Ilya Rezvov> or just lack of time
[11:49:08] <maas.maarten.zeeman> When I made mod_signal I made it so that my front-end collegue could also use it. He understands templates, just a little bit of js.
[11:50:52] <maas.maarten.zeeman> One of the ideologies zotonic zupports is rendering stuff close to where the data is. Maybe that is the reason for missing things in the js api.
[11:52:28] <arjan> boom
[11:52:34] <arjan> pushed release 0.8.2
[11:55:27] <maas.maarten.zeeman> Bugfixes from 0.9?
[11:55:50] <arjan> yep
[11:55:51] <arjan> http://zotonic.com/docs/dev/releasenotes/rel_0.8.2.html
[11:56:16] <arjan> a few
[11:56:20] <maas.maarten.zeeman> was reading github commit note
[11:56:22] <arjan> plus some search module improvements
[12:00:58] <maas.maarten.zeeman> Yesterday evening i was checking things in the db layer department. Upgraded sqlite3 code for the nif and improving error handling. Nice thing is that sqlite now supports shared connections to in-memory databases too. I can now query it via a connection pool.
[12:02:33] <arjan> nice :)
[12:02:55] <arjan> still looking forward to removing the postgresql dependency :-)
[12:03:05] <maas.maarten.zeeman> The nif probably needs some work to deal with busy and locked tables in a nice way. It now just returns the error code back to erlang.
[12:04:00] <maas.maarten.zeeman> The pgsql driver needs some tinkering, but then z_db could be pointed to the layer. Nice to have it battle tested on a real project :-)
[12:04:48] <maas.maarten.zeeman> Hopefully the schema doesn't need too much change in order to support sqlite.
[12:06:16] <maas.maarten.zeeman> Having sqlite as database takes a lot of hassle out of installing zotonic.
[12:06:35] <arjan> indeed
[12:07:24] <Ilya Rezvov> i think sqlite installed on any system, isn't it?
[12:08:29] <maas.maarten.zeeman> It is just 1 c file and 1 header. This allows us to include it in the release. That is also easier for support. No more guesswork to what version the client has running.
[12:11:05] <arjan> does it need external includes?
[12:11:10] <arjan> like libsqlite3-dev or whatever
[12:11:27] <arjan> or you want to include those in the nif repo
[12:11:37] <maas.maarten.zeeman> For now I have added sqlite3.c to the repo :-)
[12:12:17] <Ilya Rezvov> Does gcc need for zotonic building now?
[12:13:14] <arjan> I think so
[12:13:18] <maas.maarten.zeeman> Yes, also for other dependencies like the ua classifier and iconv support.
[12:13:28] <arjan> for the iconv driver
[12:13:56] <arjan> okay
[12:14:22] <arjan> zotonic duties done for today. back to do something billable the rest of the day
[12:14:23] <arjan> :P
[12:15:35] <Ilya Rezvov> i learn zotonic on job :p
[12:15:47] <Ilya Rezvov> when it is possible
[12:18:13] <arjan> thats cool :)
[12:18:39] <arjan> i'm a contractor... currently no big zotonic clients
[12:50:58] arjan leaves the room
[12:52:17] arjan joins the room
[13:24:47] <maas.maarten.zeeman> Colleague played with phonegap over the weekend, he sees a nice opportunity for zotonic in this area.
[13:55:09] <arjan> http://www.evanmiller.org/why-i-program-in-erlang.html
[15:28:46] arjan leaves the room
[15:29:46] arjan joins the room
[16:37:02] <arjan> hey
[16:37:17] <arjan> in zotonic_setup I see we put a ".local" after the system hostname, if it does not contain a dot
[16:37:17] <andreas.stenius> hi ;)
[16:37:41] <Marc Worrell> oh, do we?
[16:37:56] <arjan> yes we do, I think it was me, actually
[16:38:08] <arjan> the point is, that hostname does not resolve most of the time
[16:38:25] <andreas.stenius> feels like it has to do with erlang wanting a fqdn
[16:38:37] <andreas.stenius> (if it wants that, that is...)
[16:38:42] <arjan> indeed thats the question
[16:39:44] <arjan> I removed it, to test
[16:39:49] <andreas.stenius> every system ought to have a *.local => mapping in their network stack...
[16:40:02] <arjan> and it starts fine
[16:40:15] <arjan> -name zotonic001@ixion
[16:40:41] <andreas.stenius> it used to be like that a while back... iirc
[16:41:14] <arjan> of course, for production systems /etc/hostname should be a fqdn
[16:41:15] <andreas.stenius> ah, I think erlang can use either, but not both
[16:41:35] <andreas.stenius> as in a erlang cluster...
[16:41:49] <arjan> The name of the node will be Name@Host, where Host is the fully qualified host name of the current host. For short names,
use the -sname flag instead.
[16:43:58] <arjan> Im considering removing the addition of ".local"
[16:44:06] <arjan> because that causes the zotonic shell and zotonic stop commands to fail
[16:44:47] <arjan> even though it can be $HOSTNAME is not a proper FQDN
[16:44:53] <arjan> I did not see erlang complaining about it
[16:45:47] <andreas.stenius> maybe it's easier to get started with zotonic when the hostname doesn't have to be a fqdn
[16:46:01] <arjan> indeed
[16:46:02] <andreas.stenius> and postpone that config setup to later
[16:46:17] <arjan> I see you can even leave the @hostname from the -name argument
[16:46:32] <arjan> so just -name $NAME
[16:46:41] <andreas.stenius> neat
[16:47:37] <andreas.stenius> I've read most of your docs, at least some depth any how. It's exhaustive! :p
[16:47:53] <arjan> I think i'll leave the $HOSTNAME part anyhow, so you can override it
[16:47:53] <andreas.stenius> only thing I have at the moment is the spelling of maintenance... ;)
[16:48:06] <arjan> thanks :)
[16:48:09] <arjan> heheh
[16:48:27] <arjan> whoops
[16:48:28] <arjan> searchreplace
[16:48:44] <arjan> also that division of chapters messes up the breadcrumb I noticed
[16:49:01] <arjan> e.g., http://zotonic.com/docs/manuals/email.html is under "in-depth" manuals
[16:49:08] <arjan> but it thinks its under maintenance
[16:49:31] <arjan> probably due to the way the files are included in eachother
[16:49:54] <andreas.stenius> oh... (looking at it...)
[16:52:43] <andreas.stenius> bah, dinner time....
[16:53:24] <arjan> :)
[16:53:29] <arjan> enjoy
[16:53:30] <arjan> ttyl
[17:29:15] maas.maarten.zeeman leaves the room
[17:32:14] Ilya Rezvov leaves the room
[17:42:25] <arjan> ok that -name "fix" did not work...
[17:47:19] <andreas.stenius> arjan: all in-depth manuals are under maintenance, since the indepth is linked from the file that has it's first top level heading being maintenance... better break out the in-depth stuff into its own file I guess...
[17:47:35] <arjan> okay
[17:48:18] <arjan> im going home now, be back later
[17:48:26] <andreas.stenius> ok, cu
[17:48:40] <arjan> maybe we could start with -sname by default and make -name optional
[17:49:21] arjan leaves the room
[17:53:54] <Marc Worrell> might be better - most zotonic systems are single node anyway
[18:07:04] arjan joins the room
[18:09:01] <arjan> http://jblevins.org/log/hostname
[18:09:47] <arjan> even our miffy server is incorrectly configured
[18:10:49] arjan leaves the room
[18:14:02] arjan joins the room
[18:19:10] arjan leaves the room
[18:44:54] Ilya Rezvov joins the room
[19:37:21] arjan joins the room
[20:45:30] <arjan> I found a way to locate the erl_call binary
[20:45:59] <arjan> needs to be tested on other platforms tho
[20:46:19] <andreas.stenius> I have a open indiana platform to test it on :p
[20:46:45] <arjan> ERL_CALL=$(erl -noshell -noinput -eval "io:format(code:priv_dir(erl_interface))" -s erlang halt|sed 's~priv~bin/erl_call~')
[20:46:57] <andreas.stenius> lol
[20:47:04] <andreas.stenius> nice face in there
[20:47:08] <arjan> oh
[20:47:17] <andreas.stenius> I can parse it :)
[20:47:23] <arjan> http://pastebin.com/8JLNYHBS
[20:47:34] <arjan> see if that does something on your openindiana
[20:47:39] <arjan> if $ERL_CALL is set
[20:48:55] <andreas.stenius> kaos@morpheus:~/zotonic/doc/ref$ echo $ERL_CALL
kaos@morpheus:~/zotonic/doc/ref$ ls -l $ERL_CALL
-rwxr-xr-x 1 root root 197892 2012-07-29 15:36 /usr/lib/erlang/lib/erl_interface-3.7.7/bin/erl_call
[20:49:10] <arjan> looks good
[20:49:19] <andreas.stenius> yup :)
[20:49:27] <arjan> im tweaking the scripts
[20:49:42] <arjan> to make it easier for newcomers
[20:49:50] <andreas.stenius> nice. I'm finally speding some time with the docs again...
[20:50:02] <andreas.stenius> :yes:
[20:50:20] <andreas.stenius> (that's a thumb up on my end any way... )
[20:50:23] <arjan> yeah
[20:50:33] <arjan> I just saw colon yes colon :p
[20:50:45] <andreas.stenius> figures
[20:51:11] <andreas.stenius> github has :+1 for a thumb up, I think it was...
[20:51:49] <arjan> yes, I like that one
[20:52:06] <andreas.stenius> my system is a
kaos@morpheus:~/zotonic/doc/ref$ uname -a
SunOS morpheus 5.11 oi_151a5 i86pc i386 i86pc Solaris
[20:52:23] <arjan> cool
[20:52:44] <arjan> im installing freebsd in a vm, for fun
[20:52:45] <arjan> :)
[20:52:52] <andreas.stenius> :)
[20:53:06] <andreas.stenius> been thinking a bit about bsd lately too...
[20:53:54] <andreas.stenius> the oi community is rather smallish.... I like the tech a lot, but it's not as perfected as I'd like it to be...
[20:54:20] <andreas.stenius> uhm... polished would've been a better word
[20:57:26] <arjan> first time ever I install freebsd...
[20:58:19] <arjan> the erl_call thing also seems to work on a vanila ubuntu
[21:18:37] <arjan> committed it
[21:25:59] <andreas.stenius> :)
[21:27:10] <arjan> try:
ZOTONIC_DISTRIBUTED=true zotonic debug
[21:27:15] <arjan> :)
[21:28:31] <andreas.stenius> I'm in doc'billy mess... need to clean up before pulling...
[21:29:14] <andreas.stenius> make stubs started complaining on some grep snytax.... ? looking into it....
[21:29:26] <andreas.stenius> syntax*
[21:33:18] <arjan> heh
[21:33:23] <arjan> hmm
[21:33:51] <arjan> /usr/bin/env: sed -f: No such file or directory
[21:34:22] arjan leaves the room
[22:12:49] <andreas.stenius> yeah, turns out env doesn't work well when we need to pass extra args....
[22:13:32] <andreas.stenius> I'll revert that to /usr/bin/sed -f with a notice to add a symlink to sed if it isn't found in /usr/bin
[22:41:11] andreas.stenius leaves the room
[22:52:38] arjan joins the room
[23:28:13] arjan leaves the room
Powered by ejabberd Powered by Erlang Valid XHTML 1.0 Transitional Valid CSS!