--- Log opened Wed Jan 30 00:00:30 2013 --- Day changed Wed Jan 30 2013 00:00 < gozala> Raynos: reopening same issue over & over again does not really help solving it 00:00 < Raynos> agreed 00:01 < Raynos> When I get round to it this week I'm going to make method stateful and PR reducers / reducible 00:01 < gozala> Blaming library for the dedup issue is not helpful either 00:01 < Raynos> gozala/method is the only library that has this issue :/ 00:01 < gozala> Raynos: I pointed out the issues with the approach you've suggested 00:01 < gozala> it introduces more issues than it solves 00:01 < Raynos> I know there are issues 00:01 < Raynos> fuck them. Don't care. 00:02 < gozala> and in fact it just mitigates issues does not even solves it 00:02 < Raynos> sure it solves them 00:02 < gozala> you don't want to wind up with copies of same module in your browserified app 00:02 < gozala> I do care though 00:02 < Raynos> method("reducers.map@3.0.0-alpha") 00:02 < Raynos> done. solved. 00:03 < Raynos> gozala: the problem is this dedup things bites me in the ass every frigging week. 00:03 < gozala> Raynos: yes but it's still will remain issues 00:04 < gozala> hiding your head under the wing does not damn solves it 00:04 < gozala> you'll still have copies of the same thing 00:04 < gozala> send over the wire 00:04 < gozala> and maybe you don't care about it, but that is an issue 00:05 < gozala> and it needs to be solved one way or another 00:05 < gozala> only way to solve it i know of is using npm dedup 00:05 < Raynos> thats ok 00:05 < Raynos> thats not optimized 00:05 < Raynos> but it works 00:05 < Raynos> if method breaks 00:05 < Raynos> my app doesnt work 00:05 < Raynos> and I waste half the fucking day debugging it 00:05 < gozala> Raynos: it does not breaks 00:05 < Raynos> if I waste 10kb sending data over the wire 00:05 < Raynos> no-one gives a fuck 00:06 < gozala> it makes it obvious you have two different copies of thing in the same app 00:06 < Raynos> no it doesnt 00:06 < Raynos> anyway im going to fix method and port reducers / et al 00:06 < pkrumins> my 300 baud modem gives a fuck 00:07 < gozala> Raynos: your blaming a wrong guy for the issue here 00:07 < gozala> if you wanna help, try to fix npm so it's easy to express dedup 00:07 < Raynos> no ill fix method 00:07 < Raynos> method is the only module that breaks 00:08 < gozala> Raynos: It does not breaks it works as expected 00:08 < gozala> it just does not matches your expectation 00:08 < Raynos> your definition of as expected is fucked 00:08 < Raynos> it doesnt do polymorphic dispatch correctly 00:08 < gozala> Raynos: it fucking does 00:09 < gozala> you just throw copies of the same mobule 00:09 < gozala> but they are different typeqs 00:09 < Raynos> they are the same type 00:09 < gozala> the fact that you have Stream constructor million times 00:09 < gozala> does not makes them all the same 00:09 < Raynos> true 00:10 < gozala> as of JS concern they are totally diff things 00:10 < Raynos> fuck. 00:10 < gozala> so method does treats them as such 00:10 < Raynos> god this is an annoying problem 00:10 < gozala> At the moment problem is that we're fucking scared of sharing 00:10 < gozala> oh all these languages share and have issues 00:10 < gozala> so we don't share at all 00:11 < gozala> but it's more reasonable to think why sharing is the problem 00:11 < dominictarr> gozala: share what? 00:11 < gozala> and weather sharing at the project level poses same problems 00:11 < gozala> dominictarr: sharing dependencies 00:11 < gozala> Don't get me wrong 00:12 < gozala> I'm all up for not doing system level sharing 00:12 < dominictarr> oh right 00:12 < gozala> that one is doomed 00:12 < gozala> and I'm happy we don't do that 00:12 < ralphtheninja> system level sharing? 00:12 < dominictarr> gozala: no, I think this is the right way 00:12 < gozala> ralphtheninja: by system I mean os 00:12 < gozala> same as other mainstream langs 00:13 < gozala> do 00:13 < dominictarr> - like between applications 00:13 < dominictarr> gozala, npm dedupe only dedupes when a single version is acceptable 00:13 < gozala> dominictarr: I do want share with in my app 00:13 < dominictarr> what you are talking about is npm flatten 00:13 < gozala> not across the apps 00:13 < dominictarr> you could write that - easy 00:14 < dominictarr> it might break things though 00:14 < gozala> dominictarr: No I'm just talking about dedup by default 00:14 < gozala> if there is version conflict than don't share 00:14 < dominictarr> yes - what should it do then? 00:15 < dominictarr> gozala: right - so … that is what dedupe does now, isn't it? 00:15 < gozala> dominictarr: yes 00:15 < dominictarr> great! so whats the problem? 00:15 < gozala> the problem is that as a lib author I need to tell people dedup 00:16 < gozala> and Raynos keeps forgetting to do this 00:16 < Raynos> not foregetting 00:16 < Raynos> npm dedup doesnt dedup dev depencencies 00:16 < Raynos> so I need to go patch npm 00:16 < gozala> dominictarr: ok so apparently it's even worth 00:16 < dominictarr> oh right 00:16 < Raynos> and I also added npm dedup as postinstall ( https://github.com/Colingo/date-now/pull/1 ) which breaks other peoples shit 00:16 < gozala> Raynos: are you sure it doesn't I think it does 00:16 < gozala> but sometimes it fails 00:17 < gozala> so I just remove deps then install 00:17 < dominictarr> why does your stuff depend on dedupe? 00:17 < gozala> dominictarr: https://github.com/Gozala/method/wiki/Known-Issues 00:18 < dominictarr> agree, this does not perserve the identity of modules 00:19 < gozala> dominictarr: but even if you ignore that problem when I do a web app I don't want to wind up with dups of module 00:19 < dominictarr> this is where a implicit interface would work well 00:19 < gozala> I minimize hell out of the js I send and definitely don't want copies there 00:20 < dominictarr> sure - I argue it's way better that you CAN have duplicates, even in web apps 00:20 < gozala> dominictarr: I'm not saying there should be no way to have unshard deps 00:21 < gozala> I'm arguing that now it's a wrong default 00:21 < gozala> I'd rather prefer saying that in this specific case I don't wanna share 00:21 < gozala> then having to say for all web apps that I want to share 00:21 < gozala> not to say that I could just bundle my copy with me 00:22 < gozala> and all of the users won't even have to care 00:22 < gozala> while now I have to explain everyone what is the issue 00:22 < dominictarr> hmm, you may be right 00:22 < gozala> and give a receipt to fix it 00:23 < gozala> or at least if I could express dedup me and all of my copies at the lib level 00:23 < gozala> that would be a great help 00:24 < dominictarr> npm WARN please dedupe 00:32 < Raynos> gozala: this could also be solved by having dom-reduce peer depend on reducers 00:32 < Raynos> and not have its only dependency on reducers which it mutates 00:32 < Raynos> I think this is the main issue that people are dependending on reducers / reducible instead of peer dependending 00:33 < gozala> Raynos: it doesn't depend on reducers it depends on reducible though 00:33 < Raynos> yeah it shouldnt 00:33 < Raynos> it shouldnt depend on either but peer depend on them 00:33 < gozala> Raynos: I'm ok with making them peer-dependencies if that helps 00:33 < Raynos> dom-reduce is a plugin for reducible 00:33 < Raynos> that way it will break more aggressively 00:34 < Raynos> I think this will solve most of the problems 00:34 < Raynos> that means my app always installs a copy of reducers & reducible 00:34 < Raynos> and everyone else peer depends on them 00:34 < gozala> Raynos: what happens if no one depends on reducible then ? 00:34 < Raynos> then it breaks 00:34 < Raynos> because reducers will need a peer dependency on reducible 00:34 < Raynos> its the app author's responsibility to install reducible and reducers 00:35 < gozala> hmm… app is responsible of installing reducers 00:35 < gozala> or something that uses reducers 00:35 < gozala> no one needs to depend on reducible directly 00:37 < Raynos> gozala: question about hub ( https://gist.github.com/53aed4d4de944e795bb2 ) why is it all x then all y and not x1 y1 x2 y2 ? 00:37 < Raynos> gozala: but reducers and things that depend on reducers dont use reducers as much as grab a copy of reducers and mutate it's state table of polymorphic dispatch 00:37 < Raynos> they shouldnt depend on them and mutate their own little copy 00:38 < gozala> Raynos: you're messing up naming here 00:38 < gozala> no one mutates reducers 00:38 < gozala> everyone defines reducbile/reduce implementation for their types 00:38 < Raynos> yeah they mutate reducible, not reducers 00:38 < gozala> which in a way mutates reducible 00:40 < Raynos> I see merge is depth first not breadth first 00:40 < Raynos> blargh 00:41 < Raynos> ok I will just put all the logic in a single expand call :D 00:42 < gozala> Raynos: I think you have some concurrency issues 00:42 < Raynos> synchronous concurrency :D 00:42 < gozala> I can't make sense of your posts 00:42 < Raynos> node is weird because all my race conditions are synchronous 00:42 < Raynos> I have a source 00:42 < gozala> I'm speaking of you not the node :) 00:43 < Raynos> I filter it by "add" messages and "remove" messages 00:43 < Raynos> then I map / transform / bla and then merge them 00:43 < gozala> Raynos: ... 00:44 < Raynos> if the source is synchronous I would expect the single source to dispatch the messages to the two filters in order 00:44 < gozala> were not you talking about reducible before ? 00:44 < Raynos> Oh 00:44 < gozala> I'm completely lost 00:44 < Raynos> I changed halfway through 00:44 < Raynos> Ok 00:44 < Raynos> so reducible is seperate issue 00:44 < Raynos> I think everyone that depends on reducible should peer depend on it instead 00:44 < Raynos> including reducers 00:44 < Raynos> the other issues is I dont understand lazy structures 00:45 < gozala> Raynos: I'm ok with peer depending on reducibles if it mitigates the issue 00:45 < Raynos> I think it will 00:45 < Raynos> because there will only ever be one reducible 00:45 < Raynos> the one I install for my app 00:45 < Raynos> which makes sense 00:46 < gozala> Raynos: so you're app will have to depend on reducible then ? 00:46 < Raynos> yes 00:46 < gozala> Raynos: ah that sucks ... 00:46 < Raynos> sucks less then having to run npm dedup 00:46 < gozala> how about everything peer depends on reducible except reducers 00:46 < Raynos> that works as well 00:47 < Raynos> except I dont know whether installing reducers and dom-reduce side by side work 00:47 < Raynos> because dom-reduce peer depends on reducible 00:47 < Raynos> and reducible will be a cousin of dom-reduce 00:47 < gozala> We can probably try this out 00:48 < gozala> Raynos: I'll be offline starting from tomorrow for some time though 00:48 < Raynos> ok 00:48 < Raynos> in the meanwhile ill manually install reducible in my npm 00:49 < Raynos> and npm dedup everything 01:27 < mbalho> substack: im goin to campjs, do you know where you're staying the 13th, 18th and 19th? 01:29 < Raynos> chrisdickinson: yo 01:30 < rvagg> mbalho: very cool to have you coming along; looking forward to it! 01:30 < mbalho> rvagg: im excited! 01:30 < rvagg> the speaker list is now fully #stackvm 01:30 < ralphtheninja> I'll come next time :) 01:32 < mbalho> hehe 01:32 < rvagg> I think there might still be tickets ralphtheninja, no excuses 01:40 < dominictarr> mbalho: AWESOME 01:40 < mbalho> dominictarr: what you doin after? 01:41 < mbalho> dominictarr: i wanna see your home land 01:41 < dominictarr> mbalho: I'm flying straight back - if you want to make a side trip it's not far! 01:42 < dominictarr> last I checked, round trip BNE - WLG is about $500 01:43 < dominictarr> rvagg: Raynos ralphtheninja juliangruber https://github.com/rvagg/node-levelup/wiki/Plugin-Pattern-Discussion 01:43 < mbalho> dominictarr: sweet i will go to wlg with you for a bit if you would be willing to show me around 01:43 < dominictarr> ABSOLUTELY 01:44 < mbalho> wewt 01:45 < mbalho> dominictarr: so youre going back to wlg on the 18th? 01:46 < fotoverite> Oh god lucky all of you. 01:46 < dominictarr> yeah, the plan is to attend this http://www.multicoreworld.com/ 01:46 < dominictarr> fotoverite: come too! 01:46 < fotoverite> thailand 01:46 < fotoverite> I go there on the 17h 01:46 < dominictarr> I'll be in NZ for 2 weeks after campjs 01:46 < fotoverite> plus my god the amount of flying to do both 01:47 < mbalho> dominictarr: hmm multicoreworld doesnt really look up my alley 01:47 < dominictarr> that is the appeal 01:47 < mbalho> lol 01:47 < dominictarr> it's NOT a js conference 01:47 < dominictarr> so, i'll be able to learn new stuff to take to the js conferences. 01:48 < mbalho> sweet 01:48 < dominictarr> mbalho: anyway, I'm be in wellington for about two weeks, but your welcome to stay as long as you like :) 01:48 < dominictarr> this is the best time of the year to see nz 01:49 < mbalho> dominictarr: where are you staying in wellington? 01:49 < dominictarr> hmm, friends room while they are travelling 01:50 < dominictarr> there is always something like that available - I can arrange something for you 01:50 < ralphtheninja> rvagg: would've been cool, but going to Ireland next week 01:51 < mbalho> dominictarr: that would be awesome, i would probably stay a week 01:51 < ralphtheninja> and some financial issues, otherwise I'd be there in a swoosh 01:52 < dominictarr> okay - I'll see what I can rig up, you'll need a bicycle too 01:52 < Raynos> dominictarr: thanks for the docs? :D 01:52 < dominictarr> '?'? 01:54 < fotoverite_> dominictarr: you coming to nodeconf? 01:54 < dominictarr> fotoverite_: yes, have ticket 01:54 < fotoverite_> Cool, still deciding 01:55 < fotoverite> If I hadn't had to buy this new computer I would be there. 01:58 < fotoverite> Impressive SYD BKK JFK is only 2,300 01:58 < fotoverite> but it's a 28 plane ride to australia woooo 02:00 < Raynos> dominictarr: '!' wrong key 02:00 < fotoverite> dominictarr: Next year when I do even more conferences! 02:00 < fotoverite> DO ALL THE CONFS! 02:00 < LOUDBOT> YOU CAN'T GET AWAY WITH THIS.. I KNOW PEOPLE!! 02:00 < Raynos> fotoverite: me too 02:00 < Raynos> we will both do ALL THE CONFS 02:00 < Raynos> ALL OF THEM 02:00 < LOUDBOT> @SHIYIYA WHY DON'T YOU LOVE ME ANYMORE? I MISS YOU. 02:00 < fotoverite> @SHIYIYA why don't you love loudbot!? 02:01 < fotoverite> FYI I really like the makeover to hip monk so clean 03:27 < Raynos> oh hi 03:30 < defunctzombie> \o/ 03:32 < Raynos> defunctzombie: I tried to use tryme and failed 03:32 < defunctzombie> haha 03:32 < defunctzombie> :( 03:33 < defunctzombie> I am making it better :) 03:33 < defunctzombie> it will show readmes and js examples 03:33 < defunctzombie> Raynos: what failed? 03:33 < Raynos> well its about local use 03:33 < defunctzombie> did it not find something? 03:33 < Raynos> right now I use `browservefy ./examples/simple.js --browserify='browserify-server' -- --debug --bundle` 03:33 < Raynos> that's chrisdickinson/browservefy 03:33 < defunctzombie> k 03:34 < Raynos> I need the ability for you to render arbitrary js files and I need the ability to say "fuck your browserify command use mine" 03:34 < Raynos> I use `browserify-server --bundle --debug FILE` to browserify my files 03:34 < defunctzombie> arbitrary js should be available soon 03:34 < defunctzombie> the custom browserify command I am not usre 03:34 < defunctzombie> I don;t actually use browerify internally 03:34 < Raynos> xd 03:34 < defunctzombie> cause I needed to be able to hook into something differently 03:35 < defunctzombie> and couldn't figure out how to make browserify do it 03:35 < defunctzombie> during this refactoring I might be able to get it to work again tho with browserify 03:35 < defunctzombie> but I still don't think it will allow for custom browserify command 03:35 < defunctzombie> cause that isn't the goal of the tool 03:36 < Raynos> well ill hack on it when I have time :) 03:36 < defunctzombie> :) 03:36 < defunctzombie> more than welcome to :) 03:36 < Raynos> but for now browservefy 03:36 < defunctzombie> also, debug is on by default 03:36 < Raynos> allows me to run a server that renders my browserify example 03:36 < Raynos> with one command 03:36 < Raynos> which is really what I want 03:36 < defunctzombie> yea, makes sense 03:36 < Raynos> next I need to integrate live reload 03:36 < Raynos> I used to do a scaffolding dance with browserify-server but that's crazy 03:37 < defunctzombie> live reload is more doable than the other stuff 03:37 < Raynos> live-reload is already solved :p 03:37 < defunctzombie> since that is just a matter of knowing when to reload 03:37 < Raynos> https://github.com/Raynos/live-reload 03:37 < Raynos> drop in a script, start a child process, done. 03:37 < defunctzombie> well, not really solved 03:37 < Raynos> the harder part is partial CSS reloading 03:37 < Raynos> or even partial JS reloading 03:38 < defunctzombie> not worth it really, just reload full js 03:38 < Raynos> anyway 03:38 < defunctzombie> and css 03:38 < Raynos> all of that shit is diffuclt 03:38 < defunctzombie> you can't do partial js in a reasonable way 03:38 < Raynos> well you want to reload CSS by swapping out a stylesheet 03:38 < defunctzombie> yes 03:38 < Raynos> not reloading the browser 03:38 < defunctzombie> yea 03:38 < Raynos> the full js reload is just a browser refresh 03:39 < defunctzombie> yep 03:39 < defunctzombie> anyhow, the first focus of tryme is to make it easier for people to view interactive readmes and examples 03:39 < defunctzombie> that are available on github 03:39 < defunctzombie> with the hope that more people write such examples :) 03:39 < defunctzombie> if they are easy to view 03:41 < Raynos> defunctzombie: https://github.com/Raynos/browserify-server/blob/master/index.js#L30 03:41 < Raynos> that's my problem :( 03:41 < defunctzombie> ? 03:41 < defunctzombie> what problem is that 03:41 < Raynos> browserify won't work on my example files 03:41 < Raynos> because I have special hooks for files 03:41 < defunctzombie> why do you have that 03:42 < Raynos> because I like requiring templates and getting text back 03:42 < defunctzombie> (this is what I was saying about html files being served) 03:42 < defunctzombie> well, that is not really a js thing 03:42 < Raynos> Correct 03:42 < Raynos> but its convenient ( https://github.com/Colingo/dom-widget/blob/master/examples/simple.js#L8 ) 03:43 < Raynos> I like having this notion of widget(template, implementation) 03:43 < defunctzombie> well, there you just have the html inline 03:43 < defunctzombie> but yea, obviously with more html it can look worse 03:43 < defunctzombie> I was talking about this before with some various ideas 03:43 < defunctzombie> personally I think require _could_ load any file 03:44 < defunctzombie> and just export the string 03:44 < dominictarr> Raynos: so my vision for all this levelup plugin stuff... 03:44 < Raynos> well I think what I need to do 03:44 < Raynos> is build a templating language like dominictarr/hyperscript 03:44 < Raynos> so that my templates are valid JS 03:44 < defunctzombie> the problem is .. what does it mean to require('foo.png'); 03:45 < dominictarr> is I want to be able to declaritively define databases interms of transformations on top of other databases 03:45 < defunctzombie> but yes.. I think for widgets certainly the notion of require html is interesting 03:45 < defunctzombie> but you can also make a step which turns the html into js 03:45 < defunctzombie> and require that 03:46 < defunctzombie> ideally with the hope that you don't edit the html often.. but that is a bit sad 03:47 < dominictarr> defunctzombie: a simplification here, is that only js files can do require 03:47 < defunctzombie> well, I personally think that the notion of require html templates is reasonable 03:47 < defunctzombie> but require css is not 03:47 < defunctzombie> css should be loaded upfront into the head if possible 03:47 < defunctzombie> and namespaced if even more possible 03:48 < dominictarr> and we already have require .json 03:48 < Raynos> defunctzombie: the annoying thing is that there are two files then in my module 03:48 < dominictarr> but if you are gonna do html, you should just make it work with everything 03:48 < defunctzombie> I guess I would not be against require('./any/file/'); 03:48 < Raynos> defunctzombie: I dont think I want to require css 03:48 < dominictarr> require('whatever.txt') 03:48 < defunctzombie> right 03:48 < defunctzombie> I mean, .js just have special meaning 03:48 < defunctzombie> but then what if I require .png? 03:48 < defunctzombie> do I base 64 that? 03:49 < defunctzombie> what does it mean to require data 03:49 < Raynos> dominictarr: what do you mean transformations? 03:49 < defunctzombie> base 64 does seem reasonable actually.. but who knows 03:49 < defunctzombie> could go down a dangerous path.. :/ 03:49 < dominictarr> Raynos: well a map reduce is just a referentially transparent transformation on the contents of the database 03:49 < defunctzombie> but a path that I think could be very useful for some cases 03:50 < defunctzombie> but abused in others hahaha 03:50 < dominictarr> defunctzombie: you get the buffer? 03:50 < defunctzombie> dominictarr: what buffer? 03:50 < defunctzombie> now you have to have a buffer object or something 03:50 < dominictarr> just binary 03:51 < defunctzombie> and that is less interesting than a data url I think 03:51 < dominictarr> maybe the best way, it to have a browserify2 plugin 03:52 < dominictarr> where you go require.text('whatever.html') 03:52 < defunctzombie> na 03:52 < defunctzombie> that seems ghetto :/ 03:52 < dominictarr> require.binary('somthing.png') 03:52 < defunctzombie> well, in browserify you can already .register 03:52 < defunctzombie> how you want something handled 03:52 < defunctzombie> but the issue is if you make this in a web widget 03:52 < dominictarr> it does fs.readSync on the vserver 03:53 < defunctzombie> others need to use the exact same thing 03:53 < defunctzombie> to use your widget 03:53 < dominictarr> well… there isn't really an elegant way to decide whether you should load string or binary otherwise 03:54 < dominictarr> it's better to give someone the power to do what they need even if it's a bit ugly 03:54 < defunctzombie> Raynos: do you really have that much html that you want to load? 03:54 < dominictarr> don't try and hide uglyness 03:54 < dominictarr> if you can't polyfill it cleanly 03:54 < defunctzombie> dominictarr: I would not want to make something that is tied to a particular tool personally, I would want to create a generic require approach for this that people are happy with and is reasonable 03:55 < dominictarr> exactly 03:55 < dominictarr> that is just too broard 03:55 < dominictarr> like someone will want to load 3d texture files, or 3d models, or wav or csv or something else weird like that. 03:56 < defunctzombie> sigh 03:57 < defunctzombie> giving the focus is widgets, maybe allow .html loading 03:57 < defunctzombie> but then why .html extension 03:57 < defunctzombie> how about .txt 03:57 < defunctzombie> and write your html in the .txt file haha 03:57 < defunctzombie> damn extensions 03:58 < dominictarr> exactly… or you have to tell node how to load what extensions - because this should still work on the server 03:58 < defunctzombie> I dunno that these _should_ 03:58 < defunctzombie> these are web widgets 03:58 < defunctzombie> they won't just work on the server 03:59 < defunctzombie> in a dom environemtn ment 03:59 < defunctzombie> *maybe 03:59 < dominictarr> browserify is broader than just web bundles 03:59 < dominictarr> it's just a js bundling tool 03:59 < dominictarr> it could be used for other js envs too 03:59 < defunctzombie> anything with require 03:59 < defunctzombie> but really it is focused on node 03:59 < defunctzombie> not other environments 03:59 < dominictarr> at the moment 04:00 * defunctzombie doesn't use browserify :) 04:00 < defunctzombie> I don't have a good answer for 'require' 04:00 < defunctzombie> :/ 04:01 < defunctzombie> I am tempted to say require is only for js and json 04:01 < dominictarr> defunctzombie: what are you using? 04:01 < defunctzombie> json was really just a side effect decision 04:01 < defunctzombie> dominictarr: script 04:01 < defunctzombie> dominictarr: I learn many lessons from browserify :) 04:01 < defunctzombie> but I don't want the client side boilerplate :/ 04:02 < defunctzombie> I like the idea that require is only for js or json 04:03 < defunctzombie> simple and you don't have to think about how to load other stuff when making a bundler 04:03 < defunctzombie> yea, html template stuff suffers as a result tho.. but I don't see a reasonable way around that 04:03 < defunctzombie> outside of a small tool to convert .html to a .js 04:04 < defunctzombie> which I think is kinda ghetto 04:05 < defunctzombie> really I think we are mostly talking about including html templates 04:05 < defunctzombie> more than any other data type I think 04:08 < Raynos> defunctzombie: enough to want a file 04:08 < defunctzombie> and I think since people can't do that now many just write the html in the js anyway 04:08 < Raynos> also little enough that multi line string literals are good enough 04:09 < defunctzombie> you can use \ I suppose :/ 04:09 < defunctzombie> I agree it is shitty 04:09 < defunctzombie> our life is filled with sadness 04:14 < Raynos> the solution is dominictarr/hyperscript 04:16 < dominictarr> defunctzombie: http://olado.github.com/doT/index.html 04:16 < dominictarr> html templates that compile to js function 04:16 < dominictarr> really fast, it claims. 04:16 < defunctzombie> dominictarr: seen it 04:17 < defunctzombie> I personally use handlebars (via the hbs package) for my sites 04:17 < defunctzombie> I started to work on braces 04:17 < defunctzombie> whcih was handlebars and ctemplate inspired 04:17 < defunctzombie> but yea 04:17 < defunctzombie> there are a few things like dot 04:17 < dominictarr> right - so the difference isn't too great 04:17 < defunctzombie> nope 04:17 < defunctzombie> and really, that is if you want templates.. sometimes people just want raw html as a string 04:17 < dominictarr> it's probably just a few regexps you need to change 04:18 < dominictarr> this does that too... 04:18 < defunctzombie> yea 04:19 < defunctzombie> to me the html aspect is/was less interesting than the css :/ 04:19 < defunctzombie> mostly cause for css more work had to be done to isolate it 04:20 < defunctzombie> html is usage with a widget is more open ended 04:20 < Raynos> but css is easy 04:20 < defunctzombie> yes 04:20 < Raynos> you can fall back to the way 04:20 < Raynos> html and templates are a pain in the ass 04:20 < defunctzombie> yes 04:20 < Raynos> because my widgets are ( https://github.com/Colingo/dom-widget ) functions that returns DOM things 04:20 < Raynos> so those templates 04:20 < Raynos> need to be in npm 04:20 < Raynos> and not in your html 04:21 < Raynos> and not widget($(".trolls")) 04:21 < defunctzombie> right 04:21 < Raynos> its var trolls = widget() 04:21 < defunctzombie> right 04:23 < Raynos> now im not even sure whether that is the right approach anymore to be honest 04:24 < Raynos> but thats a seperate conversation 04:24 < Raynos> for now it seems simple 04:24 < defunctzombie> haha 04:24 < defunctzombie> personally I have no "approach" 04:24 < defunctzombie> I just want to ship js files 04:24 < defunctzombie> and css files :) 04:24 < Raynos> im trying to make some UI decisions to get shit done faster 04:25 < defunctzombie> makes sense 04:25 < Raynos> like https://github.com/Colingo/widget-list 04:25 < defunctzombie> man.. really need tryme for these examples :p 04:25 < defunctzombie> I need to deploy this new version 04:25 < defunctzombie> dominictarr: inspired me :) 04:26 < Raynos> make a PR to COlingo/widget-list to show me how tryme works 04:26 < Raynos> also with like a local makefile target or something for local tryme usage 04:26 < defunctzombie> I will once I get the readme thing deployed 04:26 < defunctzombie> it will be very similar to the current tryme example js files 04:26 < defunctzombie> for the most part it will just work (tm) 04:26 < Raynos> btw help, -h, --help do nothing 04:27 < defunctzombie> yea :) 04:27 < defunctzombie> there is no help 04:27 < defunctzombie> you are on your own haha 04:28 < Raynos> thats why I use the browservefy ghetto :D 04:28 < defunctzombie> hahaha 04:35 < substack> mbalho: I'm staying at tim oxley's place 04:35 < chrisdickinson> Raynos: optimist doesn't muck with the rest of the args? 04:40 < Raynos> chrisdickinson: it shouldnt 04:41 < chrisdickinson> and fix_filed is gone because, well, we don't need to fix filed in this case, right? 04:41 < Raynos> it doesnt 04:41 < Raynos> correct 04:41 < chrisdickinson> cool, lgtm. 04:43 < chrisdickinson> published. 04:43 < chrisdickinson> thanks for the fixes! 05:04 < mbalho> substack: sweet 05:42 < Raynos> Yes. Mobile orchestra :3 05:43 < Raynos> Mobile irc 06:57 < mikolalysenko> I decapitaged node-webgl: https://github.com/mikolalysenko/headless-gl 06:57 < mikolalysenko> *decapitated 06:57 < mikolalysenko> bah it is late 06:58 < mbalho> haha 06:58 < mikolalysenko> but now you can use it do gpgpu stuff on a server! 06:58 < mikolalysenko> and render images without creating a window 06:58 < mbalho> thats awesome 06:58 < mikolalysenko> still need to test it on linux though 06:59 < mikolalysenko> and I have no idea if/how to make it work on windows... 06:59 < mikolalysenko> but that is a problem for a later date 07:01 < chrisdickinson> mikolalysenko: have you seen https://www.khronos.org/registry/webgl/conformance-suites/1.0.1/webgl-conformance-tests.html ? 07:01 < mikolalysenko> no 07:02 < mikolalysenko> but that is a good link 07:02 < mikolalysenko> I will run give them a go 07:02 < chrisdickinson> might be a nice, free test suite for headless-gl 07:02 < mikolalysenko> yeah, looks awesome 07:02 < chrisdickinson> also, it'd be cool if you registered it as "gl" :) 07:02 < mikolalysenko> hmm 07:02 < mikolalysenko> that is a nice thought 07:02 < mikolalysenko> ok, I'll do it 07:04 < chrisdickinson> ah, here's the latest link for gl conformance: https://www.khronos.org/registry/webgl/sdk/tests/webgl-conformance-tests.html 07:07 < mikolalysenko> ok, I opened the issues on the project page 07:07 < mikolalysenko> I'll probably work on them tomorrow though since it is too late right now 07:08 < isaacs> dominictarr: pushign a new config-chain to depend on ini a bit more loosely 07:08 < dominictarr> cool 07:08 < isaacs> dominictarr: landed some ini bugfixes, bumped the version to 1.1.0 because it adds functionality 07:08 < isaacs> cc is now 1.1.4 07:09 < dominictarr> cool 08:03 < dominictarr> gozala: I think i've figured out what you mean by dedupe being strange 08:04 < gozala> dominictarr: I'm glad I'm not the crazy one :) 08:04 < dominictarr> it doesn't produce the same results as npm install - because you may have a old dependencies, and it doesn't reinstall 08:04 < dominictarr> sometimes you have x -> y -> z and you need to update x 08:05 < dominictarr> and then you get the new z 08:06 < gozala> I guess you meant y 08:07 < gozala> dominictarr: I don't think that's issue I'm having though 08:07 < dominictarr> gozala: what do you think it is? 08:07 < gozala> my main issues is types becoming useless 08:08 < gozala> let's say there is foo module 08:08 < gozala> and bar module that defines extensions for foo 08:08 < gozala> foo.prototype.bar = ... 08:09 < gozala> the problem is you likely will end up with different copy of foo 08:09 < dominictarr> right - that is a side effect of not sharing 08:09 < gozala> not the one that has being extended 08:09 < dominictarr> it breaks singletons, like types 08:11 < gozala> dominictarr: other types and more subtle issues are 08:11 < gozala> I don't want my web apps to have copies of the same module 08:12 < dominictarr> I disagree, that is only an optimization 08:12 < gozala> but that's less irritating as I can just set postinstall npm dedup 08:12 < dominictarr> if the alternative is breaking the app, give me duplicates 08:12 < dominictarr> otherwise you end up with bundler 08:13 < gozala> do you have an example of app breakage by sharing deps at app level ? 08:13 < gozala> My suspicion is that we went from one side of the spectrum to another 08:13 < defunctzombie> dominictarr: Raynos: http://tryme.jitsu.com/shtylman/hyperscript/ 08:13 < defunctzombie> some other things that work 08:13 < gozala> from share at system level to no share at all 08:13 < defunctzombie> going to any .js file 08:13 < defunctzombie> as well as any .md file actually 08:14 < gozala> while middle of that spectrum share at the app level was best of both 08:14 < gozala> if one still decides to not share that's easy 08:14 < gozala> but I'm afraid opposite is nearly impossible now 08:15 < gozala> and only way to do is to make app author put post install npm dedup 08:16 < dominictarr> gozala: yeah, any place you made a breaking change to a module, but didn't update old code 08:16 < dominictarr> if you have a flat tree, then there is TREMENDUS disincentive to NOT make a breaking change 08:16 < gozala> well in my case updates are not actually an issue 08:17 < dominictarr> cause you'll have to go and fix stuff that is already working 08:17 < dominictarr> except your case 08:17 < dominictarr> but, you are trying to be clever with that protocol thing 08:17 < gozala> if you do depend on type being a type it will break you 08:17 < dominictarr> yes 08:18 < dominictarr> that is why you don't 08:18 < gozala> dominictarr: well yeah I'm solving conflict issues at the object level 08:18 < gozala> rather then package level 08:18 < dominictarr> you have to work with js, not against it. 08:18 < gozala> dominictarr: Yeah that's what douglass keeps saying 08:18 < gozala> use good parts 08:18 < dominictarr> exactly 08:18 < dominictarr> protocols work well in clojure 08:19 < gozala> they work very well in js too 08:19 < gozala> a lot better than pseudo classes we have 08:19 < dominictarr> defunctzombie: NICE 08:19 < dominictarr> though, only the first example works 08:19 < gozala> it's just people don't wanna explore that area 08:20 < gozala> but anyway I'm used to be outcast so it's ok 08:20 < gozala> and postinstall npm dedup works reasonably well 08:21 < dominictarr> well, you need to put forward ideas that people want to work with, there isn't much point in peddling an idea people can't use 08:21 < gozala> it just every now and then I hope to improve things 08:21 < dominictarr> because an idea with belivers is much more useful 08:21 < gozala> dominictarr: I believe I'm making some progress 08:21 < gozala> I just talk to people who would listen :) 08:22 < dominictarr> yes, your ideals are definitely interesting 08:22 < gozala> Some people at mozilla started to build projects 08:22 < gozala> with some of that work 08:22 < gozala> functionaljs meetup was also success IMO 08:22 < dominictarr> defunctzombie_zz: and it loads fast! 08:23 < gozala> and to be quite honest some of this simplified just my workflow enough that I do think it was worth it 08:24 < gozala> my hope is to build cool stuff and gain peoples interest with that 08:25 < gozala> dominictarr: anyway I think problem is dedup is that 08:25 < gozala> it makes too hard to share 08:25 < gozala> inverting default would make not share relatively easy 08:25 < gozala> while still allowing sharing at project level 08:26 < gozala> looks like ti's component is also headed that direction 08:26 < gozala> damn autocorrect 08:26 < gozala> I meant TJ's 08:26 < dominictarr> why does reducibles need to depend on types? 08:26 < gozala> dominictarr: reducers are implemented with method 08:26 < dominictarr> that seems orthagonal to me 08:27 < gozala> method allows you to define methods like 08:27 < gozala> reduce = method() 08:27 < gozala> and then implement it for diff types 08:27 < dominictarr> yeah I know about method 08:27 < gozala> reduce.define(Stream, function() { … }) 08:28 < dominictarr> it's for general dispatch 08:28 < gozala> so that's exactly a problem 08:28 < gozala> core does not defines reduce for non built-ins 08:28 < gozala> so all the other things like stream, or whatever else are defined as libs 08:28 < gozala> but they wind up with their copies of reduce 08:28 < gozala> that is just different function 08:29 < gozala> so extensions between them are not shared 08:29 < dominictarr> well, what if you detected the features? like a stream has .pipe, and .on 08:29 < dominictarr> you can check fresh objects, and then memoize from their constructor 08:30 < gozala> dominictarr: sure you could do some tricks 08:30 < gozala> but there are bunch of challenges 08:30 < gozala> and I think npm dedup works better 08:30 < gozala> dominictarr: also doing this tricks defeats purpose of method itself 08:31 < dominictarr> I just think that a flat tree will land you in dependency hell 08:31 < dominictarr> like read this article about bundler http://patshaughnessy.net/2011/9/24/how-does-bundler-bundle 08:31 < gozala> dominictarr: I have being using npm dedup in all my packages 08:31 < gozala> had not run into any issues yet 08:31 < gozala> dominictarr: also I don't really insist on flat trees 08:32 < dominictarr> and then tell me that this is "expected" behaviour 08:32 < gozala> I just wanna say do not duplicate reducers 08:32 < gozala> in the projects using it 08:32 < dominictarr> gozala: you aren't most people, you have a very clear idea about your api, and maintain it carefully 08:33 < gozala> dominictarr: ok maybe it should not be a default but there should be a way 08:33 < gozala> without telling my users do the dedup 08:33 < gozala> :) 08:33 < dominictarr> maybe you should use a global var to detect if there has been a duplication? 08:33 < gozala> ruby does system level sharing 08:34 < gozala> that's broken I don't argue about that 08:34 < dominictarr> that is rubygems 08:34 < dominictarr> this is bundler, which does project level 08:34 < dominictarr> it's still unspeakably horrible 08:34 < gozala> ok I'll read it through 08:34 < dominictarr> I once met a guy who was working on a CI server in ruby 08:35 < dominictarr> he almost started crying when he was describing working with bundler 08:35 < dominictarr> gozala: is it enough to have just one instance of reducables? 08:36 < gozala> dominictarr: that's actually is a desire 08:36 < dominictarr> right - so use a global variable 08:37 < dominictarr> and export the current verion, so you can throw if you have a conflict 08:37 < gozala> do you use Object ? 08:37 < gozala> :D 08:37 < gozala> you use global then 08:37 < dominictarr> globals.Reducable 08:37 < gozala> dominictarr: but what if I don't wanna share ? 08:38 < dominictarr> globals._-GOZALA_NO_COLLIDE_PLEASE_PLEASE__ = reducables 08:38 < ralphtheninja> hehe 08:38 < dominictarr> this is just for reducables 08:38 < dominictarr> which is a special case 08:39 < substack> duplication seems like something a commonj-esque aware optimization pass can take care of 08:39 < gozala> dominictarr: I think the fact that npm dedup exists 08:39 < dominictarr> I'm okay with the idea that some modules need a single instance to work right, but not that that is forced on everthing 08:39 < gozala> there was a reason 08:40 < dominictarr> okay, well if you are content with dedupe... 08:40 < gozala> I think with a grows of packages that have postinstall npm dedup 08:40 < gozala> in them it will be more apparent that problem exists 08:41 < ralphtheninja> sounds like dedup should be part of the install, e.g. 'npm install --dedup' 08:41 < gozala> dominictarr: I'm of opinion that forcing is bad idea too 08:41 < dominictarr> I'm just trying to make practical solutions 08:41 < dominictarr> sorry 08:41 < dominictarr> suggestions 08:41 < gozala> dominictarr: Raynos has some ideas with peer dependencies 08:42 < gozala> we'll probably explore those and see if that will fix it 08:42 < dominictarr> it doesn't sound good when you say "I have this great idea that makes it easy to write bug free applications", "oh, but you have to run npm dedupe or it won't work" 08:42 < gozala> :D 08:42 < Raynos> gozala: reducers is going to be a disaster with method >_< 08:42 < gozala> dominictarr: I think part of the problem is that method solves name collision problem at the micro level 08:43 < Raynos> when you release v4 im going to have to upgrade everything 08:43 < gozala> which conflicts with npm trying to solve same problem at macro level 08:43 < dominictarr> right 08:43 < gozala> method says I'll make sure that you never step on others toes 08:43 < gozala> npm says fuck that 08:43 < gozala> I'll just make copy of everything 08:43 < gozala> so you won't even know others exist 08:44 < dominictarr> the good thing about npm's approach is that it's not opt-in 08:44 < dominictarr> modules SHOULDN'T know about each other 08:45 < dominictarr> they should think they are the only module in the entire universe 08:45 < gozala> dominictarr: I think you'll discover limitations once you'll guys will start writing plugins for levelup 08:45 < dominictarr> all they know, is somebody (god?) calls their methods with certain arguments 08:46 < gozala> once diffferent modules will extend prototype and then collide 08:46 < dominictarr> and they must dutifully return their values, or throw an exception 08:46 < gozala> or endup extending wrong prototypes 08:46 < dominictarr> yeah, well, you don't extent someone else's prototype 08:47 < gozala> well, not if you risk to conflict 08:47 < dominictarr> oh, that was wrong, of course a module knows about it's deps 08:47 < gozala> but it's ok otherwise 08:47 < dominictarr> but as far as it knows, it's the most important module 08:47 < Raynos> gozala: scenerio 08:47 < Raynos> I write a nice big juicy modular app with reducible@2.0 08:48 < Raynos> big multi page thing 08:48 < Raynos> each page is its own repo / package 08:48 < Raynos> lots of modules 08:48 < dominictarr> substack: this could be a good plot for a childrens book 08:48 < Raynos> lots of npm 08:48 < Raynos> everything is good 08:48 < Raynos> one year later I write new stuff with reducible@3.0 08:48 < dominictarr> a kid travels inside a computer program 08:48 < Raynos> and pass these around between the old app and the new. 08:48 < dominictarr> and meets, say, a date formatting module 08:48 < Raynos> I can't do that :/ I have to go and update everything to 3.0 08:49 < dominictarr> and he's like, oh, I have a very important job 08:49 < dominictarr> I format dates 08:49 < gozala> or I'm lost now 08:49 < dominictarr> all days 08:49 < dominictarr> every day 08:49 < gozala> Raynos: what are you trying to say ? 08:49 < dominictarr> convert numbers into strings 08:49 < Raynos> gozala: im trying to say I dont want to upgrade everything to newer reducible in lockstep 08:49 < dominictarr> (they mean something to humans… what ever they are) 08:49 < Raynos> thats why I use npm 08:49 < Raynos> to have a large tree 08:49 < Raynos> and multiple versions of the same module 08:49 < Raynos> in the tree 08:49 < dominictarr> are there any other modules? 08:49 < Raynos> so that I can keep using older code 08:50 < gozala> Raynos: that is fine 08:50 < dominictarr> why would you need other modules? I can convert all the date formats! 08:50 < dominictarr> ALL THE FORMATS 08:50 < LOUDBOT> ROMBOSES == GEOMETRY BOSS 08:50 < Raynos> gozala: levelup plugins are different because the thing they extend is passed to them 08:50 < dominictarr> I AM THE KING OF MODULES 08:50 < LOUDBOT> SO THATS WHERE ALL THE DEAD HOOKERS WENT. 08:50 < Raynos> gozala: if stream-reduce and dom-reduce were passed `reducible` as argument it would work 08:51 < Raynos> that may not be a bad (optional) trade-off tbh 08:51 < gozala> who does the passing ? 08:51 < dominictarr> and then the kid goes and meets other modules, and has many crazy adventures 08:51 < Raynos> my app does 08:51 < Raynos> var stream = require('stream-reduce')(require('reducible')) 08:51 < ralphtheninja> gozala, so method is basically an observer pattern? 08:52 < gozala> ralphtheninja: method is polymorphism a la carte 08:52 < Raynos> but that only mitigates the "there should only be one instance of reducible" problem 08:52 < dominictarr> ralphtheninja: observer pattern is known as EventEmitter in node land 08:52 < gozala> it's basically oop method dispatch without 08:52 < gozala> any name collisions problems 08:52 < dominictarr> gozala: just use a global 08:52 < ralphtheninja> dominictarr: ✔ 08:53 < ralphtheninja> gozala: ✔ 08:53 < dominictarr> then you don't have to tell people to npm dedupe until they get to that situation 08:53 < dominictarr> so your ideas sound more digestable 08:53 < Raynos> well the problem is trivially solved 08:53 < Raynos> if reducible is globally memoized 08:53 < gozala> Raynos: let's try peer dependencies first 08:53 < Raynos> i.e. does a reducible already exist in this global context? fuck this use that one 08:54 < gozala> if that does not works we can try passing reduce 08:54 < Raynos> gozala: im happy with that but reducers also needs to peer depend on reducible 08:54 < dominictarr> Raynos: but first check that it's got the same version 08:54 < dominictarr> you don't want to randomly use one 08:54 < Raynos> dominictarr: ignoring patch version 08:54 < dominictarr> that will be confusing 08:54 < gozala> Raynos: you may wanna have multiple reduces v2 and v3 at the same time 08:54 < gozala> global reduce breaks htat 08:55 < dominictarr> gozala: but I thought reduce would break in that case, anyway? 08:55 < gozala> Raynos: how about then everything peer depending on reducers 08:55 < gozala> and only reducers depending on reducible ? 08:55 < gozala> dominictarr: reduce does not breaks it works 08:56 < gozala> the problem is that you define'd different function 08:56 < Raynos> gozala: won't work. I want reducible as a direct dependency of my app 08:56 < gozala> but than used one you have not defined 08:56 < dominictarr> what is the thing that breaks, that is causing us to have this discussion? 08:56 < gozala> dominictarr: ok so reducible exports module.exports = method() 08:56 < Raynos> I define reduce for DOMElement 08:57 < Raynos> and then call reduce2(DOMElement) and it does nothing 08:57 < gozala> than stream-reduce defines 08:57 < Raynos> the problem is I dont define reduce DOMElement for both copies of redue 08:57 < Raynos> reduce* 08:57 < gozala> require("reducible/reduce").define(Stream, …) 08:57 < gozala> but when you use reduce 08:57 < gozala> by requiring("reducible/reduce") 08:57 < Raynos> everything would work fine if the reduce implementation was defined for all copies of reduce 08:57 < gozala> you get different one not the one used by stream-reduce 08:58 < Raynos> gozala: you could do that btw. Have this check in reduce.define that's like "lets look in the global backdoor. find all copies of reduce and call define for all of them" 08:58 < gozala> Raynos: sure I could but that works around the guarantees that method provides :) 08:59 < gozala> basically whatever it promises to solve is no longer true 08:59 < gozala> Raynos: I think we already have plan A right ? 08:59 < Raynos> Yes. 09:00 < gozala> lets try it out if that does not work then do plan B 09:00 < Raynos> Nothing has a dependency on reducible 09:00 < Raynos> and everything has a peer dependency of reducible 09:00 < gozala> Raynos: that sounds challenging :D 09:00 < Raynos> its easy 09:00 < gozala> oh sorry I missread 09:00 < Raynos> npm install tells you "lol you dont have copy of reducible, go install one" 09:01 < Raynos> thats how peer deps should work 09:01 < dominictarr> gozala: sounds like you need a global instance of method 09:01 < dominictarr> no, just reduce 09:01 < Raynos> npm doesnt tell you "lol go dedup because method breaks with multiple copies" 09:01 < gozala> dominictarr: it's not problem with method 09:01 < gozala> when you call method() 09:01 < gozala> it creates fresh method 09:01 < gozala> so if you have copy of module 09:01 < Raynos> i agree its not a problem with method 09:02 < Raynos> its a problem with multiple instances of reduce 09:02 < gozala> the exports created method 09:02 < gozala> you have two different methods 09:02 < Raynos> because the very core is the idea that you can reduce evertything 09:02 < gozala> same as with regular functions 09:02 < Raynos> that only works if there is one reduce 09:02 < gozala> they may work the same but they're different 09:02 < dominictarr> it sounds like peer-dep will work 09:02 < gozala> Raynos: you can have multiple reduces 09:03 < gozala> you should just define implementations on ones that you're going to use after 09:03 < gozala> that's all 09:03 < dominictarr> except for old modules that already depend on reduce 09:03 < gozala> it's just in obvious to do 09:03 < gozala> Raynos: so I think it should be as follows 09:03 < gozala> reducers depend on reducible 09:04 < gozala> everything else peer-depends on reducers 09:04 < Raynos> that could work 09:04 < gozala> although they won't actually use reducers they will use reducible that reducers depend upon 09:04 < Raynos> although reducers will have to re export its copy of reducible 09:05 < gozala> that way you won't need to define dependency on reducible 09:05 < Raynos> so you can do var reduce = require("reducers/reduce") 09:05 < Raynos> im ok with dependency on reducible 09:05 < Raynos> I use reducible function a lot for definining custom sources 09:05 < gozala> Raynos: I guess that's not really necessary not a big deal 09:05 < gozala> Raynos: I mean require("reducible/reduce") will work either way 09:06 < Raynos> gozala: requiring reducible feels dirty if you dont depend or peer depend on it 09:06 < Raynos> Actually that will break 09:06 < Raynos> I think 09:07 < Raynos> reducers -> reducible, dom-reduce 09:07 < Raynos> dom-reduce can't require reducible because its not next to it nor above it 09:07 < Raynos> its sideways then down 09:07 < gozala> Raynos: ok I don't mind exporting 09:07 < gozala> or even combining these packages back for that matter 09:07 < Raynos> yeah re-exporting reducible from reducers works 09:07 < Raynos> might aswell tbh 09:08 < gozala> Raynos: do peer dependencies propagate 09:08 < gozala> for example if I depend on reflex and dom-reduce 09:09 < gozala> wil npm figure that reflex depends on reducers and don-reduce depends on it 09:09 < gozala> so I can share it ? 09:09 < gozala> or is it not smart enough ? 09:09 < Raynos> dont know 09:10 < gozala> yeah cause if that worked I'd probably switched to peer dependenies 09:10 < Raynos> but i feel really uncomfortable 09:10 < Raynos> if reducible isn't in my apps package.json 09:10 < gozala> which would be basically dependencies + dedup :) 09:10 < gozala> Raynos: include it then :) 09:10 < Raynos> :D 09:10 < gozala> and feel the comfort of it 09:13 < gozala> All I really want a peer dependencies that are installed if no one else defined dependency otherwise 10:04 < dominictarr> substack: will httpDuplex with with ClientRequest/Response? 10:55 * rvagg goes looking for a Sublime Text 3 support issue for Sublime Package Control only to find that Raynos is responsible for the ticket: https://github.com/wbond/sublime_package_control/issues/289 11:04 < dominictarr> idea: log structured merge, with just regular line separated json. 13:24 < jesusabdullah> hat is sublime pkg ctrl 13:26 < jesusabdullah> what* 13:26 < jesusabdullah> NEVER MIND ALRITE 13:26 < LOUDBOT> HELP ME OUT HERE BOT OF CONVERSATION-SMASHING 13:27 < jesusabdullah> I've never used sublime 13:34 < jesusabdullah> AND THE RADIO MAN IS SPEAKING 13:34 < LOUDBOT> I CANT THAT WOULD BE IMPOSSIBLE 13:35 < jesusabdullah> AND THE RADIO MAN SAYS WOMEN WERE A CURSE 13:35 < LOUDBOT> WHAT DIDN'T YOU LIKE ABOUT LFD 13:37 < jesusabdullah> EVERYTHING 18:49 < CoverSlide> LOUDBOT: whosaid 18:49 < LOUDBOT> HEI2 in #mefi on slashnet 19:16 < Raynos> rvagg: o/ 19:23 < mbalho> substack: what was the module you had that did the khan-academy CS editor style infinite loop protection and code sandboxing? 19:50 < mikolalysenko> browserify question: What is the best way to make some code only execute on the server? 19:50 < mikolalysenko> I got a module, and I want to conditionally compile part of it 19:51 < mbalho> mikolalysenko: if you do (require)('foo') then browserify wont process it when packaging 19:51 < mikolalysenko> ok, got it 19:51 < mbalho> mikolalysenko: and you can do if (process.browser) to make browser only code paths 19:58 < mikolalysenko> ok 20:04 < Raynos> miko: `if (typeof window !== "undefined") {` and `if (process.name === "node") {` 20:06 < dominictarr> Raynos: process.title I think 20:06 < Raynos> Oh yeah process.title 20:06 < dominictarr> also, process.title can be unreliable 20:06 < dominictarr> like if you do sudo `which node` 20:07 < dominictarr> you'll get process.title = '/usr/local/bin/node/node' 20:07 < Raynos> O_O 20:07 < Raynos> :( 20:07 < dominictarr> it's better to do process.title != browser 20:07 < dominictarr> because that just gets set by browserify 20:07 < Raynos> well you need a better way to detect node itself :p 20:07 < Raynos> but who cares ! 20:07 < Raynos> browser or node 20:08 < dominictarr> there should be a whereami module 20:08 < mbalho> +1 20:24 < mikolalysenko> alright! new version: https://github.com/mikolalysenko/headless-gl 20:24 < mikolalysenko> it should now let you create multiple contexts 20:28 < CoverSlide> awesome. does it work with THREE? 20:28 < mikolalysenko> maybe 20:28 < mikolalysenko> you might be able to get it to work, but THREE uses a lot of DOM calls 20:28 < mikolalysenko> headless gl is JUST opengl 20:28 < CoverSlide> hmm 20:28 < mikolalysenko> err webgl 20:29 < mikolalysenko> you can read images out using readpixels and stuff 20:29 < mikolalysenko> it is enough to do gpgpu stuff though 20:54 < dominictarr> juliangruber: did you publish your multilevel thing? 20:55 < dominictarr> http -> levelup, that was you rigth? 20:58 < defunctzombie> isaacs: npm issue... if a devDependency is greater than a dependency, then the greater one is installed 20:58 < defunctzombie> I had a module with a devDep of '*' for a package 20:59 < defunctzombie> and the same thing pinned 20:59 < isaacs> defunctzombie: you shouldn't probably have a dep and a devDep on th same thing 20:59 < isaacs> defunctzombie: that's undefined. 20:59 < isaacs> defunctzombie: i think devDep always wins, actually 20:59 < defunctzombie> hm 20:59 < isaacs> defunctzombie: beause i just blindly fold it in 20:59 < defunctzombie> that is not very clear or nice 20:59 < isaacs> well... either it's a devDep or it's not. 20:59 < defunctzombie> and will fuck people up 20:59 < isaacs> it fucked you up, i see :) 20:59 < isaacs> i'd accept a patch to print a warning inthat case. 20:59 < defunctzombie> well, it wasn't even my module :) 21:00 < defunctzombie> I must say it was unexpected behavior to say the least 21:00 < defunctzombie> given that the devDep was '*' 21:00 < defunctzombie> which means anything 21:00 < defunctzombie> and the dep was harder pinned 21:01 < defunctzombie> sure you can say the package.json is invalid then.. so that is what you should do 21:01 < defunctzombie> not just go on like nothing is wrong :) 21:17 < isaacs> defunctzombie: what it does is it just folds devDeps into the same dep object 21:17 < isaacs> defunctzombie: so whatever's in devDependencies will just clobber 21:17 < defunctzombie> isaacs: I get that, but I am saying that is bad behavior :) I realize it was a simple merge(a, b) call :p 21:21 < Raynos> defunctzombie: how easy / hard would it be to get npm-css to play nice with compile to CSS languages? 21:21 < jjjjohnnny> can an https server serve http also? 21:21 < Raynos> not really 21:22 < Raynos> They are generally on two different ports (80, 443) 21:22 < jjjjohnnny> yeah i want to server both on one port 21:22 < CoverSlide> and the protocol is different 21:22 < defunctzombie> Raynos: depends on what the language looks like 21:22 < defunctzombie> are you talking about sass? and less? stuff? 21:22 < defunctzombie> or something else 21:23 < CoverSlide> I did something like that once 21:24 < isaacs> jjjjohnnny: cannot be done. 21:24 < isaacs> jjjjohnnny: you listen on 80 for http, and 443 for https 21:24 < isaacs> jjjjohnnny: they can use the same connection listener, though 21:25 < isaacs> jjjjohnnny: https.createServer(options, listener).listen(443); http.createServer(listener).listen(80); function listener(req,res) { .. } 21:25 < CoverSlide> it was a like a proxy, but forwarded raw sockets. it detected if it was http and if not, then it proxied somewhere else, assuming https. but of course there needed to be a separate http and https listening somewhere else 21:26 < CoverSlide> but you had to do ugly hacks to get to it like https://example.com:80 21:26 < CoverSlide> it was a stupid silly goal but it was an interesting experience 21:34 < jjjjohnnny> isaacs: thanks 21:35 < jjjjohnnny> is there something different about the req.connection object of a http and https connection? 21:36 < jjjjohnnny> CoverSlide: yeah im woking on a proxy. All i really want to do is proxy TO an https endpoint. is there a way to do that without the proxy itself being https? 21:36 < isaacs> jjjjohnnny: yes. one is a net.Socket, the other is a tls.CleartextStream 21:36 < isaacs> jjjjohnnny: but they're very similar 21:37 < jjjjohnnny> isaacs: when i set a proprty on the socket on a connection event, it is no longer there (on req.socket.proprty) on the request event 21:38 < isaacs> yeah, https servers get a secureConnection event 21:38 < isaacs> the connection event is different there 21:38 < jjjjohnnny> aha 21:39 < mbalho> is there some code somewhere that uses browserify in node to make a server that takes args from querystring/PUT/POST and reponds with a bundle? 21:39 < jjjjohnnny> isaacs: the connection event did fire tho w / https server 21:40 < isaacs> right 21:40 < isaacs> but it's a different thing i think 21:40 < jjjjohnnny> pre upgrade or something? 21:40 < isaacs> gotta run 21:40 < isaacs> you should read the code :) 21:40 < isaacs> it's just javascript modules :) 21:43 < mbalho> ahh nevermind this shows usage https://github.com/mikolalysenko/Serverify/blob/master/bin/serverify.js#L52 21:49 < defunctzombie> mbalho: yes, there are many haha 21:50 < mbalho> anyone know if there is a way to pipe data to browserify using the js api 21:52 < Raynos> defunctzombie: NAME get. `var document = require("global/document")` 21:53 < Raynos> https://github.com/Colingo/global#global 21:53 < Raynos> defunctzombie: less, sass and stylus 21:53 < defunctzombie> Raynos: nice 21:54 < defunctzombie> Raynos: well, for less I sent you the hoisting code more or less 21:54 < defunctzombie> sass I dunno 21:54 < defunctzombie> stylus has no way to hook into @import 21:54 < defunctzombie> I asked tj 21:54 < Raynos> I see 21:54 < defunctzombie> so it would require a patch first 21:54 < defunctzombie> and then could do it 21:54 < gozala> Raynos: I just realised that peer deps won't solve issues :( 21:54 < defunctzombie> you jsut have to be able to hook into @import 21:54 < Raynos> gozala: they do 21:55 < gozala> it will only work for one level of dependencies 21:55 < Raynos> everything peer depends on reducible 21:55 < mbalho> substack: is bundle.addEntry the only way to programmatically bundle? it uses fs.readFileSync :( 21:55 < gozala> if deps are deeper in the tree you'll have same issues 21:55 < Raynos> gozala: not really. because no-one depends on reducible so there are either 0 or 1 copies of reducible 21:56 < Raynos> if reducers depends on reducible then its fucked 21:56 < gozala> sure but reflex may depend on dom-reduce 21:56 < Raynos> reflex can depend on dom-reduce that's fine. 21:56 < Raynos> it just means you have to install reflex & reducible 21:56 < gozala> then it's either will have to depend on reducbiles and introduce another copy of reducibles 21:56 < defunctzombie> mbalho: with browserify yes 21:56 < Raynos> nothing in npm should depend on reducible ever :P 21:56 < gozala> or npm won't install because don-reduce won't meet peer dependency 21:57 < mbalho> defunctzombie: whats the other way 21:57 < Raynos> npm doesn't install non-met peer deps anyway 21:57 < Raynos> it just warns you 21:57 < defunctzombie> mbalho: script module (I wrote that) but your mileage may vary :P 21:57 < Raynos> user has to manually install reducible in his app or reducible has to be a global 21:57 < defunctzombie> it doesn't read sync 21:57 < gozala> Raynos: point is don-reduce will expect reducible as a peer 21:57 < defunctzombie> but honestly the sync read isn't too terrible if you do some basic caching :/ 21:57 < Raynos> as a peer or as a parent 21:57 < Raynos> either works 21:57 < gozala> but if it's in the deps of reflex or something like that 21:57 < mbalho> defunctzombie: thats not the issue, it assumes my data is in a file 21:57 < gozala> that breaks 21:57 < Raynos> if npm bitches about "its not a peer its a parent" then fix npm 21:58 < gozala> sorry I have no time to argue 21:58 < mbalho> defunctzombie: whereas i want to post a file and get a response bundle 21:58 < gozala> have to catch a palin 21:58 < gozala> plain 21:58 < Raynos> good luck :) 21:58 < defunctzombie> mbalho: write to a tmp file 21:58 < Raynos> plane* 21:58 < mbalho> in mother alaska palin catches you 21:58 < gozala> I'm sure if you'll thing about it you'll figure what I mean 21:58 < mbalho> defunctzombie: such a hack 21:58 < defunctzombie> mbalho: if you are posting a file, what is there to bundle? 21:58 < mbalho> defunctzombie: the require() statements 21:58 < gozala> Raynos: yeah auto correct is screwing with me all the time :( 21:58 < defunctzombie> mbalho: where will they come from? 21:59 < defunctzombie> files you have locally? 21:59 < mbalho> defunctzombie: textarea in a web page 21:59 < mbalho> defunctzombie: code editor 21:59 < defunctzombie> so you have several files you will post? 21:59 < mbalho> defunctzombie: no just one 21:59 < defunctzombie> then what are the requires? 21:59 < mbalho> defunctzombie: its the same idea s browserify foo.js 21:59 < defunctzombie> is my question 21:59 < defunctzombie> what will you be requireing? 21:59 < Raynos> gozala: i know what you mean. I solved it already :D 21:59 < mbalho> defunctzombie: modules! 22:00 < mbalho> defunctzombie: "var foo = require('foo.js')" 22:00 < defunctzombie> um 22:00 < mbalho> defunctzombie: the client types that 22:00 < defunctzombie> maybe I am not so clear 22:00 < mbalho> defunctzombie: sends it to the server, the server has foo.js in its node_modules 22:00 < defunctzombie> yes.. but where is foo.js? 22:00 < defunctzombie> ok.. so the server will have foo.js 22:00 < mbalho> defunctzombie: the server may have N modules 22:00 < defunctzombie> that was my question.. do you have set of available modules 22:00 < defunctzombie> mbalho: have you seen the stuff I have been doing with tryme? 22:00 < mbalho> defunctzombie: no 22:01 < defunctzombie> mbalho: http://tryme.jitsu.com/shtylman/typeahead/example/ 22:01 < mbalho> defunctzombie: im making a thing for voxel.js. there are like 30 voxel.js modules now and i want people to be able to include moduels and make games in a browser editor without having to install npm or node 22:01 < defunctzombie> mbalho: yes 22:01 < defunctzombie> I was gonna suggest that :p 22:01 < defunctzombie> after I worked on tryme haha 22:01 < mbalho> defunctzombie: i dont understand what the text inputs are for 22:01 < defunctzombie> mbalho: so tryme clones a git repo 22:02 < defunctzombie> mbalho: they are demo of the widget 22:02 < defunctzombie> don't focus on the text inputs 22:02 < mbalho> ohhh 22:02 < defunctzombie> the point is that it is interactive 22:02 < defunctzombie> editing 22:02 < defunctzombie> with require for the module you are demoing 22:02 < defunctzombie> and it is just a clone of a github repo 22:02 < defunctzombie> https://github.com/shtylman/typeahead/blob/master/example/index.js 22:03 < mbalho> defunctzombie: wheres the code for tryme 22:03 < defunctzombie> github 22:04 < defunctzombie> shtylman/trme 22:04 < defunctzombie> *tryme 22:04 < mbalho> ahha 22:04 < mbalho> wow https://github.com/Gozala/interactivate 22:04 < defunctzombie> it is probably more complex than you might need 22:04 < defunctzombie> yep 22:04 < defunctzombie> that was what started it 22:04 < defunctzombie> tryme does js files and markdown readmes now :) 22:05 < mbalho> cool 22:05 < defunctzombie> tryme does have some useful code if you want to pull down a git project, npm install it and bundle against it 22:05 < mbalho> defunctzombie: i will try to use these 22:05 < defunctzombie> it sets up the harness for that whole process 22:05 < mbalho> defunctzombie: but i first need to get a server that can serve bundles 22:05 < defunctzombie> that is the easy part :p 22:05 < mbalho> defunctzombie: all the parts are easy when you break them up 22:13 < defunctzombie> mbalho: if you run into random stuff with it let me know.. since I just made tryme, all this editor and bundle stuff is fresh :) 22:21 < defunctzombie> Raynos: let me know if you make any headway with the css stuff, my current approach is just to serve /css/widgets.css through npm-css 22:21 < defunctzombie> and everything else through whatever I want 22:22 < defunctzombie> https://gist.github.com/4662333#file-app-js-L16 22:22 < Raynos> defunctzombie: yeah that works 22:24 < Raynos> chrisdickinson: ping 22:24 < Raynos> I want to include an extra to index html, the rest is perfect 22:42 < isaacs> you could have it check if foo/bar has a _resolved of git://github.com/foo/bar#something and allow it 22:42 < Raynos> isaacs: I still need to get comfortable contributing to npm :D 22:42 < Raynos> the code is kind of hard to read 22:49 < isaacs> Raynos: liberation is difficult at furst. 22:49 < isaacs> (also, it's just not designed very well, and has a lot of ugly glue code) 22:50 < isaacs> but the style is intentionally weird, though very internally consistent. 22:50 < Raynos> i need to get comfortable with hackin on it at some point 22:50 < isaacs> yeah 22:50 < isaacs> it's good for your brain 22:50 < Raynos> i got good at hackin on airportyh/testem :D 22:54 < Raynos> defunctzombie: >:( 22:54 < defunctzombie> problem? 22:55 < Raynos> defunctzombie: https://github.com/shtylman/node-process/pull/1 22:55 < Raynos> ship it ship it ship it 22:55 < defunctzombie> browserify should just support the browser field :p 22:56 < defunctzombie> send substack the pull req for it, we will take it, I think it is trivial 22:57 < Raynos> thats not how it works >:( 22:57 < defunctzombie> Raynos: https://github.com/substack/node-browserify/blob/master/lib/wrap.js#L488 22:57 < defunctzombie> Raynos: substack and I have talked about the browser field 22:57 < defunctzombie> he will know what you are talking about 22:57 < defunctzombie> also, modules like "ws" have the browser field :) 22:58 < substack> yes I'm down with a "browser" field so long as the tests all still pass 22:58 < defunctzombie> \o/ 23:02 < Raynos> https://github.com/substack/node-browserify/pull/279 23:02 < defunctzombie> should the browser field win? 23:02 < defunctzombie> if both exist? 23:03 < Raynos> back compat 23:03 < Raynos> but i dont care 23:04 < Raynos> defunctzombie: anyway I need node-process to support browserify now :) 23:05 < defunctzombie> what is node-process? 23:05 < defunctzombie> oh.. haha 23:05 < defunctzombie> jesus 23:05 < defunctzombie> Raynos: patch your browserify version :p 23:05 < Raynos> >:( 23:05 < Raynos> no u 23:07 < defunctzombie> Raynos: why don't you just use a custom node-process until browserify is updated? 23:07 < Raynos> I am :D 23:07 < defunctzombie> Raynos/node-process :) 23:07 < Raynos> I am doing all of the above 23:07 < defunctzombie> hahaha 23:07 < Raynos> but I hate git dependencies :( 23:07 < Raynos> you should just fix your shit 23:08 < defunctzombie> my shit isn't broken :P 23:08 < defunctzombie> learn to love git dependencies 23:08 < defunctzombie> when people don't accept certain changes upstream 23:09 < defunctzombie> for example I run my own engine.io-client cause upstream doesn't bundle cleanly the way I like :) 23:12 < rvagg> hij1nx: when do we get to know what on earth Oqulr is? the name is driving me mad, I need to know what it's about 23:53 < defunctzombie> Raynos: with browser field stuff I have a version of engine.io which builds without their random hacks 23:59 < defunctzombie> Raynos: that assert tap lib you wrote.. the only thing I wish it did was provide a 'done' instead of an 'assert' parameter to the functions heh and then it would be a great little tap producing test runner that can be a drop in for anyone using mocha qunit with builtin assert --- Log closed Thu Jan 31 00:00:28 2013