« first day (2422 days earlier)      last day (2753 days later) » 

00:51
yay I odn't have internet for 5 days
thanks ISP, they are "upgrading things"
how can a rocket that has 0 thrust torque in vab, have .68 thrust torque with two identical things docked to each side of it
Show the FBD
or even a schematic diagram
and SI units please
01:24
is it from a reaction wheel?
No idea what that is
but i'd make an FBD
first
and if that doesn't make sense
ask on their forums
sec, just managed to land and position them anyway, will check with them detached again
i'm thinking maybe one of them was ever so slightly rotated
I miss mods.
playing with no parts mods other than tweakscale and mechjeb
nice lookin base
01:33
there's still some torque, but not much
i need to send a power module down, not near enough solars here to power everything full blast
I miss games
ohh, you placed them by hand? yea, probably mis-aligned
I miss internet actually.
mechjeb was doing something wierd with rcs
couldn't stabalize
can i make the rcs only translate, and not rotate?
yeah, seems i can... just gotta figure out what settings to turn on/off
dunno why i put docking ports on the top, landing on those things is a pain in the ass
 
2 hours later…
03:19
Using console.assert is pretty nice
morning room
ohhi
o/
 
1 hour later…
04:29
Hm. I'm trying to figure out a way to determine if two math functions are equal. TL;DR I want a user to be able to input their solution to a derivative, and then check to see if they're correct by calculating the derivative.
solution to a derivative?
Yeah
Sorry, I mean like. Get a function, and find the derivative.
Isn't that a calculus thing?
04:50
not the prettiest thing in the world, but it works: @rlemon @Luggage
@TristanWiley you cannot say function are equal if derviative are equal
1 message moved to Trash can
@amarghodke Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
function getLengthOfShortestElement(arr) {
var maxLength=0;
for(var key in arr){
	var val = arr[key];
    if(val.length < maxLength) {
    	maxLength = val.length;
    }
  }
  return maxLength;
}
var output = getLengthOfShortestElement(['one', 'two', 'three']);
console.log(output);
function getLengthOfShortestElement(arr) {
  var maxLength = 0;
  for (var key in arr) {
    var val = arr[key];
    if (val.length < maxLength) {
      maxLength = val.length;
    }
  }
  return maxLength;
}
var output = getLengthOfShortestElement(['one', 'two', 'three']);
console.log(output);
I am just pasting Ctr+k but still it why not formatting ???
05:18
it looks fine now
guessing you were trying to format code with text
05:34
@KevinB : if code is formatted, can i ask query ???
@KevinB :i am getting 0 instead of 3 as result for returning shortest array element .
If I perform a regex replace with the global modifier, would it be possible to do something on each iteration of a match?
on the first iteration, maxLength is 0. val.length is not less than 0, so it stays 0.
repeat for all 3
To put it in context: I'm creating a very basic code minifier / maxifier and I want to insert / remove \t characters after curling brackets
05:43
@KevinB: what i can write instead for it ??
set the initial maxlength to some number that the string will never be longer than.
like 300
@KevinB lol, that was quite confusing. I thought you were answering me, haha
@philippe For a Gradient Generator, see github.com/mseifert9/Gradient-Generator-and-ColorPicker or colorzilla.com/gradient-editor -- They will generate the gradient for you without your having to directly use CSS
@KevinB : it will worked but it is not right way also this does not handle should return the first longest element in an array when there are ties.
if length is 0, set it to length of current element
else, continue
nothing in your function would facilitate returning the element that is longest and first,
it returns a length
so that'd be an entirely different function
05:56
@KevinB : can you show me how ??
not atm
@KevinB: anyway thanks. ...
06:10
Apparently people are still messaging me about the whole Donald Trump thing. Look... all I'm saying is that I haven't seen the guy screw anything up yet. Granted, he hasn't done much, but at least he hasn't broken anything. I can't say as much about the last guy. I mean, I didn't see much happen the last four years anyways in terms of changes but still... a lot of people did complain. Seems to me like people are complaining because of his personality when he hasn't really... done anything yet...
and please stop trying to message me. I don't usually frequent here so it's quite annoying that a minor convo from a while ago is still finding its way into my inbox.
:p
06:22
@TheGreatDuck damn I must have missed that :/ sorry for the random ping but I probably would have been on your side :p
 
2 hours later…
08:18
Hello! I'm having some trouble with understanding generators... I'm trying to get an variable to cycle back and forth but in local terms, basically maintaining a context on its own, in this case a skeleton knowing where to patrol
function *patrol() {
    let x = 0;

    while(true){
        for(let i=0; i < 5; i++){
            x++;
            console.log('Spookus goes right to X: ' + x);
            yield;
        }
        for(let i=0; i < 5; i++){
            x--;
            console.log('Spookus goes left to X: ' + x);
            yield;
        }
    }
}
for(let i=0; i<10; i++){
    patrol().next(); // always goes to 1
}
@AlexMitan Think of yield as a return statement: Function execution stops at the yield. The difference is that calling the function again resumes from the yield point
Right, so it should keep patrolling back and forth, but it keeps going back to 1
So, in your code, after you hit the first yield, where does execution continue? Imagine commenting out the yield
x should be 2, but it isn't
Spookus goes right to X: 1
Spookus goes right to X: 1
Spookus goes right to X: 1
Spookus goes right to X: 1
oh yeah, sorry, my bad
Calling a generator function returns a generator
In your loop, you create a new generator on each iteration (calling patrol())
So, call the generator, hang on to the result, and keep calling next on that
08:32
ah, okay, let's see
oh, wonderful!
thank you, that makes a lot of sense
09:22
there was this theory about a conscience not being able to experience its own end if parallel universe are a thing. Does anyone remember what the theory is actually called, or have links about it?
I think I heard it from @KendallFrey or @rlemon (if not sorry for the ping)
09:33
only one of the kind that I can find of google is by robert lanza, and it seems like a real nutjob theory
I remember there being a more clever explanation
09:44
"quantum immortality" seems like a better thing
10:16
Guys, anyone here good with svg?
function boid(sel, x, y, fill='black', scale=1){
    let bo = sel.append('g') // make it a group
        .append('polygon') // add a polygon
            .attr('points', '0,-20 20,20 10,20 0,0 -10,20 -20,20') // trust me it's like a triangle thing
            .attr('transform', `translate(${x},${y})`) // move the polygon to x, y
            .style('fill', fill)
        .append('circle') // add a circle in the middle
            .attr({'cx': x, 'cy': y, 'r': 10, 'fill': 'blue'})

    return bo;
}
this thing isn't rendering my circles
Fixed, I was appending a circle TO the polygon
11:15
@towc consciousness*
 
1 hour later…
12:32
@towc Quantum suicide?
yeah
Also parallel universes is the wrong term
It's Everett's many worlds interpretation that's the main thing
13:00
this is a really good article: thoughtexperiments.net/quantum-suicide
no spiritual bs
@towc Anything about quantum suicide is kind of spiritual bs by definition.
do you consider Everett's many worlds to be spiritual?
I can't say I've completely understood it
but the logic seems sound
No, I'm a strong proponent of it
isn't quantum immortality a direct consequence of that hypothesis though?
No, because it also required something similar to mind-body dualism
13:06
but in the same way as observing an action brings you inside of the system
Many worlds is basically the idea that there is never any wavefunction collapse or real eigenvalues, we're just experiencing one possible eigenvalue of the universe.
It doesn't explain why we experience an eigenvalue as real, when it isn't.
Universe is a matrix?
matrix confirmed
@littlepootis Quantum operators are
14:14
@rlemon What's up with all the dislikes?
it was posted on /r/shittyrobot
so, reddit
probably.
Another sub to follow, yay!
Oh, it's a robot priest, that explains it
tips hat, m'atheist
@KendallFrey ever finish a mission, start a new one.. fuck up. reflex hit f9 instead of restarting the launch (tipped it)... back to the old mission
because yea. that shit sucks.
lol
what also sucks is that wheels and landing gear seem to be auto-strutted to each other, causing robotic deployment to fail
@rlemon Got any good chrome extension boilerplates?
14:21
no boilerplates
github.com/rlemon/robogist most recent extension
Fuck, that was 7 months ago?
time flies when you're having fun
Basically building an extension that will subscribe to faye(pub/sub server) and show desktop notifications, nothing too extreme
Just read that lol, who the fuck puts prod credentials in a training document
14:26
lol yup
deleting prod is a constant fear of mine
but if you're leaking creds like that, you deserve it
like sure, he missed a step and graciously took the info from the document they provided.. but that's a tiny mistake
the info for prod shouldn't just be handed around like that
especially not to someone on their first day
no, it should be encrypted somewhere
ink and paper are a form of encryption ;D
our developers can see the repos with prod keys, but they aren't in git-crypt, so they can't decrypt the files within the repo
which is actually awesome, they can send us code changes, but can't run anything with real keys
that, of course, requires not keeping the root password in google docs
14:31
Anyone that can help me out with stackoverflow.com/questions/44233546/… ? I've stuck on this for some days now..
Well shit, this sucks
14:53
Hey all. How can I call a promise inside the callback of another promise? This is what I got: pastebin.com/mceSXGvU
Return to the outer promise
But that's what I'm doing right?
Didn't look
schema for settings, [id, setting, value] or [setting1, setting2] (columns)
which one do you guys prefer
?
setting1, setting2, ...setting999
14:58
thanx
No, I'm showing you how stupid that'd be
@ErwinOkken you typically shouldn't, the callback should just resolve the outer promise
Already thought of something like that
ideally, you can promisify the function and then do Promise.resolve(url).then(post).then(...)
:D okay
15:00
Are you sure you need map there?
Doesn't make sense
Because I need line 9 :p
Yeah, but you're only assigning one value, so why are you using map?
Can do that in different ways aswell, but I'll figure it out i guess
What should I use instead?
.then
Ohw okay =)
I don't have access to .then()..
(typescript)
15:07
oh, I think you need to change a few other things. That outer call needs to be converted into an array of promises, which needs to be mapped, so you can resolve from the callback.
You can't do anything async within map, unless you're mapping a list of promises.
Too extreme for me, let's just put that code somewhere else. Looks ugly but still better then inserting code I don't understand
> However instead of using those values, i stupidly used the example values the setup document
Was it like production-db.important-data.company.com that he copied and pasted?
That's the one area the new dev might be at fault, if he or she strayed from the instructions and copied an obvious production config.
Too extreme to do it the right way?
15:27
> I don't have access to .then().. (typescript)
^ wat? :)
You have access to anything you would in JS.
that just means it isn't a promise, which means it needs to be promisified first
I see.
which is why .map is allowed, but .map can't do anything async
So ".then() isn't an option according to TS?" was what it meant, you think?
I interpreted as "I use TS, therefor have no .then()".
and thus, we need to convert the whole thing into a promise<array> or array<promise>, then Promise.map it, and it will work
I took it as the first one
15:33
@ssube You can always arr.map(async func) to make an array of promises to Promise.all
You can, but that'll 'start' all promises immediately. I think it's better to have the functions executed according to a 'schedule' like in Bluebird.map(foo, bar, { concurrency: 42 });
but for small numbers it won't matter
Man, once mushrooms start growing they don't kid around
I would use whichever is more concise and obvious
(also ignoring proper optimizations liek batching requests)
@rlemon aren't mushrooms like the 'flower' and the real bulk is in the disgusting bag of white fungis?
sounds about right
but holy shit.. thursday there was basically nothing
15:37
they'll grow inches overnight with enough rain
I love mushrooms, but that still disgusts me.
I love mushrooms a bit less, now.
in the future, all our protein will be mushrooms and bugs
and I'm ok with that
in a couple days I should be able to harvest them and fry me up some of these bad boys
15:39
colonizing will take like a week
@ssube and soylent green
take a picture of THAT :)
@Luggage yes I don't think I'll eat that...
That's too much. There is nothing to do with all that money.
15:44
blasphemy
15:57
@Vap0r theverge.com/2017/3/27/15077864/… this'll be what brings about the singularity
My god I love amazon
Ordered 5 minutes ago
imgur won't let me post a comment containing "faggot"
> So, a gay line is several straight lines lying on top of each other?
ur a faggot
ohhi
16:10
nevermind, it let me post it
I just had to refresh the page
16:31
@Shrek Yep. @Shmiddty I'd say you still have a chance, yeah
Though to be fair, I'd applied for a different position the first time around and I basically did nothing but send over my resume because I didn't know how to apply for jobs
(It was literally my first and only job application ever. I figured I could talk about why I wanted it if they thought I was qualified - turns out you don't get a screener/interview with a junior's resume and seemingly no real motivation to work at a certain place :P)
var arr = ['a', 'c', 'e'];
var obj = {
  a: 1,
  b: 2,
  c: 3,
  d: 4
};
function select(arr, obj) {
  return arr.reduce(function(memo, curr) {
    memo[curr[0]] = curr[0]; //what i need to change here ??
    return memo;
  }, {});

}
var output = select(arr, obj);
console.log(output); // --> { a: 1, c: 3 }
@Shrek Hahaha, you know the answer to that! (Abhishek is a workaholic and works probably twice as much as a normal person would)
@Shrek No idea. I always rolled my own since my games were always simple
@rlemon love mushrooms 😍
@AivanF. Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
@Zirak Okay, you got me. It's the weekend and that's an interesting one!
We'll see if I can resist clicking another on the page.
16:36
@SomeGuy Remember that I sent you a screenshot of like 15 open tvtropes tabs? I'm still on that streak
Or rather session
It oscillates wildly between 4 and 24 open tabs
i am getting this { a: 'a', c: 'c', e: 'e' }
Hahaha, nice. It must have been a long time since you last partook
Question: everyone reads in a breadth-first search way, right (with the occasional peek)?
1 message moved to Trash can
@GokhanDilek Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
I've been wondering how that differs from site to site. I think I go depth-first on most Wikipedia pages, but blogs and other reading will be breadth-first (unless it's like pre-requisite material)
document.addEventListener('keydown', function(event) {
if (event.keyCode == 37) {

myFunction();

}
}, true);

I have this. If I hold down the left key, my function is triggered multiple times. How can I make sure it is only triggered once if I hold the key down?
16:40
on keydown remove the event listener, on keyup re-add it
or use a flag or something
@Zirak TVTropes is the original clickbait
Except you don't (always) feel like shit for falling for it, I guess :P
@SomeGuy I think it depends on text topic and reading goals. When you google something really necessary you try to use any helpful info and read depth-first. But if you want to sort out a new knowledge field than you prefer breadth-first reading.
 
2 hours later…
18:18
lovely
> tutorial:
TODO: explain
18:31
Is it "spread syntax" or "the spread operator"? MDN is all over the place with naming.
I don't think it's technically an operator, but I could see it being called one.
Some users are dead set on calling it "syntax", but is it okay to use both?
I'd prefer syntax
Okay, thanks
syntax is its usage, operator is the thing itself, I'd have thought
[...stuff] uses spread syntax because it makes use of the spread operator
... is not spread syntax, it's the spread operator
I guess in my head it's kind of like you had a .js file in your system. That file should be in js syntax and contain valid js, but node is the js "operator"
18:42
@towc ... isn't an operator, though, is it?
No, it's definitely not
an operator can only return a single value
19:09
@KendallFrey spread never truly has to return multiple values, it's always an array
19:32
!!define operator 2
@towc operator One who operates.
@towc operator (mathematics) A function or other mapping that carries variables defined on a domain into another variable or set of variables in a defined range.
well, that seems within the definition
I guess you could always look at it as an internal command of the AST that alters the tree's structure...
but I'm probably saying something stupid
@ssube Yeah but you can't treat it as an array. You can say that its input is an array, but there's no output value in the sense that you could substitute the expression with the value.
i.e. you can't replace [...x] with [y] for any value of y except for the edge case where x has a single element.
and you can't do let y = ...x;
 
1 hour later…
20:51
netflix can't just release whole seasons like this
it's sadistic
21:03
by that idea, a tool that made a copy of you to another rick-and-morty like dimension which will never interact with yours is not a real tool because it didn't affect the context it was used in for the people who created the tool
@Mosho are you talking about the new Sense 8 season?
it's super gay (kinda literally) but so good
@SterlingArcher that's old news
@towc That definition doesn't mention that operators have the same domain and codomain
talking about house of cards
oh i didn't really get into that show
21:04
Spread doesn't have that property
@SterlingArcher yeah, as an american it's probably hard to face the truth
& I'm honestly not sure what you'd say that the codomain of spread would be
@Meredith uhmmm they don't have to
Yes they do
That's the difference between an operator and a function
21:05
only in groups
from quora:
> Operators can be defined as functions whose domains and co-domains are vector spaces
@Mosho nah politics bore me and I don't understand them
@Meredith Is == not an operator, then?
oh well, that says you're right..
oh well, TIL
@SterlingArcher how can something you don't understand bore you
@KendallFrey It is yeah
21:07
I thought operators and functions were the same thing, and it was just a different way to look at it
That sounds like a mathematical definition, not a programming definition
one maps, the other leads to, if that makes any sense
Because the left and right values are converted to booleans first because == only operates on booleans
@towc operators have things that functions don't, like associativity
@KendallFrey well, it would agree with you. Let me look for a CS one as well
21:07
@Meredith are you fucking high
@KendallFrey uhmmm do they?
I mean it's true
4
Q: Operators vs Functions in C/C++

PKGSomeone recently asked me the difference between a C++ standard operator (e.g. new,delete,sizeof) and function (e.g. tan,free, malloc). By "standard" I mean those provided by default by the compiler suite, and not user defined. Below were the answers I gave, though neither seemed satisfactory. ...

@Meredith Let me test
a == b doesn't necessarily make sense so the spec requires it to be interpreted as ToBoolean(a) == ToBoolean(b)
21:08
!!> 4 == 5
@KendallFrey false
!!> Boolean(4) == Boolean(5)
@KendallFrey true
in CS it's just the way you call them...
21:09
Hold up let me check the spec one sec
with == first the type is checked. If it doesn't match, then the truthiness is checked
or well, not really
!!> '5' == 3
@towc false
this still returns false. It somehow tries to make one into the other
It's an operation on numbers my bad
The point remains, 3 and "foo" are in the operator's domain, but not its codomain
21:11
!!> var x = {}; x.toString = () => '3'; console.log( '3' == x, x == '3' )
@towc "undefined" Logged: true,true
so, if one of them is a string it tries to get both as string?
@Mosho pretty easily actually -- I don't understand women, yet, they still bore me
The operands are ToNumber(3) and ToNumber("foo")
21:13
I disagree, those aren't the values supplied to the operator
That's part of the operator itself
Yes they are
oh lol, Number({toString:()=>'3'}) === 3
You have to convert them before they're supplied to the operator
No you don't, watch
!!> 3 == "foo"
@KendallFrey false
21:14
You're deliberately missing the point
== doesn't operate on 3 and "foo"
It operates on ToNumber(3) and ToNumber("foo")
It does, that's exactly what I gave it
the equality check operates on those values, but == isn't just an equality check
I think Meredith's point is that the V8 tries to overload the operator with the parameters, and in doing so converts them. It's up to the reader to decide if that's because the operator did it by picking the type of parameters, or if it's V8 preparing parameters for the operator
That's a completely useless argument
!!> 1 + '1'
@Meredith "11"
Oh I guess addition isn't an operator in javascript
21:16
What?
What about +?
Or maybe everything is if you make the spaces so large they include every possible type
1 isn't a string and 1 + '1' is
Time: 5111ms
god bless you webpack
But it's still an operation because the operands are ToString(1) and ToString('1')
errors can be used as parameters for most operators, so if something errors out it's still within the domain, right? :P
!!> (new Error) + ' heh'
@Meredith You're referring to a mathematical operator, or an operator in the context of the language?
21:17
@towc "Error heh"
An operator within the context of the language
Under your definition there are no binary operators in javascript because there aren't compile-time type checks
Uh, no, what do you think my definition is?
Oh you're the one saying the codomain and domain don't need to be the same?
Because that was shown to be wrong a long time ago
So then you're not even making a case for anything
Yes, that's what I'm saying
I must have missed the part where it was shown to be wrong
It's literally in the wikipedia article for operators
21:21
Mathematical operators, or programming operators?
Mathematical
That's not what I'm talking about, I thought I made that clear
Weren't we talking about JS the whole time? I was.
22:06
@KendallFrey you almost never talk about your life. Is everything ok?
No, KSP is "broken"
condoleances
I've done so much debugging today
This is ridiculous. I want to play KSP so bad that I'm about to try to recompile a mod that I don't need but that fixes an incompatibility between another mod and a limitation in the base game.
22:44
...holy crap it worked
23:13
gah, so close to redirecting
this.props.history.go(`/waiting/${data.id}`);
This only refreshes the screen, I know I'm close though

« first day (2422 days earlier)      last day (2753 days later) »