« first day (1649 days earlier)      last day (3301 days later) » 

9:00 PM
@RyanKinal same zoom level in the settings too? same font?
 
@RyanKinal perhaps something with the box model?
 
user1596138
@MadaraUchiha yep, that's linked above.
 
@MadaraUchiha that doesn't answer it
 
Same zoom level in settings, font has no bearing, as it's sized elements I'm looking at.
 
9:00 PM
I tried vOv
 
if the string contains /<(?:script|style|link)/i
 
Let me have a look :P
 
It's also the same live, in-production page I'm looking at.
 
then the main if block is skipped
so the good stuff has to happen in access or somewhere it links too
 
@RyanKinal count the pixels
 
9:01 PM
parseHTML has nothing
now dammit, I need to lock my pc when I afk so I don't talk
 
@FlorianMargaine Let me get my magnifying glass
 
user1596138
@rlemon Well it ends up calling it
 
@rlemon @Jhawins @MadaraUchiha what are you guys talking about?
@RyanKinal or get some kind of ruler
 
@rlemon but John Resig is my homeboy
 
3 mins ago, by Jhawins
37 mins ago, by Jhawins
// this won't be executed since it's added after page load
container.innerHTML = "<script>alert()</script>
// but this does?
$(container).html("<script>alert()</script>")
 
9:02 PM
@FlorianMargaine where in the jQuery source does links scripts and style's get parsed differently.
when passed to elm.html()
NOW REALLY AFK!
 
@Jhawins @rlemon have you tried the debugger yet?
 
!!afk banana farts are the best
 
user1596138
No sir
 
user1596138
FU sir
 
user1596138
Don't get me looking for it again. I need to finish up at work
 
@Jhawins @rlemon @MadaraUchiha it happens here: james.padolsey.com/jquery/#v=1.10.2&fn=domManip
 
user1596138
YEA
 
user1596138
@FlorianMargaine thanks
 
.html calls .append which calls .domManip
it does some weird stuff with the scripts
 
Do any of you see the same phenomenon? Like, if you go to jsfiddle.net/ng3f6bqq and check out this 100x5 px line, does it look the same in FF as it does in Chrome?
So strange...
 
9:08 PM
@RyanKinal looks the same to me ^
 
What OS?
 
dammit kinal
windows 7
same for me
 
This is driving me nuts...
 
!!afk just when I thought I was out..... they keep pulling me back in
 
9:09 PM
@rlemon are you back yet?
 
driving the boss home. he's answering emails.
smh
 
:D
 
chatting and driving?
extreme multitasking
 
fuckity. a library i use uses somePromise.catch() and Ie8 hates it
 
9:10 PM
@FlorianMargaine KDE?
 
!!afk he's done!
 
@Zirak plasma
(yes)
I've gone full KDE plasma for a couple weeks
it's fine
 
What does !!afk do?
 
@ShotgunNinja so much
 
Ignores all input
 
9:11 PM
@ShotgunNinja Ask @rlemon
 
@FlorianMargaine I've given KDE a few tries in the past. I really like the launcher (Alt+F2), but besides that...nothing kept me there.
 
@rlemon what does !!afk do?
 
@RyanKinal ~2 minutes until it kicks in
 
was there as es5 to es3 transpiler?
 
http://stackoverflow.com/research/developer-survey-2015#tech-tabsspaces
How is this remotely possible?
 
9:13 PM
@Zirak I know. I was trying to pull him back into chat ;-)
 
@Zirak I like the integration... and everything pretty much works. No tray to handle or stuff like that. I also mainly use full screen apps, so I don't care much about tiling windows.
and it's pretty.
I don't ask for much tbh
 
@Luggage There's no new syntax, so you just need a shim
@Jonathan hrm?
 
> users who have 10,000 rep or more prefer spaces to tabs at a ratio of 3 to 1.
 
Devs prefer tabs over spaces
 
well, it's for .catch() which is not valid es3
 
9:14 PM
> At the time of this writing, the average developer is 28.9 years old. He or she was born in April 1986, just as IBM manufactured the first megabit chip.
 
@Luggage there usually is a method that works in ie8... bluebird provides .caught() for example
 
The average developer is an IBM megabit chip
 
yea, but it's not my libarry
 
ah.
sucks.
 
i could fork it but i was hoping to stick a line in webpack and call it a day
 
9:14 PM
patch it :/
 
@FlorianMargaine I know what you mean, which is why I don't like it when the DEs get in my way with borders and stuff.
 
Hehe, I love this one: #tech-caffeine
 
I'm... sooo... confused.
 
@Zirak I go full screen on the apps that matter
 
@Luggage There's probably one already, but in case there isn't, take a look at github.com/substack/node-burrito
 
9:16 PM
like, my .emacs has this: (set-frame-parameter nil 'fullscreen 'fullboth)
for the rest, I don't really care about the superfluous stuff
 
@FlorianMargaine High five!
I also immediately split vertically
 
I have a shortcut that shows all the windows so it's easy to switch
@Zirak depends on what I do ^^
but yes... I often end up switching vertically pretty quickly too
I mean who doesn't?
 
@Zirak I don't get it
 
@SomeKittens Just a small wrapper around an AST walker which allows you to change nodes.
 
Remember, I'm an idiot
 
9:20 PM
Take js, parse it, you get an Abstract Syntax Tree which you can walk over. Burrito gives you a callback for each node in the tree and allows you to change it.
 
In their example, they search for a number, and turn it into Math.PI / number
In Luggage's case, he can search for a property access whose operand is catch and turn it into subscript notation
 
I found tools, just none already set up as webpack loaders
es3-safe-cast changes reserved words to the safe syntax
I hate when all the work isn't done for me already :(
 
But serious question: How is it possible devs seem to prefer tabs over spaces. I don't see any reason for it at all.
 
9:25 PM
@Luggage well, you don't have a patching system with your libs go wild?
 
But serious question: How is it possible devs seem to prefer spaces over tabs. I don't see any reason for it at all.
 
Please stop trying to start a tabs vs spaces discussion
 
@FlorianMargaine Cute
 
@copy I'm genuinely wondering... I really can't think of a single reason to prefer tabs.
 
just stay consistent in any codebase and all is well.
 
9:27 PM
@Jonathan why do you prefer blue over red?
 
glad we solved that.
 
How is using app.use() better/different than using app.get('/someRoute') in Express?
 
@Jonathan semantically speaking, an indentation is a tab
 
@FlorianMargaine I prefer blue if I want to be calm, I prefer red if I want passion. It's the context. The current context is programming.
 
tabs also have the advantage that each developer can change its size to its liking
 
9:28 PM
app.use() is lower level. it lets you do anything. app.get() is a helper that checks the verb (GET) and the path ('/someRoute') first
 
I prefer tabs if I want passion (@BadgerCat)
 
@Luggage Why would I want to do anything on any given route?
 
@FlorianMargaine Ok, that's one :)
 
huh?
 
@Jonathan 2*
 
9:29 PM
@FlorianMargaine *their
 
@Luggage When does .use() come into play? BTW, have you used "morgan" (logs all the requests)?
 
Ok, so that must be it than...
 
@copy indeed
@copy can't change it anymore :(
 
I couldn't think of any but that seems valid.
 
@FlorianMargaine Now everybody thinks you can change the size of tabs to its liking
 
9:31 PM
@copy idiots
 
Whatever the tab prefers
 
//roughly equivalent to app.get('/somePath', ...);
app.use(function(req, res, next) {
    if (req.method === 'GET' && req.url === '/somePath') {
        ...
    }
    else {
        next()
    }
})
that shoudl answer your questiona botu app.use, too
 
app.use just fires for each request and choose to handle that request and/or pass it down the line to the next app.use
 
@Luggage Great example !
 
9:33 PM
something like Morgan will log it AND call next() to pass it along
since it doesn't want to stop processing
 
In JavaScript, is there an easy way to say "Call this method, but of the method does not exist, return null instead"?
 
someMethod ? someMethod() : null
 
You code it this way: if method exists, call it, or return null
 
Yay function references!
 
someMethod && someMethod() || null
Not sure that works
 
9:36 PM
looks right
 
@FlorianMargaine Will be null if someMethod() is falsy
 
ohh, yea
 
It'll also raise a ReferenceError
 
@Luggage So, is either one favorable or they just suit different scenarios?
 
@FlorianMargaine That works
 
9:36 PM
Bananas
 
I hate non-homoiconocity or w/e the word is
 
eith one what? app.use vs app.get? app.get does a lot more than my simple example
 
Operator precedence is a bitch
 
like parse out url params
 
var result = someMethod() || null;
Isn't that simple enough or no?
 
9:37 PM
@FlorianMargaine Remember && is like * on booleans and || is like + on booleans
 
Error is the method doesn't exist
 
app.get('/users/:userId', ...);
 
@copy nice
 
Ah shit
 
@SterlingArcher you should use try catch
 
9:38 PM
someMethod ? someMethod() : null;
 
Still a ReferenceError
 
@SterlingArcher That will throw if var is undefined
 
if someMethod() is on another object you won't have the reference error
options.someMethod()
 
on a more serious note
 
Since it might not be defined, I bet it's on an object
 
9:40 PM
var result = (typeof someMethod !== 'undefined' && someMethod.call) : someMethod() : null;
 
if (someMethod) let result = someMethod();
else let result = null;
 
ok.. time for coffee:
someMethod?()
done.
 
wait I thought typeof was bad?
 
it's bad to not know if your variable is defined or not
 
It's the only way to check if a variable is defined.
 
9:41 PM
and typeof is the only way..
 
what @Zirak said
 
the internet lied to me?
 
coffeescript.org/#try:someMethod%3F() (shows the JS version, too)
 
try-catch
 
9:41 PM
well, that too
 
Well, yes
 
copy gottem again
 
@Luggage ah, nice
didn't think to just check against 'function'...
 
Which would actually be a reasonable solution if we could catch specific exceptions without annoying boilerplate
 
9:42 PM
so used to the typeof !== undefined idiom
 
@Luggage YAY!
 
hi can anyone point me to a place to find infinite scroll examples using AJAX?
 
Well, it also catches inside of the method call, so meh
 
@SterlingArcher that said, if you need this, something's wrong
 
@Laravel 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.
 
9:43 PM
? is a coffeescript thing right?
 
yea.
 
They have it in C# 6 too
 
If I say something abysmally stupid please ignore. I haven't slept in 2 days now
 
in C#6 it's for nullexception, not for referenceerror
 
9:44 PM
elvis operator
 
@Luggage What does morgan pass the request to with next()?
 
@FlorianMargaine I think that's the one
 
@Jonathan there's even better
 
next() just tells express "go ahead and run the next handler, now"
 
9:45 PM
var result = typeof someMethod === 'function' : someMethod() : null;
 
@FlorianMargaine would that syntax perhaps be something like.. myscript?.executeAndReturnError?
 
the sam req and res objects are automatically passed in. you can alter them, though
 
@SterlingArcher in c#? yeah
 
My co-worker saw this and I have no idea what language this is or what it does
 
@SterlingArcher but it's not to catch referenceerrors
c# won't even let you compile with js' reference errors
@SterlingArcher foo?.bar(); is the equivalent of if (foo != null) { foo.bar(); }
this is called the "null coalesce operator"
 
9:47 PM
@FlorianMargaine that's.. that's glorious
 
in js it'd be the equivalent of a shortcut for if (foo && foo.bar) { foo.bar.baz(); } that we sometimes need
ask @ssube, he wrote a null coalesce lib for js
 
@Luggage Why handle them elsewhere further and not in the same .use()?
 
@FlorianMargaine so foo.bar.baz?.method(); works also ?
or do you have to foo?.bar?.baz?.method();
 
@jAndy we're talking about C#6 there, right?
 
heh? wat? nulls?
 
9:49 PM
yea
 
I'm gonna come back to this cause I gotta go.
!!afk passing out on trains
 
@jAndy it works, but it's the equivalent of if (foo.bar.baz != null) { foo.bar.baz.method(); }
 
Why do you call the ternary "Elvis"?
 
@jAndy while this is the equivalent of if (foo != null && foo.bar != null && foo.bar.baz != null) { foo.bar.baz.method(); }
@StevensHaen because banana
 
@FlorianMargaine That works in JS???
 
9:51 PM
2 mins ago, by Florian Margaine
@jAndy we're talking about C#6 there, right?
 
K
 
@phenomnomnominal From the creator of DICSS and NUTS...
 
he looks like Dr House
 
Yeah they're probably assholes
 
9:56 PM
Says the guy behind Brotractor
 
We dropped the bro :P
And it's not like I called it Penistractor
 
YEA TABS!
Sorry I'm late, I'm browsing on IE, so that was current for me
 
SPACES
 
SPAAAAAAAAAACE
 
What does new Buffer() do in Express?
 
10:07 PM
Creates a new buffer object
 
@StevensHaen That's actually a Node thing, not just Express
 
@StevensHaen also, just googling new Buffer() would have got you to that page
 
@rlemon That's so cruel
 
their nervous systems are strange. fish is dead, just auto nervous system doing its thing
 
10:13 PM
@rlemon :(
 
but still creepy af
 
just random impulses I guess
 
Why do people couple NodeJS with MongoDB a lot more often than, say, MySQL?
 
hype?
also, how many people use mongo?
I didn't like it
 
7
 
10:14 PM
@StevensHaen Because they don't really understand the consequences of MongoDB and just go with what's popular.
 
I used it
Not a fan
 
I dumped it and went with postgres, never looked back
also, that was the day I stopped using mysql \o/
 
Honestly all databases are bad
 
@SomeKittens I've used Mongo before, it was just fine. But still, MySQL could be utilized in most cases
 
But that's just something you gotta live with
 
10:15 PM
non relational db's are stupid
there I said it
 
@Meredith I really haven't found a problem with Postgres
MongoDB is like jQuery - basics are easy, anything else is incredibly difficult to impossible
 
I haven't used it so no comment
is postgres relational?
 
Yes
but it's also got a JSON datatype you can query against
 
Oh that's cool
 
@rlemon That statement is stupid
 
10:19 PM
Your face is stupid. THERE IS A PARENTHESIS ON YOUR FACE!
 
no it's on mine
I'm the lisper
fun fact: I'm wearing this right now
 
Why?
 
got it for free though
 
fun fact: I'm wearing this right now
 
oh, that's okay then
 
10:22 PM
pictures @FlorianMargaine not wearing that
 
@SomeKittens Off to a KKK meeting?
 
@FlorianMargaine are you a docker
do you like docking
 
yeah docker is my job
 
fun fact: fun facts usually aren't that funny.
 
I went to a local docker meetup and they had nice goodies
 
10:23 PM
They're supposed to be fun, not funny
 
!!urban docking
 
@phenomnomnominal docking The act of placing the head of ones penis inside the foreskin of another's penis.
 
wore this yesterday
 
Don't do that
Too late
 
10:24 PM
Went to a meetup, everyone thought I was on the core team
 
@Meredith already knew the answer :P
 
First-head experience
 
@rlemon lol
Only a core team member would wear a shirt like that to a meetup
 
Everyone else is supposed to have some dignity
 
@Loktar You can only get them by contributing to an Angular project (or the general Angular ecosystem)
The funny thing is I've never even made it to a Google interview
furthest I made it in the process was the initial "Do you have any questions" phone screen
 
10:27 PM
"funny"
 
lol
hilarious!
/me goes to eat dinner lol
 
I wanna get this printed on a t-shirt and wear it to meetups / tech talks.
 
@rlemon hahaha
 
@rlemon you never go to meetups
 
that would be pretty awesome
 
10:28 PM
@rlemon make your own KitchnerJS meetup
 
@FlorianMargaine there are very few interesting ones in my area.
 
then invite us all via Hangouts
 
I've recently looked
 
> Now Canada's largest tech meetups, and growing internationally, eh.
are you sure you really looked? :D
 
10:32 PM
did you miss the 'recently' bit?
has the event happened since I looked?
any events I would have been able to attend recently have been like "Software Hamilton" meetups and such
not very interesting
 
I wore this to my meeting, no one laughed
 
I have a t shirt of a panda riding a bicycle wearing a space suit.. in space.
 
I don't get it
 
no one ever notices it
 
Why use the res.send() instead of just res.end()?
 
10:36 PM
because maybe you are not done
 
So .end() doesn't just write to the body?
 
it ends the response
 
@StevensHaen Stop the trivial questions please. Write a few programs, get acquainted with the library, read through the docs, and then you can ask wiser questions.
In unrelated news, hangouts?
 
> Use to quickly end the response without any data. If you need to respond with data, instead use methods such as res.send() and res.json().
 
let me just get into my birthday suit.
 
10:37 PM
Use the docs, Stevens!
 
@Zirak do you have this? (add-hook 'before-save-hook #'gofmt-before-save)
 
@FlorianMargaine Not yet, so far I'm running gofmt once in a while
Good idea though
 
hahah Mastur Plan has 1 less backer than last time I looked. And that backer was ~75% of all the money pledged.
lol the comment
> I pledged $1000 but I would be willing to up my pledge if you can make an award that would allow the app to connect to my FitBit and start vibrating intensely if my masturbatory urges overwhelm me. I think it will either be a better experience, or too distracting and make me stop. Either way, worth the extra money. Please consider.
 
@Zirak yea you just don't have to think about it anymore
 
10:50 PM
lmfao
 
if (/^.r/.exec(name)) { gender = 'M'; }
I could see that
 
Poor Brittany
 
@KendallFrey ...Who designs that?
 
I have no idea
 
design is a strong word
 
10:57 PM
@Zirak you're so slow at writing code
 
@FlorianMargaine I'm being interrupted by hangouts and playing with transcript in another window :P
 
sloooooow
:P
@Zirak SLOOOOOOOOOOOOOW
:D
 
You suck
 
Is anyone here well versed in the "push an array of jQuery deferred objects into an array then do something when they all resolve" technique? Normally this technique also works when I pass in a function that returns a deferred, but if I need to pass arguments to this deffered-returning-function, that func gets called immediately.
I'm planning on rewriting this code soon using Backbone models, but I need to fix this bug quickly.
 
some code might help
 
11:13 PM
would pointing you to the file in github be sufficient, or should i try to extract the relevant bits into a paste/fiddle?
 
Fiddle would be nice
 
 
@Loktar *nononono
 

« first day (1649 days earlier)      last day (3301 days later) »