« first day (1446 days earlier)      last day (3509 days later) » 

12:25 AM
ROFL:ROFL:ROFL:ROFL
         _^___
 L    __/   [] \
LOL===__        \
 L      \________]
         I   I
        --------/
 
12:41 AM
@Loktar for the record, this is what I'm talking about when I say "more gun control would be good." Properly-licensed and vetted civilians having guns is MUCH more ok than the above.
 
 
1 hour later…
1:47 AM
@copy you around?
 
@SomeKittens #4 is illegal anyway
> #2. Sellers Will Work With You to Get Around Laws
lol yeah there are slimy people everywhere.... its still illegal
so more gun control that just restrict me as a law abiding citizen do nothing to mitigate these illegal sales regardless.
gunbroker.com is a great place to buy guns online, however they have to be sent to an FFL holder which has to do a check on you, otherwise its illegal so idk. I could probably buy illegal drugs online too
and the gov has spent shitloads restricting those
> is crawling with enough assault rifles to overthrow a Central American country:
groans
assault rifle.. a term coined by the anti gun crowd.
When asking directly what classifies something as an assault rifle most people don't have a clue
assault rifle !== to a fully automatic weapon. Those are incredibly prohibitive price wise and license wise to get even for law abiding citizens
anyway rant over :P
@SomeKittens you get elite dangerous?
 
2:03 AM
Yep, it's like DRM.
No E:D yet
 
ah I want to play.. but I got shadows of mordor
so I need to play that first
@SomeKittens hah DRM is a good way to put it actually
does nothing to curb piracy and can screw over people who actually pay
 
@SomeKittens Yeah
 
doesn't stop the fact that gun crime is less in countries where it's not as easy to get guns. :)
 
ohai
Currently working on moving bullets serverside
 
Cool
 
2:05 AM
Right now I've got it so that the server checks collisions on every heartbeat
 
@phenomnomnominal tell that to the people of Brazil and Mexico :P
 
@Loktar what kind of gun control measures are there in Brazil and Mexico?
 
In Mexico, they check you for guns before entering a bus
 
@copy this seems wasteful - is there a better way you know of?
 
> Because of gun politics in Brazil, all firearms are required to be registered with the state; the minimum age for ownership is 25[1] and although it is legal to carry a gun outside a residence, extremely severe restrictions were made by the federal government since 2002 making it virtually impossible to obtain a carry permit
> Some 39,000 people died in 2003 due to gun-related injuries nationwide.[2] In 2004, the number was 36,000. source
@copy damn really?
I know its pretty bad in some parts there
 
2:09 AM
@SomeKittens By heartbeet you mean a tick that runs at a certain interval, right?
 
@Loktar gun violence still significantly decreased after their buy back program though
 
@phenomnomnominal where at Brazil or Mexico?
 
@Loktar Yeah, been there
 
And i think comparing brazil and america is kinda misleading.
 
2:10 AM
I assumed, Badgergirl is from there right @copy?
 
Yes
 
just in terms of their governments ability to actually enforce and enact something
 
@phenomnomnominal why's that? I was just comparing a nation with stronger gun control yet high murder rates
oh come on what can the US enforce
the war on drugs is/was a joke :P
granted I like to think we at least have less corruption within the government than some countries but still
 
maybe you're right and it's too far gone.
 
I just think the US is a big place really and no amount of money and policing can solve all problems idk.
 
2:13 AM
no amount of guns can solve it either though
It must be terrifying to walk down the street and know that people could legally have a gun on them.
 
why?
its not terrifying at all
it must be terrifying to walk around with so many poisonous snakes around
 
Well maybe you've never felt safe?
 
you could die at any moment!
 
I live in NZ, we have no snakes
 
ah I thought you were in AU
Earthquakes then :P
 
2:14 AM
You can die getting hit by a bus,
accidents happen
No one ever died from walking into a gun
 
Letting just the cops/military have guns wouldn't make me feel safe one bit
@phenomnomnominal well.. if it has a bayonet they have
 
Our cops don't have guns
@Loktar if it had a bayonet they probably ran into it :P
The most that our cops have are tasers, and their use is massively controlled.
 
@Loktar I actually felt pretty safe (mostly because she knew the bad areas where you're not supposed to go). The traffic there was almost scarier
 
@copy not quite
 
unfortunately not here, the cops in NY have killed more Americans than who died in Iraq in the last 10 years.
 
2:17 AM
That's horrible
I guess the system we have here doesn't scale
Cause if you take the guns off the cops, then they're fucked.
 
bleh yeah it definitely sucks. I think a lot of citizens would never give up guns due to distrust in the gov.
In fairness its how our nation was founded to begin with, its pretty ingrained culturally
 
How many times have the people had to take up arms against the US government?
 
there have been standoffs, but there hasn't been a major uprising.. however our government isn't extremely old by any means
and to say it hasn't happened doesn't mean it never would
 
well, it's as old as the culture in which gun rights is ingrained.
i guess it's such a balancing act
government, with the media trying to hold them accountable and exposing things to the public, and corporations paying people off on both sides.
 
Each client emits a heartbeat every 1/30th of a second
 
2:20 AM
Sounds completely fucked to me
 
so that's a LOT of checks
 
haha it is @phenomnomnominal its sad :?
 
@SomeKittens For each bullet?
 
Each player
 
and it depends on the media outlet as well. I mean how many of them are paid off , its crappy all around.
they've all done a great job though many people in the US are more concerned with the latest star than world news.
 
2:22 AM
Oh yeah, that's probably the worst part of it, US media is scarier than the guns
Probably time to burn it down and start again
 
@SomeKittens Oh, whenever a player sends a heartbeet, you check if he hit a bullet?
 
@copy yeah
I guess?
but then I somehow need to track bullet updates
I really should just use server ticks
 
Well, you should do all world changes in a server tick
 
> In 2011, according to the U.S. Pet Ownership & Demographics Sourcebook, there were 1.15 million pet snakes in the U.S., living in some 550,000 U.S. households. That’s five to seven snake-related deaths per year—of which most were probably bites from wild snakes—in a country with more than a million pet snakes.

Now let’s look at the gun numbers. The best compilation is in a 2013 Institute of Medicine report, Priorities for Research to Reduce the Threat of Firearm-Related Violence. That report cites a tabulation of 2011 data from the National Center for Health Statistics. According to Tabl
 
There, you move bullets, make a quadtree of all bullets, then use the quadtree to find collisions for each player
 
2:23 AM
^ just FYI :P @Loktar
 
Or k-d tree
 
oh boy, back to data structures
This game has used more stuff from my CS degree than any of my jobs
2
 
You could also find that in a library probably
No need to reinvent the car
 
function QuadTree(size)
{
this.root = new TreeNode(10);
}
 
That's why it's in a Gist
 
2:27 AM
 
In a complete implementation, you wouldn't have to specify the size, it should extend automatically
 
2:39 AM
I'm torn between making an actual game and diving into all the minutiae
 
I have a statement where i'm adding three variables (all ints) and yet the result is a string... why is that??
 
Because one of the is not a number
 
all 3 are numbers
 
Your brain is wrong, not the computer
 
@ray9209 If all three were numbers, the result would not be a string
 
2:45 AM
No offence
 
you should show us the statement.
 
hm... does .val() always return a string? if yes, that might explain it
 
sure does. Try it on a checkbox. Fun for the whole family.
 
var $q1 = $("#q1").val();
var $q2 = $("#q2").val();
var $q3 = $("#q3").val();

// $q1 = 1, $q2 = 0, $q3 = 0 in the above

var max_q2 = (2 * $q1) - $q3;

//in the above statement, my code is setting max_q2 equal to 2, which is what it should do, it's treating q1 & q3 as ints
max_q2 + $q1 + $q3
//the last line above (max_q2 + $q1 + $q3) returns 210, it should return 3, why does it treat the ints as string the second time but in not the first time?
 
2:53 AM
has anyone been working to the bot, that we know of?
 
...
it is fixed. forget it.
just waiting on code
 
@ray9209 you have 2 * '1' - '0';// 2 you then have 2 + '1' + '0; // '210'
 
oh okay... I'm kinda late I guess
 
so 2 * '1' = 2, but 2 + '1' = 21?
 
Yes, JavaScript is terrible
 
2:56 AM
oh actually that makes sense
 
That's nice of you to say, but doesn't make the pain go away
 
var $q1 = +$("#q1").val() || 1;
var $q2 = +$("#q2").val() || 0;
var $q3 = +$("#q3").val() || 0;
 
if the operator is multiplication, it's likely that the user wants to treat both values as ints since it doesn't make sense to try to multiply strings; but if the operator is addition, the user could be trying to concatenate them and so it treats them as a string
 
I'd word it slightly different but yep.
 
As a beginner with js/express where would you start to look for documentation with things you're not familiar with? Like I've got some code that has req.pipe()... what's the best way to learn new stuff you're not familiar with?
 
2:59 AM
Documentation
 
thanks
ohhhhh pipe is like | ... im an idiot
 
we're all idiots here. After all, we write JavaScript
 
:)
 
@SomeKittens That doesn't have a remove capability, nice work
 
3:06 AM
I would recommend storing objects in a normal array and just creating the tree on every tick
But that idea is just based on my intuition, I never benchmarked it
 
@copy How would that be efficient?
 
Creating a tree isn't very expensive
But deleting from the tree and iterating over all elements on the tree is more expensive than on the array
 
huh
 
But, as I said, I'm not sure if that's the right way to do it
 
log(n) insertion time?
 
3:18 AM
Yeah
 
not too bad
but wouldn't that be log(n) deletion time?
 
Yeah
Maybe I should reconsider that
 
this example has an update and then re-insert, so that supports your theory
 
Implementing deletion is also not trivial (you want empty nodes to be undefined, so they can be skipped over when searching)
So I can still reconsider if creating the tree becomes a bottleneck
 
Yeah, I think I'll recreate the tree each time
 
3:29 AM
morning there
 
I smell like ass
 
oh, ok.
night there
 
yeah...
 
sheah :P
 
4:03 AM
@rlemon Hai. I pushed changes.
 
and there was much celebrating
 
I was almost fired from a job driving the hearse in funeral processions, but then the funeral home realized how much business I was creating for them.
3
 
!!live
Or not. Whateva.
 
the lemon sleeps
 
@copy :)
 
4:16 AM
@Shea no one ever pings you :(
 
@Shea hi
 
@BadgerGirl Hi :)
 
4:33 AM
where did the : in the chat title go? ;(
humpf, - thinks he's a cool kid now, huh?
 
hyphens are more serious in Canada
 
5:05 AM
> 2500% uptime guarantee
Impressive
 
good morning
 
@copy That's nothing, my company guarantees 2507% uptime
 
5:24 AM
Hello everyone, good afternoon!
 
> You wanna sent data to the server? ...Fine. Ruin my analogy.
 
@SomeKittens Have you heard that joke we don't tell trolls?
 
@SomeKittens don't fall for it, he's trying to trick you into telling him the joke
 
@Shea Me thinks you missed the joke
 
5:40 AM
au contraire
 
I said it. It is so.
I think therefore IT IS! - Descartes' overbearing older brother
 
slow down, this is over my head. I was only trying to sound smart
 
TIL xhr.onload = this.getResponseHeader("Last-Modified") \o/
 
I had to Google contraire, and I still wasn't sure if it was correct use...
and the fact that I used a word of a different language makes me classify it in a smart category
 
@monners The Ecmascript room? It's kind of a joke and we keep trolls away from it.
(and yes, I got the original joke)
 
5:47 AM
lol, that's the best response I've gotten so far
 
6:12 AM
/(?:^|[.!?:]\s+)(?:(?:how\s+(?:can|do)\s+i)\s+([^?!.:]+)\?|(?:i(?:\s+want|(?:\s+am|'m)\s+(?:wanting|trying)|'d\s+like|\s+would\s+like)\s+to\s+([^?!.:]+)(?:$|\.|!)))/i
ever seen a longer one?
 
hi...
 
@AwalGarg twhs
 
@copy wat
 
how to disable checkbox in a table, if a checkbox in first td is checked.
jsfiddle.net/syfd26sk/1 i tried this much
can anyone help me to solve it?
 
@Ravimallya where is GetCheckStatus defined?
and why have you put the click listeners like that?
(click listeners for checkboxes! bro, use onchange)
 
6:16 AM
that's an asp.net generated checkbox
 
:/
 
@AwalGarg and i need to disable the second checkbox if the first checkbox in a row has been checked on page load.
on each checkchange event, i am doing post back to handle a server event.
 
Then why not use radio buttons?
 
^^^
 
I mean, that's effectively what you're trying to mimic
 
6:19 AM
> fck.is(':checked')
 
@monners I'm sorry, I can't use radio buttons because, some of the users have both share access.
 
So render radios for the ones that don't
 
@monners ok. let me try that one. thanks.
 
Almost home time
 
6:37 AM
hi all
 
hi
wait... only serious stuff???
since when?
this is.... blasphemy!!
 
lol
i shouldnt be there if so...
;p
 
@JanDvorak what is nuke?
(hoping its not the node based editor)
 
A nuclear weapon is an explosive device that derives its destructive force from nuclear reactions, either fission or a combination of fission and fusion. Both reactions release vast quantities of energy from relatively small amounts of matter. The first fission ("atomic") bomb test released the same amount of energy as approximately 20,000 tons of TNT. The first thermonuclear ("hydrogen") bomb test released the same amount of energy as approximately 10,000,000 tons of TNT. A thermonuclear weapon weighing little more than 2,400 pounds (1,100 kg) can produce an explosive force comparable to t...
 
6:52 AM
@JanDvorak you want us to bombard that post?
 
@AwalGarg downvote, closevote, flag as VLQ... stuff like that
 
7:02 AM
hi guys
@hanu you there today buddy
?
 
"Best smartphone for replacing ipod". So, he wants to replace an MP3-player with a phone :P
I'd reccomend a phone that doesn't play MP3's, or any media for that matter xD
 
@JanDvorak Surprisingly OP deleted the post
 
well, i apologise in advance for what i'm gonna say... but... i'm still stuck with my stupid .ajax problem of yesterday... i read... looked for similar problems... and... i'm maybe as stupid as my question may seem but idk why this is faulty... may someone help pls? pastebin.com/Pv5dFyPx
 
Perhaps we should be using more of the comments like Manish just did?
> @Pablo Do not ask this type of F__king questions. this is programming site.. – Manish 10 mins ago
 
For those who have worked with webrtc I cant seem to find a sample that uses peer to peer but not on same pc
I cant quite understand how to access other pc
anyone who can point me in the right direction
 
7:11 AM
0
Q: Is Open Source Advertising working as intended?

dystroyI'm the project leader of one of the most upvoted projects here (which one isn't very important as my question is about the program, not my project). I made two observations : no one ever came through the ads to contribute (hopefully I have other helpers) even while I've put in place a page li...

 
I think finding contributors is just generally hard, and people would rather go for a "big" project that has a community and possibly even mentors
 
Maybe. I like the idea of finding contributors on a site like SO, through.
But it really looks like the other project leaders just wanted to promote their lib, and didn't want contributors.
 
@copy that
 
As it is, it looks like an inefficient program, but I'm curious about what happened the previous years.
 
Can anyone tell me how to load the HTML template here: plnkr.co/edit/9FCDtFnh2EZV3xqdCD1g?p=preview ?
New to Angular.
 
7:26 AM
@dystroy Actually, mentioning mentors could have helped
 
webrtc?
anyone?
 
@copy Yes, maybe. You'd put that on the ad itself ?
@Gotalove what's your webrtc related question ?
 
sigh well if someone gets a chance please help me out understand what I would need to change to have a video peer to peer chat app working .Here is my pastie pastie.org/9609495
 
@dystroy Definitely worth a try, I think
 
I played with (basics of) webrtc last week, I was astounded... it is amazing. Couldn't find something specific to do with it as of now, but love it.
 
7:30 AM
@dystroy so far I have not seen sample code for a peer to peer app that isnt on the same page and I cant quite get a step by step tutorial so am lost on how to do this.Checked out this links youtube.com/watch?v=d7NsiFXcc5A and github.com/GoogleChrome/webrtc/tree/gh-pages
so I suppose my question would be how to create webrtc video chat app betweenpcs
 
Stupid question: Is there a difference between webrtc and web sockets (for what concerns underlying technologies at play)?
 
Well, webrtc isn't really easy and is definitely more than 20 LOC. If you want an example, you may look at [my Miaou chat](http://dystroy.org/miaou/static/intro.html).
The code for the webrtc based video chat is here : https://github.com/Canop/miaou/tree/master/plugins/video
@Neil yes
 
They're two unrelated things
 
Hey guys, I am having a hard time with AngularJS and a dropdown box. Relevant markup is here: pastie.org/9609500 and what is displayed is here: prntscr.com/4rzs83
 
@Neil am noob but webrtc can use websockets and socket.io
 
7:32 AM
then maybe (definitely) I don't have a good handle about what is webrtc
 
@Neil ain't sockets the connection pipe between client and server?
 
for connections
 
@AwalGarg Yeah
 
@Gotalove only for signaling (and that doesn't matter, that's aside of webrtc)
 
@Neil then how can it be not different from webrtc?
 
7:33 AM
The value after the Data Format label is the value on the Sensor object, but the drop down is not selecting the correct option to match.
 
@AwalGarg I don't know.. if one doesn't know what webrtc is... *hint hint*
 
@dystroy thanks loads for the link.Let me go through it.
 
@Neil I know... ya know p2p?
 
If I select a value, it changes the value on the object and displays that change next to the Data Format label.
 
@AwalGarg yeah
 
7:35 AM
Any help would be appreciated. I am at my wits end.
 
So not server to client, but client to client?
 
@Gotalove After reflexion, I'm not sure my code would help you more than a tutorial, if you don't know Miaou.
 
@Neil yeah, after a server initialized handshake between the two clients.
@dystroy just curious, what do you do for IE and safari? (for webrtc)
plugins?
 
@AwalGarg The server doesn't do anything after initial handshake?
 
@AwalGarg I don't care about IE and to my knowledge it works on Safari (but there aren't a lot of users of the video part, and most of my users are on Chrome for a specific reason unrelated to Miaou itself)
 
7:40 AM
@dystroy AFAIK, August was when the last w3 report came and safari didn't have any support to rtc at all!
 
@dystroy I think it will help if I can compare it to the tuts I have since yours applies to production environment
 
@Neil I don't think so... nope.
(dystroy would know better on that, though)
 
Also is webrtc the simplest solution I can have for video chat on html php app in your opinion @dystroy?
 
neither do I know whether we can have more than 2 clients together on a rtc connection. It would be kinda cool if that is possible ;D
 
@Neil my server lets browsers negotiate, then everything after is handled by the ICE servers and most communication is "direct" (in reality, due to proxies, other servers are often relaying)
@Gotalove It's far from the simplest but it's one of the most effective.
 
7:44 AM
Anyone know why an Angularized <select/> dropdown would stay on a default value when wired up correctly to a controller object?
 
But you should really give up PHP if your goal is to manage a video chat
 
hehe I can see the code experience in it :) @dystroy
 
@dystroy why should?
 
well I dont have much option since the chat is just part of the larger project @dystroy
@dystroy the miaou project is written in which languages other than js and html?
 
node.js .... and jquery too ;p
 
7:47 AM
I thought as much when he mentioned forget php @AwalGarg
 
xD
php does almost equivalent to node/python with pthreads.
I don't think forgetting php would be the right thing to do...
maybe better your knowledge in php itself instead of switching entirely.
 
+1 @AwalGarg
 
Did everyone take the MDN Services Survey?
 
@AwalGarg My knowledge of PHP isn't up to date. Would pthread make it easy to manage signaling between browsers (which is about trivial in all other technologies) ?
 
@dystroy PHP already does that without pthreads. Using pthreads would level up the performance to that of other technologies.
 
7:55 AM
How would you do that without having to manage an out of PHP persistence (and cleaning) in PHP without pthreads ? You exchange dozens of messages for signaling at the start of a webrtc session
 
Also, remember that despite the long standing fact that functions are not the bottlenecks for performance in PHP, you should still take out juice with the memory management thing Zend offers and see what fits in best when dealing with realtime connections.
 
pthreads is completely unrelated to event-driven programming
 
waaaat?
 
@AwalGarg It's the right thing to do because PHP is a terrible language
 
ok I am out of this conversation
 
7:56 AM
@AwalGarg nodejs is always single-threaded
 

« first day (1446 days earlier)      last day (3509 days later) »