« first day (2676 days earlier)      last day (2272 days later) » 

2:00 PM
@Programming_n00b why are you asking your PHP questions here btw?
 
@SaitamaSama What if he doesn't have a class?
 
did the php room hurt you?
 
Oh, TIL you can use const outside of classes
 
No, I was trying to figure out if I should do it it JS, or PHP
 
2:01 PM
@Programming_n00b If you want to use it in your PHP documents, you don't have any choice really
So it really depends on where you need the information
 
@Programming_n00b Generally speaking, you're likely to have such "constant configuration" on both your server-side and client-side
And in both you should use something akin to environment variables.
 
I been trying to stay away from PHP tbh, I like how JS can run quickly without reloading
 
It's simpler on the server, the machine has environment variables you can set either manually or with tools like Chef
@Programming_n00b You normally have both client and server in applications.
I think we're not talking about the same thing.
 
Environment variables just another name for global variables right? :D
 
2:04 PM
@Programming_n00b Environment variables are "bigger", in a since, than global variables.
They are, as the name suggests, environment-level variables.
 
lmao, I truly salute to you experienced programmers, been reading ALL day and just getting more and more questions
 
They are set on the machine, the server itself, and not as a file in the program.
 
@Programming_n00b That means you're learning
 
@Programming_n00b That's a good thing :)
 
So what are the variables used for? Is it a general data type that I can use where ever?
 
2:06 PM
It is used for the OS to give you information about your environment
 
that sounds like fun, in a very sick sort of way. write your app to only use vars defined in .env
 
@rlemon I only do that in dev
For prod/staging environments, I use actual environment variables, either with Docker or some other tool
 
no, I mean only use .env
no const/let/var statements allowed in your app
 
@MadaraUchiha why not in dev too?
 
@FlorianMargaine I often need to change between "environments" quickly in dev
An .env file you apply onto the app is better suited there.
 
2:08 PM
not sure how that's different from environment variables
 
@FlorianMargaine Because on my machine, the "environment" is determined by the env file I use (they aren't in source control)
On the actual prod/staging machine, the "environment" is determined by the actual environment
When you have ~50 env variables, you can't reasonably set them directly in the commands you use, when you want to run with different configurations
Hence, env files.
 
ELI5, how do .env files actually work?
 
@KendallFrey You use a library to parse them and Object.assign (sorta) onto process.env
 
So they aren't actually real environment variables, they just appear like it in JS?
 
@KendallFrey Yes, and only in dev.
 
2:12 PM
@MadaraUchiha not sure why you don't have an env file that sets env vars based on existing env vars, or default values
 
So there is dev loading code committed into prod?
 
@FlorianMargaine That's already on the app level
Merging the env object with a default object.
But say you have 50 variables you want to pass, and quickly change environments while in dev, how do you do it?
As for prod, the main reason against using .env files is because there are better tools there, especially in a managed environment.
 
@MadaraUchiha source your .env file...
 
@FlorianMargaine I don't want the env files to necessarily pollute my global envs
 
2:14 PM
pls fix now
 
e.g. export MY_VAR=${MY_VAR:-default value} in your .env file
 
@FlorianMargaine Oh, for sure, I just use dotenv to do it scoped
But the .env files don't make it to production, they aren't part of the build.
 
why not?
 
@FlorianMargaine Because there are better ways there
Especially in an environment like Heroku or AWS
 
I work at such an environment :)
 
2:17 PM
I keep the defaults on the app level, that way I also get typings and intellisense for them.
 
a .env file that uses existing env var or default value sounds good to me; exactly the same code is run in dev or prod
 
you own this?
 
2:32 PM
I have a follow up question, since this doesn't seem possible. If the parent handles the alerts state, then every component that uses alerts will have an addAlert, and removeAlert function. These will always be identical, and they always modify the state.

How do you reuse those functions?
 
@Cereal I still don't see the difficulty of your original question.
Could you show us what you envision the API to be, and where it fails?
 
I think I understand now. I just need another component, above the one I had. Then I can do the alerts there
 
is there a clean (built in) way to track changed props on an object?
let values = {
	foo: 1,
	bar: 1
};

const previousValues = {...values};

values.foo = 10;

const payload = Object.keys(value).reduce((changed, key) => {
	if( values[key] !== previousValues[key] ) {
		changed[key] = values[key];
	}
	return changed;
}, {});

report(payload);
I wrote a version with Proxy as well, but it was slightly messier imo
 
@rlemon I think that lodash has a diff method or something
 
problem is (in my thinking only maybe) is that I don't need to action when the property changes, I just need a clone of the object with only the changed props
I have many ideas how to track when it changes
@MadaraUchiha but then I have to still clone the values object at the start
 
2:49 PM
Whatever happened to Object.observe?
 
not that it's a huge issue to do so. just wondering if there are other approaches
@BenFortune that would tell me when the property changes (I can do the same with Proxy set trap)
I'd still need to keep another object to stuff that into (the change)
 
When dealing with npm & vuejs ... Why does this hang indefinitely?

    $ npm install vue-router —save-dev
    npm ERR! addLocal Could not install /home/ubuntu/workspace/vue-router-01/—save-dev
 
This composition over inheritance thing is wrecking havoc with my mind
 
@Mirv --save-dev
Two dashes at the start.
 
Morn
 
2:52 PM
ing.
 
omg, ty great check - I had copy pasted it so many times I lost track it when switching between --save & --save-dev
 
@Mirv You're using Word aren't you?
Don't store code in Word. It screws with the dashes and quotes.
 
> store code in Word
Also avoid Wordpad
 
heheh! Nah, had two issues with c9's ide & when I switched tutorials to one on someone's medium page, they had probably not checked their work or the styling pulled the extra dash...when I had resolved the original issues, I was so used to trying to copy paste that last part my eyes were just skipping it
 
someone here has Dragon Ball Fighterz?
 
2:57 PM
> Dragon Ball
shudders
 
!!giphy super saiyan
 
Hi folks, I am looking for the correct way to ask user for password verification if certain duration is passed after the last validation. For example, user signs in (which requires password validation), and then goes to profile page and tries to edit email. If last password validation was done 10 mins back, the he'll get a prompt for password else he'll be allowed to change email. Should I be tracking user's last validation using cookie or local storage? Or what's the best way to do this?
 
screaming in background for 10 episodes AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 
this last tournament is supposed to be 40 minutes long
lasts 40 episodes
 
2:59 PM
@MoinuddinQuadri JWT with a 10 minute expiry
 
How many Z-fighters does it take to change a lightbulb?
 
umm... one?
 
@SaitamaSama One, but it'd take them 5 episodes, and Krillin would die at least once.
 
lol, true, indeed :P
 
Cell was the best DBZ villian
 
3:03 PM
Oi, this is some pretty alert boxes: sweetalert2.github.io
 
no material design, no love
 
@rlemon Thanks! But the validation on apis at server side is already in-place. We want to have a secondary layer on the client side so that to check for the last password validation, we won't have to make a server call.
 
This bounce is pretty once, ok the second time, painful starting from the third click
 
> A message with custom width, padding, background and animated Nyan Cat
 
3:11 PM
I don't get it... how was he supposed to maneuver that ?
 
no one gets it
they're just dumb
the man in the foreground was walking back like "ok, this is done, good job"
like wtf how are they suposed to turn back
what did he expected xDDD I'm trying to understand
also, he has a "STAFF" shirt
 
@DenysSéguret the normal way, presumably
 
like this is serious shit
 
This is serious
Have you ever joked by launching a car on a paraglide?
 
Elon joked by sending a car to space
 
3:15 PM
Is paraglide the word for it btw?
 
parachute?
 
No parachutes are for falling down
This is for flying, also upwards
 
oh true
 
Paraglider
 
in spanish is "parapente"
@ndugger yeah, same concept, different budget
 
3:17 PM
pair o' gliders
 
Canada was a mistake
 
you were
 
morning friends
 
morn
 
morn
 
3:20 PM
morn
 
mourn
 
Morn
Is nick dead already
 
moan
 
3:22 PM
r u alive brudda? @ndugger
 
you should totally watch the SUI v OAR curling semifinal
 
Also what is this stick he's holding?
(I know almost nothing about curling I only played it once)
 
> And that, ladies and gentlemen, is a Canadian peacocking.
That statement is painfully true.
 
user1596138
I spent like 11 hours in the airports yesterday. Was a 10 hour drive. Should have driven lol
 
> Forget the brooms, can we get a mop over here?!
lol
 
3:26 PM
@Jhoverit lol
that's stoopid
 
user1596138
When they started sending the planes supposed to land in Detroit to my tiny airport I knew I was fucked
 
user1596138
They grounded everything for ice
 
1:45 how the fuck
That doesn't even look possible to calculate this
 
user1596138
> Slop doesn't count
 
that sport is so ridiculous that makes me smile
 
3:27 PM
@rlemon not the diskette vs's unfortunately. They are incredibly rare now... lol back in the day when I got it the CD vs was out and that was much preferred because of the music so I got that one
 
user1596138
Haha if curling were a drunk pool hall
 
> tihs is how canada rekts you in curling
 
@Loktar you fool :P
 
@KamilSolecki haha ikr
the even MORE rare one is Warcraft 2 disks
I never saw that in stores though, only the CD vs ever
 
They need to make overwatch an olympic sport
that would be entertaining
 
3:29 PM
agree
 
@Neil Nah, SK would own everyone absolutely.
 
just go watch it on twitch or somewhere else :p
 
The only real questions would be silver and bronze :D
 
@KamilSolecki broom (for sweeping)
 
I'm platinum in OW
too lazy to go for diamond
 
3:30 PM
@MadaraUchiha I don't think they own the fps tournies
they destroy in rts's though
 
I usually only play the 10 first matches
 
@KendallFrey why is his wrapped in gift paper lol
 
@Loktar SK won the last world cup without dropping a single map
Yeah, OW WC is a thing.
 
yeah but it's not as much of a sweep as with rts's still espn.com/esports/story/_/id/21669528/…
 
@KamilSolecki oh wait yeah wtf that's not a broom
 
3:31 PM
all the top teams aren't SK teams
in SC it's like the top X players
 
@Loktar The top teams all have SKs in them, in most, they're a majority :D
 
less funny than curling
 
SC top players for comparison
@MadaraUchiha that's crazy
 
3:32 PM
@Neoares is it like boule
 
You can look at the Overwatch League roster, most the top teams have a majority of Koreans in them.
 
@KamilSolecki maybe it's the same
 
This holds true for any game really :P
 
@Loktar It's not unusual, most decent sports team have foreign players, and lots of them
It's not unique to e-sports.
 
@MadaraUchiha yeah but not generally one country like SK
 
3:33 PM
@KamilSolecki that shot deserves those 3 points
 
London won the first season of OWL
 
@MadaraUchiha That's why League of Legends had to introduce laws for regional championship. One year there was 80-20 foreign to regional players ratio lol
 
/me cries in corner
 
@Neoares that's just bocce ball
 
3:34 PM
@KamilSolecki Meh, Maccabi Tel Aviv in Basketball is this hotshot team that takes EU by storm every time, I don't think there's a single Israeli on their roster lol :D
@SaitamaSama Who'd you favor?
 
DALLAS4LIFE
 
@KendallFrey petanca
de nada
 
@KendallFrey I wonder what was going through his head. So I bang this here, that goes poof, Pengs the other ting, and tada we win
 
@KamilSolecki They undoubtedly discussed it at length
 
I have to admit, curling was super super fun to play though
I'd play it if we had some here
 
user1596138
3:36 PM
I dropped one of them and shattered the ice the only time I played
 
I don't think I've even seen a curling rock IRL
 
Like, Dallas had all the pros and stuff... Seagull, Taimou, Effect... and there it is almost at the bottom of the table
 
Curling Rocks are known to be very shy, reclusive creatures.
 
user1596138
Fort Wayne has a indoor ice skating rink and a curling/hockey league
 
You must approach them slowly.
 
user1596138
3:37 PM
Year round
 
@KendallFrey there is a club outside of Ontario where I tried
 
@KamilSolecki we just play "Eisstockschießen" around here and don't care about curling
 
Do try if you have a chance you will love it
 
@KamilSolecki I'm sure there are many clubs outside of ontario
 
Yeah likely :D
 
user1596138
3:37 PM
> , please login tou your paypal
 
user1596138
Good job phisher
 
Is this written literally like this? Kek
> Login to PayPul plz
 
user1596138
It says someone ordered a $900 watch from me
 
@Jhoverit that sounds like a pretty stupid scam targeting, I doubt many people sell 900$ watches lol
 
user1596138
!!giphy shrug
 
always leo
 
always blue
 
can anyone help me with this question
0
Q: unable to upload file using tinymce editor

RiccardoI'm trying to upload an image using tinymce editor but the script fails and this is the error tinymce.activeEditor.editorUpload is undefined below the javascript and html code tinyMCE.init({ selector: '#editor', height: 400, theme: 'modern', plugins : 'advlist auto...

 
3:58 PM
Recently r/coaxedintoasnafu is going deeper and deeper
 
@KendallFrey we did curling in HS
 
we did fucking broomball
 

« first day (2676 days earlier)      last day (2272 days later) »