00:00:02  * ircretaryquit (Remote host closed the connection)
00:00:08  <guybrush_>and theres so much stuff that is really hard lol
00:00:11  * ircretaryjoined
00:00:17  <guybrush_>like water and camera
00:00:43  <guybrush_>when you have water voxels besides normal voxels, it will "flicker"
00:00:59  <mbalho>ahh weird
00:01:16  <guybrush_>so you have to make one of the faces go away, so you have to rewrite the mesher-algo and everything gets fucked up and slow :p
00:02:32  <guybrush_>and the physic is so damn hard, i really have TONS of respect for all those game-developers of counterstrike and what not
00:11:34  <brianloveswords>I have respect for you guys, all of this seems way outta my league.
00:12:42  <brianloveswords>I've never done any GL stuff, I don't even know where to begin.
00:15:05  * mirkokquit (Quit: mirkok)
00:15:10  <chrisdickinson>brianloveswords: http://glsl.heroku.com/ is a great place to get used to glsl / fragment shaders
00:16:26  <chrisdickinson>see also: http://open.gl/
00:16:35  <chrisdickinson>(though it talks about the C api, it's applicable to webgl as well)
00:17:07  <guybrush_>brianloveswords: threejs makes webgl really easy
00:27:07  * AvianFluquit (Remote host closed the connection)
00:32:42  <mbalho>brianloveswords: i havent done any real low level graphics stuff yet
00:32:48  <mbalho>brianloveswords: like shaders or whatever
00:33:01  <Raynos>Does anyone have a console module that puts a nice DOM console into my page (like firebug-lite) ?
00:33:10  <Raynos>The IE9 console is pissing me off
00:33:47  <Raynos>paul_irish: There should be something like firebug lite for the webkit dev tool console
00:34:17  <Raynos>that would be a massive win. I already hate firebugs new console and ie's console has always been a disaster
00:36:11  <substack>brianloveswords: oh sweet defs stop by the east bay
00:40:07  <CoverSlide>whenever someone mentions oakland it makes me think of this: http://www.youtube.com/watch?v=cs1a4idxRiY
00:40:28  <CoverSlide>or this http://vimeo.com/43933877
00:40:33  * gwenbellquit (Ping timeout: 245 seconds)
00:46:29  * ryanclosnerjoined
00:50:11  * ryanclosnerquit (Client Quit)
00:50:56  * ryanclosnerjoined
00:53:22  * rclosnerjoined
00:53:33  * gwenbelljoined
01:01:25  <rclosner>attempting to programmatically transform OSM data into voxels (qualifier: i'm still digging through the voxel code base so i don't quite have my head wrapped around it yet). i'm starting from ground zero, and i'm looking for general thoughts on import strategies. first and foremost, is it likely that this something that could utilize the OSM API in realtime? if so, would it be terribly inefficient to go the basic route 1.)
01:01:25  <rclosner> start with a node, 2.) calculate its distance from its related nodes, 3.) convert that distance into voxel units, 4.) repeat?
01:02:35  <mbalho>rclosner: i am not super familiar with OSM APIs in general, what is their realtime stuff like?
01:03:31  <mbalho>rclosner: if you can like 'rasterize' the data so that you can run a loop where every meter or whatever you can ask if there is something there or not in the OSM data
01:04:06  <mbalho>substack: do you how one might go about doing that?
01:05:03  <rclosner>mbalho: just starting to take a look at the api. it looks like one can give a set of coordinates (4, i think) and get OSM data within that region. there are a number of other calls, but i haven't finished reading the documentation.
01:05:47  <mbalho>rclosner: imagine overlaying this on top of some terrain data or street data or whatever http://3.bp.blogspot.com/-Epk-6wb0nJM/UASagjJ2PzI/AAAAAAAAR10/l9V5dCoQOFw/s1600/pointCloudField_003.png
01:05:50  <rclosner>my thought is that if you started with current location, you could extrapolate a randomly generated region around it.
01:06:34  <mbalho>rclosner: yea if you can figure out how to query points XYZ space to get back if it is empty air or a building or something that would be cool
01:07:10  <mbalho>rclosner: the other way to do it would be to just use 2D data and then base the height of the voxels on the data at the X,Z point
01:07:24  <mbalho>rclosner: so if you are on top of a road you might make road 2 voxels high and colored as bricks
01:07:26  <rclosner>mbalho: right. the biggest thing atm is figuring out whether calculating distance in realtime is feasible.
01:07:40  <mbalho>rclosner: but if you are top of a field you could do 1vx high grass
01:09:09  <rclosner>mbalho: yeah, that was the other thing…. ideally i'd like to map each point in two steps. first x+y, then z. specifically because i think they are two different datasets. i downloaded an OSM region, but it didn't contain altitude of any of the points, (i don't think).
01:10:08  <mbalho>rclosner: i think in 3d x and z are the width and depth and y is the elevation
01:10:42  <rclosner>mbalho: any idea as to what a single voxel might convert to some sort of length measurement?
01:10:52  <rclosner>mbalho: ahhh.. thanks.
01:11:26  <rclosner>mbalho: i'd imagine you could make an estimate based upon the time it takes to walk a single voxel...
01:11:49  <mbalho>rclosner: i think 1 meter for a voxel would be a good starting point
01:12:01  <rclosner>mbalho: nice. easy enough.
01:13:02  <rclosner>mbalho: i'm going to mess around a little bit and see whether it would be possible to transform the OSM data in realtime.
01:13:27  <mbalho>rclosner: cool, another way would be do just precompute the whole world into voxels and stick it on a hard drive somewhere
01:14:34  <rclosner>mbalho: right, the only disadvantage is that we'd have to periodically run some sort of script (i imagine it would take awhile) to update the world in order to keep in sync with new OSM updates.
01:15:05  * ryanclosnerquit (Quit: Lost terminal)
01:17:30  <mbalho>rclosner: that would be an acceptable situation i think but if realtime is possible then might as well go for that
01:18:18  <mbalho>guybrush_: figured out my bug, i was doing require('three') in multiple modules but that broke it for some reason
01:18:32  <mbalho>guybrush_: such a dumb bug :/
01:18:42  <guybrush_>haa
01:18:54  <mbalho>guybrush_: so i just pass my one required version into my other modules constructor
01:19:33  <guybrush_>oh thats odd way to do it
01:20:22  <mbalho>well yea but only cause threejs node support is apparently buggy
01:20:36  <rclosner>mbalho: also, we're going to need to have a discussion on sane defaults for rendering metadata (like how we define the width of a 'highway' as opposed to a 'residential'). that'll be phase two, i think.
01:20:40  <guybrush_>i just wrapped it with my own window-shim
01:20:52  * AvianFlujoined
01:20:53  <mbalho>rclosner: yea definitely
01:21:08  <guybrush_>the threejs commonjs implementation is kinda... i just dont want to bother with that
01:21:22  <mbalho>guybrush_: its in core now https://github.com/mrdoob/three.js/tree/master/utils/npm
01:21:26  <mbalho>guybrush_: its just new
01:21:28  <guybrush_>yes i noticed
01:22:38  <guybrush_>i will have to modify things anyway
01:23:08  <guybrush_>i mean remove canvas and stuff, not sure how that is solved with this new utils/npm
01:23:21  <mbalho>it requires just fine you just cant use renderers
01:23:35  <mbalho>but you can do all the other stuff, there is nothing in there that relies on window.whatever
01:23:48  <guybrush_>oh nice
01:24:01  * shamaquit (Quit: shama)
01:24:02  <guybrush_>thought there is a reqanimframe thing in it at least
01:24:10  <guybrush_>also some mouse-event-things
01:24:12  <mbalho>npm install raf yo
01:24:37  <guybrush_>oh nice chrisdickinson did already a npm-raf :D
01:24:52  <guybrush_>kudos!
01:24:54  <chrisdickinson>thanks :D
01:25:15  <guybrush_>but did they remove it from three?
01:26:10  <guybrush_>well i have to check this new npm-feature in three sometime
01:26:26  <mbalho>first two lines of three.js on npm: var window = window || {};
01:26:27  <mbalho>var self = self || {};
01:26:44  <chrisdickinson>wuh-oh
01:26:49  <guybrush_>hm
01:26:55  <chrisdickinson>those'll always evaluate to undefined
01:27:03  <guybrush_>yes
01:27:26  <guybrush_>they should do something like `if�('undefined'�===�typeof(window))�var�window�=�this`
01:27:51  <guybrush_>but im not sure :D maybe their thing just works
01:29:12  <guybrush_>woah i just fixed such a dumb bug in my code, im really mad about myself now
01:30:21  * dookjoined
01:30:42  * dookpart
01:35:29  <guybrush_>mikola should join this channel :p
01:45:52  <Raynos>whos mikola
01:46:41  <jjjjohnnny>substack: if i set watch to true in browserify how do i listen for updates?
01:48:19  <substack>jjjjohnnny: -v?
01:48:44  <jjjjohnnny>oh bundle.on('bundle')
01:50:04  <jjjjohnnny>using api
01:50:43  <rclosner>mbahlo: what's the size of the visible region when you load a voxel world?
01:53:57  * yorickquit (Read error: Connection reset by peer)
02:02:34  * exit2joined
02:03:19  <mbalho>rclosner: chunks are 32x32x32 voxels and there are 4x4x4 chunks
02:03:36  <mbalho>rclosner: all thats configurable but if you make too many chunks it starts to lag
02:04:14  <rclosner>mbalho: awesome!
02:08:30  <mbalho>guybrush_: is TheHydroImpulse the person you are making your game with?
02:10:28  <guybrush_>nah
02:10:36  <guybrush_>gocoffeecup
02:10:44  <rclosner>mbahlo: so (sanity check) if a voxel is a meter that would be something like a 16 km^2 region?
02:13:13  <rclosner>mbahlo: yeah…. we'll probably have to rely on stored point conversions.
02:13:27  <mbalho>rclosner: its like 2 million voxels or something
02:14:05  <rclosner>mbahlo: for sake of simplicity, i'm only considering it in 2D right now.
02:14:09  <mbalho>gotcha
02:14:25  <mbalho>so it would be (32*32) * (4*4)
02:14:28  <guybrush_>mbalho we got 1024^3 voxels working by just using 4bit per voxel instead of 8 ;D
02:14:32  <guybrush_>with 500mb ram
02:14:34  * exit2quit (Remote host closed the connection)
02:14:55  <mbalho>guybrush_: i use int8arrays
02:15:01  <guybrush_>we too
02:15:05  <guybrush_>just bitshift it
02:15:07  <mbalho>guybrush_: ahh
02:15:10  <mbalho>guybrush_: nice
02:15:35  <guybrush_>though we have to do 64^3 chunks, without it would be too much meshes -> fps-drop
02:15:53  <guybrush_>also you have to be clever with material-types and colors
02:16:29  <guybrush_>and the already mentioned problems with opacity (water and stuff)
02:16:33  <mbalho>yea
02:16:59  <guybrush_>but i talked to my mate and kinda convinced him that we have to go opensource :D
02:17:41  <guybrush_>but we agreed on releasing a first playable version of the game before that
02:18:01  <guybrush_>since everyone can look at the sourcecode its dumb to keep it closed anyway
02:18:43  <mbalho>sweet
02:19:04  <guybrush_>its not so much code anyway haha
02:19:13  <guybrush_>also its not like rocketsience
02:19:36  * rclosnerquit (Quit: Computer has gone to sleep.)
02:27:06  <jjjjohnnny>using api
03:09:53  * devaholicjoined
03:18:14  <guybrush_>mbalho: very soon we can play the voxels on mobile :DD https://plus.google.com/101501294230020638079/posts/E4bnxHu1er7
03:19:32  <mbalho>guybrush_: i saw that and also you can do it on iOS through that webgl canvas project from impactjs or whatever
03:19:41  <guybrush_>yes!
03:19:50  <guybrush_>take that native
03:28:10  <guybrush_>waaaahh isaacs did add the git-dependencies-caching!! huge thx
03:28:18  * dguttmanquit (Quit: dguttman)
03:29:55  * tphummelquit (Quit: tphummel)
03:33:05  * dominictarrjoined
03:33:05  * dominictarrquit (Read error: Connection reset by peer)
03:34:59  <mbalho>substack: new version of the server has smooth x/z movement but y is not implemented yet http://voxel.jit.su
03:36:00  * gwenbellquit (Ping timeout: 276 seconds)
03:43:13  * gwenbelljoined
03:46:59  <jjjjohnnny>https://github.com/NHQ/opa
03:53:45  * gwenbellquit (Ping timeout: 256 seconds)
03:56:07  * dominictarrjoined
04:02:28  * dominictarrquit (Ping timeout: 248 seconds)
04:04:18  * gwenbelljoined
04:32:52  <chrisdickinson>interesting (for 2d games): http://info.sonicretro.org/SPG:Solid_Tiles
04:36:01  * defunctzombie_zzchanged nick to defunctzombie
04:39:24  <chrisdickinson>jjjjohnnny: ah, i use https://github.com/chrisdickinson/browservefy :D
04:40:55  * dominictarrjoined
04:44:03  <jjjjohnnny>chrisdickinson: good ideas have to be repeated
04:46:14  <jjjjohnnny>its probably a better idea to stream a fresh b-ify each request as you do
04:46:29  <jjjjohnnny>as listen does not always seem to work for me
04:46:34  * jibayquit (Read error: Connection reset by peer)
04:46:40  <jjjjohnnny>i mean watch
04:48:00  <dominictarr>Raynos: I had a similar idea about Readable, back when it was new
04:48:08  <Raynos>oh hi
04:48:16  <dominictarr>it really wants a Reader rather than a writable
04:48:30  <dominictarr>the Reader gets to control calling read()
04:48:39  <dominictarr>rather than being in this loop
04:48:45  <Raynos>yes!
04:48:55  <Raynos>But there are reasons why that doesnt work
04:49:03  <Raynos>like sometimes you dont want to pass a faux Readable to a thin
04:49:05  <Raynos>thing*
04:49:09  <Raynos>when you just want to call write instead
04:49:21  <dominictarr>sorry, explain
04:49:23  <Raynos>res(Readable(...)) would be silly
04:49:28  <Raynos>res.write(...) is better
04:49:37  <Raynos>i.e. if res was a Reader it feels weird
04:49:46  <dominictarr>oh right…
04:50:00  <dominictarr>it would force you to always create a stream, rather than calling write
04:50:13  <Raynos>Oh maybe
04:50:26  <dominictarr>well, there is a reason in java, dart etc (what Readable is based on)
04:50:37  <Raynos>a Reader can take either a Buffer, Readable or null
04:50:53  <dominictarr>they have a Readable, Writable, AND a StreamReader and a StreamWriter class
04:50:55  <Raynos>so you can have write by res(Buffer), pipe by res(Readable) and end by res(null)
04:51:25  <Raynos>but maybe that's stupid
04:51:31  <dominictarr>I'm not convinced about making reader a single function just yet
04:52:24  <dominictarr>but I think that a pull style stream does beg for a puller.
04:52:26  <Raynos>i dont think this idea goes anywhere useful
04:52:37  <dominictarr>here is a case...
04:52:38  <Raynos>its funny actually
04:52:44  <Raynos>with streams2 pull streams
04:52:46  <Raynos>we still use pipe
04:52:51  <Raynos>pipe effectively turns it into a push stream
04:52:57  <dominictarr>exactly
04:53:08  <dominictarr>what if you r.pipe(t).pipe(w)
04:53:17  <dominictarr>and then w pauses
04:53:23  <dominictarr>it still fills up t
04:53:30  <dominictarr>until it decides to pause
04:53:36  <Raynos>well
04:53:44  <Raynos>a writable applies back pressure
04:53:46  <Raynos>so it stops reading from t
04:53:51  <Raynos>t fills up its buffer
04:53:54  <Raynos>and applies back pressure
04:53:58  <Raynos>and r fills up its buffer
04:54:04  <Raynos>and then stops consuming the underlying source
04:54:09  <dominictarr>… but what if t only called r.read when it wanted something to return for t.read()
04:54:24  <Raynos>then you have a lazy pull stream
04:54:27  <dominictarr>yes
04:54:31  <Raynos>which is better
04:54:37  <Raynos>or you can do a lazy push stream (gozala/reducers)
04:54:39  <dominictarr>thing is there is MANY possible ways to make a stearm
04:54:50  <Raynos>both of which feel less silly then the buffer dance
04:54:59  <dominictarr>Stream is a True Abstraction
04:55:14  <dominictarr>so you will end up with streams in your application no matter what
04:55:25  <Raynos>of course
04:55:29  <Raynos>because you have streaming input
04:55:35  <dominictarr>but there are a bunch of different ways to implement them
04:56:03  <Raynos>have you seen the SICP videos about pull streams?
04:56:09  <dominictarr>no
04:56:11  <dominictarr>link?
04:56:20  <dominictarr>also, this is just a streaming universe.
04:56:56  <Raynos>dominictarr: https://www.youtube.com/watch?v=a2Qt9uxhNSM&playnext=1&list=PL8FE88AA54363BC46&feature=results_video
04:58:28  * wiwilliaquit (Ping timeout: 248 seconds)
04:58:29  * dominictarr_joined
05:00:33  * dominictarrquit (Ping timeout: 245 seconds)
05:00:33  * dominictarr_changed nick to dominictarr
05:04:10  <Raynos>gozala says this video ( http://vimeo.com/6624203 ) is about push streams but I havn't watched it yet and it's scary.
05:04:40  <Raynos>I think the big negative of pull is that you pull one at a time every time
05:15:20  * st_lukejoined
05:16:59  <jjjjohnnny>dominictarr: where on the web did you get your fly around the world airplane tix?
05:17:15  <dominictarr>I didn't
05:17:27  <dominictarr>I just got tickets for where I thought I would go next
05:17:46  <dominictarr>figuring out what combinations is cheap
05:17:57  <jjjjohnnny>i thought you got 5 flights for 1000
05:17:58  <dominictarr>like this airline, though that hub, etc
05:18:08  <jjjjohnnny>ah
05:18:19  <dominictarr>around the US I flew united
05:18:38  <fotoverite>United sucks jet blue or virigine america
05:18:49  <dominictarr>you can buy a bunch of flights from a single airline and that is cheap
05:18:57  <dominictarr>if they fly those routes often
05:19:48  <dominictarr>yeah, they turned out cheapest though… and they did put me on the next plane when I missed my flight in new jersey
05:20:35  <fotoverite>how vietnam?
05:20:49  <st_luke>cheap is good
05:22:30  <defunctzombie>anyone know a module which tells me the current git commit hash for my project?
05:26:36  <defunctzombie>oh yea.. https://npmjs.org/package/git-rev
05:26:43  <defunctzombie>node modules ftw
05:34:32  <dominictarr>I love travelling in asia, but I hate tourists.
05:41:04  <Raynos>so my recent modular front end code
05:41:10  <Raynos>is just an unstructured explosion of files
05:41:13  <Raynos>which touch the DOM everywhere
05:41:36  <Raynos>anyone have any novel ideas on how to isolate the DOM?
05:43:08  <dominictarr>hmm, I'm returning a HTMLElement, and then each widget only works on that...
05:43:19  <dominictarr>we should try and document the patterns we are using
05:43:45  <Raynos>dominictarr: https://gist.github.com/672d95025c97102b00ba
05:43:47  <dominictarr>substack: so like, your slider widget is an EventEmitter with an .element property
05:44:20  <dominictarr>Raynos: is that like a tj component?
05:44:24  <Raynos>no
05:44:28  <Raynos>im just using the word component
05:44:30  <Raynos>to be annoying
05:44:34  <dools>WORD
05:44:38  <dominictarr>call it something different
05:44:42  <Raynos>in my defense Ive been using that word before component/component
05:44:43  <dominictarr>tj owns that shit
05:44:52  <Raynos>fine
05:44:55  <Raynos>ill go rename it :D
05:44:59  <Raynos>What the fuck do I call it
05:44:59  <dominictarr>sure, but it will confuse people
05:45:01  <Raynos>ModularShit
05:45:11  <dominictarr>hang on, let me read it
05:45:38  <dools>http://cdn.ebaumsworld.com/picture/ttbardj/LARGE_word.jpg
05:45:38  <Raynos>I shouldnt embed the example in a comment
05:46:37  <dominictarr>so, it returns a object {view: HTMLElement}
05:46:58  <Raynos>yes
05:47:02  <dominictarr>and then the user gets to document.body.appendChild (thing.view)
05:47:06  <Raynos>Fuck I want multiline strings
05:47:10  <Raynos>yes
05:47:13  <Raynos>or whereever
05:47:17  <Raynos>you nest these component things
05:47:19  <Raynos>as a tree
05:47:24  <Raynos>and map it onto the DOM tree
05:47:29  <dominictarr>okay, that is a simple contract I can agree too
05:47:52  <dominictarr>that stuff about generating style should be left out, that is an internal implementation detail
05:48:03  <dominictarr>I don't want to know about that...
05:48:03  <Raynos>yes
05:48:24  <dominictarr>I just want it to work and not interfere with anything else I have on the page
05:48:28  <Raynos>but for me its also about making it easy to build these components
05:48:37  <Raynos>so when I build a new one
05:48:45  <Raynos>I want it to look similar at the implementation level to other ones
05:48:53  <dominictarr>I mean, HOW you do that is your problem, I just don't want to know
05:49:03  <Raynos>dominictarr: agreed, any opinion on CSS ?
05:49:06  <dominictarr>it can't be a part of the widget spec
05:49:22  <Raynos>either you inject CSS once or you have local CSS
05:49:24  <Raynos>or you ragequit
05:49:46  <dominictarr>I don't care, use your judgement… just make sure it doesn't collide
05:50:07  <Raynos>:D
05:50:16  <chrisdickinson>Raynos: re: isolating the DOM: judicious use of `elem.ownerDocument` can save you a bit of trouble (in terms of having to fake out entire dom objects)
05:50:30  <Raynos>what?
05:50:55  <dominictarr>I am using local css, for structural things… but allow the user to style with global css
05:50:56  <defunctzombie>problem is that css will collide unless you prefix it
05:51:09  <defunctzombie>yes
05:51:11  <chrisdickinson>you mentioned "anyone have any novel ideas on how to isolate the DOM?"
05:51:15  <defunctzombie>that is generally the favored approach
05:51:28  <defunctzombie>anyhow, Raynos for my current iteration of components
05:51:29  <dominictarr>oh, Raynos I don't think .view is a obvious name
05:51:34  <defunctzombie>I just do two simple things
05:51:35  <dominictarr>what about .element?
05:51:50  <defunctzombie>write some js commonjs require style however I want to do whatever
05:51:52  <dominictarr>also, is the base object a EventEmitter?
05:51:56  <Raynos>dominictarr: define "local css"
05:51:59  <defunctzombie>and also have a style: field in package.json
05:52:06  <defunctzombie>the js is easy
05:52:11  <dominictarr>I mean style properties on the elements
05:52:12  <defunctzombie>as any number of tools can work with that
05:52:26  <Raynos>dominictarr: base object is anything you want. Stream, EventEmitter, Promise, Reducible, array, whatever
05:52:30  <defunctzombie>and then I have a tool which understands style fields of package.json and uses those if I want it
05:52:31  <dominictarr>el.style.setProperty('display', 'block')
05:52:36  <defunctzombie>and that is it
05:52:39  <defunctzombie>nothing more
05:52:58  <Raynos>defunctzombie: so you have a tool that pulls styles into a style file and shows that?
05:53:05  <defunctzombie>yes
05:53:07  <dominictarr>okay, hmm, so if it's a progress bar… then it would make sense to be a promise
05:53:33  <defunctzombie>and when I say have, I mean mostly wrote today but the idea does what I want
05:53:54  <defunctzombie>and if you want want a certain widget style you don't have to have it
05:54:30  <dominictarr>okay, so what I want, is a minimum api so that we can reuse each other's widgets without caring how they are implemented at a low level.
05:54:40  <defunctzombie>basically, in the end I decided css is disjoint from the js, while it is tightly coupled in some respects and that is why i ship base css with the widget
05:54:56  <defunctzombie>someone could decide my css is not what they want or what to roll it differently somehow
05:55:05  <defunctzombie>therefore I do not make it a part of the js or anything liek that
05:55:13  <dominictarr>defunctzombie: so, they should fork your module
05:55:16  <defunctzombie>css is a bit more flexible in that regard I have found
05:55:25  <defunctzombie>dominictarr: yea, they can do that too
05:55:45  <dominictarr>defunctzombie: do ythey have to add a style tag for your css?
05:55:47  <defunctzombie>either way base css exists alongside the widget
05:55:51  <dominictarr>for that module?
05:56:06  <defunctzombie>no, they add one for all widgets
05:56:08  <dominictarr>Raynos: I think it's called a Widget
05:56:19  <dominictarr>not component
05:56:23  <Raynos>defunctzombie: I have started injecting css into the head transparently
05:56:29  <Raynos>dominictarr: I think widget is a reasonable name
05:56:33  <defunctzombie>the reason being that those styles rarely change
05:56:39  <defunctzombie>and therefore you beenfit better from caching
05:56:43  <defunctzombie>versus transparent injection
05:56:51  <Raynos>defunctzombie: if you don't want my auto injected css to apply, then remove the verbose (namespace) class name from `widget.view`
05:57:10  <Raynos>defunctzombie: I inject once not for every element created
05:57:16  <Raynos>and it's cached in the JS
05:57:19  <defunctzombie>I realize
05:57:51  <defunctzombie>depending on how you inject
05:57:57  <defunctzombie>I think that makes the cascading part harder
05:58:00  <defunctzombie>with styling
05:58:22  <defunctzombie>anyhow, I am still playing around with it
05:58:37  <defunctzombie>but right now it is nice cause there are no build steps or anything in my current workflow
05:58:56  <defunctzombie>and everything is separated out reasonably well (so far)
05:59:11  <defunctzombie>with no nothing of widgets being something special
05:59:34  <dominictarr>GUYS! the IMPORTANT THING is that we agree on the outer api surface so we can easily REUSE
05:59:44  <Raynos>https://gist.github.com/672d95025c97102b00ba
05:59:55  <dominictarr>where the CSS goes is something we should each experiment with
05:59:57  <Raynos>dominictarr: it's hard to do that
06:00:03  <defunctzombie>yea.. that is never gonna happen
06:00:05  <Raynos>because the only outer api you need
06:00:07  <Raynos>is a property name
06:00:09  <Raynos>for the DOM thing
06:00:16  <dominictarr>no, it is simple!
06:00:25  <dominictarr>we just make it as basic as possible
06:00:27  <defunctzombie>dominictarr: I have found that style field in package.json is about as open minded as it gets
06:00:39  <defunctzombie>with that metadata you can do whatever you want
06:00:43  <fotoverite>That is gnarly
06:00:44  <defunctzombie>and package however you want
06:00:47  <Raynos>defunctzombie: how do you have no build step?
06:00:53  <defunctzombie>magic ;)
06:00:54  <fotoverite>Not in the good way
06:00:59  <fotoverite>css should go in a css file
06:01:02  <defunctzombie>I make computers do my work for me
06:01:03  <fotoverite>html in an email file
06:01:09  <fotoverite>html file
06:01:12  <dominictarr>I just want a createWidget() that returns a thing I can stick in, and works without customization
06:01:15  <fotoverite>Why is this a hard idea
06:01:18  <Raynos>fotoverite: emails in a html file
06:01:27  <fotoverite>That was a typo
06:01:44  <Raynos>dominictarr: the thing about widgets is that the hard part is createWidget(whatDataInput??, whatOptions?!!?!) -> WhatInterface?!?!
06:01:59  <Raynos>the only easy part is standardizing the name of the DOMElement property on the WhatInterface
06:02:14  <dominictarr>Raynos: your widget module defines that
06:02:29  <Raynos>well it allows you to pass arbitary data through
06:02:40  <Raynos>and it allows you to return arbitary data but just patches on a view property
06:03:02  <Raynos>the only useful thing my widget does is an opinionated default on how to build widgets
06:03:07  <defunctzombie>Raynos: https://gist.github.com/4536555
06:03:12  <Raynos>which isnt useful because its opinionated!
06:03:27  <defunctzombie>super crap example of how it can be done
06:03:32  <defunctzombie>and yes, it does work haha
06:03:41  <defunctzombie>just is hacked together currently
06:04:08  <defunctzombie>the entry widget.css file just has a bunch of @import 'name'; lines
06:04:17  <defunctzombie>where name is the npm module name of the widget css you want
06:04:25  <defunctzombie>that is the opt in/out part of the css
06:04:37  <defunctzombie>that is it, from there it does the rest
06:04:40  <fotoverite>way nicer defunctzombie
06:05:02  * dominictarr_joined
06:05:03  <Raynos>defunctzombie: so you have any entry css filke with import npm_module_name
06:05:13  <Raynos>and you compile it by inlining the style property file for that module name
06:05:16  <defunctzombie>Raynos: yea
06:05:22  <defunctzombie>that is the current idea
06:05:29  <defunctzombie>cause I wanted an opt in way for widget styles
06:05:33  <Raynos>sec
06:05:48  <Raynos>defunctzombie: https://github.com/Raynos/npm-css#packagejson
06:05:51  <Raynos>Can you finish that? :D
06:06:11  <Raynos>i dont care about css field or style field, no fucks given
06:06:18  <defunctzombie>nice
06:06:24  <defunctzombie>yes, that is exactly this
06:06:33  <defunctzombie>I just called the field style
06:06:37  <defunctzombie>but whatevs
06:06:46  <fotoverite>New nyc.js next week most likely thursday
06:06:48  * dominictarrquit (Ping timeout: 245 seconds)
06:06:48  * dominictarr_changed nick to dominictarr
06:07:31  <defunctzombie>each part is written in its own file and the package.json is the metadata glue that informs your tools about what to do
06:07:41  <Raynos>dominictarr: Ok so apart from { someProp: DOMElement } what else can we agree on?
06:08:02  <dominictarr>hang on lets think this through
06:08:06  <dominictarr>some examples
06:08:34  <dominictarr>so… createForm(new scuttlebutt.Model())
06:08:53  <Raynos>dominictarr: https://github.com/Gozala/reflex/blob/master/examples/widgets/scratch.js#L3 I stole gozala's widget :p
06:08:56  <dominictarr>… that would just want to return a HTMLElement
06:09:06  <Raynos>dominictarr: It should return more then that
06:09:14  <Raynos>like it should return an event emitter with a submit event
06:09:18  <defunctzombie>Raynos: I will look at npm-css, seems to do what I want :D
06:09:31  <Raynos>defunctzombie: I only implemented a subset
06:09:37  <defunctzombie>subset of what?
06:09:46  <Raynos>require
06:09:47  <dominictarr>but… when you edit the form, it updates the scuttlebutt… no submit
06:09:49  <Raynos>it only does local files
06:09:57  <Raynos>dominictarr: BLARGH that's evil
06:09:58  <defunctzombie>as opposed to?
06:10:14  <Raynos>defunctzombie: it doesnt implement the entire require algorithm with the node_moduels thing
06:10:15  <dominictarr>Raynos: what is wrong with that?
06:10:30  <defunctzombie>Raynos: ah ok, I will fix that up
06:10:30  <Raynos>dominictarr: your passing in a readable / writable thing as input and the thing returns no output
06:10:40  <defunctzombie>Raynos: saves me the pain of having to start from scratch
06:10:47  <Raynos>defunctzombie: the code is also an experimental disaster :p
06:10:59  <defunctzombie>yea, I see that.. no worries haha
06:11:00  <dominictarr>it creates a HTMLElement.
06:11:02  <Raynos>dominictarr: It breaks the simple functions take input and return output
06:11:19  <defunctzombie>the idea is what counts :)
06:11:21  <dominictarr>a widget is NOT stateless
06:11:31  <Raynos>agreed
06:11:48  <defunctzombie>between this and my other module to serve the js side I will have the whole stack
06:11:49  <dominictarr>so functions that create them are not simple
06:11:50  <Raynos>dominictarr: https://gist.github.com/aa556a5b013772bb01fe
06:11:56  <Raynos>^ that code makes me puke.
06:12:03  <defunctzombie>the file part is the html if a component needs it, but I have an idea for that too
06:12:09  <Raynos>mutation effectively the database in an on-click handler
06:12:20  <Raynos>I also thought "oh just pass doc as an argument to widget and done!
06:12:31  <dominictarr>I don't see what that does
06:12:44  <Raynos>:D
06:12:58  <Raynos>it listens on a click events and add's to crdt.Doc
06:13:08  <Raynos>the point is mutating the data store in your DOM widget
06:13:10  <Raynos>is ugly
06:13:31  <dominictarr>what would your prefer?
06:13:52  <dominictarr>some glue code?
06:14:02  <Raynos>i dont know what I would prefer
06:14:09  <defunctzombie>I don't think it is that ugly
06:14:13  <defunctzombie>just depends how far you take it really
06:14:24  <defunctzombie>I mean.. that code does indicate what you want to happen :/
06:14:25  <Raynos>but the pattern I have right now of DOM and state together
06:14:25  <dominictarr>the point of UI is to give the user the ability to mutate state/data
06:14:26  <Raynos>is a mess
06:14:52  <Raynos>I want to have as little DOM as possible tbh
06:14:53  <defunctzombie>that is a good quote
06:14:56  <dominictarr>if the widget is isolated from the rest of the page… then it's okay
06:15:05  <dominictarr>the objective here is reuse
06:15:10  <Raynos>and as much data manipulation that is DOM-less
06:15:25  <Raynos>dominictarr: anyway this avoids the real objection
06:15:40  <dominictarr>what is that?
06:15:45  <Raynos>which is tight coupling between your model and form is dangerous
06:16:02  <Raynos>your data structures and your views shouldnt be tightly coupled that way
06:16:06  <Raynos>they should be coupled one way
06:16:11  <Raynos>I dont like two way data binding
06:16:44  <dominictarr>I don't think that is a reasonable objection in general
06:16:52  <dominictarr>look at r-edit
06:17:07  <Raynos>thats different
06:17:07  <dominictarr>you attach a textarea to a scuttlebutt for text
06:17:13  <dominictarr>it's a too way binding
06:17:25  <Raynos>thats acceptable
06:17:27  <dominictarr>actually, I think most scuttlebutts want a too way binding
06:17:30  <Raynos>because its a very simple two way data binding
06:17:50  <dominictarr>well, it's not that simple, really
06:17:59  <Raynos>conceptually it is
06:17:59  <mbalho>jjjjohnnny: tryin out opa
06:18:02  <Raynos>one text value
06:18:06  <Raynos>one textarea
06:18:11  <dominictarr>yes, it's isolated
06:18:46  <mbalho>jjjjohnnny: it should respect package.json 'amin'
06:18:49  <mbalho>jjjjohnnny: 'main'
06:18:57  <mbalho>jjjjohnnny: instead of assuming index.js
06:20:20  <dominictarr>Raynos: I think that is the more important thing...
06:21:20  <dominictarr>that I can drop in this widget that does only one thing well, and it only updates the local model, and I control how that model is attached to other tings
06:21:23  <defunctzombie>mbalho: let me know how you like the smart continuations
06:21:25  <Raynos>mbalho, jjjjohnnny: https://github.com/chrisdickinson/browservefy https://github.com/Raynos/browserify-server
06:21:30  <mbalho>defunctzombie: wat
06:21:34  <defunctzombie>I have been thinking about those lately
06:21:52  <Raynos>dominictarr: then I think it would be nicer if it returned the model and placed an element / view property on it
06:22:00  <Raynos>maybe you can pass in a string for the initial value of r-edit
06:22:10  <defunctzombie>mbalho: for opa stuff, no callbacks
06:22:18  <mbalho>Raynos: readme https://github.com/mikolalysenko/Serverify
06:22:18  <dominictarr>Raynos: that is monkey patching. that is worse
06:22:36  <mbalho>defunctzombie: are you talkin gabout https://github.com/NHQ/opa
06:22:39  <defunctzombie>smart continuations, basically yield on steroids behind the scenes
06:22:55  <defunctzombie>mbalho: oh.. no.. haha
06:22:57  <mbalho>lol
06:22:58  <Raynos>dominictarr: why is that bad. it's like putting a view / element property on an EventEmitter
06:23:03  <defunctzombie>mbalho: I thought you meant the language stack
06:23:04  <defunctzombie>hahaha
06:23:07  <mbalho>defunctzombie: haha
06:23:08  <dominictarr>I'd rather monkeypatch the HTMLElement than the Model
06:23:15  <mbalho>defunctzombie: i dont even know what that is
06:23:23  <defunctzombie>http://opalang.org/
06:23:28  <mbalho>wow
06:23:44  <defunctzombie>ive heard good things but never dug into it
06:23:49  <dominictarr>Raynos: it's okay if the widget created (and thierfor owns) the EventEmitter…
06:23:54  <defunctzombie>lately I have been playing a bit with lua coroutines and yield
06:24:01  <dominictarr>If I created it, I don't want anyone messing with it.
06:24:03  <Raynos>dominictarr: thats why it should create and own the mode l thing
06:24:11  <defunctzombie>you could setup smart continuations with those if you do it right actually
06:24:11  <Raynos>and return it!
06:24:21  <dominictarr>it's orthagonal
06:24:39  <Raynos>sec
06:24:52  <dominictarr>there are more ways to render a scuttlebutt than there is to implement a scuttlebutt
06:25:04  <dominictarr>Model is more general than the widget
06:25:12  <dominictarr>there will be many widgets, and one Model.
06:25:36  <Raynos>dominictarr: https://gist.github.com/db0a005744988dfa19bf
06:25:39  <defunctzombie>Raynos: nice thing about npm-css comment @require approach is that even if the file only has @requires, it is still valid css since it is in a comment
06:25:49  <defunctzombie>I like that, cause if anything accidentally serves it, it will be ok
06:26:00  <dominictarr>no way
06:26:10  <Raynos>dominictarr: good point. There are many views for one piece of data
06:26:11  <Raynos>blargh
06:26:32  <dominictarr>there are many places that I could get a model from
06:26:38  <Raynos>dominictarr: what if a widget is a transform stream?
06:26:43  <dominictarr>that is strictly a part of the data layer
06:26:44  <defunctzombie>I too have many butts
06:26:57  <defunctzombie>:D
06:27:12  <dominictarr>Raynos: what if there is a way to attach a model to a view?
06:27:22  <dominictarr>that is what you are suggesting...
06:27:27  <defunctzombie>that is how it is done traditionally
06:27:35  <defunctzombie>setModel and such
06:28:07  <dominictarr>that is effectively the same
06:28:23  <dominictarr>I think what Raynos is suggesting is a protocol
06:28:24  <defunctzombie>http://doc.qt.digia.com/qt/qabstractitemview.html#setModel
06:28:41  <defunctzombie>from arguably one of the most powerful widget toolkits :)
06:28:57  <dominictarr>so that you it's not tightly coupled, it just sends messages back and forth
06:30:23  <dools>like two people having an affair
06:31:14  * dominictarr_joined
06:31:23  <Raynos>dominictarr: well what I want is https://gist.github.com/49be1da3f12823a52b70
06:32:07  <defunctzombie>dools: wow
06:32:50  <dominictarr_>Raynos: what does transform return?
06:33:01  <dools>defunctzombie: are you impressed by the incisiveness of my analogy?
06:33:06  <Raynos>dominictarr_: Reducible or stream or event emitter
06:33:28  * dominictarrquit (Ping timeout: 245 seconds)
06:33:29  * dominictarr_changed nick to dominictarr
06:33:43  <defunctzombie>dools: yes
06:33:47  <dominictarr>but won't the dataRepresentation aleady be that?
06:34:06  <dominictarr>what would I want to register onto the result?
06:34:19  <dominictarr>I'd rather just attach that to the model… I think
06:34:51  <Raynos>https://gist.github.com/49be1da3f12823a52b70 <- comments
06:35:16  <Raynos>dominictarr: I'm suggesting that a widget takes a Readable stream and returns a Readable stream
06:35:27  <Raynos>i.e. a widget is not writable and you can't pass it a Writable
06:35:56  <Raynos>a widget is a Reader and returns a Readabler
06:36:05  <Raynos>Readable*
06:36:25  <dominictarr>hmm, but the widget is passed a dataRep, which it reacts to changes in right?
06:36:33  <dominictarr>but it never updates it?
06:36:37  <Raynos>yes
06:36:45  <Raynos>i.e. it's a one way street
06:36:59  <Raynos>it can come from couch _changes or from level.livestream()
06:37:00  <dominictarr>so, I have to write my own glue code if I want user input to update stuff?
06:37:35  <dominictarr>hmm, for that case… that is quite reasonable...
06:37:54  <Raynos>dominictarr: the glue code would be widget(level.liveStream()).pipe(level.writeStream())
06:38:05  <Raynos>but of course there would be some layers in between and less hard coupling to level
06:38:35  <dominictarr>hmmm, can we make this example more concrete?
06:38:41  <dominictarr>what is this a stream of?
06:38:45  <dominictarr>is this a news feed?
06:38:47  * defunctzombiechanged nick to defunctzombie_zz
06:38:50  <Raynos>I dont know
06:38:52  <dominictarr>or a search result?
06:39:02  <dominictarr>wtf
06:39:17  <mbalho>what do you mean 'applied'
06:39:26  <dominictarr>If you don't know what you want to build, how can you know what you want it to look like?
06:39:41  <Raynos>because of all the widgets ive build so far
06:39:53  <Raynos>that is what the least common denominator would look like
06:40:05  <dominictarr>LOWEST c d
06:40:26  <dominictarr>so, show me a widget
06:40:59  <dominictarr>because I have no idea what sort of thing you are building
06:48:10  * st_lukequit (Remote host closed the connection)
06:49:00  <Raynos>dominictarr: simplified example of answer dialog for a Q&A thing https://gist.github.com/7ab6559665bdde7fadef
06:49:14  <mbalho>jjjjohnnny: also there is a partay at my hizzouse tomorrow, imma send you an email
06:49:35  <dominictarr>Raynos: so it's a dialog box?
06:49:43  <dominictarr>with yes/no?
06:49:47  <Raynos>effectively, a pretty one
06:49:51  <dominictarr>okay
06:49:51  <Raynos>It's a prompt
06:50:12  <Raynos>actually this is a bad example
06:50:35  <dominictarr>yeah, it doesn't have your .view property
06:51:22  <Raynos>true
06:51:27  <dominictarr>oh… it return a map … stream?
06:51:37  <dominictarr>reducable?
06:51:39  <Raynos>because the modal is a dirty hack and injects itself into the DOM
06:51:45  <Raynos>this example returns reducible
06:51:52  <dominictarr>that makes sense for a modal actually...
06:52:00  <dominictarr>although I think modals are evil
06:52:32  <Raynos>https://gist.github.com/7ab6559665bdde7fadef
06:52:41  <Raynos>Ok that's a better example
06:52:48  <dominictarr>what does the reducable return… just one yes/no event?
06:52:50  <Raynos>Actually this is a terrible example for this entire idea :p
06:53:10  <Raynos>this new example returns a Reducible containing all the answers for all the questions
06:53:26  <Raynos>Reducible is like a lightweight push stream
06:53:36  <Raynos>with some properties of being lazy
06:53:48  <dominictarr>show me something simpler
06:53:53  <Raynos>:D
06:54:25  <dominictarr>actually, there is no reason a dialogue should be this complex
06:54:48  <dominictarr>it should be a simple example
06:55:10  <dominictarr>you know how I would do it?
06:55:25  <Raynos>that function isn't a widget though which is the problem
06:55:44  <dominictarr>dialogue(question, function (err, yes) { … })
06:56:13  <Raynos>that would be simpler
06:56:15  <dominictarr>returns a HTMLElement,
06:56:30  <dominictarr>the callback fires when the user picks an option
06:56:32  <Raynos>lets imagine I wanted it to return a Promise and HTMLElement
06:56:44  <dominictarr>and then the dialogue removes it self
06:57:14  <dominictarr>hmmm… maybe you need to emit an event for that...
06:57:49  <dominictarr>because it might be decorated with something, so you should control that...
06:58:32  <dominictarr>but the simple version would still be useful
06:59:03  <dominictarr>it could return an EE though, with a element/view
06:59:32  <Raynos>yeah
07:05:18  <Raynos>dominictarr: https://gist.github.com/a9e329183c7a0908e59f
07:05:22  <Raynos>That's an ok example
07:05:48  <dominictarr>what is it
07:06:01  <Raynos>input box for a chat system
07:06:48  <Raynos>so the reason I favour this style is that what I've been doing is passing this extra bullshit state into these components so that when they mutate the scuttlebutt they can patch the bullshit state on them
07:07:16  <Raynos>with this style you just have a DOM thing and it does it thing and then higher up you pipe it back into the scuttlebutt but patch your bullshit state onto it before it goes into the scuttlebutt
07:07:29  <Raynos>which means you dont have to pass it into your DOM widgets
07:08:06  <dominictarr>an input box for chat is deff a one way binding
07:08:20  <Raynos>which is why it should have no inputs
07:08:26  <dominictarr>agree
07:08:42  <dominictarr>widgets are like streams
07:08:58  <dominictarr>there are one way, and two way widgets
07:09:23  <Raynos>dominictarr: https://gist.github.com/795fa1402c2663799201#file-gistfile1-txt-L49
07:09:30  <dominictarr>this example is kinda low level
07:09:45  <dominictarr>I'd build a widget that was a whole chat thing
07:09:55  <Raynos>i have a component thats a whole chat thing
07:09:57  <Raynos>its 20 files
07:10:07  <dominictarr>that is a lot
07:10:12  <Raynos>well thats not true. its chat + Q&A system
07:10:18  <Raynos>+ private messages
07:10:21  <Raynos>+ rooms
07:10:32  <dominictarr>okay, that sounds like 20 files.
07:10:58  <dools>mbalho: http://www.youtube.com/watch?v=ndr1qM0s80g
07:11:11  <Raynos>dominictarr: anyway you helped me figure shit out :D
07:12:11  <Raynos>the answer is I dont know of any generic way to build widgets. But I know how to get the DOM out of my code
07:12:21  <dominictarr>yeah, I think we are making progress
07:12:33  <Raynos>transform user input into data structures as quickly as possible and transform data structures into DOM changes as quickly as possible
07:12:54  <Raynos>if your doing complex logic in your DOM changes then fuck that pass in a data structure that maps onto the DOM more cleanly
07:13:08  <Raynos>because that complex logic is app logic and when intertwined with your DOM code its a disaster
07:13:19  <dominictarr>agree
07:13:25  <Raynos>if you have complex logic near DOM events then fuck that, its app logic and when mixed with DOM events its a disaster
07:14:02  <dominictarr>the only complex logic near a dom element should be stuff that relates specifically to the DOM
07:14:16  <dominictarr>say, like inserting an element into the correct position
07:14:39  <Raynos>https://gist.github.com/12a80ce2c6dc6afcabd8
07:14:46  <Raynos>That's probably the cleanest DOM file I have.
07:15:15  <Raynos>because it does actual DOM logic near the DOM
07:15:53  <Raynos>it doesnt handle moves but its nice for data that comes in in-ordered (scuttlebutt & network partitions for chat messages)
07:16:06  <Raynos>or scuttlebutt and buggy history implementations :p
07:16:17  <dominictarr>Raynos: what about renaming .view to .element?
07:16:30  <Raynos>dont mind
07:16:38  <Raynos>view is more generic if you were to move away from DOM land
07:16:42  <Raynos>like having a terminal view
07:16:47  <Raynos>but thats probably out of scope
07:16:57  <dominictarr>Raynos: what does that do?
07:17:00  <dominictarr>Ordered?
07:17:22  <dominictarr>def out of scope
07:17:34  <Raynos>function Ordered(parent) -> insert(key, elem) pass it an element and its ordered key index and it injects it into parent container in correct position
07:17:57  <dominictarr>that is what I thought, but I wanted to hear it in english.
07:18:25  <Raynos>so for example var order = Ordered(list); ... insert(chat.timestamp, ChatItem(chat).view)
07:20:08  * dominictarr_joined
07:21:22  <Raynos>so htis is my problem with functional programming
07:21:39  <Raynos>there is nothing I can say about widget other then its a function that takes input and returns output and has view/element property
07:22:09  <Raynos>with OOP I could say its instance of Widget and thus has this set of methods that do useful stuff :P
07:22:13  * dominictarrquit (Ping timeout: 245 seconds)
07:22:13  * dominictarr_changed nick to dominictarr
07:23:56  <Raynos>https://gist.github.com/73a285b69bb2721c1b1c
07:25:37  <dominictarr>there is a time and place for functional programming
07:25:48  <dominictarr>but I don't think user interfaces are it
07:26:41  <dominictarr>parts of a user interface really do have a thingness about them, and state, if they are anything more complicated than just a clickable link
07:27:02  <dominictarr>like, an inplace editor
07:27:42  <dominictarr>… that is actually kinda complicated to write… especially if there updates can come from the model while you are editing...
07:27:56  <dominictarr>even though it only has 2 states
07:46:26  * dominictarrquit (Quit: dominictarr)
08:01:20  * wiwilliajoined
08:03:03  * gwenbellquit (Remote host closed the connection)
08:10:04  * AvianFluquit (Remote host closed the connection)
08:36:46  <mbalho>substack: does jumping work in your freedom patch to player-physics
08:38:52  <mbalho>substack: also do you have a pull req for voxel-engine that uses the new freedom stuff?
08:46:51  * dominictarrjoined
08:48:40  <gozala>dominictarr: I remember you had good list things to read to learn about distributed
08:48:47  <gozala>could you please point me to it ?
08:50:21  <ralphtheninja>would love that list as well :)
08:51:54  <dominictarr>I can give you the papers I was recommended
08:52:57  <dominictarr>gozala: what is your email?
08:53:11  <gozala>[email protected]
08:54:29  <gozala>dominictarr: tnx
08:58:02  * thatguydan_joined
09:02:12  * thatguydanquit (Ping timeout: 248 seconds)
09:02:36  * thatguydan_quit (Ping timeout: 256 seconds)
09:26:31  <dominictarr>sent
09:29:05  * captain_morganquit (Ping timeout: 240 seconds)
09:29:55  * No9quit (Ping timeout: 260 seconds)
09:31:33  * No9joined
09:44:58  <dominictarr>substack: so, soon, I'm gonna be using browserify bundles to generate code to run safely inside a new context, but not a browser.
09:45:40  <dominictarr>… this will probably mean exposing some way to control what modules are forbidden, or replaced
09:46:07  <ralphtheninja>dominictarr: thanks, a lot of stuff to digest
10:16:24  <mbalho>substack: https://github.com/maxogden/minecraft-skin
10:17:35  <niftylettuce>mbalho: BALLER
10:17:42  <niftylettuce><3333
10:17:48  <niftylettuce>mbalho: notch is going to acquire you guys
10:17:53  <mbalho>http://maxogden.github.com/minecraft-skin/
10:18:01  <mbalho>lol
10:18:04  <niftylettuce>mbalho: you fucking badass.
10:18:07  <niftylettuce>:D :D :D love it.
10:18:20  <niftylettuce>meanwhile im hacking on making a pure JS and HTML tictactoe implementation with DOM
10:18:28  <mbalho>gimme 5 minutes we can multiplayer as vikings
10:18:40  <niftylettuce>nice okay just give me info/howto
10:18:55  <niftylettuce>u going to nodeconf 2013?
10:19:38  <mbalho>yea
10:22:48  <niftylettuce>mbalho: man teelaunch exploding
10:22:54  <niftylettuce>mbalho: i got completely full inbox
10:23:11  <niftylettuce>mbalho: boom shaka laka
10:25:30  <niftylettuce>lmk when u want to play
10:26:10  <mbalho>niftylettuce: i had to code in the viking to the multiplayer server im working on
10:26:14  <mbalho>its deploying now
10:27:32  <mbalho>niftylettuce: ok you cant jump on stuff or go into holes really yet http://voxel.jit.su/ and the height of the character is off
10:28:56  <niftylettuce>mbalho: <3
10:29:02  <niftylettuce>lol!
10:29:04  <mbalho>niftylettuce: heheheh
10:29:12  <niftylettuce>i was going to say "don't do it!" lol
10:29:15  <mbalho>niftylettuce: lol
10:29:21  <mbalho>niftylettuce: i got server side physics working today
10:29:40  <mbalho>niftylettuce: so browsers just draw what the server decides
10:30:10  <niftylettuce>mbalho: is that your intent?
10:30:16  <mbalho>niftylettuce: yea
10:30:21  <niftylettuce>like end-goal or do you want more sockets/streams?
10:30:28  <niftylettuce>i guess having server draw it there is no differences
10:30:29  <mbalho>niftylettuce: its using sockets and streams now
10:30:41  <mbalho>niftylettuce: the server only makes physics decisions and sends them back
10:30:42  <niftylettuce>as opposed to having clients signal to other clients and no server involved
10:30:55  <mbalho>niftylettuce: yea that would be cool but its too experimental right now i think
10:31:05  <niftylettuce>what are you deploying on? linode? nodejitsu?
10:31:14  <mbalho>nodejitsu, hence the .jit.su
10:31:22  <niftylettuce>oye forgot the URL u sent
10:31:23  <niftylettuce>nice
10:31:41  <niftylettuce>mbalho: what else you hacking on besides this lately?
10:32:47  <mbalho>niftylettuce: just http://voxeljs.com
10:33:28  <niftylettuce>mrdoob insane
10:33:39  <niftylettuce>along with community
10:34:05  <mbalho>yeah <3 mrdoob
10:37:12  <niftylettuce>webgl/webrtc/ftw
10:37:40  <niftylettuce>chrome can talk to USB cameras
10:37:42  <niftylettuce>:D
10:37:55  <dools>niftylettuce: hmmm really
10:38:02  <niftylettuce> /dev/tty0USB streaming yea
10:38:18  <niftylettuce>i hacking on it now
10:38:24  <niftylettuce>https://developer.chrome.com/trunk/apps/usb.html
10:38:38  <dools>i have this client for whom i built an ActiveX plugin to work with his web cam in like, 2005 running on IE-whatever-the-fuck that periodically breaks because of all the retarded things that are required to make activex work
10:38:45  * mirkokjoined
10:38:54  <dools>maybe not 2005. mabye 2007
10:38:56  <niftylettuce>lol
10:39:07  <niftylettuce>i have this tiny car key camera its 720P and H264
10:39:12  <niftylettuce>$40 on eBay
10:39:15  <niftylettuce>going inside my RC plane
10:39:23  <niftylettuce>working on FPV streaming
10:39:32  <niftylettuce>over carrier like tootallnate did
10:39:44  <dools>hmmm might invite him to a rewrite of that particular plugin hellness
10:40:08  <niftylettuce>dools: http://www.ebay.com/itm/180937263580
10:40:21  <niftylettuce>fisheye looks awesome.
10:40:30  <niftylettuce>huge community too and u can upgrade/mod etc
10:40:48  <niftylettuce>ppl even have .stl files with 3d printed objects for things like rotating/pivot/tilt
10:41:14  * jibayjoined
10:41:19  <dools>boom selection
10:41:44  <niftylettuce>https://github.com/GoogleChrome/chrome-app-samples/blob/master/usb/knob/knob.js#L24
10:41:47  <niftylettuce>dools: ^
10:42:09  <niftylettuce>client-side a little easier to work with on devices u can't run node easily on
10:42:29  <niftylettuce>tho anode or w/e looks decent, haven't tried yet
10:42:50  <dools>yeah this would be client side
11:06:28  * rvaggquit (Quit: ta ta)
11:20:58  * ITproquit (Read error: Connection reset by peer)
11:21:49  * ITprojoined
11:23:12  * fotoveritequit (Quit: fotoverite)
11:49:18  * mirkokquit (Quit: mirkok)
11:49:29  * mirkokjoined
11:51:50  * thatguydanjoined
12:05:08  * ralphtheninjaquit (Ping timeout: 248 seconds)
12:35:17  * yorickjoined
12:35:18  * yorickquit (Changing host)
12:35:18  * yorickjoined
12:37:02  * thatguydanquit (Remote host closed the connection)
12:37:15  * thatguydanjoined
13:02:35  * dominictarrquit (Quit: dominictarr)
13:09:07  * ralphtheninjajoined
13:32:20  * mirkokquit (Quit: mirkok)
13:37:56  * thatguydanquit (Quit: thatguydan)
13:44:03  * ralphtheninjaquit (Ping timeout: 248 seconds)
13:45:36  * dominictarrjoined
13:58:16  * ralphtheninjajoined
14:05:00  * exit2joined
14:20:58  * ins0mniajoined
14:48:45  * saijanai_quit (Quit: saijanai_)
14:54:24  * AvianFlujoined
15:06:46  * gozalaquit (Ping timeout: 256 seconds)
15:06:46  * pikpikquit (Ping timeout: 256 seconds)
15:06:46  * owenb_quit (Ping timeout: 256 seconds)
15:07:04  * gozalajoined
15:11:31  * defunctzombie_zzchanged nick to defunctzombie
15:32:32  * saijanai_joined
15:39:07  * LOUDBOTquit (Remote host closed the connection)
15:40:32  * LOUDBOTjoined
15:45:22  * LOUDBOTquit (Remote host closed the connection)
15:45:34  * LOUDBOTjoined
16:04:24  * pikpikjoined
16:11:04  * dguttmanjoined
16:33:42  * dominictarrquit (Quit: dominictarr)
16:48:29  * dominictarrjoined
17:06:11  * fotoveritejoined
17:06:55  * owenb_joined
17:09:42  * dominictarrquit (Quit: dominictarr)
17:17:34  <juliangruber>defunctzombie: iframes wouldn't work for me as I want to display 114 screenshots and the sites I check are very javascript heavy
17:21:42  * shamajoined
17:51:51  * st_lukejoined
17:53:14  <st_luke>mbalho: videos are starting to get uploaded
18:01:08  <defunctzombie>wow
18:01:10  <defunctzombie>say it isn't so
18:01:36  <defunctzombie>juliangruber: sounds like you need a better computer hahahaha :p
18:13:00  * Rolnaaba_joined
18:15:05  <Rolnaaba_>hey guys, is mbalho here?
18:17:00  <Rolnaaba_>or anyone knowledgable about the voxel-engine? :P
18:26:58  * fotoverite_joined
18:26:58  * fotoveritequit (Read error: Connection reset by peer)
18:26:58  * fotoverite_changed nick to fotoverite
18:36:50  <CoverSlide>if he's not away or asleep, he'd be in here
18:39:53  * wiwilliaquit (Ping timeout: 255 seconds)
18:40:17  * wiwilliajoined
18:45:06  * wiwilliaquit (Ping timeout: 264 seconds)
18:54:33  * pikpikquit (Changing host)
18:54:33  * pikpikjoined
18:54:33  * pikpikquit (Changing host)
18:54:33  * pikpikjoined
19:09:52  <mbalho>st_luke: WOOT
19:10:50  <mbalho>Rolnaaba_: im always logged in here, usually idling though
19:11:47  <Rolnaaba_>mbalho: Ah, I just was looking through the engine trying to get a feeling for what needed to be saved to IndexedDB in order to reload a world later
19:12:28  <Rolnaaba_>mbalho: was curious if you had thought about it at all before I go off and do my thing
19:12:45  <mbalho>Rolnaaba_: ahh yes, basically this function https://github.com/maxogden/voxel/blob/master/index.js#L23
19:13:03  <Rolnaaba_>mbalho: but in reverse :P
19:13:09  <mbalho>Rolnaaba_: yea
19:13:41  <mbalho>Rolnaaba_: i think there should be a step where chunks get loaded async and then as they arrive in memory they get emitted into the game
19:13:52  <mbalho>Rolnaaba_: right now it is synchronous
19:14:26  <Rolnaaba_>mbalho: I see
19:14:50  <Rolnaaba_>mbalho: I'll need to dig around some more to full understand what is going on here, but that gives me a good start for sure
19:15:10  <mbalho>Rolnaaba_: but i think the API should be something like: store = voxelStore('foobar'); store.loadChunk('1|0|1', function loaded(err, chunk) {})
19:15:52  <mbalho>Rolnaaba_: then here we can change it to use that api https://github.com/maxogden/voxel-engine/blob/master/lib/game.js#L42
19:15:57  <Rolnaaba_>mbalho: So .save/loadChunk, .save/loadItem
19:16:07  <Rolnaaba_>mbalho: Are entities considered items or they seperate?
19:16:08  <mbalho>Rolnaaba_: and here https://github.com/maxogden/voxel-engine/blob/master/lib/game.js#L37
19:17:29  <mbalho>Rolnaaba_: entities are items
19:17:49  <mbalho>Rolnaaba_: except the player which has its own position
19:19:14  <Rolnaaba_>mbalho: sweet, I've been looking at idb wrappers and I like https://github.com/jensarps/IDBWrapper except for one thing
19:19:41  <Rolnaaba_>mbalho: he renames the store name you pass in for some reason: https://github.com/jensarps/IDBWrapper/blob/master/idbstore.js#L42
19:19:55  <mbalho>ahh weird
19:20:19  <Rolnaaba_>yeah, its not a huge deal just why do all my object stores need 'IDWrapper-'?
19:21:15  <mbalho>Rolnaaba_: that module looks nice and simple though
19:21:26  <mbalho>Rolnaaba_: good find
19:21:52  * ralphtheninjaquit (Ping timeout: 246 seconds)
19:22:01  <Rolnaaba_>yeah, thats why I want to use it; I posted an issue about the store rename asking why, hopefully he will respond
19:22:06  <Rolnaaba_>thanks
19:22:48  <mbalho>if you forked it and added a prefix option and pull requested i bet the person would merge it in
19:25:08  <Rolnaaba_>look at you, you're so smart
19:26:01  <Rolnaaba_>unfortunately it is a breaking change, since people's store names won't match; and from his read me he seemed a little "I don't want to do that ever again"
19:26:05  <Rolnaaba_>but i will try
19:26:36  <Rolnaaba_>well I could default it to IDBWrapper if it is undefined I guess
19:26:41  <mbalho>Rolnaaba_: yea
19:29:05  * No9quit (Ping timeout: 240 seconds)
19:30:32  * No9joined
19:37:51  <Rolnaaba_>good call mbalho: https://github.com/jensarps/IDBWrapper/pull/22
19:40:32  * wiwilliajoined
19:42:41  * st_lukequit (Remote host closed the connection)
19:53:35  <shama>hmm had no idea that drone.on('navdata', console.log); doesnt work in the browser but console.log wrapped in function does
20:05:34  * nk109joined
20:14:34  <chrisdickinson>shama: have to console.log.bind(console)
20:14:51  <chrisdickinson>not sure why not invoking it on `console` triggered "Illegal Invocation", seems a bit silly :|
20:16:52  <mbalho>shama: ahh i always wondered about that
20:21:03  <mbalho>Rolnaaba_: WHOA is this you? https://github.com/englercj/lttp-webgl
20:21:22  <mbalho>Rolnaaba_: lttp is my favorite game of all time
20:24:55  <shama>whoa that is rad... lttp is my second fav of all time :)
20:25:13  <chrisdickinson>whoa
20:27:05  * thatguydanjoined
20:27:33  <Rolnaaba_>mbalho: haha yeah thats me, I wrote a 2d game engine called grapefruit
20:27:41  <Rolnaaba_>mbalho: and decided to use it for remaking lttp
20:27:56  <Rolnaaba_>mbalho: my favorite game of all time as well :)
20:33:38  * st_lukejoined
20:34:47  <mbalho>Rolnaaba_: you might also be interested in the multiplayer server im working on for voxeljs http://github.com/maxogden/voxel-server
20:35:21  <mbalho>Rolnaaba_: so far i have clients sending their user input to the server, the server runs a physics loop and broadcasts player locations back
20:35:42  <mbalho>Rolnaaba_: next step is to get clients to also predict physics using the same algorithms and then correct based on the server response
20:35:51  <mbalho>Rolnaaba_: also the server and client both generate the same world from seed
20:36:17  <mbalho>Rolnaaba_: so what i was envisioning for later is that when a new client joins a game they generate the base world from a seed and then they can replicate the edits that have happened into their browser
20:36:24  <mbalho>Rolnaaba_: and once they are in a consistent state they can start playing
20:43:46  <Rolnaaba_>mbalho: I am interested for sure, I assume you are prioritizing bandwidth over processing for this?
20:43:59  <Rolnaaba_>mbalho: Atleast that is what it sounded like when you described it
20:44:22  <Rolnaaba_>mbalho: basically each action the client "does" then the server will correct as needed
20:46:04  <mbalho>Rolnaaba_: yep
20:46:31  <mbalho>Rolnaaba_: i was researching quite a bit into FPS multiplayer implementations and they all pretty much work the same
20:47:10  <mbalho>Rolnaaba_: you basically send keyboard+mouse events to the server and the server calculates physics for all players
20:47:18  <mbalho>Rolnaaba_: but in order to mask the lag you also calculate your own physics
20:47:28  <mbalho>Rolnaaba_: but since you and the server are using the same physics code it usually looks the same
20:50:00  <Rolnaaba_>mbalho: Yeah I've read up on how source engine specifically handles it, it is some interesting stuff
20:50:28  <Rolnaaba_>mbalho: I'll get this storage thing up this weekend and then take a look at the server; sounds fun!
20:50:34  <mbalho>Rolnaaba_: awesome
20:53:14  <Rolnaaba_>mbalho: is there a reason you are not using engine.io, or socket.io? Or maybe even http://pomelo.netease.com/
20:55:06  <mbalho>Rolnaaba_: neither engine.io/socket.io support streams and the game is webgl only so im fine with just websockets
20:55:21  <Rolnaaba_>mbalho: makes sense
20:55:23  <mbalho>Rolnaaba_: im intimately familiar with socket.io and choose to not use it because it is far too complex for its own good
20:55:34  <Rolnaaba_>mbalho: Ha, I could see that
20:55:58  <Rolnaaba_>mbalho: What do you think of pomelo?
20:56:21  <mbalho>Rolnaaba_: havent seen it before, checking it out
20:56:42  <mbalho>Rolnaaba_: i use https://github.com/maxogden/websocket-stream and https://github.com/pgte/duplex-emitter to get .emit() and .on() over websockets
20:56:44  * thatguydanquit (Remote host closed the connection)
20:56:56  * thatguydanjoined
20:58:57  <mbalho>Rolnaaba_: my initial reaction to pomelo is that it looks less evil than other big frameworks but my general reaction to frameworks is that i wish they would instead just be a bunch of small individually useful modules
20:59:53  <Rolnaaba_>mbalho: I agree with you, I haven't used pomelo myself but it has flown around the mailing list a couple times; and it looks pretty cool
21:01:47  <Rolnaaba_>mbalho: Their GitHub Wiki has some good stuffs, like arch overview: https://github.com/NetEase/pomelo/wiki/Architecture-overview-of-pomelo
21:01:53  <mbalho>oh cool
21:04:17  <Rolnaaba_>mbalho: Here you go, from their readme: "The framework is extensible. Based on node.js micro module principle, the core of pomelo is small. All the components, libraries and tools are individual npm modules, anyone can create their own module to extend the framework."
21:06:54  <Rolnaaba_>looks like they did something very similar to voxel, if you look at the package.json
21:10:51  <mbalho>Rolnaaba_: looking at their API there doesnt seem to be much to gain from switching my server code at this point http://pomelo.netease.com/api.html
21:11:04  <mbalho>Rolnaaba_: other than api compatibility with all their modules and third party stuff
21:12:21  <Rolnaaba_>mbalho: I think the session management stuff is pretty nice
21:14:13  <Rolnaaba_>mbalho: well I need to finish up some work, so I may not respond very much; thanks for the info!
21:16:56  * ryan_stevensjoined
21:20:33  * st_lukequit (Remote host closed the connection)
21:40:45  * Rolnaaba_quit (Quit: Page closed)
21:49:10  * thatguydanquit (Quit: thatguydan)
21:51:47  <shama>ok screw the remaining bugs... going to ship this drone :)
21:52:22  * gwenbelljoined
21:52:33  <mbalho>shama: haha
22:07:59  <shama>ok, so many todos in the src but it flies: http://shama.github.com/voxel-drone/
22:09:50  <mbalho>shama: Aahaha that is so awesome!
22:09:57  <shama>:D
22:11:02  * blakmatrix1joined
22:11:22  <exit2>shama: very awesome!!
22:11:43  * blakmatrix1part
22:15:29  * exit2quit (Remote host closed the connection)
22:18:01  <jez0990_>shama: that's cool and all, but you should add some collision detection
22:18:07  <jez0990_>instant platformer :P
22:18:25  <shama>jez0990_: ha that is a good idea
22:18:37  <shama>ill add as a todo
22:24:42  * thatguydanjoined
22:39:50  * tilgovijoined
22:47:21  <Raynos>isaacs: I now understand why there is an ended and endEmitted. Bugs -.-
22:49:16  <isaacs>yep
22:49:24  <isaacs>ended = got EOF from the underlying source
22:49:30  <isaacs>endEmitted = emitted the 'end' event
22:55:33  <mbalho>shama: now i wanna hook up https://github.com/maxogden/logo-drone to voxel-drone
22:56:47  <shama>mbalho: haha cool... im hoping it will work with any lib that works with ar-drone. I havent tested libs in the wild too much so far.
23:02:37  <Raynos>https://github.com/Raynos/read-stream/commit/be01953a18c293123d97db9fd8a24cbd846e77b7
23:02:49  * ryan_stevensquit (Quit: Leaving.)
23:02:58  <Raynos>isaacs: so as I do more stream stuff I'm 100% behind everyone should implement _read, use push or gtfo
23:03:12  <isaacs>Raynos: w00t
23:03:45  <Raynos>isaacs: btw what's your opinion on a Writable base class that calls _write in parallel for multiple chunks
23:03:56  <isaacs>in parallel?
23:04:05  <Raynos>which is mainly used for Transform streams
23:04:05  <isaacs>that's probably not a good idea ever
23:04:14  <Raynos>where _transform does async IO
23:04:26  <Raynos>and you know that the stream your transforming doesn't have to be sequential
23:04:39  <Raynos>and you want it to run un-ordered in parallel so that it's not a waterfall
23:04:56  <Raynos>But then
23:05:03  <Raynos>Most low level streams are sequential
23:05:13  <Raynos>only fancy pants high level object streams are un ordered
23:15:55  <isaacs>yeah
23:15:58  <isaacs>that sounds.. weird
23:16:06  <isaacs>like, something that's not actually a stream
23:16:28  <isaacs>Raynos: remember, stream : array :: time : space
23:16:34  <isaacs>if it's not ordered, it's not a stream
23:16:41  <isaacs>just as it's if it's not ordered in space, it's not an array
23:17:05  <Raynos>isaacs: stream to me means data chunked over time
23:17:13  <Raynos>array means data chunked over space
23:17:15  <isaacs>yes
23:17:22  <Raynos>both have order
23:17:26  <Raynos>but the order is arbitary
23:17:28  <isaacs>x:y::a:b => x is to y as a is to b
23:17:33  <Raynos>arrays are by default unsorted
23:17:37  <Raynos>streams are also unsorted
23:17:42  <isaacs>the indices are sorted.
23:17:44  <Raynos>a transformation does not need to preserve order
23:17:49  <isaacs>i mean array in the C sense
23:18:25  <Raynos>so it makes sense to be able to write _transform as a commutative operation
23:18:44  <isaacs>Raynos: then in what sense is it a "stream" conceptually? it sounds like you're just shoving unordered data into an ordered format for API consistency
23:18:56  <isaacs>Raynos: why not just emit some other event as bits fly out?
23:19:15  <isaacs>this is the same problem as that data-dropping message queue "stream" you were talking about before.
23:19:29  <Raynos>isaacs: because I want a single api
23:19:39  <Raynos>Well actually yes / no
23:19:40  <isaacs>but you don't have a single *thing*
23:19:46  <isaacs>so why have a single *api* for it?
23:19:50  <isaacs>they're different?
23:19:55  <isaacs>that's why dgram is not a stream
23:19:57  <Raynos>True
23:20:03  <Raynos>because right now streams are pull streams
23:20:10  <Raynos>and pull streams preserve order in transformations
23:20:17  <isaacs>but push streams should as well
23:20:25  <Raynos>push streams do not when transformed
23:20:32  <Raynos>because when you transform you return a new push stream
23:20:33  <isaacs>"stream" meams "there is a start and end, and the order is relevant"
23:20:36  <Raynos>that can emit data in arbitary order
23:20:56  <Raynos>why is the order relevant?
23:20:57  <isaacs>there are other kinds of event emitters besides streams, you know.
23:21:12  <isaacs>Raynos: it's just how the abstraction works.
23:21:27  <isaacs>if you have a stream that reorders the data arbitrarily, that's... well, at least, it's very weird
23:21:32  <isaacs>ie, surprising and unusual
23:21:47  <isaacs>and a violation fo the expectations one has when seeing the Stream api
23:21:51  <Raynos>its an efficiency thing
23:22:01  <chrisdickinson>must streams imply an end?
23:22:35  <isaacs>chrisdickinson: it doesn't imply that you will see the end, but it does imply that if the end comes, you'll know about it
23:22:39  <chrisdickinson>cool
23:25:03  * dominictarrjoined
23:26:37  * dominictarrquit (Client Quit)
23:29:24  <mbalho>the only thing streams has going for it over event emitter is end
23:30:46  <defunctzombie>haha
23:33:56  * dguttmanquit (Quit: dguttman)
23:36:13  * fotoveritequit (Quit: fotoverite)
23:40:24  <mbalho>man the docs for mux demux suck
23:40:43  <mbalho>where is dominictarr when you need him
23:40:45  <dools>MUX DEMUX DOX SUX
23:42:26  * dominictarrjoined
23:43:38  <shama>aww what... you cant browserify native addon modules? hehe
23:44:31  <mbalho>lol
23:44:38  <shama>mbalho: buffertools appears to be the only thing stopping logo-drone sending commands to voxel-drone
23:46:28  <chrisdickinson>wonder how far you could get with emscripten :|
23:47:01  <mbalho>shama: ahhhh dang ill open an issue
23:50:25  * yorickquit (Remote host closed the connection)
23:56:29  * dguttmanjoined