« first day (1110 days earlier)      last day (4063 days later) » 

20:00
is this what you meant by 2d?
Has anybody encountered a gaming engine/library that actually handles Android web views well? Been messing around with Phonegap but it definitely seems native web view canvas isn't going to fit the bill until Google rewrites the entire implementation.
No, I mean 2D as in 2 dimensional
Not just a line
@ErikReppen check out cacoon.js
Oh, there we go
or even better construct 2
make your game and distribute on android/windows/linux/apple/etc
20:02
Whaaat
it uses cacoon.js for the android implementation
I told my wife I wanted some t-shirt from there shop.github.com
keeps changing
so she discovered the github logo
@rlemon reduce it to a single particle for testing.
20:02
... told me it looked like hello kitty
If it orbits in an ellipse, it's correct.
I'm going to make something awful and disgusting and call it raccoon.js
Hey, it actually looks reasonably accurate
@twiz lol
Most of the particles are above escape velocity though
20:05
hrm
I'm pretty sure the particles are 1. gaining energy near the host 2. precessing backwards
I think you can fix that by applying half of the acceleration the current frame, and half the next frame
@Loktar but seriously, that cacoon thing looks pretty cool
@Loktar Thanks. I was looking at that but was having trouble finding info. Do you know what they use to handle the canvas ish? I saw some openGL plug-ins that basically put a canvas API on top of things but they seemed somewhat limited.
Do you know if its free?
yeah the use opengl
iirc its free
I used the beta
yeah its free
20:08
It sounds like they use the same business model as phonegap, but their site isn't very clear
Can you move the simulated canvas around like it was HTML?
@ErikReppen not sure
Oh, I think I know what the problem is
jsfiddle.net/rlemon/8ryB8/16/show @KendallFrey @Loktar look ok?
I didnt test it extensively just tried a few of my demos with it
20:08
maybe.
@rlemon lol looks nutty man
I think Cocoon is free for now. So you could use it and publish and not owe them anything. Pricing model pending basically.
CelestialBody.prototype.attract = function(body2){
    var dist = distance(this.position, body2.position),
        ang = angle(this.position, body2.position),
        G = 1,
        force = G * body2.mass * this.mass / dist / dist;

    this.velocity.vX += Math.cos(ang)*force/body2.mass;
    this.velocity.vY += Math.sin(ang)*force/body2.mass;
    body2.velocity.vX -= Math.cos(ang)*force/this.mass;
    body2.velocity.vY -= Math.sin(ang)*force/this.mass;
};
What's wrong about that? ^
@rlemon Real nice
I meant nutty in a good way
I didnt expect all of the things
20:09
didn't expect all of the what?
ALL DA TINGS!
just all of the things in general your other demos had one red square
do you do a distance check at all @rlemon?
ohh haha
yes I do
if so thats a way to limit the accel when close to bodies
@Loktar all of the demos have click to add squares, click drag to move them, and ctrl + click to remove them
if its less than whatever, stop applying force
20:10
Kendall bitched right away that he couldn't
I think rev 7 or 8 I added it
@Loktar ?
any ideas?
And then Impact.js is more general HTML5-oriented I assume, with no real provisions for crappy web view technology.
I wish I had time to make a multibody simulator
I made a singlebody orbit thingie once
@Shmiddty sorry one sec
@Loktar @KendallFrey would it make more sense to stop applying accell if i'm X distance to an object, or to limit the top accell which can be applied
or does it not make a single fucking difference :P
20:12
I do it on distance, just because irl theyd collide
on my demo I actually have them collide and the bigger one picks up the mass
yea I see that
idk if I like it though
I realize it is how it should work.
@Shmiddty dude idk man
@rlemon It makes a big difference, actually. It's more accurate without such a check.
I dont use cos/sin at all
bro, do u even trig
20:16
Uh... not sure about item 6 here... cocoonjsservice.ludei.com/terms
*in mine I meant
@KendallFrey accuracy is nice, but i'm trying for the fine line between accurate and looks cool
Looks super cool to see glitched particles suddenly achieving significant multiples of escape velocity.
I just figured if i'm going to make them collide and add to the host object, they need to also be part of a pool and I need to be able to add more
You should play Gravity Golf.
Or whatever it's called
20:18
@ErikReppen haha that doesn't seem right....
!!cowthink php is crazzzy
 _______________
( php is crazzzy )
 ---------------
        O   ^__^
         O  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
I guess that's what happens when you're too cheap to hire a lawyer?
@twiz Classic modern business dealing. Don't worry we'll be on the honor system but you'll be fit to be screwed any time in any number of positions.
It seems almost all of our programmers think tabs > spaces, but someone decided our standard is spaces. (I found this out because I sent an email addressing the fact that we have no standard.)
20:21
!!cowsay e=<< hellllo php room
 _________________
< hellllo php room >
 -----------------
        \   ^__^
         \  (<<)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
bah
someone in php found cowsay recently.
I think I'm just going to try my hand at some of those phonegap plug-ins. I don't like agreeing to stuff like that.
I was showing off Zirak awesome work
they don't care
@KendallFrey and that would make almost all of your programmers correct, and your standard stupid :P
@KendallFrey I still can't believe its something people find debatable...
So unimportant with the exception that tabs can have a minor benefit
well unless its python or something, in which case spaces would make me want to kill myself...
20:26
Pep-8 advocates spaces.
NO! No debating, this is unimportant!
click and drag to make things
the size is based on the distance you drag
the speed is based on the time of your drag (shorter duration is faster)
@Shmiddty nice. Currently have balls doing the tango together.
need to tweak some stuff obviously
20:28
@mikedidthis haha I just looked it up, and they don't seem to actually give a reason. They just say "Spaces are the preferred indentation method."
I find it weird that they say that when a missing space could break everything....
@twiz yeah. I think if you pick and stick to one style, your good. Its when you mix them all hell breaks loose.
Yea, definitely. Indentation is part of the python language though...
the one time I join the JavaScript room, people are randomly bashing PHP... and discussing tabs vs spaces. awesome.
hahaha
"\s\s\s\s is the preferred indentation method."
I have a feeling that this discussion is going to escalate into a :shudder: face-to-face meeting!
@KendallFrey face-to-face? you can do that?
Why does one particle have a red trail?
haha forgot the change the fill style?
OMG they grow like black holes!
haha red holes
20:35
@KendallFrey no clue on the last red particle
I feel as though I was being productive before I came in here...
It's not at all accurate because particle mass doesn't affect other particles until it becomes part of the host
looked over the code (albeit only once) and couldn't see where it was happening
@KendallFrey you know how laggy that would get if particles had to check against eachother?
damn boy!
Yeah, that's how I know you're not doing it
I thought about doing it, and I know how... but yea.. holy shit would that ever get expensive
20:36
But damn, a three-body system would be cool
ten bodies would be orgasmic
2
Surprised there's no star ^
I check against all
but yeah it gets laggy fast
well with 1k bodies in motion I can't see how I can possibly check this and have it not die on me
ok now SHIFT + CLICK will re-add (12 at a time) dead particles.
particles that move off screen by double the screen x/y also get killed
20:56
@rlemon ~60fps for me now
now to track down that pesky red feller
how do I remove one?
remove one what?
red square?
red circle
Click to add a red dot
Click and drag to move a red dot
CTRL + Click to remove a red dot
SHIFT + Click to re-add 12 dead particles
21:03
man pens dont stay on the main page very long at all now
cool to see it so popular now
and some of the picks.....
I'm going to add more of my old demo's like a*
like how did that make picks?
halloween man!
alright bf4 time
yea home time
21:15
sooo I discovered autotools last night
... it's cheating
I think I'm overthinking this issue. How can I turn a link with GET parameters into a POST? Right now I'm wrapping some hidden inputs into a form, and when the link is clicked, I'm stuck. Do I preventDefault() and assign JS vars and (is this even possible?) submit the form using JS? (No AJAX, just a normal post)
Yes
@Ben Welcome to the JavaScript chat! Please review the room pseudo-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.
21:31
@copy are you on arch?
Yes
@copy do you recommend any alsa sound applet?
@copy despite that short answer.. thanks. You were right. There's no easier way to do that is there?
Yes
Yes as in there's an easier way..?
21:37
No
Word. Thanks
@FlorianMargaine Not alsa, but I use pavucontrol
Random poll: Does a work messy desk imply disorganization or hard working?
@RUJordan Implies different priorities than those with a clean desk.
It doesn't imply anything
It's just a messy desk
@BenjaminGruenbaum Where's the milk?
That's what I thought, but a couple co-workers just passed my desk and I have documentation notes spread out, database schemas hanging on my cube wall etc etc, and they were like damn you must be working really hard.
@copy yeah... pavucontrol is for pulse audio
But my dad told me a messy desk was a sign that a worker was 'bad'
and it's a control center, not an applet
21:42
Just got me thinking
but thanks anyway :)
Busy day at work
Like I said, it just implies different priorities
I can agree with that
I'm virtually never organized. My fianceé is the opposite. We're both hard workers, it's just that she finds cleaning/organizing relaxing and I find it tedious.
21:44
@SomeKittens Slows you down sometimes.
It's not that I don't want a clean desk.. I'm just so busy coding it always returns to the same papertrail. And by the end I'm so tired I just say fuck it.. it's gonna be the same result even if I clean it
It's relatively organized though, just doesn't look it
Sometimes, but not very often. I know where the stuff is, there just isn't any rhyme or reason to why it's there.
Should I yell?
It's not just a list of links. He's suggesting the use of a particular library as well as specific functions in that library. Regardless, the question is too broad and so the answer can't be very specific. But I don't like the idea of punishing someone who tries to help answer a poorly written question. — webbiedave 26 mins ago
@Esailija your friend Vyacheslav on es-discuss, might interest you.
Sryously? noone should answer crap questions crapily
21:48
I have a messy desk but it's not disorganized. I know where everything is on it
I am starting to wonder when the suit measuring tape arrived on my desk though.. my boss always plays with it
@Neal He fixed the answer though, right?
@BenjaminGruenbaum Ya. I removed the DV
!!cats or dogs
@monners cats
21:55
Damin straight
Agreed, @Neal if we handed out downvotes for answers on bad questions I would have no rep left! (edit: from the negative score when I would downvote the answer, not because I would be downvoted ;)) — rlemon 43 secs ago
also, @Neal you've answered some pretty horrific questions
@rlemon Yes. But I try to not do it crappily with link only answers
What should i use as close reason ?
0
A: inline css not working for my li

NealInline css is the direct style for that DOM object. You cannot tell it style=":hover a { background-color: blue;}"

so this is not a crappy answer to a crappy question?
hrmmmmmmm????
21:59
@rlemon It is an answer that says exactly what to not do.
WOW its 6pm already?!
@monners You thought anything different?
@Neal it's a shitty answer.
Whose 6pm?
@copy NYC
also a shitty question, but still.. a shitty answer
22:00
@rlemon Not saying it isn't
Just realized I had that Orbits fiddle open for hours now lol..
making points with you is painful at the best of times.
sorry.
@rlemon on that particle fiddle - rect and fill are seriously slowing you down.
You used beginPath which is the first step but there has to be a way to make it faster.
The bottleneck being the actual drawing seems very odd
0
Q: Tic-Tac-Toe JavaScript Readability and additional suggestions

JackRequires Underscore and jQuery I'm looking for suggestions on how to make this a little more readable and additional suggestions on flow, logic, etc. The game can be run in a browser by just copying and pasting the code(HTML/JS/CSS) below. JavaScript: app/js/app.js var Utils = { rules: {...

Interesting golf trick I just ran into: z=s.replace(i-1||'es','')
only works if s doesn't contain numbers
22:16
@rvidal Welcome to the JavaScript chat! Please review the room pseudo-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.
@rlemon surprised?
@C5H8NNaO4 unclear?
@BenjaminGruenbaum this is for you: thinkgeek.com/product/aa00
22:36
bored... so I'm building a VIM command parser in JS...
So... I'm trying to figure out how to prevent mobile browsers from rotating when tilted sideways, like a lot of apps do...
All I can find is people complaining that you shouldn't do that.
@twiz You can't prevent it
You can do... hacks
If it works, its not a hack.
Like applying CSS transforms for rotation, but that still has an intermediate transision phase
Seems like it kind of screws over the idea of making a game that uses deviceOrientation
so phonegap I guess.... haha
22:40
@BenjaminGruenbaum yea the way to fix it is that drawImage is slightly faster
0
Q: What is the reason there is no Python/Ruby like interpreter for JavaScript?

texasbruceI understand there are engines for JavaScript like V8 and Rhino.. and server side JS interpreter like Node.js, but why there is no desktop/user version of JS interpreter like Ruby or Python? Or there is but I am not aware of?

so each particle stores a separate canvas element whose image is drawn once in the constructor and used throughout
@rlemon I feel my CPU churning and my GPU isn't loaded. I wonder why that is.
drawing with canvas has always been expensive. saving is horribly expensive, and so is anything like filling and changing fill styles (surprisingly stroking is VERY fast)
Except for on IE, on IE the CPU isn't very loaded. That might be a result of crashing anyway.
22:43
@BenjaminGruenbaum not sure, to my knowledge it should be forcing hardware accel if it is there
now ofcourse what fiddle are we talking about?
the confetti?
(just to be sure)
just kidding btw, IE is actually fastest there
ok thaat
IE does ~50K particles
yea Loke has done some stuff as well that on his local hardware he can get 40K particles to go at 60fps
best my hardware turns out with 40K (his demo) was 30 and spikes of less
but he has notably better hardware ;)
also @BenjaminGruenbaum jsfiddle.net/rlemon/8ryB8/25/show
2 hours ago, by rlemon
Click to add a red dot
Click and drag to move a red dot
CTRL + Click to remove a red dot
SHIFT + Click to re-add 12 dead particles
22:47
I build something like this for physics class a while ago (for electrical charges, but it's extremely similar since it's almost the same formula)
(was in flash in AS and not JS)
user1125394
say you have 5 small arrays [a1, a2, a3, a4, a5], what would be a way to exclude the 2 arrays the most far away i.imgur.com/Bdp4i3u.png (< green and lightblue)
jsfiddle.net/rlemon/8ryB8/27/show ohh man is it ever better when I have almost no start velocity (there is one, it is just very small)
user1125394
it would be great if more satellits form and stay in orbit
14 mins ago, by rlemon
2 hours ago, by rlemon
Click to add a red dot
Click and drag to move a red dot
CTRL + Click to remove a red dot
SHIFT + Click to re-add 12 dead particles
well that is the luck of the draw.
and possibly altering some settings :/
user1125394
23:03
right, one is still living
user1125394
until boum, now
and shift + click anywhere and you will spawn back 12 of the dead ones from off screen
when they collide with a "planet" (host in the code) they add a fraction of their mass and an even smaller fraction of their size to the object.
so collisions at the beginning are good, but then you don't want a body to obtain too much mass.
0
Q: Social Network ( Help)

brunocascioI am in a great "problem" so to speak , and I need opinions to decide. The problem is to create a social network without knowing the number of users who use it (but if thinking if they were sufficient ) . The question is which language and framework to use .... I do not mind having to learn new...

    if (d < host.s/2 + this.s/2) {
        this.alive = false;
        host.m += this.m*.13;
        host.s += this.s*.033;
    }
user1125394
the red should also move :p
23:05
m = mass, s = size ofc.
I was just thinking about having them pull towards eachother.
user1125394
no differences between small black and reds, except mass
hrm.
now I might have to re-code this :P
user1125394
hehe :p
23:19
yay... next step... build a vim clone is JS...
@cↄ i hate you, now I am going to recode this
:( also :)
@rlemon Send Pizza, now
ok
i need a phone number
stupid website
mandatory
23:34
8187085138
got it
corner or cross streets?
god damn I hate this website
every field is mandatory
@chasemb Welcome to the JavaScript chat! Please review the room pseudo-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.
Cross streets, between Primavera and Hamburgo
studies in london or no?
for Cologne
23:41
i have Tecnológico studies in london or Tecnológico
it asks
I have no idea. :( Which field?
Colonia
I have a JSON response. Any idea how to iterage through the order id's (ie. 38903 in the gist below)? They are order numbers and are not always listed in order.
The numbers are random and I have no way knowing their values
23:59
i'm sorry I'm on my third one now. most of them want to bring the terminal to your house and won't let me pay online :/

« first day (1110 days earlier)      last day (4063 days later) »