« first day (278 days earlier)      last day (2486 days later) » 

02:50
would someone give me a help?stackoverflow.com/questions/8624913/…
 
8 hours later…
11:18
posted on December 27, 2011 by Marak Squires

As part of my ongoing quest to develop Skynet, I've been deep diving into distributed computing. At Nodejitsu, our node.js hosting platform deals with 1000s of live servers spanned across multiple data-centers. As scale increases, minute statistical probabilities become very real problems. The network is unreliable, disks become unwritable, streams break, unexpected input is unexpected, and e

 
5 hours later…
16:09
I got a 2 day ban on 4chan :(
16:21
how did you manage that?
I guess requesting source on some imageboard
mods were mad
I feel like a total badass now :D
lol.
being banned from the gutter of the internet
anyway do some of you guys have a silent PC tower?
I would like to buy one, but need some recommendation
I was thinking about something like this coolermaster.com/product.php?product_id=6746
Mine sounds like a jet engine, puts out more heat than a coal stove.
my tower is similar
although I use headphones all the time, you can hear it without music pretty loud
16:48
with only two fans is that enough airflow? Do you get a chance to read MaximumPC magazine? Or listen to their podcast?
I would ask those guys for a recommendation on a quiet PC tower myself
17:26
@yojimbo87 does this mean you get to be productive for two days
@Fosco mine also sounds like a jet engine
well I was asking myself the same question but it's not like I visit it 10 times a day for extended amount of time
@yojimbo87 just once for a day-like occurrence?
you mean something like this?
something like that, yes
and at this point I'm going to pry myself off chat for a bit and go do work-like things
been here 90 minutes with no productivity so far
also, did I mention my back issues to you lot?
if so, the surgery is in ~ 18 hours so there's that.
oh, I hope you will get well soon
17:45
thanks
17:56
@jcolebrand Best of luck Cole... Everything's going to work out!!
it's a routine surgery so I should expect so. However, like my boss pointed out the other day. It's routine for the surgeon, not for my body
18:28
is there a PC hardware site on SE?
would be superuser suitable?
yup computer hardware included
18:46
@jcolebrand :(
@Raynos no no my good sir, it's rather :) if I can sit up without having to take pain pills and wear an electrical stimulation device on my back
Oh this sounds good
Hey Hi Pals.... I started with Node today itself and am stuck with the event loop thing... can you help me how events are processed without blocking?
@yojimbo87 Thanks I would look through it. As in both of them. BTW how was your experience with Node....??
as in while development. I am starting it to know this technology.
18:56
quite orgasmic
@yojimbo87 Sounds great.... :)
yup, you might get into a fight with async stuff and callbacks if you are used to sync and blocking code but eventually you will get used to it
@yojimbo87 can you suggest any code example?...it will help to understand better
there are side by side examples between sync and async versions of the same codez
@ShivKumarGanesh code sample of what?
@yojimbo87 how you magic good articles?
19:02
@Raynos To understand async stuff.... in order to program without blocking while processing events......
@yojimbo87 Good one !!!
@Raynos I'm a bookmark wizard
You just use callbacks \o/
All you do is thing.doThis(withThatData, andRunThisCallbackWhenYourDone);
@Raynos Thats it!!!! This is so easy as it looks!!!! :O
fs.readFile(fileName, printFile);

function printFile(error, file) {
  if (error) {
    throw error;
  }
  console.log(file.toString());
}
Because I hate error handling I use a utility
fs.readFile(fileName, thrower(printFile));

function printFile(error, file) {
  console.log(file.toString());
}

function thrower(callback) {
  return errorProxy;

  function errorProxy(err) {
    if (err) {
      throw err;
    }
    callback.apply(this, arguments);
  }
}
19:21
@Raynos then why the hell aren't you stripping off err?
that seems fearfully inefficient, you've already handled it, why do you care? It will be a falsy value no matter what
 
2 hours later…
21:12
@jcolebrand sorry?
You mean strip off the error value in the callback.apply call? I'd rather forward all the original values,
That way you can remove/add thrower without having to change the parameters of printFile
@Raynos aye, that
I was just thinking as a way of handling these things going forward. Good idea on the approach, requires all API to always return error as the first parameter tho
or return an object wherein error is a potential attribute
what's your take on that, instead of returning multiple parameters to return an object instead.
21:47
@jcolebrand all node functions should comply to (err, data) That is the standard put forward by node core. That is the standard you uphold
ryan made that design choice, you can argue about it, but it's in node core now and it won't change
@Raynos oh interesting, I hadn't seen that. I should spend more time reading and less time doing things that aren't code-related.
except here lately I've done absolutely nothing useful. It's amazing how laying on one's back makes one feel absolutely like dog-shit and not worth focusing on anything.
And I don't mean "laying on one's back for an hour, or an afternoon". I mean doing it every day that you're not at work, every hour, for two weeks straight. after the second night you're like "eff this, I'm goofing off if I'm even doing that"
fortunately this hit me in December and not August.
everything is off kilter in August
22:20
whoa I didn't know that jquery templates are no longer actively developed
@jcolebrand :(
@yojimbo87 the new jsRender thing is ...
bad?
undocumented
Its not bad, but the author thinks 'One should not document alphas, lest dem noobs use and it whine about the API change / bugs'
@jcolebrand Yeah I promote the (err, data) as your callback arguments as well, I try to use when I can.
I want to do some prototyping with client side and am looking for some templating libraries so I was surprised to see jquery templates being no longer maintained :(
22:46
i would port trinity to the client :D
Seriously though, mustache is pretty cool
I don't like mustache conditional logic
@Raynos meh, everything clears up tomorrow ;-)
@yojimbo87 then use dust
Or use tims one - github.com/creationix/corn
@Raynos I only meant if you're going to inject preventErrors(wrappedMethod) on every callback spot, then you might as well not have (err,data) as then you can tell right from the function declaration what it's intended purpose is. However, the fact that it's node-core and de-facto says something for the style, so I have to grok it more before I can have an opinion
@yojimbo87 they're not? I thought that was coming out of Microsoft no less.
@jcolebrand I write callbacks as indenpedent things. They shouldnt know or require that they be wrapped in error handling proxies
22:52
@Raynos but don't you define the functions and then call them as callbacks, rather than having inline functions, or do you predominantly do inline callbacks?
I really need to develop my error handling style thought
if you're scanning function headers and see:
No I define functions
function doThis(error,data){
function doThat(data){
function getThat(error,data){
function getThis(data){
then you see that some are intended to be called with error passed, and some assume no error passing
Yes
22:53
I just figure if it's always going to be falsy, then why even bother having it
And all asynchronous task expect errors
now, in the above example, you can assume that the only ones that get injected into callback handlers have (error,data)
The fact Im proxying / intercepting the function call is irrelevant
actually, what you should probably do is instead of (error,data) use (_,data)
that way it makes it more prevalent that that one should only be called when wrapped with a layer
Maybe, thats a style choice
It really depends whether your always wrapping the funciton
22:54
yes, I concur
I would also say that at that point maybe there's something in the framework-stack that's designed to do that?
ok, not to be an ass, I'm told to vacate my desk in the next five minutes. be back in a bit
23:30
o/
Im off aswell

« first day (278 days earlier)      last day (2486 days later) »