« first day (1746 days earlier)      last day (3203 days later) » 

5:00 PM
they still are
 
@Nick @ʞɔᴉN How did you invert it?
 
none of your business
 
@Nick Indeed!
 
Nice one Nick!
You burn, Farhan!
 
5:03 PM
what
 
@Fuser97381 Nope.
 
Maybe.
 
what is even
user image
2
 
the hell
 
my saturday afternoons
 
5:08 PM
@Nick did you just hit 1k rep?
 
no, I've been at 1k for many moons
I used to be a couple hundred higher, but I gave a bounty to @SterlingArcher
so he could hit 10k
 
oh, yeah I thought you were higher
that's depressing though
 
well
 
need to get you some internet points
 
I don't go on main, so I don't need the rep
 
5:10 PM
yeah but more rep implies you know shit
 
I don't know shit, though
 
me neither
 
samesies
 
me three
 
your names and avatars are so confusing
 
5:11 PM
but why let other people know that?
@BenCraig how?
 
gee
I wonder
 
Beats me
 
Just shove some jQuery in there, they'll think you're a god.
 
Beats me
 
Write the same things, but upside down
Nick writes it first, then upside-down-Nick writes it upside down
 
5:12 PM
no
 
yes
 
no
 
That could be an interesting bot, actually, upside down Caprica.
 
cheats
 
5:13 PM
Jan is a haxxor
 
janus
jAnus
kinda like jQuery
 
So I went looking around codepen, found out I had an account
 
@Nick except I'm not
 
only thing on it was a rewrite of this that didn't work
Forgot I made that
 
@AwalGarg Getting the last value and others using spreads and destructuring, this came up earlier too.
 
5:15 PM
ok?
 
@JanDvorak you don't have an anus? That's weird
 
I mean how would you do it?
 
you don't
 
jquery
 
I had came up with something I forgot it tho :|
 
5:17 PM
yes. you don't jquery indeed.
 
but it does all things
 
> all
noob. it does more.
 
You can jQuery a cake
 
You can jQuery a coffeescript
 
@ʞɔᴉN What about TypeScript?
 
5:19 PM
@CallumBarclay jQuery and TS are opposites
 
Using destructuring and destruction:
let [last,...rest] = arr.unshift(arr.pop());
A bad idea :|
 
if jQuery and TS are opposites, C# and .NET are opposites
 
jQ is brief, TS is verbose. jQ is messy, TS pushes structure.
 
found the TS fanboy
 
5:20 PM
jQ is maintained by a mess of uncoordinated numpties, TS is maintained by a mess of ultracoordinated numpties
 
@Nick one is a library, one is a language
they are not comparable.
 
@rlemon this
 
yes, that's the point
 
@rlemon you can compare anything if you internet hard enough
 
but actually one is just a layer of abstraction on top of JS, so not technically a language
boom
 
5:21 PM
There are entirely too many Nicks in this room.
 
Hi
 
@ʞɔᴉN it isn't a layer, it is a compile2language
which is a language.
 
mm good point
 
mm good point
 
mm
 
5:22 PM
mm
 
i hate you both
 
one day we're both gonna get banned by a vengeful lemon
 
I'll convince a mod you're a sockpuppet account and get them merged :D
 
ooooh, you made a canadian hate you and you aren't even a hockey team
5
 
one nick to rule them all!
 
5:23 PM
@rlemon :/
let me have the password though
 
Guys can u have look on this, and tell me why the function always return false? stackoverflow.com/questions/31678734/…
 
@ʞɔᴉN hunter5
 
kk
like moose_hunter5?
 
@brata the a in ajax is asynchronous -- meaning your return is not happening in the correct places. you should be using callbacks (or promises)
 
@copy ping
 
5:24 PM
cuz canada
 
O.O
I dont get this,
 
@rlemon I thought it meant "and"
 
Ah
 
arr.unshift(arr.pop());
Whats better way to do this ^?
 
@brata look up the definition for asynchronous
that should help
 
5:25 PM
Should i make it synchronous?
 
no
 
@brata NO
 
> you should be using callbacks (or promises)
 
!!tell brata mdn promise
 
5:27 PM
doesn't jq use q or something?
 
Could you rewrite it so it could work?
 
@brata no
well, I could.
 
Allright xd
 
promise me you'll be with me forever
 
but you wouldn't learn
 
5:27 PM
promise me you'll make me coffee cake
 
Yea..
But
 
@brata the problem is your success function is being called at a later point in time. So the return from that function is not returning from the parent scope.
you NEED to learn how to use callbacks
 
@brata yes, my fee is $100/hr
 
It is possible to do? To make that function working?
 
Just for reference, Nick -> Nick Dugger, ʞɔᴉN -> Nick?
 
5:28 PM
function foo(callback) {
  setTimeout(callback, 1000);
}

foo(function() {
  alert(1);
});

// 1 gets alerted after 1000ms
 
no, Nick -> Nick, ʞɔᴉN -> Nick
We are nick
dum dum dum dum dum dum dum
 
I will look for definition of synchronous and asynchronous ..
 
Two dicks and duck, more or less
 
@brata Look for synchronous, then look for the a- prefix. See if you can figure out what asynchronous means from that :P
 
Btw. Where are u from guys?
 
5:30 PM
#LiteracySkilz
 
@brata also read the answers linked in the dupe link
 
@brata Scotland.
 
We're all from Scotland
3
 
xd
Ok
 
read this
don't come back till your done
:)
 
5:31 PM
you're*
 
#rekt
 
Isnt sucess a callback in jQuery.ajax?
 
@cswl it is a property (and a method)
point is that when you return from it, it does nothing
 
If email, is electronic mail, does that make erect electronic rekking? #geterekt
 
your return value is just garbage, you need to pass a callback to accept your return values (or wrap it in a promise)
 
5:32 PM
Thanks @rlemon for maintaining the level of this room
 
I was just clearing my doubt about jquery :|
 
@FlorianMargaine for the record, I'm helpful, just seemingly not when you're around.
 
@Nick I can vouch for this, he helped me with making Coffee Cake.
 
Question: Any idea how would you make this work?

add(2, 5); // 7
add(2)(5); // 7

I have no idea about the second one.
 
add returns a function
 
5:34 PM
@RahulDesai you need a function that returns a function
 
I keep seeing that programming test question everywhere; why? What makes it so popular?
 
it's called currying, @RahulDesai
 
function add(n) {
    return function(m) { return n + m }
}
 
@RahulDesai add => (x => (y => x + y))(number1)(number2)
 
Something to that effect, I think
 
5:35 PM
I see.
 
That's how I'd do it,
 
function add(val) {
	function add2(val2) {
		return val + val2;
	}
	return add2;
}
damn, I'm slow
serves me right for opening an editor for that
 
@CallumBarclay Not in production I hope o.o
 
@JoshLeBlanc Hah, like I do production code.
 
!!water or coffee
 
5:36 PM
@rlemon water
 
!!gatorade or h2o
 
!!should I add coffee to the water?
 
@Shmiddty h20
@Shmiddty h2o
@rlemon All signs point to no
 
lodash.com/docs#curry will give you a function that returns a function or the result depending on if you supplied all the arguments
 
Caprica really wants us to stay hydrated.
 
5:37 PM
@Nick I guess this one makes it popular: github.com/h5bp/Front-end-Developer-Interview-Questions
 
!!coffee or dietpepsi or water or koolaid
 
@JoshLeBlanc Could not process input. Error: unexpected or on line 8
 
:(((((((((((((((((((((((((((((((((((((((((((
 
add = _.curry(add);
// now you can:
add(2, 5);
// OR
add(2)(5);
 
@Zirak ^^^^^
 
5:38 PM
@JoshLeBlanc Could not process input. Error: unexpected or on line 8
 
@JoshLeBlanc protip:
!!help coffee
 
@rlemon coffee: Forwards message to coffeescript code-eval
 
!!irn bru or diet irn bru?
 
@CallumBarclay diet irn bru
 
:P
 
5:38 PM
Oh lol
Right
 
we need to drop that
 
!!Should I have diet pepsi or water or coffee or kool-aid
 
@JoshLeBlanc coffee
 
Is Coffee Script any faster to write than JS?
 
SCORE
 
5:38 PM
!!c> "is also coffeescript"
 
@rlemon "is also coffeescript"
 
@CallumBarclay If you know it
I really like the existance operator in cs
 
@CallumBarclay CAN be, but as a coffee-script user, I suggest ES6 instead.
 
faster to write? maybe
faster to execute? depends on how shit the compiler is
 
@Luggage How did you destructure the array?
 
5:39 PM
Faster to read? Heck no.
 
just by using the .length and .slice()
 
@Cerbrus Ruby fanboys love it
 
!!c> document?.querySelectorAll("div");
 
@JoshLeBlanc "SyntaxError: expected expression, got '.'"
 
?
 
5:40 PM
@JoshLeBlanc "SyntaxError: missing name after . operator"
 
@rlemon: Reason enough not tu use it.
 
@JoshLeBlanc Could not process input. Error: unexpected ? on line 8
 
Ever.
 
@JoshLeBlanc "undefined"
 
@JoshLeBlanc YOU HAVE A ? IN THERE
also Cap doesn't expose document
she evals in a webworker
 
5:41 PM
Also, gj failing a querySelectorAll 4 times. Impressive ;-)
 
@rlemon I know. Coffeescript has an existential operator, so document?.something would check if document exists first
 
document?.querySelectorAll("div"), in coffee, should just eval to null or undefined
 
gotcha
 
@Cerbrus Technically I failed to invoke the cs interpreter twice
 
in any case, cap doesn't have document
 
5:42 PM
bot coffee complains about semicolons
 
!!> document
 
@Luggage I came up with this :/
Using destructuring and destruction:
let [last,...rest] = arr.unshift(arr.pop());
 
@rlemon "ReferenceError: document is not defined"
 
@Luggage Do I have to use lodash library in that case?
 
@RahulDesai No. Lodash has a curry helper that does it all for you, but you can just make it yourself using the other examples people posted
 
5:43 PM
@RahulDesai you never have to use lodash
 
If you do want to use lodash but don't want all of it, i think you can require JUST that one function form it
 
@ssube unless you're fighting blanka
 
the lodash _.curry() makes a function that will check for all arguments and decide if it should return the final result or another function.
so.. it's 'complete' but I wonder why you really need to support add(a, b) and add(a)(b)
 
With loadash, I get `Uncaught ReferenceError: _ is not defined`
http://jsfiddle.net/yqcn66b1/
 
I'm going to go out on a limb and say you're not including lodash
 
5:45 PM
because you never loaded lodash
it's not built in. it's a library of helper functions
 
It's someone else's code that you can use in your own
 
ah, gotcha
 
You can probably generalize currying with something like:
Function.prototype.curry = function (l = this.length) {
  let c = [];
  let i = (...a) => {
    c = c.concat(a);
    if (c.length >= l) {
      return this.apply(null, c);
    } else {
      return i;
    }
  }
  return i;
}
 
What does this.length resolve to in that context?
 
5:50 PM
@FlorianMargaine pong
 
Hey guys, why is foo.x not in the object here: jsfiddle.net/yqcn66b1/1 ?
 
http://www.commitstrip.com/en/2015/07/28/betting-on-the-right-horse/
CommitStrip - Blog relating the daily life of web agencies developers
Betting on the right horse
CommitStrip
1438105795
 
@copy do you have some experience running fakeroot/fakechroot/cdebootstrap?
 
1 message moved to JS trash
format your code
 
!!should I do sideproject or mainproject
 
5:51 PM
@ivarni You should do sideproject
 
\o/
 
1 message moved to JS trash
 
@FlorianMargaine Nope
 
@ssube There's no indenting, calm your tits
 
@JoshLeBlanc Multiline code gots to be formatted. Cap enforces it when she's here.
but Cap isn't doing Cap stuff today :(
 
5:53 PM
sure she is
 
:(

On topic, why *isn't* `x` in `foo` there? It's in `bar`
 
function foo() {
this.will = get('removed');
}
// line 4
 
Any idea?
 
maybe
dammit cap, way to make me look like a jackass
 
crickets
 
5:54 PM
cough
 
I think Cap's broken or off frakking somebody again
 
!!sandbox
 
@cswl Please go and play in the Sandbox
 
I thought it would copy the object in its attribute, but it didnt.
 
@cswl It's room #1 for future reference. Just erase everything after the 1 in the URL bar here, and you'll end up there
 
5:55 PM
 
!!> var foo = {n:1}; var bar = foo; foo.x = foo = {n: 2}; console.log(foo, bar);
 
@JoshLeBlanc "undefined" Logged: {"n":2},{"n":1,"x":{"n":2}}
 
@Zirak why wasn't this moved?
!!info
 
@rlemon I awoke on Tue, 21 Jul 2015 16:57:26 GMT (that's about 7 days ago), got invoked 1177 times, learned 392 commands, but forgotten 2 commands
 
holy handlebars batman! chrome AND FF are each taking a gig of ram
 
5:56 PM
She learned 392 commands in 7 days?
 
@JoshLeBlanc she learns all user taught commands on boot
 
rebooting the bot
 
!!bye
 
!!info
 
5:57 PM
@rlemon I awoke on Tue, 28 Jul 2015 17:57:24 GMT (that's about 9 seconds ago), learned 390 commands
 
Is she windows?
 
FF on windows 7
 
@copy :( ok
 
function hexToRgb(hex) {
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
} : null;
}
testing..
nope
bot doesn't pick these up
each line is a new message
 

« first day (1746 days earlier)      last day (3203 days later) »