00:00:01  * ircretaryquit (Remote host closed the connection)
00:00:08  * ircretaryjoined
00:05:00  <jez0990_>Raynos: re:"Weekend project idea! Build a custom distributed db on top of leveldb & map-reduce" +1, I'd tip my hat to see it happen
00:05:32  <Raynos>jez0990: https://github.com/rvagg/node-levelup/issues/54#issuecomment-12085089
00:05:39  <Raynos>if you know the answer to any of those questions it would help
00:21:56  <jjjjohnnny>are there pratfalls to proxying from http to https?
00:39:04  <jjjjohnnny>cuz i cant get it to work
00:39:10  <jjjjohnnny>getting ECONNRESET
00:59:59  * mikealquit (Quit: Leaving.)
01:05:42  * wiwilliaquit (Ping timeout: 240 seconds)
01:30:11  * mikealjoined
01:32:02  * devaholicquit (Ping timeout: 255 seconds)
02:01:20  * jibayquit (Quit: Leaving)
02:18:16  * dominictarrjoined
02:19:06  <isaacs>jjjjohnnny: how long were you detained for?
02:19:42  <isaacs>jjjjohnnny: if it was just for a few hours, $15K might actually be pretty good compensation
02:23:06  <mbalho>substack: use this generate function: var s = 2.0 * Math.PI / 32.0; return Math.sin(s * vx) + Math.sin(s * vy) + Math.sin(s * vz) < 0 ? 1 : 0;
02:23:28  <substack>that looks like a radial wave!
02:23:45  <mbalho>substack: that sounds about right
02:26:05  <substack>oh hah not what I was expected
02:26:08  <substack>*expecting
02:26:28  <substack>that is a crazy swiss cheese geometry
02:26:36  <mbalho>http://i.imgur.com/BHrzb.jpg
02:26:54  <mbalho>substack: that map makes me want orbit physics
02:27:20  <substack>mbalho: voxel gravity
02:27:55  <substack>you can dedicate a few cycles here and there to iteratively update a cached voxel gravity field
02:28:00  <mbalho>hah
02:28:11  <mbalho>i mean we arent even using web workers yet
02:28:19  <substack>and then you just consult the gravity voxel field whenever you need to compute gravity
02:28:25  <substack>you wouldn't even need web workers
02:28:45  <substack>the gravity changes appreciably so slowly you could get away with hardly ever recomputing it
02:28:51  <mbalho>oh good point
02:28:53  <substack>like every few minutes would be plenty probably even
02:29:02  <mbalho>every n edits
02:29:04  <jjjjohnnny>isaacs: 24 hrs + had to defend myself in court
02:29:11  <substack>but you can get away with spreading the update computation all of the place in time
02:30:07  <substack>jjjjohnnny: oh shit was that the rnc thing?
02:30:08  <jjjjohnnny>that is, I was charged
02:30:29  <jjjjohnnny>no it was the day before the invasion protest
02:30:34  <substack>no wait it was in nyc in 2004
02:34:55  <jjjjohnnny>the US needs more protests
02:34:57  <jjjjohnnny>had me thinking
02:36:05  <jjjjohnnny>given that protesters are representatives of ideas which are shared with non protestors
02:36:25  <jjjjohnnny>meaning that more people agree with the idea than there are protestros
02:38:45  <jjjjohnnny>so then
02:39:09  <jjjjohnnny>basically I wonder if a crowd funding platform can pay people to protest
02:39:14  <jjjjohnnny>full time
02:40:18  * dguttmanquit (Quit: dguttman)
02:42:45  * tphummelquit (Quit: tphummel)
02:44:07  <jjjjohnnny>which in turn shows that more people support the inititive than meets the eye
02:44:15  <jjjjohnnny>which is usually the case
02:45:52  <jjjjohnnny>which then might make protests more effective
02:49:24  <substack>mbalho: var r = Math.sqrt(x*x + z*z); return r < 40 && y < 5 * Math.sin(r) * Math.pow(r,-0.5)
02:49:55  <jjjjohnnny>just read this http://acko.net/blog/how-to-fold-a-julia-fractal
02:50:13  <jjjjohnnny>but im still pretty stupid afterwars
02:50:32  <substack>mbalho: http://substack.net/projects/radial-voxel-terrain/
02:51:26  <jjjjohnnny>sweet its like ima mayan sacrifice
02:51:59  <substack>there's even a sacrifice corridor in the very center
02:52:07  <substack>entirely unintentionally
02:52:32  * defunctzombie_zzchanged nick to defunctzombie
02:52:42  <substack>oh it's because Math.pow(0,-0.5) is Infinity
02:54:02  <jjjjohnnny>sometimes when i press w i move backwards slowly
02:54:11  <substack>because you're stuck in a block
02:54:26  <jjjjohnnny>and when i press s forward also slowly
02:54:35  <jjjjohnnny>but it happens first thing sometimes
02:54:41  <substack>yes
02:54:47  <substack>because you get stuck after falling
02:54:50  <substack>known issue
02:58:27  <jjjjohnnny>i want to be a fractal dragon
02:59:22  <mbalho>substack: ahaha
03:00:22  <dominictarr>Raynos: ping?
03:00:29  <Raynos>dominictarr: pong
03:02:47  <dominictarr>Raynos: I couldn't get sockjs-stream to work with reconnect
03:02:58  <Raynos>it should have worked
03:03:06  <dominictarr>you are meant to use it with a shoe server, right?
03:03:10  <dominictarr>from the server?
03:03:18  <Raynos>Yes
03:03:25  <Raynos>although
03:03:37  <Raynos>nope shoe server
03:03:58  <dominictarr>what server do you use?
03:04:04  <Raynos>shoe :p
03:04:09  <Raynos>ambigious nope
03:04:33  <Raynos>https://github.com/Raynos/sockjs-stream/issues/1
03:04:37  <Raynos>mention any reproduction here
03:07:27  <dominictarr>didn't you test it when you put the pull request into reconnect?
03:07:34  <dominictarr>I thought you where using it?
03:19:27  * thatguydanjoined
03:21:18  <Raynos>dominictarr: I did test it when I make a PR into reconnect
03:21:25  <Raynos>probably broke an invariant
03:23:24  <dominictarr>hmm, it would be better if shoe worked on the server.
03:23:34  <dominictarr>and had createServer and connect methods
03:28:49  <Raynos>probably
03:45:33  <dominictarr>instead, what it does, is if you are on the server, it gives you createServer, and if you are on the client it gives you connect.
03:51:44  * tilgoviquit (Read error: Operation timed out)
03:55:20  * dguttmanjoined
03:55:35  * No9quit (Ping timeout: 255 seconds)
03:57:32  * No9joined
03:58:25  * evboguejoined
03:58:40  <defunctzombie>isaacs: ping https://github.com/joyent/node/pull/4493
04:02:09  * dguttmanquit (Quit: dguttman)
04:06:23  * evboguequit (Ping timeout: 265 seconds)
04:10:32  * dominictarrquit (Quit: dominictarr)
04:11:43  <defunctzombie>isaacs: when cluster became a builtin the module was broken as a result
04:12:05  <defunctzombie>having a process module in npm is weird if you also have the process global
04:12:10  <defunctzombie>I am not advocating removing the global
04:12:19  <defunctzombie>but why would you want to introduce more non standard globals?
04:12:24  <defunctzombie>just cause you can and don't care?
04:12:41  <defunctzombie>clearly there is support for this
04:12:48  <defunctzombie>and a valid usecase
04:13:00  <defunctzombie>(beyond the fact that you are introducing globals when you don't need to be)
04:14:52  <defunctzombie>just make it a change for 0.10 and if you make it well known it isn't gonna break shit
04:19:52  <isaacs>defunctzombie: 'cluster' was already a builtin in unstable when tj released cluster.
04:19:58  <isaacs>defunctzombie: and it was a HUGE pain in the ass all the same.
04:20:10  <isaacs>defunctzombie: we're not going to add another public builtin module ever again in node.
04:20:17  <defunctzombie>really?
04:20:20  <defunctzombie>ever again?
04:20:20  <isaacs>defunctzombie: yeah, realy.
04:20:24  <isaacs>defunctzombie: ever again.
04:20:28  <defunctzombie>even if it is already a builtin
04:20:31  <isaacs>defunctzombie: there are a few i'd like to remove.
04:20:34  <defunctzombie>and you just don't call it a module?
04:20:38  <isaacs>defunctzombie: yes.
04:20:41  <defunctzombie>why?
04:20:51  <defunctzombie>why do you not want to make things better for people?
04:20:58  <defunctzombie>everything you do in node libs is around modules
04:21:01  <isaacs>defunctzombie: because a) the scope of node's problem set is fixed, and b) i don't want to break userland modules.
04:21:04  <defunctzombie>why isn't process the same?
04:21:12  <isaacs>defunctzombie: process is a global.
04:21:15  <isaacs>there's only one process.
04:21:25  <defunctzombie>who cares?
04:21:26  <isaacs>(point of fact, there's only one require('fs') too, it's just a global with parens)
04:21:33  <defunctzombie>the info it returns is a library function
04:21:39  <isaacs>there's zero downside to making it a global.
04:21:40  <defunctzombie>sure
04:21:45  <defunctzombie>that is not true
04:21:51  <isaacs>and there's not zero downside to making it a new builtin module.
04:22:03  <isaacs>what's the downside of making it a global?
04:22:10  <isaacs>browserify can just shim it.
04:22:16  <isaacs>browserify already shims a ton of stuff.
04:22:36  <defunctzombie>harder to detect that you _should_ shim it
04:23:08  <defunctzombie>globals are adding to the language
04:23:12  <isaacs>defunctzombie: really? browserify walks the AST for require() calls, but can't walk the AST for 'process' references?
04:23:18  <defunctzombie>why not minimize what you essentially add to the language
04:23:19  <isaacs>that seems like a dubious argument.
04:23:26  <substack>I was just thinking this
04:23:27  <isaacs>defunctzombie: we're done making changes there.
04:23:29  <isaacs>locked.
04:23:38  <substack>that browserify should look at process refs
04:23:43  <defunctzombie>sure it can walk the ask, but why
04:23:46  <isaacs>sorry, if you have a time machine handy, go back in time 3 years, and convince me then, and i'm sure i'll agree with you.
04:23:50  <substack>and if I'm doing that I might as well write a commonjs optimizer
04:23:54  <defunctzombie>I mean.. yes we can do all this stuff
04:24:03  <substack>because those are pretty much the same problem
04:24:07  <isaacs>defunctzombie: it's not node's job to make browser modules work properly.
04:24:13  <isaacs>substack: yes, i think you should do this.
04:24:16  <isaacs>that is browserify's job.
04:24:36  <defunctzombie>it isn't about browser modules, it is about javascript modules in general
04:24:40  <substack>google closure is the only minifier that is commonjs aware that I know of
04:24:42  <isaacs>on hte matter of globals and public builtin modules, node is done
04:24:46  <substack>doesn't seem terrible hard actually
04:24:51  <isaacs>we may remove, but we will not add.
04:24:52  <substack>*terribly
04:25:17  <defunctzombie>really?
04:25:23  <defunctzombie>remove but not add
04:25:25  <isaacs>defunctzombie: yes, really.
04:25:28  <defunctzombie>when adding something that is already there
04:25:33  <defunctzombie>remove breaks more things
04:25:38  <isaacs>defunctzombie: require('process') is not already there.
04:25:41  <fotoverite>Not all the time.
04:25:45  <isaacs>defunctzombie: and it breaks the "process" package.
04:26:17  <defunctzombie>personally I think anything that would become a pain point for you guys would be changed no matter how breaky it is
04:26:22  <defunctzombie>it is just a matter of perspective
04:26:26  <defunctzombie>and desire
04:26:27  <defunctzombie>oh well
04:26:32  <defunctzombie>I am done
04:26:42  <defunctzombie>I realize it won't happen and will move on
04:26:59  <isaacs>defunctzombie: like i said, it's not a bad idea in principle. just in today's environment.
04:27:13  <isaacs>defunctzombie: as i have no time machine to lend you, i can't be of much help.
04:27:19  <defunctzombie>I think that is a weak argument imho
04:27:42  <substack>so long as you break backwards compat on the 'upgrade' event
04:28:05  <substack>I hate that event so much and it causes all websocket libraries to suck.
04:28:19  <defunctzombie>if you don't ever want to make things better at any cost then say that and that is fine
04:28:24  <defunctzombie>but then that has to be the case
04:28:28  <defunctzombie>not some variation on that
04:28:32  <defunctzombie>like we may remove
04:28:35  <defunctzombie>and that breakage is fine
04:29:02  <isaacs>defunctzombie: "at any cost" <-- that's always silly.
04:29:11  <isaacs>defunctzombie: if there was a value higher than the cost, i'd of course do it.
04:29:22  <isaacs>defunctzombie: but in this case, the value is minimal, and the cost is significant, so no.
04:30:23  <isaacs>if we remove modules, it won't be until we can do so without breaking userland programs.
04:30:35  <isaacs>and that might never actually happen
04:30:45  <isaacs>or it might be a new program that inherits from node, but is not node.
04:30:46  <isaacs>i don't knowp
04:31:27  <fotoverite>Node should be as thin as possible I feel. NPM is where you add in the other stuff YOU need.
04:31:40  <isaacs>fotoverite: yeah, like http
04:31:47  <fotoverite>Agreed
04:31:59  <fotoverite>Not everyone needs http or most of the modules
04:32:03  <isaacs>i don't know, though. probably that'll always be a fantasy
04:32:05  <fotoverite>you want a thin core that can be extended
04:32:06  <defunctzombie>isaacs: sure, I can understand that argument, but I do feel like we have version numbers for a reason
04:32:16  <isaacs>if anything, we'll probably end up making htp even more tightly wedded to node-core so that we can make it faster.
04:32:18  <defunctzombie>if 0.x.x is frozen then fine
04:32:28  <defunctzombie>but why have a new program?
04:32:34  <isaacs>defunctzombie: the goal of node is to not be still working on core in 5 years.
04:32:45  <isaacs>defunctzombie: this isn't like ruby where we're gonna dick around with it forever.
04:32:51  <isaacs>or python or perl or any other platform, for that matter.
04:32:56  <isaacs>the *point* of node is to finish it
04:33:01  <defunctzombie>isaacs: then it will just go away in 5 years
04:33:13  <defunctzombie>software is changing all the time
04:33:13  <isaacs>defunctzombie: nah, we'll still fix bugs, write userland stuff, upgrade v8
04:33:18  <defunctzombie>at the OS level and such
04:33:21  <isaacs>defunctzombie: but we're trying to finish the interfaces.
04:33:25  <defunctzombie>if you think that it will just not be worked on
04:33:25  <isaacs>like the OS, actually
04:33:36  <isaacs>where the interfaces have been effectively frozen in many areas for decades.
04:33:38  <defunctzombie>then you are going to just let it die
04:33:47  <isaacs>defunctzombie: is posix dead?
04:34:12  <isaacs>defunctzombie: like i said, there will be regular updates to v8, bug fixes, etc.
04:34:19  <isaacs>but new features? drastic api changes? no.
04:34:21  <substack>not fucking with something is how you win
04:34:24  <substack>look at awk
04:34:27  <isaacs>that's not something you need to be vital.
04:34:30  <defunctzombie>no one uses awk
04:34:37  <substack>awk is on every system ever
04:34:39  <isaacs>that's something you PUT UP WITH in order to FINISH the platform
04:34:42  * isaacsuses awk
04:34:46  <substack>awk, grep, sed
04:34:47  <defunctzombie>you and 5 other people
04:34:51  <isaacs>defunctzombie: lol
04:34:58  <isaacs>defunctzombie: i think a few more than 5 people use awk
04:34:58  <defunctzombie>;p
04:35:02  <substack>all of those are everywhere and nobody would even notice if grep stopped being worked on
04:35:09  <defunctzombie>I do like the notion of "finished" software
04:35:18  <isaacs>defunctzombie: grep is finished
04:35:22  <isaacs>defunctzombie: awk is finished
04:35:22  <defunctzombie>but I think you are calling it a bit early for node
04:35:26  <defunctzombie>yes
04:35:29  <fotoverite>awk grep send and cat. :P
04:35:31  <isaacs>defunctzombie: it won't be this year.
04:35:32  <defunctzombie>because changing them doesn't matter
04:35:34  <isaacs>but that's the goal.
04:35:41  <isaacs>defunctzombie: changing grep would matter SO MUCH!!
04:35:48  <defunctzombie>you are still in a position to make things better overall
04:35:52  <isaacs>defunctzombie: that would break all programs!
04:35:56  <defunctzombie>I hate when language and runtime begin to mix
04:36:13  <isaacs>defunctzombie: "remove a global that everyone uses, and break a userland package" = "not an improvement"
04:36:45  <substack>anyways I can just write more static analysis hacks to make this problem go away I think
04:36:58  <defunctzombie>substack: yes, obviously so can anyone
04:37:04  <substack>I've been meaning to write a feature-detection optimizer anyways
04:37:14  <isaacs>dinner time
04:37:17  <defunctzombie>my point is why have more hacks when the core issue is death to globals haha
04:37:22  <substack>module-aware
04:37:35  <isaacs>defunctzombie: "death to globals" is just pointless religion
04:37:40  <isaacs>give me a real reason.
04:37:42  <substack>you can do so many more easy optimizations if your optimizer understands how commonjs works
04:37:46  <isaacs>"require('fs')" is a global
04:37:55  <isaacs>there's only one, everyone gets the same one, it leaks to all modules, etc.
04:37:59  <isaacs>it's a global with parentheses
04:38:03  <isaacs>that's al
04:38:12  <substack>defunctzombie: in fact, the browserify v2 upgrades are just a special case of this optimizer
04:38:32  <isaacs>anyway...
04:38:34  * isaacs&
04:39:06  <substack>isaacs: importantly, the fs global is a global that you get to decide the name of
04:48:01  * dguttmanjoined
04:59:54  <isaacs>substack: the name is `require("fs")`
04:59:59  <isaacs>substack: you dont' get to decide that bit
05:00:34  <isaacs>substack: this whole require() module thing is just a bit of sugar we sprinkled in everyone's eyes so that they don't see that it's still the same old globals
05:00:39  <isaacs>namespaces are the same thing
05:01:03  <isaacs>the key innovation is that require('whatever') is *not* a global if it's not a builtin
05:01:11  * mikealquit (Quit: Leaving.)
05:01:43  <isaacs>core modules are, effectively, globals, just as surely as any singleton
05:01:48  <isaacs>require('/absolute/path') is also
05:03:24  <isaacs>if you think about what actually makes a global 'global', it's quite clear
05:15:13  <defunctzombie>imho there should be no globals outside of what is absolutely necessary for the system to function
05:15:17  <defunctzombie>require and module.exports
05:15:29  <defunctzombie>are there because js has no module system
05:15:37  <defunctzombie>but once you have modules, everything else is a module
05:15:41  <defunctzombie>just like the 'os' module in python
05:15:50  <defunctzombie>which provides the same stuff out process global does
05:17:57  <defunctzombie>isaacs: if you have made up your mind that is fine.. I understand, and not breaking things is an argument I can accept :) I was mostly just following up on why I felt it was a good thing to make the change
05:18:45  <defunctzombie>good as in going forward, not good as in absolutely critical and life will stop if we don't do it :p
05:31:27  * mikealjoined
05:35:52  * st_lukequit (Remote host closed the connection)
05:36:15  * dguttmanquit (Quit: dguttman)
05:42:06  * dominictarrjoined
05:46:37  <isaacs>defunctzombie: builtin modules ARE globals
05:46:40  <isaacs>defunctzombie: that's my point
05:46:51  <Raynos>isaacs: there not globals
05:46:55  <isaacs>defunctzombie: what youer' really saying is that all globals should have () in their names
05:46:56  <Raynos>are there tokens you can import
05:47:09  <isaacs>Raynos: there is only one require("fs")
05:47:14  <isaacs>and it's always spelled require("fs")
05:47:15  <Raynos>ah yeah
05:47:19  <Raynos>i forgot its cached
05:47:23  <Raynos>ok if you didnt cache them
05:47:26  <Raynos>then they would be local!
05:47:32  <isaacs>cached or not, it's *always* process.binding('natives').fs
05:47:37  <isaacs>i mean, that's always where it gets the code
05:47:45  <isaacs>you can't override it with a userland module
05:47:47  <Raynos>ugh
05:47:55  <isaacs>builtin == global
05:47:56  <Raynos>but theres a seeprate thing
05:48:06  <isaacs>"separate thing"?
05:48:07  <Raynos>require is way nicer
05:48:11  <isaacs>hair splitting
05:48:15  <isaacs>you just prefer that spelling
05:48:18  <Raynos>no
05:48:26  <isaacs>what's nicer about it?
05:48:26  <Raynos>i like require
05:48:31  <Raynos>because its a function I can mock out
05:48:32  <Raynos> and intercept
05:48:33  <defunctzombie>it is consistent
05:48:40  <defunctzombie>that is what is nicer about it
05:48:45  <isaacs>node.fs was actually nicer, imo
05:48:49  <isaacs>because it looked like the global it was
05:48:52  <defunctzombie>how do I use non language keywords, oh I use require
05:48:56  <isaacs>(actually it was node.posix, which was the wrong name)
05:49:26  <defunctzombie>don't leak implementation detail to interface
05:49:27  <Raynos>isaacs: btw im not saying remove process global thats stupid
05:49:45  <isaacs>Raynos: we're not going to alias the process global to the require('process') global
05:49:46  <Raynos>isaacs: I use require as my host environment abstraction
05:49:48  <isaacs>Raynos: ever.
05:50:01  <Raynos>that's what it's about for me.
05:50:16  <isaacs>Raynos: you use browserify for non-node env's yes?
05:50:16  <Raynos>I don't like using globals for my environment
05:50:24  <Raynos>correct
05:50:31  <Raynos>and the fact that browserify injects process as a special thing
05:50:32  <isaacs>Raynos: so get browserify to mock out process if you use process
05:50:35  <Raynos>is ugly
05:50:46  <isaacs>Raynos: browserify also injects require('fs') as a special thing
05:50:47  <Raynos>it's about require being way nicer
05:50:53  <isaacs>why's require "way nicer"?
05:51:02  <isaacs>it's more characters, a function call, etc.
05:51:02  <Raynos>because it's explicit
05:51:09  <isaacs>global.process <-- explicit
05:51:20  <isaacs>var p = process <-- you can map it to whatever token you liek
05:51:28  <defunctzombie>isaacs: because it is a consistent way to bring in external functionality
05:51:30  <Raynos>it's about where my non local tokens come from
05:51:38  <Raynos>i dont want non local tokens to exist
05:51:41  <defunctzombie>you already extended the language with require
05:51:42  <Raynos>var window = require("window")
05:51:45  <dominictarr>Raynos: isaacs is right, we've passed the point where we can really make that change
05:51:47  <Raynos>var buffer = require("buffer")
05:51:56  <isaacs>Raynos: but Buffer is alreayd a global anyway
05:51:58  <isaacs>like TypedArray
05:52:00  <isaacs>and String
05:52:01  <Raynos>dominictarr: aliasing to require("process") breaks almost nothing
05:52:08  <Raynos>isaacs: those globals are retarded
05:52:12  <isaacs>Raynos: it breaks a userland package.
05:52:12  <Raynos>var String = require("string")
05:52:12  <defunctzombie>I bet it actually breaks nothing
05:52:20  <isaacs>defunctzombie: npm install process
05:52:23  <isaacs>defunctzombie: it breaks that
05:52:23  <Raynos>isaacs: the userland module is a no-op
05:52:25  <defunctzombie>isaacs: that userland package does nothing
05:52:29  <isaacs>really?
05:52:31  <defunctzombie>yes
05:52:32  <Raynos>isaacs: it doesn't actually break anything
05:52:33  <defunctzombie>look at it
05:52:45  <Raynos>the userland module has zero side effect in node.js
05:52:55  <Raynos>and exports zero tokens
05:53:03  <Raynos>the only way you could possibly break it
05:53:22  <Raynos>is the invariant that `Object.keys(require("process")).length === 0`
05:53:44  <Raynos>and any program relying on that invariant is a silly program
05:53:50  <isaacs>ok
05:54:04  <Raynos>isaacs: if it actually broke the userland module you would have an argument and that would be fine.
05:54:35  <Raynos>btw I dont mind the Buffer global as much
05:54:41  <Raynos>it's nowhere near as stateful as the process global
05:54:45  <isaacs>Raynos: do you mind the require("fs") global?
05:54:51  <isaacs>Raynos: or the require('net') global?
05:54:58  <Raynos>those aren't globals
05:54:59  <isaacs>those globals have parens in the names, but they're 100% global
05:55:01  <dominictarr>it just creates globel
05:55:01  <isaacs>yes, then are globals.
05:55:02  <Raynos>those are opt in tokens
05:55:04  <dominictarr>global
05:55:10  <Raynos>no they aren't
05:55:12  <dominictarr>in ember
05:55:13  <isaacs>as surely as a singleton or a namespaced object
05:55:15  <isaacs>they're globals
05:55:18  <Raynos>you have to require them
05:55:21  <isaacs>Raynos: hahah
05:55:22  <Raynos>for them to be in my scope
05:55:26  <Raynos>globals are in my scope by default
05:55:31  <isaacs>Raynos: process you have to type `process` for it to be in your scope
05:55:43  <isaacs>Raynos: what's in your scope is invisible to you
05:55:47  <isaacs>Raynos: until you invoke it
05:56:12  <Raynos>the thing is
05:56:16  <Raynos>and it might be a style thing
05:56:21  <defunctzombie>isaacs: that is not true, it is implictly in the scope
05:56:23  <Raynos>is that I really like my list of 30 requires at the top of my files
05:56:25  <defunctzombie>versus explicitly
05:56:25  <dominictarr>This is not really a big deal guys, it just makes writing a browserify easier
05:56:33  <isaacs>defunctzombie: i dint' say it wasn't there. i said that you can't tell unless you touch it
05:56:38  <dominictarr>that is the thing here
05:56:39  <Raynos>dominictarr: it makes mocking out process way easier
05:56:46  <isaacs>dominictarr: word from substizzle is that it's not hard anyway
05:57:04  <Raynos>dominictarr: It allows me to remove process from my jshint global whitelist
05:57:12  <fotoverite>isaacs: And I think substack would know
05:57:15  <isaacs>defunctzombie: if you want explicit, do var p = process
05:57:16  <isaacs>there, explicit
05:57:26  <Raynos>or `var process = global.process`
05:57:30  <isaacs>sure, or that
05:57:33  <chrisdickinson>so the argument is that require('process') > process as a global, where require('process') would just export the process global?
05:57:33  <fotoverite>You know this is now starting to sound like the great comma first debate.
05:57:53  <dominictarr>Raynos: remove something from a config file, oh sorry, I didn't realize.
05:57:55  <Raynos>I just like consistency
05:58:04  <dominictarr>we should definately make a change to core for that!
05:58:07  <isaacs>i know it's like a total pet peeve and stupid, but i do get kind of Duty Calls about this whole "globals are bad" dogma.
05:58:38  <isaacs>globals should be minimized, but if you replace a global foo with my.namespace.foo or require('foo') or Foo::getInstance(), then it's still a global
05:58:48  <defunctzombie>I write javascript modules, node.js is one environment where those modules run. I love the fact that I can write them in such a way to make them run in different environments but at the end of the day it is javascript and process does not exist there. I understand that require had to be added to get modules working, but why add more if you don't have to? You are not the language. Language != libs
05:58:58  <defunctzombie>I do love this discussion tho :)
05:59:09  <isaacs>defunctzombie: do you know that 'require' is actually NOT a global?
05:59:18  <defunctzombie>yes
05:59:20  <isaacs>defunctzombie: nore is module, __dirname, or __filename
05:59:26  <Raynos>isaacs: the point is consistency about getting the global
05:59:43  <dominictarr>the singleton you mean
05:59:49  <defunctzombie>the point is consistency is anything that is not a language keyword
05:59:58  <defunctzombie>yes, the singleton, but again.. implementation detail
06:00:09  <isaacs>require is a free var
06:00:25  * mikealquit (Quit: Leaving.)
06:00:26  <isaacs>would it please you if we passed global.process as an arg named "process" into the module wrapper?
06:00:33  <isaacs>then, voila!, no more global proces
06:00:36  <isaacs>and all prograsm keep working!
06:00:47  <defunctzombie>if you think about what process does, overall it says nothing about a singleton
06:00:49  <Raynos>not me.
06:00:50  <isaacs>this is all hairsplitting!
06:01:07  <defunctzombie>ALL SYNTAX IS HAIRSPLITTING
06:01:20  <defunctzombie>it is just about being consistent and talking about it
06:01:27  <isaacs>if multiple different units of code all access the same thing, using the same syntax, and changes that one make are immediately visible to all, you've got yourself a global.
06:01:32  <defunctzombie>none of this crap is some life or death situation
06:01:43  <Raynos>isaacs: Any library that allows injecting different implementations through `require` benefits from this
06:01:45  <defunctzombie>none of it matters man.. it is just stuff we do to make other stuff easier/harder
06:01:49  <Raynos>specifically mocking out `process.nextTick` cleanly
06:01:52  <dominictarr>guys, guys, it's simple. just fork node and go live on top of a mountain
06:01:57  <isaacs>the only real hazard aobut global.process which require('process') avoids is that `delete global.process` will break others.
06:01:59  <defunctzombie>+1
06:02:03  <fotoverite>+!
06:02:07  <defunctzombie>http://nodejs.org/api/process.html
06:02:15  <defunctzombie>this is documented just like any of the other modules
06:02:20  <defunctzombie>so why they hell can't I require it?
06:02:36  <isaacs>defunctzombie: you also can't require('documentation') and there's a doc page for that
06:02:41  <defunctzombie>I require all the other things on that list (minus the things that aren't even modules)
06:02:53  <defunctzombie>maybe that says something about the documentation :p
06:02:58  <Raynos>defunctzombie: I cant require console!
06:02:59  <Raynos>I think
06:03:00  <isaacs>defunctzombie: or require('synopsis')
06:03:13  <Raynos>oh wait I can!
06:03:19  <isaacs>Raynos: you can require('console')
06:03:20  <defunctzombie>Raynos: yes you can
06:03:24  <defunctzombie>and also timers
06:03:24  <isaacs>Raynos: it's just a global getter
06:04:03  <isaacs>fuckit. imma build my own node, with process.binding() and nothign else.
06:04:21  <defunctzombie>hahaha
06:04:37  <defunctzombie>node for cats
06:04:43  <fotoverite>node for dogs!
06:04:50  <fotoverite>Can't leave the dogs out of the equation
06:04:52  <defunctzombie>get out
06:05:35  <isaacs>defunctzombie: javascript modules belong in userland.
06:05:39  <isaacs>especially the module system
06:05:40  <dominictarr>isaacs: +1 for node2
06:05:42  <isaacs>it's too complicated.
06:05:51  <isaacs>cluster? bah. wayy too magical.
06:05:55  <isaacs>and http? total fuckup.
06:05:55  <defunctzombie>isaacs: I agree
06:06:08  <defunctzombie>node could have just been basically libuv with v8
06:06:10  <isaacs>you have process.binding('net') and process.binding('http_parser') WHAT MORE DO YOU NEED?
06:06:13  <dominictarr>+1 +1 +1 +1
06:06:18  <defunctzombie>you don't even need http parser
06:06:27  <isaacs>defunctzombie: yeah, you kinda do. or a replacement for it
06:06:30  <defunctzombie>you just need a way to hook into an event loop and sockets
06:06:31  <dominictarr>how do you load files in the module system?
06:06:40  <isaacs>dominictarr: process.binding('fs')
06:06:42  <isaacs>obviously
06:06:48  <dominictarr>oh rite
06:06:50  <isaacs>streams? for children
06:06:51  <defunctzombie>jesus
06:07:08  <isaacs>look, you guys, i've been writing javascript against the process.binding interface for a while now.
06:07:12  <isaacs>ITS AWFUL
06:07:13  <defunctzombie>if you make it hard to use modules (this includes loading them) people are less likely to do it
06:07:14  <dominictarr>so, you have open, read, close
06:07:27  <isaacs>defunctzombie: exactly
06:07:37  <defunctzombie>this is why require is nice
06:07:37  <isaacs>100% never happens.
06:07:41  <defunctzombie>yes
06:07:48  <isaacs>you get to 90% good, and you drop it, and move on
06:07:55  <isaacs>because there are areas of node where we're actually pretty awful
06:08:27  <isaacs>and so, to make sure we avoid wasting time on stupid stuff, anything that's 90% awesome, we just say, "Well, that's done. No sense messing with it."
06:08:29  <defunctzombie>the nice thing about node core docs imho about stuff like http, net
06:08:31  <dominictarr>and everyone remember this when you are working on 0.1 of the thing that makes node look like ruby
06:08:36  <isaacs>especially core stuff like the module system and globals.
06:08:47  <isaacs>dominictarr: YES! PLEASE!
06:09:17  <dominictarr>that will be a whiles away yet
06:09:18  <defunctzombie>I still favor consistency when possible
06:09:22  <dominictarr>but the time will come
06:09:37  <fotoverite>Nothing looks like ruby now. Which is a good thing. Oh god ruby 2.0
06:09:58  <fotoverite>It's such a shit storm. Ruby the bad parts.
06:10:06  <dominictarr>I liked ruby 1.8
06:10:35  <fotoverite>yes that was before matz benevolence started taking it's toll. I keep hearing about the most awful problems in core from brian ford.
06:11:06  <dominictarr>languages benefit from not changing
06:11:35  <defunctzombie>change happens.. new shit is invented
06:11:42  <dominictarr>we are lucky in js that the situation makes it difficult to change js, but encourages improving it's performance
06:12:12  <dominictarr>defunctzombie: yeah, but that isn't driven by innovation in the language layer
06:12:54  <defunctzombie>Raynos: maybe the guy with the process module will take a pull request to just module.export process and we can use that
06:13:02  <dominictarr>ruby and python change too fast. c and js change at a better rate
06:13:06  <Raynos>defunctzombie: that works
06:13:12  <defunctzombie>Raynos: then document the method calls on that readme
06:13:13  <Raynos>but fff `npm i require` >_<
06:13:17  <dominictarr>defunctzombie: now you are thinking
06:13:22  <defunctzombie>and pretend it is userland
06:13:28  <defunctzombie>Raynos: well, what are ya gonna do
06:13:44  <defunctzombie>have to take matters into our own hands haha
06:13:48  <Raynos>spend time fixing fs so its performant enough for leveldb in pure js
06:14:01  <defunctzombie>haha
06:14:22  <dominictarr>Raynos: how fast would a crude implemantion be?
06:14:24  <Raynos>Actually what I am going to do
06:14:31  <Raynos>is find a house
06:14:33  <Raynos>to live in
06:14:34  <Raynos>thats nice.
06:14:40  <Raynos>This is way more important then programming
06:14:45  <Raynos>dominictarr: I dont know
06:14:58  <Raynos>i might implement leveldb on top of fs-reduce
06:15:06  <dominictarr>for small N it would be fine
06:15:09  <Raynos>and open pull requests on gozala's code asking him to optimize it
06:15:28  <dominictarr>issues, you mean.
06:15:55  <dominictarr>does fs-reduce use fs or binding('fs')
06:15:57  <dominictarr>?
06:17:29  <Raynos>dominictarr: binding("fs")
06:17:41  <dominictarr>ah, cool
06:17:54  <defunctzombie>what is the difference?
06:18:18  <Raynos>it returns reducibles
06:18:37  <defunctzombie>I mean with binding('fs')
06:19:13  <Raynos>binding('fs') is libuv stuff
06:19:47  <rvagg>Raynos, dominictarr, fwiw I've started tinkering with leveldb in js, just for fun
06:20:04  <rvagg>I can do a basic parse of .log files
06:20:07  <dominictarr>rvagg: cool
06:20:23  <rvagg>not that I actually have time for such frivolity!
06:20:30  <defunctzombie>ah.. that stuff
06:20:48  <dominictarr>I had a look at that but I couldn't figure out how the checksums or whatever was after the record worked
06:21:10  <dominictarr>like, you have a length delimited key, value, then some noise
06:21:19  * mikealjoined
06:21:28  <dominictarr>hmm, maybe it's a skiplist?
06:22:44  <rvagg>it's got a squished up length field, that makes it a bit tricky, but once you have that then you can pull out batch records
06:23:08  <rvagg>but then the data can be fragmented across multiple separate records so you have to piece it back together
06:23:09  <dominictarr>I might be thinking about the .sst files instead
06:23:44  <rvagg>mm, possibly, I haven't bothered touching .sst yet, I'm interested to see how far I can get with .log before I have a mental breakdown
06:25:13  <dominictarr>rvagg: what spec are you working from?
06:25:42  <rvagg>I'm working from the leveldb C++, what I've read is just too vague
06:25:55  <dominictarr>right
06:26:29  <dominictarr>the sst is the sorted string table, but the log is just temporary
06:26:41  <dominictarr>it's loaded into memory, I understand
06:28:11  <mbalho>http://maxogden.github.com/voxel-world-function/
06:28:13  <mbalho>substack: o/
06:31:47  * defunctzombiechanged nick to defunctzombie_zz
06:36:41  * dominictarrquit (Ping timeout: 255 seconds)
06:51:48  * thatguydanquit (Ping timeout: 264 seconds)
06:51:56  <Raynos>If anyone has used one of my modules. What is their favourite?
07:05:56  * mikealquit (Quit: Leaving.)
07:12:35  * mikealjoined
07:19:17  * st_lukejoined
07:34:30  * wiwilliajoined
07:40:17  <mbalho>substack: http://maxogden.github.com/voxeljs.com/ im gonna tweet it out in the morning
07:46:27  * evboguejoined
07:51:22  * dominictarrjoined
07:59:15  <jez0990_>mbalho: very spiffy
07:59:48  <jez0990_>just found a bug though, the @substack link at the bottom goes to your twitter page :P
08:00:41  <mbalho>jez0990_: oopsies
08:03:12  * dominictarrquit (Ping timeout: 264 seconds)
08:09:53  * dominictarrjoined
08:38:44  * AvianFluquit (Remote host closed the connection)
08:52:26  * dominictarrquit (Quit: dominictarr)
08:54:42  * ralphtheninjaquit (Ping timeout: 264 seconds)
09:02:08  * wiwilliaquit (Ping timeout: 255 seconds)
09:07:11  * ralphtheninjajoined
09:19:29  * dominictarrjoined
09:21:28  * st_lukequit (Remote host closed the connection)
09:24:48  * evboguequit (Ping timeout: 264 seconds)
09:32:17  * evboguejoined
09:41:57  <niftylettuce>mbalho: too cool bro
09:48:29  <substack>mbalho: set yield to >= 4
09:50:45  <substack>haha love this part: "If you find bugs it is because we don't really know what we are doing."
09:53:11  <substack>website looks great
09:57:00  <substack>aha I see jlord made it at the bottom
10:00:03  <niftylettuce>LOL
10:00:13  <niftylettuce>that part hilariou
10:00:13  <niftylettuce>s
10:07:30  * thatguydanjoined
10:07:35  * thatguydanquit (Client Quit)
11:21:41  * jibayjoined
11:55:57  * dominictarrquit (Quit: dominictarr)
13:12:56  * devaholicjoined
13:42:54  * AvianFlujoined
13:55:05  * No9quit (Ping timeout: 265 seconds)
13:56:17  * No9joined
14:02:49  * dominictarrjoined
14:19:05  * defunctzombie_zzchanged nick to defunctzombie
14:25:25  <defunctzombie>Raynos: I don't always pay attention to who wrote what, but I like your 'after' module :) very simple and useful
14:25:37  <defunctzombie>you should update the github url in the readme tho
14:26:11  * dguttmanjoined
14:34:45  * dguttmanquit (Quit: dguttman)
14:35:47  * dguttmanjoined
14:46:30  * defunctzombiechanged nick to defunctzombie_zz
14:54:54  * dguttmanquit (Quit: dguttman)
15:00:14  * dguttmanjoined
15:03:46  * dguttmanquit (Client Quit)
15:15:03  <guybrush_>holy cow this is just beautiful! http://www.youtube.com/watch?v=CWUU0vvWLRo
15:48:19  * dguttmanjoined
15:54:41  * No9quit (Ping timeout: 248 seconds)
15:57:11  * No9joined
16:07:17  * mikealquit (Quit: Leaving.)
16:21:00  * mikealjoined
16:34:24  * tphummeljoined
17:05:59  * mikealquit (Quit: Leaving.)
17:08:37  * wiwilliajoined
17:09:39  * tphummelquit (Remote host closed the connection)
17:15:57  * mikealjoined
17:25:18  * No9quit (Ping timeout: 264 seconds)
17:59:08  <jesusabdullah>substack: tell max nice voxeljs site
17:59:19  <jesusabdullah>IMMEDIATELY
17:59:31  <mbalho>im in irc
18:04:38  * gwenbelljoined
18:08:41  * devaholicquit (Ping timeout: 240 seconds)
18:12:41  <chrisdickinson>whoa, nice
18:12:54  * devaholicjoined
18:26:09  * devaholicquit (Ping timeout: 248 seconds)
18:32:30  <chrisdickinson>substack: https://github.com/substack/ever/pull/5 -- makes ever chainable, like EventEmitter
18:35:24  <rowbit>/!\ ATTENTION: (default-local) paid account successfully upgraded /!\
18:35:25  <rowbit>/!\ ATTENTION: (default-local) [email protected] successfully signed up for developer browserling plan ($20). Cash money! /!\
18:42:28  * gwenbellquit (Ping timeout: 248 seconds)
18:43:00  * evboguequit (Ping timeout: 248 seconds)
18:57:13  * dominictarrquit (Quit: dominictarr)
19:26:25  * defunctzombie_zzchanged nick to defunctzombie
19:28:46  * No9joined
19:33:14  <rowbit>/!\ ATTENTION: (default-local) [email protected] successfully signed up for developer browserling plan ($20). Cash money! /!\
19:33:14  <rowbit>/!\ ATTENTION: (default-local) paid account successfully upgraded /!\
19:38:57  * tilgovijoined
19:40:35  * No9quit (Ping timeout: 255 seconds)
19:41:26  * No9joined
19:46:11  <Raynos>isaacs: I guess I should fix and land objects in _read pretty asap
20:01:37  * tilgoviquit (Ping timeout: 248 seconds)
20:04:52  * defunctzombiechanged nick to defunctzombie_zz
20:09:23  * No9quit (Ping timeout: 255 seconds)
20:11:04  * No9joined
20:13:52  * st_lukejoined
20:13:59  * st_lukequit (Remote host closed the connection)
20:14:42  * st_lukejoined
20:37:06  * devaholicjoined
20:40:06  * No9quit (Ping timeout: 252 seconds)
20:41:12  * No9joined
21:01:43  <fotoverite>voxeljs is going to blow up so big
21:02:04  <mbalho>fotoverite: why
21:02:13  <mbalho>fotoverite: i has like 30 retweets that aint bieber
21:02:30  <fotoverite>mine craft in the browser?! c'mon it'll take a few days
21:02:37  <mbalho>haha
21:02:38  <fotoverite>nodecopter didn't happen all at once or node.
21:12:19  * No9quit (Ping timeout: 276 seconds)
21:13:29  * tilgovijoined
21:16:46  <CoverSlide>i remember FEZ being demoed years ago. looks like it's finally going somewhere
21:20:53  * gwenbelljoined
21:20:54  * evboguejoined
21:32:38  * evboguequit (Ping timeout: 256 seconds)
21:32:53  * gwenbellquit (Ping timeout: 244 seconds)
21:41:01  <Raynos>substack, dominictarr, isaacs: how do you do error handling with http streams?
21:41:14  <Raynos>You can't just do stream.on("error", function (res) { res.statusCode = 500; res.end(err); }) because if error comes after the first "data" then the http headers have already been send
21:42:00  <CoverSlide>you can detect if the header has already been sent
21:42:29  <Raynos>well the problem with streaming errors
21:42:34  <Raynos>is that ive send half the stream
21:42:37  <Raynos>how do I send the error
21:46:27  * shuaibjoined
21:47:17  <CoverSlide>yes that is a pickle
21:48:17  <CoverSlide>depends on the content of the stream, if it's a simple bunch of buffers, i dunno. that depends on the client i guess.
21:53:07  <Raynos>anyone have any json compression algorithms?
22:06:37  <ralphtheninja>yeah error handling with streams is difficult, one of the trade offs I guess
22:06:42  * gwenbelljoined
22:06:43  * evboguejoined
22:11:11  <CoverSlide>difficult? that assumes it's possible. i think the main thing is assume it'll ok, let the client error out if the data is invalid
22:12:54  * yorickjoined
22:14:36  * tilgoviquit (Ping timeout: 264 seconds)
22:29:05  * evboguequit (Remote host closed the connection)
22:30:30  <isaacs>Raynos: if you want it in 0.10, yes, please.
22:30:59  <Raynos>isaacs: then I'll get it on it tonight, can you update readable-stream with whatever is in master? I prefer testing with readable-stream to 0.9
22:31:07  <isaacs>Raynos: when i get errors, if the headers have already been sent, i just .end() or .destroy() the socket
22:31:15  <isaacs>Raynos: sure.
22:31:17  <isaacs>i'll do that now
22:32:04  <Raynos>cool!
22:35:41  <isaacs>"now" = "after lunch" that is
22:37:13  * jibayquit (Quit: Leaving)
22:47:10  <CoverSlide>wow late lunch
22:55:12  * shuaibquit (Quit: Textual IRC Client: http://www.textualapp.com/)
23:09:53  * gwenbellquit (Ping timeout: 248 seconds)
23:16:27  <isaacs>CoverSlide: that's how i roll :)
23:37:48  * yorickquit (Remote host closed the connection)
23:38:29  <isaacs>Raynos: pushed on 0.2.0
23:38:41  <isaacs>Raynos: [email protected] == [email protected]
23:38:43  <Raynos>isaacs: thanks
23:38:45  <isaacs>np
23:50:49  * st_lukequit (Remote host closed the connection)
23:55:09  <Raynos>substack: https://github.com/substack/tape/pull/14
23:55:14  <Raynos>with tests!