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

2010-05-18:

[7:32] <hannesw> http://github.com/hns/ride
[7:32] <hannesw> anybody wants to try it out?
[7:37] <hannesw> (must be installed via git clone because git-submodule won't work when installed via ringo-admin)
[7:51] <ringostarr> 59266c8 Hannes Walln?fer: Use ',' as platform agnostic path separator.
[8:06] <oberhamsi> okay, ringo head works for my apps/stuff.. didn't pull last couple o days
[8:08] * oberhamsi didn't know about config.js: extensions
[8:09] <oberhamsi> ride works for me, good stuff http://stats.nekapuzer.at/_ride_/
[8:10] <emilis_info> Can I change locations for ringo/app/config.js, ringo/app/config/ and ringo/lib/ ? I am trying to bundle my app with some other Java code that would run in a different VM (Solr) and currently have 2 copies of jetty and configuration in 4 places...
[8:11] <oberhamsi> needs a "save" button :)
[8:15] <oberhamsi> ah.. save is CTRL-S ...
[8:24] <hannesw> oberhamsi: really? ctrl-s? didn't know about that, it saves when you click on "preview" though
[8:25] <oberhamsi> oh.. ctrl-s works too
[8:25] <hannesw> well the interface is very preliminary
[8:25] <hannesw> emilis_info: how exactly do you want your setup to look?
[8:27] <hannesw> oberhamsi: stats pages seem to be broken
[8:28] <hannesw> and you shouldn't keep /_ride_/ open to anyone, but you probably know that :)
[8:29] <emilis_info> hannesw, /config, /lib, /ringo, /myapp, /solr. /config would have all configs in it. /ringo would be stripped off its "lib" dir and probably "run.jar"
[8:30] <emilis_info> also /bin, but that would involve only my scripts
[8:31] <hannesw> well ringo does not currently have the notion of a config directory
[8:31] <hannesw> it just searches for things like "config/log4j.properties" in the module search path
[8:31] <emilis_info> I want to move app/config.js and app/config/ out of the app dir
[8:32] <emilis_info> hmm
[8:32] <oberhamsi> hannesw, stats works but your not allowed to click through
[8:32] <hannesw> where do you want app/config.js?
[8:32] <emilis_info> So I would just have to add /config/app/ to module search path?
[8:33] <hannesw> oberhamsi: there just is no reply, request seems to time out
[8:33] <oberhamsi> hannesw, in chrome you get auth.. something broken with the way i do auth through proxy
[8:36] <emilis_info> hannesw, what about moving lib out of ringo? Is it hardcoded, can I configure it in config.js, or should I use some command line parameter?
[8:37] <hannesw> no, it's not hardcoded.
[8:38] <hannesw> also, modules is bundled in ringo.jar, so ringo.jar is the only thing you need
[8:38] <emilis_info> uh
[8:38] <emilis_info> cool
[8:38] <emilis_info> :)
[8:38] <hannesw> you just need to set RINGO_HOME to the ringoj.jar file i think
[8:38] <emilis_info> didn't know that
[8:38] <hannesw> don't know if that still works, it's not well tested
[8:38] <emilis_info> ok, but what about ringo/lib?
[8:39] <emilis_info> how should I configure it?
[8:40] <hannesw> emilis_info: how do you set up your ringo engine?
[8:40] <hannesw> do you have a new RingoConfiguration(...) somwhere?
[8:40] <emilis_info> nope
[8:41] <emilis_info> I just run ringo/bin/ringo myapp/main.js
[8:42] <emilis_info> my myapp/config.js is a config from demoapp with my stuff added in
[8:43] <hannesw> well if you use use bin/ringo you'll need the whole installation
[8:45] <emilis_info> I can rewrite the script
[8:45] <emilis_info> Xbootclasspath param... isn't it?
[8:47] <hannesw> emilis_info: try this:
[8:47] <hannesw> ringo -D ringo.home=lib/ringo.jar
[8:48] <hannesw> and suddenly you don't need modules/*.
[8:49] <emilis_info> :)
[8:51] <emilis_info> worked
[8:51] <emilis_info> but how do i move /ringo/lib to /lib?
[8:51] <emilis_info> :)
[8:55] <hannesw> emilis_info why is that a problem?
[8:55] <hannesw> simply set the classpath etc
[8:56] <hannesw> if you're still using ringo Main class you can set ringo.classpath system property
[8:56] <hannesw> using things like lib/* or lib/**
[8:57] <hannesw> ringo -D ringo.classpath=lib/**
[8:58] <emilis_info> uh ok
[8:58] <emilis_info> where are those -D options documented?
[8:58] <emilis_info> btw, just found ringo.classpath in Main.java source code ;-)
[8:59] <hannesw> you can document them if you like
[9:00] <emilis_info> hmm
[9:00] <emilis_info> -D ringo.classpath="lib/**" didn't work
[9:01] <emilis_info> still searching for ringo/lib/
[9:04] <emilis_info> ringojs.pastebin.com currently does not work
[9:08] <hannesw> ah, ok. problem is that java property is set only after classpath is set up
[9:10] <emilis_info> so, it's a bug?
[9:10] <hannesw> no, it's just a problem with the ringo -D option being evaluated after classpath setup
[9:11] <emilis_info> hmm
[9:11] <hannesw> you can use java -D directly
[9:12] <emilis_info> where should I use -D -- before or after -jar?
[9:15] <hannesw> before
[9:15] <hannesw> and no space:
[9:15] <hannesw> -Dringo.classpath=lib/**
[9:17] <emilis_info> heh, found it
[9:17] <emilis_info> the classpath is relative to the run.jar
[9:17] <emilis_info> so that should be "./**" and not "lib/**"
[9:19] <hannesw> why? do you use run.jar, and is it in the lib directory?
[9:19] <hannesw> using run.jar makes little sense if you want to use your own layout
[9:21] <emilis_info> hmm ok
[9:21] <emilis_info> how should I start my webapp without run.jar then?
[9:21] <emilis_info> the options currently work for me: java -Dringo.classpath="./**" -jar lib/run.jar -D ringo.home=lib/ringo.jar -i
[9:22] <hannesw> if it works for you: fine
[9:22] <hannesw> it just doesn't make a lot of sense imo
[9:22] <hannesw> if you're still using bin/ringo you might as well use ringo's default directory layout
[9:22] <emilis_info> what would make sense iyo? :)
[9:23] <emilis_info> I am using java, not bin/ringo ?
[9:23] <hannesw> either use ringo with its normal directory layout, or use ringo.jar as a library within another app
[9:25] <hannesw> anything in between i don't see the point
[9:25] <emilis_info> hmm ok
[9:25] <emilis_info> so how do I get Shell working without run.jar?
[9:30] <hannesw> require("ringo/shell").start()
[9:30] <hannesw> or via Java API
[9:31] <emilis_info> ok, but what jar do I use in java -jar ?
[9:33] <robi42> oberhamsi, your site stats app looks great (maybe i can drop google analytics for personal use) :)
[9:35] <hannesw> java -classpath <jarfiles> org.ringojs.tools.launcher.Main
[9:36] <robi42> (oberhamsi: just, unprotected ride on it could be a bit "tempting" ;) )
[9:37] <robi42> ride's awesome, btw
[9:39] <oberhamsi> hehe i disabled ride's save immediatly
[9:39] <robi42> :)
[9:40] <robi42> how's site stats performing?
[9:40] <oberhamsi> robi42, performance is terrible if you have > 10.000 hits / day
[9:40] <robi42> got some rather serious cron computation going on there, right?
[9:40] <oberhamsi> it works for small personal sites and with upcoming enhancements in berkeleydb it gets superfast
[9:40] <robi42> great
[9:41] <robi42> will definitely give it a try
[9:41] <emilis_info> hannesw, org.ringojs.tools.launcher.Main is one of the two classes included in run.jar . It seems that java -classpath ... format is just longer. Am I wrong?
[9:41] <oberhamsi> great :)
[9:41] <hannesw> emilis_info it's also in ringo.jar
[9:41] <emilis_info> hannesw, true
[9:42] <hannesw> the -classpath will be incredibly long. this is why we have run.jar
[9:42] <hannesw> so if run.jar works for you in your setup just use it anyway you like
[9:42] <emilis_info> hannesw, thank you for the clarification
[9:43] <hannesw> and let me know if you want it to do something it doesn't
[9:43] <emilis_info> I will :)
[9:49] <hannesw> robi42 glad you like it!
[9:49] <hannesw> (ride)
[9:50] <robi42> interface could be further slickened, tho :)
[9:50] <robi42> e.g. current line highlighting etc.
[9:51] <robi42> will have a closer look on that (given time permits)
[9:52] <robi42> (at that*)
[10:12] <hannesw> oberhamsi you there?
[10:15] <oberhamsi> hannesw, yes
[10:53] <robi42> fyi: added ssl/tls encryption support to ringo-mail
[11:17] <robi42> (that is, basically, only multipart, html messages and attachments support left to go :) )
[13:36] <hannesw> so, should we release today?
[13:36] <robi42> +++1 :)
[13:37] <hannesw> any last minute bugs we might want to fix?
[13:37] <robi42> didn't find any
[13:37] <hannesw> I'm trying to get a diff view of current trunk to v0.4.1 on github, anybody knows how to do that?
[13:38] <earl> http://github.com/ringo/ringojs/compare/v0.4.1...master
[13:40] <hannesw> thanks (figured it out myself)
[13:40] <earl> (or `git log v0.4.1..`, locally)
[13:40] <robi42> quite something in there...
[13:40] <earl> 322 commits, ey :)
[13:40] <hannesw> bbl
[14:47] <hannesw> I'm really unhappy with the .jar files in our repo...
[14:48] <hannesw> i found a very minor bug in rhino
[14:48] <hannesw> http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=&branchtype=match&dir=&file=mozilla%2Fjs%2Frhino%2F&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2009-01-01&maxdate=&cvsroot=%2Fcvsroot
[14:48] <hannesw> which causes markup to break on ringojs.org
[14:48] <hannesw> for that we'd have to update lib/js.jar, which is ~ 1 mb
[14:49] <robi42> time to switch to using apache ivy for real?
[14:53] <hannesw> maybe
[14:53] <hannesw> otoh, ivy will not work well with packages, e.g. when you need the same version of jetty in ringo and some package
[14:55] <robi42> hm, actually one could also define jar deps in packages via ivy, right?
[14:58] <hannesw> so how do you resolve a dependency if ringo core has a different version?
[15:00] <robi42> maybe a possible solution would be to let the package fetch the versions it requires and use them separately?
[15:00] <hannesw> ?
[15:01] <robi42> example: ringo core requires jetty 7.0.2, foo package requires 7.1.0 -> package fetches all its dependent jars and uses them separately from the ones ringo core uses
[15:02] <robi42> just a thought
[15:02] <robi42> not sure it would work anyhow :)
[15:02] <earl> why do you worry about the jar files?
[15:03] <hannesw> i worry about repository size.
[15:04] <hannesw> cloning ringojs is 35 mb and counting
[15:04] <hannesw> robi42 the whole jetty 7.1 jarmada is useless if core is using 7.0
[15:04] <earl> doesn't worry _me_ much
[15:06] <earl> obviously, any ringo packages are unaffected by this
[15:07] <robi42> well, if it's mainly about core repo size using ivy should suffice, shouldn't it?
[15:07] <earl> a current clone of ringo/ringojs is 12mb for me
[15:08] <earl> whereas a shallow clone w/ depth 1 has 4.6mb
[15:08] <earl> sounds not too troubling
[15:09] <robi42> those additional ~7mb actually don't worry me much as well
[15:09] <hannesw> 12mb? for me it's 39mb
[15:10] <earl> $ git clone git://github.com/ringo/ringojs.git
[15:10] <earl> Receiving objects: 100% (11611/11611), 12.06 MiB | 316 KiB/s, done.
[15:10] <hannesw> so should i just commit a new rhino jar file to fix that bug?
[15:10] <earl> please, go ahead and do so
[15:11] <robi42> +1
[15:14] <robi42> btw, fresh clone: `$ du -hs ringojs/` -> `18M`
[15:15] <hannesw> ah, ok, i also cloned some branches.
[15:16] <earl> your hns/ringojs will be slightly bigger, yes :)
[15:17] <hannesw> well that's even bigger, ~ 150 mb
[15:18] <earl> fresh clone of hns/ringo is also only about 13mb for me
[15:19] <earl> in any case, if ivy or sthg similar would work for us, i'm all for it :)
[15:20] <earl> i just don't think that it's a pressing concern at the moment
[15:21] <robi42> full ack :)
[15:28] <hannesw> ok, pushing new rhino snapshot
[15:28] <ringostarr> c9bde73 Hannes Walln?fer: Update rhino jar to CVS snapshot from 2010-05-18, fixing a JavaAdapter bug.
[15:29] <hannesw> I'm afk for a while, talk to you later
[16:47] <hannesw> two tests failing on ringojs.org, but they're passing locally
[16:47] <hannesw> http://ringojs.org/demo/testing
[16:47] <hannesw> any idea why?
[16:48] <hannesw> hm, they're passing the first time, then failing
[17:00] <earl> hannesw: the ringo/ringojs clone size increased by 30KiB due to your js.jar commit
[17:01] <earl> 12.09MB now vs 12.06MB previously
[17:01] <earl> just to ease any remaining worries :)
[17:01] <olegp> hey guys, new version of akshell with commonjs support is out: http://groups.google.com/group/commonjs/browse_thread/thread/c9118b8d34c5a7be
[17:02] <olegp> hannesw did you get a chance to check it out?
[17:13] <robi42> hm, that's odd; is --production switch enabled on ringojs.org, btw?
[17:13] <earl> well, the test error seems to come from the hardcoded assumption that the person will get id 1
[17:13] <robi42> oops, yes. :)
[17:13] <earl> if i replace `Person.get(1)` w/ `Person.get(person._id)` then the tests work again
[17:13] <robi42> sorry for that
[17:14] <earl> np
[17:14] <earl> i think this is uncovered by the now-default shared modules
[17:14] <robi42> think so too
[17:16] <earl> i'll push a fix
[17:16] <robi42> thanks
[17:20] <ringostarr> 62d03b1 Andreas Bolka: Fix magic numbers in memstore/filestore tests
[17:21] <robi42> "magic numbers" :)
[17:22] <earl> well :)(
[17:26] <earl> no pulitzer price for my commit messages, i guess :)
[17:26] <robi42> well, as long as it's somewhat clear what the commit is supposed to do :)
[17:33] <earl> it obviously fixes something! :)
[17:44] <robi42> in fact! :)
[19:53] <robi42> hannesw, earl: out of curiosity ran http://javascriptlint.com/ on ringo's modules; here's an according patch: http://gist.github.com/405459
[19:55] <hannesw> not sure about these === undefined
[19:55] <hannesw> maybe == null is what we actually want?
[19:56] <hannesw> == null is true for null and undefined
[19:57] <robi42> yep, probably == null is what we actually want there
[19:57] <robi42> also not sure about http://gist.github.com/405459#LID123
[19:59] <robi42> so, all in all, according to that tool code's looking pretty fine so far :)
[20:00] <robi42> actually mainly only a few missing semicolons
[20:02] <hannesw> yes.