Ringobot log - RingoJS IRC channel: #ringojs on irc.freenode.net

2010-06-22:

[8:15] <hannesw> helma blog: goodbye helma, hello ringo
[8:15] <hannesw> http://helma.org/weblog/2010/06/goodbye_helma_hello_ringo/
[8:45] <oberhamsi> hi hannesw, i have this mini problem. skinResponse not working when require'ed instead of included http://ringojs.pastebin.com/mXUUkfqz
[8:46] <oberhamsi> without `this` here it works http://github.com/ringo/ringojs/blob/master/modules/ringo/webapp/response.js#L238
[8:49] <oberhamsi> okay i'll just remove `this` & push, getResource() is a global
[9:35] <hannesw> oberhamsi, yes, stupid this-hack
[9:35] <hannesw> I'm getting closer to rewriting the skin module
[9:36] <hannesw> for resource loading, we should probably introduce a module.resource() method as proposed several times on commonjs list
[9:36] <hannesw> and use that somehow for resolving skin paths
[9:45] <gmosx> +1 for module.resource()
[9:45] <hannesw> is that implemented somewhere? i think flusspferd maybe
[9:45] <gmosx> dunno...
[9:45] <hannesw> should it return content as string or stream?
[9:46] <gmosx> hmm...
[9:46] <gmosx> I am not sure...
[9:47] <gmosx> probably stream (I guess it is easy to 'read' a stream into a string)
[9:47] <gmosx> hannesw: btw, do you have a blog or something?
[9:47] <ringostarr> 78761b4 Simon Oberhammer: fix skinResponse calling getResource on `this` instead of globally
[9:48] <gmosx> hannesw: you should 'advertise' ringo more aggressively IMO
[9:50] <hannesw> gmosx: i know
[9:51] <gmosx> so do you have a blog or something?
[9:51] <hannesw> I've got an old blog, but it's not really suited for this kind of work : http://henso.com/
[9:51] <hannesw> i'm planning to start a new one
[9:52] <gmosx> good idea...
[9:52] <gmosx> OT: this henso font looks great, is this a free font?
[9:53] <hannesw> yes.
[9:53] <hannesw> it's from dafont.com, but i can't remember its name
[9:55] <gmosx> any chance you can remember the name of the font?
[9:55] <gmosx> or at least category?
[9:56] <hannesw> got it: pointy solid
[9:56] <hannesw> http://www.dafont.com/pointy-design.d1675
[9:57] <hannesw> oh, it's not free, it's a demo version
[9:57] <hannesw> didn't even see that
[9:59] <gmosx> hmm... thanks!
[9:59] <hannesw> would have bet it was "free for personal use" or whatever :)
[10:01] <gmosx> ;-)
[10:37] <oberhamsi> okay, req.path and req.pathInfo again :) i don't like that webapp modifies the original path.
[10:37] <hannesw> it doesn't modify path, does it?
[10:37] <oberhamsi> .. that it removes whatever matched action arguments. i'd like to know where i am...
[10:37] <hannesw> it modifies scriptName and pathInfo
[10:38] <oberhamsi> okay hold on
[10:38] <hannesw> hm, for action arguments it's maybe wrong...
[10:39] <hannesw> well path == scriptName + pathInfo, i think that's the invariant
[10:39] <oberhamsi> okay, i just realized my urls don't end in slash. that makes a difference.
[10:43] <oberhamsi> what do you mean with "for action arguments it's maybe wrong"?
[10:44] <hannesw> i mean arguments should maybe remain in the pathInfo
[10:45] <oberhamsi> ah yes, didn't have a problem with that, but yes
[10:46] <oberhamsi> i had slash confusion.. i'll write a middleware that adds trailing slash to urls
[10:46] <hannesw> ringo should do that by its own
[10:46] <hannesw> when needed
[10:47] <oberhamsi> how? or what is needed to make it do that ;)
[10:47] * oberhamsi lunch off
[10:48] <hannesw> when you request an action that is the "index" action of a module, the request is redirected to the url with trailing slash if needed
[11:10] <ringostarr> d936e83 Hannes Walln?fer: Try to locate skin resource both globally and relative to this-module in skinResponse()
[11:18] <oberhamsi> hannesw, though this throws same ugly error if skin doesn't exist
[11:19] <hannesw> hm?
[11:19] <oberhamsi> should we check for typeof this.getResource == 'function'
[11:19] <oberhamsi> http://ringojs.pastebin.com/7nrr3x9y
[11:19] <hannesw> ah, i get it now
[11:19] <hannesw> ok
[11:20] <oberhamsi> okay, should have pasted earlier
[11:21] <hannesw> np
[11:21] <hannesw> yes, i think this might work:
[11:21] <hannesw> http://ringojs.pastebin.com/UG4KP25g
[11:22] <hannesw> testign it now
[11:27] <oberhamsi> looks good
[11:27] <ringostarr> b40f39e Hannes Walln?fer: this.getResource() is not defined if this is the exports object
[11:27] <hannesw> pushed, should be working now
[11:33] <ringostarr> 8dfb9f2 Hannes Walln?fer: Unittest module name is now "test"
[15:07] <oberhamsi> ringowiki uses an undefined "escapeForm" filter http://github.com/ringo/ringowiki/blob/master/skins/edit.html#L9
[15:09] <oberhamsi> :) http://ringojs.org/wiki/NoEscapeBug/edit
[15:14] <earl> should probably just be escapeHtml
[15:26] <oberhamsi> thought so too, pushed
[15:32] <earl> why did you not fix the second escapeForm as well :) ?