« first day (1936 days earlier)      last day (3007 days later) » 

12:00 AM
He did a really great blog post about Fake Operator Overloading
 
@Trasiva that alone is not much. control module, some solar panels, some batteries and a big old tank of fuel
on that tank is 5 contact points.
so I'm attaching 5 more tanks, on one of those tanks I'm attaching 4 more actual spaceships (small ones)
 
@rlemon Return vehicles?
 
gonna try to land on a planet and come home
 
Judging from what you said earlier, it's quite the flight.
But if you're landing on a single planet, why four additional space crafts?
Shouldn't 1/2 suffice?
 
take 4 guys up, land on duna, send one home. land on dres, send him home(?) and then send one back from jool and try for eeloo
the main ship will stay in orbit. I need smaller ships to land and take off / go home
if possible
 
12:03 AM
Ahhh, so you're not landing on a single planet, you're sending multiple.
 
yea
gonna try to loop off each planet on the way
 
Okay, that makes more sense, haha. That definitely requires a multi-vehicle setup then.
 
@rlemon o/ hi
 
howdy
 
12:04 AM
I've seen some pretty cool builds. Someone made the Millennium Falcon.
 
@Luggage something like that
 
@rlemon Not very good :-(, have to go for MRI today ._.
 
the two circled are duplicated on the other side
 
apparently there is a 20% chance that I might have MS
 
they will hook up four more large fuel tanks
the bottom will hook another large fuel tank with an engine and 4 more contact points
 
12:06 AM
big orange tanks?
 
those will attach the other ships
 
is that thing a station or ship?
 
which game is that ?
 
@Luggage right now, station
 
KSP, Kerbal Space Program
 
12:06 AM
once complete, ship
 
crl
var a = document.querySelector('a');
for (var i of a.attributes) console.log(i) // stupid chrme can't do that, even with NamedNodeMap.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
 
be careful that waht you sttach to the sides are symetrical and not floppy
 
looks wonderful
 
steamcommunity.com/id/luggage66/screenshots/?appid=220200 My steam screenshots of KSP, for those that care
 
@Luggage I believe at certain orbits (i.e. deep space) it doesn't matter
 
12:08 AM
always matters when thrusting
but if it's only slightly imbalanced you might be able to get away with it due to engine gimballing or the RCS
 
poodle doesn't really do much
poodle + deep space + luck
 
ohh, the thrust.. yes, and you can just thottle up gently if so
 
we'll see
this is my first mission of this type
I only just learned how to dock
 
good fun
 
I'm real good at landing
rendezvous, not so much..
 
12:11 AM
it can be rough, sometimes, even when you get it down
 
it isn't a good time until you blow up landing after a 1.5 hour mission and forgot to f5
 
@rlemon Remember, spit on it before you dock.
 
especially when low propellent means you can't make everythign perfenctly lined up before you try to intersect
 
thanks tips
 
been there too many times.
 
12:12 AM
@Luggage ohh my god.. got to duna (orbit) and returned only to run of out fuel @ 98km
 
or accidently stage.. that one really pissed you off
 
still in orbit
I couldn't terminate.
will recover one day...
 
send up a rescue
 
yea, I will
 
@rlemon So...do your guys eventually die from starvation if left there long enough?
 
12:13 AM
right now he's drifting
@Trasiva maybe there is a mod?
I've had people in orbit for years
 
also, tip: pass your orbit through the atmosphere to give yourself a free ride home.
 
@Luggage yup, was working on that
that was when I was at my "I need to set my approach at a higher angle" and not "fuck it, correct later"
 
I mean, your return path should have passed through the atmosphere before even doing a burn to slow down
 
yea, mistakes were made
you learn
 
!!afk Early night tonight. Dinner and then passing out.
 
12:15 AM
now I b-line for the core of the planet and correct on approach
 
right, this is something i pickd up late. i always tried to slow down into orbit of a poanet on arrival instead of using the atmosphere directly
aerocapture
 
yea, same
"I need to make orbit, then I can enter atmosphere"
and for some reason I was obsessed with making it circular first as well
 
Do you do your burn for Duna in low KErbin orbit, or after you leave kerbin?
 
orbit first
then transfer
 
ok, but you transfer directly from LKO?
 
12:16 AM
yup
well, 400km
 
ok, good. that's the right way
 
mostly for warp time
 
i wasted a lot of propellant at first leaving kerbin orbit, then doing my transfer burn while orbiting the star
 
yea I tried that a few times
then watched like 100 Scott Manley videos :D
 
maybe i'll go get my ksp set up to play
alway need to update the mods.
 
12:22 AM
I am somehow messing this really bad: jsfiddle.net/rdesai/qyrh1shL/7 I need to scroll to bottom when clicked on the button. But I cant scroll back up. I kinda giving elastic effect.
What am I missing here?
 
nope I'm right
it is a loop
 
^
keeps calling over and over and over
> YOU SHALL NOT SCROLL UP
 
scroll height = scroll top + height
so scrollTop is always < scrollHeight
so the timeout always happens
 
yeah, it is always having 200px more in it
How do I get the height ?
 
@Loktar o/
 
12:29 AM
o/
 
hangouts ?
 
wow
style.height, huh
 
I'm making my own site with vanilla css. However I want to stead the grid classes from bootstrap. Is this a simple matter of copying the grid css from bootstrap?
md sm xs lg etc
 
@phenomnomnominal Looks awesome, man
 
12:37 AM
@SuperUberDuper yea
use the package builder on their site
 
I'm not being cheap right?
 
I didnt know I could get the height from window.getComputedStyle.
 
@RahulDesai you can also use getClientRect
 
I see
 
12:39 AM
sheesh @Loktar over kill with options
 
yeah getClientRect is the way to go @RahulDesai
much faster than getComputedStyle
 
@rlemon I find patched conics mode 0 super useful in eliminating all but the most gentle of corrections. It shows you exactly what orbit you'll have when arriving.
 
I'll check it out
right now I'm putting the main thruster into orbit so I can dock it
 
It's not obvious at first, so if you want me to show you just ask
 
this is my "deep space" design
if it makes any sense to you
I've started drawing out space ships before starting them
 
12:43 AM
i build them in the VAB
 
What are you planning to do with it?
also, ^^ that
 
lol
 
@Trasiva \o/
 
@Cereal Trasiva is afk: Early night tonight. Dinner and then passing out.
 
LIAR
 
12:44 AM
well it is going to be 8 different rockets assembled in orbit
then sent to jool
and back.....
 
Jool is my favourite destination
 
I'm going to put two return ships on it
jool and maybe eeloo
 
one moment, let me show my PC's wallpaper
 
you have a rover on jool?
 
The rover's on Laythe
as you can clearly see :P
 
12:46 AM
I haven't been out that far yet
i have no idea what those planets look like
 
Not even checked them out in the tracking station?
 
just the dots
I plan on getting there
 
the css from bootstrap or any css framework just seems so verbose and ugly
 
or at least sending a probe
 
Any plans on ISRU? Maybe take the ship on a grand tour of the system?
Oh btw, do you use a delta-V map?
I couldn't live without it
 
12:49 AM
nope? maybe?
idk
I'm new to the rocket game
 
yea I know none of that
 
That's the most detailed one I know
 
I should print that out
 
I'm temped just to ditch bootstrap and use html5 boilerplate @Loktar
 
12:50 AM
okay?
why are you pinging random people
don't do that
 
i made mistake
 
@KendallFrey this game made me appreciate how short obit times are for space stuff
ISS 90 minute orbit is insane to me
imagine seeing the sunrise every 90 minutes (so to speak)
 
@SuperUberDuper go with get-skeleton
 
Fun fact: Given a uniform sphere, orbital period at surface height is determined completely by density
tl;dr: orbital period around a ball of water is the same no matter what size it is
 
another fun fact : If you drop a ball which goes through a pipe in earth it will still be called an ORBIT !
 
nut
12:54 AM
Hi, I'm new to JavaScript, I'm wondering what is the best practice or most common way to write a one-time use JavaScript chunk? For example, document.addEventListener('DOMContentLoaded', function() {..}) or (function(){...})(); or something else? Thanks!
 
@nut Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@Abhishrek another fun fact: You won't be able to do that except at the poles, because of the Coriolis effect
 
@KendallFrey neat
 
@KendallFrey <3 you
 
(Can't remember if that's actually the Coriolis effect)
 
12:54 AM
@Abhishrek hmm nice, that would give me the one thing I miss from bootstrap
 
@nut do you need the DOM to be loaded?
 
but can you specify how many columns at different widths?
 
nut
yes
 
So here's something interesting. I ordered something online, and the merchant says my payment was received, but no transaction appears in my credit card history.
crossing my fingers and hoping I get it free
 
sometimes takes a few days to post
 
1:06 AM
^
 
m59
1:19 AM
Do any of you abstain from semi-colons?
If so, what do you do in this case?
foo()
[1,2,3].reduce((a,b) => a+b)
// => foo()[1,2,3] => undefined.reduce
 
;[1,2,3]
 
m59
;[] neat
 
if you start a line with [ or ( it has to be preceded with a ;
 
m59
cool. Worth it. Someone finally convinced me, and I'm glad.
Code looks a lot better without them!
 
@Abhishrek ah its still a lot of code. I might just start with normalise.css
 
1:30 AM
Co-worker just came across home-inseminations.org searching for payment gateways (no pun intended)
 
I kinda think 2015 was a year for Angular, but in 2016 React is going to be big. I have been hearing lot of good things about React and a lot of job requirements nowadays are asking for React and not Angular.
What do you guys think?
 
m59
@RahulDesai React is a lot better than Angular, but Cycle.js or Elm are a lot better than React =D
 
@m59 seems naive
 
m59
The drawback of cycle is that it is new and the community is still small.
 
I see. I have heard about Elm but not Cycle.js. 0_o
 
1:37 AM
better is so dependent on the situation
 
m59
Sure.
It may not be the right choice for a project.
That's not the context of my statement.
 
@m59 im starting a new web app, convince me why I should use elm or cycle :)
vs react
 
m59
Declarative programming is better than imperative and functional is better than object-oriented, therefore Cycle is better than React from that standpoint. That doesn't mean I could use Cycle for a serious project. There aren't many blogs, tutorials, or community modules.
 
I see.
Gotta lookup declarative programming.
 
@phenomnomnominal agreed
Cycle will never overtake react or angular in popularity
> random "factual" opinionated statements ftw
 
m59
1:44 AM
oh, no doubt
It's waaaaayyy harder to get started with
so most people won't
^ React vs Cycle:
 
Do they need backing of big names like Google or Facebook to get popular? lol
 
m59
I don't see how it's an opinion that Cycle is better architecturally.
Unless your scale works like this: worse | simple <------------------------> better | complex
 
Why is functional better than OO?
 
OO can fuck your shit up if the requirements of your project change
 
design patterns server their team/need
 
1:50 AM
@RahulDesai that was my idea behind my statement
It certainly helps anyway
 
@Loktar True
 
I agree.
 
We will be lucky if it overtakes jQuery
 
lol nothing can overtake the JQ
ever!
 
;-) that was the joke
jQuery must be the work of god!
I mean it works in mysterious ways. ;-)
 
m59
1:52 AM
@BenCraig a lot of reasons. Pure functions is the most important, I think.
Testability, simplicity, composability
 
I see
 
ach , I thought a 16gb stick would be big enough for linux mint 17
 
The sad part is some people learn jQuery first and then Javascript. Ughh
 
2:14 AM
OH GOD TAI LOPEZ IS BACK IN MY ADS
 
lol
I miss Tai
 
I miss him not being alive
 
wait what?
Remember when he died lol?
 
2:42 AM
Good morning from Shenzhen.. Although it is 10:30 A.M. now but I have just wake up 20 minutes ago.. When time is at 8:30 I leave my alarm beeping and continue to sleep, and my alarm just automatically stop.
 
HAMMERTIME!
 
^ perfection.
 
< perfection
 
flagged
 
anyone know how you can use es6 imports inside a web component?
 
2:49 AM
Just came across this old picture: @marcgravell @jonskeet and @spolsky https://t.co/iFuDiSGIMx
hilarious
 
anyone know a good editor that knows how to format js like:
const template = '<div>\
                    <h1>Login</h1>\
                    <input type="email"/><input type="password"/>\
                  </div>';
note: this is not react, pure vanillajs
 
`
 
WebStorm? ( However it is not free )
 
if you have access to const, you mightaswell use a template string
which means no need to escape newlines
 
ok cool
not bad:
const template = `<div>
                      <h1>Login</h1>
                      <input type="email"/><input type="password"/>
                    </div>`;
but not perfect in WS
hmm still pretty dumb
 
3:01 AM
think it looks fine in vscode
though the escaped string looks fine too.
 
i didnt realise \ was escaping the CR
 
@SterlingArcher dude I keep listening to this song over and ovdr
 
@Loktar SterlingArcher is afk: home time
 
The black. Ugh can't wait for their album
 
Haha I'm spamming Avatar right now
 
3:13 AM
woah
I got a new song
Undivided, on google music
wait.. that isn't even new wth
 
Yeah dude thats been onspotify for months now lol
 
lol yea
I think I was just mistaken, was in most recently listened to
I'm a nub
 
Did you get a chance to listen to the song i posted earlier?
I'm raving about it lol music video is badass
 
no actually, I will now
also Avatar is really hard damn
 
If they ever make a remake to the Crow he'd be perfect
 
3:18 AM
haha
lol this is a great video
this is their top song on google play, was just listening to it
 
I love the old fashioned aspect
They play avatar all the time on Octane and I always end up raging face in my car lol
 
haha
man I kind of miss octane
but I wont pay for satellite radio :/
always get it for free for a time with new cars though lol
 
Do what my brother does, threaten to cancel and get 5 months for $20 lol
 
hah yeah that is a good idea actually
 
4:21 AM
Canvas problem
is there a perfomant way of simulating asteroids ?
@Loktar (breakable)
I am using a particle emitter atm
when they explode they just emit smaller particles
until the size is like dust at which point they just dissappear
( I want like 500 of them )
 
@Abhishrek ( are you having problems on drawing, or simulating and drawing? )
 
doing it all at 60fps
 
@Abhishrek What method are you using now?
@Abhishrek Is it too slow, and you want a faster method?
 
@Abhishrek Have you done any benchmark to pinpoint the bottleneck? I suspect it's in drawing rather than calculation.
 
@Sheepy the calculation occur in a worker
 
4:32 AM
How are you moving the asteroids?
 
box2d (so far)
 
Hmm. So you don't know how it works, the actual implemetation?
 
the rendering right now is just random line shape which is generated
on create.
nay I just used box2d for entire physics engine
 
@Abhishrek How are you rendering?
 
Yeah. Try benchmark it.
For calculation, using integer rather than floating point is a great speed up. For rendering, try scale + transpose + rotate transform, which can be hardware accelerated (i.e. browsers render them as OpenGL effect - no reflow).
That's my experience anyway. I don't use box2d.
 
4:38 AM
I was using box2d because i wanted real physics
I guess thats not possible yet x)
 
Hard to say. My intuition is telling me box2d is doing your animation like jQuery. Which as you know is quite inefficient.
But the bottleneck can be elsewhere. Worker communication, for example...
 
@Abhishrek: Are you rendering with regular Canvas or WebGL?
 
so far canvas
 
4:53 AM
@Abhishrek Render with WebGL: pixi.js
 
PIXI has a ParticleContainer for that kind of thing by the way
 
oh weee
 
Beware that mobile browser's webgl is not very mature.
 
Yeah Pixi has a Canvas fallback also
 
autoDetectRenderer should be fine
 
4:55 AM
But in general you will probably have much better performance with WebGL especially for rendering tons of particles
 
I think he mean those as 2D collision particles, rather than actually rendered as graphical particle?
 
Hmm perhaps, I thought he meant box2d was just calculating each position/velocity/acceleration and he was drawing each particle
 
I remembered that when I was writing a game. At first I used a library which only use javascript + canvas rendering ( no WebGL ). And the performance is even worse than SVG under same number of elements.
What I learned is that if WebGL is not available use SVG. But haven't tested.
 
Yeah it depends what you're doing, SVG will generally start off faster than Canvas, but WebGL would probably beat both in the majority of cases (except you don't have vector support like SVG)
Sure but you can triangulate a SVG to draw it in WebGL at any scale, or render the SVG to a texture (of sufficient size) and use it in WebGL easily enough
 
@grovesNL I used to think that WebGL is only for 3D, which comes from a wrong understanding of "GL" -.-
 
5:03 AM
I use it almost entirely for 2D graphics - it's great
 
 
The blackslash explosion.
 
user4883426
Hi guys :) any one able to help me with svg?
 
@Sarah Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
user4883426
I have a funciton which downloads a file and converts the binary using atob. when i check the response it gives me the correct xml elements
 
user4883426
5:12 AM
but i want to access the svg element inside this response. how can i do so?
 
user4883426
0
Q: get svg element from an xml response

SarahWhen i try to access the reponse xml i get errors. i want to access the svg firstly and then get the height and width of the svg viewbox or an alternative way. how can i access the svg from the response xml to get the height and width? I want to access the height and width using javascript (mayb...

 
@Sarah So you now have a string of a svg document?
 
user4883426
@maowtm yup i do it like this: var c = atob(btoa(String.fromCharCode.apply(null, new Uint8Array(event.getParameter('response')))));
 
Do not use atob or btoa for non-prototype. They do not work with unicode.
They have quite a few replacements on MDN, SO, or GitHub.
 
user4883426
@Sheepy i am getting the correct response buti just cant access the svg
 
user4883426
5:20 AM
are u saying it is still related to atob?
 
No I am not. Just some friendly reminder.
 
user4883426
oh ok :)
 
user4883426
in this case ----> var c = atob(btoa(String.fromCharCode.apply(null, new Uint8Array(event.getParameter('response'))))); where c is a string. how can i access the elements within it (like svg)
 
@Sarah did you use jQuery?
 
user4883426
i am not sure how to do it with jquery. i tried it like this: c.getElementsByTagName("svg")[0]
 
user4883426
5:26 AM
but it didn't work
 
console.log(typeof c)
 
$(svgString)
Try this
 
user4883426
one sec please ill try this now
 
I have no idea what facebook are doing -.-
 
user4883426
@KevinB the type is returned is string
 
user4883426
5:31 AM
@(svgString) returns error: svgString is not defined
 
user4883426
it*
 
@maowtm yeah webgl is nice especially using pxi
but it's fun to squeeze perf out of the regular canvas
 
user4883426
is there a way i can convert the string to a format where i can access the dom?
 
eh I guess a few of my pens actually
 
@Loktar lol
did you ever make a multiplayer game ?
IF you haven't and you don't mind wasting 4 weekends, do it ;P
 
5:38 AM
I did back when node was really new
made an overhead shooter
I really need to finish grapple hero though
before I make anything else... it's why I've made nothing for like a year
I can't bring myself to work on anything else lol
my shooter just used long polling :p
I had to make lag compensation
 
5:53 AM
 
@Sarah $(svgString) while svgString is your svg string...
 

« first day (1936 days earlier)      last day (3007 days later) »