2009-12-03:
[0:09] <Wes-_> Most of the time, I don't care if a baseball player is a human is a mammal is a vertabrate is a mammal. I just care if they can catch a ball. That is the difference between classical inheritance + strict types and prototypical inheritance + duck types[0:10] <Wes-_> s/a mammal./an animal./[2:03] <Wes-_> ashb: ping[2:03] <ashb> yo[2:03] <Wes-_> I have solved the import * from foo problem[2:03] <ashb> cool. how?[2:03] <Wes-_> people want this because the browser loads multiple scripts in the same context[2:03] <Wes-_> I propose instead to have a meta language which virtualizes loading of multiple scripts[2:04] <Wes-_> basically, listing which scripts to load and in what order into the global context[2:04] <ashb> meta language could be an entry in package.json too[2:04] <Wes-_> this is exactly like "import * from foo" and eliminates the argument that "we don't want to change existing web code that works like that"[2:04] <Wes-_> actually, the meta language already exists[2:04] <ashb> oh?[2:04] <Wes-_> I propose the subset of HTML which is composed of only the SCRIPT tag[2:05] <ashb> do (and do you?) deal with on script ending with an unclose /*[2:05] <ashb> or is that just "user bug, NMP"?[2:05] <ashb> *how do[2:05] <Wes-_> Since this is a simple language, I think I would just ignore that issue entirely, really[2:06] <Wes-_> I think we could also make the language attribute superflous[2:06] <Wes-_> not sure if we should do defer or not[2:06] <ashb> default to text/javascript[2:06] <Wes-_> entertainingly enough, this would be compatible with the web[2:06] <Wes-_> and could load URL modules[2:06] <ashb> but you might want say: text/ca[[uccino[2:06] <ashb> pp[2:07] <Wes-_> Is cappuccino that pre-processed JS variant?[2:07] <ashb> yup[2:07] <ashb> Objective-J[2:08] <Wes-_> that's a hilariously great use case for this (which was a proposal I originally made in jest, but actually, might not be so ludicrous)[2:08] <ashb> it covers a lot of the same ground as the module loader and packages proposal mind[2:09] <ashb> we really need to just get all of us in a room for a day and hash this out.[2:09] <ashb> would be *so* much easier[2:09] <Wes-_> it's somewhat orthogonal from the module loader[2:09] <Wes-_> it's basically "cat"[2:09] <ashb> require.loader.load(['x1','x2'])[2:09] <Wes-_> you lose all of the good features from the module loader.. encapsulation, blah blah[2:10] <Wes-_> but you don't break web code[2:10] <ashb> (doesn't exist anywhere) does the same sort of thing[2:10] <kriskowal> wait, what?[2:10] <kriskowal> oh, multiple ids[2:10] <ashb> yeah[2:10] <kriskowal> what does that mean?[2:10] <ashb> <script src="x1"><script src="x2">[2:10] <kriskowal> that's really not what load is supposed to do.[2:10] <Wes-_> ashb: require.loader.load() can't do that[2:10] <kriskowal> it's supposed to return a module factory function[2:11] <Wes-_> there you have a javascript function modify it's caller's environment[2:11] <ashb> no no. just conceptually[2:11] <Wes-_> my half-serious proposal takes this completely out of the JS space[2:11] <ashb> so you'd still have to call the resulting function[2:11] <Wes-_> ashb: No dude, you just run 'em as program modules one after another[2:11] <Wes-_> just like the browser[2:12] <Wes-_> same global object, same context[2:12] <kriskowal> oh, this is about preloading legacy scripts.[2:12] <ashb> they only way to do that in flusspferd is to build a new scope containing both of them. or run them both in the global scope[2:12] <Wes-_> kriskowal: yeah. And I'm proposing a file full of SCRIPT tags to do it[2:12] <Wes-_> It has about the same feel[2:12] <ashb> (i.e. cat them together then load that as a single module)[2:13] <inimino> Moving packages out of JavaScript entirely sounds like an excellent idea to me[2:13] <Wes-_> ashb: not true, flusspferd could do this easily enough if it wanted: right after you call JS_InitStandardClasses(), while (read file list) { JS_CompileFile, JS_ExecuteScript }[2:13] <ashb> sure then you're on the global[2:14] <Wes-_> yep. Keep the legacy people happy with a legacy environment.[2:14] <ashb> our (JS) module is built around JS_CompileFunction[2:14] <ashb> oh sure - if you didn't want any kind of dual mode we could do that[2:14] <ashb> but i can't really see anyone wanting to do that[2:15] <Wes-_> It could be code in an hour and would keep the import * from foo people quiet for a bit[2:15] <Wes-_> completely eliminating the "but my old browser code does it that way" argument[2:16] <Wes-_> actually, you could write it in commonjs![2:16] <Wes-_> parse the script tags with script[2:16] <Wes-_> then eval the scripts[2:16] <ashb> :)[2:19] <kriskowal> what's the second argument to v8's Error.captureStackTrace?[2:20] <ashb> i have no idea[2:20] <ashb> http://code.google.com/p/v8/source/detail?r=2541[2:37] <hdon> Wes-: i would prefer if the language attribute was respected, and we had an API to handle other script types[2:38] <inimino> you mean the type= attribute, right?[2:38] <Wes-_> hdon: Yeah, ash's point about cappuccino being especially relevant[2:38] * hdon is still catchng up[2:38] <Wes-_> inimino: it was language in HTML4, has it changed?[2:39] <kriskowal> no[2:39] <kriskowal> type is for the mime type, as i recall[2:40] <ashb> so type="text/javascript" is probably more common now[2:40] <kriskowal> even more superfluous than the language[2:40] <inimino> @language was deprecated even in HTML4[2:40] <kriskowal> the language is really only useful in disabling execution[2:40] <ashb> <script language="QBasic">[2:40] <ashb> gotta lvoe xkcd[2:40] <kriskowal> for hacks like back-processing old scripts in alternate interpreters.[2:41] <hdon> ashb: what's a "dual mode?"[2:41] <ashb> using code/results of 'import *' with proper modules in some fashion[2:42] <hdon> <Wes-_> actually, you could write it in commonjs![2:42] <Wes-_> BTW FWIW GPSEE could trivially implement <script language="JavaScript1.2">[2:42] <hdon> ^^ what file API to use?[2:42] <Wes-_> as well as firefox could, anyhow[2:42] <Wes-_> hdon: fs-base, of course. OH. lol.[2:42] <Wes-_> I should have added "eventually"[2:42] <hdon> ashb: lolol[2:43] <Wes-_> question for group: Is there a JavaScript statement which can legally start with a < ?[2:43] <hdon> actually, an implementation of QBasic in a web browser would be a great toy project[2:43] <hdon> i mean, the whole editor and everything[2:43] <Wes-_> hdon: you could virtualize b800:000 as a canvas!!![2:43] <hdon> the built-from-text GUI elements[2:43] <hdon> that would be the right way to do it![2:43] <Wes-_> hdon: I have been thikning about doing a qbasic-like editor with gpsee's curses module[2:44] <Wes-_> could use functino.toSource() for F2[2:44] <hdon> heheheh[2:45] <Wes-_> delete function-name and re-eval the upper pane function every time you F2 or F5[2:45] <Wes-_> that way even function renames/refactors would work[2:45] <hdon> madness![2:46] <Wes-_> I have always felt that the QuickBasic4.5 TUI was a great way to introduce programming[2:47] <Wes-_> immediate-mode pane at the bottom, but structure of functions etc available up top[2:47] <Wes-_> I just wish I knew why curses-mouse-mode doesn't work with gpsee curses[2:47] <Wes-_> or maybe solaris curses is the culprit[2:48] <hdon> hm[2:49] <Wes-_> I'm laughing so hard right now[2:49] <Wes-_> hdon: we could implement <SCRIPT> ... oh god, get this[2:49] <Wes-_> we look at the return type from execute script in gsr[2:49] <Wes-_> and if it's an e4x object[2:49] <Wes-_> we troll it for script tags[2:50] <ashb> Wes-_: YOU SICK MONKEY[2:50] <ashb> its not even hard to troll it[2:50] <Wes-_> I know! You could do it in script![2:50] <ashb> x..[name()='script'][2:50] <ashb> or something[2:50] <ashb> i forget the exact e4x voodoo[2:51] <Wes-_> Is there E4x which means "not-a-script' ?[2:51] <hdon> hmm[2:51] <Wes-_> actually, we should[2:51] <Wes-_> for each (node in document)[2:51] <Wes-_> { if (is script yay) else throw() }[2:52] <ashb> x..[not(name().toLowerCase() == 'script'][2:52] <ashb> i think[2:52] <ashb> (man LINQ is awesome)[2:52] <Wes-_> what's linq?[2:52] <ashb> language integrate natural query or something like that?[2:53] <ashb> http://en.wikipedia.org/wiki/Linq[2:53] <ashb> doing SQL like query operations in the native language, rather than SQL with str interpolation etc[2:53] <ashb> which reminds me[2:53] <ashb> i need to write a message to the es-discuss about the 'str interpolation' proposal which is basically asking for LINQ[2:54] <Wes-_> ashb: (reading) - say, that IS neat[2:54] <ashb> yeah it really is[2:55] <ashb> which is basically what E4x is, LINQ for XML[2:56] <Wes-_> The syntax even feels javascripty[2:56] <ashb> i'm sad no one else picked it up and that hte spec is so broken[2:56] <ashb> cos it really is cool[3:03] <ashb> wth[3:03] <ashb> TypeError: invalid 'in' operand option[3:03] <ashb> options i guess isn't an object[3:03] <ashb> if ("stack" in options) {[3:03] <ashb> someone is passing a string![3:04] <ashb> oh. the test is >_>[5:09] <kriskowal> JohnResi1 i just opened an old wound. assert.throws has to be assert['throws'] in rhino because of future reserved words in ES3. i'm proposing we change the name.[5:10] <inimino> not just wait for ES5 to get implemented?[5:10] <Wes-_> kriskowal: I would if I were in your shoes. It's probably not just rhino. I bet NJS javascript and WSH have the same problem.[5:10] <kriskowal> yeah, and people tend to change it to .throws in their tests, which makes them non-interop[5:11] <Wes-_> exacrtly, it's just begging for an accident[5:11] <kriskowal> pardon, one person did. i presume it would be common.[5:11] <Wes-_> canThrow? shouldThrow? willThrow?[5:12] <Wes-_> what does qunit do?[5:13] <Dantman> Hmm... assert.errors?[5:13] <Dantman> assert.fails?[5:15] <Wes-_> assert.barfs?[5:15] <deanlandolt> assert.raises (per nrstott)[5:15] <Wes-_> hey I like that[5:15] <nrstott> in .net we say "raises an exception"[5:15] <nrstott> sounds very natural to me[5:16] <Wes-_> deanlandolt: thanks for chiming in re promises on /. yesterday btw[5:16] <Wes-_> and in POSIX, raise() means "send myself a signal" which is also semantically similar[5:16] <deanlandolt> Wes-: heh...i was gonna try to do a little more defending but jeez i'd forgotten why i stopped reading slashdot...the comments were /depressing/[5:17] <deanlandolt> nrstott: in python raise is the kw[5:17] <Wes-_> deanlandolt: http://slashdot.org/users.pl?uid=163409[5:17] <Wes-_> it's been a busy coupla days, lol[5:17] <nrstott> deanlandolt, cool, I had forgotten thnat[5:18] <deanlandolt> Wes-: you are a patient man![5:18] <Wes-_> deanlandolt: just trying to change the world.... one troll at a time[5:18] <nrstott> deanlandolt, does Tusk work for you on windows?[5:19] <deanlandolt> nrstott: no[5:20] <deanlandolt> but what's nice you can assemble in linux and then just drop it on a windows box and things should work[5:20] <nrstott> deanlandolt, I was trying to get a pure windows approach going... guess im just going to use git to manually clone the dependencies i need[5:20] <nrstott> which sucks, but whatever ;0[5:20] <nrstott> ill write a script to distribute to my team[5:20] <deanlandolt> i've mostly been using libraries by way of persvr so it's been a slightly different process anyway[5:21] <nrstott> im really interested in persvr, but haven't taken the dive into it yet[5:21] <nrstott> it sounds like it woudl have some utilty for me even though I'm a couchdb guy[5:21] <deanlandolt> yeah...once things settle down on tusk it'd be nice to hammer away on windows[5:21] <deanlandolt> nrstott: yeah, it certainly would[5:22] <deanlandolt> and design-wise, it makes a whole lot more sense that couch (to me at least)...really elegant, and you can then just drop all that elegance right on top of couch[5:22] <nrstott> im focused right now on getting my first bogart site into production. After that I'm interested in figuring out how Bogart can fit into the larger family of JSGI frameworks[5:23] <deanlandolt> sweet...yeah, i can't wait to really have the time to explore that world (i've also been a long slog toward production)[5:24] <nrstott> I think that some of the stuff I've got, like Vault, come be generally useful. I need to take some time to package it and document it properly though[5:24] <deanlandolt> i'm sure it could[5:35] <Dantman> deanlandolt, ruby also uses raise... though, it uses rescue instead of catch so it's a little irritating ( ruby does have keywords called try throw and catch (or at least two of them) and they do something similar but not what they would normally do.. kindof irritating actually )[5:38] <nrstott> Dantman, what does catch do in ruby?[5:39] <nrstott> i had no idea it had it[5:40] <Dantman> Oh right, and instead of finally, ensure... though I suppose it's nice that ruby supports use of else after a rescue statement[5:40] <Dantman> http://ruby.activeventure.com/programmingruby/book/tut_exceptions.html#S4[5:41] <Dantman> catch/throw looks like a really badly named version of js's label and named break[5:43] <Dantman> Then again, most of the time we abuse anonymous functions and return instead[5:43] <Dantman> Though, js has some half decent labeled breaking[5:46] <Dantman> Mkay, a little better than half decent... I'm just always getting confused or something whenever I try it and get something wrong[5:46] <Dantman> nrstott, ^[5:46] <Dantman> foo: { print("x"); if ( true ) break foo; print("y"); } /* y will not be printed because break foo; breaks out to the foo: label.[5:46] <nrstott> Dantman, thanks for the link. that's a feture or Ruby I never used[5:47] <nrstott> it looks almost like a goto statement ;0[5:47] <Dantman> Me neither... I just remember reading something about throwing exceptions in ruby, use raise, catch/throw exists but it's NOT what you think by reading it[5:48] <Dantman> ;) except much cleaner and practical to use...[5:48] <nrstott> symbols are the thing I love most about Ruby[5:48] <nrstott> I so wish other languages had symbols[5:48] <nrstott> or is it sigils[5:48] <Dantman> Mhmm... ;) but I thought that before I ever used Ruby, they got it from Lisp[5:48] <Dantman> Symbols I believe[5:48] <Dantman> They also got Nil from lisp... mmm[5:48] <nrstott> I used scheme in college. Never was that into it though[5:49] <Wes-_> BTW, kudos to whoever has been putting content in CommonJS wiki[5:49] <nrstott> when my wife was learning to program I suggested she start in scheme and I don't think she'll ever forgive me :)[5:50] <Dantman> Lisp is one of those languages that's good to learn, but never has much practical use... but it gives you a good alternative look at what makes up a programming language and lets you understand other programming languages better.[5:50] <Wes-_> nrstott: you should have made her start in smalltalk, and changed the valueOf all the Number literals for her[5:50] <Wes-_> Dantman: clearly you have never customized your emacs[5:50] <Dantman> Heh, oh right[5:50] * nrstott raises the holy banner of VI to prepare for the VI vs Emacs clash to come[5:51] <Wes-_> IME, vi champions seldom know their CAR from their CDR[5:51] <kriskowal> we've got another spec bug.[5:51] <nrstott> Il'l CAR your CDR and raise you a FOLDR[5:51] <kriskowal> assert.deepEqual("a", {})[5:51] <kriskowal> that passes according to the spec.[5:51] <Wes-_> what's the bug?[5:52] <kriskowal> we need special verbiage for strings[5:52] <Wes-_> kriskowal: I'm lacking context. What exactly is that supposed to test?[5:52] <kriskowal> whether "a" and {} are equal[5:52] <Dantman> nrstott, Ruby's treatment of symbols in hash keys is horrid though... 90% of parsing stuff like JSON and YAML will output hashes that use string keys, and Ruby considers "id" and :id completely different things in hashes....[5:52] <kriskowal> they are not. it should throw an assertion error[5:52] <Wes-_> and it thinks are because...?[5:52] <Wes-_> the test is == ?[5:53] <nrstott> Dantman, what's wrong with that? They are different :)[5:53] <Wes-_> OOOH[5:53] <Wes-_> the test is that they have the same properties?[5:53] <kriskowal> yeah, there's nothing special for strings[5:53] <Wes-_> kriskowal: if that's the case, should also test that typeof matches[5:53] <Wes-_> unless you care about "hello" == new String("hello")[5:54] <kriskowal> well, i think deepEqual is supposed to work like shallow == equal if neither operand is a deep object[5:54] <kriskowal> and, i really don't care, but "" should not be {}[5:54] <Wes-_> I'd buy that[5:55] <Wes-_> only do deep compare when typeof(arg1) & typeof(arg2) == "object"[5:55] <Dantman> nrstott, except practically when programming you actually want to treat them the same. Sooo many libraries end up adding extra ugly code to check for the same key in symbol and string format so that the library doesn't unexpectedly completely fail on the developer[5:56] <Dantman> hash[:id] !== hash["id"] has very little practical use. JS got it right casting things[5:56] <Wes-_> kriskowal: should possibly make that "xml" and "object" and that they must be equal?[5:56] <Wes-_> e4x adds "xml" to the type list, sigh[5:56] <Wes-_> but I guess that belongs in impl, not commonjs spec[5:57] <kriskowal> yeah. i don't think we're looking for interoperable tests of e4x in commonjs[5:57] <JoePeck> Dantman: (just jumping in) if Ruby programmers are that worried, why don't they just use a wrapper around Hash that always runs to_s?[5:58] <JoePeck> I happen to think :sym is different then "sym" like one is a constant and the other is a string[5:58] <Dantman> ^_^ Same reason we avoid modifying the prototypes of standard classes in libraries in js[5:58] <JoePeck> Dantman: I didn't mean to imply monkey patching, I meant a class[5:59] <Dantman> Traditionally in most high level languages String IS constant (non-mutable)[5:59] <JoePeck> sure, you have a good point there[5:59] <Dantman> That one also acts as another gotcha in ruby[5:59] <Wes-_> You know, I'm having a hard time thinking of a language with mutable strings. Does C++?[6:01] <Dantman> Along with the fact that you don't explicitly define variable types in Ruby, but they have separate types for float and integers (Float and Fixnum), and if you do something like 1/100 you get bitten by numbers being truncated because they stay as Fixnums... You need to make sure to use an explicit .0[6:02] <JoePeck> Dantman: very true[6:02] <Wes-_> you know, I think gw-basic did that too[6:03] <Dantman> It's fine in java because you expect that since you are defining what type the number is, it's fine in JavaScript because there is only one type of Number and you don't get that magic, but in Ruby it's hard to spot[6:04] <Dantman> I never knew about that until I had to track down why calculations were horribly wrong in a game I was trying to write... turns out I needed to add a few explicit .0's or else the truncating killed my numbers without me knowing...[6:07] <Dantman> nonetheless, I suppose Ruby makes a good runner up... It's much more flexible than that horribly common /language/ we call PHP, but while not as nice as JS it's widespread enough to make for a good fallback pick if you aren't in a case where JS is a viable option yet.[6:07] <Dantman> ;) Good luck trying to sandbox it though, *snicker*[6:08] <Dantman> That's another nice one JS shares with Lua[6:09] <Wes-_> PHP *shudder*[6:10] <Wes-_> first thing I did for gpsee-on-the-web was to write a class to read PHP session files[6:13] <Dantman> Heh... php sessions... After awhile I stopped using PHP's internal session system in my own personal projects (before I moved to other languages)[6:13] <Dantman> /love/ how PHP's session setup makes pages load sequentially and block each other.[6:14] <Dantman> I really don't care if one session starts, another starts, the first session sets data and closes, then the second sets data based off the initial data overriding it causing a conflict...[6:14] <Dantman> I don't abuse session data enough for that to matter at all[6:18] <Wes-_> Dantman: Oh, that's the *great* thing about implementing your own session class reader[6:18] <Wes-_> "to hell with locking!"[6:18] <Dantman> I prefer throwing it somewhere like the database[6:19] <nrstott> i have a couchdb session handler i use with JSGI[6:19] <nrstott> couchdb ftw[6:20] <Dantman> I wouldn't use Couch for that myself... over the wire protocol ftw[6:20] <Wes-_> So couchdb uses JavaScript as the query language? Is that right?[6:20] <nrstott> over the wire? like cookies?[6:20] <Dantman> A internal http call for every http call just for session data (and an extra if you want to update) sounds like a bit much[6:20] <nrstott> yes Wes-[6:20] <Wes-_> that's crazy cool[6:20] <nrstott> Dantman, it's no worse than a socket session, and couchdb can be reverse proxied very easily[6:21] <Dantman> No, over the wire as in a binary protocol with drivers... MySQL, Mongo, etc...[6:21] <nrstott> you can always keep a persistent http connection open to couch[6:21] <nrstott> i dont personaly do that,i just reverse proxy it[6:21] <Dantman> You can implement a REST database interface using an over-the-wire protocol, but you can't go the other way...[6:22] <Dantman> ^_^ BSON is also more data efficient than JSON[6:22] <nrstott> Dantman, you can use couchdb "over the wire", just most people don't :)[6:22] <Wes-_> Dantman: define efficient, and show your measurements. :)[6:22] <nrstott> and i seriously doubt that you could get any signifincat performance boost over a local couchdb reverse proxied using an 'over the wire' method[6:23] <nrstott> show me how you can get a 304 unmodified from MySQL :)[6:23] <nrstott> which is very common with session data.[6:24] <Dantman> iirc, Typical session data encoded in BSON is about the size of the HTTP headers necessary to output that 304[6:25] <Wes-_> dantman: and I'll bet both are a single ethernet frame[6:27] <nrstott> I like being pure JS all the way through. I just wish couchdb views could be run via a commonjs system.[6:27] <nrstott> i guess there's nothing stopping me from writing my own view server, which is also very easy to do with couch.[6:28] <Dantman> You can write a pure-commonjs MongoDB driver too once we have sockets[6:28] <nrstott> yeah I have respect for Mongo[6:29] <Dantman> Their over the wire protocol seams nice... IIRC it's almost entirely just writing and reading BSON. Even special things like runCommand and various other commands are actually just helpers that actually execute a .findOne on some type of system collection in the background[6:30] <nrstott> I like the idea of Redis too.[6:31] <Dantman> Once you implement the basic stuff, it's all wrappers arround that... And most of those wrappers are alreaddy written in JS (for the mongo shell)[6:32] <Dantman> Just need to find out what that basic stuff is, and port it to commonjs, then throw in the existing js code, and voila[6:32] <nrstott> MongoDB just isn't "relaxing" though :)[6:32] <nrstott> try the couch, you might like it[6:33] <Dantman> I was going to, but it didn't fit the application I was writing, MongoDB did[6:34] <Dantman> I believe I made a post some time ago to the list about a ChimpDB idea... Mongo actually has enough in it to mostly live up to what I was wanting[6:35] <nrstott> Mongo is good stuff. I'd be curious as to what about it made it such a better fit than couch for you though, other than the 'over the wire' access[6:37] <Dantman> db.eval... The data we have is so hierarchical but also has multiple parents, it's a setup that would be impossible to implement in CouchDB without making hundreds of requests to Couch just to load up a single page (which is the whole reason we're trying to ditch our bad imitation semantic database in mysql)[6:39] <Dantman> Using db.eval I just pass the id of a base jit, and have a code that recursively grabs all the relevant jits, returns them all together, and that's used to preload the jits needed for the page[6:39] <nrstott> while hierarchical data is not well suited to couch, i would be shocked if you couldnt find a way to load all the data for a certian "paernt" or set of "parents" in one request.[6:39] <nrstott> the problem with hierarchical data in couch comes when you want to rename a node[6:40] <Dantman> I considered all in one document, and each jit in it's own document... it wasn't something that would work out in couch[6:41] <nrstott> Dantman, I'm 99% positive you could get all the data for your base jit id in one request; however, you were wise to choose mongo because with couch you encounter other probs than that...[6:42] <Dantman> The two options were entire site in one doc, or each jit in it's own[6:42] <nrstott> in couch when you want to do hierarchical data in views, it is common practice to have each (in your case jit) document emit multiple times[6:42] <Wes-_> nrstott: "wish commonjs views were available in commonjs"[6:42] <Wes-_> nrstott: explain?[6:42] <nrstott> then you use the JSON collation features with startkey and endkey to get your particular slice[6:43] <nrstott> however, if you want to rename a node, there's absolutely no way to do it in one statemnet[6:43] <Dantman> entire site in a doc wasn't an option. Updating the state of a single jit would require fetching the entire document, modifying one part, then re-saving the entire document. Such a thing would be insanely inefficient, and hit update colisions far to much for our dynamic app[6:43] <nrstott> Wes-, couchdb default view server is JS. it runs on spidermonkey.[6:44] <nrstott> Dantman, that wasn't waht I was suggesting[6:44] <Wes-_> nrstott: right, just trying to figureout how commonjs plays into that[6:44] <Dantman> I know[6:44] <nrstott> Wes-, so that I could do a require('foo') in my couchdb views :)[6:44] <Wes-_> nrstott: it should be relatively trivial to build couchdb on top of gpsee, that would get you commonjs features[6:44] <nrstott> Wes-, not so trivial, they use a specially patched version of spidermonkey[6:45] <nrstott> well, maybe trivial, I don't know much about how gpsee works[6:45] <Wes-_> nrstott: how specially? If it's roughly still JSAPI we'd be fine[6:45] <nrstott> they use a version of spidermonkey patched to have CURL commands availalbe[6:45] <nrstott> other than that, it's the same[6:45] <Wes-_> Oh, no big deal[6:45] <Wes-_> If you have time to hack I can do tech support[6:45] <nrstott> Ive built couchjs from source before.[6:45] <nrstott> What would I have to do?[6:46] <nrstott> I have never used any commonjs cept narwhal[6:46] <nrstott> Wes-, I definitely can put some time into that.. it'd be a huge boon to me[6:47] <Wes-_> nrstott: *mostly* - build/install gpsee on top of patched couchdb tracemonkey, tweak some headers and libs, let me patch anything I missed, and run couchdb[6:47] <Dantman> The other option, each jit in it's own doc. The problem there is the hierarchy. View generation cannot be dependent on another document, so extra data would need to be stored in the jit itself. Unfortunately with the way we have multiple parents it's impossible to list the possible parents in each jit for that cause one small change to the hierarchy (fairly common) would require you search through and update data on dozens of jits.[6:47] <nrstott> Dantman, yeah, that's totally the problem :)[6:47] <nrstott> Dantman, you guys were very wise not to use couch[6:48] <Wes-_> nrstott: In theory -- http://code.google.com/p/gpsee/wiki/JSAPI_GPSEE[6:48] <Dantman> ^_^ I was looking for a real semantic database... had trouble with them... found the world of document based databases, realized that what we really wanted was semi-structured, not semantic... and I haven't went back.[6:49] <nrstott> Wes-, this looks very doable. I will make some time tomorrow morning to give it a quick go... it looks like it might just work out right :)[6:50] <nrstott> what version of spidermonkey do you typically use? I think theres is 1.7 still, not a 1.8[6:50] <nrstott> would that matter?[6:50] <Wes-_> nrstott: what timezone? I'm EST, 9-5[6:50] <nrstott> Wes-, I'm CST. I generally work 8 - 8[6:50] <Wes-_> nrstott: matters a lot. We support only tracemonkey. From rumblings I've heard, couchdb works on tracemonkey (much faster)[6:50] <Dantman> Be wary of __iterator__ in Rhino's 1.7 release[6:51] <Wes-_> nrstott: great, we have a good deal of cross-over[6:51] <nrstott> Wes-, hmmm I'll have to give it a shot. I know they dont use tracemonkey by default.[6:52] <Wes-_> nrstott: unless they multithread their javascript code (two threads of JS on same global at once) going to tracemonkey shouldn't be a big deal and a huge perf gain[6:52] <nrstott> http://github.com/davisp/couchdb/tree/master/src/couchdb/priv/couch_js/[6:52] <nrstott> that's what they do to spidermnokey[6:52] <Wes-_> nrstott: only major change that is not backwards compatible is branch callback vs. operation callback[6:52] <nrstott> they certainly dont multithread, they are all about multiprocess[6:53] <nrstott> and i believe they have one process that is responsible for communicating with the spidermonkey view server via stdin and stdout[6:53] <Wes-_> nrstott: I'm shocked that that they would build a custom spidermonkey for that. Those look like API consumers, and in fact, could be made into require() modules easily[6:53] <nrstott> oh yeah they sure could[6:54] <nrstott> if we can get something working, they'd probably take a patch.[6:54] <Wes-_> nrstott: gpsee actually has support for turning modules like that into native modules -- which could then also become blended modules (part JS part C)[6:54] <Wes-_> and we cache precompiled script[6:55] <Wes-_> nrstott: Should be interesting, glad you're interested. Should be possible to write a fairly small patch which allows spidermonkey with/without gpsee. Part of my design goal is exactly this type of application.[6:56] <Wes-_> nrstott: warning -- gcc, gmake, tracemonkey and not-windows are hard requirements ATM. Most of the those requirements can theoretically be exchanged for features.[6:58] <nrstott> heh, it works with windows now :)[6:58] <nrstott> so that's a little outdated[6:58] <Wes-_> nrstott: Sorry, I meant gpsee's requirements.[6:58] <nrstott> oh[6:58] <nrstott> well, that's ok by me[6:58] <nrstott> i run couch on linux exclusively[6:58] <Wes-_> excellent. Primary platform here is Solaris 10, but a key developer is on debian-something[6:59] <nrstott> all our linux boxes are Ubuntu[6:59] <nrstott> so debian-something should have good synergy[6:59] <Dantman> Mmm ubuntu[6:59] <Wes-_> Should be a piece of cake, then. Even the FFI stuff is working well under Linux (and glibc was a big pain)[7:00] <Wes-_> I'm really impressed with Ubuntu[7:00] <Dantman> All our servers at work too...[7:00] <nrstott> Alright, I'll be in IRC tomorrow Wes- . I'm very confidnet this will work after talking to you[7:00] <Wes-_> My 62 year old mom uses it[7:00] <Wes-_> nrstott: Beauty! I'm crashing, TTYS! :)[7:00] <nrstott> this will make my development stack even more aewsome :)[7:00] <nrstott> ttyl[7:00] <Dantman> ^_^ And they made some interesting UI updates and driver updates recently[7:01] <Dantman> My bluetooth keyboard works at the login screen now without touching the adapter anymore[13:01] <ashb> yet another issue with bStr[0] returning another byteString[13:02] <ashb> assert.deepEqual(ByteString([1]), ByteString([1])) will loop for ever[13:02] <ashb> (without a special case for it of couse)[15:23] <Wes-> ashb: ouch[15:23] <ashb> its a general problem for any recursive structure of course[15:24] <Wes-> ashb: I think you have pointed out that ByteString/ByteArray cause infinite recursion in a (for-each) stack where no atoms are produced[15:24] <Wes-> yeah[15:24] <Wes-> can we do a deep copy on a ByteArray?[15:24] <ashb> ?[15:24] <Wes-> with, you know, normal-looking deep-copy code?[15:25] <ashb> oh, hmmm yeah[17:28] <hdon> so the top-level arguments variable[17:28] <hdon> is it guaranteed to have at least one element?[17:28] <hdon> (ie. argv[0] in the convention of C)[17:33] <ashb> hdon: you mean system.args[17:34] <hdon> ashb: oh, commonjs doesn't specify a top-level arguments variable? ok[17:34] <ashb> nope[17:34] <ashb> but it should include the script name being execd[17:34] <hdon> ah ok :)[17:40] <Edgar1> I want some opinios: What do you think about Google Wave?[17:43] <evilstreak> pointless[17:44] <Edgar1> pointless? explain your self, please[17:44] <evilstreak> and they missed a big trick by not allowing wave accounts to accept regular emails[17:44] <evilstreak> it doesn't provide any service existing communication channels don't[17:44] <evilstreak> and the interface isn't exactly a pleasure to use[17:44] <Edgar1> i understand, centralized services like that just sucks[17:44] <Wes--> what really irritates me is that it won't let me sign up using my google apps account[17:45] <Edgar1> Wes-- they want to force people to have gmail[17:46] <Wes--> Edgar1: that's my point, I have my whole enterprise on google apps premier edition (which includes gmail)[17:46] <Wes--> I shouldn't have to use an @gmail.com domain[17:46] <Wes--> that's just stupid[17:46] <Wes--> I wonder what they do for German customers?[17:47] <Edgar1> thats the problem of a monopoly company[17:47] <deanlandolt> Edgar1: you think google's a monopoly?[17:47] <Edgar1> want to store all the data and info in their servers, just their servers[17:47] <Edgar1> i think so yes[17:48] <deanlandolt> hmm...that's a new one[17:48] <Wes--> what industry do they monopolize?[17:48] <Edgar1> they have a search engine, a mobile os, a desktop(netbook) os, a email service[17:48] <Edgar1> a project hosting site[17:48] <Edgar1> an ad service[17:48] <deanlandolt> so you're suggesting they're a vertical monopoly?[17:48] <Wes--> no more so than microsoft[17:48] <deanlandolt> yes, but do they control significant portions of /all/ of those markets (required by i believe the clayton act, at least here in the us)[17:48] <Wes--> and microsoft actually has a monopoly on desktop OSes[17:49] <Wes--> My "is it a monopoly" test is simple - can you reasonably live without them?[17:49] <deanlandolt> Wes--: i like that[17:49] <Wes--> bing, yahoo search are good enough[17:49] <Edgar1> well, by few or too, to me google is like microsoft[17:49] <Wes--> my iPhone works just fine[17:49] <Wes--> So does my sun box[17:49] <deanlandolt> but it's very context-related...i know some people that can't live without their iphone these days[17:49] <Wes--> and hotmail too[17:50] <Wes--> deanlandolt: that's not a monopoly, that's a killer product[17:50] <deanlandolt> agreed...but you said that's your "is it a monopoly" test[17:50] <Wes--> there are also people that can't live without their crackberries[17:50] <Wes--> deanlandolt: I would argue that very little that an iphone can do can't be done just as well (with mild retraining) in other ways[17:51] <Wes--> blackberry, treo, android, wince[17:51] <deanlandolt> Wes--: i couldn't agree more -- that' why i held that example out as a counterpoint to your monopoly test[17:51] <Wes--> deanlandolt: But it actually reinforces it, apple doesn't have a monopoly on the smart phone market. Just dedicate fan bois[17:52] <deanlandolt> i guess you did say "reasonably"[17:52] <deanlandolt> noone's ever called fanbois reasonable[17:52] <Wes--> LOL[17:54] <Edgar1> most of the people who uses apple products are like the people that thinks that their value as person is in a property, thinking that having kind of cool stuff they are better than others[17:55] <Wes--> Edgar1: that's a sweeping generalization that sounds a lot like sour grapes[17:55] <Wes--> I use apple's products because I like appliances[17:56] <Wes--> frankly, I have better things to do in my spare time than piss around with tweaking this, tuning that, blah de blah[17:56] <Edgar1> oh well[17:57] * Edgar1 wanted to make clear that most of the people arent everyone[20:22] <nrstott> hows it going Wes--[20:22] <nrstott> haven't had time to start messing with GPSEE and couchdb yet today, got some fires to put out cause paypal shut off one of my clients accounts (as they did thousdans apparently) in error[20:24] <Wes--> nrstott: plus side, jan___'s comments imply that you'll have few problems[20:24] <nrstott> Wes--, I noticed that, very encouraging.[20:24] <nrstott> I sent an email to dev@ last night and got no response so I was worried ;0[20:25] <nrstott> if this wokrs I'll be able to use the same model classes from my service layer written for JSGI inside of my List/Show and View functions in couchdb[20:28] <Dantman> Heh, this is pretty messed up... Rackspace Cloud charges $100/mo, and don't even provide competent php logs to help you find what's wrong with your app... (From the looks of it, they provide "raw logs" but they are only updated for you to view once a day)[20:29] <Dantman> Cloud Sites*[20:29] <Dantman> Rackspace Cloud is probably alright, just not Cloud Sites.[20:29] <MisterN> Cloud as in Cloud Server?[20:29] <MisterN> their ec2 competition stuff?[20:29] <Dantman> No, Rackspace clound has three things...[20:30] <Dantman> Cloud Sites, Cloud Servers, Cloud Files[20:30] <Dantman> Cloud Files is like s3, Cloud Servers is like ec2[20:30] <MisterN> and you mean servers+files is ok, but sites is not?[20:30] <Dantman> Mhmm[20:30] <Dantman> Cloud sites is like shared hosting, but with an implied cloud (you don't need to manage any number of servers, your site is just in the cloud)[20:31] <MisterN> Dantman: that sounds like a nice thing. much like google app engine, no?[20:34] <Dantman> I dunno, perhaps...[20:34] <Dantman> GAE is probably more robust though[20:35] <MisterN> i wouldn't be sure about that[20:35] <Dantman> Cloud sites only supports php5, cgi/perl, and asp[20:35] <deanlandolt> Dantman: can use JScript with asp?[20:35] <Dantman> No clue[20:35] <MisterN> and GAE supports python and java[20:36] <Dantman> As well as BigTable and other fancy things google developed iirc[20:36] <MisterN> Dantman: i don't think you get unlimited access to that[20:38] <deanlandolt> MisterN: there's a metered system though, so you can pay for as much access you need (once you breach the free quotas)...same for bandwidth/cpu et al[20:38] <MisterN> but anyways both GAE and cloud sites suck:[20:38] <MisterN> Flusspferd does not work on them![20:38] <deanlandolt> heh[20:38] <Dantman> Cloud Servers FTW.... (I hope)[20:39] <deanlandolt> MisterN: cloud's a pretty ambiguous word...i'm pretty sure flusspferd works on ec2 ;)[20:39] <Dantman> It's a shame they don't have an equiv of EBS though[20:39] <MisterN> deanlandolt: yeah :)[20:40] <Dantman> Though, they DO support multiple static ip's on the same instance (take that ec2 and your unfriendlyness to ssl forcing us to give our client's stores ugly urls like https://store.example.com:4332)[20:40] <Dantman> Oh, and ip sharing[20:44] <MisterN> Dantman: ec2 doesn't support ssl?[20:44] <Dantman> No it does, but it only supports one static IP per server[20:44] <Dantman> Which means that you can only have one SSL site, or else you need to use ports for each separate one[20:45] <Dantman> Or put each ssl site on it's own dedicated expensive ec2 isntance[20:46] <deanlandolt> Dantman: couldn't you put the ssl at the proxy on port 443?[20:46] * deanlandolt doesn't know much about ssl -- he typically works inside a corporate firewall[20:47] <inimino> SSL only supports one domain per IP address[20:47] <Dantman> SSL doesn't can't know the host until it has decoded the stream (because it's just a simple wrapper arround the entire stream), so you have to know the domain before hand[20:47] <MisterN> so no vhost[20:47] <Dantman> Unfortunately you also need to know what the domain of the request is so that you know what ssl cert to use[20:47] <deanlandolt> ah yes...makes sense[20:48] <Dantman> So you need the cert to decode the host, but you need the host to know what ssl cert to use[20:48] <deanlandolt> yeah, i follow now[20:48] <deanlandolt> interesting catch22[20:49] <Dantman> Your only options are multiple ip's pointing to the same server with each domain using it's own dedicated ip pointing to that server, using separate ports for each site to differentiate, or using a catchall cert[20:49] <Dantman> Of course catchall cert doesn't work when you use completely separate domains[20:50] <Dantman> Which is our case because we have completely different clients who each want their own store that needs it's own ssl[20:50] <Wes--> Two certs, two IPs[20:51] <Dantman> Mhmm, but ec2 only allows 1 static ip to be assigned to an instance[20:51] <Wes--> well, that sounds like ec2 is stupid. And that you need a proxy server.[20:52] <Wes--> or that you need a frames site!![20:52] <Dantman> ;) or you could just find a cloud host that offers something just like ec2 but is cheeper, supports multiple ports, and doesn't make you pay something like $400/mo to get live support[20:53] <Dantman> multiple static ip's*[21:12] <Dantman> The CommonJS wiki will probably end up somewhere one Cloud Servers eventually[21:12] <Dantman> on*[21:14] <Wes--> let me know when that happens so I can mirror, please ;)[21:15] <Dantman> Mirror?[21:41] <MisterN> Wes--: with javascript and hash urls, frames maybe are usable again :D[21:41] <Wes--> mistern: I still want my div.src back[21:42] <MisterN> Wes--: :)[21:46] <Dantman> Wes--, xhtml2?[21:46] <Wes--> dantman: NN4[21:47] <MisterN> NN4 had div?[21:47] <Wes--> MisterN: Yes, and layer[21:47] <MisterN> didn't it have the crazy <layer> stuff?[21:47] <MisterN> i thought it had ONLY <layer>[21:47] <Wes--> nope[21:47] <Wes--> but IIRC div did not have a .write method[22:07] <Dantman> When I get the new server setup I should definitely consider opening up mysql's port to external connections from the office[22:24] <Wes--> dantman: your office is 66.102.69.110[22:24] <Wes--> make sure you pick an easy password[22:25] <Dantman> Password?[22:27] <Wes--> you know, for the mysql root account[22:27] <Dantman> What's that IP actually?[22:29] <Dantman> Wes--,[22:29] <Wes--> srlsly! It's your office.[22:29] <Wes--> Open it up![22:30] <Dantman> No, it's not... Wrong IP, and we don't use MikroTilk RouterOS or whatever[22:50] <Dantman> Wes--, we use Zeroshell[22:51] <MisterN> wow 66.102.69.110 has a lot of open ports[22:53] <Dantman> Wes--, Open proxy, or are you really in Canada?[22:54] <MisterN> Wes-- is as canadian as one can get[22:54] <MisterN> he even drinks clamato juice[22:56] <Dantman> Heh, the most amusing part of Zeroshell is how Upgrade = Change CD and restart[23:22] <Wes-_> dantman: that IP is actually a router on the roof of my house[23:22] <Wes-_> surprised you couldn't figure that out, lol[23:34] <inimino> heh[23:34] <MisterN> Wes--: can you give me the telnet username and password? :)[23:34] <MisterN> username "wes" password "garland" didn't work :([23:39] <Wes-_> MisterN: it's less than 64 characters, get guessing. ;)[23:39] <MisterN> Wes--: useful tip :)[23:39] <MisterN> Wes--: but you shouldn't use telnet :P[23:41] <Wes-_> MisterN: I'm not the one using it, you are[23:41] <MisterN> you know what i mean, canadian!
Logs by date :