Alright. Have a good night.

Grasty: Thats exactly what I’m doing

Ramadan: Since the command framework i’m trying to build doesn’t know what command function will be called next. It just has to p*** the data from one to the next in sequence

Dunckel: When it gets the result of the previous function, it needs to piece together the data to p*** it forward.

Minarcin: This isn’t a perfect representation of the command pattern, I’m just playing around to see if I can make somethign neat

Vafiadis: Sounds like a middleware setup

Vafiadis: Dcholth: other than the results of the previous function, what needs to be p***ed into each successive function? Do they all take different args, or.?

Griesbaum: Any suggestions on

Griesbaum: Which method or another method?

Vafiadis: Anyway, do it that way if you want, but keep in mind it’ll break if anyone tries to use it with curried or partially apply functions or any others where the arguments are delegated

Dugger: How can I force console.log to act asynchronously

Mccory: Vafiadis: Its not really known. The developers using this can create a series of commands that each perform in theory a small isolated task/function. These can be chained together, so when an event is fired, the chain of commands executes in sequence

Santaniello: Vafiadis: it will then p*** the data sent with the original event to each command as they execute.

Greenan: The “data” is really just an object representing the potential arguments for each function

Romeiro: Diegoaguilar: asynchronously?

Vafiadis: You can’t – it’s synchronous or in some browsers, sorta psuedo-async. all you can do is either wrap it in something that “schedules” it to run asynchronously, like a setTimeout

Vafiadis: Or. well, in some cases you might be able to construct an alternative thing that outputs to STDOUT, depending on your environment

Whitt: Dcholth, if I try to log the result of an async function

Hagist: It will print undefined on chrome console

Chanler: Can you put your console in the result of the async? Are you using a promise library like Q?

Vafiadis: Oh. you just need to make sure the console.log is called in the async function’s callback, or as dcholth said, in a .then on its promise

Vafiadis: Dcholth: what about something like function runFuncs { var funcs = Array.prototype.slice.callarguments; return functionargsObj { return funcs.mapfunctionfunc { return funcargsObj; }; };

Mittchell: Hold on, let me p**** that 😛

Vafiadis: Basically, calling runFuncs will return a function that, when called with an arguments object, will return an array of the results of p***ing the args object to each function initially p***ed in

Lowthert: I’ll explore that tomorrow night I think

Vafiadis: You could even make it p*** in all arguments p***ed in, instead of just an arguments object with a minor change

Coffinberger: Might work. The ugly thing I found off stack overflow is working for the most part righ tnow

Gerfin: I think after a full work day, and 3 hours knocking out this, I’ve reached my mental limit.

Vafiadis: There are lots of nice ways to handle this though – the trick is making sure devs can’t easily break it ;-

Blinks: I’m pretty sure we can break anything

Strei: I really should dig into how Angular is doing its dependency injection. Could probably learn a lot there.

Vafiadis: It doesn’t do it all that differently the “magic” way

Silvertooth: I’m not looking forward to solving all the problems I’ll have with this system when minimization and uglification are performed on it.

Vafiadis: But the “magic” way gets broken by minification, so it either recommends you annotate manually through one of a number of ways

Vafiadis: Or use a gulp/grunt plugin that will do it automatically just before minification

Koyama: Alright. Have a good night!