« first day (2299 days earlier)      last day (2664 days later) » 

user1596138
5:09 PM
@HatterisMad Those are fairy tale numbers. It's a fucking Ranger
 
user1596138
Shit... Those are fairy tale numbers for just about anything, don't kid lol
 
user1596138
Come down to reality, where these vehicles have 150hp stock. 300 is amazing, 450 is fucking monumental.
 
user1596138
@HatterisMad How would you even get 450hp out of a Ford 302 lol (for more than a single run up the strip). That motor had to be fake
 
user1596138
@HatterisMad But yeah, I'm considering picking up a remanned 4.0 for the Ranger and fitting a Paxton centrifugal supercharger, drop it off at Torc in town to get tuned and drive it on 5-6psi forever.
 
user1596138
My world is about as much torque as you can get as low in the rev range as possible.
 
5:17 PM
I don't get it, is the cat photoshopped?
 
user1596138
 
oh damnit
 
user1596138
Lol the nihilist page is so bad
 
:D
what's the original?
 
user1596138
@towc He was just holding up the executive orders as he signed them. They're too small to read. He's held up like 10 of them
 
5:20 PM
nice
 
user1596138
i.stack.imgur.com/avBln.jpg : nothing interesting
 
is that his signature at the bottom?
looks like skyscrapers
 
@Jhawins I had no idea you were so into electric cars.
 
next up is lambda-powered cars
 
user1596138
That's going to be amazing.
 
user1596138
5:22 PM
@KendallFrey Dude... The day electric motors make it into small sized trucks I will lose my shit
 
I have no doubt you could put one in
 
that's what she said
 
user1596138
Well you'd need them on all wheels etc... Would be huge
 
user1596138
My dad was part of an R&D project GM did with all electric S10 trucks in the early 2000s.
 
if im writing a server-to-server app and calling an API using OAuth2... when I'm registering my client with the API provider... do I/what do I need to supply as my "redirect URL??"
 
5:23 PM
You also need motors for each wheel for IC engines. Except you don't.
 
electricity wasn't even invented in the early 2000s
 
user1596138
He assembled them and got to drive them. Said it was the funnest thing ever to drive
 
obviously i wont have a user to manually accept permissions.. i just need to authenticate and call my endpoint
 
jeez, just hire a few indians
 
user1596138
@KendallFrey I mean technically you could do whatever.... I just am not quite sure how I'd drive a traditional transmission using a single electric motor. Guess it can't be that bad.... Turn the flywheel lol
 
5:24 PM
@JzInqXc9Dg google "headless oauth"
lots of tutorials / packages on it
 
@ndugger I remember when the discovery of electricity was announced. The internet went absolutely berserk that day.
 
user1596138
I know Koenegsigsgsgtsgejhfvjhw had one that's inline on the driveshaft (basically)
 
@rlemon thank youi
 
@Jhawins Yeah you'd be best off with replacing the transmission as well
 
user2620028
@Jhawins i don't really feel like those numbers are fairytale
 
5:24 PM
@KendallFrey then sethbling reproduced electricity in minecraft. That was a good one
 
user2620028
my motorcycle from 1990 made 75hp
 
user1596138
@KendallFrey That means the transfer case as well.
 
user2620028
miata makes 130
 
user2620028
subaru 4 cylinders from factory make like 300 don't they?
 
user1596138
And now we're at a dead end... You have a truck with only axles
 
5:26 PM
@Jhawins ooh, 4WD electric? Didn't think of that, sounds extra fun.
 
user1596138
@HatterisMad These comparisons don't make any sense
 
(I just learned what a transfer case is)
 
user2620028
@Jhawins factory shitty cars have always been in the 150-300hp range
 
user1596138
@KendallFrey That's why I need the low end torque.. For crawling and such. I have 4.10 gears, my truck will do "burnouts" spinning the tires at a fraction of a revoluiton per minute hahaha
 
user2620028
why does 450 sound monumental to you?
 
5:27 PM
@HatterisMad There are 1.6L V6 engines that make ~900hp. fwiw
 
user1596138
@HatterisMad Because I know about real cars
 
my people use 1hp horses
 
user2620028
@Jhawins this is literally why i am asking you
 
user1596138
Because absolutely nothing on the truck would hold 450hp.
 
user1596138
The frame itself would have to be boxed.
 
user2620028
5:28 PM
@Jhawins who would want to put shit tons of power into a truck though
 
I reckon the CB whip would hold it
 
@HatterisMad Ford
 
user1596138
You have no option but to straight axle swap if you pick some huge honkin V8 lol
 
@HatterisMad Half the people I've met
 
user1596138
Basically. It's not the same vehicle in any way anymore if it's able to hold 450 hahaha
 
user1596138
5:29 PM
@HatterisMad Considering we are literally talking about MY truck..... Idk who knows :?
 
user1596138
The Ram 1500s come with 400hp these days....
 
user2620028
@Jhawins yeah thats what i was saying before, when you are talking about making power you would have to do an entire drivetrain swap just so it doesn't burn up all the components
 
user1596138
@Loktars Ram has the power of my car
 
user1596138
Yeah Idk
 
Let's not talk about Loktar's "ram" in public.
 
user1596138
5:30 PM
@HatterisMad I said I wanted to do a mild, ultra reliable build with a Paxton and a remanned 4.0.
 
user1596138
Shooting for 200hp at most.
 
user1596138
260 if I started with the SOHC insteasd of the tractor motor, but I like the old pushrods
 
user2620028
@Jhawins i missed this entirely
 
user1596138
You can pull over 300lb/ft without huge boost lol
 
user1596138
When I throw the transfer case in low, on 4.10s, with 300lb/ft.... Omg that would just be the best thing in the world
 
user1596138
5:32 PM
inb4 @KendallFrey "torque doesn't mean anything"
 
user1596138
it does when you're crawling ;P
 
I mean, technically not
not engine torque, anyway
 
user1596138
Right lol.
 
wheel torque, oh hell yes
 
user1596138
^ Why I mention having 4.10 final drive
 
user2620028
5:34 PM
@jhawins i read online constantly people warning others about making engine builds that have like 300hp and how they are unsafe and undriveable
 
user1596138
And my transfer case's Low range is something like ~2.8:1
 
user2620028
@jhawins is this another one of those things i am just way out of line on.... is there something else here that i don't get? other than they shouldn't be driving a car?
 
user1596138
@HatterisMad Probably talking about the motors blowing up? Idk. Depends what you start with. It's not real on a Ranger... That's nothing on plenty of vehicles tho lol
 
user2620028
@Jhawins nahh they are talking about it being too much power to handle
 
user1596138
I want an Atlas soo bad lol
 
user1596138
5:36 PM
I'm seriously considering dumping the Challenger and just actually building the Ranger this time lol no more junkyard motors
 
user2620028
@jhawins i am on the fence whether to revive the jag.... one one hand i just rebuilt the whole driveline
 
user2620028
on the other hand, i need to rebuild the entire suspension and interior
 
user1596138
The new Atlas has ~10.3:1 lowest range lmao.... You'd idle at null mph
 
user1596138
Pull down a house haha
 
solution: Ranguar.
 
5:42 PM
solution: Honda Fit
 
user2620028
what would the ranguar be... take the driveline out of my car and stick it in his ranger? so effectively it would just be a 350 in a ranger lol
 
user2620028
@jhawins for 14 bolts and $100 i could have shiny headers :) ebay.com/itm/…
 
Why would this code throw an error in console telling me var is undefined?
	if(var !== undefined && var !== null) {
		console.log(var);
        }
 
var is a keyword
you can't make it a variable
 
5:56 PM
Aha
I just retyped it for the example
@ndugger Hahaha oh my god he has to be trolling
Well, let's say we replace var with myvar... it tells me myvar is undefined but that's what I'm checking for. Would I have to compare it with the != instead of !==?
 
no
make an actual demo
telling us you check against undefined and it doesn't work when we cannot see what you are checking is not going to be helpful
 
Well I haven't declared myvar, but that is 100% of the code in question.
Maybe I am misunderstanding but I thought that checking a variable against undefined will tell you if it is declared or not
 
Because you haven't even instantiated the variable with that name, yet... Please don't write code like that
Never just grab for potential globals like that
ew ew ew
 
So instead of....
var x = 1;

if (x === 3) {
var myvar = true;
}

if(myvar !== undefined && myvar !== null) {
	console.log(myvar);
}
Would I do
var x = 1;
var myvar;

if (x === 3) {
myvar = true;
}

if(myvar !== undefined && myvar !== null) {
	console.log(myvar);
}
Sorry that took up more space than expected lol
 
Well, the fumes from the DVDs might be toxic and I've still got your money, so by all means borrow my lighter. https://t.co/kVoi8VGEoK
 
6:06 PM
@Alesana Yeah... declare the variables, then you can set or not set them later, but never just probe for potentially undeclared variables... that's a huge code smell
 
Hmm interesting... Okay thank you!
 
Never a valid reason to attempt to access a variable that may not be defined. I have never seen one valid use in all my years.
 
If I am seeing this right, if (...) {var myvar = 3;} declares myvar as undefined even if it is false
 
myvar will be declared and assigned the value undefined at the top of the function, and will only get the value 3 if that "if" block executes.
all "var" declarations happen as if they were at the top.
 
is there any reason why a local website running at / would not redirect to index.html using browser-sync?
 
6:14 PM
In my code I have <?php if (...){echo 'var myarr =' . json_encode(array(...) . ');';?>
 
array() is a php thing
not js
 
ew... mixing php and javascript
 
@OliverSalzburg You've got chromedevtools.github.io/debugger-protocol-viewer/1-2/Runtime/… in the remote debugging protocol. It's not very well documented, so google around for examples
 
another huge code smell
 
dont do that
 
6:15 PM
var myarr = []; //proper way to make an empty array in JS.
 
@Zirak Cool. Good to know, thanks
 
I fixed it, haha
 
code smell so bad even rotting flesh would smell like flowers
 
Why should you not mix PHP and JS like that?
 
ohh, a non-empty array. json_encode might work..
 
6:16 PM
Well it works when the PHP condition is true
 
every time you mix js and php a puppy dies
 
What is the alternative to mixing PHP and JS, just Ajax?
 
Yes
 
and when the condition is false, "myarr" never gets defined
 
@Alesana you should never mix mutliple languages inline like that ever. That's a good way to end up with unmaintainable spaghetti code that your coworkers will hate you for.
 
6:17 PM
@Alesana mixing languages is extremely brittle, and hard to test; it's very unexpected for your page logic to break because something in the PHP changed on the backend....
 
or at least confine your mixing to small sections. If you need to generate a little JS that includes data at the top, that may be OK.
 
lug pls
 
but only ok. not good
 
no ok
 
All my mixing is at the top
 
6:18 PM
some generated JS for data is how lots of isomorphic apps work.
but 99% of your .js should not be mixed. In fact, it should be in .js files, not in your html, php, anywhere else.
 
Stop giving him excuses to do nasty shit like this
 
know your audience. if someone has some trouble getting an array to appear in thier code, they may not be ready to refactor the app.
 
Is this wrong?
At the top I have...
var offersJson = <?php echo json_encode($offersforjs); ?>;
var offeramt = <?php echo count($offersjson); ?>;
var nullvalnodes;
<?php
	if (!empty($nullvalnodes)) {
		echo 'nullvalnodes = ' . json_encode($nullvalnodes) . ';';
	}
?>
 
know your audience. If someone is mixing multiple languages, giving them excuses to do it in advanced cases will make them think that their current garbage code is ok too
 
honestly just dont use php
 
6:20 PM
I wasn't having problems getting an array to appear in code, though
And in other pages I use PHP to echo $_GET[] variables to JS
I don't know what an alternative could be to that
 
Oh no
 
Hello xss
 
@Alesana separate all JS, then output all data into a JS variable as one.
 
Good thing you mentioned that
Shit that's dangerous
 
Ideally you should be using an API service to get those variables to the front end, that way you don't have to use that mixing code
 
6:22 PM
Ah I didn't even think about that
 
And you don't echo gets
Srs..
 
Link the page that echos gets please
 
Yeah that makes complete sense.. but echoing $_POST[] variables would be okay?
 
No
 
echoing $_POST[] variables was common 10 years ago, things have evolved a lot since then
 
6:24 PM
PHP is a code smell
 
some poor bastards don't have a choice.
 
It's not live but it's simply to alter the header of a page
 
There is always a choice
 
@Alesana echoing any user input is dangerous
 
6:27 PM
Could I do <?php echo 'var x = ' . htmlspecialchars($_GET['x']) . ' ; ?>?
 
<?poop ?>
 
Stop trying to mix the languages and just do it the right way
 
No
 
6:29 PM
my car was bird hangout today
 
I'm confused on what the right way is :O... I would think that an Ajax call would also depend on the $_GET[] or $_POST[] variable
 
@Alesana look up how to "sanitize inputs" for php.
 
it's amazing the more questions I try to answer, the more they all start to look like helpdesk questions.
 
The complaint is that you are taking user-entered strings and sticking them into your javascript. That can allow people to do all sorts of nefarious things.
 
@Alesana read the article I linked you
it explains things
with words even!
 
6:32 PM
@rlemon Have you been coding breadcrumb menus in your car again?
 
I'm parked in front of the bird feeder.
usually they don't crowd under the car tho
 
@rlemon Thanks! I will read the whole article
 
birds are weird
 
maybe due to the snow..
 
@Luggage Also will look that up
 
6:33 PM
it's Canada. there is always snow
birds don't care
 
doesn't mean they like it
obviously they do
 
also, it's a nice day out today
 
looks like fresh snow
 
It's freezing here
 
fell earlier
not snowing now
 
6:34 PM
earlier when the birds were taking cover?
 
no. they were under the car when I went to vape
 
maybe it was warm(er)
 
or maybe they're just birds being weird
 
always a reason
!!what should I have for lunch?
 
@Luggage Could not process input. Error: args.parse is not a function on line 4204
 
6:39 PM
mm, sounds delicious
 
returning an async function is, in effect, returning a promise, correct?
 
returning the RESULT of an async function, yes
 
@rlemon The page you showed me says that this is okay...
`<script>x='...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...'</script>`
If I understand, it would be okay as long as the PHP data is escaped?
 
or to simplify, async functions return promises
 
I don't know why those backticks don't do anything
 
6:40 PM
() => setTimeout( () => 42, 1000 );
async function which doesn't return a promise :P
 
@Alesana They don't on multi-line comments
@jAndy he means async as in async/await
 
Ah ok
 
@Alesana sure, as long as it is escaped correctly. and as mentioned higher up in the article, you cannot rely on htmlspecialchars
 
user1596138
@HatterisMad Do it lol
 
your jag has a small block chevy engine?
 
6:43 PM
Right I see it links to a library that should do the trick. Okay, so I am making sure all my untrusted data is escaped, I put all my PHP variables into a PHP array, and then at the very top of my code I have var phpvars = <?php echo json_encode($escapedphpvararray); ?>; Is there something wrong with that?
 
You should still be doing some sort of ajax instead... but if you insist on doing this the wrong way, yeah, as long as you've cleaned up the data, this is better
 
@KendallFrey fucking hell man. imgur.com/gallery/LxKIN 11/10 unexpected
cc @SterlingArcher
 
@rlemon hahahahaha love it
 
Okay thanks that makes a bit more sense. Maybe I am just doing everything wrong but I'll show a short script on why I think that I would need to use PHP in order to make the ajax call...
 
wat
If you're using php to "make the ajax call", then you're not making an ajax call
 
6:47 PM
Haha I mean a variable from PHP
 
user1596138
Rendering initial data onto the page is fine.. Looks like a sort of global object
 
user1596138
In his example anyway
 
user1596138
you should try to use PHP as much as possible to do your JS honestly
 
It really isn't fine
Your client shouldn't need a whole lot of config data
 
user1596138
It might be literally data
 
user1596138
6:49 PM
I'm jus saying there's no sense saying "no matter what you have to use ajax to get any information from the backend"
 
I don't think I agree with that
 
user1596138
So what, if you have an SPA you'd load the page and then wait for data via ajax?
 
user1596138
Why not just preload it...
 
Yeah pretty much
 
user1596138
6:51 PM
lol
 
user1596138
That UX, amazing.
 
spinners === "the data is loading"
white page while the data is loaded first render === "the fuck is wrong with this site?"
 
user1596138
Lol yeah. I mean don't just spit all kinds of shit out everywhere from the backend... But preload data when possible, cause that's how websites work
 
that's how websites used to work
 
user1596138
...no we still preload data
 
6:53 PM
@SterlingArcher dammit
 
I'm with @Jhawins on this. pre-loading data is a valid. But you can do so and restrict your php/Js mix down to ONE LINE.
 
If it takes you so long to load your initial data that it's a UX issue
 
Facebook is a decent example of async data loading. THey display chunks of greyed out boxes that resemble what the data will look like, then it's all replaced once the data is fetched
 
You have bigger problems
 
Agreed
 
6:54 PM
Like if your initial data requires an expensive query and is large in general
 
user1596138
This honestly doesn't make sense.
 
Welcome to 2017
 
It shouldn't be the first data that the user sees
 
@rlemon positively nauseating
 
<$php echo 'var preLoadedData = ....' $>
<script src="myLogic.js"></script>
note.. react isomorphic apps do this (not with php, obviously)
 
6:55 PM
I've bundled json files in with browserify before lol
Cuz I was too lazy to set up an endpoint for it
 
These day old curly fries that sat in my car overnight don't taste that great... who would've thought?
 
it's not about being lazy. bundling data (usually from a database, not static data) along with the html to reduce load times is normal.
though, usually only for advanced cases when you have both an "ajax" endpoint AND pre-bundle for speed.
all-ajax is fine, too.
 
So I use an ajax call to load 100% of my data that is not the header, sidebar, or footer.
That way it has a spinner while it is loading
But, even with that, I use PHP to send the correct data through Ajax
 
How
 
How do I load 100% of the data with ajax? The PHP page that Ajax requests returns the inner content div in plain text form.
 
7:02 PM
Set up an api
 
user1596138
> event.loaded how many information recived in periodically call.
 
user1596138
lol source
 
@Jhawins what is that, w3schools?
 
user1596138
MDN
 
ohh. my. god.
 
user1596138
7:04 PM
> callback is the function called periodically before complete the request.
 
@Meredith I think essentially what I have created is an API?
 
user1596138
I mean that one makes sense at least
 
It's probably an api of some sort
 
@Meredith I agree with your style.. but not everyone is ready to turn a server-generated html app into an SPA.
 
But I think at some point in the code I would have to pass a PHP variable to JS to make the Ajax call.
 
7:05 PM
This is a classic case of "came with a question, left with webpack, react, mobx, gulp, etc"
 
Probably not
@Luggage Yeah we set you straight lol
 
@Alesana just read up on how to prevent xss, do what you're doing now but without the security concerns. after it works, we can consider different approaches.
 
came with a massive code smell, left with multiple less smelly code smells. Separation of smells.
 
Just minimize any mix of PHP/JS. Later, you'll thank us.
 
@Alesana WHY??? I highly doubt that.
 
7:07 PM
Rewrite everything in this week's fad technology
 
angulareactraceur
 
@ndugger it's not an SPA. it's traditional generated html. like people did forever until a few years ago.
 
@SterlingArcher omg I never knew where this came from
 
@Luggage That doesn't answer why he needs to mix PHP in order to make a server call
 
same reason people had to generate a little JS with ASP, JSP, etc.
 
7:07 PM
i mean... it would certainly result in getting the data to the user faster if you could pre-render it, rather than sending, html, making ajax to get data, then rendering that data
 
@rlemon Thanks, I have sanitized all my code. Anyways, I am only continuing to ask questions as I am attempting to figure out the best way to do things.
 
that would involve mixing in php
 
@Alesana at this point you're not going to get the best way, you're going to get a bunch of peoples biased opinions
 
Anyone here do software dev remotely?
 
@schulzey \o
 
7:08 PM
I do.
 
@rlemon Good point! Well, other people's biased opinions might be better than mine so I do appreciate everyone sharing their's with me aha
 
user6845426
Hi all :D
 
@Luggage Is it reasonable to assume I could apply and find a low paying job while I'm still in school? I'm half way through. I need like an intern like position where I can learn while I'm in school and on the job
 
Like high school or college
You might be able to find a freelance job if you're in college and you have a decent portfolio
 
7:11 PM
@schulzey sure, if there is a market for it.
 
You can go for that, but you may find that without experience you'll find less jobs that want/accept remote.
 
if you don't care to get paid, probably a lot less hard
 
@KendallFrey Have you heard of remote positions being available
@KendallFrey for intern like positions
 
Internships are no problem
 
No, but I don't know much about the whole job market
 
7:12 PM
Well considering starting out wages are around 30-40 per hour. You'd think some place would be fine employing someone for 15-20.
As a longer term intern like position
@Meredith Are you referring to remote still?
 
Ask your advisor about internship opportunities
 
Yeah, I live in a smaller city in Wisconsin (usa).
 
Internships aren't usually remote but they're usually over the summer
 
the problem there, imo, is that "remote internship" is a bit of an oxymoron. The whole point of an internship is that you are trading lower wages for the ability to learn from others. working remotely doesn't give you exposure to others.
 
There are some intern positions here, but they are all java/oracle db (which I'm not as fond of). I like c# and getting started in web dev. php, javascript, etc
@Claies good point
 
user6845426
7:15 PM
How do I limit the number of iterations in a for-in loop?
 
@F.Bar Use a for loop
 
Use i < n / 2 instead of i < n
 
wat?
 
Oh for in loop lol
 
@F.Bar dynamic property access
 
user6845426
7:18 PM
Thanks :D
 
i mean, learning some java on the side couldn't hurt,
 
true true
 
Just one more question to make sure I understood correctly, if I am going to be mixing PHP and JS we can all agree that, even though it is more code, this
<?php $phpvarsarray = array("x"=>$x,"y"=>$y,"z"=>$z); ?>
var phpvars = <?php echo json_encode($phpvarsarray); ?>;
var x = phpvars.x;
var y = phpvars.y;
var z = phpvars.z;
is better than this
var x = "<?php echo $x; ?>";
var y = "<?php echo $y; ?>";
var z = "<?php echo $z; ?>";
 
both are pretty bad
 
but yea
 
7:33 PM
well, if you're planning on unpacking them it isn't better
it's doing a lot more work than is required
for no gain
 
i wouldn't unpack them, just leave them in the single object.
 
Ah okay
Awesome thanks guys! Hopefully by the time I piece all of my files together I won't have any PHP/JS mix
 
and i'd much rather pass it in after encoding it as json (as you've done), as that'd avoid any cases of string conversion errors
 
Makes sense
I came here to figure out why it wasn't working to check a variable against undefined and ended up improving/securing my application a lot more, aha
 
came for a crumb, left with a cookie
 
7:37 PM
It's true
After I am finished with this app, I am going to dedicate a large amount of time into solely learning and not producing any useful apps.
 
user2620028
@jhawins i just had an old lady try to kill me
 
user2620028
@jhawins pulled out onto a 45mph road right in front of me without looking. I swerved into oncoming traffic to avoid her and managed to squeeze between the old lady and the car coming the other way in the middle of the road.
 
user2620028
@jhawins as soon as i passed the old lady she locked up her brakes and sat in the middle of the road and shut her car off
 
ping ping ping
 
user2620028
?
 
7:42 PM
you pinged jhawins 3 times, consecutively, one woulda worked :p
 
user2620028
im aware
 
7:53 PM
"I'm dangerous on the road.. I better park in the middle of it, now"
How do you know she turned her car off after passing her?
 
10/10 was actually suicide attempt
> If I go, I'm bringing that littler Hatter bitch from the javascript chat with me
 
There are ways to off yourself without interrupting traffic. That's just inconsiderate.
 
Suicide often is
So, I'm doing this tech assessment/case study thing for my Target interview, and their data is so inconsistent and terribly architected, it hurts
I have to do funky destructuring just to make my code look clean afterwards
const { totalReviews, Pro: [ proReview ], Con: [ conReview ] } = CustomerReview[ 0 ];
yuck pls
 
data is messy. fact of life.
 
god dammit github repos are starting to spam people into reviewing their docs / trying their product
ffs man.
 
7:59 PM
clone me like one of your french repos
 
> was hoping i could grab a second of your time to check out our docs on GitHub: github.com/stdlib/lib, and maybe spend a minute or two spinning up a service? we'll be launching some awesome features soon and would love to keep you up to date :)
no, fuck off. get your own testers
don't randomly email anyone who is touching a node.js repo
 

« first day (2299 days earlier)      last day (2664 days later) »