Tuesday, 25 June 2013< ^ >
Arjan has set the subject to: Zotonic - The Erlang Web Framework & CMS
Room Configuration

[01:10:13] cillian.deroiste leaves the room
[02:16:23] mawuli.ypa leaves the room
[04:07:16] mawuli.ypa joins the room
[06:02:08] arcusfelis joins the room
[07:08:21] jeff.5nines leaves the room
[07:32:17] Maas joins the room
[08:17:42] Maas leaves the room
[08:33:20] Maas joins the room
[08:35:13] Maas leaves the room
[08:52:07] <Marc Worrell> @arjan was wrong in the mimetypes app?
[08:52:23] <Andreas Stenius> Marc Worrell: it was on the mailinglist..
[08:52:33] <Marc Worrell> I also often get .jpe files for jpegs. Maybe need to check what's happening.
[08:53:09] <Andreas Stenius> thread title was: [Zotonic-Usr] Custom mime.types file
[08:53:41] <Marc Worrell> ah, found it
[08:54:13] <Andreas Stenius> https://github.com/spawngrid/mimetypes/blob/master/priv/mime.types#L1231
[08:54:31] <Andreas Stenius> don't know where the jpe comes from though..
[08:56:33] <Andreas Stenius> I guess that mime.types is not responsible for your jpe files.. mime.types takes an extension to know what mime type to present it as, I suppose.. ?
[08:57:44] <Andreas Stenius> Marc, I setup the tests to run both the old erlydtl engine we have along with the new engine, so we can both compare compatibility and speed
[08:57:46] <Andreas Stenius> (zotonic001@precise32)40> ztl_tests:test().
src/ztl/ztl_tests.erl:76:<0.5467.16>: -- engine zerlydtl
src/ztl/ztl_tests.erl:80:<0.5467.16>: compiling: simple test: 0.026 s
src/ztl/ztl_tests.erl:91:<0.5467.16>: rendering: simple test: 0.000 s
src/ztl/ztl_tests.erl:57:<0.5467.16>: test case: simple test: 0.026 s
src/ztl/ztl_tests.erl:76:<0.5467.16>: -- engine ztl
src/ztl/ztl_tests.erl:80:<0.5467.16>: compiling: simple test: 0.027 s
src/ztl/ztl_tests.erl:91:<0.5467.16>: rendering: simple test: 0.000 s
src/ztl/ztl_tests.erl:57:<0.5467.16>: test case: simple test: 0.027 s
Test passed.
[08:58:30] <Andreas Stenius> I reanamed our erlydtl fork to zerlydtl to avoid name clashes...
[08:58:50] <Andreas Stenius> and introduced ztl as the name for our erlydtl extensions
[08:59:08] <Andreas Stenius> all this will live in a branch on my fork until it is ready to graduate.. ;)
[09:00:20] <Marc Worrell> jpe was listed as the first possible extension in the mimetypes app
[09:00:45] <Andreas Stenius> ah, of course, when uploading files, it goes the other way around... :p
[09:00:53] <Marc Worrell> I think I will need to add some shortcuts to recognise the image/jpeg mimetype early
[09:01:19] <Marc Worrell> it happens with windows people uploading some files, maybe an upper/lowercase thing on our .jpg recognition :p
[09:01:44] <Marc Worrell> Those speeds are ok - negligible speed diff
[09:02:11] <Marc Worrell> I think most of the time is spent compiling & loading the file, as syntax errors always pop up quickly
[09:40:39] arjan joins the room
[09:42:26] Maas joins the room
[10:11:12] <Maas> going to make a simple mod_poweredby to let people (including us) easily add those spiffy zotonic logo's and a link to the zotonic homepage.
[10:11:34] <Marc Worrell> maybe add the logos to mod_artwork?
[10:12:01] <Maas> Could also be done in that location indeed.
[10:12:31] <Maas> Was thinking about a simple optional include template.
[10:12:50] <Andreas Stenius> and I feel that snippets for powered by could just as well live in mod_base..
[10:13:13] <Andreas Stenius> oh, or do you think that to easily disable powered by snippets, disable a module.. ?
[10:13:27] <Maas> Also fine, as long as it is easy to add.
[10:13:53] <Marc Worrell> mod_base is also good, it is very basic :p
[10:14:13] <Andreas Stenius> I think it could be nifty to have in a module, if you use stock templates that has optional includes for them, then you can choose wheter they show or not simply by enabling/disabling the snippets module
[10:14:15] <Maas> Just a div with an anchor and a link to zotonic.com
[10:14:37] <Andreas Stenius> or, to get rid of it, override the snippet with an empty version.. :p
[10:14:47] <Andreas Stenius> so, I'd vote for mod_base ;)
[10:14:54] <Maas> Lots of ways to do it :-)
[10:15:01] <Andreas Stenius> indeed
[10:17:22] <Maas> Having it in the standard distribution makes it easier to add to new sites.
[10:18:16] <Andreas Stenius> also, it's not yet another module to have to enable..
[10:22:16] <Andreas Stenius> what's the purpose of template_reset_counter ?
[10:22:44] <Maas> where is that?
[10:22:56] <Andreas Stenius> in the template stuff..
[10:22:58] <arjan> +1 for mod_base
[10:24:08] <Marc Worrell> The 'template_reset_counter' is for forcing a recompile after hitting a site's flush.
[10:24:26] <Marc Worrell> for example when the translations are reloaded
[10:25:38] <Andreas Stenius> ah, ok. makes sense :)
[10:32:43] <mawuli.ypa> Good morning guys :)
[10:43:29] <Marc Worrell> Good morning :)
[10:52:40] <Andreas Stenius> Morning Mawuli :)
[10:59:11] <mawuli.ypa> Andreas: I have just read your mail. Thanks
[10:59:58] <mawuli.ypa> Marc : It's been a long time. I have been busy with my work
[11:00:18] <Marc Worrell> busy here too :)
[11:00:21] <mawuli.ypa> Is there another Hangout in the planning? :)
[11:10:09] <arjan> maybe its good we organise a weekly hangout
[11:10:10] <arjan> or bi-weekly
[11:10:17] <arjan> same time every 2 weeks
[11:11:07] <Andreas Stenius> sounds good..
[11:13:25] mawuli.ypa leaves the room
[11:13:53] <Marc Worrell> yep - for both projects
[11:14:53] mawuli.ypa joins the room
[11:17:25] <mawuli.ypa> :)
[11:28:27] <arjan> I *hate* coding HTML forms
[11:28:41] <arjan> I should invent something that makes the forms for me
[11:28:57] <Marc Worrell> yep - including the server side handling
[11:29:10] <Andreas Stenius> +10
[11:29:15] <Marc Worrell> at least the markup is quite under control, using bootstrap
[11:29:32] <Andreas Stenius> but I don't want to bother with markup..
[11:29:47] <Andreas Stenius> I just want to layout the input fields and be done with it.. :)
[11:29:53] <Marc Worrell> yep - so it is good that it is standardised :-)
[11:44:38] <arjan> the markup is also a PITA
[11:44:41] <arjan> indeed
[11:44:56] <arjan> in PHP I used to have a library which read an XML file
[11:45:03] <arjan> kind of form DSL, really
[11:45:07] <arjan> worked pretty well
[11:45:43] <Marc Worrell> You could do that inline in your template?
[11:45:56] <Marc Worrell> {% form %} …. {% endform %}
[11:46:14] <Andreas Stenius> yeah, I've been thinking of some custom tags or some such for building forms..
[11:46:23] <arjan> can you create block tags dynamically?
[11:46:28] <arjan> like scomps?
[11:46:35] <Andreas Stenius> no.. I don't think so
[11:47:02] <Andreas Stenius> but with the new "ztl", we can include templates that have different semantics (your idea, arjan!) ;)
[11:47:11] <arjan> hehe
[11:47:40] <Andreas Stenius> and new custom block level tags should also be possible, of course..
[12:27:48] <arjan> interesting
[12:27:57] <arjan> trying to make a date field have validations
[12:52:04] <mawuli.ypa> Yes, I like the html helper idea.
[12:52:23] <mawuli.ypa> I was trying to explain it Andreas the other time, but couldn't put it well.
[12:52:54] <Andreas Stenius> ah, ok
[12:53:32] <mawuli.ypa> So we we could just pass a data structure to the html helper and you can then generate the form in the template
[12:53:53] <mawuli.ypa> You could even create a new form for a specific model, say m_comment
[12:54:48] <Andreas Stenius> yup :)
[12:54:54] <mawuli.ypa> html helper should have support for basic operatiosn such as create new form, edit for a model, delete link to a model etc
[12:55:29] <mawuli.ypa> and then we can throw in other things too like tables, lists and good old pagination!
[12:56:07] <mawuli.ypa> :)
[12:56:43] <Marc Worrell> we are on HN again https://twitter.com/search/realtime?q=zotonic
[12:57:44] <mawuli.ypa> :)
[13:21:13] <arjan> nice
[13:21:57] <arjan> we should also link the video
[13:25:11] <Andreas Stenius> yeah :)
[13:42:13] mawuli.ypa leaves the room
[13:43:31] mawuli.ypa joins the room
[14:39:04] <z-bot> [HashNuke] hey all
[14:39:13] <Andreas Stenius> Hi :)
[14:40:29] <z-bot> [HashNuke] I just started trying erlang (with help from the Programming Erlang book).
[14:41:13] <Andreas Stenius> welcome to the Erlang world :)
[14:42:15] <z-bot> [HashNuke] I was looking for a framework that supports websockets (for games) and stumbled upon Zotonic. I'm watching Arjan's "Making it fast" talk right now. Was wondering it's good to work on browser-based multiplayer games using zotonic. Or should I be looking at other frameworks.
[14:43:20] <z-bot> [HashNuke] Andreas: coming from Ruby, I confess, it is a lot to take in. But I've been trying hard and reading and trying out examples in the book and blog posts that I find online.
[14:44:29] <z-bot> [HashNuke] What I find is that most blog posts assume that the user knows which file the code is supposed to go and miss out on specifying the project structure. I'm guessing that is because it is pretty standard because of OTP.
[14:45:23] <arjan> Zotonic is currently not 100% OTP though
[14:45:38] <arjan> but once you get the hang of the directory structure it is pretty straightforward
[14:45:46] <arjan> basically everything is partitioned into modules
[14:45:56] <arjan> each module contains all the code that ties funcitonality for that module together
[14:46:07] <arjan> like JS, templates, URL dispatch rules, erlang callback code
[14:47:24] <z-bot> [HashNuke] Thanks arjan ~! Enjoying your talk right now on youtube (half-way thru).
[14:47:33] <arjan> :)
[14:47:36] <arjan> cool
[14:47:46] <arjan> I always find it hard to watch myself :P
[14:49:14] <z-bot> [HashNuke] arjan: I found a new hobby recently - building browser-based games. I see with erlang I can run websockets also on the same language as my main app (instead of rails + a nodejs websockets server like I used to do before).
[14:49:52] <arjan> nice
[14:50:09] <arjan> erlang has a perfect structure for such games
[14:50:21] <z-bot> [HashNuke] Is the zotonic websockets API enough or do you suggest I run another seperate erlang app for websockets?
[14:50:59] <z-bot> [kaos] the websocket support in zotonic should be enough
[14:51:01] <arjan> the standard websocket we have is focussed on sending pieces of javascript over the wire
[14:51:08] <arjan> but it can also be used in a more general way
[14:51:12] <arjan> lemme loop up the docs
[14:51:14] <arjan> Maas built that
[14:51:38] <arjan> http://zotonic.com/docs/0.9/ref/controllers/controller_websocket.html?highlight=websocket#websocket-handler-api
[14:51:40] <z-bot> [HashNuke] Thank you ~! now I should get back to trying out zotonic before asking more questions :)
[14:51:58] <Andreas Stenius> if it's not enough, I guess we need to fix it :p
[14:53:02] <arjan> have fun!
[14:53:43] <z-bot> [HashNuke] Andreas: I framed the question that way after I found this - https://github.com/5HT/n2o. The description "Erlang Web Framework on WebSockets" is a bit confusing.
[14:55:31] <z-bot> [HashNuke] According to the readme of that repo, all communication with the server from the client-side is via websockets. I was wondering if the websockets on zotonic is also used for that purpose and if it can be generalized :)
[14:56:46] <Maas> I would love to be able to mix standard zotonic js-postbacks and custom site specific messages. For now you have to use separate websockets.
[14:58:27] <arjan> A separate websocket channel is OK I think, especially for special stuff like gaming
[14:59:03] <z-bot> [HashNuke] arjan: Yes. a seperate websocket channel is ok. The doc page you linked me to looks fine.
[15:03:57] <Andreas Stenius> wow, never heard of n2o before.. :p
[15:06:04] <Maas> Btw. zotonic is really nice if you need a system which can handle large numbers of long running sessions.
[15:08:07] <arjan> Andreas Stenius: N2O is a fork of nitrogen I think
[15:08:09] <z-bot> [HashNuke] Andreas: I assume you added the smiley because you were sarcastic or joking. Sorry I didn't get it tho. Is n2o a well-known project?
[15:08:19] <Andreas Stenius> yeah, I noticed..
[15:08:54] <arjan> N2O is a relatively new project
[15:09:00] <arjan> only 3 months old
[15:09:06] <arjan> https://github.com/5HT/n2o/commits/master?page=7
[15:09:08] <Andreas Stenius> don't know.. I wasn't sarcastic, I was surprised that I hadn't heard of it before..
[15:09:31] <Andreas Stenius> it has pretty many stars for such a new project, I think..
[15:10:44] <z-bot> [HashNuke] Andreas: When I first saw the stars I started to compare the number of stars on Chicago Boss, Zotonic and Yaws to see which one to checkout first :D
[15:11:09] <Andreas Stenius> heh :)
[15:12:00] <Andreas Stenius> so, how did you like chicago boss? (assuming you checked that one out first..) ;)
[15:13:02] <z-bot> [HashNuke] Andreas: I was warned it wasn't stable :)
[15:13:53] <z-bot> [HashNuke] I did love it tho. Made a doc contribution too. Also I know I'll be using stuff like OAuth, which isn't built into CB.
[15:15:16] <arjan> the thing that I like about CB is the db abstraction layer. that is something we should have too ;)
[15:15:47] <arjan> but Evan told me the db layer is pretty simple -- it cannot do 'OR' queries for instance. so not something we can use...
[15:15:49] <z-bot> [HashNuke] arjan: boss_db is awesome ~!
[15:15:51] <arjan> we want to have full SQL power
[15:16:55] <z-bot> [HashNuke] arjan: Oh. Didn't know about the OR query limitation. Also it prefixes the name of the model to the IDs of the records, which is a bit weird (coming from Rails and other frameworks atleast).
[15:18:32] <z-bot> [HashNuke] I was LOLing at myself after I tried boss_db for the first time with a module called "user" and waited on the IRC channel for almost a day until sometime told me erlang already has a module with the same name.
[15:19:48] <arjan> heh
[15:19:58] <arjan> yeah Erlang is interesting to learn
[15:20:15] <arjan> there's no concept of namespaces. that's probably the one thing that I sometimes miss...
[15:21:53] <z-bot> [HashNuke] I watched a talk on Elixir yesterday. Very interesting. Felt like Elixir:Erlang :: Clojure:Java.
[15:22:07] <z-bot> [HashNuke] anyone using Elixir with zotonic?
[15:22:34] <Andreas Stenius> not that I know of..
[15:23:27] z-bot [HashNuke] loves the ErlangSolutions videos on Youtube. Lots of cool stuff. I'm hooked to another erlang video now.
[15:23:32] <arjan> :)
[15:23:43] <arjan> yeah the talks are of a high quality usually!
[15:36:14] arjan leaves the room
[15:47:39] arjan joins the room
[16:51:45] mawuli.ypa leaves the room
[16:52:32] mawuli.ypa joins the room
[17:27:20] Maas leaves the room
[18:06:46] arjan leaves the room
[18:31:58] <z-bot> [HashNuke] muhaha. So Zotonic was on HN at the same time I was asking about it here.
[18:32:40] <Andreas Stenius> yeah, so at first I thought you got it from there.. :p
[18:33:36] <z-bot> [HashNuke] arjan: Just saw stick.im. Neat app :)
[18:34:36] <z-bot> [HashNuke] Andreas: Totally co-incidence ~!
[18:35:28] arjan joins the room
[18:37:28] <arjan> thanks :) I made stick.im in just 4 hours or so
[18:37:38] <arjan> simple but elegant ;)
[18:40:58] arjan leaves the room
[18:42:08] <Andreas Stenius> Marc Worrell: any particular reason why the url tag is a builtin, rather than a custom tag (scomp) ?
[18:44:00] <z-bot> [HashNuke] arjan: Just when I was thinking Zotonic might be for medium-to-large sized apps, I found your comment with the link.
[18:44:37] <z-bot> [HashNuke] I love small apps. whipping out small ones like these in leisure time is a great stress-buster.
[18:45:01] cillian.deroiste joins the room
[20:01:59] cillian.deroiste leaves the room
[20:03:01] cillian.deroiste joins the room
[20:13:04] mawuli.ypa leaves the room
[20:16:36] arjan joins the room
[20:24:24] cillian.deroiste leaves the room
[20:25:07] cillian.deroiste joins the room
[20:35:55] arcusfelis leaves the room
[20:46:34] Maas joins the room
[21:26:02] arjan leaves the room
[22:06:34] Maas leaves the room
[22:42:46] <Andreas Stenius> hmm.. it seems like if I have a typo in the url tag, I'll get 'undefined' in the output (which isn't a valid iolist term)
[22:43:15] <Andreas Stenius> i.e. {% url foo %} when there is no dispatch rule named foo.
[22:43:32] <Andreas Stenius> (this will be adressed in ztl...)
[23:20:13] Andreas Stenius leaves the room
[23:20:15] Andreas Stenius joins the room
Powered by ejabberd Powered by Erlang Valid XHTML 1.0 Transitional Valid CSS!