« first day (1714 days earlier)      last day (3459 days later) » 

17:01
@ssube Thats the question...I'd use PhoneGap to make it look like an app but, I like the how an app can be used offline or without internet. Thats why I kind of want to do it that way.
@royhowie A lot
@argentum47 I reviewed the repo code and it needs some work so that you can work on it easily. I will do a refactoring round next morning and add you as a collaborator, and also setup a branch for you to work on. Expect major changes next time you see the code :)
!!afk night
I'm not opposed to doing it like a website and using PhoneGap.
@MadaraUchiha i went through that MDN link. I tried to use className to alert my css class name. But it's just showing blank alert. jsfiddle.net/vqs1qrh7/22
@ssube: Does my design seem pretty straight forward? Does it look like it would be pretty easy to code up if I went with html etc.
17:09
@benlevywebdesign Your design seems simple, your explanation makes no sense.
...explanation of what part...
@benlevywebdesign Have you heard of AppCache and Service Workers? If not, good news, you can have offline webpages.
"website type application"? "my design isn't really fit for a website"?
"how would that work if I store information in a database?"
you want this website, that can't be a website, to be an app, but with a database, except without the internet or a database, yeah?
@zirak don't you need to be online at some point to and then once you view the page?
@benlevywebdesign you have to be online at some point to install an app, too
I suspect you're optimizing too soon
17:13
@ssube Can I have that with a large bananalicious to go?
!!s/ban|icious//g
@KendallFrey @ssube Can I have that with a large anal to go? (source)
Dammit cap, I told you I'm not putting it in your robobutt
Isn't that what you told @KendallFrey?
the only thing he said was "no"
17:15
@ssube: I have two ways I could go about my project.
no, Kendall is human, so it's less creepy
(I hope Sterling's on lunch right now)
I could do a native app. Then once you have it you don't need to be online. The other way I could do it is through making it as a website. Then if I want to use PhoneGap or something else to make it look like an app I could. If I was doing something that didn't need to use a database I could use only local files and you could be offline if you wanted and the PhoneGap-ed app would still work.
still not about butt stuff, so you're both out of luck
robot or otherwise
butt today is gay marriage day
17:16
That should clear things up!
(Just saying, but gay marriage has been legal in Canada for over a decade)
goml
@Cereal yeah, but your bacon is still a lie, so how bout you fix that before you tell us what to do?
bacon is delicious
@Cereal yeah ikr
I won't go bacon your heart. I couldn't if I fried!
17:25
fry'd heart.
Anyone here good at geometry?
Just share your query
@Cereal decent, just ask
Sec, getting screenshots and data
I'm good at analytical geometry..
17:28
Okay
@Cereal ooh, that there's a square
I dun know me mah shapes
I need the polygon to fit inside the square. Currently I check the distance from the middle of the polygon to the edge of each point and store the largest value. Then I get the angle that point is on, and calculate the hypotenuse and use that as a width. So I end up dividing that calculated width by the max width or height.
http://sfist.com/2014/05/19/silicon_valley_recap_youre_gay_for.php <- dat URL slug
This results in
you want an AABB
iterate over each point, save the lowest and highest X, the lowest and highest Y
those make the points of your square
17:30
In geometry, the minimum or smallest bounding or enclosing box for a point set (S) in N dimensions is the box with the smallest measure (area, volume, or hypervolume in higher dimensions) within which all the points lie. When other kinds of measure are used, the minimum box is usually called accordingly, e.g., "minimum-perimeter bounding box". The minimum bounding box of a point set is the same as the minimum bounding box of its convex hull, a fact which may be used heuristically to speed up computation. The term "box"/"hyperrectangle" comes from its usage in the Cartesian coordinate system, where...
Save the lowest and highest?
yep
It's not a polygon..
o wait
is it a polygon?
crl
crl
17:31
@Cereal Are your calling that potato shape a polygon?
I didn't know what else to call it
it looks like a spline or bezier
._.
crl
crl
anything but a polygon
It's arbitrary points
17:31
a function
crl
crl
poly = multiple, gone = angles
Actually, it's a length from the center for 360 degrees
let xMin = 0, xMax = 0, yMin = 0, yMax = 0; let (p of poly.points) { xMin = Math.min(p.x, xMin); ... so on }; return new Square(xMin, yMin, xMax - xMin, yMax - yMin);
@Cereal it's a line in the picture, what is the relationship between the points and the line?
@KendallFrey Each point represents y radius at x degree.
Which makes a potato
err
17:33
so is the input a polygon or a function from theta to r?
if you can render it, you have x/y coords
Sorry, I oopsed
if you have x/y coords, you can build a minimal bounding volume
since you want a box, use an AABB square
don't overcomplicate it
i.e. do you have access to the function which generated these points? it doesn't look random
@KendallFrey Yes
17:35
because if you do, calculus would probably be the most accurate solution
Kind of
crl
crl
right, maybe it's a polygon, if you have tons of points, because it looks well curvy
@Cereal oh, please, give that function
I translate an array of radii into an array of points. I don't have access to the function that outputs the array of radii
if f is the function from angle to radius, then sin(theta)*f(theta) gives you the y coordinate, and similarly cos for x
17:36
@crl polygons don't have curves
@Cereal ah, ok, forget that then
so you essentially have an array of polar coords?
or do you have the x/y precalculated?
I have x/y points going into the draw function. I'm trying to write a function that scales it such that it fits perfectly into the box
ok, then just calculate the min/max of each of the coords
crl
crl
simply
What @ssube said
17:40
right
Makes a lot of sense. I should have stayed awake in math class.
you'll get a square that perfectly wraps the curve
that is, every side of the square will touch the curve in at least one point
buoy i am so drunk..
He wants to scale the graph of the function
to fit the square
github.com/duckduckgo/duckduckgo and then this makes me sad...
why couldn't they write perl in javascript
17:42
@argentum47 JavaScript obeys the laws of temporal causality. Perl does not.
oh wait.. I actually mean why didn't hey write it in js ... pardon the question
Hm, scales it too much
let me see if I can read it :P
find the extremities of the potato, find the distance between 'em, find the relative lengths of the side of the square and the distance between extremities, and scale the potato to its inverse.
It's skrewing up getting the min of the height and width
Because x is 0 at the top and bottom for example
oh
because I'm retarded
brb
17:49
I'm back
Oh, no, that's the problem
@ton.yeung You haven't permission OR the file doesn't exist.
ENOENT stands for Error No Entry
np :)
@Cereal wat
@ton.yeung Are you using a relative path, and if so, you have to type ./ before the path/file
@ssube Each point is an x,y value relative to the center of the displayed box. Therefor the x @ 90 degrees is going to be 0.
17:53
@Cereal some of em will
That makes xMin and yMin moot doesn't it?
@ton.yeung . means the current directory, ./ means inside that directory
in this case, sure
in the general case, no
It's scaling it too much, this way. Scaling factor I'm getting is ~.55
@Cereal post your code brah
17:56
It's not javascript
so?
Hold on, I think I have a rogue #scale call somewhere
@ssube
  float getScale(Extent ext) {
    float wMax = 0f;
    float hMax = 0f;
    float h = ext.h / 2;
    float w = ext.w / 2;

    for(PVector d : data) {
      wMax = max(abs(d.x), wMax);
      hMax = max(abs(d.y), hMax);
    }
    float wScale = wMax / w;
    float hScale = hMax / h;

    return wMax > hMax ? wScale : hScale;
  }
Almost works.
I would return max(wScale, hScale)
Right
Functions
Good things to use
it's not about the function
18:09
Oh that fixed it
Thanks guys
Once again, you all make me feel like a novice
@KendallFrey shouldn't it be min?
max would cut some sides off
i don't think so
educated guess at the intent of the code yielded max
@Cereal you definitely can't use abs(d.x)
that will break the entire thing
you want the actual min and max
if those are negative, offset later
I'm pretty sure abs works in this case
that circular shape is oddly simiular to troll face shape
18:15
Any of you wear glasses?
@SterlingArcher It's a lens for an aviator style lens
trollhead
@Cereal don't use abs
either all your coords are > 0 and it won't help or they're both above and below and it will break
either way, abs is bad
@ssube But both the objects are centered. The lens is in the middle of the circle. Using abs would give me the distance between the center point and the edge, as a positive number
18:17
Hi, is there any way I can add CSS background-image and background-size to my SVG path?
@Cereal you don't want distance, you want min/max
I've seen the stuff on patterns, but they don't help if I can't use the background-size property.
find the bounding box, then find the scaling between boxes, then apply that to each point
you're complicating it way too much
It's not complicated at all?
I'll compare these results to what you're proposing
find the min/max x/y for all the points in your poly. That is the minimal box surrounding it. Find the size difference between the two boxes (divide width and height). Scale each point by the width/height ratios.
18:20
Yes that's what I'm doing, but I was skipping min because they're always zero.
@Cereal not in the picture you posted
Yes they are.
the left points don't touch the left side of the square
Anyone have any ideas? I'm using Raphael JS.
@ssube Doesn't scale properly with your change.
18:23
@Cereal use min instead of max for your scaling
That's even worse
Though the two middle ones are mirror'd, unlike the top picture
what is your global w/h doing?
in fact, wtf is your scaling doing at all?
@rlemon I can't justify why I clicked it twice.
Wait, I typo'd
  float getScale(Extent ext) {
    float wMax = 0f;
    float hMax = 0f;
    float wMin = 0f;
    float hMin = 0f;
    float h = ext.h / 2;
    float w = ext.w / 2;

    for(PVector d : data) {
      wMax = max((d.x), wMax);
      hMax = max((d.y), hMax);
      wMin = min(d.x, wMin);
      hMin = min(d.y, wMin);
    }

    float wScale = (wMax - wMin) / ext.w;
    float hScale = (hMax - wMin) / ext.h;

    return min(wScale, hScale);
  }
float getScale(Extent ext) {
    float wMin = 0f, wMax = 0f;
    float hMin = 0f, hMax = 0f;

    for(PVector d : data) {
      wMin = min(d.x, wMin);
      wMax = max(d.x, wMax);
      hMin = min(d.y, hMin);
      hMax = max(d.y, hMax);
    }
    float wScale = (wMax - wMin) / ext.w;
    float hScale = (hMax - hMin) / ext.h;

    return min(wScale, hScale);
  }
18:26
125
Q: Can Stack Overflow and Meta's logos be changed temporarily to the "#LoveOverflows" logo?

TimStack Exchange just tweeted this image following the Supreme Court of America ruling in favor of gay marriage: #LoveWins #LoveOverflows Please can this be made the logo for a couple of days? I'm thinking Stack Overflow and the localised ones. I've made a SVG format - here it is. And here is...

awesome
@BenjaminGruenbaum just got changed
why should developers b concerned about love and marriages and gay marriages
Because you're a decent human being
18:30
the same reason short order cooks and postal workers are.
@ssube yeah, that's why I posted it
@argentum47 Because people can make up their own minds now
it's less evil than jQuery.
Now gay marriage is legal, next they might even let developers get married.
18:32
yea, because some legislation is why i'm lonely..
I like it
I think they should keep it.
@Luggage no, that's cause you don't have hair and your head is asymmetric
nerd marriage is actually legal now, it's just not a common practice
ah .. that jquery thing make sense
18:34
@ssube - developers marrying other developers. ~~shudder~~ — Oded ♦ 1 min ago
Just think of the pedantic arguments they'll have.
@Oded so long as they write up the requirements before the wedding, that could be a happy and efficient union. — ssube 56 secs ago
"well, actually.."
!!youtube um actually
Ohh, I didn't read about the supreme court ruling. That IS news.
much more than the SO logo
@Luggage that today and obamacare the other day
I'm starting to suspect that people are more liberal during the summer
I love how since I joined the chat I had never had a downvote but since I did I've had serial downvote reversal 3 times
I don't even pay attention to my SO profile
I'm a sucker for notifications, I thrive off them
It's the facebook syndrome I guess
18:46
@ssube the people that actively deny other's rights are all getting old and dying.
@ssube - You kid but having a project plan with requirements is actually a really good way to plan a wedding. — BSMP 11 mins ago
@Luggage good
"Not everyone are entitled to be married" this is why we can't have nice things — Sterling Archer 7 secs ago
@SterlingArcher True dat. Marriage unfortunately carries with it some legal benfits and as long as that is the case everyone should be allowed one, in my opinion.
You can have sex with a sheep for all I care, just don't tell me or show me
@KendallFrey Sheep can't consent, that's different
18:54
Exactly, I know being married carries huge tax reliefs that could cripple a household
Sheep can't say no
@KendallFrey The absence of a "no" is not consent
I know :P
Hate speech? exaggerate much? How is being in favor of gay marriage being hate speech to others? — Oded ♦ 6 mins ago
@SterlingArcher dear lord some of the downvoted answers
18:57
Found the thumpers
@SterlingArcher depending on the situation, it can actually make life worse. Never marry someone who makes about the same amount you do.
Because not letting me deny other's rights is infringing on my right to be a jerk.
Fruitdome of reach hurr durr
I assumed making about the same amount would be good
as opposed to a very lopsided income where one side feels the other is supporting them
ohh, i see, you want her to feel indebted to you.. j/k :)

« first day (1714 days earlier)      last day (3459 days later) »