Ringobot log - RingoJS IRC channel: #ringojs on irc.freenode.net
2010-06-24:
[6:32] <gmosx> good morning![6:38] <hannesw> good morning
[6:42] <gmosx> hannesw: maybe it would be a good idea to extract stuff like skins, or the web framework in a separate package and have a leaner ringo core
[6:42] <gmosx> (but please leave request/response in the core along with jsgi)
[6:48] <hannesw> gmosx yes, that's been a consideration for a long time
[6:48] <gmosx> ok
[6:49] <hannesw> skin thing is something I'm not really happy with
[6:49] <hannesw> I'm going to rewrite it anyway, so maybe also decouple it in the process
[6:50] <gmosx> yeah...
[6:50] <gmosx> perhaps you should also remove storage from the core...
[6:51] <gmosx> and even the middleware stuff (maybe put them in a ringo-webapp package along with the other web related stuff)
[6:51] <gmosx> (but let me repeat, keep request, response in the core along with jsgi)
[6:53] <hannesw> why not have middleware in core? it's just jsgi, thus framework agnostic
[7:14] <gmosx> OK, if you think it belongs to the core :)
[7:14] <gmosx> perhaps leave webapp in the core too...
[7:15] <gmosx> btw, perhaps you should move ringo/jsgi.js to /jsgi.js (top level)
[7:20] <hannesw> jsgi is not a user facing module - you never need it
[7:21] <gmosx> but it's a commonjs ratified module, should belong in the top level... think about it...
[7:21] <hannesw> there's this really interesting blog post by isaac schlueter i read yesterday:
[7:21] <hannesw> http://blog.izs.me/post/729604080/nodejs-and-empowering-n00bz
[7:21] <hannesw> i think we can learn a _lot_ from this
[7:21] <gmosx> let me check this out...
[7:22] <hannesw> ringo really lacks simple examples - even experienced users asking for the simples possible hello world app
[7:22] <hannesw> node.js has this stuff right on the front page
[7:22] <hannesw> so i think we might learn from that, and instead of listing features, put a simple hello world app right on there as well
[7:22] <gmosx> yeah...
[7:23] <gmosx> ringo is relatively easy to get starte with too...
[7:23] <gmosx> it's easier for example than narwhal...
[7:23] <gmosx> but there is always room for improvement...
[7:24] <gmosx> indeed, you should add a couple of simple examples on the homepage
[7:24] <gmosx> oh, and more videos...
[7:24] <gmosx> your videos made me switch to RingoJS btw...
[7:24] <gmosx> great videos...
[7:24] <hannesw> thanks :)
[7:24] <hannesw> still learning
[7:25] <gmosx> (perhaps you should update that GAE video with an appenginejs example, hint, hint ;-))
[7:25] <hannesw> btw, your blog post brough as ~1000 new visitors yesterday
[7:25] <hannesw> and today it's alredy > 3 times the usual number of visitors
[7:25] <hannesw> so that was just great
[7:25] <gmosx> nice, we don't need visitors, we need users though ;-)
[7:26] <hannesw> i think lot's of new people found it quite interesting
[7:26] <hannesw> based on tweets and github watchers
[7:26] <hannesw> so this exposure is exactly what's needed
[7:26] <gmosx> of course: it's a great project!
[7:27] <gmosx> you guys have done a great job!
[7:27] <hannesw> :)
[7:27] <hannesw> but a terrible one at creating a buzz
[7:27] <gmosx> perhaps you should organize an irc meeting about 'marketing'
[7:28] <gmosx> some coordinated efforts could do wonders...
[7:29] <hannesw> why coordinate? if a few people start talking/blogging, isn't that what's missing?
[7:30] <gmosx> you should coordinate the tlaking/blogging part to send out a clear message...
[7:30] <gmosx> focused on the merits of Ringo...
[7:30] <hannesw> right now figuring out which way to go with my new blog
[7:30] <hannesw> think i might use github pages and jekyll
[7:30] <gmosx> sounds good...
[7:31] <gmosx> get something up and running :)
[7:31] <hannesw> yeah
[7:31] <gmosx> add disqus for comments...
[7:31] <hannesw> right
[8:22] <ringostarr> acf79e9 Hannes Walln?fer: Allow packages.loadPackage[s] to be called with string arguments and add some jsdoc
[8:24] <ringostarr> 7ab144b Hannes Walln?fer: Fix jsdoc @param tags
[10:39] <robi42> hannesw, github/jekyll/disqus blogging would do just fine. the earlier there's something out there now the better, i think. :)
[10:40] <hannesw> yes, will try to get it up today/tomorrow
[10:40] <robi42> great
[13:25] <tschaub> this is not ringo specific, but I'm wondering if someone can help me with a rhino question
[13:26] <tschaub> I need to create an instance using a Java class with two candidate constructors
[13:26] <tschaub> com.example.Foo(com.example.Bar[]) and com.example.Foo(com.example.Baz[])
[13:27] <tschaub> I've got a JavaScript array of Bar objects
[13:28] <tschaub> and I get "The choice of Java constructor Foo matching JavaScript argument types (object) is ambiguous"
[13:35] <earl> tschaub: you'll need to explicitly specify which ctor to call
[13:35] <tschaub> earl: can I do that from js?
[13:35] <earl> sthg like `com.example.Foo["(com.example.Bar[])"](arrayOfBars)`
[13:37] <earl> does that work?
[13:38] <tschaub> doesn't look like it - it's looking specifically for a property on the Foo function named "(com.example...") in that case
[13:39] <tschaub> only properties listed are name, arguments, arity, length, prototype
[13:39] <tschaub> seems like I should be able to create a typed array
[13:40] <earl> let me look up the reference
[13:40] <earl> maybe it doesn't work for non-primitive types
[13:40] <earl> http://www.mozilla.org/js/liveconnect/lc3_method_overloading.html#ExplicitMethod
[13:43] <tschaub> interesting, thanks earl
[13:43] <tschaub> looks like it should work
[13:43] <earl> well, not sure if it does for non-primitives
[13:43] <tschaub> it's likely complicated on my side because I'm using a factory function as well
[13:45] <earl> hannesw is probably the right person to ping re this, i think he knows those intricacies fairly well
[13:49] <tschaub> earl: it looks like java.lang.reflect.Array.newInstance(com.example.Foo, 10) may work
[13:50] <tschaub> cool, it does work
[13:50] <earl> great :)
[13:50] <tschaub> thanks for the pointers - those are good docs to have handy
[13:52] * tschaub -> airplane
[14:45] <oravecz> adding to the conversation between hannesw and gmosx yesterday, I have a couple suggestions
[14:45] <gmosx> oravecz: ?
[14:46] <oravecz> +1 on separating skins into a package, should be able to use skins, mustache, ejs, etc as easy as adding a package
[14:46] <gmosx> yes
[14:47] <oravecz> The config.js assumes a single web application per deployment. Perhaps considering an approach similar to web.xml is more flexible.
[14:48] <gmosx> hmm, dunno about that...
[14:49] <gmosx> I don't use most of the features of config.js or the webapp framework anw...
[14:49] <gmosx> so I am not the right person to comment on this
[14:50] <oravecz> just throwing it out there if there is going to be some consideration for developing enterprise apps
[14:50] <oravecz> it is fairly common to bundle multiple servlets in a web app
[14:50] <oravecz> and each servlet can have a different stack of filters applied against it
[14:51] <gmosx> yeah... In my projects I go a step further, every single uri is handled by a different (JSGI) app, and a dispatcher middleware selects the appropriate app
[14:52] <oravecz> that's an example of one extreme :D
[14:52] <gmosx> :-)
[14:53] <gmosx> but works well in practice... very simple to understand and debug the app...
[14:53] <oravecz> we are probably on the other extreme, large enterprise project using maven and other components of Java ecosystem (Spring, spring security, portlets)
[14:53] <oravecz> but building everything on ringojs
[14:54] <gmosx> sounds like ...fun :-D
[14:54] <robi42> btw, ringo/webapp's config.js allows for multi-app setups; example: http://github.com/ringo/ringojs.org :)
[14:54] <kwhinnery> well, that's the big allure of using a JVM-based framework - you can put it over the top of existing Java codebases and not have to work with a crappy Java web framework
[14:54] <gmosx> kwhinnery: right!
[14:55] <oravecz> robi42,are you referencing the demo app?
[14:55] <robi42> nope, that's the app running ringojs.org
[14:56] <oravecz> but where does it show how I can apply different middleware stacks based on app?
[14:57] <gmosx> you could use a simple middleware like this:
[14:57] <robi42> well, basically you've got a general config.js there and then resp. config.js' for each sub app
[14:57] <gmosx> http://gist.github.com/451564
[14:58] <gmosx> can you have multiple configs?
[14:59] <robi42> each app has its own config
[14:59] <robi42> iirc :)
[15:13] <hannesw> if you map a pattern to another config, that config takes on from there
[15:13] <hannesw> so yes, you can nest configs (and webapps)
[15:23] <oravecz> hannesw: any progress on how I can resolve js files to ringo.jar, while also locating js files in my app's directory structure?
[15:24] <oravecz> i should add, when deployed as a servlet
[15:30] <oravecz> it seems that creating a path to ringo.jar is problematic because it depends it isn't relative to any particular path. On my mac dev env, it seems to be relative to the directory I am in when I launch maven.
[15:33] <oravecz> The Apache VFS stuff is pretty cool. If ringo would use it, we could specify resource paths using loacal/remote filesystems, jar/zip files, and even the classpath.
[15:33] <oravecz> http://commons.apache.org/vfs/filesystems.html#Zip, Jar and Tar
[15:36] <oravecz> it also looks like commons vfs supports a cache strategy to allow for easy config of production/dev behavior involving caching
