« first day (1542 days earlier)      last day (3425 days later) » 

6:00 PM
Und ich bin 14 Jahre alt. :)
 
npmjs.com/package/async vs Bluebird... anyone used async before?
 
@NickDugger Yes
It's ok.
 
m59
@FlorianMargaine hmm, actually - what context would be wrong that needs to be bound?
 
Any reason to use it over bluebird?
 
@m59 oh I wasn't mentioning something for your error, just that it'd make your code cleaner
 
6:02 PM
cnct is undefined at the point when cnct.commitAsync is evaluated.
 
m59
yeah, but how can that be?
I don't see it.
 
return db.getConnectionAsync().bind({}).then(function(result) {
    this.cnct = result;
    return this.cnct.beginTransactionAsync();
}).then(mergeRecords(mergedUser.id, otherProfile.id)
.then(updateAuthIds(mergedUser)
.then(deleteOtherUser(otherProfile.id)
.finally(commitAndRelease);
 
How can it not be? That's how evaluation works in JS.
 
function mergeRecords(mergedUserId, otherProfileId) {
    var self = this;
    return function() {
        // use self.cnct
    };
}
 
m59
@FlorianMargaine the reason I didn't use .finally is I do have an error handler at the end there. .then(committyStuff, rollbackyStuff)
 
6:04 PM
You could wrap it in a function to delay evaluation.
 
@NickDugger I generally refer to async as "poor man's bluebird". So, no, personally I would just use bluebird.
 
Thats kinda the impression I was getting
 
If you're locked to a system that must use callbacks, it's the standard
otherwise, nooope
 
@m59 mint is saying that cnct is still undefined at the moment you do .then(cnct.commitAsync)
not at the moment that the then callback is called
 
m59
DOH
yep, I see it now.
 
6:06 PM
Yeah, that's what I was too lazy to say. :-)
 
if you do: .then(function() { cnct.commitAsync(); }) it will be fine
 
m59
hahah, and I had it that way ^
thought i was helping, lol
 
anyway... you should use Promise.using if you're using bluebird
 
@WarFox Even with that change I continue to get the object is not a function on the return $q(function(resolve) { line. Is the exception actually within the anonymous function there and it bubbles up to the return line or what?
 
callbacks are just fine but there are lots of corners to miss with error handling and aggregation is annoying.
 
6:07 PM
/me is baffled a bit...
 
I use the disposer pattern rather than actual Bluebird disposers most of the time.
 
Hello Everyone , please help me with this , pastebin.com/GQ0MKevy
 
21
Q: What is the deferred antipattern and how do I avoid it?

Benjamin GruenbaumI was writing code that does something that looks like: function getStuffDone(param) { var d = Q.defer(); // or new Promise, $.Deferred, $q.defer() etc. myPromiseFn(param+1).then(function(val) { // or `.done` d.resolve(val); }).catch(function(err) { d.reject(err); ...

 
@BenjaminGruenbaum why?
 
And apparently SE Chat does not support emote alias
 
6:09 PM
@BenjaminGruenbaum: Could you help me with stackoverflow.com/questions/27775632/… and pastebin.com/GQ0MKevy
 
m59
@FlorianMargaine using is quite confusing.
 
uh?
I find it pretty simple tbh
 
m59
I'm daft. You must have forgotten.
I'm reading the Promise.using docs and my brain is on auto-WUT.
 
@FlorianMargaine using is super useful for multiple disposed resources at once
 
the docs are confusing, yes
@BenjaminGruenbaum even for a single
 
m59
6:12 PM
I don't understand what my code is doing wrong that it would do right.
 
@32teeths this is the fourth time you ping me or post it in the room today. Stop it.
 
@CodeWarrior where did you find that usage of $q?
 
@FlorianMargaine I don't know, I know I helped shape using and pushed hard for it but I honestly agree with Petka now and don't find it that more useful over a simple userland solution.
 
Looking at it now, however, I see that I am missing the reject argument, and I imagine I may have inadvertantly removed it since there is no rejection case...
 
Nah, errors never happen
 
6:15 PM
@CodeWarrior You only need to use promises for things that are not yet promisified - that is - your isImage is perfectly fine but everything else should just be a then chain - that is the only promise you need there.
 
It's official: @rkoutnik is the Best Manhood of 2014
TAKE THAT!
 
err... wat?
 
Wait what?
 
anyone know of a chrome extension to share links between browser instances on two separate machines?? I know I can just bookmark and sync them, but it is a one time link I want to move from my desktop to my laptop and it is long to type
(this could come in handy from time to time, so a plugin/extension could be neat)
 
email
 
6:18 PM
@rlemon You can open "Tabs on other machines"
 
yea but I was hoping for some voodoo extension
 
What kittens said
 
Settings -> recent tabs
 
@WarFox so something more akin to this: pastebin.com/FwmP1sME
 
@SomeKittens neat
never noticed
thanks!
Chrome FTW!
 
6:19 PM
If only Chrome had tab organization like Firefox has/had(?).
And Closing Tabs by query...
e.g. Been working on a big feature, time to move to the next one, Close all StackOverflow tabs, and Google result tabs with the word TimeZone in them...
 
just do what I do, never close any tabs, organize projects by windows, close em all once chrome is taking up > 4gb of memory
 
@CodeWarrior @Zirak built an extension that does that.
 
Good lord that is a lot of browser RAM. Also, I will have to check out that Extension.
 
Caprica takes up like 2gb of ram after about a day
 
Chrome is a ram killer
 
6:23 PM
chat has a memory leak (still)
 
@CodeWarrior don't think missing 'reject' parameter will do any harm
I haven't $q like that before... and it is giving me the same error
what you could do is use $q with deferred, like this pastebin.com/GLxJ8Kdj
 
@WarFox it's doesn't.
You don't need a $q deferred. Let me make this super clear.
All they have to do is call $timeout instead of setTimeout.
 
@WarFox Well, I removed it, and execution continues past that point now, but now I am running into 'undefined is not a function' in a then() call back in my controller....
 
Meh, don't listen to me, what do I know about $q promises or promises in general -_-
 
I'm leaving for home! Give it a few more tries and you will fix it.. cya
 
6:28 PM
See you later.
 
@BenjaminGruenbaum chrome easily hogs 3-4gb of my ram
 
how do I modal this so I can submit the data just to be processed by the server: jsfiddle.net/qq441hux
 
anyone knows why this wouldn't remove all children?
    var discussion = byId('discussion');
    [].forEach.call(discussion.children, function(child) {
	child.remove();
    });
 
@sterling you're doing something wrong
 
!!s/chrome/ABP/
 
6:31 PM
oh well. Good ol' .innerHTML = '' to the rescue.
 
@FlorianMargaine are you closing one specific child, or all hildren?
 
@eyeLoveFiddle I want the equivalent of discussion.innerHTML = '';
 
you need to target a specific one
 
[] means all, not just that instance
 
6:33 PM
I think you don't know what you're talking about :s
 
@FlorianMargaine discussion.chilren is a live collection and forEach operates by index
 
Hellow all
 
guten Morgen
 
@JanDvorak oh.
 
[1] would probably mean more
i mean just one
 
6:34 PM
so I should have discussion.querySelectorAll('*')?
no... that wouldn't work either
 
while(discussion.firstChild) discussion.firstChild.remove()
 
document.getElementsByTagName('*')
 
the way i understand it is [] is having you target all the []
 
@eyeLoveFiddle [] is just an empty array. He's using it to get a reference to Array.forEach. [1] is an array with a single value, 1.
 
@JanDvorak yeah... that sucks
 
6:35 PM
@SterlingArcher mine too
 
but I guess that's the only solution
 
I'm with uBlock
 
@eyeLoveFiddle huh?
 
so if you're doing something like a chat you have a lot of []
 
6:36 PM
@FlorianMargaine [].slice.call(discussion.children).forEach(...)?
 
Removing elements from an array is faster in reverse, right?
 
@JanDvorak thanks
@JanDvorak heh yeah, better
 
anyone good with modal development?
 
You must be thinking of another language.
 
is there Array.from already?
Array.from(discussion.children).forEach(...)
 
6:37 PM
@Shmiddty no. Not really, if you want an array you can add or remove from use Petka's deque package.
 
anyone running ubuntu 14.04.1 and wants to try to install a driver for me?
 
I meant in vanillajs. A pop is cheaper than a shift, right?
 
<--needs a fiddle tutor
 
shift requires the array be re-addressed
pop just removes a length
so pop is faster
 
exactly
 
6:39 PM
@Shmiddty yes, a pop is cheaper than a shift, what I was saying is that there is a library using a circular buffer that lets you shift efficiently.
 
Not sure if it applies to live HTML collections though
 
@BenjaminGruenbaum cool beans
 
You should really not be working with live HTML collections anyway.
 
in the following AngularJs service, I am processing links in chat messages. If a link is an image I want to do something to it. It appears that the isImage function is not running correctly. Everything seems to come back as false. Either I am not awaiting the correct return value correctly OR I am returning the value incorrectly: pastebin.com/4fPxs5qZ
Problem areas are between lines 3-16 and 29-35...
 
!!afk back to work
 
6:41 PM
New girl at work is kinda cute
 
@SterlingArcher Developer?
 
@SterlingArcher better get in shape
 
@SterlingArcher how's the progress (body)
did the holidays ruin you?
 
They did :(
 
Need to get more ladies into engineering/science/maths jobs. Huge gender disparity.
 
6:43 PM
@CodeWarrior you need to return a promise if you want it to be meaningful. Instead you have a return inside the promise. You need both.
 
I didn't put on a lot of weight, but I haven't been to the gym in like 3 weeks now
It started because of the flu, and I just feel so tired
 
bro
BRO
do you even lift?!
 
DO YOU EVEN FLU?!
xD
 
I tweaked my back doing squats
 
!!s/a/r/
dammit
 
6:44 PM
if you think "I can probably do one more set" you probably shouldn't be doing that set at your same weight
 
Definitely not lol
But I did grow a wicked beard over the holidays
 
my family thinks I'm juicing. I suppose that means I'm getting positive results ;)
 
@BenjaminGruenbaum I thought that was what line 15 is doing (returning a promise).
 
@CodeWarrior Nono, like I said earlier your isImage is fine, the problem is in line 29.
Also, why are you performing the same thing anyway?
You're calling isImage, if it is you're replacing it, otherwise you're replacing it anyway.
 
github.com/ellysh/mxu11x0 can someone running ubuntu 14.04.1 try to install these drivers?
the makefile fails for me
 
6:46 PM
Nah, one replaces with an img tag, the other replaces with a link.
 
Also - Your fallback image thing you be a directive to begin with
 
I am not well versed enough yet to do this as a directive. In this case I am handling SignalR incoming chat messages and eventually pushing them to a Messages property on the $scope.
 
Oh cool SignalR, I used that yesterday.
 
It is pretty neat. Needed a bit of work to get it to play nice with Angular.
 
@rlemon /me flexes Runnable muscles
 
6:51 PM
OK so I need another $q.defer in the ProcessLinks function and return a promise with resolves there too?
 
Yeah
Note that you can convert a SignalR promsie to an Angular one using $q.when
@CodeWarrior wait no, absolutely not.
You just need to chain the thens
Refering you to this question again.
 
@SomeKittens does it build on runnable?
I FINALLY got node-webkit to compile an application using node-serialport
what a pain in the ass that was
 
Hey guys in iOS or Android is it possible exporting HTML5 games without using something like PhoneGap? Does the API offers something like that?
 
now I can't get my usb-serial converter to work on my linux machine
0
Q: error: ‘usb_serial_probe’ undeclared, linux 3.10 in device driver

Askar IbragimovI am trying to compile a Linux drived for USB-to-Serial device and getting error /root/moxa_usb_to_serial/mxu11x0/driver/mxu11x0.c:307: error: ‘usb_serial_probe’ undeclared here (not in a function) /root/moxa_usb_to_serial/mxu11x0/driver/mxu11x0.c:308: error: ‘usb_serial_disconnect’ undeclared...

seems to be on key
 
7:03 PM
@Catgocat use a web view?
 
@BenjaminGruenbaum Will it run smoothly? I mean for basic 2d games.
 
user1596138
Phonegap runs smooth and it's got a lot more overhead then a webview..
 
it's paid
isn't it?
 
user1596138
I wasn't suggesting using it but no it's not paid
 
7:05 PM
@Catgocat sure.
 
user2629998
Hello everyone :)
 
ugh, fuck it. I'll just have to code this all in windows :/
why do computer manufacturers assume no one uses serial ports today
 
@rlemon Docker's repository is down, I'll let you know in a sec.
 
4 mins ago, by rlemon
0
Q: error: ‘usb_serial_probe’ undeclared, linux 3.10 in device driver

Askar IbragimovI am trying to compile a Linux drived for USB-to-Serial device and getting error /root/moxa_usb_to_serial/mxu11x0/driver/mxu11x0.c:307: error: ‘usb_serial_probe’ undeclared here (not in a function) /root/moxa_usb_to_serial/mxu11x0/driver/mxu11x0.c:308: error: ‘usb_serial_disconnect’ undeclared...

found my answer
I'm not digging in the kernel
fuck that
 
booooo
 
it's an app targeting windows anyways. I probably should develop it on a windows platform
I hate windows :(
 
user2629998
@rlemon what's the model of the serial converter ? that's weird, usually it's the kind of hardware that should just work
 
serial converters never just work
 
There is no type of thing that "just works"
 
99% of them are a pain in the ass
gist.github.com/rlemon/6021285d49e996c1e635 node people, can someone please help me with this error?
it works fine in linux, windows is a PITA
 
7:22 PM
@SomeKittens except for jQuery
 
jQuery is love
 
it hurts but I do it for jQuery
 
It's all delegated now
 
... thinking aloud. if I move node_modules from a linux pc to a windows pc it still should all work right?
wait, nvm. I'm stupid
 
@rlemon :P
 
7:27 PM
well wtf. why can't I run node-pre-gyp rebuild on windows?!
 
@rlemon My Dropbox adventures say no.
 
You have the VS tooling installed?
 
@BenjaminGruenbaum I have VS2012
 
What does it error with?
 
ENOENT
but I have no idea why
it all works in linux, but my serialport drivers do not
 
7:30 PM
Try using win-spawn instead of spawn, I had a bug with spawn on windows once and that fixed it.
It's a wild guess though.
 
where?
sorry for my ignorance
 
in compile.js although that's very unlikely.
To be completely honest I have no idea :P
Only guesses
 
What texteditors you guys use?
Sublime, Eclipse?
 
I'm the minority; I don't like ST. I use Brackets for personal projects, and shitty VS at work
So pretty, once you install the right extensions
 
UGH
0
Q: Surface Pro 3 with Firefox - Have single touch trigger touch/mouse events instead of wheel events

Simon SarrisOn the Surface Pro 3 with Firefox only: When making a swiping gesture with a single finger over an element, the browser will fire wheel events instead of touchmove or mousemove events. How do you stop the wheel behavior, and allow a single finger to always be treated as touch/mouse movement inst...

I am putting a BIG FAT BOUNTY on that one in a few days
 
7:43 PM
as in, "don't answer yet, the price is going to grow"?
 
Does anyone know if ws really is faster than other server-side Node.js websocket libraries?
I'm trying to decide between socket.io and ws
 
Will ever StackExchange put chatrooms in their iOS app?
 
@JanDvorak I'll be applying the bounty all the same, I'm 99% sure its a big fat bug in Firefox :(
 
@NickDugger That looks beautiful
 
@SimonSarris you sound frustrated - here have upvotes
Not sure what answer you're expecting though.
File a Firefox bug report.
Can't you simulate it by catching wheel events and dispatching the events you'd like in Firefox?
 
7:48 PM
@Loktar ever distributed with node-webkit?
:20792802 socket.io is a websocket library with fallbacks nvm, I see the package name now
 
@NickDugger Is Brackets pretty light? For portability.
 
@BenjaminGruenbaum that a single finger running across the screen won't fire touchmove or mousemove events seems nuts, like I must be missing something
 
@SimonSarris it does seem really nuts
 
@SimonSarris do you prevent default on touchstart?
 
@Catgocat No idea, I never cared to bother.
It's built in node, though, which is neat
 
7:57 PM
@NickDugger That is the most beautiful texteditor I've ever seen, what command-line do you use also?
 
@JanDvorak no, why?
 
@SimonSarris it should prevent scrolling
seems by-design to me
 
@Catgocat You have to install a handful of extensions to get it to look like that. What do you mean command line? I tend to just use whatever terminal, like the one that ships with node, for my node projects
 
if only to increase the smoothness of scrolling
 
@NickDugger Check cmder out, pretty cool though :)
 
7:59 PM
Looks cool
 

« first day (1542 days earlier)      last day (3425 days later) »