« first day (2413 days earlier)      last day (2521 days later) » 

1:00 PM
@corvid It's even stricter than you think
myFunc(undefined) would have assets to be undefined inside.
The only accurate way to check would be to examine the argument object and deduce from the length.
Try the babel repl or typescript repl and see how they do it.
Whatever you do, don't search for TS playground.
3
 
just came here to say that I hate Java. bye
 
cool. but this isn't the Java room.
 
@yosefrow Just came here to say your account is a waste of bytes. Bye.
 
BenFortune man, who pissed in your tea? :)
 
@Luggage I don't know, it tasted like piss beforehand
 
1:15 PM
Your tea isn't fit to pollute our harbors.
Which is why we drink it.
 
tea is best served cold.
 
Just like that other thing.. umm.. love. Yes.
 
ice tea?
 
iced tea is delicious
 
Iced coffee is pretty great too
 
1:18 PM
add some cut up lemons and oranges
mmmmm
 
cold brewed coffee, especially.
 
I don't mind iced coffee. but I prefer hot coffee.
 
warm cold press is one of the most delicious things
 
Hi all!
 
I'm sorry, we can't come to the keyboard right now. Please leave a message after the beep
BEEEEEP.
 
1:29 PM
I was wondering, what's the point of defining fields in GraphQL like this
fields: () => ({})
instead of this
fields: {}
?
 
the docs talk about that a bit, they call it a thunk (I remember thunk being something else, but...)
it's so you can delay initialization of the fields, when they depend on something (f.ex, a circular type)
 
BEEEEEP <click>
 
@MikeBoutin Arrow functions
 
Maybe the fields can vary depending on another option? like "showDetails: boolean"?
 
@Luggage Believe it or not Luggage isn't at home please leave a message.. at the beep. I must be out or I'd pick up the phone.. WHERE COULD I BE?! Believe it or not! I'm not home...
 
1:31 PM
@suraj come on, like i don't know what it is...
 
> When two types need to refer to each other, or a type needs to refer to itself in a field, you can use a function expression (aka a closure or a thunk) to supply the fields lazily.
 
@rlemon was that intended to be sung?
 
@Luggage it would work for that, definitely, but I think GraphQL would get very angry at a changing schema.
You could use it to implement feature flags, I guess.
 
Ohh, this is on the schema / server side?
 
If I'm talking about the same thing as OP.
 
I love all of you
 
@rlemon yea, that's what i was thinking of. Not seinfeld, but that song.
@ssube you probably are. I don't know graphql and was just speaking generally.
 
I haven't had any coffee or cookies yet today, so I don't even know what I'm talking about yet.
 
I've had a "cookie".
Also coffee.
 
I can't have a cookie before work I feel like I'd become known as a cookie monster
 
1:35 PM
import cookieParser from 'cookie-parser';
 
ugh, merging changes into my un-released typescript conversion branch
Gotta get this thing released, soon.
 
you should, merges suck
 
Just a bit tedius with some of the renames not detected. git has done quite well, mostly, though
importing changes to a .js file into the renamed .ts file in another branch.
 
nice
 
1:39 PM
@BenFortune is that one of the rainbow Smok tanks?
 
@ssube uwell crown 3
In the process of buying one, but looking for a new mod too
 
Huh. The site I often get my stuff from has the TFV12 on clearance for $25, and I kinda want the rainbow one.
 
Want a good TC mod
 
RX200 :D
 
1:40 PM
I've got a 0.4 SS TC in my Cleito right now and Naked's mango/peach, omg.
 
Dunno whether to get blue or rainbow
 
I'm back on the fruit loops
they didn't have the mango/rasp
 
The mod in that picture is £90, not really prepared to spend that
 
see the guy vaping with the pen/water bottle cap thing?
 
No lol
 
1:42 PM
russia ftw
 
Saw someone build their mod into an altoids tin
 
I've tried a few from that brand, all good
 
dammit, can't find the video
 
@ssube haha called it
 
1:47 PM
haha that's the one
 
omg lol
 
it's a sweet vape, it looks like it works... surprisingly well
way less fire and shouting than I expected
 
Can't get anymore mech than that
 
hahaha
what a nutjob
!!should I buy some new batteries too?
 
1:52 PM
@BenFortune Of course!
 
I've always been curious/afraid of bringing a homeless person home
 
okiedokie
 
@FlorianMargaine Probably CST, as a whole for a majority of our users, they fall plus or minutes an hour or two from there.
 
Hello. Nice to meet you nice folks. Was wondering if you can recommend this redis client ? github.com/luin/ioredis Seems decent and support native promises while the official one doesn't support promises natively. Not really keen to bring in another dependency like bluebird..
 
@C.Astraea Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
xD oh ..
 
Also, you use redis from a server, not browser. And on the server a few extra dependencies are no big deal
You don't need to worry about a small d/l.
By the time they find out, it's too late to leave without being rude.
 
you'd think that
 
when you're hot, you can be rude
 
is that why you're so nice?
 
2:10 PM
when you're hot, you can post dank memes
 
I've found a nice middle ground where I can be ugly and a dick.
 
it's called being intelligent.
 
@ssube True that!
 
@rlemon that tinder fiasco though
 
2:14 PM
@ndugger ?
 
@ndugger lol ends with her in a cop car and the cops giving him back his shit
 
24 mins ago, by rlemon
@ndugger @SterlingArcher https://np.reddit.com/r/Tinder/comments/6d68r3/help_hooked_up_with_this_chick_fr‌​om_tinder_and/
 
girl basically had sex in exchange for a home for 2 days
Kinda feel bad for her, but it's pretty hilarious
 
there's an episode of High Maintenance where that happens
 
Damn that thread is hilarious and spooky at the same time
 
2:17 PM
it's about a bike thin mints delivery man and his adventures
 
sound weird tbh
 
@ndugger and then stole his shit
 
but mostly his mail...
 
Jesus christ, what a shit show.
 
I didn't even know Prorevenge was a sub.
excellent
 
2:26 PM
Is reading javascript the good parts a bad idea seeing how it's from 2008?
 
no
just don't read the bad parts
 
exploringjs.com is probably more complete now
also free :D
 
the good parts is too isn't it?
eh maybe not I prob read it on safaribooksonline or something
 
@rlemon Wow, what a read
 
dunno, I read it in paperback, I think
I was not especially impressed, Crockford is too obsessed with some things that really don't matter
and his aversion to bitwise operators is rather silly
 
2:30 PM
Boker Tov
 
@rlemon I bought them 😐 Going to be vaping MLP style
 
ProRevenge is sucking me in
I need to stop
 
HAMMERTIME!
 
it's like TVTropes
 
2:46 PM
@ssube Thanks for that link ssube
 
@Bryan Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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 I drop babel from my webpack config and go all-typescript this, below, no longer works. I complains about not finding files (that are there).
require('./someDirectory/' + viewName);
 
I guess you need to just use babel and ditch typescript. oh well.
 
webpack won't do calculated requires, mostly
 
Just .js files.
 
2:55 PM
you can tell it to require the entire directory, I think
 
webpack is what IS doing those calculated requires.
 
like it's producing them?
 
It accepts them.
as long as it can tell part of the path.
 
who's throwing the error?
 
require(foo); // no good for webpack
require('./somePath/' + foo); //valid wbpack. will include entire directory
webpack, i think:
WARNING in ./src/client/viewModels/editFacilityNeeds.js
Module build failed: Error: Could not find file: '/Users/dmull/ace/webapp/src/client/viewModels/editFacilityNeeds.js'.
    at getValidSourceFile (/Users/dmull/ace/webapp/node_modules/typescript/lib/typescript.js:86335:23)
    at Object.getEmitOutput (/Users/dmull/ace/webapp/node_modules/typescript/lib/typescript.js:86696:30)
    at getEmit (/Users/dmull/ace/webapp/node_modules/ts-loader/dist/index.js:105:43)
    at Object.loader (/Users/dmull/ace/webapp/node_modules/ts-loader/dist/index.js:27:11)
er. typescript.
.js files were going through babel-only before. And .ts files through awesome-typescript-loader and babel.
Now all ts-loader. Reading their docs.
 
3:01 PM
so, I ran into something similar with gulp once, not sure if it's related: the gulp stream had all my files, but I was doing a gulp.src('./src') or whatever, so they all had relative paths. Somebody else was resolving and attempting to require absolute paths, which accurately did not exist in the inputs (but were totally real files).
the mixed paths in that error made me think of it
 
I think this is because typescipt would normally compile all files, but webpack only makes it require files that are imported.
So, these modules that are only referenced via a calculated require() are being skipped.
 
that makes sense
 
but.. it's only JS files and I have allowJS on...
I may try renaming all these to confirm that it'll work with .ts files, but I really don't want to rename them all, yet and get the errors.
 
: any erything
can you dump filenames for what's in webpack between stages? is that a thing?
 
er.. not sure
 
3:05 PM
@ssube whatcha mean by that?
 
in gulp, there's a .stream(names) thing you can do that will print out the names of the file-streams in the stream-stream, at that point in time (between filters).
so you can see how files are getting dropped/merged/etc
 
there is likely a way, but hopefully i won't need to dig into it that far.
hm.. lemme try awesome-typescript loader alone without babel, too.
 
What if you wrote a plugin? I am not sure of the process of the plugin pipeline
 
no minecraft memes pls
 
hmm.. awesome-typescript loader does not seem to have the problem. I'll just stick with that for now.
 
3:09 PM
Gotcha covered mate, check this out
> Let's write a simple example plugin that generates a new build file called filelist.md; the contents of which will list all of the asset files in our build. This plugin might look something like this:
 
Cool, but I don't wanna write plugins right now. I just want a magic "build" button.
 
Ah okay I only read ssube's comment on listing out the files and remembered I read about that somewhere
 
that didn't make it as fast as I hoped.
1m 30s to build with TS + babel. 1m 20s with just TS
(though, a lot of that time is minimizing and gzipping)
 
tsc is still slow
 
If anyone want to help me with that
1
Q: GraphQL - passing an object of non specific objects as an argument

Mike BoutinI am very new to GraphQL. I'm trying to pass an object like this one as an argument: { filters: { status: 'approved', id: { LESS_THAN: 200 } } } Or this object can be like this either; { filters: { status: ['approved', 'pending'], id: 200 } } I tried to de...

:37292611 i specified it
 
3:29 PM
that kind of unknown structure is exactly what graphql is meant to prevent
 
but the structure is known
that's the point
 
no, you'd have to reflect it out of each response
 
i don't understand
 
it supports polymorphic objects that are known to meet some common contract (an interface and classes that implement it), but a primitive and an object have nothing in common
since you have to specify the fields you want back on an object, the syntax you would need to make that query would necessarily throw if a primitive was returned
i.e., you always have to request the fields, primitives don't have any fields, kaboom
the devs have some really good examples of the various problems in those issues I linked
 
I'm reading it right now!
Thank you very much for your help btw
 
3:35 PM
okay, I need to write a extension that recognizes I'm in a reddit trap and blocks the domain after 1 page of comments.
/r/ProRevenge somehow got me in a thread about doctors talking about things people shoved up their butts
 
@rlemon That's on the FP, it's pretty great
 
@ssube Should i close the question?
 
I don't think so. I haven't found a good Q&A about that on SO yet, so if you want, we can just expand on the answer and try to make it canonical for now. :D
it could be useful for folks to get all those issues in one place
 
Good point! I'm always scared to be downvoted
 
meh
 
3:41 PM
1 person helped is worth more than 4 people thinking you were dense
but not more than 5 people, and less than 6
 
rep is less important once you have enough to see all the juicy deleted content
 
lol
 
if they didn't have that as a rep-barrier, I'd never have made it to 10K+
 
@rlemon Tinder dude came out with update 4. He's gonna do a big update later tonight.
 
nice
 
3:43 PM
I love how switching the "target" in tsc gives you different errors.
Man I love and hate Typescript.
 
!!nudge 290 np.reddit.com/user/Mouthymerc should have an update
 
@rlemon Nudge #1 registered.
 
danke
 
I thought you'd like to keep up to date on that shit show.
 
Is the tinder thing even real
Or is it like that tifu one from a while back
 
3:55 PM
Sorry if this is the wrong place to ask, but I don't really know how to format this question nor has my search come up with anything useful.

I'm currently being destroyed by internet explorer (specifically trying to set a property). My question is: Can I view what the BROWSER is trying to do when running through functions internally?

E.G.
document.body.focus()
what is it doing?
 
@SvenTheSurfer Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
you can't step into native/DOM methods in the debugger, unfortunately
 
@Meredith Pretty sure this is real, he's got a picture of her in his bed, and it matches up from what I can tell with her tinder profile, which gave me red flags just reading it.
 
they should follow the docs, unless you have a browser bug
 
hm, that's what I figured. Thanks!
 
3:58 PM
what version of IE?
 
11. Setting selectionStart on an input element is giving "unspecified error"
 
Code?
 
4:13 PM
@KendallFrey @SterlingArcher woah. Rare sneakers
 
raw
 
Hey guys
 return new Promise(resolve => {
      this.http.post(url,body , options)
        .map(res => res.json)
        .subscribe(data => {
          this.data = data;
          resolve(data);
        });
    });
I am returning a promise
 
You're returning undefined
 
to
this.speech.startListening(options)
  .subscribe(
    (matches: Array<string>) => {
      this.value=matches[0];
     this.translatedValue=this.translate.load(this.value).then(
       (data)=>{
         this.translatedValue=data.translationText;
         console.log(this.translatedValue);
       },
       err=>this.translatedValue=err
     )
    }
    ,
    (onerror) => this.value=onerror
  )
 
Wait nvm youre not
 
4:16 PM
Im returning undefined?
If i try to print the "data.translationText", it prints as [object Promise]
 
it sounds like you're missing a then somewhere
does this question help at all?
 
No he's assigning the promise to that property. Then inside of the then overwrite it.
Sounds to me like you got design stink
 
that is an awful lot of this
 
haha. this is life.
 
4:24 PM
he ded
 
Actually he bearly survived
 
took an arrow to the knee, though
 
That was weird
 
4:41 PM
whats a good word that encompasses both creation and editing?
 
Creaditing
 
hmm,
so im making a component that does this
maybe FooAdmin or FooCreaditing
FooUpsert ?
 
Definitely FooCreaditing
 
gonna go with FooEdit
 
FooCreateAnd/OrEdit
 
4:50 PM
FooCreateOrEdit could work
 
why not break down the logic and have one for each
 
nah
dont want any duplication
 
I feel like I should be able to create a class for the following without using module.exports. Can anyone tell me if this is accurate?
 
module.exports = function(context) {
  return { methods }; // no need to pass context every method call?
}
:squeals: 👏
 
That makes sense. export default couldn't be used in place of module.exports?
 

« first day (2413 days earlier)      last day (2521 days later) »