« first day (1652 days earlier)      last day (3297 days later) » 

2:00 PM
mouse
would this be it?
 
well, you can get the angle by using the point of the mouse and the character
 
angleInDegrees = arctan(deltaY / deltaX) * 180 / Math.Pi
 
please keep it in radians, since the geometry formulas works in radians only. No need to turn it in degrees
(or you have to turn it again to radians ... )
and yes, that formula
 
I should've paid attention in maths
 
but add cases when deltaX = 0, or you get NaN
 
2:03 PM
of course
 
games involves a lot maths :)
 
i know!
THere's so much!
 
yours gravity physics is decent though. (tried the jumping)
 
I used @Loktar 's js canvas game tutorial for it :3
 
you can add the link to his tutorial in your js documentation
 
THE
2:09 PM
wish we had a entepenur room too
 
I will!
Also, how can I get it to fire backwards?
should I check if deltaX is negative, and if so, multiply speedX by -1?
 
THE
@Deep use a bananana to block its front
 
ok
 
both sin() and cos() can give negative values as well. it depends of your coordinate system. if you're using the character as center, then not.
i recommend to do some research on geometry. It's very useful and being used a lot in games.
 
If I'm making changes to a git pull request, is it best practice to add new commits or to amend the original squashed one and force-push?
The Star Wars nerd in me really really really likes force-pushing
 
2:20 PM
just keep playing
and explore
this might be the best game I've ever played
 
Jun 7 '14 at 15:26, by Zirak
People. Stop everything you're doing and play Frog Fractions
It's amazing
 
It also has a longer loading time than AC:Unity
 
@ivarni are you comparing an user project with a big budget production ?
 
2:27 PM
@KarelG I'm making fun of a big budget production
 
then you should say faster instead of longer
 
Which, despite its big budget delivered the biggest let-down in my favorite franchise so I am extremely butt-hurt
 
then yes :)
eh, compared to AC3, it's still decent
 
Actually, try playing AC3 after Unity, it's not as bad as it seemed the first time any more ;)
 
lol
Ubisoft - lowering your expectations, one release at the time
it's almost as bad as EA
 
2:32 PM
0
A: How to shorten switch case block converting a number to a month name?

Benjamin GruenbaumAll you guys are scaring me with your parsing and arrays. Especially since this property is built into the API that ships with browsers :) var date = new Date(1, mm - 1, 1); // create a new date for the month var month = date.toLocaleString("en-us", { month: "long" });

These guys are scaring me
oh fml, there is already an answer saying that - deleting
 
35 upvotes for that question and 103 for the accepted answer? I dont even wat is even going on here wat
and all in one day none the less
Oh wait 2 days, I stupidly assumed that when SO says "yesterday" it doesn't mean "thursday"
 
Good morning
 
Hey Guyz,
One quick qustion: In google maps API: I am getting b.lat is not a function deep in the library
any pointers on how to make sense of it?
 
!!unsummon 76070
@Sudh You have a stack trace, look at which functions there are yours
 
that's the problem
None
:(
 
2:39 PM
Well, that's a huge bummer
 
yeah, here is the stack trace
 
Try commenting out as much of your code as you can, reduce your code until the error goes away
 
Uncaught TypeError: b.lat is not a functionF7 @ VM3744:14(anonymous function) @ VM3744:12(anonymous function) @ main.js:29N.data_changed @ VM3744:12kf @ main.js:22U.(anonymous function).bindTo @ main.js:23R7.(anonymous function).k @
VM3744:18(anonymous function) @ VM3729:1hg @ main.js:28(anonymous function) @ VM3744:24Kh.onion @ VM3742:74(anonymous function) @ main.js:39(anonymous function) @ main.js:27(anonymous function) @ main.js:27(anonymous function) @ main.js:27dg @ main.js:28$f.(anonymous function).F @ main.js:27(anonymous function) @ visualization_impl.js:1
 
@ivarni If it was my project I'd just like a new commit. I like history of how code got to where it is. It is completely the preference of the one accepting the pull requrest.
 
@Luggage makes sense and I'm totally onboard the history thing. Adding commits it is
 
2:45 PM
I have an array with one of the properties being year (a 4 digit number). If I apply a function that rounds that up so that from that year i get a century number for each entry in the array. Is it possible to create multiple arrays named based on the century number? Maybe with one of the array methods?
 
in Testing ChatBot, 24 secs ago, by Caprica Six
I will derive!
I'm not perfectly happy tbh, I'd rather it sit on top of Spidermonkey and not v8
But oh well
 
posted on April 25, 2015 by admin

Hovertext: You know the sun's a doctor because of that metal reflector thingy that hasn't been used in medicine for 80 years. New comic! Today's News:

 
@Zirak didn't realized that Caprica is under maintenance.
don't play too much with her, or lemon have to clean it up again :p
 
I'm running the bot independently of the main "instance"
 
3:06 PM
@Azar_Javed [].reduce() will let you do that.
 
user2904529
Can anyone help in creating a dynamic listview using JSON API using JQuery/JS
 
That's a big question and potentially hours of work. If you have a specific problem we may be able to help.
 
user2904529
I'm willing to pay :)
 
3:22 PM
@Zirak What's the difference between that and Casper?
 
@rlemon DAMN YOU! geoguessr.com I was having a productive couple of days!
@BenFortune Not much, different layer and I never used nightmare so gave it a shot.
 
3:36 PM
@Zirak that's difficult
i got a road with arrows
i thought that it was typical french
but it's from Scotland ... damn
 
I nailed one based on the arrows on the road, since it was obvious it was left-hand driving and there's not too many of those, but yeah, it's not like it's easy
10997 points on geoguessr.com/challenge/8FdB26bkqVda5rsP is best one so far
 
just got 180.9 km off ... neat
 
They do allow some zooming and clicking around which is useful
 
yeah, that 180 off is because i followed the road, to see where i end up After some clicks. and i ended in a national parc, which i knew that it's somewhat south of Madrid.
just luck
 
4:01 PM
Morning
 
emm , guys
are HTML comments allowed outside <html> tags ?
I em interested in putting some after </html>
 
@tereško check with the w3 validator
 
=/
 
But I don't think that'll break anything
 
I met a guy in IMagine CUP
who created a database abastraction
which chooses where your data should be stored via machine learning
 
4:03 PM
...YOU CAN EDIT ON MOBILE!
 
allows to query mongo / postgre / redis / mem via a single unified
api and handles replications.
 
what does this do in js
document.forms[0]
 
@tereško yes, but not conform with the standard
 
@lovetolearn returns the first item in document.forms
 
hmm
that sux a bit
 
4:06 PM
returns the fist element inside the form?
 
returns the first item inside document.forms
 
it returns the first form it can find in the document
 
ok so if i do document.forms[0].elements it wil return the first form on the page with its elements?
document.forms[0].elements[0]
 
Ohhh fuck I just realized there's KSP 1.0 streaming at the same time as the meeting :(
@lovetolearn If you're curious about what a piece of code does, the best thing to do is to try it.
 
ksp 1.0???
 
4:10 PM
2 MORE DAYS
 
MONDAY???
OMGWTFBBQ
 
HYPE TRAIN
 
@lovetolearn yes, but are you using a tutorial or something ? it's old
 
i don't have popcorn for that !
 
4:13 PM
yep, the tutorial is from 2013
 
can i have the link ?
 
Scott Manley's part is tomorrow afternoon
 
@KarelG talking to me?
 
@lovetolearn yes
 
@KarelG so what is used now?
 
@KendallFrey YAAAAAY
 
@lovetolearn MDN is the reference for javascript : developer.mozilla.org/en-US/docs/Web/JavaScript/Guide
 
are you referring to document.getElementById("id")?
 
4:23 PM
no, to document.forms[0].elements[0]
// away cooking dinner
 
@SomeKittens HYPPPPPPPE
 
hype... plane?
 
@rlemon You're behind, young man. It's also a good game.
I think it started a trend of "expanding" games, where you start with very few elements and the game gets more and more complex.
@lovetolearn How advanced
 
the stackexchange api is useless :(
 
4:35 PM
@Zirak Extra Credits did an episode on that
 
well, almost useless.
 
@Zirak what does how advanced referring to?
 
25 mins ago, by lovetolearn
http://www.lynda.com/JavaScript-tutorials/Getting-setting-value-text-field/14420‌​3/153517-4.html
 
just came across it
 
@Zirak you don't get to expect better from lynda. it is lynda.
 
4:43 PM
I have hex and i want to convert to decimal, can I directly use the parseInt(hex,16);
 
Give it a shot
 
I used to think that only their free vfx/animation tuts are crap, and maybe the paid ones would be better. or coding one would be better. but they are all alike.
 
!!> var hex = 'f9'; parseInt(hex, 16);
 
@SomeKittens 249
 
> hex = new Buffer('f9', 'hex')
<Buffer f9>
> hex.toString('binary')
'ù'
> hex.toString('decimal')
TypeError: Unknown encoding: decimal
 
4:50 PM
\o\ /o/
@SomeKittens why you no .toString() ?
 
@ivarni Hey, awesome pull request. Props for writing it (and exposing it to scrutiny). Hope you learn a ton!
@darkyen00 That'd just default to 'utf8' which isn't what we want
 
@SomeKittens Thanks. I love getting feedback from different people than those I work with on a daily basis :)
 
so, I saw this in a talk, but the guy didn't explain it... could someone try to tell me why this is?
 
paging @Zirak
 
5:06 PM
can anyone point me to a good video tutorial on forking on github
 
If I run array.forEach(function(person) {} is there any way that I can refer to the current element in the forEach loop?
 
@lovetolearn You click the Fork button, that's basically it
@towc Is there any context? Doesn't really make sense to me
 
@towc Guess: He ran a bad benchmark, first version got optimised away, second didn't for some stupid reason.
@SomeKittens paging Skittles, Dr. Dr. Skittles
 
@Zirak you know one metric buttload more about V8 than I do
 
Seriously though, that benchmark's bullshit. He didn't use any safeguards to ensure the array isn't thrown away or the loop isn't unrolled (or at least folded). See
 
5:20 PM
Egorov is so cool :)
Seen him live a few times, usually every single thing he says goes whoosh over my head but the main thing I've taken away is to not always trust benchmarks that show wildly different results like that
 
Especially not with results like 5ms, that sounds like a lot of nothing
 
@Zirak He tears up some benchmarks here: webrebels.23video.com/crooked-mirrors-of-performance-by
 
how can I convert this
150423160509
to
2015-04-24 00:05:09
 
5:35 PM
@zirak it was an O'Reilly talk tho
 
@towc People are people, and people are wrong
 
Wise words
 
Can someone help with a Mongoose question?
I'm trying to use findById on a model through one of its instance methods.
How can I do so?
 
Isn't the meeting starting in a minute?
 
an hour
right?
 
oh, you're right, next hour
web.archive.org/web/20120204012402/http://www.q-group.org/… tl;dr group of people taught monkeys how to use money, monkeys acted like humans, and eventually reached prostitution
 
ohhh yeah fap to dat KSP 1.0
 
well, isn't that the oldest profession of the human race? In that case it makes perfect sense that monkeys start there
 
6:06 PM
Another awesome thing is that monkeys also responded to social behaviour, so monkeys who didn't co-operate were not co-operated with, and monkeys who were overly altruistic got exploited.
 
They even do cargo-culture: mannkal.org/downloads/rspt/monkies.pdf
 
They also exhibited the same behaviour as humans in regards to gambling (Loss Aversion)
@ivarni Ah yes, that classic one
 
6:19 PM
@KendallFrey What're they complaining about, his mic's fine
 
@Zirak link is dead I think
 
@Zirak his other one was crackling
 
@towc Weird, web.archive.org seemed to not like things atm.
@KendallFrey Explosion was awesome
 
rip valentina
 
@KendallFrey Can you do things like making space stations or just locking things into orbit?
 
6:27 PM
huh? yes
 
It's awesome how happy she is
 
are there any cool games written in JavaScript?
 
No
 
When is the meeting? Is it happening yet?
 
In half an hour
 
6:33 PM
Assuming @Mosho didn't forget
 
Cool, I have nothing to say
 
Lots of topics today
 
topic one: corvid has too many inane contextless questions.
 
can someone help me how to convert this UTC date to my local timezone (UTC +08:00)

150423160509
to
2015-04-24 00:05:09
 
@jemz Whenever I need to do anything with dates I tend to grab the moment.js library. It has parse/format functions that let you specify a pattern and unlike the native JS Date library it's not completely broken
 
6:42 PM
@ivarni He doesn't need a humongous library to parse that date.
 
@ivarni, is moment.js can be use in node.js ?
 
@jemz yep
 
Thanks
 
Room meeting in 15?
 
@Zirak it's 12k...
 
6:44 PM
ya
Assuming @Mosho didn't forget
 
the first thing on their page is how to install for meteor, node, bower, etc momentjs.com
 
@ivarni It's to parse a trivial format
 
@BenjaminGruenbaum well, we could all just ping @Mosho until @Mosho gets here
 
@Mosho
 
GUISE
stahp
 
6:45 PM
HAMMAHTIME!
 
@Zirak The main thing I find with date problems is that they seldom come alone, but yes you have a point, @jemz if it's just for display and you don't need to manipulate it any further, consider a different solution
 
it werkt
 
@KendallFrey Fairings are SO COOL
 
I'm leaving for home now
 
@Mosho Are you coming?
 
6:46 PM
@SomeKittens the aeroverhaul dude
@Zirak don't ask private questions like that on chat
 
@Zirak not right now, no
but I'll be in the meeting
 
ARE YOU FUCKING COMING, YOU BASTARD?
 
so... brb
 
I'm glad they're taking the most popular mods and bringing them into core
 
don't start without me!
 
6:47 PM
Ahi
where's the link?
 
Hi!!
 
where's the room?
 
And of course it's frozen
Where's out neighbourhood mod...
 
lol
when was the meeting planned take place?
 
The day after yesterday
 
6:52 PM
@JeremyBanks @ThiefMaster @BoltClock anyone ping
 
WHAT
 
@BoltClock can we be friends?
 
!!s/yone/noying/
 
@Shmiddty @JeremyBanks @ThiefMaster @BoltClock annoying ping (source)
 
6:53 PM
@BoltClock You're my favourite person in the entire world
 
No you're not, he's just saying that.
Don't get burned like I was bro
 
@Shmiddty ok, that just made it a whole level worse XD
 
Embrace the lord and saviour
 
@fahdijbeli your avatar, lol.
 
@BenjaminGruenbaum :D
 
6:55 PM
@BoltClock :( Also, lol at answering that question only to have @adeneo answer the same thing later and get +10
@Mosho change the room description to the gist
(the meeting room not this one)
Room Meeting Being Held in the meeting room everyone except bjb568, noob1992, okok, yourandrenalinefix zigi and porizm welcome :D
2
 
@BenjaminGruenbaum porzim?
 
@rlemon @Loktar @KendallFrey @SimonSarris @JanDvorak @MadaraUchiha @SomeGuy @dystroy @RoelvanUden @ssube @phenomnomnominal @Cerbrus @Jhawins @SterlingArcher @copy @BadgerCat did I miss any ROs currently in the room?
 
@BenjaminGruenbaum I'm already there
 
@Mosho start the effing meeting bro
 
@Mosho You bastard
 
7:01 PM
Also @AwalGarg
@Shmiddty forgot this one
 
@BenjaminGruenbaum Nope, think you got 'em all.
 
Oh lol, I forgot you, but you were already there
 
Let's all ping @Mosho repeatedly until he shows up.
 
@BoltClock can I bug you again real quick?
 
no
what is it
 
7:03 PM
We're waiting for you @Mosho
 
@BoltClock make Zirak room owner of that room
(the one I asked you to unfreeze)
Room meeting actually starting now
 
okay, I'm home and fully undressed
we can begin
 
7:15 PM
@BenjaminGruenbaum "okok" that's a name I haven't heard in a while
I forgot what they did
 
@BoltClock that's just a lit of people who trolled this room, this is okok: stackoverflow.com/users/895174/sbaaaang changed profile pic and name now
 
Is there an official userscripts spec or something?
Or do all browsers blatantly do what they want to do?
 
@AwalGarg this
 
:(
 
@AwalGarg There's a documentation on the greasemonkey wiki, which tampermonkey respects as well
 
7:17 PM
@BenjaminGruenbaum Yeah I know some of those other names
 
@BoltClock surprise surprise
 
@JanDvorak link?
 
googling
 
same
 
7:20 PM
great
@JanDvorak I didn't expect to get something not terribly ugly. You deserve cookies for this :P
 
7:37 PM
!!summon 73490
 
I'm pretty sure I'm late, aren't I?
Well, apparently I am but I didn't miss much. Or anything.
 
> KSP 1.0 is quickly draining my ability to even.
lol yes
 
I can't watch any of the videos yet
still working :-(
 
Watch KSPTV any time between now and Monday
steady 1.0 streaming
 
@ircmaxell but it's Saturday?
 
7:59 PM
@BenjaminGruenbaum Speaking of canonicals: gist.github.com/SomeKittens/49222d46c0b3e1002fe8
 
Hi JS
 
Hi Cinch
 
can anyone help me with videojs?
 
8:15 PM
is my regex correct for testing if the str is hexadecimal

var re = /[A-Fa-f0-9_]/g;

if(re.test(str)){
console.log("str is hexadecimal");
}
 
Do you really want to allow underscores?
 
oh I see..ok I will remove that
 
:22927254 ...
 
Looks like JSON
 
8:27 PM
> require('CSON').createCSONString
why not stringify?
 
8:44 PM
Zirak has made a change to the feeds posted into this room
 
...
 
posted on April 24, 2015 by CommitStrip

Today, the strip is sponsored by… CommitStrip! To be precise, it’s sponsored by KRDS, the agency founded by CommitStrip’s founders! We have 2 open positions in Asia for a Technical Lead and a Sysadmin (of course, we love sysadmins ;)), so if you are there or ready to move to South Asia, and see CommitStrip under the hood, the job is for you! We also took this opportunity to create a

 
4 messages moved to JS trash
 
Zirak has stopped a feed from being posted into this room
 
can I ask help, I used the moment.js

I want to convert this

150423160509

To

2015-04-24 00:05:09



var a = moment.tz('150423160509', "Asia/Taipei");

console.log( a.format());


but the output is like this

2015-04-26T04:43:49+08:00

How to make the output only like this
2015-04-24 00:05:09
 
8:47 PM
Look at the documentation
 
Zirak has made a change to the feeds posted into this room
SomeKittens has stopped a feed from being posted into this room
Zirak has made a change to the feeds posted into this room
posted on April 24, 2015 by Dharani

The Dev channel has been updated to 44.0.2376.2 (Platform version: 6996.0.0) for all Chrome OS devices. This build contains a number of bug fixes, security updates and feature enhancements. A list of changes can be found here. If you find new issues, please let us know by visiting our forum or filing a bug. Interested in switching channels? Find out how. You can submit feedback using ‘Report a

 
@KendallFrey So how do I multiplayer?
 
4 messages moved to JS trash
Sorry, there'll be a few of these
 
Current status: drunk enough to want to school kids about hiphop history, so 90s flashback here: youtube.com/watch?v=RRemp82FFjE
@jemz IIRC format can take an argument
 
@SomeKittens DMP
 
8:52 PM
@rlemon, @Loktar I'd add the Sublime Text blog but it hasn't been updated in ages.
As if nobody cares about it. Because it's shit. I dunno.
Added commitstrip, Chrome Releases and Atom blog, removed SMBC. Anything else?
 
@ivarni,
I tried console.log( a.format("YYYY-MM-DD"));
but it gives me 2015-04-26 , the 26 should be 24
console.log( a.format("YYYY-MM-DD H:m:s"));
2015-04-26 4:58:56
 

« first day (1652 days earlier)      last day (3297 days later) »