« first day (1913 days earlier)      last day (2949 days later) » 

2:03 AM
@El'endiaStarman TIL my brain consists of 3.25×10^17 yottabytes of information.
But that's not even golfed...
@HelkaHomba I think that's talking about average brains. I'm not sure you fit that.
github pages isn't updating =/
@QPaysTaxes Not until the design
Ok I need help peooples.
@HelkaHomba you know the weight and entropy of your head to 2 decimals?
2:06 AM
@orlp (I just converted 2.6*10^42 bits to yottabytes)
My Code here. I've got my alien movement equations working/implemented (the green lines are for debugging). How can I set a fix speed for the aliens? I currently am just incrementing the x at a fixed rate but of course this means that the shorter the x, the larger the y, the faster it will go.
I'm average enough
@AshwinGupta make love, not war man...
dont click
The thing didn';t update
@orlp that isn't an option.
2:07 AM
@HelkaHomba pls gief new challenge
@HelkaHomba I know you want to post one...
@Geobits I'll take that as a compliment
@HelkaHomba It was deliberately vague, so that's fine. It's what an average person would do, at least.
@orlp Try to make an omelette from scratch with one hand
@QPaysTaxes I'm pretty sure that's actually a main site challenge.
Challenge: Given a Chappelle Show screenshot, name the character he's playing. (example given: Ashy Larry)
2:10 AM
Ok now I got it working
can someone tell me how to fix i?
... got it working... problem... does not parse.
@EasterlyIrk OHAI
@Geobits browser?
2:11 AM
what does it say?
or do*
What are you doing that doesn't work in Chrome?
@AshwinGupta You just said you got it working
Its working
for me
I'm so lost right now.
you went there right ^^???
2:12 AM
@QPaysTaxes lambda c:[i*a for i,a in enumerate(c)][1:]
By the way, I haven't looked at your code, but I'd guess that you event.preventDefault() on every keypress....which means I can't F5 to refresh.
given an array of coefficients, least significant first
@AshwinGupta works for me, what's the problem?
@El'endiaStarman oh yeah, I did do that. You told me too xD
@HelkaHomba okay good its working, i had a problem w/ alien movement
Oh, they aren't moving
2:13 AM
@AshwinGupta Yeah, do it for spacebar and the arrow keys, not for all keys.
so basically what it is, I calculate a y=mx+b equation based on the line I want the alien to follow
I don't know what it's supposed to do/not do, so I don't know what I'm being asked.
then I increment the x at a fixed rate.
Mine follow the green lines and stop at the end.
But... problem is, that means that when the y is longer, x is shorter, it appears to moves quicker
@Geobits for now its intentionally like that. But read my last message.
How can I get them to move at a fixed rate.
2:14 AM
Normalize the movement (x/y vector) and multiply by a set speed.
Based on the length of the line, not the x distance.
@Geobits so you mean just take the slope and multiply by speed?
x will be fractionally incremented based on the slope of the line
If the slope is normalized, sure. It's been a long time since high school and I don't use slope much any more.
@HelkaHomba okay I see
@Geobits well its a short time till I go to high school so I don't know much about this stuff :P
Alternative solution I just brainstormed: could I calculate length of the line (using pythagorean) and then do speed based on that?
@QPaysTaxes 12x^2 -1x is [0, -1, 12]
2:17 AM
@AshwinGupta That's what I would've suggested.
4 mins ago, by orlp
given an array of coefficients, least significant first
@AshwinGupta You know how to find distance, right? Divide both x and y by the overall distance, then multiply by your speed.
@El'endiaStarman I may go w/ that cuz I sorta know what to do.
@Geobits yeah. I didn't know the term but the math makes sense.
did you listen to what I said?
Okay i've got some ideas here
I think I know what to do
2:18 AM
>>> D = lambda c:[i*a for i,a in enumerate(c)][1:]
>>> D([0, -1, 12])
[-1, 24]
thanks people will report back w/ results
@AshwinGupta what broke?
@Maltysen besides my head? Nothing really, just implementing movement and running into problems.
@Maltysen def f(n):k=9**n;return k**-~-~n/~-(k*~-k)%k
@orlp what is this?
2:19 AM
try that out for some n in your interpreter
@QPaysTaxes orlp probably wrote his solution before you updated the challenge. :P
@El'endiaStarman he updated the challenge?
@Maltysen I'm using linear (y=mx+b) equations for aliens to follow to a certain random point. At fixed interval, the x is increased and the y is calculated. Problem is, when the y is longer then x, the aliens appear to be moving much faster then the others.
> Chat challenge: Given a polynomial function, return its derivative.
@QPaysTaxes yes it is
2:20 AM
@orlp what does it do?
It's pretty standard to have flexible IO on this site.
@Maltysen did you try it?
no pattern detected?
oh I should mention
Python 2, not 3
@orlp o_O
longs don't unpromote?
2:22 AM
@orlp Are the precedence rules (and the use of /, not //) the reason it doesn't work in Python 3?
@Geobits "divide both x and y", so add them and then divide by distance? Or individually divide by distance?
@El'endiaStarman only / vs //
@El'endiaStarman python3 doesn't have a specific long type
@AshwinGupta ah this is trig
instead of using equations of lines, use sin and cos
@Maltysen but the long part is besides the point :P
2:23 AM
@AshwinGupta So if the line was (3,4), you'd have a normalized (0.6,0.8). Then multiply by speed (tweak for best results).
@orlp Well, if that's the only difference, then shame on you for using Python 2 instead of 3. :P
@El'endiaStarman 1 byte man!
@Maltysen I know some basic trig, I'm like 3/4 through geometry. I can use sin, cos, tan, and the inverse functions
that's 8 bits
oh fibbonacci
2:23 AM
do you know how many starving children in africa we can feed using those 8 bits?
@AshwinGupta so instead of using m for the angle, use an actual angle theta, and then do x = cos(theta) and y = sin(theta)
@orlp Errr.......hey @Geobits, how many bits do you eat per day?
@Maltysen Oh got you, I'd have to restructure a bit here. Think the restructure is worth doing? Or should I keep going the way I am?
@El'endiaStarman Far more than eight.
@AshwinGupta or if you wanna use m, first do theta = atan(m)
2:24 AM
@Maltysen you don't think that's curious? that that function calculates fib?
@orlp Less than one, apparently.
@Maltysen yeah that would probably save my lazy butt some work. But maybe I should just restructure
@orlp i hadn't looked at it yet, but now that I have, wtf is going on
@AshwinGupta or make a unit vector
so you don't have to do trig
@Maltysen don't know what that is =/
take x and y and divide both by sqrt(x*x+y*y)
2:26 AM
so pythagorean theroem?
but if you're going that far to avoid restructuring, just do the atan thing
@AshwinGupta yeah, that's where it comes from
Got you
@Maltysen magic :)
Hold on, i'm going to look into restructuring here though, it may save me trouble later down the road w/ this.
@AshwinGupta sqrt(x*x+y*y) is the length of the vector, so if you divide by it, it'll make the length 1
2:27 AM
@AshwinGupta It's what I've been telling you to do.
@orlp That's why I didn't bother trying to understand it. :P
@Geobits oh now I understand. Sorry the math terms get to my head sometimes :P
Lots of games use vectors for movement, so don't feel you need to restructure to use trig.
in fact, trig is for making a vector from an angle and a speed
Ok ok hold on...
2:29 AM
@Geobits and all games use linear transformation matrices with homogeneous coordinates, that doesn't mean a beginner should do it that way
@orlp Sure, but vectors are drop dead easy :P
That was alot of stuff. Let me just make sure I got this (and Geo and Malt are on the same page)
Use theta instead of slope.
Then use length of line (pythagorean) to determine speed
@AshwinGupta the only reason for using theta instead of slope is so you can generate them better
@Maltysen what do you mean generate them better?
cuz theta is in range [-90, 90] m is over R
2:31 AM
(-inf, inf)
K I think this may be a good time to remind everyone that i've only taken math through Geometry =/
he means โ„
@AshwinGupta here think about it this way, what m will you need to go vertical?
2:32 AM
@AshwinGupta m, not theta
the answer is that you can't / infinity
Sorry just closed out
undefined isnt it
or 1?
but he's too cheap to use proper ๐•Œโ„•๐•€โ„‚๐•†๐”ป๐”ผ
no horizontal is 1
@Maltysen * ah got it
@AshwinGupta horizontal is 0
2:33 AM
right, jk
Not an idiot, I swear I knew that lol
so, if you're generating theta, you can just make a unifrom random number from -90 to 90
that is probably ALOT better then what I'm doing
m gets more and more steep as it gets higher, and the distribution gets all weird
I'm randomly picking an x and y.
if you make a random angle with random length
you don't get an uniform distribution
2:35 AM
So I can just randomly generate theta, then generate the length I want the line. Then use cos() sin() to get x and y right?
@AshwinGupta just sin and cos
@orlp ofc not, thats fine IMO
@Maltysen thats what I meant
that's what they do. cos gives you the percentage of an angle in the horizontal direction
and sin gives you the percentage in the vertical direction
then just multiply both by your speed
ok good :D
the correct way to generate a random point in a disk
is generate a random angle tau
2:36 AM
and add?
generate a random r [0, 1]
@orlp we had a challenge on this or something, didn't we?
then your x = length * sqrt(r) * cos(tau)
y = length * sqrt(r) * sin(tau)
if you don't do the sqrt you get the problem on the left
@AshwinGupta no you have separate speeds in the x direction and separate speeds in the y direction
2:37 AM
@orlp that's prolly good for him
@Maltysen oh right I'm getting rid of the y=mx+b I forgot
i don't think he wants uniform
Well ty this has been very informational
@Maltysen I don't really care either way honestly.
@orlp an easier way is to generate a random point in the enclosing square, and repeat until it's within the disk
@aditsu fuck ninja'd
what I wanted to say is
2:38 AM
@AshwinGupta haha, k. do the aliens wrap?
the fastest way to generate random points is generate a random point and reject until the circle
@Maltysen havent implemnted it yet but maybe
@AshwinGupta then you might wanna only do angles in the range the prevents it from going out of the screen
if you do like 89 deg, they'll leave
@Maltysen yeah you are right, I'll figure that out
I better start programming this otherwise I'll have to wait until like monday =/
ok brb
@aditsu def f(n):k=9**n;return k**-~-~n//~-(k*~-k)%k
2:40 AM
right, tommorrow is monday D:
I actually came up with both of these solutions to the problem of uniformly sampling a disk to answer an interview question! (It was via email, btw, not in person.) The interviewer said that, apparently, my solutions were creative, and the first time he'd seen a solution to the problem. Apparently, this is a hard thing to do. :P (And I still didn't get the job! >_<)
@Maltysen :(
@Maltysen yeah except remeber, I have 8 hours of school before I get back to my program...
@orlp wat
2:42 AM
@El'endiaStarman Sorry to hear you didn't get it. :( Cool that the interviewer liked your solution though. :)
@AshwinGupta oh, I was merely expressing extreme sadness over that fact
@aditsu cute, isn't it?
@AlexA. Oh well, their loss. :P
@Maltysen well yes that too
@El'endiaStarman Definitely
2:43 AM
@El'endiaStarman did you find something else yet* or still looking?
@El'endiaStarman "the first time he'd seen a solution" -> you clearly didn't fit in with the rest of the team
@AshwinGupta It's been something like 9 months since then and I'm still looking. :(
@El'endiaStarman aw sorry dude, don't worry, best always comes last.
@aditsu ...I like that way of looking at it. :P
I currently have a job but I've been looking for a different one for almost year and a half. ._.
2:44 AM
@El'endiaStarman yeah close-minded people have difficult accepting genius sometimes...
@AshwinGupta The Marriage problem would disagree with that. :P
@El'endiaStarman :D LOL
@AshwinGupta I'll bet the close-minded person was not the interviewer, but his boss (or their boss, etc.). :P
Stupid question: How do I generate a random number between -90 and 90 in js?
Math.random doesn't let me do that?
@El'endiaStarman normally the case honestly.
@AshwinGupta You can do Math.random()*180-90.
2:47 AM
@El'endiaStarman probably for the best you didn't get stuck there though. It would suck to be stuck in a job where you aren't allowed to use any creativity.
@AshwinGupta take math.random, * 180 - 90
@El'endiaStarman right duh. Ty
@orlp so that's a Fibonacci function? why did you want to show it to me?
@AshwinGupta Yeah, perhaps.
2:48 AM
@aditsu yes, it's fibonacci, and I just found it intriguing
I was about to ask if it was alright to convert floats to ints when its value is integer, given that there are no operations that act differently for ints and floats, when I remembered that all three spreadsheet programs I've used (Microsoft Office, Open Office, Google Docs) do that, and it's annoying for aesthetic reasons.
3:02 AM
we don't have mathjax, right?
@El'endiaStarman using the format menu doesn't work?
$f(x) = x^2$
put "start chatjax" on your bookmarks
@orlp I was talking about in an actual challenge
I'm sure code blocks are fine
@Maltysen Who needs MathJax, when you have monospace, ASCII, and enough determination
3:12 AM
@Maltysen Yeah, there are ways to format such numbers properly, but I was thinking of the default behavior.
@QPaysTaxes Agreed.
Incidentally, I also have ChatJax/MathJax. :D
@Downgoat I don't have enough determination
@Downgoat the question isn't stacksnippets vs. mathjax though. its mathjax vs. using $() instead of jQuery() in stacksnippets
Solution is to not use jQuery
or to fix MathJax
Why doesn't SE fix MathJax??
brb, writing rant on meta
@Downgoat you can still use jQuery, just not its alias
jQuery is bad you should never use it
jQuery is horrible
jQuery is worse than JavaScript
3:15 AM
MathJax also broke search
fuck, precedences on Cheddar broke ;______________;
this is veeerrrryyyy bad
@QPaysTaxes are you trying to make an rng out of humans?
@QPaysTaxes เฒ _เฒ 
what is "Blame"?
Does it let me find who to blame for cheddar breaking?
@Downgoat yeah, all the entries in there will be you, and it'll be correct :P
เฒ _เฒ 
@MarsUltor ShuntingYard in Cheddar broke
3:22 AM
why does it say build:passing?
@Maltysen because the build is passing
Hello @Doorknob!
@Downgoat I thought you just said something was broked ;P
@Maltysen yeah.
@Downgoat then why is it passing?
because the code isn't borked, just the functionality
3:24 AM
I don't have tests set up though, I really need to do that
Right now travis is just building and pushing to heroku
@EasterlyIrk Please stop pinging me for no useful purpose.
A: Sandbox for Proposed Challenges

Matthew CliattWhy did I come to Sandbox? I have a very specific challenge, and I wanted to see if it was too specific. The challenge is to output "Valdosta ACM" using the shortest number of characters with the BrainF**k programming language. I've noticed it isn't the norm to specify a programming language...

3:39 AM
@QPaysTaxes Doesn't google customize search results for you...?
Q: Taylor Series of a Function with Periodic Derivatives

MaltysenTaylor series are a very useful tool in calculating values of analytic functions that cannot be expressed in terms of elementary functions, using only information about that function at a single point. In this challenge, you won't be actually doing any math with them, but merely making string re...

how should Cheddar take STDIN?
from stdin
... that seems like a self-answering question
yeah but should it have a function? preset variable? an import with the stdin/stdout functions?
Tethering of your phone could be more reliable
@QPaysTaxes they test it as well as user46049 juic avocad

« first day (1913 days earlier)      last day (2949 days later) »