« first day (2161 days earlier)      last day (3012 days later) » 

18:00
@BenCraig interesting (maybe) to note is that assignment passes the value through, so if( x = 0 ) doesn't pass but if( x = 1 ) does
I didnt know that, thats neat
if you're interested, the option is "dirty_background_bytes" and "dirty_bytes"
@rlemon to this day I can't decide if I like if (foo = bar) or this.foo = bar; if (this.foo) better
neither is great
@Ben, well == makes the if statement not run at all.
because it is now a comparison
and it is failing
18:02
@StemStep yeah, that means the comparison is false
yeah. how do I get it to succeed
the numbers on both side are the same
figure out why it is returning false? do you expect it to pass?
theDay is an int
@ssube first is a readability disaster
i and an int
yeah, should pass.
18:03
then make a demo
because if they are both the same number, it would pass the if
its not, so im trynna find out why
yea, so make a demo
because the code you've showed us isn't enough to tell why
@KendallFrey ever install any of the weather mods for KSP ?
like wind? no
would be neat to have to wait for storms to pass for launch opportunities
> would be neat to wait
....
18:06
I'm thinking like wind, rain, storms, snow, etc.
@towc Neature Wait
oh
@towc well I'm already waiting for transfer windows
Hey guys I got a question of practice on React
it is a simulation more than a game
18:07
@rlemon Do you use KCT too?
thought you were trying to have fun :P
What would you do if you wanted to make a form component, but wanted to make the controls outside of it? And the number of those components would be arbitrary and work by selection.
@towc Who says simulators aren't fun?
!!am I still mindjailed
@KendallFrey not yet, but I've seen videos that make me wanna use it
18:08
@towc You iz in mindjail
@KendallFrey because you can speed waiting up :D
0
Q: Get all Data on the Right Dates

Stem StepI have to do this for 4 others to make a stacked barchart. <script type="text/javascript"> jQuery(function ($) { $.jqplot.config.enablePlugins = true; var viewModel = @Html.Raw(Json.Encode(Model)); var cash = viewModel.Date1; var cheque = viewModel.Date2; ...

@rlemon That's actually one of my least favourite mods
it's pretty boring
@rlemon is that enough data?
> speed waiting up
18:09
@KendallFrey good to know
byutiful
I still need to figure out KIS/KAS
I've attached fuel tanks on land... never in space
speed up waiting*
The only cool part is having to wait in case you need to launch a rescue or something
@towc lol
18:10
@ssube not sure if that was the joke, or you were serious
@towc I was serious. The funny part was you talking about readability. :P
ah well :3
@StemStep console.log(i == cheque[x].theDay.value, i, cheque[x].theDay.value)
on every step and see where it fails.
how is if( foo = bar) readable? So many people are going to get confused
it's not good (that's the problem), but it's usually more verbose than that
18:11
@towc you're not used to it, so it isn't readable for you
if (this._foo = foo) is more common
that makes it pretty clear you're saving it for later as well as testing now
it might surprise you to know assignment in an if statement is used quite a bit in other languages (albeit still not recommended)
it's really easy to use and not that unclear, it just doesn't sit right
if( obj.foo = bar() ) {
  done(obj)
} else {
  error('you suck');
}
@rlemon now, on that, I keep my lint tools set up to prevent function calls within any flow control statements
not a fan of nested parens
18:13
if( (obj.foo = bar()) === 123 ) // everyone hates me
@StemStep you also don't need the while / found flag... I think
that is very confusing
break out of the loop
@rlemon No
You like me? You really like me?
No
I hope your next pizza is undercooked
You monster
18:18
@rlemon don't most languages also use = for comparison?
I dont need .value
most use ==
@towc No
@towc hell no. BASIC does, hardly anything else.
Can I post an article I found here to discuss with everyone or is this not the place to do that?
@ErikMcFarland Welcome to the JavaScript chat! Please review the room rules. Please don'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.
18:18
SQL-like languages and languages with := for assignment are pretty much the only ones
also, the issue is that if( foo = bar ) visually does look too close to if( foo == bar )
@ErikMcFarland that's probably appropriate and on topic, but whether we'll discuss it...
I can name 10 people who program who would get confused. JK I don't know that many names
> There are 10 kinds of people in the world: people who understand binary, people who don't, people who don't care, and people who are sick of that joke.
18:21
@ErikMcFarland schneierfacts.com
@ssube there are two types of people in this world. me and everyone else.
@ssube :) :) :)
that's a decent post, although I wish it had more specifics
some actual numbers would be nice
what if... what if the SJW 'movement' is a state designed attack to cripple the internet ...
#connorspiracies
@ssube agreed
18:25
@rlemon that... isn't completely absurd
@ssube I wouldn't have thought CTR would have actually worked
but hey, here we are
CTR? chemtrails?
correct the record
does FEMA have internet death camps?
dems trying to correct the internet by flooding social sites with propaganda
not that I think it is all propaganda, but a good portion of it seems to be
18:29
-1
Q: Nodejs - Generating unique random alpha numeric random string for Database

adnan kamiliI have a use case where I need to generate alpha numeric capital case strings of length 25, so the total possible unique combinations are very high: 36 pow (25) = 808281277464764060643139600456536293376 The string is to be stored in MySql database table with unique set to true I am using foll...

@rlemon the internet needs a lot of correction, but only SO documentation can make it happen.
@ssube Vs lbh nfxrq Oehpr Fpuarvre gb qrpelcg guvf, ur'q pehfu lbhe fxhyy jvgu uvf ynhtu. that one got me.
uuid = randomString()
that assignment is a contradiction
@ssube downvote the answer...
@Trasiva I will asap, today is hell on wheels for me
Object {Very High: 98, High: 74, Moderate: 28, Low: 3, VeryLow: 0}
If I have an object like this, and my value is 99, what's the best logic to determine that it is Very High?
Being that it's higher than 98, and < infinity
I was thinking of an iterative comparison, but then i realized if I do >, all will be true and it will return the most recent check
make the comparison not an object?
18:33
Not an option, it's a valueMap
const poop = [];
poop[0] = 'low';
poop[3] = 'corny';
poop[......
@SterlingArcher iterative comparison on an object, huh? With the unordered keys?
Yeah I know
The logic is "If it's greater than or equal Low, but less than Moderate, it's Low."
But on the edges, there's no high comparison
I really don't want to use 5 if statements
sort them low to high, in an array, like: [[0, 'very low'], [3, 'low]] then just search for the first one where x < it[0]
@SterlingArcher You can use while (condition) { /* logic */ break; } instead
18:39
Oh that's not a bad idea
!!> const val = 14; const segments = [[10, 'med'], [20, 'high'], [0, 'very low'], [3, 'low']]; const [floor, name] = segments.sort(it => it[0]).find(it => val < it[0]); console.log('' + val + ' falls above ' + floor + ' and within ' + name);
@ssube "SyntaxError: missing ] after element list"
@ssube "undefined" Logged: "14 falls above 20 and within high"
s/above/below
@SterlingArcher see now I'm scared because I don't know if you're joking
uhh, editing some c code... while ( TRUE == TRUE ) {
am I missing something ??
18:43
main/event loop, there ought to be a break or jump
while (TRUE == TRUE) { char input = getInputFromKeyboard(); if (input === Keys.ESCAPE) break; } used to be popular
@rlemon uhh
but TRUE == TRUE is TRUE
why not just while(TRUE)
@rlemon Not always
y u no while(TRUE)
in python you can redefine True
18:45
yes, and this is a single file for a atmega chip
@Neal you can in C, but you don't
they didn't redefine it
why protect from yourself?
they probably kept the == just so it looks like a comparison
maybe
@ssube haha true. I don't know raw C very well
18:45
this was written in the late 90's
I can't ask
never know what you'll end up doing to the codebase after a long night drinking
@rlemon #90sLogic
hell, author might not be alive.
Cleared up my question so it's understandable and solvable: stackoverflow.com/questions/39518304/…
@Neal tl;dr: C's #include is a copy-paste so #define TRUE 0 at the top of your file will break everything
18:47
training a tts neural network on my macbook. i wonder how many years it'll take
@ssube Fuuuun. What about #define TRUE FALSE ?
;-)
I guess the same
C didn't have a real TRUE or FALSE, so they're just defined to 1 and 0
@Neal My favourite is #define while if
it didn't have booleans, smallest type is char
@KendallFrey wtf.. you can do that??
18:48
@KendallFrey that makes your code faster and fixes all race conditions
@Neal sure can
@ssube which is again why I'm confused (other than readability)
why. the. fruit...
#define TRUE 1
#define FALSE 0
The C preprocessor knows almost nothing about C
18:49
c# uses true, not TRUE, so #define TRUE 0 won't break anything.
It doesn't know what a keyword is
@KendallFrey makes sense. It didn't come from C.
All it can do is identify tokens
The C preprocessor was a totally unrelated piece of software tacked on later.
Blah... C is for Cookie. That is good enough for me.
2
18:49
You can use the C preprocessor for JS if you want
how?
@KendallFrey I am sure you could do the reverse as well.
But why?
@Luggage It will though, because C# doesn't normally use a preprocessor, and that's not valid C#
@Neal what reverse? JS doesn't have a preprocessor
@KendallFrey v8 etc. whatever the case may be I am sure you can in reverse somehow.
18:51
you sure? c# has a proprocessor. i've used it
No it doesn't
#if DEBUG
it has compiler directives
ohh, well, ok.
but not a real preprocessor
@Neal You can't run C with a JS interpreter, if that's what you mean
18:53
@KendallFrey JS preprocessors = coffeescript, babel, typescript, livescript, etc...
You're technically not wrong
@nderscore only in the loosest sense of the word.
the best kind of not wrong
a preprocessor is just another word for compiler
28
Q: C interpreter written in javascript

Loïc FévrierIs there any C interpreter written in javascript or java ? I don't need a full interpreter but I need to be able to do a step by step execution of the program and being able to see the values of variables, the stack...all that in a web interface. The idea is to help C beginners by showing them ...

18:54
that is completly against site rules isn't it
@Neal What does that have to do with what you said?
@KendallFrey Nothing... I guess... According to you.
if a preprocessor and a compiler are the same thing, why do they have separate wikipedia articles?
@Neal you can write a c interpreter in js, but js interpreters do not run c
don't know what is confusing about that
How did this spring from an infinite loop break?
18:55
@rlemon Maybe I was confusing myself.
@nderscore a preprocessor is a kind of compiler
just like a transpiler
@SterlingArcher POKEMON GO!
Still play?
@SterlingArcher That sounds so much more fun than a coffee break
@SterlingArcher discussing how silly C can be
18:57
@SterlingArcher spring break?
all I read
spring break forever
inifinite loop of spring break baby!
@Loktar ( - ) ( - ) --- Not sure if eyes or...
lol
runs away
18:57
such big eyes
@Neal I see surgical scars
(-_-)
@Loktar at least they aren't droopy eyes
sigh I hate that I get nervous even posting an ascii image in chat
@KendallFrey So blind then?
18:58
@Neal eww 3 surgical scars now?
^_^
@Neal Yeah... if... if that's what you want to think
a very round torso
@KendallFrey 0_o
@Loktar I had to make a non-so appropriate joke. hangouts
18:59
@Loktar When you've had a picture of you in a banana hammock posted here, it's only uphill from there.
user1596138
Who uses React-router?

« first day (2161 days earlier)      last day (3012 days later) »