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

2010-05-12:

[7:39] <hannesw> looking for a name for the in-browser ringo editor
[7:40] <hannesw> considering about "ride" (ringo ide)
[7:45] <hannesw> should i put the repo on the ringo github account or my own personal one?
[8:27] <ringostarr> c1c60cb Hannes Walln?fer: Implement Stream.skip(), Stream.closed(), and TextStream.raw as defined in CommonJS IO/A proposal
[8:42] <hannesw> oberhamsi ringo tutorial looks great!
[8:42] <hannesw> should be linked from home page and "getting started"
[8:42] <oberhamsi> hannesw, thx!
[8:42] <oberhamsi> if you think so.. i'll keep working on it
[8:43] <hannesw> i think home page could use some cleanup and reorg anyways
[13:25] <oravecz> are there any docs or scripts to package my app up for deployment to external Java web servers?
[13:27] <hannesw> oravecz you mean packaging for a servlet container?
[13:28] <hannesw> we now have ringo-admin create -a which creates something you can deploy on google app engine, which happens to use servlet web apps
[13:28] <hannesw> and olegp has been working on a script that creates a .war file from an app
[13:28] <hannesw> http://ringojs.pastebin.com/WgtXUuLV
[13:35] <oravecz> cool, thx I will look into it
[13:36] <oravecz> when i install a package it puts it in ringojs/packages. How will this play when I have multiple apps using different versions of a package?
[13:37] <oravecz> Any thoughts of installing packages in the application directory instead of the ringo directory?
[14:12] <hannesw_> oravecz: that's supported for google app engine and servlet-packaged apps
[14:12] <hannesw_> for ringo standalone apps, you only have the main packages dir, i.e. a single version of each package
[14:13] <hannesw_> something we need to fix/work on
[14:14] <earl> preferrably with something virtualenv-like
[14:14] <hannesw> +1
[14:15] <earl> hm, that will be a fun post-0.5 project :)
[14:16] <earl> tusk/narwhal also does something similar, no?
[14:16] <earl> called "sea", iirc?
[14:21] <hannesw> yes
[14:22] <hannesw> might be interesting for you earl (knowing you know a lot about these things :)
[14:25] <oravecz> -1 sea, the whole use of sea to set up paths is horrible IMHO
[14:26] <hannesw> yes, i'd also like to have something simple, with less shell scripting magic
[14:27] <oravecz> especially now that you have to use sea twice, a shell within a shell
[14:38] <earl> well, i think we should get by with only a small amount of shell scripting magic :)
[14:41] <oravecz> just curious what functionality is achieved by any dependency on SSM?
[14:41] <earl> environment variables
[14:42] <oravecz> so, it would be optional for those of us who can create environment variables without the use of a shell script?
[14:42] <earl> (programmatic maintenance of ...)
[14:43] <earl> the whole virtualenv stuff is strictly optional for those who don't want/need it
[14:43] <oravecz> I am mostly concerned of support for continuous integration testing of our application
[14:43] <oravecz> and build tooling
[14:46] <earl> well, just be sure to provide feedback once we get anything going :)
[14:46] <oravecz> I need to be able to execute an ant/maven build script from a clean environment to build, package, deploy and test our ringo apps on a Jetty server spawned from the maven script
[14:46] <oravecz> no prob with feedback :D
[14:47] <earl> and you are able to do that currently?
[14:47] <oravecz> I will be able to by the end of the week
[15:02] <earl> ok, great
[15:26] <ringostarr> b26db61 Hannes Walln?fer: Make watching of log4j config file optional in ringo/logging.setConfig because setInterval() is currently not cancelled when an engine is disposed.
[15:26] <ringostarr> 7bed72b Hannes Walln?fer: Remove unused method.
[15:26] <ringostarr> 5c49595 Hannes Walln?fer: Add -p/--production option to disable module reloading and warnings for missing vars
[15:38] <robi42> hannesw, performance increase of disabling module reloading via -p switch is noticeable?
[15:40] <hannesw> yes, especially for apps that do little more than module checking
[15:40] <hannesw> e.g. apps/jsgi
[15:40] <hannesw> +50%
[15:40] <robi42> great
[15:40] <hannesw> for demo app it's more like 10% i guess
[15:40] <robi42> but still
[15:40] <hannesw> too much other stuff going on, like skin reloading
[15:40] <hannesw> of course, you can optimize that too, then percentage will be higher
[15:41] <robi42> i see
[15:41] <robi42> last minute 0.5 commits, btw :)
[15:53] <robi42> hannesw, is there anything holding back today's release?
[16:02] <hannesw> robi42 nothing fundamental, just more work to do
[16:02] <hannesw> working on jsgi 0.3 now
[16:03] <robi42> ok, i see
[16:24] <olegp> one feature that would be nice would be some sort of an install script, which adds ringojs/bin to the PATH
[16:25] <olegp> oh and builds the jar, as well
[16:32] <earl> olegp: what os are you on?
[16:32] <earl> we have a debian package for that purpose
[16:35] <earl> but this reminds me that i wanted to get rid of the RINGO_BIN logic in ringo-admin
[16:43] <olegp> ubuntu, so the package would work for me I guess
[16:44] <olegp> but it would be nice if there was simply a command Id need to run after pulling from git
[16:45] <earl> symlink the binaries you need into /usr/local/bin
[16:46] <earl> then the command you need after pulling from git is `ant jar`
[16:46] <olegp> yeah, would be nice if there was one script that did it
[17:03] <ringostarr> 771bcb4 Andreas Bolka: Minor improvements to the Unix bin scripts
[17:38] <hannesw> earl: correct me if i'm wrong, but previously ringo-admin worked without ringo on the PATH
[17:38] <hannesw> now it doesn't. that's a step back, isn't it?
[17:41] <hannesw> i think the best would be to duplicate the logic of bin/ringo into ringo-admin and ringo-web
[17:45] <earl> yes, you are right
[17:45] <earl> i didn't consider that a step back, though
[17:46] <hannesw> why not?
[17:46] <earl> my fault :)
[17:46] <hannesw> np. do you think we should duplicate the whole of bin/ringo in the other scripts?
[17:47] <earl> nope, i don't like that thought
[17:47] <earl> i'm thinking of a more elegant solution :)
[17:47] <hannesw> ok :)
[17:47] <earl> besides that
[17:47] <earl> _does_ it matter that ringo-admin does not work w/o ringo on the path?
[17:48] <earl> i guess you are just using the binaries w/o any of them on the path
[17:48] <earl> so you start ringo as e.g. bin/ringo and use ringo-admin as bin/ringo-admin ?
[17:48] <hannesw> yes
[17:49] <hannesw> i think most people won't set the path when first trying
[17:49] <hannesw> i usually don't, if i can avoid it
[17:49] <hannesw> i actually think what we had before in ringo-admin was ok, wasn't it?
[17:52] <earl> yes, i'll just revert my change unless i can think of something nicer
[17:53] <earl> but i think i can, not sure if you approve of the added complexity though :)
[17:53] <earl> (i don't use the wrapper scripts at all, that's why i didn't think of this scenario in the first place)
[17:54] <earl> (i.e. i usually just do ringo ringo/admin/install instead of ringo-admin install)
[17:56] <olegp> btw, speaking of ringo-admin, have you guys looked at jake?
[17:56] <olegp> http://github.com/280north/jake
[17:57] <hannesw> yes, i've played around a bit with it
[17:57] <hannesw> except for narwhal still running on an old file module i think it's working well on ringo
[17:58] <olegp> a lot of the stuff ringo-admin does is build related, so shouldnt the tasks be converted to run via jake?
[17:58] <hannesw> possibly, yes
[17:59] <hannesw> i guess jake requires narwhal though, and that's quite a heavy dependecy
[17:59] <hannesw> dependency
[17:59] <olegp> right, didnt realize it did ..
[17:59] <hannesw> and narwhal-lib was not quite ready last time i checked
[17:59] <hannesw> but except for that, jake would be very tempting
[18:00] <olegp> maybe having the same interface in ringo admin for defining and setting dependencies of tasks would be a good starting point?
[18:01] <hannesw> that doesn't sound like a starting point, that sounds like we would reimplement jake :)
[18:01] <olegp> hehe
[18:01] <hannesw> but yeah, why not
[18:02] <hannesw> if you want to try that, it sounds like a great idea
[18:23] <ringostarr> 8206d7c Andreas Bolka: Streamline bin/ scripts further
[18:24] <earl> should make ringo-admin work as it previously did
[18:25] <earl> and beyond that, now even ringo-web works w/o ringo on the path :)
[18:56] <oberhamsi> should we add model.js to the app skeleton?
[18:57] <oberhamsi> i think it's a convention and we could just put a comment in there "here be models"
[18:58] <hannesw> earl - ahhhh tres smart
[18:59] <earl> thanks :)
[19:01] <earl> hope it makes things work smoothly
[19:06] <hannesw> it does!
[19:06] <hannesw> everything working smoothly on my simulated ringo-newbie shell
[19:07] <earl> :)
[19:08] <ringostarr> 0cf8d58 Andreas Bolka: Fix whitespace
[19:08] <ringostarr> e8ee626 Andreas Bolka: Also enable async JSGI for full "deferreds"
[19:09] <earl> any ideas for a simple async example to add to the demo app?
[19:10] <hannesw> argh.. earl, your jsgi changes are killing me
[19:11] <earl> merge-wise?
[19:11] <hannesw> i'm just about to push jsgi 0.3
[19:11] <hannesw> would you mind redoing your commits after i pushed 0.3?
[19:12] <earl> hm
[19:12] <earl> push your 0.3 stuff to hns/ringojs and i'll do the merge, if you like
[19:13] <hannesw> believe me, it's simpler the way i proposed
[19:13] <hannesw> there's no easy merging in ringo/jsgi, better redo
[19:13] <earl> ok, i'm fine with redoing those commits. just don't force-push to mainline ringo :)
[19:13] <hannesw> what else?
[19:15] <earl> would you mind pushing your changes to hns/ringojs?
[19:15] <earl> or are they already?
[19:15] <hannesw> no, the commits in hns/master are obsolete... i think
[19:16] <hannesw> but i'm not totally sure
[19:16] <earl> then push to a temporary branch to let me have a look :)
[19:20] <hannesw> ok, now pushed to hns/master
[19:22] <hannesw> believe me, don't try to rebase or stuff
[19:22] <hannesw> the lines of code you edited were changed in several commits, so you'll have to fix them multiple times
[19:22] <hannesw> better just redo
[19:23] <earl> pushed a merged version to earl/ringojs
[19:24] <hannesw> ok, looks good
[19:24] <earl> ok, shall i push it mainline?
[19:25] <earl> i'll leave jsgi alone, afterwards :)
[19:25] <hannesw> ok
[19:25] <earl> so if there's more jsgi stuff you want to do, you'll be able to proceed w/o hassles :)
[19:25] <hannesw> no, i think i'm done
[19:26] <ringostarr> 2552588 Hannes Walln?fer: Initial update to JSGI 0.3 (aka JSGI Level 0/A Draft 2)
[19:26] <ringostarr> b9d3c30 Hannes Walln?fer: Check against multiple invocation of Request()
[19:26] <ringostarr> 16ad265 Hannes Walln?fer: Update middleware to JSGI 0.3
[19:26] <ringostarr> 4b4d294 Hannes Walln?fer: Minor fixes for spec compliance
[19:26] <ringostarr> 6b044f5 Hannes Walln?fer: Make more things work with JSGI 0.3
[19:26] <ringostarr> 84f64a1 Hannes Walln?fer: Don't use Object.defineProperty without good reason
[19:26] <ringostarr> 0398e9f Andreas Bolka: Merge remote branch 'hns/master': JSGI 0.3 changes
[19:26] <earl> there you go :)
[19:27] <hannesw> thanks
[19:28] <hannesw> the problem was that i tried to do a rebase, as i usually do these days when master changes
[19:28] <earl> yes
[19:28] <hannesw> and that just didn't work
[19:28] <hannesw> so that's why i panicked (slightly)
[19:28] <earl> well, it leads to a lot of boring work
[19:29] <earl> in this case a merge is just the right thing :)
[19:29] <hannesw> yes, better just merge
[19:29] <earl> esp as it's now also easy to undo the jsgi 0.3 changes: just revert the merge commit
[19:29] <hannesw> right
[19:30] <hannesw> ok, so jsgi 0.3 is now merged.
[19:30] <hannesw> better take some time now to check everything's working
[19:30] <earl> do you happen to know if this also makes gmosx's "Request idempotency" issue obsolete?
[19:30] <hannesw> yes
[19:31] <hannesw> since we extend and don't wrap the jsgi request that is now obsolete
[19:31] <earl> WAH!
[19:32] <earl> reminder to self: do not use meld for merging :)
[19:32] <hannesw> what?
[19:32] <earl> at least not if you didn't tell it to not use tabs :)
[19:32] <earl> my merge introduced a bunch of tabs ...
[19:32] <hannesw> huhhh?
[19:32] <hannesw> where?
[19:33] <ringostarr> a5c05e2 Andreas Bolka: Fix hardtabs introduced by previous merge
[19:35] <earl> demo app seems to work fine
[19:36] <hannesw> well i tested with all apps i have at my disposal
[19:36] <earl> ok
[19:36] <hannesw> but e.g. auth middleware in robi's ringolog needs updating
[19:36] <robi42> yep, just checking :)
[19:36] <earl> and the hack i use for ringostarr will as well :)
[19:37] <hannesw> robi42 here's the diff: http://gist.github.com/399046
[19:37] <hannesw> ringostarr is a ringo web application?
[19:38] <robi42> thanks
[19:38] <earl> ringostarr uses a tiny jsgi app to handle commit notifications from github
[19:38] <hannesw> ah, cool
[19:45] <robi42> fyi, ringolog with patched auth middleware works fine on master.
[19:45] <robi42> hibernate branch, that is
[19:49] <hannesw> thanks robi42
[19:51] <hannesw> btw, auth middleware would be great to have in ringo!
[19:52] <hannesw> waddler, robi42 ping
[19:52] <robi42> agreed, we should simply pull that in that :)
[19:52] <robi42> -that*
[19:52] <hannesw> maybe rename it to basicauth, auth is very generic
[19:52] <robi42> yep
[19:53] <hannesw> ok i'm quitting for today
[19:53] <hannesw> cu!
[20:05] <ringostarr> 766b063 Robert Thurnher: Add HTTP basic auth JSGI middleware, originally contributed by Samuli Tuomola (a.k.a., stt/waddler)
[20:05] <ringostarr> a8455ba Robert Thurnher: Merge branch 'master' of github.com:ringo/ringojs
[20:06] <robi42> uh, something wrong with that merge, earl?
[20:21] <robi42> btw, log.robert42.com is running on current master (looking good so far) :)
[20:26] <earl> heh, looks good
[20:27] <robi42> thanks
[20:27] <earl> btw, you can update your promises examples to simply `return response;`
[20:27] <earl> the according patch is now in mainline
[20:27] <robi42> and it didn't crash (yet) :)
[20:27] <robi42> ah, great
[20:57] <bailey_> Is there an easy way to grab the request body with request.js? I dont see any properties or methods exposed here: http://ringojs.org/api/master/ringo/webapp/request Maybe I'm missing something...
[21:07] <robi42> bailey_, req.params doesn't work for you there?
[21:15] <bailey_> hmmm didn't look in there yet...
[21:32] <bailey_> what does the object that req.params look like?
[21:32] <bailey_> what does the object that req.params *returns look like?
[22:05] <olegp> Im looking at something similar myself at the moment
[22:06] <olegp> I have a string Id like to pass in as request body via a PUT
[22:06] <olegp> but when I pass it as the second param to put, I get: Error: two argument form must be (url, success) or (url, data)
[22:06] <olegp> even though the docs say the second param can be a string
[22:08] <bailey_> I just stringified what req.params returns and it printed as just " {} "
[22:09] <bailey_> (using a rest test client too btw)
[22:29] <olegp> ok, so the fix for that was to
[22:30] <olegp> 1) comment out the if check on line 374 in httpclient.js
[22:30] <olegp> 2) add || opts.method === 'PUT' to line 310
[22:35] <hannesw> bailey_, request is an extension of a JSGI 0.3 request:
[22:35] <hannesw> http://wiki.commonjs.org/wiki/JSGI/Level0/A/Draft2
[22:36] <hannesw> (as of a few hours ago - before it was jsgi 0.2, which has a bit more awkward naming)
[22:36] <hannesw> so you can get the unparsed request body with request.input.read()
[22:36] <hannesw> which should return a binary object (ByteArray or ByteString, not sure)
[22:37] <hannesw> so request.input.read().decodeToString("utf-8") if you think it's an UTF-8 encoded string
[22:39] <bailey_> thanks hannesw, I'm about to sign off but I'll give that a go when I return.
[22:48] <olegp> problem desc and fix here: http://ringojs.pastebin.com/wJn58TyX
[22:49] <hannesw> thanks olegp
[22:50] <robi42> ah, just discovered there's a little typo in `httpclient#put`
[22:51] <robi42> on line 487
[22:51] <robi42> sucess instead of success
[22:51] <hannesw> robi42 i can fix that too
[22:51] <robi42> 478*
[22:51] <hannesw> while i'm at it
[22:52] <robi42> same type for `del`
[22:52] <robi42> typo* :)
[22:55] <hannesw> hm, that code at line 478 looks fishy to me
[22:55] <hannesw> for one, the arguments (which are local vars) are redeclared
[22:56] <robi42> (oh btw, same for `get` and `post`)
[23:00] <ringostarr> 8505b21 Hannes Walln?fer: Fixes from olegp to make PUT requests work and robi42 for typo in var names
[23:02] <hannesw> thanks everybody
[23:09] <ringostarr> 44954ee Hannes Walln?fer: Add some documentation
[23:15] <robi42> hannesw, jsgi.js line 82
[23:16] <hannesw> oops
[23:16] <robi42> there's still `env` references (-> `req`)
[23:16] <robi42> referenced* *sigh* :)
[23:22] <ringostarr> d35058c Hannes Walln?fer: Fix async response handling
[23:22] <hannesw> fixed. thanks robi42
[23:22] <robi42> great, np
[23:30] <ringostarr> 9dd8d74 Hannes Walln?fer: Fix bug in jsdoc class detection.
[23:30] <ringostarr> c1eb5ce Hannes Walln?fer: Add some documentation
[23:35] <ringostarr> 69fe296 Hannes Walln?fer: Add link to fs-base
[23:39] <earl> crap, thanks for fixing async in d35058c
[23:39] <earl> should've been a tad more careful in that merge ... :/