« first day (2489 days earlier)      last day (2457 days later) » 

12:00 AM
does anyone have any experience with uploading a node js project, i tried heroku and couldnt do it
 
did you try surge
 
it seemed more complicated than heroku but ill give that a go
have u used it before?
 
Anyone got any thoughts on how to fix this ^
 
what about the challenge, aren't we all supposed to give the winner a gift card
@rlemon @monners @Trasiva @SterlingArcher @BadgerCat @others
 
@Mosho yeah. who's the winner? What happens now?
 
12:13 AM
I guess we can vote
 
Heh, I've actually put on weight since the end, but not fat ;)
 
should be your last record before/on the end date
 
@Hans1984 surge isnt working either :/
 
there's a mcd right next to the gym
it has become my postworkout :\
 
@RachelDockter I deployed a very simple app there as a test. It was very easy to do.
 
12:19 AM
i tried and it said it was published but when i go to the page it says 404 not found. i tried searched and found it was because i dont have an index.html page but mine is in the public directory
and i cant find how to make that the go to page
 
oh
yeah I was following a tutorial and it all worked for me
 
was the directory u was in cmd containing a index.html? or was it in a sub directory
 
alright ill give this a watch thanks
 
@phenomnomnominal
foo<Bar>({
    baz: "9",
    bot: "9"
})
you defined it as string, then gave it a number. Also you were missing a comma
 
12:23 AM
I don't understand why people wrap their entire applications in this:
(function(){})()
especially in a page with 1 JS file
 
what is the point of that
 
It allows you to keep variables scoped to the file, instead of being global.
 
"name spacing"
its pointless
 
ah
i suppose i can see some people feeling it is necessary
 
it ensures (somewhat) that you're not conflicting with other scripts on the page.
 
12:24 AM
protecting global is not pointless.
 
namespacing is useful in c#
im too noobish at js to comment
 
there is a reason that people grow to prefer that strictness over time.
as opposed to all the veterans saying "use more globals"
 
globals = avoid
local variables = love
don't look at me
 
"especially in a page with 1 JS file"
 
@Tobiq future proof.
 
12:26 AM
@Mosho I know, I was just commenting. My official record is already in the spreadsheet
 
The "one file" scenario is such a rare case, imo.
 
s/commenting/bragging
jk, look hot, would hit
 
Well, of course! I put a lot of work into dat ass :P
 
337 days on this one character
 
@Luggage enter webpack
 
12:30 AM
Is it a troll-link in this answer When to use IMG vs. CSS background-image??, (Pragmatic uses of IMG, link 5. improve performance of animations over a background.)
 
more likely just a domain that wasn't renewed
 
I hate those
 
In typescript is there a way to do a typeof on a type parameter? Something like this:
class Friends {
    test: string;
}

class Animal<TFriends> {
    friends: typeof TFriends;
}

class Lion extends Animal<Friends> {
    friends = Friends;
}
 
in that facebook On This Day thing I see all these links I shared over the years and would like to re-read and half of them are gone :(
 
@joshhunt no need for typeof
TFriends is the type
 
12:33 AM
someone should edit it and remove it
someone
 
lol, so may I edit it?
 
If I remove typeof then it doesn't let me assign the class to friends, it expects an instance I think
 
question is locked :/
 
@joshhunt oh I see
 
has to be a mod
hmm. mayb eyou just don thave nuf rep
 
12:35 AM
Ok I'll flag it~
 
@Luggage nah that's my point
 
already edited
 
sorry, it wasn't clear
 
Oops, did flag it.
 
a recursive partial defined like that will not break when given an invalid function or array argument
 
12:37 AM
Thank you btw:)
 
ohh. i see.
 
foo<Bar>({
    baz: 'foo' // works
})

foo<Bar>({
    baz: 9 // fails, correctly
})

foo<Bar>({
    bot: () => 'foo' // works
})

foo<Bar>({
    bot: () => 9 // works, incorrectly
})
The fix is:
type RecursivePartial<T> = {
    [P in keyof T]?: T[P] & RecursivePartial<T[P]>
}
 
@joshhunt
class Friends {
    test: string;
}

interface FriendsClass {
    new(): Friends;
}

class Animal<TFriends> {
    friends: TFriends;
}

class Lion extends Animal<FriendsClass> {
    friends = Friends;
}
 
I see.
 
@joshhunt I have a better idea
 
12:40 AM
damn, nope, that "fix" breaks the recursiveness
 
class Friends {
    test: string;
}

class Animal<TFriends> {
    friends: {new(): TFriends};
}

class Lion extends Animal<Friends> {
    friends = Friends;
}
 
my employer blocks that, says its a parked domain
 
1:01 AM
all i see is japanese and a whole lot of scantily dressed girls
probably is a parked domain when someone forgot to renew their dns lol
 
:(
 
@Mosho sorry got distracted, just looking now
 
I hate my job. How dare they block the scantily clad girls
 
"work from home"
 
guys, its non related question to js. Does anyone of you know how can I create a script that detects the ip of the user that access the file server?
or is it possible?
 
1:06 AM
how are the files shared?
 
works perfectly, thanks! Creative solution
 
@hsimah through windows
 
oh like a network drive?
 
@derp yes!
 
you can do better than just an ip address cant you?
like a network login or something
 
1:08 AM
@EarvinNillCastillo check the event log, I believe connections are logged there. You could write a powershell cmdlet to query the event log and note down the connection details.
 
something something ldap
 
maybe this?
https://support.microsoft.com/en-gb/help/310399/how-to-audit-user-access-of-files--folders--and-printers-in-windows-xp
 
@derp yup it already have a network login. I just wanted to be cautious, what if something in my dept, messed up with the existing program. Idk just for precaution
 
nah it makes sense to trust...but verify
 
1:12 AM
@derp trust issues
lol
Thanks @derp and @hsimah!
 
1:38 AM
is passport.js the defacto auth library for node?
trying to get a bit of node into my life
 
you should use auth0
because shrek is love, shrek is life
 
I would like to use multer with express to upload files
app.post('/profile', upload.single('avatar'), function (req, res, next) {
  // req.file is the `avatar` file
  // req.body will hold the text fields, if there were any
})
this is the sample, is there any way to move the upload.single() to another class? I have all my upload stuff in one js file and want to call it from there, but when I try it my req and res are empty :(
my guess is I need to read more
I figured it out by reading further into the sample documents. RTFM people.
 
@david nah this is more a learning exercise than a "push something out the door" exercise
wait is auth0 doing the same thing as passport.js?
 
When is it OK to move code from JS into GLSL?
drawing circles fast AF now, with this line
vec2 dist = 2.0 * gl_PointCoord - 1.0;
if (dot(dist, dist) > 1.0) discard;
 
1:55 AM
@Mosho I vote monners
also he got the badger vote
 
put it in the spreadsheet please
 
and yes, he does deserve a giftcard from all entered
or the winner*
do you have the link handy? i lost it
 
also, could you pin a message to vote
 
1:57 AM
> 6/12/2017 fat
@Mosho what happened June 12th ._.
 
I gained weight
 
like you did any better :|
 
what was the goal? weight loss?
 
All involved in the weight loss contest: please vote on the sexiest winner.
5
@Mosho yeah I pooched the contest. Im eating well now, and starting fresh in general.
I lost 3lbs lol
 
1:58 AM
yeah I'm gonna try again soon also
 
Do you have a fitbit?
 
I had one
 
I'm wearing mine again, and challenges would be fun on there
 
might be a good idea
I think I will do better after the semester is over
going back to school is not fun
which I negated with stuffing myself
 
I don't blame you bro. I'm taking the free time of being newly single and doing good stuff with it
 
2:00 AM
a fun activity by all accounts
 
Cleaning more, cooking more, and gonna use the extra time to workout more
I'm turning a 6th leaf
 
can someone explain isomorphic concept to me? I've been reading couple of articles but cant fully get it
 
I don't know that expression
 
what doesit mean to share client / server code towards one single api
 
"I'm turning a new leaf" meaning you're basically starting fresh the right way
 
2:01 AM
@Ming use the same code that renders your app in the browser on the server to generate markup for the client code to "start" with
 
Except I've been off and on the gym like 6 times
 
@SterlingArcher yeah that one I know
I was confused by 6th :P
@Ming so when you go to a page, the server responds with a page that looks like the page that would be rendered in the browser, but none of the functionality works, until the js runs in the browser
 
error: insufficient permission for adding an object to repository database .git/objects
What the hell keeps messing up my repo
 
taking it a step further is having the server itself call the API the client would call and render using that data
 
I never mess with permissions on it
 
2:03 AM
it's a little trickier due to caching
just rendering the common, static parts like header etc. is easy enough and gives most of the benefit imo
 
@SterlingArcher How do we vote?
 
@monners idk type something :P
 
inb4 everyone votes for themselves :P
 
you obviously can't
smartass
 
@Mosho So sassy today! did I wrong you in a life when we were both cats?
 
2:07 AM
s/smart//
2.9
 
2:22 AM
=100-((REGEXEXTRACT(C11, "[0-9]*\.[0-9]+")/REGEXEXTRACT(C2, "[0-9]*\.[0-9]+"))*100)
suck it google sheets
 
Oh, it was you who has been removing my insightful comments.
 
you made the comment on my calculation line :D
dic
 
badgercat didnt lose much weight
though they didnt have much to begin with
depends on their height I suppose
 
that's why i calculated % weight lost
so 100lbs lost 10lbs is 10% lost, where as 200lbs and 10lbs lost is 5%
 
I wonder what I weigh in pounds
165lbs
 
2:27 AM
u smol
 
google tells me I weigh as much as this 6 year old youtube.com/watch?v=yA-QRk_8u_M
 
i'm 92lbs apparently
 
how tall are you
 
165cm
 
2:28 AM
My brother's 5'1 wife is like 100lbs
 
I'm 184cm/6'
 
6 feet is 182.8cm
 
@Mosho yeah rounding errors
 
190.5cm here
@Cauterite are you a woman? Even for a woman of that height that's... still pretty under weight
For a guy it's even worse
 
no i'm a guy, but yes i'm pretty thin
 
2:30 AM
what do you weigh in kg
 
Can you even bench press 2 marshmallows
 
@Mosho 42kg
 
wat
 
for the love of god eat a sandwich bro
 
when I was 18 I was 182.8cm/6' and 58kg/127lbs
 
2:30 AM
oh my god this is that body shaming thing the internet warned me about
 
couldnt put on weight to save my life. for 6 months I ate two bacon deluxe burgers from burger king for lunch
 
I made buffalo chicken and mac and cheese for dinner
 
in my mid twenties the alcohol and junk food caught up to me and I got fat
 
wtb mac & cheese
 
I was super fat in high school. Comparatively, even with my fluff I'm much fitter and skinnier
270lbs leaving high school, left college 175lbs, then put on 40lbs o muscle
 
2:32 AM
if I ever had a kid, the one thing I would make sure is that he/she isn't fat in high school
 
would he/she be genetically predisposed to be overweight?
 
so much that
@Cauterite that sounds like some crap tbh
Can people even get fat from a proper nutrition and being active
 
it's not crap, but being at a disadvantage genetically doesn't mean you have to be fat
just gotta work a little harder
 
@SterlingArcher well i'm inactive and eat loads of sugar/fat, yet i don't put on weight, so the opposite could happen for other people right?
 
@Cauterite what the fuck
I'm 132
 
2:35 AM
yeah, and the damage done to self esteem etc by being fat as a teenager stays with you
 
Even if my kid is a nerd, I'm going to make sure they are active enough to not become a neckbeard
 
my hypothetical kid will be a buff nerd
who protects other skinny nerds
 
yeah, instilling a healthy active lifestyle is important. if i had just kept running or riding or going to the gym as a kid/teen id have been much healthier
 
@hsimah yes, but at the same time, losing that weight.. MASSIVE confidence boost
 
@Mosho give him a superhero name
 
2:37 AM
I try with my son, but his mother is a drinker and smoker and so he gets some bad influence there
they drive everywhere too, even though they live in a great area for kids to ride bikes
oh well
dont be a fool, wrap your tool. all i can say on that.
 
@hsimah still better than liking internet explorer
 
I'm 167 and she's 173.
fuck
 
@Mosho I really like Internet Explorer
 
worst influence in a kid's life tbh
I just remembered I have a giant burrito in the fridge
hold on I'll take a picture
 
2:39 AM
please dont, i eat when im bored
so im replacing being bored with vodka
ive been super drunk lately
 
do you mix it
 
Yeah, with some sprite/tonic and lime
 
gotta watch that sugar intake with the mixers
 
"from these ultrasounds we can already tell your unborn child has a predisposed affinity for Internet Explorer. i'm sorry, there's nothing we can do to save him with current medical technology …"
 
i do vodka, lime juice and soda water now
 
2:41 AM
Yeah, I try to avoid sugary mixers. Sprite is.. ok. I'm trying to learn to enjoy just tonic
 
indian tonic water still has a load of sugar in it
 
But i figure sprite is still better than beer calories
 
i was shocked, since it's bitter af
 
so im not worried
 
 
2:41 AM
@SterlingArcher you could always try Sprite Zero
 
@SterlingArcher look at it
 
Dude, nice backsplash on the stove
 
Dude, nice burrito
 
is it made of lego?
 
vodka still has a bunch of calories in it though
alcohol in general i think?
beer is especially bad
tea?
 
2:44 AM
water
 
Just watch a few macros and you're fine
sodium, bad fats, etc
 
I drink water and cups of tea
and occasionally a vodka, but I am an asshole when I drink
 
I'm either quiet, or dumb af when i drink
 
i shout, say offensive things and piss everywhere
 
ah, my tequila nights
 
2:48 AM
i can't feel my fingers or toes
after drinking
 
How to make this better?:
function calcFPS(opts){
    var requestFrame = window.requestAnimationFrame ||
        window.webkitRequestAnimationFrame ||
        window.mozRequestAnimationFrame;
    if (!requestFrame) return true; // Check if "true" is returned; pick default or error
    function checker(){
        if (index--) requestFrame(checker);
        else {
            // var result = 3*Math.round(count*1000/3/(performance.now()-start));
            var result = count*1000/(performance.now()- start);
            if (typeof opts.callback === "function") opts.callback(result);
 
@SterlingArcher What do you mean "when I drink"
<3
 
when is he ever quiet
 
never mostly
i dont shut up, except at work
 
3:00 AM
can you still test JS in here?
 
well i guess that's no surprise if your role-model is Archer
 
>> console.log(1);
 
!!> console.log(foo)
 
@Cauterite "undefined" Logged: "foo"
 
!!> (function (a){function b(){if(f--)c(b);else{var e=3*Math.round(1E3*d/3/(performance.now()-g));"function"===typeof a.callback&&a.callback(e);console.log("Calculated: "+e+" frames per second")}}var c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRe‌​questAnimationFrame;if(!c)return!0;a||(a={});var d=a.count||60,f=d,g=performance.now();b()})()
 
3:03 AM
@Tobiq "ReferenceError: window is not defined"
 
shrekt
!!> 10 * 10
 
@Tobiq 100
 
!!> self
 
wow youre smart
 
@littlepootis TypeError: cyclic object value
 
3:04 AM
when did javascript incorporate self?
is it an automatically generated closure for "this"
I was wondering where self was declared in a piece of code
 
oh its just the window
 
the difference is that it's available in worker threads too
 
Yeah I read; I quit using workers because I couldn't access my variables, should'a read some docs...
 
i don't think you'd be able to share variables with threads through self in any case
you have to use message passing
 
3:13 AM
that is correct
 
lol what movie is that from?
 
Billy Madison!
 
ah, a comedy classic
 
vague recollection
 
3:18 AM
the bus driver
 
Do you need to be smart to play Factories
Factorio
 
why don't you give it a try and find out for yourself
 
Um, it costs a lot.. it's a lot for me
 
3:22 AM
@Abhi ^ the demo option is a bit hidden
 
not sure "hidden" is the right word
 
OK..
 
You know, SimpleSchema really doesn't make things simple in mongo
It's actually hard to select a dynamic collection with it
db.collection(var).find() is no longer relevant :(
 
they'd have a hard time selling it if they named it "ComplexSchema"
 
lol
 
3:31 AM
unless they included the subtitle Enterprise Edition
 
What's the point of schemas with nosql anyways? Easier validation?
I can understand that since we're doing geospatial queries and indexing but at the same time.. is it worth it?
 
maybe the data can be stored more compactly if it all conforms to the schema
 
I guess maybe, it is terabytes of data
 
i don't know much about database implementations
 
sigh, this dude on my team is a moron
I updated one of our windows services to use a Timer and AutoEvent instead of Thread.Sleep()
his task is to update all the other services to use that, too
he can't do it. it's like, mate, look at what I did and then copy it.
 
3:42 AM
truth
 
lol
 
especially true in Rainbow Six, since you shoot your teammates' feet to injure then heal them, restoring them to 50 health
 
4:00 AM
@mosho @SterlingArcher Hmmm, not many people uploaded proof of their final weigh-in
 
 
2 hours later…
5:50 AM
Hey, so if I have an array with separate arrays inside that which all hold the same amount of objects how do I merge all the first objects into one object with all the properties inside an array?
I'm rather stuck but I've tried to use multiple maps, which has really set me back sadly..
result.map((el) => {
                return el.map((_el) => {
                    return {};
                });
            });
[ [{},{}], [{},{}], [{},{}], [{},{}], [{},{}] ] < this is an illustration of what I have.
 

« first day (2489 days earlier)      last day (2457 days later) »