--- Log opened Thu Mar 27 00:00:02 2014 00:49 < rowbit1> Hourly usage stats: [developer: 0, free: 18] 01:49 < rowbit1> Hourly usage stats: [developer: 1, free: 30] 01:55 < thlorenz> defunctzombie: ah just noticed prova isn't mapping stack traces: https://i.cloudup.com/nA08e0s60b.png that looks like a bundle to me 01:55 < thlorenz> so not as nice as I thought I guess ;) 01:55 < defunctzombie> heh 01:55 < defunctzombie> well, they could add that feature just like we did 01:55 < defunctzombie> or you can make zuul look prettier if it is that important :) 01:56 < defunctzombie> for me testing in browsers via sauce is more important 01:56 < defunctzombie> which is the primary use for zuul, not just manual in browser stuff 02:08 < rowbit1> substack, pkrumins: These encoders are STILL down: 50.57.171.229(dev-ie6-2) 02:12 < rowbit1> substack, pkrumins: These encoders are STILL down: 50.56.27.70(dev-ie6-1) 02:49 < rowbit1> Hourly usage stats: [developer: 0, free: 22] 02:51 < rowbit1> substack, pkrumins: These encoders are STILL down: 50.56.32.168(dev4) 03:02 < mikolalysenko> what is the current status of weakmaps in node/v8? 03:39 < mikolalysenko> I wonder if it would be useful to create a module for preprocessing json objects to support O(1) least common ancestor and upper parent queries? 03:39 < mikolalysenko> maybe it could be helpful working with esprima output 03:49 < rowbit1> Daily usage stats: [developer: 85, free: 896] 03:49 < rowbit1> Hourly usage stats: [developer: 0, free: 34] 04:49 < rowbit1> Hourly usage stats: [developer: 0, free: 42] 05:49 < rowbit1> Hourly usage stats: [developer: 0, free: 34] 06:49 < rowbit1> Hourly usage stats: [developer: 0, free: 21] 07:06 < jden> hello node scientists: offhand, does anyone knows the module that does array -> readstream 07:11 < substack> jden: var r = new Readable; r._read = function () {}; array.forEach(function (x) { r.push(x) }) 07:12 < jden> this is strictly speaking more characters than `require('array-streamify')` 07:14 < jden> but ty <3 07:49 < rowbit1> Hourly usage stats: [developer: 0, free: 23] 08:09 < rowbit1> substack, pkrumins: These encoders are STILL down: 50.57.171.229(dev-ie6-2) 08:13 < rowbit1> substack, pkrumins: These encoders are STILL down: 50.56.27.70(dev-ie6-1) 08:49 < rowbit1> Hourly usage stats: [developer: 0, free: 44] 08:51 < rowbit1> substack, pkrumins: These encoders are STILL down: 50.56.32.168(dev4) 09:49 < rowbit1> Hourly usage stats: [developer: 4, free: 53] 10:49 < rowbit1> Hourly usage stats: [developer: 1, free: 32] 11:49 < rowbit1> Hourly usage stats: [developer: 0, free: 73] 12:49 < rowbit1> Hourly usage stats: [developer: 0, free: 37] 13:49 < rowbit1> Hourly usage stats: [developer: 0, free: 34] 14:09 < rowbit1> substack, pkrumins: These encoders are STILL down: 50.57.171.229(dev-ie6-2) 14:13 < rowbit1> substack, pkrumins: These encoders are STILL down: 50.56.27.70(dev-ie6-1) 14:49 < rowbit1> Hourly usage stats: [developer: 6, free: 50] 14:51 < rowbit1> substack, pkrumins: These encoders are STILL down: 50.56.32.168(dev4) 15:01 < rowbit1> substack, pkrumins: A developer is waiting in the queue for explorer/8.0 15:04 < rowbit1> substack, pkrumins: A developer is waiting in the queue for explorer/8.0 15:49 < rowbit1> Hourly usage stats: [developer: 24, free: 48] 16:48 < rowbit1> substack, pkrumins: A developer is waiting in the queue for explorer/8.0 16:49 < rowbit1> Hourly usage stats: [developer: 1, free: 55] 17:21 < rowbit1> substack, pkrumins: A developer is waiting in the queue for explorer/8.0 17:29 < jez0990> mikolalysenko: "least common ancestor and upper parent queries" +1, it does sound useful! I would love to know if there's an optimal way to store DAGs in json 17:37 < rowbit1> substack, pkrumins: A developer is waiting in the queue for explorer/7.0 17:49 < rowbit1> Hourly usage stats: [developer: 51, free: 49] 17:59 < mikolalysenko> jez0990: you can do them in O(1) time actually 18:00 < mikolalysenko> too bad we have to wait til es7 18:01 < mikolalysenko> I think if we get it though, js could be as fast as c++ 18:01 < mikolalysenko> err wrong channel 18:03 < pfraze> mikolalysenko, what were you referring to? 18:03 < mikolalysenko> oh, value types for js 18:03 < mikolalysenko> was in #bbg 18:04 < mikolalysenko> this is a thing I've been kind of obsessed with for some time now 18:04 < mikolalysenko> they were originally proposed for es6, but got axed and moved up to es7 18:04 < pfraze> this is the int32 kind of stuff? 18:04 < mikolalysenko> yeah, but you could make compound objects 18:04 < mikolalysenko> and the compiler/run time would have explicit support for them 18:05 < mikolalysenko> so you could pass them around with doing allocations/dereferencing 18:05 < pfraze> interesting 18:05 < mikolalysenko> also you get the possibility to control the layout of objects in memory, allowing for algorithms that actually scale wrt cache 18:06 < mikolalysenko> which is kind of a big deal, and the main reason that js/java is slow 18:06 < pfraze> huh, can you suggest some reading on that? 18:06 < mikolalysenko> about what? value types or cache efficient algorithms? 18:07 < pfraze> either, but cache-effiency in particular 18:07 < mikolalysenko> here is a pretty accessible intro lecture on it: http://courses.csail.mit.edu/6.851/spring14/lectures/L07.html 18:07 < mikolalysenko> and here is a kind of fuzzy historical overview: http://courses.csail.mit.edu/6.851/spring14/lectures/L22.html 18:07 < mikolalysenko> unfortunately you can't implement that stuff in js 18:08 < mikolalysenko> well, actually you kind of can 18:08 < mikolalysenko> using typedarrays 18:08 < mikolalysenko> but it is very complicated and not fun 18:08 < mikolalysenko> and also you lose a lot on unboxing/datatype conversion 18:08 < mikolalysenko> and it is hard to do in a generic way 18:09 < mikolalysenko> basically java (and js) were defined in an era when the dominant thinking about computer perf was in terms of something called a "pointer machine" 18:09 < mikolalysenko> but as computers got faster, and caches got bigger, we've had to adopt a more realistic way of thinking about programs 18:09 < mikolalysenko> which is the "hierarchical memory model" 18:10 < mikolalysenko> the hmm can implement pm algorithms, and vice-versa the pm algorithms are not efficient when translated to hmm 18:10 < mikolalysenko> since they don't scale with respect to cache parameters 18:10 < mikolalysenko> so asymptotically they are slower 18:11 < pfraze> is that related to the "cache-oblivous alg" concept? 18:11 < mikolalysenko> yeah 18:11 < mikolalysenko> cache oblivious = programming in hierarchical memory model without knowledge of specific parameters for cache 18:11 < mikolalysenko> practically though you write them in the same language 18:11 < mikolalysenko> which is actually an older model than the pointer machine! 18:12 < mikolalysenko> it is called the word ram model 18:12 < mikolalysenko> which is the model that C uses for programming 18:12 < mikolalysenko> so C programs can be interpreted in either the word ram model, the hmm model, or the cache oblivious model 18:12 < mikolalysenko> java programs only work in pointer machine 18:12 < mikolalysenko> so it is less expressive 18:12 < mikolalysenko> and ultimately less efficient 18:13 < mikolalysenko> since you can't implement some optimizations that would otherwise be possible in a word ram language, like C 18:13 < mikolalysenko> this is not a kind of constant factor optimization either 18:13 < mikolalysenko> it is an *asymptotic* speed up 18:13 < mikolalysenko> ie, the C program will scale wrt cache, while the java program can't 18:14 < mikolalysenko> this is a limtation of pointer machine languages 18:14 < mikolalysenko> *but* if we add value types, then we regain the ability to write word ram style programs! 18:14 < mikolalysenko> and life is good again 18:14 < pfraze> and that's because the pointer model doesn't factor cache into its decision making? 18:14 < mikolalysenko> it has no concept of locality 18:14 < pfraze> yeah 18:15 < mikolalysenko> every memory operation is an indirect pointer access 18:15 < mikolalysenko> ie your memory is a collection of objects, and they have references to other objects 18:15 < mikolalysenko> it does not understand or even allow you to model their distribution in physical ram 18:15 < mikolalysenko> no such concept exists in that model 18:15 < pfraze> right 18:15 < mikolalysenko> with value types though, you *can* express that concept 18:16 < rowbit1> substack, pkrumins: Encoders down: 50.57.174.105 (dev-ie8-2) 18:16 < mikolalysenko> ie, an array of value types would be arranged contiguously in memory 18:16 < mikolalysenko> this is why things like buffers/typed arrays let you get much better performance in js 18:16 < mikolalysenko> since they let you take advantage of caching and locality 18:18 < pfraze> I see. So you can avoid indirection, I'm guessing you can also consider the size of your structure relative to the cache size. Would you also be able to make good decisions about keeping most of a structure in a specific cache and updating it in-place, or is that out of reach? 18:18 < rowbit1> substack, pkrumins: A developer is waiting in the queue for explorer/8.0 18:18 < mikolalysenko> the specific policy for caching turns out to not matter too much 18:18 < mikolalysenko> just using lru caches comes within a constant factor of optimality 18:19 < mikolalysenko> ie an lru cache of size 2m = optimal cache of size m 18:19 < mikolalysenko> the important thing is to realize that there is a cache in the first place though 18:19 < mikolalysenko> and that memory is transfered in blocks 18:20 < pfraze> ok, thanks for explaining that for me 18:20 < mikolalysenko> sure, the more people who understand this issue hopefully the more traction we can get in the language design 18:21 < mikolalysenko> and some day, (god willing) we will get value types in js 18:21 < pfraze> well you've got my interest 18:22 < pfraze> grabbing lunch o/ 18:23 < rowbit1> substack, pkrumins: A developer is waiting in the queue for explorer/8.0 18:25 < rowbit1> substack, pkrumins: A developer is waiting in the queue for explorer/8.0 18:29 < rowbit1> substack, pkrumins: A developer is waiting in the queue for explorer/8.0 18:38 < rowbit1> substack, pkrumins: A developer is waiting in the queue for explorer/8.0 18:39 < rowbit1> substack, pkrumins: A developer is waiting in the queue for explorer/8.0 18:49 < rowbit1> Hourly usage stats: [developer: 29, free: 49] 18:51 < rowbit1> substack, pkrumins: Encoders down: 50.57.174.105 (dev-ie8-2) 18:53 < defunctzombie> thlorenz: we should investigate adding code coverage to zuul, that would be cool 18:59 < thlorenz> defunctzombie: yep - shouldn't be too hard right - just inject the libcov transform and then show results nicely? 18:59 < thlorenz> or coverify or whatever ify module it is ;) 18:59 < defunctzombie> I think so (but I have no idea) 18:59 < defunctzombie> I would like to use istanbul if possible 18:59 < defunctzombie> cause it already generates reports 19:00 < defunctzombie> and has a good coverage engine from what I can tell 19:00 < thlorenz> I can convince some peeps here that we need coverage and if there is time I can work at it 19:00 < defunctzombie> haha 19:00 < thlorenz> right now I'm totally swamped outside of work - lots of stuff going on and pending PRs 19:02 < defunctzombie> https://www.npmjs.org/package/istanbulify 19:02 < defunctzombie> this looks promising 19:02 < defunctzombie> tho I have no idea how to get the data out of it haha 19:03 < thlorenz> defunctzombie: cool 19:07 < rowbit1> substack, pkrumins: Encoders down: 50.57.174.105 (dev-ie8-2) 19:34 < rowbit1> substack, pkrumins: Encoders down: 184.106.99.27 (dev-ie7-3) 19:34 < rowbit1> substack, pkrumins: seaport services down: auth, tunnels 19:49 < rowbit1> substack, pkrumins: seaport services down: web.status 19:49 < rowbit1> Hourly usage stats: [developer: 5, free: 13] 20:10 < jesusabdullah> substack: How do you make form submit buttons do ajaxy shit instead of a typical POST, without jquery? 20:10 < jesusabdullah> substack: Now I *know* you're all about ditching jquery 20:15 < pkrumins> jesusabdullah: use the raw XMLHttpRequest object 20:15 < jesusabdullah> pkrumins: I don't mean making the request, I mean disabling the default submit behavior and hooking onto the click event 20:16 < pkrumins> yes that's exactly how you do it 20:16 < pkrumins> without jquery 20:16 < jesusabdullah> yeah but how? XD 20:16 < mikolalysenko> why use a form object? just use a div 20:16 < jesusabdullah> Like idk the APIs 20:16 < chapel> why what mikolalysenko said 20:16 < pkrumins> jesusabdullah: i've a code sample right here 20:16 < chapel> just read the input elements directly 20:16 < jesusabdullah> pkrumins: most excellent 20:16 < chapel> no form 20:16 < mikolalysenko> document.querySelectorAll(...) blah 20:16 < pkrumins> jesusabdullah: except ci.testling.com is down right now 20:16 < chapel> and hook onto a button/link to do the submit using ajax 20:17 < mikolalysenko> and get all children of the div object, cat to json object, etc. 20:17 < pkrumins> wanted to link you to source part 20:17 < pkrumins> jesusabdullah: 1 sec 20:17 < pkrumins> jesusabdullah: i'll gist it 20:18 < jesusabdullah> pkrumins: sick 20:19 < pkrumins> jesusabdullah: so you do button.addEventListener('click', function () { ... }) for the submit button: https://gist.github.com/pkrumins/ded6bf4eb105eebf2bac#file-gistfile1-txt-L81 20:19 < pkrumins> jesusabdullah: then you crate a new XMLHttpResponse object and setup all the handlers https://gist.github.com/pkrumins/ded6bf4eb105eebf2bac#file-gistfile1-txt-L160 20:19 < jesusabdullah> pkrumins: Oh, baller 20:20 < jesusabdullah> pkrumins: I'm gonna use browser-request to make the actual call ^__^ 20:20 < pkrumins> jesusabdullah: and then you build and send the x-www-form-urlencoded data for the POST request https://gist.github.com/pkrumins/ded6bf4eb105eebf2bac#file-gistfile1-txt-L196 20:20 < pkrumins> jesusabdullah: yeah that works 20:34 < jesusabdullah> pkrumins: is there a corresponding html doc for that? I'm herping the derp reading y'alls querySelector 20:36 < pkrumins> jesusabdullah: yes this part https://gist.github.com/pkrumins/ff08b334da7c88c4a6c1#file-gistfile1-txt-L62-L103 20:36 < jjjohhny> githubs stupid commit graph 20:40 < jesusabdullah> cool 20:40 < jesusabdullah> thanks a ton ^__^ 20:49 < rowbit1> Hourly usage stats: [developer: 0, free: 61] 20:51 < rowbit1> substack, pkrumins: These encoders are STILL down: 50.56.32.168(dev4) 20:54 < ogd> anyone know a node module for turning a string of HTML into DOM elements? similar to $('
') in jQuery 20:55 < mikolalysenko> ogd: no, but I think it should be easy to do 20:56 < jesusabdullah> substack: pkrumins: Does browserify have issues browserifying json blobs? https://gist.github.com/jesusabdullah/9818460 20:56 < mikolalysenko> just create a div, set .innerHTML = str, and return all children 20:56 < jesusabdullah> Any ideas on how to make that happier? ^^ 20:56 < substack> ogd: there's also domify 20:57 < jesusabdullah> If I get this, it means I can share my schema validations between my client and server p much seamlessly, which is hella win 21:00 < ogd> cool, domify worked http://requirebin.com/?gist=maxogden/9818569 21:00 < jesusabdullah> ogd: Maybe you know. Does browserify have issues with requiring json? https://gist.github.com/jesusabdullah/9818460 21:01 < jesusabdullah> That file appears to be there 21:01 < jesusabdullah> I guess I could get around it by vendoring 21:01 < ogd> jesusabdullah: dont think i've tried that, you probably need to do fs.readFileSync and use the brfs transform I would guess 21:03 < ogd> jesusabdullah: it appears browserify supports json though https://github.com/substack/node-browserify/tree/da64917a77d1e46d2c2061647508bcc4256b9acf/test/json 21:04 < mikolalysenko> I think require("blah.json") works 21:04 < mikolalysenko> I've used it multiple times anyway 21:09 < jesusabdullah> ogd: ugh I dun' wanna have to vendor joi 21:09 < jesusabdullah> ehhhhh I'll take a look around I guess 21:11 < jesusabdullah> Oh, no, I bet adding brfs will fix this 21:11 < jesusabdullah> looks like he's not requiring. Noob. 21:13 < jesusabdullah> WHAT THE CRAP uuuugh 21:13 < mikolalysenko> more fun with weakmaps! https://github.com/mikolalysenko/least-common-ancestor 21:16 < jesusabdullah> cool 21:18 < mikolalysenko> I am beginning to really like that feature for building augmentations to data structures 21:18 < ogd> tree.baz.zardoz.potato ftw 21:21 < mikolalysenko> I think I will try level ancestors next 21:23 < pfraze> nice 21:46 < jjjohhny> wi(zard(of)oz) 21:47 < mikolalysenko> https://www.youtube.com/watch?v=kbGVIdA3dx0 21:49 < rowbit1> Hourly usage stats: [developer: 1, free: 47] 21:50 < mikolalysenko> and this: http://godzillu.daa.jp/zardoz/ 21:56 < mikolalysenko> that movie is both profoundly terrible and bizarre 21:57 < mikolalysenko> having seen it, I think it has damaged some part of my subconscious brain permanently, and no amount of alcohol can undo the damage 22:00 < jjjohhny> i think it is neutured, conceptually. should have been MST3K'd. But as an oddity in cinema, it stands on its own. 22:06 < mikolalysenko> are there any random json generator modules/projects on npm? 22:06 < mikolalysenko> would be useful for testing things I think 22:07 < mikolalysenko> or maybe a standard json object test suite 22:16 < navaru> I have a video stream coming from a service, content type: video/x-mpegts, I want to buffer it (like ~1mb) convert the buffer to mp4 and multi-cast it 22:16 < navaru> any suggestions what to use or how to approach this? 22:21 < jjjohhny> avconv for convert 22:21 < substack> mikolalysenko: faker 22:21 < jjjohhny> faker is awesome 22:22 < mikolalysenko> interesting 22:22 < mikolalysenko> can it generate random dynamic trees though? 22:22 < mikolalysenko> I am looking for something which generates totally arbitrary json objects 22:43 < mikolalysenko> lca/ancestor queries could be useful in parsing I think 22:44 < mikolalysenko> for example, maybe you visit a node and you want to get its great-great-great-grand parent 22:44 < mikolalysenko> which should be possible in O(1) using level ancestors 22:45 < mikolalysenko> or maybe you have two different nodes and you want to find the common block which contains them 22:49 < rowbit1> Hourly usage stats: [developer: 0, free: 31] 22:56 < pfraze> maybe something to do with search or classification. Compare a set of objects, treat each difference as a tree, treat each attribute as a leaf. Create an index of the leafs. Search against the leafs, then use lce to trace up the tree and discover... some commonality 23:48 < jjjohhny> gonna hash the fuck out of this work computer digging dogecoins 23:49 < rowbit1> Hourly usage stats: [developer: 1, free: 26] --- Log closed Fri Mar 28 00:00:08 2014