« first day (2441 days earlier)      last day (2505 days later) » 

nuh uh, their website loaded
 
maybe for you
 
@BenFortune repost
2 hours ago, by Kendall Frey
user image
is this what it feels like to comment "first"
 
I searched and everything, fuck your image
 
(function(x, f = () => x) {
  var x;
  var y = x;
  x = 2;
  return [x, y, f()];
})(1)
why is the ansewer
answer*
2,1,1
 
8:11 PM
@rlemon heh
 
@DenizR. did you check SO like I recommended yesterday when you asked
 
12 messages moved to Trash can
 
I don't think he did
Where's my pitchfork?
 
@Loktar nothing to see here, move along now
 
;)
hey hey sale loaded
 
8:16 PM
I'm waiting till later tonight
don't wanna spend 9 minutes waiting for the checkout to load
 
In case there are reactjs folks here: stackoverflow.com/questions/44708518/…, help appreciated.
 
hmm why was the answer deleted?
your binding seems all out of whack with .that
 
because it's a lambda
 
ah I didn't even pay full attention the that threw me off
made me think i was in 2013 all over again
 
8:21 PM
@rlemon I couldn't find anything on the SO
 
That answer just then, what
 
but as far as I understand, this is about scoping
 
really? because scope in js is explained over and over on SO
 
the global scope, the function scope and the parameter scope, right'
 
just go on main and type into the search [javascript] + scope
 
8:22 PM
So in:
(function(x, f = () => x) {
  var x;
  var y = x;
  x = 2;
  return [x, y, f()];
})(1)
 
go to the highest voted question
read the answers
 
(1) is the function scope, hence the output
2,1,1
Sorry, I wasn't clear before, there isn't anything on this particular code..
but I did find a lot about scoping, mate :)
 
like I said yesterday, it's a semi large topic, you'll get much better answers and examples if you look at one of the better voted questions on main
if you found information on scoping you can probably explain what's going on with that snippet, or at the very least attempt to and then people will correct your assumptions
 
I just did.. above ^:)
 
(1) isn't a scope
it's a parameter
 
8:24 PM
scope is hard b/c what is scope
 
@TylerH baby don't hurt me
 
@TylerH a mouthwash
 
no more
 
what I meant was, 1 is in the parameter scope
 
It's a 9 on the mohs scale of hardness
 
8:25 PM
medal of honor?
 
I would actually not have been able to guess correctly the output of that 0.o
 
10 being full sail?
 
I guess noone is surprised
but
 
2012
A: What is the scope of variables in JavaScript?

TriptychI think about the best I can do is give you a bunch of examples to study. Javascript programmers are practically ranked by how well they understand scope. It can at times be quite counter-intuitive. A globally-scoped variable var a = 1; // global scope function one() { alert(a); // alerts '...

 
@BenFortune the university?
 
8:25 PM
just read this
 
I will, thanks.
 
LOL
 
@rlemon yeah fuck win10
 
8:26 PM
countdown to goodness
I love win 10
update your damn shit and you wont get stupid warnings/popups
 
@rlemon looooooooool
 
@BenFortune, thank you.
 
Also I highly recommend buying that game
 
people who don't update their software are honestly worse than fascists
 
@Loktar how about we shouldn't have to get stupid warnings/popups to begin with :-(
 
8:27 PM
How about you update your software so we don't have shitty IE problems all over again
Be a responsible owner of technology
 
OK well XP is scary but I will update to it next week OK?
 
fun fact they are still releasing security updates for xp
I think they just did last week lol
 
only those wannacry things
 
Only because of the monumental fuck up
 
iirc it was more than that
 
8:28 PM
When win10 released there wasn't drivers for my Mobo. So I had to downgrade back to 7. Next PC I'll go with ten.
 
!!afk planetside
 
@rlemon I've used 7 and 8 drivers with 10, worked fine
 
Mine didn't. Error saying invalid windows version.
 
I jumped off of 7 as soon as I could
idk why but I hated 7
 
Same, vista was great
 
8:30 PM
I don't mind windows 7. It's only for gaming and youtube
so I'm not really using too many features
 
3.99 for shadow of mordor
if you don't have it you should totally get it
that game is great.. and $4 is like a Mocha
 
or two xl tims
 
I need to give TIMMAYS another shot lol
went there once when we moved back was like eh no thanks
 
tims in the states isn't the same
 
user1596138
Omg those google translate videos
 
user1596138
8:40 PM
> I am afraid I'm having a shit me shove shoulder shit - くそくそくそくそくそくそくそくそくそくそくそくそくそくそくそく
 
it's close, but there is a def flavour difference
 
prob more corn syrup here or something
or some lard injected into it
 
probably just different regulations on what is an acceptable additive
just like most of the stupid food differences between Can and USA
 
Loktar why did you bin those?
 
LOL crackign up over here
 
8:50 PM
I cringed as soon as I saw her standing on a soapy hood. How could she not predict that.
smooth angled surface with a substance known for being slippery. Has she not seen a cartoon or sitcom? :)
 
So react context is a bad thing. But let's say I have a bunch of functions in a parent class that are going to be used throughout that class and the child classes. Barring just passing them all down to each component as props, is there anyway to have some type of access to these funcs?
I figured it's a "gimme", but I'd also like to not have to throw them all up onto window either
 
context is that way if you don't want props, but it's the 'global variable' of react-world.
it is better than throwing them on window, though
may I ask what they are?
 
@Luggage not professional
The reasons
The Reasons
more reasons
 
@Loktar this is for a coworker that just asked me. I might have him throw it all into an object and pass the object as a single prop. Still kind of messy but better than anything else
They are all scope-independent functions though
Not an exact example, but imagine something like Sum() where all the information you need is provided in the parameters
 
got it, reasons. No more needs be said.
 
8:54 PM
you did see before "reasons" right though?
 
yup
 
cool
 
edits are public too, if you didn't know, or cared
 
yeah I know but they are a bit harder to notice
esp with our log lol
 
true
 
user1596138
8:56 PM
Hmm
 
i.redd.it/4zduxp6lb85z.jpg <shit type="holy" />
 
user1596138
Damn
 
damnit. I was just baffled by my inability to find this problem and realized I was querying test data instead of production
 
user1596138
I wanted to post a history link to my own message with no edit lmao
 
user1596138
8:57 PM
I messed up lol
 
been trying to figure out why I can successfully send an api request via node, fetch, and curl, but not coldfusion
it's just a plain old post request, no special headers, no values,
 
@KevinB ummm are you using Form to post?
 
no
backend, cfhttp
 
@KevinB I very well could be no help as I don't know coldfusion. Here's a link I found though: helpx.adobe.com/coldfusion/developing-applications/…
 
@KevinB I might be working with coldfusion again soon (to modernize an old app and replace it)
 
9:08 PM
Have you checked to see if your post request might be getting stuck in the late 90s?
 
so far everything looks pretty close to the same when i post to my own server and inspect request headers, comparing curl to cfhttp
two added headers when using curl, plus a different user agent of course
and it's the weirdest error response: {"error_code":"1","description":"error-router-no-match","status_code":404} it's almost as if i'm using an incorrect path
but if i copy paste the url into curl... it works
ah, success
...
I had to set the host header to the api's host, without it's subdomain.
why
api was at s15.example.net, i had to set host to example.net
 
don't spawn enemies in the ground
that always happens
 
@BenFortune what's wrong with it?
 
@Vap0r No idea, probably head trauma
 
Huh, that's wild. Could rabies do something like this? I've never seen something with rabies (that I know of)
 
user1596138
9:31 PM
Sex bike
 
Nice!
 
user1596138
I was sweating my balls off at like midnight in the garage last night lol
 
user1596138
Still like 85 degrees
 
0
Q: prevent vue-cli (webpack) from picking up all non-file GET routes

towcWhen creating a Vue project with vue init webpack project-name, setting it up, and finally calling npm run dev you can open your browser on localhost:8080 and see the default page. In fact, you can navigate to mostly any "non-file" path, such as /a/b/c-d, and Vue will still pick it up. The only p...

needs polishing?
 
Okay, this example
(function(x, f = () => x) {
  var x;
  var y = x;
  x = 2;
  return [x, y, f()];
})(1)
Local variable x shadows the parameter with the same name, var x;. It's hoisted, and is assigned default value... undefined? Yes, usually it would be assigned value undefined, but not in this case, and this is the subtle thing we mentioned. If there is a parameter with the same name, then the local binding is initialized not with undefined, but with the value (including default) of that parameter, that is 1.
I didn't know this thingy if the parameter has the same name as variable...
 
9:38 PM
@towc the advantages of vue are paying in full I see :D
 
hey, vue is amazing for front-end and I guess works well with a simple-ish back-end
vue alone (no weird vue init stuff) works perfectly well with any back-end
had no problems with using it as just a library
 
@towc did you use vue-router?
 
does it somehow automagically limit the responses to that? 0.o
I doubt it, but might be worth trying
 
Vue is amazing.. especially state management pattern: vuex.vuejs.org/en/intro.html
 
i ask because vue init asks me
 
9:50 PM
oh, yeah, default everything
I think. The sails generator is doing that for me, I can check the source code
 
> If you've never built a large-scale SPA and jump right into Vuex, it may feel verbose and daunting. That's perfectly normal - if your app is simple, you will most likely be fine without Vuex.
shouldn't be the norm
that's why implementations like mobx are superior
nothing should really feel daunting or overly verbose, same issue Redux has
 
that's just Vue being super friendly, I think
trying not to intimidate you, saying "it's fine if you don't get it at first", I think
 
I love mobx, but it's no silver bullet either. It's some observable robe with which to hang yourself.
 
no trying to justify it's own existence :P
 
vuex is like a simpler mobx, with a bit of added structure you don't actually need to care about
 
9:53 PM
@Luggage yeah if you don't use strict it would be a complete mess
@towc stop it
it is not a "simpler mobx" you're silly.
 
well, it is
mobx adds a lot of overhead stuff simply because react doesn't have a great way to add plugins
 
Looking over the docs, it definitely is not
@towc mobx !== react-mobx
react-mobx are bindings for mobx
 
did you ever not use mobx for react?
 
and that may be the "overhead" you speak of
 
yeah, exactly, but vue+vuex has all of that sorted already
 
9:55 PM
I only use mobx in a react app, but not all uses end up in my react views.
 
so does react + react-mobx + mobx?
 
you need to define decorators and stuff. Which I guess isn't too much of a hustle, but still
 
@towc @observable thing; done
 
you don't define decorators, just use them
 
the nice thing is you can use data how you're used to, no weird stuff to go through, no weird accesors or anything
 
9:57 PM
on one side, it means that you need a very very recent js version running. Which again, I guess shouldn't be an issue if you're an experienced dev
 
and mobx works well without react, also
 
thing = 2, if a react component was using thing at all.. it would auto update
pretty dang simple
 
@ssube I don't doubt it
 
@towc decorators are trivial to transpile
 
@towc you mean using a transpiler?
 
9:58 PM
they're one of the simpler features that's been added in the last few years
 
@Loktar same for vuex
@Loktar ofc
 
vuex looks to be using babel as well
idk man this seems crazy for a counter
all that boiler plate bs for (actions rather)
 
it doesn't need it, but you can
 
class Counter {
	@observable count = 0;

  @action increment() {
  	count++;
  }
  @action decrement() {
  	count--;
  }
}
any react component using it updates, easy peasy.
 
@towc build/dev-server line 44-54
 
10:05 PM
(this.count) actually
 
the api is before the connect-history-api-fallback so any api endpoints you create will stop serving index.html
 
the more I look at vuex the more I see redux
modules seem to be reducers (or do combining anyway I guess the actions would be reducer-ish)
 
vedux
 
@Luggage yeah it's following a lot of the same principles anyway
 
btw, just like in mobx, if you change anything in the store and a vue component is using it, that also automatically updates
 
10:07 PM
idk I might have to mess with it so I have more concrete stuff to trash talk @towc about
 
so more like mobx, with a bit more structure, which you can chose not to have
 
it's redux
which is nothing like mobx
 
you mean like how I went and installed vue just so I could answer towc question and show him up? He really encourages you to slap him down, doesn't he?
 
you can use it to literally just store properties that any component can very easily change
 
lol yes
 
10:08 PM
@Luggage and I really appreciate it :3
 
@towc it's nothing like mobx
>// mutations are operations that actually mutates the state.
// each mutation handler gets the entire state tree as the
// first argument, followed by additional payload arguments.
// mutations must be synchronous and can be recorded by plugins
// for debugging purposes.
 
I'm looking at the lines
 
read the docs man
there is no "state tree" in mobx
that's all Redux lingo
 
your issue is all about the html5 history fallback, i am pretty sure. sounds like it
 
but you can just change the state. it's just bad practice
 
10:09 PM
but with mobx you need no "state"
I can define my own data structures however I feel
 
it's not bad practice since mobx (in strict mode) requires you only change state in specific actions.
well, the current mobx object IS state..
 
yeah you must use an action in strict mode
which is great, but I'm not a fan of the single state tree that's passed around in redux and vuex
 
@Luggage you're very likely right, and if the answer is in that file, I am still barely closer to the answer, as that file is never used by the sails lift and I have no clue how things happen
 
well, remove that line with the fallback and i bet it'll stop serving from all those made-up urls
 
I had a look around the internal code of sails and what files it calls and how generators come into play, but it's been a wild chase
 
10:13 PM
yup...
The reason that is there is so that it'll hand out the index.html for all urls and let the client-side routing handle it (SPA)
 
that makes sense, but I'm not sure how it expects people to do proper rest apis
 
the api is defined befroe that
so it never even gets to that fallback if there is a REST endpoint listening on that url
express checks middleware in order
 
it's also interesting because I think it's using 2 express instances
or I don't know where to look
 
I don't see that.
 
sails generates one, and if a file like the one from vue also generates one, then there's 2
 
10:16 PM
i don't know what sails is..
 
but I think there's an alternate file somewhere that I can't find
 
was that a non-default option?
 
sails is a back-end framework
I'm using it to do db management and, normally, routing and all
but it's only picking up non-get requests
 
i don't see that in the template. lemme regenerate
 
it's not in the template
you need to install sails separately
then run sails new whatever
 
10:18 PM
nah, too much work
your question isn't realated to sails
 
I don't expect you too, thanks :P
 
I can reproduce and alter the behavior with the default template
 
@Luggage the question mentions sails a lot of times
I was hoping the solution wouldn't be in that file, but apparently it is, and I don't know what to do about that
 
Is there anything similar to reSharper that's free? My evaluation period is over :'(
 
@Kramb yes.. trying to think of the name..
 
10:19 PM
and... now setting the host header doesn't work anymore
wtf
 
@Luggage Thanks. Didn't realize how much it was actually helping until I lost it lmfao
 
I'm not sure if it does everything resharper did.. only used it a little like 1 year ago
 
Hi guys
a question... :
Is there any difference between:
var b = [...[...'123']];
var c = [...'123'];
output is the same
 
Functionally, no.
 
10:22 PM
both are invalid.
ohh.. i guess not.. it'll turn it into single characters
 
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }

var b = [].concat(_toConsumableArray('123')).concat();
var c = [].concat(_toConsumableArray('123'));
cc @DenizR.
 
so that is the same?
 
The longer form just clones the array. It's redundant.
 
Number(Number('1'))
 
@Kramb, understood.
 
10:28 PM
@Luggage updated the question: this is all you need to create the thing
npm i -g sails sails-generate-new-webpack-vue vue-cli
echo "{\"generators\":{\"modules\":{\"new\":\"sails-generate-new-webpack-vue\"}}}" > .sailsrc
sails new test-project
actually, vue-cli is already a dependency
but heh, might as well install it
but I don't expect you to get into sails' docs
 
nope, just put sails before the fallback.
 
does anyone know what pattern node uses for export
 
plaid
 
2-4-2
 
when you figure it out, add it to the node docs.
 
10:33 PM
@Arrow what are you exporting?
 
somone asked me what pattern does node use something about AWS(or something simlar, did not know what they were talking about)
 
How are we expected to help with such a vague question?
 
Well I figured, when I mentioned pattern you guys would be like, Ohhhh i know what he is talking about
 
Not even a little. :)
 
I suck at vocab, but do pattern and syntax mean the same thing in this context?
 
10:38 PM
He was refering to a pattern as in a desgin pattern
 
@ndugger @SterlingArcher i.imgur.com/7aPmNV5.png
 
yup lol
 
let arr = [ ];
for (let { x = 2, y } of [{ x: 1 }, 2, { y }]) {
  arr.push(x, y);
}
arr;u
 
@SterlingArcher you see this cray? youtube.com/watch?v=VPrcMfRePvs
grade A cray
also funny as hell, and a little sad
 
good lord he just takes it
 
10:50 PM
lol, he's laughing while she's screaming at him
> I'm going to call the cops
> how, you don't have a phone
LOL
 
@rlemon she seems nice
 
according to the dude on reddit she moved out a few days later, the other guy is now married and happy. and still besties with the dude who posted the video
so alls well that ends well. I hope she ends up in jail for abuse one of these days tho
don't hit people
 
yeah
sigh, last night i mustve installed some packages without --save
get to work and now my app doesnt compile
 
@rlemon accurate
 

« first day (2441 days earlier)      last day (2505 days later) »