« first day (1452 days earlier)      last day (3511 days later) » 

12:00 AM
@rlemon I reckon I could warm it's frozen heart ^.^
 
reddit CEO laying the smackdown
fucking HIMYM I hate the last episode
every damn time
 
Just won my first-ever codegolf!
 
@rlemon Awesome
PING PING PING
 
@SomeKittens Which one?
 
Informal Runnable competition to see who could come up with the shortest Dockerfile that had a running port open.
Annoyingly, PHP was what I had to win with:
FROM php:5.6-apache
EXPOSE 80
CMD service apache2 start
 
12:14 AM
thats cool
 
m59
If I send a request for a jpg, the response is binary, right?
 
i need to get off reddit
 
Yes, you do
 
but but
i found this on reddit
 
Rough
 
12:39 AM
Ugliest hack yet
set of hacks, to be precise
 
anyone know what i should learn so that i can use javascript `.replace()` and pass the capture groups to the replacement?

`"Buy today and save 10% on everything".replace(/(save [0-9%]+)/,"<b>"+ $1 + "</b>")` I saw something like this somewhere once
in exchange: bit.ly/1E4XZqp
 
What do you mean "what should I learn?"
You should learn the replace() api
 
yep do you know what the term is called that uses part of a regex as a variable?
 
the equivilent of doing .match, taking a result, then running .replace with that. i think there's a cleaner way without needing .match
ah got it TFMFTW
 
1:10 AM
ugh @rlemon I went crazy raging on my watch dude
all of a suddenly it wont play songs on my phone
 
lol why
 
just takes me to search results
like eveyr fucking time
 
:/
 
making me so angry lol
 
reset it
 
1:11 AM
I am
like hard resetting now
I've already rebooted it mult times
 
sucks dude
but I like that they offer a hard reset from the settings
handy
 
fuck man thats like my fav feature but if it wont work consistently ill rage lol
yea
dude and get this
I got it to play take on me
 
apparently my sitting down watching netflix drinking a beer pulse is 105-115
I don't know how accurate that is
 
and then it Rick rolls me no joke.
 
1:13 AM
is it possible your wife has the pair more than one app on her watch and is fucking with you?
magnificent troll lvl20
 
nah this was in the vehicle just me and my daughter
I wish that were the issue though lol
 
m59
Dudes, I really need some help. I'm trying to download an image with node... I have no idea what is going on.
 request.get(url, function(err, res, body) {
        require('fs').writeFile('file.jpg', body);
That's my best guess.
 
48
A: Downloading images with node.js

Cezary WojtkowskiI'd suggest using the request module. Downloading a file is as simple as the following code: var fs = require('fs'), request = require('request'); var download = function(uri, filename, callback){ request.head(uri, function(err, res, body){ console.log('content-type:', res.headers['co...

 
m59
tried that ^
 
has worked for me
 
m59
1:15 AM
and that looks like the same thing from my example above anyway
 
Content type?
 
m59
jpg
 
You're not setting the content type in your example
create a Runnable
 
m59
I am getting the jpg content type back though
So, would I need anything further?
 
is there anything like imgur for short video clips ?
 
1:21 AM
vine
 
^
 
u need a login ?
@rlemon vid.me/mhX
 
m59
@SomeKittens hmm... how would npm modules work on Runnable?
 
lol
 
this is like the sickest... thing... I have ever seen :P
 
m59
1:26 AM
oh nm. What the heck am I saying =D
 
whats wrong with people
 
bkeh its not working idk
much anger.
might stomp the watch and then return it
 
> I have at least 7 questions
 
:D
my favourite part is: "Its a whore! Its a lemon whore stealing our lemons!"
 
@m59 Just like they usually do
 
m59
1:28 AM
yeah, I was in silly mode.
 
bleh no guidance on this issue either
so frustrating
guess ill try reinstalling android under wear.
 
@KendallFrey Is that a reference to something other than an imgur top comment from today?
 
nope
 
Cool. Just making sure there wasn't some wider cultural reference that was totally flying over my head.
 
neger snälla
 
m59
1:51 AM
I have no idea what I'm getting back or how to use it.
I've tried so many things.
 
Have you inspected body?
 
m59
yeah, it's a bunch of gibberish, which I would guess is binary.
 
What are the first 4 bytes?
 
m59
GIBB
kidding ;D
@KendallFrey gibberish in the form of ????
 
Can you find out their values?
JPEG doesn't have an ASCII magic number, unfortunately
 
m59
1:57 AM
I don't know how to work with whatever this is.
 
and now it works..
@KendallFrey no
 
good
@m59 What is body.constructor? I'm guessing it's Buffer, but I might be wrong
 
So, bad practices aside, one of my students is using jQuery to request an HTML form from his server and add it to the page via .html()
We're getting failed to execute write on document
any directions?
 
m59
@KendallFrey undefined.
 
2:08 AM
I have no experience with this whatsoever, but the first thing I think of is permissions.
@m59 .prototype.constructor, my bad
 
m59
lol, no my bad ;D
I mispelled it.
[Function: String]
 
urg
in that case, check the first 2 char codes
 
m59
65533 both
 
has anybody worked with the bootstrap accordion?
 
@m59 ick
try setting encoding to null
(looking how to do that now)
response.get({url:"...",encoding:null},...) I think
 
m59
2:14 AM
success
so...what the crap was that all about!?
also, SUPER EPIC CRAZY EPIC DOUBLE SUPER SIZE THANK YOU.
 
@m59 Success as in, it saves to disk now?
 
m59
it displayed, which should get me the rest of the way
 
The deal is it uses UTF-8 by default, which won't map nicely to binary data
forcing encoding to null uses Buffer instead of String
 
m59
Ahhhhhhhh.
That makes perfect sense.
 
@SomeKittens What do you think the chances are that there will be a DOM question tomorrow?
 
2:17 AM
Just so you know, I figured this all out by googling your code, and reading the github page that looked like it might be what you're using.
 
@Whathaveyoutried no clue
 
@Whathaveyoutried between 0 and 1
 
m59
Yeah, I didn't/don't really have a great concept about binary stuff.
 
OMG, I just realized another optimization I could probably make to my code, but that will have to wait till tomorrow.
 
m59
It makes more sense now, but that's something I would have just kept overlooking.
 
2:20 AM
@m59 The take-home lesson is this: Never treat binary data as text, not even if you know the encoding can handle it.
 
m59
Any time you request a file, it's always binary?
 
no
if it's a HTML file, you can expect text
 
m59
How do you know when you're requesting something that should be binary?
When it's binary like? lol
 
It all depends on the file type
most images are binary
svg is text I believe
 
@SomeKittens Did you fix your issue yet? Document.write issue
 
2:22 AM
@Whathaveyoutried sorta
 
almost all code (js, html, css, php) is text
 
did it have anything to do with state of the document?
 
@m59 open it in a text editor
 
m59
yeah, that all makes sense. I mean, that's what I would have guessed.
 
@Whathaveyoutried the serverside was giving us the wrong HTML
 
m59
2:22 AM
The gibberish stuff is always binary, then?
 
next up, why?
 
If you're merely copying a file, there's nothing wrong with text mode, but binary mode will also work, even with text files
@m59 pretty much, yeah
But usually you should be aware of what you're working with
in this case, jpeg is a binary format
 
m59
@KendallFrey you're a boss, dude. Seriously. I'm having a rough (day, week, while?) and I really don't need to be stuck on this for days ;D
 
lol
I wish I had questions that weren't specific to our internal architecture
 
m59
2:25 AM
It's been like 4 hours, so... it was taxing my soul.
 
Now I shall tax your soul muahahaha
jk, I'll be sleeping soon
 
Canadians can tax anything
 
!!s/can / /
 
@monners That didn't make much sense. Maybe you meant: ban, jan, man
@monners Canadians tax anything (source)
 
What would a regex that did the above, plus did a lookahead and replaced anything with everything, look like?
 
2:30 AM
At least we aren't $17 trillion in debt
it wouldn't
You can only replace at one position
 
Surely there's a way
 
so you'd need to include tax in the replacement
 
Unless I piped it into another regex I guess
Can Cap pipe command results into other commands?
 
!!s/can (\w+ )an/$1ever/
 
@KendallFrey Canadians tax evertax anything (source)
 
2:32 AM
nope
 
That makes me sad
o.o
 
oh, you screwed me up by saying lookahead
 
@KendallFrey Canadians tax everything (source)
 
it's a trap!
 
boom
 
2:33 AM
@KendallFrey It's not real debt
 
Nice. I have no idea how that works
 
@SomeKittens what is it then?
 
Fake debt
 
It's faux debt
 
ah, of course
 
2:36 AM
Error: [$parse:syntax] Syntax Error: Token '{' is unexpected, expecting [}] at column 36 of the expression [{       onLoad: function (_editor) {         actions.setAceMode(_editor, item);       },       onFocus: actions.onFocus     }] starting at [{         actions.setAceMode(_editor, item);       },       onFocus: actions.onFocus     }].
halp
 
m59
Heh, America is so good at money we don't even need it. America has transcended money and can just buy things without it.
The national debt is just a record of how much it would have cost us otherwise.
 
about half of our debt is inter-agency, i.e. the DHS owes the FBI
 
So I guess those are separate entities
I never thought about it, but it makes sense. I guess.
 
!!google us foreign debt
 
2:43 AM
hm
@m59 Want to feel better?
I have a scope question you should be able to answer
How do I ng-init a function?
    ng-init = "wrapperFunc = function (a) { actions.setAceMode(a, item); }"
gives me Syntax Error: Token '{' is an unexpected token
because Angular expression
 
m59
does ng-init="myFunc(this)" work?
$scope.myFunc(scope) {
  scope.wrapperFunc = function(a) { //etc
}
err, well you don't need to pass scope
but you get the point
$scope.myFunc() {
  this.wrapperFunc = function(a) {
};
@SomeKittens yeah, it works. jsbin.com/bilega/5/edit
 
3:06 AM
@m59 cough
 
@m59 one sec
@m59 No dice, needs to be in ng-repeat
 
3:18 AM
Motivation... failing
 
and ui-ace won't let me monkey around with this
 
3:40 AM
I think I finally figured it out and API goes down
This problem hates me
 
@media \0screen\,screen\9 {
	.main .catalogueTemplate.columnFull > nav{
      	width:95.31914893617021%!important;
	}
}
WTF is that ^
 
@monners redundant?
 
@phenomnomnominal Errr, what?
!!tell phenom define redundant
 
@phenom redundant Superfluous; exceeding what is necessary.
 
Oh, sure, for the ridiculous percentage value. I meant the media query
 
m59
3:47 AM
@SomeKittens same thing should apply....
 
@m59 nope
ui-ace overrides this
 
m59
err... hmm
So, you're not able to get the scope inside of ng-repeat at all?
 
sorta
  actions.foo = function(item) {
    return function (_editor) {
      console.log(item, _editor);
    };
  };
ng-init = "wrapperFunc = actions.foo(item)"
is as far as I've gotten
but API is down
 
m59
seems decent if the other options don't work.
 
anyone knows visual basic.. this question seems easy but I cant figure out the answer.. The For statements declares a numeric variable, called ____________ that is initialized and then automatically changes after each pass through the loop.
 
m59
3:52 AM
@phenomnomnominal what's the cough for?
 
"America is so good at money"
 
4:21 AM
What is a good programming question to ask during an interview for someone with 2-3 years of experience?
Its for a UI position.
 
What do you do in your spare time?
 
hmm, good
 
What's an interesting Frontend article you read recently?
 
How about a programming task, like reverse a number?
reverse without converting the number to a string/array
hint: use mod operator
 
Why?
 
4:27 AM
just to check the problem solving capability
someone had asked me that when they interviewed me
 
If you're gonna test code proficiency, be careful that you select a task that'll illuminate actual proficiency, and not just some niche language feature. We all use google everyday, so just because someone doesn't know the answer on the spot doesn't mean they're not a good developer
@RahulDesai If you'd asked me that I wouldn't know the answer off the top of my head
So what does that tell you about me? Am I a bad developer because of it?
 
I agree
Its hard to decide
tough job that is
 
I think the best code test I was asked to complete (in my own time) was to implement a simple game within a defined set of rules
 
Amazon usually asks about trees, but I am not sure if they use trees there.
I see.
 
Not only did it show them how I code but also how much flourish I was inclined to add when given the freedom to do so
they told me it could be as basic as a command line interface or as elaborate as an entire GUI
I had a lot of fun with it :)
 
4:33 AM
I hear you :)
Did you do it till the GUI?
 
did I build a UI?
Hell yeah!
 
AWESOME!
 
It was a robot game, so I themed the entire thing around HAL2000
Even pulled in quotes from the movie
lol, I didn't get the job though :P
 
really?
 
But still, I think that's a really good way of testing candidates
 
4:35 AM
why not?
I agree
 
Yeah, I had an offer from another company and their GM was out of town for a month so they said take the other job
 
got an email from them a few months later though asking if I wanted to re-interview, so that was somewhat validating
 
cool
well, I interviewed at a company 2-3 months back and they did 2 technical rounds on me, the 2nd one was really tough. That guy ripped me off. And last week I got a call from then asking for HR round. I was like WTF, I just took another offer.
 
Yeah, that's not cool. If a company leaves ya hanging like that then it's usually a pretty good sign that it's not a great place to work.
 
5:07 AM
motherfucking unit tests.
 
@monners my colleague from the company told me that they usually keep hanging upto 6 months!
 
What country is this in, India?
 
yep
and thats Accenture by the way
pretty sure they dont do like that if it was the US
 
!!google accenture
 
5:17 AM
Thats probably because most of their management guys come from a messed up IT company
and they have put on rules and regulations like you have to work for 9.5 hours per friggin day!
 
Anyone here anguler Js developer
 
@Gamex nope. None of us have ever done any angular.
 
@Gamex I am learning it..
 
m59
Angular is for nubs. jQuery is the only way.
 
In my project I have been asked to use Angular and use jQuery only when required.
 
m59
5:31 AM
jQuery should never be used with Angular.
 
ok
 
@m59 why?
 
m59
Because anything you would try to do with it is either completely wrong or at best inefficient.
 
But Angular requires JavaScript; how am I supposed to JavaScript without jQuery???
 
m59
hahah.
code review:
.factory('hide', function() {
  return function(selector) {
    $(selector).hide();
  }
})
// ditch jQuery, nub
.factory('hide', function() {
  return function(selector) {
    document.querySelectorAll(selector).forEach(function(elem) {
      elem.style.display = 'none';
   });
  };
})
@monners is this right? xD
First one is from real code I saw on SO.
It takes a special kind of scrub to manipulate the dom in a service.
 
5:59 AM
@rlemon That was so confusing when you posted my avatar on the screen. I was talking to my boss when it came up on the screen. He asked me about it, and I had absolute no way of explaining it!
hope you're happy!
Luckily, it was hilarious.
 
The stack snippet editor has been broken for 3 days now, yet no action from the SO devs can be seen
 
Hey, speaking of broken, anyone else have problems with the spam detection on jsperf?
When I edit my jsperf test, it says "spam detected" on a white page and it hurts my feelings.
 
@aaaidan yes, lots of people, look at the issue on their GH
 
Angular question: Can we apply same style to multiple elements using ng-style?
 
6:36 AM
@m59 Whaa... why?
 
 
Can anyone please help me with this? jsfiddle.net/rdesai/hjouuqyf/4
I am new to Angular. There is some issue with the module.
 
Random idea from my head
For transitions. To animate content on a low powered device : take a screenshot of the content, use this picture and then animate using this picture. (clean the dom)
Since the img will be a single element the overhead to dom will be reduced and all the "extra" css workload on the cpu will be gone.
probably this is exactly how safari achieves its tabs-ui in ios8
 
That's hardly a new or original idea :P
 
@BenjaminGruenbaum doing it in canvas is though :D
 
6:43 AM
No, it's really simple, also, sometimes you don't need to do that because it works this way anyway.
 
true :-x
 
that was the trick we used to do on windows mobile
 
@jagzviruz Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
when we had to show menu transitions
 
why is there no lib in open-source for it ?
 
6:44 AM
WP8 native an iOS are absurdly fast compared to developing in JS anyway.
 
true that
 
@BenjaminGruenbaum css-flex is too heavy at times.
 
@darkyen00 what do you want to do? Snap the screen and fade it?
@darkyen00 css is a very very slow technology.
 
exactly :P
it wastes the crap out of cpu
@BenjaminGruenbaum nope android 5 like transitions
they are pain the ass slow with complicated layouts.
 
Android 5 transitions?
 
6:46 AM
you tap an element. it expands covers up the whole page ui loads while the transition occurs
 
That's pretty easy to do
 
that gives me an incentive to re-try doing it.
 
Why again are you using JS for a mobile app?
If you want Android native transitions just use code native, if you really feel like you must use JS then embed webviews
 
0
Q: Unable to ng-hide elements

Rahul DesaiIn my mini-project here, I need to hide the Shop button and the Content div when the user clicks on the textbox. I am attempting to do it using ng-hide. For some reason there is an error with the module. Error: error:nomod Module Unavailable I was able to partly get it working here, but I nee...

 
@BenjaminGruenbaum okay
 
6:50 AM
Oh cool, I just got the regex badge.
The bronze one, though :P
-4
Q: What kind of technique are they using?

user500468If you go to this link http://www.swedish-supplements.com/?portfolio=sunny-side-up, you can see how the product image "slides" in. What kind of technique are they using for this effect? Css? Jquery?

 
I got a c# badge
 
and its all web-stack viber clone.
 
https://www.dropbox.com/s/42ob5ejq8dpj0b9/Screensaver.swf?dl=0
Beat that @darkyen00
 
6:55 AM
.fl ?
@Cerbrus codepen.io/darkyen check and mate
 
swf
 
i can't open an swf
no flash at all on this machine
 
Are you on a iDevice?
 
windows
 
How do you not have flash on a winblows machine?
 
6:56 AM
@Cerbrus no chrome
using firefux atm
 
Hehe, firefux
 
my favorite browser is modern.ie, said nobody ever.
 

« first day (1452 days earlier)      last day (3511 days later) »