« first day (2440 days earlier)      last day (2507 days later) » 

2:00 PM
@JohanÖbrink Yesterday I learned about Flying Jacob, so I think you're right
 
@KendallFrey so you haven't tried it yet? :)
 
@SterlingArcher @KendallFrey I swear to god, every fucking time..
5
 
@rlemon SterlingArcher is afk: home
 
@JohanÖbrink no, but i will confess i would like to
@rlemon just die
 
2:08 PM
lol
 
wow, there are a lot of images if you search for "donald trump duck"
 
Hello everyone.
When throwing a new error, what console function is invoked, does anyone know?
 
umm.. I did it correctly.
 
Doesn't change the fact that alots are fun.
Also, alot of alots would be yeah, there are lots of lots in slow translation
 
2:12 PM
Anyone around who has implemented JSON API maybe? stackoverflow.com/questions/44678531/…
Beware though, I have more questions :P
 
The answer is "whatever you want. it's your api"
But I don't normally see single fields fetched in that manner
 
@rlemon have you seen this yet? This is one of the best things I've seen in a looonngg time
 
@Luggage I didn't see that part in the spec
 
Be aware, I may get bored of your questions at any time. :)
There is no spec (or spoon).
 
2:13 PM
@Luggage Yes, there is
 
ok, link the spec to me, please.
 
That's just an opinion site dressed as news a spec.
 
It's alex jones mixed with the amazon commercial, it's honestly just the best
 
And I don't expect to see those requests either, but I still need to answer them when they come in
@Luggage People agree on it, that's what makes it a spec, not the design of the website
 
2:16 PM
then I guess I'm the wrong person to answer.
 
Shame on you for trying!
 
REST is a spec
 
REST is a way of life
 
I prefer HATEOAS, because it has HATE in the name
 
does anyone even use HATEOAS
in an app
 
2:20 PM
I always read that as HATEOATS and wonder what they have against Quakers.
 
that json api looks like it's very similar
 
@Mosho about as many people as use JSON API
 
what with links on the objects and all
 
in apps?
 
like 3, 4 on Fridays
 
2:20 PM
lol
 
But if you get it wrong, it's a HATEOAS-crime.
 
Object rest/spread and async/await feel like they make javascript a really easy to use language
 
It has been easy af since forever. That's why everyone and their son is using it
 
They are great, but async/await doesn't completely remove the need to understand how async code interacts with sync code.
 
Anyone have any ideas?
 
2:22 PM
I have lots of ideas
but I don't want to tell you about them
 
yeah, but callbacks can get tedious to manage, Promises are easy, and async/await is super easy
 
well I'll tell you one
I have an idea to make a game in AR once it's viable
 
@neet_jn you might be looking for console.error but that's just prints to the console LIKE an error.
 
@rlemon fuck you and your puns
 
user1731387
what about time out there guys?
 
2:24 PM
What about time? I'm in favor of it.
Sometimes I wish it was faster and/or slower.
 
@SterlingArcher check g+
two more goodies
 
@rlemon I hate you. I had to check it twice for accuracy.
 
I will soon, I got customers here lol
 
My personal trainer said I should have a protein shake every night at 11pm. That's whey past my bedtime
 
2:26 PM
@KendallFrey hahahaha on a roll
 
Is there a way to programmatically test if a function is an arrow or not?
 
Why tho?
 
take it to the knee
 
12
Q: JavaScript ES6: Test for arrow function, built-in function, regular function?

CoDEmanXIs there an elegant way to tell Harmony's slim arrow functions apart from regular functions and built-in functions? The Harmony wiki states that: Arrow functions are like built-in functions in that both lack .prototype and any [[Construct]] internal method. So new (() => {}) throws a TypeErr...

 
@ndugger toString it and parse the string
😉
</helpful>
 
2:29 PM
Strange, but ok
 
@Vap0r unit testing
 
Today my 4th of July shoes come
and then I do.
 
!!> "caller" in (() => undefined)
 
@Luggage true
 
2:30 PM
damnit
 
@ndugger I've never done unit testing, but from my limited knowledge I'm not sure why whether a func is arrowed or not would be important.
 
@ndugger check for this?
lol
 
@Loktar needs more freedom
 
@SterlingArcher shirt, shorts, aviators are coming as well
 
@Loktar fn.bind('haha')
 
2:31 PM
all Amerian flag ofc
 
oh baby so much freedom
 
I just hope I don't accidentally free some prisoners or anything
 
user1731387
oh @Luggage i not getting sooner
 
ndugger on chrome this works (but probably won't for a babel-transpiled function): "prototype" in foo
where foo is either an arror function or normal function
 
it would be super hard to test with babel transpiled
but why do you need to know if it's an arrow anyway?
like why does a unit test need to know if it's an arrow or not?
 
2:32 PM
@Luggage 'prototype' in (function() {}.bind(null))
 
hm.
 
bound functions and arrow functions are hard if not impossible to differentiate unless you parse the stringified versions
afaik
 
yea. and probably for good reason
 
yeah @rlemon that's what I was thinking as well
 
@Loktar that's what i'm wondering too, though I have no experience with unit tests....
 
2:33 PM
I call shenanigans XY.
 
Isn't it invoked? Like order 66?
 
@Vap0r nice new avatar
you're a real chat user now :p
 
@ndugger what's the reason for that checking ?
 
Lol I didn't realize the avatar was a "make or break" type thing
 
2:34 PM
it's just a syntactic sugar
 
I couldn't find good images of water vapor so I just took a water droplet graphic and dropped it in here
 
!!giphy we get it, you vape
 
:(
 
isBound(fn) {
	try {
  	new fn;
    return true;
  } catch(e) {
  	if (e.message.includes('not a constructor')) {
    	return false;
    }
    throw e;
  }
}
 
2:36 PM
Not in the traditional sense at least
 
@Mosho wrong question
 
what was the question
 
test for arrow functions, not constructors
 
that's the point
although that implementation is pretty faulty
shows the point
arrow functions cannot used as constructors
 
hm..
 
2:38 PM
hmm..
 
that will also catch any errors thrown by a real constructor
 
e.message.includes('not a constructor')
 
@ssube which is why I rethrow
it's still not a good implementation
but like I said, the point is the same
 
Is this what they call a 'foot-gun'?
 
almost certainly. Knowing what a function might do seems pretty fishy.
 
2:40 PM
you can just check for the error
so change the function name to isArrow
 
It's clever, but makes me feel uneasy.
 
and I guess verify that it's a function first too
what's the use case
 
"unit tests"
which makes approx. no sense
if you wanna test a function, you just... call it. If you're doing it wrong, it ought to throw.
 
use typescript and the this: arg type
maybe
 
should work
 
2:43 PM
So everyone here is in consensus that testing if a func is arrow or not doesn't make much sense for a unit test?
 
I've recently been refactoring out a lot of my : this returns, turns out I didn't actually need any of those methods to chain.
 
I'm open to being convinced, but my intuition says no.
 
@Vap0r well I mean if you're writing unit tests for Babel maybe ;P
 
@Vap0r You have to cross the unit boundary to introspect the function, IMO, so it's no longer a "unit" test.
 
fine, units test
unit and the surrounding greater metropolitan area test
 
2:44 PM
and even in a larger test, knowing what's inside somebody else's function seems bad
 
or a unit test for a linter it would make sense as well
there are places where it does, just curious what @ndugger is doing
 
yea, but for that you are testing the parsing
not a live function in your hand
 
yeah
 
yeah, it's almost test data at that point
 
@ssube I know you don't play anymore, but I pulled Zaiross last week, lol.
 
2:46 PM
Ok cool thanks for the info. I can read about unit testing almost anywhere but does anyone who's done it have a preferred article?
 
if I'm testing a function that takes a callback, they need to have some agreed upon contract to talk, whether it's an Observable or just throw and return
 
@Vap0r they behave a bit different when it comes to scoping and binding, so sometimes making sure it stays one way or another is important
 
@Trasiva dude, that's dope
 
@ssube I almost fell out of my chair. I was flabbergasted. Now I just need better runes.
 
I should sell my old account
you'll have to work for a while to get those runes
 
2:47 PM
The different behavior is all internal. Like the lack of 'arguments' and the 'this' scope. I think you are out of luck.
 
query strings are very very slow in my application, what's the deal?
 
the best way to test a function's internal stuff is to invoke the function and see what it does :)
@corvid well, watcha doing with em?
 
funny
 
@ndugger I was actually just reading an article on that this morning so was wondering why you might be testing. Thanks for the insight
 
2:49 PM
@ssube got a drawer that has a list of tabs, I am using the query string to delegate which tab is currently open. e.g., /clips/:id?tab=comments&sort=startTimeCode
Imagine like youtube if it had a side container with live comments that could be sorted/spliced in certain ways, and tabs with video metadata, playlists, etc
 
@ssube Yea, I know. I'm working on building a Necro team so I can eventually get him the Rage runes he'll need. But it's a nice little time waster for me since I only put in an hour or two a day.
 
you realize changing the query string forces a full page load, right?
 
oh... that explains it... are there alternatives to persist it on the url? I am using hash history for routing already
 
@Trasiva If you like that game model, you should check out the Injustice mobile game they released. It's got a fair chunk of the console game, much simpler, but the same loot box reward stuff and really good graphics.
 
I want more SW time :(
 
2:52 PM
@ssube I'll take a look at it tonight maybe. I'm playing Mass Effect 3 right now.
 
Star Wars?
Social Warrior?
 
@SterlingArcher Yea, I'm not sure if you're gonna fucking finish this event because you're slacking.
 
@Trasiva you don't have a Xbox right?
 
@SterlingArcher Newp
 
@Trasiva definitely not, but it's ok.
I think a break did me good
 
2:53 PM
Mass Effect III was pretty bleh :\ gameplay always went downhill in that series
 
@SterlingArcher Except for that whole part where you lose out on 1k free crystals, plus 2 lds or one Leg
 
Yeah I know lol I missed out on 2 events, but that's teh thinking that got me addicted
 
@corvid It's a little clunky, but it's sstill early.
@SterlingArcher You have ToAN and H to do too, lol.
 
it gets a little too easy late game if you're playing infiltrator
 
Balls.
That I can't slack on
ToaH I don't mind slacking but ToA is important
 
2:55 PM
ToA ?
 
Trials of Ascension it's a game thing
 
ah, a MMO
left that genre a couple of years ago. You need either time or money to be competitive
 
I want to turn my game's map into a canvas map but I'm not sure how to do that
lmfao
 
@SterlingArcher You going through that album of almost wins?
 
@ssube, are you sure it reloads the page with react-router and react-router-redux?
 
3:07 PM
if you're changing the query string, the page will reload
 
@Trasiva just finished lol
 
it's in one of the specs
 
@ssube url param changing?
window.history.pushState() should solve that
 
@SterlingArcher need help?
 
3:14 PM
@SterlingArcher luggage recently did something very similar
I imagine you want a tile map
 
@Loktar do you usually advocate for or against Pixi for JS rendering?
 
which is pretty easy
 
I did a bunch of research yesterday and it stood out as one of the better ones, but I remember you having opinions.
 
@ssube pixi is great imo
mostly because it falls back if webgl isn't available
but uses webgl otherwise, so is pretty fast
 
@Loktar well, it's tricky, because it's not literally a map
 
3:15 PM
yeah, I'm super excited about that. I'm going to set up a bunch of fog/lighting shaders for my game stuff and fall back to canvas sprites.
 
nice, yeah it's pretty cool
 
I imagine you could get to Limbo's level of atmosphere pretty trivially, I've written most of those shaders before.
 
My map is more of a "senses" dashboard
 
yeah that would be really cool to see
 
3:16 PM
and it's stupid fast
 
@SterlingArcher ah, I was thinking of that other game
 
And apparently everybody/thing in my game is blind af
 
the one you worked on with your friends
 
@rlemon Oh dear they're parkering it
 
Regex q: How can I match a repeating patern that possibly doesn't have the whole pattern?

repeated pattern - abc
VALID: abcabcabc, abcabc, abcab, abc, ab, a
INVALID: aaaa, abb, aabbcc, abcb, abcc

(?:ab?c?){0,} matches all of the valid cases, but also aaaa
 
3:17 PM
I was running their batching test and got up to 200k sprites on screen or so at like 45fps
 
Ah no, that is a tile map but that is a completely POOP mess
cc @MadaraUchiha
 
 
@SvenTheSurfer you can't use {0,}, you need at least one repeition laid out explicitly
like a(b(c(ab?c?){0,})?)?
establish the sequence and then start looping, so you enforce the right order for the first 1-3 chars
I think you need to nest them
 
oh my, interesting. thanks!
 
3:20 PM
I love when I figure out small things that javascript can do that I didn't realize I/it could do.
 
numbers are super weird
 
It's crazy how the concept of numbers existed before we had a way to describe them
Like, a caveman held up two rocks, and knew that it was more than 1, but couldn't tell you anything about 2 or 1
No im not high
 
why?
 
3:24 PM
> If you take enough random steps in two dimensions, you'll always eventually get back to your starting point. The same cannot be said of three dimensions.
fuck me
 
Well, HR asked me to stop passing out in the VPs office
 
how does the 2D part work?
 
@KendallFrey is there a graphical representation of that somewhere?
 
> No matter how often you multiply 90625 with itself, it will always have 90625 at the end.
90625
90625² = 8212890625
90625³ = 744293212890625
etc.
 
If you're taking random steps, won't you potentially just keep getting further away.
 
3:25 PM
I want to test this, but I also just wanna trust him
 
@rlemon They took that dude who picked that lock yesterday to Karma Court
 
@ssube I think it means that the probability of returning to your start approaches 1 as you go to infinity
 
@ssube depends on how you're applying physics, I mean, if you're on a planet in 2D, you can only walk in 2 directions, so you'll always return home if you just keep walking either way
 
@SterlingArcher That's an entirely different concept
A random walk is a mathematical object, known as a stochastic or random process, that describes a path that consists of a succession of random steps on some mathematical space such as the integers. An elementary example of a random walk is the random walk on the integer number line, Z {\displaystyle \mathbb {Z} } , which starts at 0 and at each step moves +1 or −1 with equal probability. Other examples include the path traced by a molecule as it travels in a liquid or a gas, the search path of a foraging animal, the price of a fluctuating...
 
@KendallFrey yeah, I guess that makes sense, if the direction is randomly chosen.
Even though some walks will go way out, the average distance will be pretty small.
god damn elasticsearch, take 10 minutes to start a new cluster, why don't you :|
 
3:29 PM
Did you guys hear google is getting into the AI recruiting sector?
They're using smart machine learning to help people find relevant jobs
 
@rlemon the look on his face the second time
"something is very wrong"
 
@rlemon Can we talk about that url though?
 
no
we don't talk about that
not while Jordan is in the room
 
@ssube BTW, the same is true of 3D, or any number of dimensions
 
3:31 PM
> Simulated steps approximating a Wiener process in two dimensions
> a Wiener process
 
A processed wiener
 
I also have to take care of a pending wiener process ASAP
 
@SterlingArcher ever notice how the word bed looks like a bed?
 
heard it :P
imgur.com/gallery/M6GqV top comment killed me
 
!!urban mystery poop
 
3:37 PM
@rlemon Mystery Poop The act of taking a poop, in which you know you pooped, however, there is nothing in the toilet bowl to flush except the bum wipe.
 
I'm like 95% sure it's happened to all of us at once point in life
 
a mystery poop with a no wiper is the epitome of efficiency
It's like it never happened
 
@vaso123 please code — GA ASD 5 mins ago
 
I love this guy
 
youtu.be/SQNtGoM3FVU?t=4m45s I keep watching this video, and everytime, the guitar and basswork at the end are just crazy
 
3:43 PM
@rlemon I love how almost every single thing has been mentioned by numberphile
 
@rlemon Brilliant
 
day or so ago I saw him do the lunchbox video
subbed
 
Awwww noooooooo imgur images now have an ugly boxing thing when you access them directly
Whyyyyy
Huh, I think I got a/b tested
 
waiting for your results in the mail is the worst part of getting tested
 
3:54 PM
Nah, the worst part is them coming up to you and explaining why they won't offer you the position
Or having your boss come up to you and ask you to pack up your things and leave
 
4:05 PM
I always love positive test results
 
@Trasiva That man might feel hurted
 
> Viola, your results are positive Mr. Archer.
 
@FlyingGambit Is that a man?
 
yay free lunch today <3
 
woo free lunch
I get mine tomorrow
 
4:18 PM
@KendallFrey It's a photoshop
Most likely.
 
Nobody lies on the internet
 
is it possible to rest/spread a type in flow?
e.g., type Props = { ...Video, onClick: () => void }
 
4:32 PM
lmfao
 
@SterlingArcher do you save memes from Reddit then repost them later so we don't say "I saw that on reddit"?
 
> if you fold a piece of paper 103 times, the thickness of it will be larger than the observable universe - 93 billion light-years
uh no
 
I post as I sees
 
Whale biologist
 
@William uh why not
 
4:36 PM
Do the math. What is the thickness of a piece of paper?
 
Would all the atoms of a piece of 8.5x11 put in a line even stretch that far?
 
@Luggage 0.1mm
 
0.1mm * 2^103, right?
 
Because I remember hearing a story how all the planets lined up in the Universe wouldn't even reach a lightyear(It is something like that).
 
Yeah but what if you folded the planets first?
 
4:37 PM
@William folding is different than lining up planets
 
But seriously, couldn't you just calculate the amount of atoms in the average piece of paper and figure out how long the atoms would be end-to-end?
 
still a different problem
 
Vap0r has an important point
 
Yeah but I believe that there is no way a folded piece of paper could reach a longer length than that, so it's kind of like an extreme example.
 
100,000 light years in meters: 9.4e20 meters
0.1mm * Math.pow(2, 103): 1.0e27 meters
 
4:39 PM
@Vap0r It couldn't even go beyond a few inches, that's not the point
 
@Vap0r do atoms have a definite boundary?
 
the 20 vs 30 being the important numbers here.
oops, i got the units wrong.
 
@KendallFrey How would it not go beyond a few inches if all the atoms in a regular sheet are 8.5x11?
I would assume it would be at least the area of that divided by say 0.1mm long
 
@Vap0r I don't understand that sentence
oh
 
there, 20 vs 27 orders of magnitude
 
4:40 PM
I'm not talking about atoms, I'm talking about folded paper
 
you can't fold something that many number of times
that is the problem
 
@William Of course not, but the statement is about if you did
 
var delay_func = (function () {
    var timer = 0;
    return function (callback, ms) {
        clearTimeout(timer);
        timer = setTimeout(callback, ms);
    };
})();
 
@William tell that to France
 
@KendallFrey yeah but this is an extreme example. Folded paper couldn't possibly reach the length of all the atoms end-to-end. So if end-to-end isn't that many lightyears long, then how could you say a piece of paper folded 103 times would be?
 
4:41 PM
I'm evaluating that code in our codebase.
 
universe: 9.7e26 meters. paper folded 103 times: 1.0e27 meters
 
@Kasper that could should not be in your database probably
 
Paper wins, just barely
 
But it seems to do the exact same thing as setTimeout
 
@Vap0r Because it's obviously an adaptation based on a model, just a different model than yours
 
4:42 PM
@Vap0r it does the same as setTimeout right? I don't understand, timer is always 0
 
it says "if you fold a piece of paper..." not "if you could fold a piece of paper..." Denifinetly doesn't make any sense
the problem is you can't
 
@William We do have a model of folding paper in which you can do it, and the statement is about what would happen in that model
Obviously the model departs from reality
 
I've come to the conclusion that it's not possible to fold the paper 103 times.
 
In half*
 
@rlemon correct
 
4:56 PM
Well, be specific. Because your statement is wrong
 
And it's not because of any difficulty or force issues. But by the 78th fold you would be trying to fold something smaller than carbon's bond length, and that's assuming you were to take all the atoms on a piece of paper and lay them end to end, and start folding lengthwise
 
You miss the point of the original claim. It's challenging your intuition about how such a thin thing like a piece of paper can get so large with "only" 103 folds.
Of course it's not possible.
 

« first day (2440 days earlier)      last day (2507 days later) »