[00:00] mikeal: but it's all async [00:00] rchavik has joined the channel [00:00] mikeal: and it has a lot of semantics about killing and closing transactions on the browser equivolent of nextTick() [00:00] mikeal: and i hit this weird bug with doing ajax calls while my transaction was in a closure [00:00] bingomanatee has joined the channel [00:00] mikeal: and after i fixed it I thought "coding in the browser is like coding in node now" [00:01] mikeal: makes me really skeptical about all this stuff people are doing trying to make node more like the browser [00:01] tjholowaychuk: i try to make my CS stuff more like node [00:01] tjholowaychuk: .on instead of addEventListener n shit [00:01] tk has joined the channel [00:02] mikeal: for a second i thought you mean CS == CoffeeScript [00:02] bingomanatee: ACTION wants a dom based file system [00:02] tjholowaychuk: haha [00:02] mikeal: and i was like "TJ hates coffeescript" [00:02] Charuru has joined the channel [00:02] tjholowaychuk: tm [00:02] tiglionabbit: Marak: ok I read the weld readme, but I don't quite understand -- If you're on the client side, and you want to template something and add it to the page, where do you get your template from? [00:02] tjholowaychuk: i like jison [00:02] tjholowaychuk: coffeescript uses that [00:02] tjholowaychuk: lol [00:03] dcampano has joined the channel [00:03] briznad has joined the channel [00:04] mikeal: the talk jashkenas did at JSConf he encouraged everyone to write their own language instead of just using coffeescript [00:04] tjholowaychuk: i wouldnt really call outputting js writing a language [00:04] tjholowaychuk: it's like writing a lexer, using someone elses parser [00:04] tjholowaychuk: and outputing some strings [00:04] tiglionabbit: tjholowaychuk: that's what all compilers do [00:05] tjholowaychuk: compilers are far more complex [00:05] tiglionabbit: by that measure, C is not a language. It just outputs assembly. [00:05] mikeal: compilers do a lot more than that dude [00:05] mikeal: read the dragon book [00:05] tiglionabbit: a compiler is just a translater [00:05] tiglionabbit: it translates one language into another [00:05] tjholowaychuk: comparing something like gcc to CS, makes no sense [00:05] tjholowaychuk: lol [00:05] mikeal: the kinds of optimizations compiles and vms make are far greater than what a toJavaScript compiler does [00:05] sechrist has joined the channel [00:06] mikeal: tiglionabbit: not any modern compiler or vm [00:06] tiglionabbit: you don't have to have optimizations to be called a compiler [00:06] mikeal: sure, in the abstract you are correct [00:06] mikeal: but in the abstract, template systems are compilers [00:06] tiglionabbit: this is like saying scripting languages are not the same as programming languages [00:06] Twelve-60 has joined the channel [00:06] mikeal: and we don't call them that, cause that would be stupid [00:06] tjholowaychuk: all im saying, is it's not hard to translate a parse tree to an existing language [00:06] mikegerwitz: A compiler, by definition, transforms source code into a target language. The target langauge does not have to be machine code. [00:07] tiglionabbit: mikeal: well, we don't consider templates to be languages in the same way that programming languages are. They are usually not turing complete [00:07] mikeal: i've seen templates that are as far from js as coffeescript is and compile down to it [00:07] tjholowaychuk: and they are super basic because they have no runtime [00:07] tiglionabbit: tjholowaychuk: assembly is an existing language [00:07] tjholowaychuk: you just output some crap [00:08] tjholowaychuk: tiglionabbit yes i get it [00:08] tjholowaychuk: good job [00:08] tjholowaychuk: lol [00:08] tiglionabbit: hehe, sorry [00:08] mikeal: here is the difference i think tj is trying to make [00:08] mikeal: take a block of coffeescript [00:08] mikeal: stick it anywhere in any coffeescript file [00:08] tiglionabbit: you could have just said "coffeescript isn't as impressive as most compilers" :P [00:08] tjholowaychuk: sure [00:09] tjholowaychuk: i'll phrase it like that next time lol [00:09] mikeal: when you find that block in the compile target, it always looks the same [00:09] tjholowaychuk: "it's super basic" [00:09] mikeal: but if you did that to a block of C code, it would be drastically different depending on where it existed in the program [00:10] tiglionabbit: mikeal: why should it? If you change the order in which two functions are defined in a C file, I don't see why the output should be different [00:10] mikeal: for something that simplistic, *maybe* [00:11] tjholowaychuk: you're right, CS is totally as complicated as gcc [00:11] tjholowaychuk: haha [00:11] tjholowaychuk: totally [00:11] tiglionabbit: I didn't say that :P [00:11] mikeal: but compilers do a lot more to optimize instructions based on the context they appear in [00:11] mikeal: maybe not gcc, but at least llvm :P [00:11] ryanallenbobcat has joined the channel [00:12] mikeal: but seriously, llvm is fuckin hot [00:13] tiglionabbit: mikeal: coffeescript actually does care about context in some ways. Write a function that defines a local variable, then define that variable outside the function too. The function reacts to the context. This is actually a scary thing to me though, because it means coffeescript brings some ruby gotchas to javascript (shadowing variables is not allowed) [00:13] Marak: tiglionabbit: the html is the template [00:13] mikeal: i think in like 10 years only really old projecst will be using standard gcc [00:13] mikeal: tiglionabbit: that's called a closure [00:13] mikeal: :P [00:13] Marak: tiglionabbit: check out https://github.com/hij1nx/weld/tree/master/demo/public [00:13] tiglionabbit: mikeal: no [00:13] tiglionabbit: I am talking about shadowing here [00:14] mikeal: oh, that's because it hacks in lexical scoping [00:14] cagdas: hi guys, anyone successful to compile nodejs in Amazon micro instance? [00:14] Marak: tiglionabbit: https://github.com/hij1nx/weld/blob/master/demo/public/js/index.js [00:14] mikeal: which is the single most useful things it does [00:14] Marak: cagdas: im sure yeah [00:14] cagdas: by default settings it fails when I try [00:14] maushu: CANDY? WHERE?! [00:14] [[zz]] has joined the channel [00:14] cagdas: do you set anything specific before make? [00:16] newy_ has joined the channel [00:16] tiglionabbit: Marak: what is this demo showing me? [00:16] squaretone: jade is removing all the whitespace from my html. when i view source it is all run together. nice for production; annoying for dev. any way to turn it off? [00:16] ChrisPartridge: cagdas: got all the build deps? [00:16] tiglionabbit: Marak: how do I make it add something to the page that wasn't there before, in response to a user action? [00:16] cagdas: yes [00:16] davidbanham has joined the channel [00:17] cagdas: it works with small instance [00:17] ChrisPartridge: cagdas: well what error are you getting? [00:17] cagdas: but fails with micro instance [00:17] tiglionabbit: mikeal: my favorite thing about coffeescript is -> [00:17] mikeal: i don't care about syntax [00:18] tiglionabbit: mikeal: if I could rename the 'function' keyword in javascript to something short like -> I would be happy. [00:18] cagdas: ChrisPartridge: let me try [00:18] tjholowaychuk: tiglionabbit then dont type it [00:18] aberry has left the channel [00:18] tjholowaychuk: type "f" and have your editor complete it [00:18] mikeal: just type function, move along, write an app, get over it :) [00:18] zitchie has joined the channel [00:18] tjholowaychuk: yeah haha typing is not your bottleneck [00:19] Marak: tiglionabbit: you gotta RTFM, weld is an anti-templating engine, its prob much diffirent from anything you've done [00:19] Marak: tiglionabbit: its pretty gangster actually, i gotta start using it [00:19] tiglionabbit: oh also, I really like how, if you make an object on multiple lines, you don't have to put commas. No more IE "you can't have an extra comma" error. Oh and it does === by default, which is what you pretty much always really mean. etc. [00:19] Marak: tiglionabbit: if you join #nodejitsu , hijinx is there everyday, he can help you get a demo going [00:19] tiglionabbit: Marak: I read the manual, but there is no demonstration of doing this at runtime [00:20] tiglionabbit: so I don't get it [00:20] alex___ has joined the channel [00:20] Marak: tiglionabbit: what is runtime? [00:20] tiglionabbit: also i still don't see how I'm supposed to get access to the same templates on the client side and the server side [00:20] tiglionabbit: Marak: in response to users doing stuff [00:20] Marak: tiglionabbit: what is "users doing stuff" [00:20] tiglionabbit: Marak: Idk, maybe they clicked on something and I want to add a block of html to the page [00:21] Marak: tiglionabbit: weld(document.querySelector('.templateRow'), data.games); [00:21] tiglionabbit: in mustache I'd use a partial template and insert it [00:21] Marak: $('button').click(function(){weld(document.querySelector('.templateRow'), data.games); }); [00:21] tiglionabbit: where am I getting that templateRow from? [00:21] tiglionabbit: is it a hidden node in the document somewhere? [00:21] Marak: its a html fragment in your document [00:21] Marak: maybe hidden, maybe not [00:21] Marak: should prob not be hidden [00:22] Marak: since the parent dom node you start with should be visible [00:22] tiglionabbit: why would I have a visible template in the page? :P [00:22] alex___: hey all - does anyone know a good way to make their calls go AJAX when using the express framework ? I'm trying to set - app.set('view options', {layout: false}); but that seems to affect subsequent requests as well [00:22] Marak: tiglionabbit: stop thinking about templates [00:22] Marak: tiglionabbit: weld is template anti-matter [00:22] tiglionabbit: Marak: I don't see how this is usable [00:22] Marak: tiglionabbit: think about the actual problem you are trying to solve, not what templates do [00:22] tjholowaychuk: alex___: res.partial(), or res.render(view, { layout: false }) [00:22] tiglionabbit: alek___: pretty sure you can pass it in [00:22] Marak: tiglionabbit: well, thats because you dont understand it, traditional templating is a hard paradigm to break from [00:22] tiglionabbit: what he said [00:23] Marak: tiglionabbit: weld takes your dom and welds data to it [00:23] tokumine has joined the channel [00:23] tiglionabbit: Marak: ok. I have a list of things. Maybe there are no things in the list yet. A user clicks a button. Now I want to add a thing to the list. Normally, I'd have a template for that thing. [00:23] Marak: so you have a