Ringobot log - RingoJS IRC channel: #ringojs on irc.freenode.net
2010-06-14:
[7:13] <hannesw> good morning ring[7:13] <hannesw> o
[7:14] <oberhamsi> moning
[7:16] <oberhamsi> oh the bot is down :( is the old one still available?
[7:16] <oberhamsi> *log http://ringojs.com/bot/
[7:18] <hannesw> earl's bot is up: http://ringojs.at/bot/
[7:18] <hannesw> we need to deploy that on ringojs.org soon
[7:19] <zumbrunn> I'm fiddling around with the server containing the old bot right now
[7:19] <hannesw> but i think there was no irc activity over the weekend
[7:19] <zumbrunn> ringobot is listening, though
[7:19] <zumbrunn> it's just ringojs.com/bot that's offline right now
[7:19] <hannesw> zumbrunn: earl built a new bot, not sure you saw it:
[7:19] <zumbrunn> yeah, I saw it
[7:19] <hannesw> http://github.com/earl/ringobot
[7:19] <zumbrunn> looks great!
[7:20] <zumbrunn> I'll switch to that myself as well
[7:22] <hannesw> cool
[7:22] <hannesw> so we have three ringojs.* sites now: .org, .com, and .at
[7:23] <hannesw> what should we do about that?
[7:24] <zumbrunn> the only thing on ringojs.com that isn't on ringojs.org are the older bot logs (one ringostarr logs are on ringojs.org)
[7:24] <oberhamsi> are they different?
[7:24] <oberhamsi> oh they are even diff machines, i see :)
[7:25] <hannesw> what format are those botlogs stored in?
[7:25] <zumbrunn> Logbot
[7:25] <zumbrunn> one file for each day
[7:26] <hannesw> plain text?
[7:26] <hannesw> earl's bot stores json, one object literal per line
[7:26] <hannesw> would be nice if we could combine these
[7:26] <zumbrunn> the Logbot files contain lines like this...
[7:26] <zumbrunn> <span class="irc-date">[11:50]</span> <span class="irc-black"><earl> ok</span><br />
[7:27] <hannesw> ok
[7:27] <hannesw> hensobot is my patched cometd version of ringobot
[7:32] <hannesw> i think i'll install ringobot on ringojs.org today
[7:33] <hannesw> some things that would be nice to have:
[7:33] <hannesw> conversant coloring
[7:33] <hannesw> per month archives
[7:33] <hannesw> search (well that would be covered by simple google site search i guess)
[9:04] <gmosx> hannesw: here?
[9:17] <hannesw> hi gmosx now i'm her
[9:17] <hannesw> e
[9:18] <gmosx> hey
[9:18] <gmosx> small q:
[9:18] <gmosx> how can I run the ringo documentation tool to generate docs from javadoc comments?
[9:18] <hannesw> currently you can only run it as web app
[9:19] <hannesw> generating documentation on the fly
[9:19] <oberhamsi> gmosx, only work for jsdoc comments though not java
[9:19] <hannesw> but it shouldn't be hard to generate documentation statically
[9:19] <hannesw> yes
[9:19] <gmosx> not interested in java...
[9:19] <hannesw> for java, there's javadoc
[9:19] <gmosx> ok, will have a look...
[9:20] <hannesw> you can write doclets for javadoc
[9:20] <hannesw> to do custom processing
[9:20] <hannesw> i once did that but forgot the details
[12:29] <oberhamsi> had a problem with regex resolving, this fixed it for me http://github.com/oberhamsi/ringojs/commit/bf5d7b0193c9
[12:30] <oberhamsi> not super sure, but the match in pathInfo is moved into scriptInfo ... so getAction() should check in scriptInfo or am i missing smth?
[12:30] <oberhamsi> hannesw, ^^
[12:39] <oberhamsi> well that broke more then it fixed
[13:14] <hannesw> oberhamsi not sure about that
[13:15] <hannesw> maybe it should be req.path
[13:15] <hannesw> (i.e. pathInfo + scriptName)
[13:15] <hannesw> any news on this from you?
[13:24] <oberhamsi> hannesw, i now think this was mistake on my side
[13:24] <hannesw> ok
[13:24] <hannesw> i changed a few details in req matching a few weeks ago
[13:24] <oberhamsi> i wrote a regex were the action name is part of a match
[13:24] <hannesw> so it might have been that
[13:25] <hannesw> and that didn't work?
[13:25] <oberhamsi> this is what i wanted: /[^/\.]+\.json/, ".actions.json"
[13:26] <hannesw> you have to write "./actions", "json" (as two array elements)
[13:27] <oberhamsi> ? the file is "actions.json.js"
[13:27] <hannesw> ah ok
[13:27] <oberhamsi> i wanted all actions ending with .json to be handled by actions.json ;)
[13:27] <hannesw> ok
[13:28] <oberhamsi> i thing you are right it must be a combination of scriptInfo and pathInfo
[13:28] <oberhamsi> if i only use pathInfo it fails if the action does *not* match like for plain "/"
[13:30] <hannesw> try req.path
[13:30] <oberhamsi> okay
[13:32] <oberhamsi> hannesw, that works for both cases! great
[13:34] <oberhamsi> though this changed is also needed: http://github.com/oberhamsi/ringojs/commit/1f4f48e06855
[13:41] <hannesw> oberhamsi what happens without that last commit?
[13:42] <hannesw> would the same be required in line 154?
[13:44] <oberhamsi> what does 173 check for? that the path is fully resolved?
[13:45] <oberhamsi> ah yes. comment above 154 explains
[13:49] <oberhamsi> sorry back in 1 hour
[17:51] <hannesw_> who wants to irc-meet today?
[17:51] <hannesw_> please leave a message if you do
[18:17] <oravecz> hannesw, is there interest in using maven as a future direction for building, packaging and distributing ringojs?
[18:26] <hannesw_> oravecz yes, we're interested in that
[18:26] <hannesw_> not interested as in "we know we want that"
[18:26] <hannesw_> but interested in the sense that we're curious as to what it would make easier and what not
[18:26] <oravecz> i see, I have that now in my project, so I would like to contribute it back
[18:26] <hannesw_> robi42 also has a maven branch i think
[18:27] <oravecz> but, the interaction with ringo becomes different if you go full maven.
[18:27] <hannesw_> and i have an apache-ivy branch
[18:27] <oravecz> i.e. mvn clean jetty:run is much different than bin/ringo
[18:28] <oravecz> I don't think they can coexist
[18:28] <hannesw_> i don't think we want that
[18:28] <earl> neither do I
[18:28] <hannesw_> i personally prefer plain command interaction
[18:29] <oravecz> sure, but how do you figure to have both?
[18:29] <earl> we don't
[18:29] <earl> that's where people familiar with maven enter the picture :)
[18:30] <earl> as hannes said, we don't intend to switch ringo to maven
[18:30] <earl> but we'd be happy to make using ringo with maven-based setups easy
[18:30] <oravecz> maybe i misread earlier when i asked whether maven is a future direction?
[18:31] <hannesw_> well i am interested in what maven would give us
[18:31] <earl> if it makes things easier for us: yes
[18:31] <hannesw_> but not as something that changes how ringo works
[18:33] <oravecz> I don't think you can have both
[18:34] <oravecz> Maven of course expects things to be in certain places (changing that is a pain and will work against you in the long run)
[18:34] <hannesw_> then ant and possibly ivy is probably the right tool for us
[18:35] <oravecz> It's the same thing. Things like the Jetty, log4j, jline, junit libraries are not part of your project space, but part of a local repository.
[18:35] <oravecz> Linked in using dependencies.
[18:38] <earl> let me rephrase this a bit: we'll never impose maven on our users
[18:39] <earl> the ringo cli binary and ringo.jar (along with the ringo js lib) are our primary output
[18:39] <earl> it's not an option to drop those
[18:39] <oravecz> Trust me, I'm not suggesting you do that.
[18:39] <oravecz> It is what makes ringojs approachable.
[18:40] <oravecz> Please take this in the best possible way, but as it stands, RingoJS is not functional as a production environment. It is suited for small, local build environments. :)
[18:41] <earl> that's an issue of deployment
[18:41] <oravecz> Sure, you can create a standalone war file, but you can't layer in Spring easily, or add servlet filters, or write portlets, etc.
[18:41] <oravecz> earl, not true
[18:41] <earl> and that's an issue of the environment you want to deploy to
[18:41] <oravecz> no it isn't
[18:42] <earl> you are obviously coming from a strong JEE background
[18:42] <earl> that's not the only runtime and deployment option there is :)
[18:42] <earl> but i take your point
[18:42] <oravecz> Sure, but we will be using ringojs in an EC2 deployment involving dozens of VMs.
[18:43] <earl> you want a nicer JEE integration
[18:43] <oravecz> I want access to the full JEE ecosystem because I am developing a large, community based website.
[18:43] <oravecz> Interestingly, the lack of a true production environment has nothing to do with the codebase itself.
[18:44] <oravecz> Maven works for us because we use things like continuous integration servers, QA deployments, integration tests and release builds. And we get this by using Maven as our build environment instead of CLI.
[18:48] <oravecz> I point our maven build at the stock ringojs codebase and it breaks ringojs (and the commonjs packages that may be installed) into three separate components; modules, packages and lib..
[18:50] <earl> well, it seems your primary need would be sthg like a public ringo maven repository containing ringo.jar and ringo stdlib nicely packaged as maven artifacts
[18:51] <hannesw_> ringo.jar would do because modules is bundled with ringo.jar
[18:51] <hannesw_> modules directory
[18:51] <earl> indeed
[18:51] <oravecz> we do that now in our local company repository
[18:53] <oravecz> I'm not sure it works well because ringojs has to know about base directories from which to load modules.
[18:54] <oravecz> So, we include the latest ringojs in our project and break it apart with an ant task embedded in our maven pom.xml
[18:54] <hannesw_> oravecz: you mean bundled system modules or your own application specific modules?
[18:54] <oravecz> things like mongodb and some narwhal modules
[18:55] <hannesw_> you could set them up via java system property
[18:55] <hannesw_> ringo.modulepath i think or something similar
[18:55] <oravecz> They all have to make it into the WAR at deployment time.
[18:57] <hannesw_> would maven make that easier for you?
[18:57] <hannesw_> i guess i'd just write an apache ant war task
[18:57] <oravecz> Well, we are obviously using Maven and Ringo now with no trouble...
[18:58] <oravecz> mvn package generates our complete war file (with Spring, Spring Security for auth, bootstraps database, etc...)
[18:59] <oravecz> I was asking my original question because I signed up to help on an outstanding Maven task from the issue log, but I wanted to know what that meant.
[19:00] <earl> well, as said before: you tell us :)
[19:01] <hannesw_> well robi42 has done a maven branch, so i think his perspective would also be interesting
[19:01] <oravecz> My suggestionI is we show on the wiki, how ringojs can be incorporated into a maven build script.
[19:02] <oravecz> I don't see much benefit from turning ringojs into a maven dependency unless you guys were going to go all the way.
[19:02] <oravecz> Which has its pros and cons
[19:02] <hannesw_> +1 sounds like a good plan
[19:03] <robi42> well, the maven branch was more or less just an experiment on how far our current build could alternatively be done by maven as well.
[19:03] <robi42> and as it turns out ant (+ ivy) is the way to go here. :)
[19:04] <earl> and afaiu, ivy would allow us to upload ringo.jar to a maven-compatible repo, no?
[19:04] <robi42> yes
[19:04] <robi42> we just need to set that up, basically
[19:04] <oravecz> my question is what gets put in the repository?
[19:05] <robi42> related info's attached to the issue on github
[19:05] <oravecz> ringo.jar of course, but what else?
[19:05] <earl> what needs to be put in that repository?
[19:05] <oravecz> http://github.com/ringo/ringojs/issues#issue/15
[19:05] <robi42> resp. http://github.com/ringo/ringojs/issues#issue/31
[19:06] <oravecz> earl, that is my question. I don't think it works.
[19:06] <earl> what is "it"?
[19:07] <hannesw_> maybe i need to tweak bootstrapping a bit, but generally it should work
[19:07] <oravecz> well, ringo.jar isn't the full picture. You need the js files, and more importantly a concept of base directories to load these js files.
[19:07] <earl> well, as hannes said, ringo stdlib is already in ringo.jar
[19:08] <hannesw_> you currently need to set RINGO_HOME to the jar file to loat module from there
[19:08] <earl> ok
[19:08] <hannesw_> but i can make that bootstrapping process smarter
[19:08] <earl> but that's another issue of deployment :)
[19:08] <earl> i guess you are running your app using the ringo servlet?
[19:08] <earl> (q was for oravecz)
[19:08] <oravecz> java is a bit easier in the sense that it has a classpath that is defined by the deployment unit (ear or war)
[19:09] <oravecz> earl, yes
[19:10] <earl> and afair, the servlet takes a ringo-home parameter
[19:10] <earl> (as well as a module-path, etc)
[19:11] <oravecz> here is ours: http://gist.github.com/438150
[19:12] <oravecz> Everything is resolved relative to ringo-home
[19:13] <oravecz> here is the task in maven that blows the standard ringojs structure out into the maven structure: http://gist.github.com/438147
[19:14] <oravecz> the jetty and junit dependencies are included in maven using the standard maven dependency format
[19:18] <oravecz> so what needs to happen in order to tell ringojs to load js files from ringo.jar in a servlet deployment?
[19:20] <oravecz> maybe if ringojs loaded all of its js files from the Java classpath instead of relative to <ringo-home>/<module-path>?
[19:20] <oravecz> gotta run into a mtg...thanks for the feedback
[19:21] <hannesw_> yes, classpath would be possible, too
[19:21] <hannesw_> currently you have to set ringo.home to lib/ringo.jar
[19:25] <oravecz> ahh, cool
[19:25] <earl> and add the path to your webapp to module-path (i assume)
[19:25] <oravecz> so, those should be available from the classpath now
[19:26] <oravecz> i think all the module-paths are resolved relative to ringo-home
[19:27] <oravecz> what's cool about using classpath is the ability to drop a mongodb war file (the narwhal version for example) and the js files could be automatically available thru the classpath.
[19:28] <oravecz> same for the path to "my app" js files. I would put them in maven's "resource" folder can these are copied to the classpath automatically. (Supported my the jetty maven plugin as well)
[19:28] <oravecz> but i don't know if there are problems using classpath either, doesn't seem very commonjs.
[19:32] <hannesw_> oravecz, yes, i'll consider the classpath idea
[19:33] <hannesw_> i don't think there should be any problems
[19:33] <oravecz> so that would not only be bootstrapping, but also module loading, correct?
[19:34] <oravecz> require()
[19:34] <hannesw_> yes
[19:40] <oravecz> any thoughts regarding adding the promise api to the httpclient stuff?
[19:41] <oravecz> we have a need to be able to launch several async server-side rest calls and proceed only once all responses return
[19:41] <oravecz> I've looked at the ringojs promise code, but don't understand how I might make it play nice with httpclient.
[19:42] <hannesw_> oravecz interesting problem, i'll try to work that out
[19:44] <oravecz> thx :)
[19:47] <oravecz> i'm implementing a RingoJSPortlet class that should allow users to write Java Portlets in ringojs.
[19:48] <oravecz> I am weak in my understanding of how to bridge from Java to JS, but I am using JsgiServlet as a basis.
[19:49] <oravecz> Can someone explain what the requestProto param is used for in JsgiServlet?
[19:49] <hannesw_> it's the prototype of the request object
[19:50] <hannesw_> it's not something you'd typically want to do... the jsgi request object handling is not very nice actually
[19:51] <oravecz> i didn't see it used in the code anywhere...
[20:47] <ringostarr> 7124d8c Hannes Walln?fer: Fix this-object in httpclient convenience functions.
