« first day (2313 days earlier)      last day (2649 days later) » 

9:00 PM
@William Yeah, he gave the URL, but I'm looking at the same page, and not seeing the breakage.
 
doesn't do that in my IE version. What IE version are you using?
 
7
 
7 wtf?
let's test it in IE6 to then
 
plenty of places still run windows ME and IE 7
 
@BenjaminGruenbaum It seems to happen to me only with devtools open
I'll add white-space nowrap to this one
 
9:02 PM
@MadaraUchiha I made it happen by opening devtools (and thus resizing the window), but refreshing with them open didn't do it again
 
Chrome doesn't calculate the width correctly in all cases for some reason
Yeah, I dunno. There's no JS going on in the resizing
Just plain ol' display: inline-block
 
@KendallFrey there isn't any air in space
 
there is in the helmets
 
what OS are you running to run IE7?
 
9:05 PM
Ergh. I got an async problem...
I want all requests in here to be "paused" until the isAuthed flag is set
 
no you don't
well, you can "pause" them before they actually happen
 
How do you do the accessToken / refreshToken / rememberMe token flow then?
 
but you can't "pause" a request once it is requested
 
or are you running a virtual machien
 
typically your data broker (redux, mobx, some service/dao layer) should return an error to the component, which will attempt to auth
 
9:07 PM
@KerbalSpaceP I'm pretty sure that with all that carbon and hydrogen it could work as a low ISP rocket fuel with the right oxidizer.
ever the nerd
 
but in a simpler version, you can have every request promise just wait for an auth promise to resolve
it will only work for the first auth, obviously, because promises
anything else and you're checking auth every time, which brings you back to having some broker
 
@William Rover's ghost?
 
accessToken / refreshToken / rememberMe are all details of a "getToken" step. So, let's just simplify that.
if you are still trying to redirect to a login page when those fail, then I don't see how any of this can work.
 
@MadaraUchiha what OS are you running to run IE7?
 
@William Ubuntu
 
9:14 PM
virtual machine then ahhhh
 
no, IE for Linux
they made IE for Mac, too
it just never caught on
 
nice try
 
IE mac was a long time ago.. like in the 5.5 era, i think.
I don't recall for linux
 
@KendallFrey There was a perfectly executed reddit thread like that about a year back
 
9:16 PM
oh boy
 
Got 29 reddit golds for that 😃
 
user1596138
@MadaraUchiha This is the best rick roll
 
user1596138
Like. I'm not going to watch that. Wtf
 
@Jhawins :P
 
@MadaraUchiha :(
I like the song
but I wanted it to speed up
that would be pretty cool
 
9:34 PM
 
@MadaraUchiha for your last example (with .length) I wouldn't use generics
 
somebody is going to suddenly learn about permgen
 
I'd just take a {length: number} input.
 
@BenjaminGruenbaum Although, would that work for a string?
 
@MadaraUchiha I think it would
 
9:37 PM
@BenjaminGruenbaum Also, what would it return?
You need the generic to maintain type info
 
Oh, if you return it you need a generic, but if you just want the length I'd narrow the type as much as possible.
Or... inference?
 
@BenjaminGruenbaum Yeah, the idea is that you don't lose the type information of the passed type
 
Nope, can't infer, scala does this fine I think.
 
@BenjaminGruenbaum Yeah, inference only goes the other way
 
function foo(x: { length: number }) {
    console.log(x.length);
    return x; // return type is inferred to {length: number}
}
Other languages are able to infer the type in:
function foo(x) {
    return x;
}
TS defaults to any
 
9:42 PM
@BenjaminGruenbaum Yup
 
Sucks on TS's part.
But understandable.
 
It will only infer if you provide the generic
 
that's a design choice, iirc
 
Seems like incorrect behavior to me.
 
to avoid what would otherwise become unpredictable behavior
depending on if the allow implicit any flag is set
 
9:43 PM
The compiler can infer T -> T in the above case.
It could also infer stuff like Partial<T>
 
but you've gone out of your way to not specify, so why should it?
arbitrarily narrowing things is poor behavior
 
@ssube because it can. It's not narrowing at all.
T -> T is the correct type.
any is just inferred because the compiler is lazy.
 
not providing a type is an implicit any
 
Right, that's the bad behavior in a nutshell.
You can avoid specifying the types of variables, but not function return types.
 
narrowing implicit any without any indication would be pretty poor behavior
they had to decide between knowingly doing the wrong thing sometimes (narrowing) or just working with what they have (keeping any)
 
9:46 PM
@ssube there is no narrowing though.
The return type of that function is clearly T -> T and not T -> any. The compiler just can't infer that automatically.
 
because narrowing that function would break things
 
it couldn't possibly infer that without knowing that the function would never ever be called with anything but that T
 
I'm pretty confident most languages with strong-ish types would infer that type correctly. Haskell for sure.
 
which is obviously impossible
where are you getting that T from?
 
9:47 PM
@ssube what? It sees the type of the return statements, it sees the type of the input - it's obviously possible.
@ssube the argument type.
 
it doesn't see the type of the input
 
function iden(t) {
  return t;
}
 
not yet
 
The type of the return and the argument are the same.
And many languages get this right.
 
and the type of the argument is any, because you haven't specified and it can't possibly know
 
9:48 PM
A generic without constraints is effectively an any.
 
// Pop quiz: What does this do?
class Foo {
    constructor() {
        console.log('foo');
    }
}
class Bar extends Foo {
    constructor() {
        super();
        super();
    }
}
new Bar();
 
It could type the argument as T (where T extends any).
@Zirak error, pretty funnily since the second super would run without context.
 
@BenjaminGruenbaum that becomes any
you can't do that in TS, I've accidentally tried many times
 
@BenjaminGruenbaum How many foos?
 
@ssube right, but the return type and argument type info could be preserved.
 
9:49 PM
having any suddenly show up in a type is a good sign you've done something wrong elsewhere
 
@Zirak I want to say two.
@ssube -_-
 
@BenjaminGruenbaum But are you saying two?
 
TS doesn't infer the type, but it's possible to.
 
it's not possible in any meaningful way
 
@Zirak I must meditate and ponder on this.
 
9:50 PM
you would just end up with any again
 
@ssube dude, many languages do this. You assign to every type you don't know some generic value and then narrow things until you have all the constraints in place with unification.
 
@BenjaminGruenbaum do
 
@Zirak two
 
@BenjaminGruenbaum Did you run it? :D
 
No, was I wrong?
 
9:51 PM
@BenjaminGruenbaum yeah, languages like scala that take forever to compile because they're stuck in a loop of inferring more and more things, and you end up with non-deterministic compiles.
 
@BenjaminGruenbaum you're right
 
That's not a better option than the naive but never actually wrong choice of retaining the any when you don't know.
 
I think there's a "bug" in the spec, but I don't know if it's a bug of not
 
@ssube TS does this too, and it's not nondeterministic.
Unification is guaranteed to finish.
 
tc39.github.io/ecma262/… look at the 3rd clause
 
9:52 PM
@Zirak I'm not sure about the two. Is this cross-browser consistent?
 
First Construct is called, then BindThisValue. Inside the latter, if this is already bound it throws an error
 
not not not nondeterministic
 
scala's inference is not guaranteed to spit out the same thing every time
 
so, I signed up for a 5min thing, but look like my talk is over 10mins...
 
@BenjaminGruenbaum It's as specified
 
9:53 PM
@ssube waaa?
That sounds crazy.
 
@ssube right, neither does Java, but have you actually seen what you need to do to get non deterministic behavior? It's a fairy land edge case in which the type system is used to simulate the (not that) PCP problem
 
@Luggage any change to the order modules get picked up can change which operators get used, since it works its way down so many layers
@BenjaminGruenbaum I have seen it
I've debugged it
 
Yeah, I'm going to take a step back now.
 
the Scala compiler's choice of operators, when it has to go through a few coercions, gets really ugly
 
aaww someone found out first github.com/tc39/ecma262/pull/762
>:(
 
9:55 PM
the devs at my last place loved to rely on implicit conversions to get the right operator and, while definitely 100% horrible code, it exposed almost every compiler bug there was :)
 
I feel like complaining. Would this be the appropriate channel for that?
 
what do you want to complain about?
 
Well this fancy new UI
Does look good though
 
what are your complaints?
I had a few complaints with it, but they were fixable with adblock and robogist
 
wtf is this Chime, AWS. Why do we need another Skype?
 
10:15 PM
The SO main interface has changed!
I DON'T LIKE CHANGE!
 
is there an accepted universal symbol/image for codegolf?
 
@monners disable fixed navigation and it isn't to bad
 
@towc there was but they wanted a shorter one
 
^
 
!!giphy slow clap
 
:D
 
actually though
 
nah
 
hmm
 
unicode probably has a golf character though
codegolf is not very long
 
10:22 PM
a string of text?
 
well, you can use ligatures
 
is brainfuck commonly associated with codegolf?
cjam?
but noone recognizes cjam
 
people golf every language, all the shell scripting ones are popular
 
sure
 
so I don't think any one language is very strongly associated, besides golfscript
 
10:24 PM
but is there a piece of text (or something) you'd look at to tell you "yup, that's codegolf"
 
almost any perl :)
helpful answer: no, not really
 
unacceptable
and thanks
 
the best these folks could do was IOCCC
 
var environment = "dev";
var build = function(requestedEnvironment) {
environment = requestedEnvironment;
if (environment == "dev")
{
runSequence('checkSyntax', 'compileCSS', 'createIndex');
}
else if (environment == "prod")
{
runSequence('checkSyntax', 'compileJS', 'compileCSS', 'createIndex', 'watch');
}
}
gulp.task('default', build("dev"));
gulp.task('dev', build("dev"));
gulp.task('development', build("dev"));
gulp.task('prod', build("prod"));
gulp.task('production', build("prod"));
gulp.task('deploy', build("prod"));
Any idea why this snippet from my Gulp file is running all 6 tasks?!
 
because you didn't indent it and you're using pseudoglobals
get rid of the environment variable, it's complicating (that snippet of) your code
 
10:32 PM
It's indented...I just don't know how to format it on chat.
 
select it and hit ctrl+K
 
you are calling runSequence() each time you call build().
 
or indent each line by 4 extra spaces
the way you're taking requestedEnvironment and just blindly setting environment makes environment meaningless
 
@Luggage & @ssube I don't want to run build() multiple times.
 
build() should return a new function
 
10:33 PM
Just once.
 
just use the parameter all the way through
 
then don't call it 6 times?
 
@ssube I need it to be global because some of the other tasks depend on it for which build directory to place the result in, etc.
 
you can simplify your tasks, as well, by replacing build with simple dependencies
 
I don't know why it's being called 6 times.
 
10:34 PM
You are calling it 6 times.
 
gulp.task('default', ['dev']) and gulp.task('dev', () => build('dev'))
 
I see build() 6 times in your code
and NOT inside a task
 
It should only be called if that task name is called, yes?
 
not the way you've written it
it gets called when gulp loads
 
No, you call it, then pass the RESULT to a task
 
10:34 PM
Ahhh...
 
you want to call it later, like task(name, () => fn())
 
Then I'm at a loss here. I couldn't find a way to get the requested by the CLI and I need that for the conditions.
 
task(name, fn()) makes a task that will do whatever fn just returned
 
the task requested*
 
you aren't returning anything, you're runSequence-ing the other tasks right away
 
10:36 PM
I see.
 
you probably need to pass done down the chain, as well
so you want function build(env, done) { ... } and gulp.task('dev', (done) => build('dev', done))
if (env === "dev")
{
  runSequence('checkSyntax', 'compileCSS', 'createIndex', done);
if I remember the runSequence API correctly
 
var environment = "dev";
var build  = function(requestedEnvironment) {
  environment = requestedEnvironment;
  if (environment == "dev")
  {
    return function() {
      runSequence('checkSyntax', 'compileCSS', 'createIndex');
    }
  }
  else if (environment == "prod")
  {
    return function() {
      runSequence('checkSyntax', 'compileJS', 'compileCSS', 'createIndex', 'watch');
    }
  }
}
gulp.task('default', build("dev"));
gulp.task('dev', build("dev"));
gulp.task('development', build("dev"));
 
^^ all that
 
Can I just do that?
 
I think you still need to pass done
but that is much better
 
10:37 PM
yea, but add the done argument
 
What is done?
 
a function gulp gives you to call when the task is finished
 
the callback to call when it's done that task.
 
it's a call back in the most literal "hey, I'm done" sense
 
do all your tasks actually do the exact same thing like the code you pasted?
 
10:39 PM
hi'
 
@Luggage What do you mean?
 
ohh, are you just trying to make a bunch of aliases for your tasks?
 
@Luggage, no. Based on the environment variable they put files in different places, or do things slightly differently. For instance, createIndex adds paths and versions for all the JS files for dev, but just a compiled version for prod.
@Luggage, yeah. Aliases.
 
That's smelly.
 
Well, and set the environment.
What part?
 
10:42 PM
the fact that you need "gulp dev" and "gulp development" to both do the same thing
 
7 mins ago, by ssube
gulp.task('default', ['dev']) and gulp.task('dev', () => build('dev'))
 
People still use gulp?
 
@monners What do YOU use?
 
not everyone moved onto whatever you prefer this week
 
if you want aliases, you can just use dependencies and make it very clear
 
10:42 PM
@Luggage Slow Clap
 
@Allenph webpack, naturally
 
gulp isn't bad until you have complicated workflows
then make becomes the only option
 
Ehhh.
 
is that your real full gulpfile?
 
gulp.task('dev', () => build('dev'))
I do not understand that part at all.
@Luggage, no. There's a bunch of tasks that runSequence is running.
 
10:44 PM
do you understand this? :
gulp.task('dev', function() { build('dev'); });
 
Mhm.
 
same thing
 
Ahhh.
 
you're repeating that construct a lot
 
go fix up the missing 'done' callback, then I'll help you clean it up some more.
 
10:46 PM
Is there a easy way to pass props from one component to another..that isn't a child of the parent owning the state
?
 
you could create each environment-function once or you could use dependencies between tasks (and create it once)
@BrianJ mobx
 
Sorry. I'm mostly PHP.
And front-end.
But mostly PHP.
 
And front-end
 
@ssube I'm already using a setup where I call an action that calls a reducer and sets the state there. But listening for that reducer in another component the value isn't propogated
 
gulp.task('development', ...); //the real task
gulp.task('dev', ['development']); // an alias, for some ungodly reason
 
10:48 PM
eh..think I need to look over this again
 
@BrianJ pushing things across components is the whole point of redux and mobx and friends, so that sounds more like a simple bug
something isn't wired up right or isn't firing
 
mobx doesn't magically solve that he's trying to use state without a common parent managing it
 
yeah that's the catch right there
 
@Luggage I'm missing to point of the done() callback here. Reading about it now...
 
@Allenph you are literally calling gulp back and saying you're done
figuratively
 
@ssube there's always this:
 
@ssube Literally figuratively, huh?
 
@Allenph literally but not physically
 
But who cares if I'm done?
Oh...runSequence is not doing this in order and that's why, huh?
 
gulp, since it wouldn't know otherwise
runSequence does work in order, but each task still needs to do some I/O (which is async) and calls back when it's done
so then runSequence, after each of those has finished, has to call back itself
which you're in charge of passing up to gulp
 
10:55 PM
So, new problem.
 
running through the reducer and action here I can see that the correct values are being passed as far as the reducer.
 
Because that is getting called 6 times, environment is always whatever the last run said it was.
 
Seems to be a problem with how I'm listening for that reducer value in the other component
 
can you use a blueray as a boot cd?
 
var environment = "dev";
//Sequence for development and aliases.
gulp.task('development', function() {
  environment = "dev";
  runSequence('checkSyntax', 'compileCSS', 'createIndex', 'copyJavascript', 'copyImages');
});
gulp.task('default', ['development']);
gulp.task('dev', ['development']);

//Sequence for production and aliases.
gulp.task('production', function() {
  environment = "prod";
  runSequence('checkSyntax', 'compileJS', 'compileCSS', 'createIndex', 'copyImages', 'watch');
});
gulp.task('prod', ['production'];
That better?
 
11:06 PM
you gave up on trying to use the callback?
 
@Luggage Don't really need to.
 
checkSyntax, compileJS, etc all need the callback for runSequence to operate properly
you mean you don't see a problem, yet
 
@Luggage Good point. But really the whole reason for callbacks was aliases.
If I can just add aliases that way...then...
 
not really
the callbacks are so gulp doesn't exit early
add a few dozen more files and suddenly it will quit after running 3, because it doesn't know when the task is done
 
@ssube I wasn't talking about done.
I was talking about my environment and aliases issue.
 
11:08 PM
you don't NEED a ground wire on your refrigerator either, until you do
skipping it because it seems to work is a bad reason
 
@Luggage, I don't see any reason to use my original build() callback.
 
that wasn't a callback
 
The done() callback, yes. At least as far as I understand, which isn't very far.
@Luggage You're right. My fault. That was the source of the confusion.
 
you might be able to just return the result of runSequence.
not sure. I am using the callback on mine, not returning..
 
I feel like I've done both, but the callback is probably better
 
11:10 PM
the example at npmjs.com/package/run-sequence shows callback
 
Can it just be named anything?
I'm having a hard time seeing where the magic happens.
 
yea
it's not magic, it's wiring.
 
done is just convention, but it has to be the second(/last?) parameter
or only, for a task
 
@Luggage Sure. I wasn't saying it wasn't logical.
It was just a joke. Haha.
Can I just return the stream?
 
1 min ago, by Luggage
the example at https://www.npmjs.com/package/run-sequence shows callback
so unless you know better thwn the author, or want to read more into the docs, just use the callback
 
11:13 PM
well I feel like a right turnip..the error with reducer was due to importing the wrong one for both
import displayAssetManagementTable from './displayAssetManagementTable';
import updateAssetManagementStatus from './displayAssetManagementTable';
should be
 
or don't. I'm done() trying to get you to use your tools correctly.
go cut your hand off
 
import displayAssetManagementTable from './displayAssetManagementTable';
import updateAssetManagementStatus from './updateAssetManagementStatus ';
 
var environment = "dev";
//Sequence for development and aliases.
gulp.task('development', function(done) {
  environment = "dev";
  runSequence('checkSyntax', 'compileCSS', 'createIndex', 'copyJavascript', 'copyImages', done());
});
gulp.task('default', ['development']);
gulp.task('dev', ['development']);

//Sequence for production and aliases.
gulp.task('production', function(done) {
  environment = "prod";
  runSequence('checkSyntax', 'compileJS', 'compileCSS', 'createIndex', 'copyImages', 'watch', done());
 
@Allenph you don't call the callback, you pass the callback
 
Then just return the stream for each task in runSequence() yeah?
 
11:14 PM
runSequence('checkSyntax', 'compileJS', 'compileCSS', 'createIndex', 'copyImages', 'watch', done);
 
I'm not saying I"m not going to use it, I just want to understand it.
 
drop the () on done.
Sorry.
yea, returning a stream is usually what you do instead of a callback in gulp
 
I just made all the changes. It finally does what I expect it to.
And it seems to not bog down my CPU nearly as much.
@NathanJones & @Luggage & @ssube Thanks. This was driving me nuts.
 
Yarr! It's drivin' me nuts!
 
@Allenph this might be useful if you're unsure when to return a stream vs when to use a callback (like done): stackoverflow.com/a/33419479/690573
 
11:22 PM
 
11:38 PM
in PHP, 9 hours ago, by NikiC
basically Github and StackOverflow swapped headers?
Sounds about right
 
I swear they coordinated this swap
 

« first day (2313 days earlier)      last day (2649 days later) »