Mochabot log - CommonJS IRC channel: #commonjs on irc.freenode.net

2010-04-02:

[7:39] <Dantman> ^_^ CSS3's flexible box model works beautifully for creating interfaces in applications.
[7:39] * Dantman wonders if Chrome's ui is built using html.
[8:50] <Dantman> T_T That part of the spec needs a disclaimer "Warning: Can cause mixed tears of joy and regret, thoughts of discarding browser compatibility on the web, and mild insomnia."
[9:46] <kuya> ashb: you aroung?
[9:46] <kuya> um.. *around
[9:47] <ashb> yeah
[9:47] <ashb> whats up?
[9:47] * kuya trying to build flussperfd
[9:47] <kuya> do i need all boost libs or just some?
[9:47] <kuya> (using ubuntu here)
[9:48] <ashb> you want to compile from source?
[9:48] <ashb> if not there's an ubuntu .deb you can use
[9:48] <kuya> is it kept up to date?
[9:48] <ashb> its for last release
[9:48] <kuya> which do you recommend?
[9:48] <ashb> https://launchpad.net/~commonjs/+archive/ppa/
[9:49] <ashb> i'd go with that
[9:49] <kuya> ok
[9:49] <ashb> its what i use for live sites at any rate
[9:53] <kuya> +1 to fluss for easiest install :]
[9:53] <ashb> yeah - thats kinda one of my driving factors
[9:54] <kuya> cant you make packages for juice? the linux instructions on that page are not so good ;)
[9:54] <ashb> yeah should do
[9:54] <ashb> infact need to do a new release
[9:54] <kuya> what about zest? hows best to installl that?
[9:55] <ashb> for me to give you the file probably right now >_<
[9:55] <kuya> :]
[9:55] <ashb> 64bit?
[9:55] <kuya> no
[9:55] * kuya stuck in 2000
[9:55] <ashb> i dont know why linux doesn't have fat binaries/libs yet
[9:57] <ashb> zest isn't that hard to compile actually
[9:57] <ashb> libflusspferd-dev should pull in everything you need
[9:57] <kuya> ok ill try
[9:58] <ashb> http://github.com/ashb/Zest/
[9:58] <ashb> yeah instructions there
[9:58] <ashb> once you've got libflusspferd-dev i think that should do it all
[10:00] <kuya> doh!
[10:00] <ashb> >
[10:01] <ashb> ? even
[10:01] <kuya> http://pastebin.com/KnDBJNBA
[10:02] <ashb> hmmmm. what version of boost.*dev did it pull in?
[10:02] <kuya> Get: 1 http://gb.archive.ubuntu.com karmic/universe libboost-system1.40.0 1.40.0-2ubuntu2 [30.2kB]
[10:02] <kuya> Get: 2 http://ppa.launchpad.net karmic/main libmozjs-1.9.2 1.9.2-2 [638kB]
[10:02] <kuya> Get: 3 http://gb.archive.ubuntu.com karmic/universe libboost-filesystem1.40.0 1.40.0-2ubuntu2 [50.1kB]
[10:02] <kuya> Get: 4 http://gb.archive.ubuntu.com karmic/universe libboost-iostreams1.40.0 1.40.0-2ubuntu2 [40.0kB]
[10:03] <kuya> Get: 5 http://gb.archive.ubuntu.com karmic/universe libboost-thread1.40.0 1.40.0-2ubuntu2 [52.5kB]
[10:03] <ashb> hrmmm
[10:03] <kuya> is the boost stuff fluss got
[10:03] <ashb> that looks about right
[10:03] <kuya> its possible i have older -dev or something ...
[10:03] * kuya not sure if that is possible actually
[10:03] <ashb> might be. not sure if they conflict
[10:06] <ashb> oh. its seems libflusspferd-dev doens't infact depend on boost dev package
[10:07] <Aristid> ashb: hmm i guess it should
[10:07] <ashb> yeah probably should
[10:07] * kuya installing libboost-1.40-dev-all
[10:07] <Aristid> kuya: yeah good idea :)
[10:07] <kuya> hi Aristid
[10:08] <kuya> you work on fluss too?
[10:08] <Aristid> hi kuya
[10:08] <Aristid> yeah, sure, tho recently i've been a bit lazy :)
[10:09] <kuya> :)
[10:10] <Aristid> bbl
[10:11] <kuya> looks like its got further this time...
[10:12] <kuya> success!
[10:12] <kuya> and the tests run
[10:12] <kuya> tho the timer one fails
[10:13] <kuya> ashb: any docs for using the sqlite module?
[10:13] <ashb> yeah the timer's thing is still slightly experimental
[10:14] <ashb> of course
[10:14] <ashb> http://flusspferd.org/docs/js/bundled%20modules/sqlite3.html
[10:14] <kuya> docs, packages,... whatever next?! :)
[10:14] <ashb> and the linked sqlite3.SQLite3
[10:14] <ashb> pie and bacon
[10:14] <kuya> :]
[10:14] <kuya> brilliant thanks
[10:20] <kuya> ooh there is subproc module too
[10:25] <ashb> yeah new in 0.9
[10:28] <Dantman> *sigh* Yup, e-mail sending is screwed up...
[10:29] <Dantman> I don't feel like bothering to fix this now... the wiki is going to move to a new server eventually.
[10:42] * kuya got mongodb compiled for fluss too :)
[10:44] <ashb> it might not run depending on just how you got your libmongoclient.a
[10:45] <ashb> its been particularly picky in the past
[10:47] <kuya> ashb: can i use jack middleware with fluss?
[10:47] <ashb> in theory
[10:47] <ashb> tho it might fall down if hte middleware expects JSGI 0.2
[10:48] <ashb> i went a head and implement 0.3 since it was looking like it was going to be ratified. turns out it still hasn't
[10:48] <ashb> but i think jack is moving towards it anyway
[10:48] <kuya> how, in theory, do i use it? just add the path to require.paths and require it?
[10:49] <ashb> what kind of middleware is it?
[10:49] <ashb> and how exactly do you want to use it?
[10:49] <kuya> there are all sorts of bits and bobs in here http://github.com/tlrobinson/jack/tree/master/lib/jack/
[10:50] <ashb> they aren't all middleware tho :)
[10:50] <ashb> and some of them will use narhwal's non-standard libs
[10:50] <kuya> well lets pick http://github.com/tlrobinson/jack/blob/master/lib/jack/cascade.js
[10:50] <ashb> yeah that one would work fine
[10:51] <kuya> so how would i use that?
[10:51] <Aristid> kuya: wouldn't most important things be in juice already?
[10:52] <kuya> hrm
[10:52] <ashb> juice doesn't do any sort of auth yet
[10:52] <kuya> i dont relly want to use juice i think
[10:52] <ashb> but at any rate, being able to use middleware is good
[10:52] <Aristid> kuya: you would use that by putting the directory in require.paths and do var Cascade = require('cascade').Cascade;
[10:53] <ashb> juice apps are exposed as a JSGI app
[10:53] <kuya> does require.paths get loaded from any env var btw?
[10:53] <ashb> no. patches welcome :)
[10:54] <kuya> hehe ok - as long as i dont have to write c/c++...
[10:54] <ashb> nope - can be JS
[10:54] <ashb> http://github.com/ruediger/flusspferd/blob/master/js/jsrepl.js.in
[10:55] <ashb> that (template file) is run as part of the bootup
[10:55] <ashb> well - technicaly the file referenced in prelude.js is
[10:55] <ashb> or is it the other way round
[10:55] <kuya> :)
[10:56] <ashb> other way roud. that jsrepl.js is hte config which specifies what the prelude file is :)
[10:59] <ashb> kuya: so you can look for FLUSSPFERD_LIB or similar in that file and split it on ':' (or ';' for windows)
[11:00] <Aristid> don't forget to also modify jsrepl_dev.js tho :)
[11:20] <kuya> meh, i see what you mean about jack being tied to narwhal now
[11:25] <ashb> some of that isn't quite so tiest due to the narwhal-lib split out
[11:25] <ashb> but some still is
[11:26] <ashb> part of the problem is we dont have a fully ratified FS interface
[11:27] <kuya> im getting 'Unable to load module 'file'' which seems to be part of the full narhwal when trying to use Static from jack
[11:28] <ashb> yeah
[11:28] <ashb> zest will do static file serving itself
[11:28] <ashb> X-SendFile header
[11:29] <kuya> can you explain that a bit more?
[11:29] <ashb> return { status: 200, headers: {"x-sendfile": "/path/to/file", "content-type": "override"}, body: [] }
[11:30] <ashb> content-type has a default list
[11:30] <ashb> (based on extension)
[11:30] <ashb> http://github.com/ashb/Zest/blob/master/src/http/mime_types.cpp
[11:30] <ashb> zest really needs some more docs :(
[11:30] <ashb> s/more//
[11:32] <kuya> ok thats handy
[11:34] <kuya> is there something in juice/zest to serve a directory of static files?
[11:34] <ashb> no
[11:34] <ashb> sorry
[11:35] <keeto> kuya: nice nick. :)
[11:36] <kuya> keeto: you understand it?
[11:36] <keeto> yes, big brother. :P
[11:36] <kuya> hehe nice
[11:37] <kuya> you from the philippines?
[11:39] <keeto> yep.
[11:40] <kuya> cool - i travelled around there for 3 months and the kids called me that :)
[11:40] <keeto> where to?
[11:41] <kuya> 1.5 months in tacloban, and then 1.5 months doing a clockwise circle round the islands :)
[11:41] <keeto> I'm guessing somewhere around manila or the north.
[11:41] <keeto> oh, tacloban? hah!
[11:41] <kuya> where are you?
[11:41] <keeto> manila
[11:42] <keeto> I'm a northern boy. :)
[11:42] <kuya> :)
[11:42] <kuya> we went right up to pagudpud in the north :)
[11:43] <keeto> oh god.. don't remind me.
[11:43] <keeto> I'm itching to get to the beach.
[11:43] <kuya> hehe
[11:43] <kuya> el nido was my favourite beach
[11:43] <keeto> my favorite is the one in front of our beach house. :D
[11:43] <kuya> :]
[11:43] <keeto> in vigan.
[11:43] <kuya> oh went there too ;)
[11:44] <keeto> i <3 vigan, but it's too far from the capital. -_-
[11:45] <kuya> :)
[11:55] * kuya gets annoyed nothing in jsgi world works together very well...
[11:55] <ashb> yeah.
[11:55] <ashb> problem is there isn't large enough coverage of CommonJS spec yet
[11:56] <ashb> simple things should work find
[11:56] <keeto> I'm working on something that works on all major implementations, but I'm not ready to release it yet until the docs are done.
[11:56] <keeto> by major implementations, I mean nodejs, v8cgi, flusspferd+zest, helma/ringo and narwhal.
[11:57] <ashb> cool
[11:57] <kuya> wow
[11:58] <keeto> oh, and it's "jsgi-compliant"
[11:58] <kuya> keeto: no repo i can have a sneak peek at? i dont care about docs
[11:58] <ashb> 0.3?
[11:58] <keeto> kinda--basically it's an implementation of something like jsgi-plus that could be used as a jsgi app. :)
[11:59] <keeto> so it's really an alternative to jsgi that could be implemented on top of jsgi.
[11:59] <ashb> ah
[11:59] <keeto> http://github.com/keeto/deck
[12:00] <ashb> http://github.com/keeto/deck/blob/master/Source/engines/flusspferd.js#L25
[12:00] <ashb> looks wrong ;)
[12:00] <keeto> lol. x)
[12:01] <keeto> sorry about that--gonna fix in the next minor. :D
[12:01] <keeto> thanks for the headsup.
[12:01] <ashb> obv faily minor
[12:02] <ashb> latest version of zest does have a setTimeout, but its probably not very useful without more async in the rest of stuff
[12:02] <keeto> yeah, I was playing with it remember? :D
[12:02] <ashb> oh yeah :D
[12:03] <keeto> this is why I was playing with it. :D
[12:03] <ashb> eventually i'll get round to adding more async-ness
[12:03] <keeto> basically, I'm removing the need for explicit chaining of functions like in jsgi.
[12:03] <keeto> instead, deck manages the queue internally.
[12:05] <keeto> I, along with the mootools devs, are excited for commonjs.
[12:05] <keeto> but there's just so many issues regarding how "common" commonjs is now that it's a bit hard to do anything substantial.
[12:06] <ashb> yeah
[12:06] <ashb> we need file and sockets
[12:07] <keeto> we want mootools to be a part of the commonjs efforts.
[12:07] <keeto> the current version already works with most implementations
[12:07] <keeto> and there's work underway to make it fully compatible with the module specs.
[12:07] * kuya suddenly had a crazy idea to write a commonjs compatible engine on top of python :]
[12:07] <ashb> kuya: heh.
[12:08] <kuya> i come from wsgi land :)
[12:08] <keeto> kuya: not so crazy--I'm writing our commonjs package manager in c. :P
[12:08] <ashb> we messed about with using boost::python module
[12:08] <kuya> boost python is ok - its not the nicest wrapper generator
[12:08] <keeto> essentially, deck is the first in a slew of commonjs+mootools projects for us.
[12:09] <keeto> speaking of zest, ashb: is there anything new with zest?
[12:10] <keeto> I'm willing to donate docs for zest in the future--we'll need it for deck too. :)
[12:10] <ashb> keeto: no touched it in a while. its Good Enough to get started
[12:11] <ashb> it will eventually grow to become the default asyn reactor for flusspferd
[12:11] <ashb> *async
[12:11] <keeto> I say hooray to that. :D
[12:11] <keeto> i haven't updated my flusspferd yet.. I'm afraid of the compilation. x)
[12:11] <ashb> hopeffuly to the extent that other modules (e.g. curl) will integrate into the zest loop
[12:12] <keeto> i'd take time to recompile this weekend, but it's lent.
[12:12] <keeto> and I'm expected to be a "good catholic boy"
[12:13] <ashb> i might build source .debs and upload to launchpad
[12:13] <keeto> how about homebrew?
[12:13] <ashb> yeah should add one of them too
[12:13] <ashb> <3 homebrew
[12:13] <ashb> i should hassle them to take the flusspfer d formula
[12:13] <keeto> hear hear
[13:57] <kuya> ashb: env = Object.create(env); throws an error in fluss
[13:57] <kuya> is there another way to copy an object?
[13:58] <ashb> ah yeah we've not boot-strapped that up.
[13:58] <ashb> Object.create doesn't copy an object btw
[13:58] <kuya> its a shallow copy isnt it?
[13:58] <ashb> __proto__
[13:59] <kuya> ?
[13:59] <ashb> y = Object.create(x)
[13:59] <ashb> is aprox the same as y = { __proto__: x }
[13:59] <ashb> sec - i've got a shim somwhere
[13:59] * kuya feels he's about to learn some new js...
[14:00] <ashb> just can't htink which project so have to grep a few thousand files
[14:01] <kuya> ah i understand __proto__ now... never seen that before
[14:02] <ashb> hrmmm where is it
[14:02] <ashb> http://github.com/280north/narwhal/blob/master/engines/default/lib/global-es5.js#L247
[14:02] <ashb> can't find my one
[14:02] <ashb> that does the same
[14:03] <ashb> same net effect anyway
[14:03] <keeto> Object.create = function(x){ var T = function(){}; T.prototype = x; return new T() }; :D
[14:04] <kuya> thanks both
[14:04] <keeto> wonder if it propagates changes to x
[14:05] <ashb> we should proably add it to the bootstrap as part of flusspferd startup
[14:05] <ashb> keeto: yes - thats what prototype chain does
[14:05] <ashb> (so long as there hasn't been a 'local' change to the return
[14:05] <keeto> no, I meant Object.create
[14:05] <keeto> I don't know the implementation whether it uses __proto__ or a different mech
[14:06] * kuya starts a js version of "import this"... require(this); "Although that way may not be obvious at first unless you're first name is Kris"
[14:06] * keeto reads the es5 specs..
[14:07] <ashb> keeto: Object.create is speced to create a new object with the given x set to the internal [[Prototype]] property
[14:07] <keeto> yeah, I just read that. x)
[14:08] <kuya> is there anything like pythons __call__ in js to make an object callable?
[14:08] <ashb> not exposed to JS
[14:08] <kuya> ok ta
[14:08] <ashb> native objects can be made callable
[14:08] <deanlandolt> kuya: you can wrap it in a fn
[14:08] <ashb> but yeah - functions are just objects
[14:08] <deanlandolt> but yeah, not as cool :)
[14:09] <kuya> yea i know how to work around it - just wondered if i was missing smething :)
[14:09] <ashb> also Object.create can't create a function with the proto etc
[14:10] <keeto> i wish we had more of the lua metatable goodness.
[14:10] <ashb> yeah.
[14:11] <ashb> spidermonkey has __noSuchMethod__
[14:11] <ashb> but that only catches x.foo()
[14:11] <ashb> not x()
[14:11] <keeto> and it's nice only up until you use fn methods.
[14:11] <keeto> x.foo.apply <- no go.
[14:11] <ashb> yeah
[14:11] <keeto> __noSuchProperty__ would have been better.
[14:12] <ashb> there is a much better Proxy proposal in ES harmony
[14:12] <ashb> http://wiki.ecmascript.org/doku.php?id=harmony:proxies
[14:13] <keeto> I haven't read anything about harmony lately..
[14:13] <keeto> it's just depressing.
[14:13] <keeto> like, reading about winning the lottery
[14:13] <ashb> heh
[14:16] <kuya> :)
[14:35] <kuya> ashb: im a bit confused with the mongo module... are there any examples of use anywhere?
[14:36] <kuya> actually im probably just confused with the ns argument
[14:36] <kuya> should it be "<dbname>.<collectionname>" ?
[14:43] <ashb> no something like "mysite.mycollection"
[14:43] <ashb> kuya: as for example, sure
[14:43] <ashb> http://github.com/evilstreak/pressed/blob/master/lib/app.js#L55
[14:44] <ashb> this.collection in that function comes from config file: http://github.com/evilstreak/pressed/blob/master/conf/app.json.example
[14:45] <kuya> "mysite.mycollection" what are those names if not dbname and collection name?
[14:46] <ashb> or sotty i thought oyu meant litteraly with <>
[14:46] <ashb> (since i think thats what i put in the docs, i think)
[14:46] <kuya> oh no :)
[14:46] <kuya> <> is standard replaceme syntax im sure ... ;)
[14:46] <ashb> probably
[14:46] <kuya> mycommand <filename> [opt1 [opt2]]
[14:47] <ashb> my head is deep in debugging a problem what only shows up on a live env for an app that i havne't touched in 2 years >_<
[14:47] <kuya> oof fun
[14:47] <ashb> something like that
[14:47] <ashb> and to make it worse, the error stops you being able to buy anything
[14:47] <kuya> app fail :)
[14:54] <keeto> which fs proposal looks most promising right now?
[15:00] <ashb> fs-base has support from flusspferd, gpsee and narwhall istr
[15:01] <ashb> and i think is fairly similar to v8cgi
[15:32] <kuya> how can i JSON.stringify a mongodb instance... im trying to use the replacer to change the _id to something that can be serialized but i cant seem to get it right...
[15:33] <kuya> JSON.stringigy(blah, function(key, val) { if( key == '_id' ) { return value.valueOf(); } return value; }) is what iv been trying
[15:34] <ashb> i think you can put a .toJSON on the prototype
[15:34] <kuya> on the prototype of what?
[15:37] <nrstott> kuya, what you are wanting serialized to JSON
[15:40] <kuya> an object returned from mongo
[15:40] <kuya> it looks like ...
[15:40] <kuya> [{_id:require('mongodb').OID('4bb601aa4f34c950a6480c3e'), name:"planet1"}]
[15:43] <kuya> with that replacer func above it ends up as [{"_id":{},"name":"planet1"}]
[15:43] <kuya> i dontgeddit
[15:44] <ashb> kuya: stick a toJSON on the require('mongodb').OID.prototype
[15:44] <kuya> ahah
[15:46] <kuya> woot!
[15:46] <kuya> that works :)
[15:47] <kuya> OID=require('mongodb').OID; OID.prototype.toJSON = OID.prototype.valueOf;
[15:47] <kuya> is enuff :)
[15:48] <kuya> (id still like to know how to do it with the replacer function if anyone knows how)
[15:52] <ashb> hmmm curious
[15:53] <ashb> it just seems to ignore the return doesn't it
[15:54] <kuya> yea
[15:56] <kuya> oh well i can live with this for the moment
[16:09] <kuya> ashb im sure every other js web thing uses req.PATH_INFO/SCRIPT_NAME/etc except for fluss..
[16:09] <ashb> JSGI 0.3
[16:09] <kuya> oh is it part of that?
[16:09] <kuya> ok
[16:09] <ashb> http://wiki.commonjs.org/wiki/JSGI/Level0/A/Draft2
[16:09] <kuya> so fluss > others in compliance?
[16:10] <deanlandolt> kuya: jack, jsgi-node both use 0.3
[16:10] <kuya> why is the jack code im looking at use PATH_INFO then?
[16:10] <deanlandolt> kuya: because it's older i imagine
[16:10] <deanlandolt> jsgi 0.2
[16:11] <kuya> didnt you just say they were 0.3? *confused*
[16:11] <deanlandolt> moving away from CGI-style methods was unanimous IIRC
[16:11] <kuya> (hi btw :)
[16:11] <deanlandolt> i mean becaues jack is older
[16:11] <deanlandolt> the version of jack you're probably using
[16:12] <deanlandolt> can you point me to it?
[16:12] <deanlandolt> hmm...looks like the official repo hasn't been updated...
[16:12] <kuya> http://github.com/tlrobinson/jack/blob/master/lib/jack/urlmap.js#L31
[16:12] <deanlandolt> http://github.com/kriszyp/jack
[16:13] <kuya> i should of known to use a Kris* fork...
[16:13] <kuya> :]
[16:13] <deanlandolt> kuya: hmm...no dice on urlmap though...i'll update and push a fix
[16:13] <kuya> git is great but all these forks are driving me mad...
[16:13] <deanlandolt> heh...yeah, i hear ya
[16:14] <deanlandolt> the worst part is i imagine it'll be another year or so before things start to settle down
[16:14] <deanlandolt> once i got used to get a little it hasn't been such a burden though
[16:15] <kuya> i constantly get the feeling im trying all this stuff a few months too early :)
[16:15] <deanlandolt> yeah
[16:16] <kuya> especially coming from wsgi where its all already been written ;)
[16:16] <deanlandolt> no doubt
[16:16] <deanlandolt> but we don't want to make the same mistakes :)
[16:17] <kuya> lol
[16:17] <kuya> i dont think js suffers from the same unicode probs so your probably in a better position that wsgi 2
[16:17] <kuya> *than
[16:18] <ashb> yeah forking is part of the probkem
[16:18] <ashb> thats why i plan to setup http://packag.es
[16:18] <deanlandolt> yeah, unicode is part of wsgi's problem...but just the beginning
[16:18] <ashb> and just make it slurp in *everything* i can find
[16:19] <ashb> i've so far written one bit of middleware
[16:19] <ashb> http://github.com/ashb/jsgi-vhost/blob/master/lib/jsgi-vhost.js
[16:19] <deanlandolt> ashb: i just noticed another inconsistency in the jsgi 0.3 spec :-/
[16:19] <deanlandolt> what do you use: request.serverName/request.serverPort or request.host, request.port?
[16:19] <ashb> deanlandolt: isn't that the same one?
[16:20] <deanlandolt> the jack stuff is all set up to use request.host/request.port but the spec still says serverName, serverPort
[16:20] <ashb> i use host/port too
[16:20] <ashb> i think that was the same thing we noticed before
[16:20] <deanlandolt> hmm...did someone revert it?!
[16:20] <ashb> did we ever change it?
[16:21] <deanlandolt> absolutely!
[16:21] <deanlandolt> i'm not seeing a change since sept 09...
[16:21] <deanlandolt> there were several small edits since then
[16:21] <deanlandolt> and that was a big edit, iirc
[16:21] <ashb> eh. just change it again :)
[16:22] <ashb> deanlandolt: are you looking at the wrong page?
[16:22] <ashb> http://wiki.commonjs.org/wiki/JSGI/Level0/A/Draft2
[16:22] <ashb> has .host and .port
[16:22] <deanlandolt> http://wiki.commonjs.org/wiki/JSGI/Level0/A does not
[16:23] <deanlandolt> WTF?!
[16:23] <deanlandolt> that's silly...i need to make a big note there!
[16:23] <deanlandolt> that has to have been a source of confusion for people :-/
[16:25] <kuya> im confused between SERVER_NAME and HTTP_HOST in this 0.3...
[16:26] <deanlandolt> oh, well, that's easy...there is no HTTP_HOST
[16:26] <deanlandolt> that's just headers.host
[16:26] <kuya> oh ok
[16:26] <deanlandolt> and request.host is CGI's SERVER_NAME
[16:27] <deanlandolt> it's more symmetrical that way...and we like symmetry
[16:27] <kuya> yup got that one
[16:28] <kuya> var path = env.pathInfo ? env.pathInfo.replace(/\/+$/,"") : "",
[16:28] <kuya> hHost = env.headers.host, sName = env.host, sPort = env.port;
[16:28] <kuya> so that should be good for urlmap ?
[16:29] <deanlandolt> yep
[16:29] <kuya> great
[16:30] <deanlandolt> i'll check something in in a sec, but it sounds like you already got it
[16:36] <kuya> seems to work ok
[16:36] <kuya> im not quite sure why urlmap creates a copy of the env
[16:36] <kuya> it seems a bit pointless
[16:37] <kuya> anyway...
[16:38] <deanlandolt> that's odd
[16:38] <deanlandolt> i see a squeeze hanging around still...
[16:38] <deanlandolt> i know i fixed this in another fork...i should really be /committing/ these things :-/
[16:39] <kuya> probably :)
[16:49] <kuya> > db.planets.save({name:'planet1'})
[16:49] <kuya> > db.planets.find()
[16:49] <kuya> { "_id" : ObjectId("4bb601aa4f34c950a6480c3e"), "name" : "planet1" }
[16:49] <kuya> > db.planets.findOne({_id: "4bb601aa4f34c950a6480c3e"})
[16:49] <kuya> null
[16:49] <kuya> any clues?
[16:49] <Aristid> kuya: that's mongo?
[16:49] <kuya> yeaa
[16:49] <Aristid> kuya: maybe you need to use the ObjectId constructor in the findOne?
[16:50] <kuya> bingo!
[16:50] <kuya> thanks
[16:50] <Aristid> yay
[16:53] <kuya> ashb: is that the right way with your mongodb api? i cant seem to construct an OID it complains with: Could not call function: exception `Error: Object is not native'
[16:55] <deanlandolt> kuya: just pushed the urlmap fix: http://github.com/deanlandolt/jack/commit/8627b9366ac3d862f23ee3f2c6931386026baa0f
[16:56] <kuya> another fork... ;D
[16:56] <kuya> thanks deanlandolt
[16:56] <deanlandolt> kuya: urlmap should /not/ create a copy of the env (that's a todo)
[16:56] <kuya> good
[16:57] <deanlandolt> kuya: what are you using to talk to mongo?
[16:57] <deanlandolt> what engine are you on?
[16:57] <kuya> flussperfd
[16:57] <deanlandolt> oh, sweet
[16:57] * kuya doing a tour of every engine
[16:58] <deanlandolt> yeah, i've been doing that too...it's a fun tour
[16:58] <kuya> ill be back in #persrv soon no doubt ;)
[16:58] <deanlandolt> well, persevere 2.0 /should/ run on flusspferd :)
[16:59] <deanlandolt> though we may need to nag ashb to add async support to juice :)
[16:59] <kuya> ;)
[17:05] <kuya> doh - must of used up all my points with ashb :]

 

 

Logs by date :