« first day (1941 days earlier)      last day (3006 days later) » 

3:00 PM
but let's say we didn't want perspective, how would you do it? I'm still clueless on how would you combine the x/y/z rotations
 
@towc No idea what you mean, once again, but a 3x3 matrix can be one of two things: a linear transform in 3D, or a perspective or affine transform in 2D
 
z is pretty easy, but x/y? They would just be scalings of their sin and cos multiplied because we can't deal with z positions, right?
 
@MadaraUchiha I don't think I have es7 features enabled, not sure about async await
 
@towc Without perspective, in 3D, you still need a 3x4 matrix, or 3x3 if you ignore translation
 
@SterlingArcherI am now
 
3:01 PM
Ooo, async functions are super useful in routing
 
@JonasDulay I'm not even sure a style guide will help you yet, but you can read eloquentjavascript.net this free online book to get a better handle
 
@SterlingArcher OK, sec
 
if you only need rotation, then you really only need a 3-vector minimum, though quaternions may be preferable
 
@MadaraUchiha wait wait, if it's easier I can always add to my babel-presets file
 
is the res[game] = players structure a requirement?
Because it would make more sense to model it as a list (array)
 
3:02 PM
How can you prevent node js from caching resources while in development mode?
 
@SterlingArcher it is a plugin, not a preset
 
plugin sorry
 
you didn't say preset
 
@MadaraUchiha how would a list work instead?
 
I'm just reminding you
 
3:03 PM
ty lemon
 
@KendallFrey I think I didn't explain the problem correctly. Is there a way to display an image in 3d using the 2d context in canvas using a single setTransform and drawImage call, given that you can know anything about the image and what it's properties are in 3d, with, or without perspective?
 
async function getOpenLobbies() {
  const games = await keysAsync("*game*");
  const players = await Promise.all(games.map(smembersAsync));

  const combined = games.map((game, i) => ({game, players: players[i]}));

  return combined.filter(game => game.players.length);
}
@SterlingArcher something like this ^
 
lol Loobies +1
 
You can fairly easily transform it to non async/await, but it's more readable and understandable this way.
 
In theory every 3D affine transformation can be mapped to a 2D affine transformation. I think. So it should be possible
 
3:04 PM
And then I just getOpenLoobies().then(data => res.send(data));?
 
@SterlingArcher Yeah, data will be the list of games with non-0 players list.
 
@KendallFrey and how?
 
And you get a list of {game: ...., players: [....]} objects
 
@towc math. idk
 
@MadaraUchiha I'm not sure I understand how await works -- will const players wait for games to be finished before running?
 
3:06 PM
do you only need rotation?
 
it's not possible to convert 3D to 2D without maths
 
@SterlingArcher Yes, the syntax is await somePromise, and the result of the expression is the actual result of the promise, rather than the promise object itself.
An async function can pause and resume at any time based on the awaits.
 
That's... amazing
 
@ndugger I'm sorry I doubted you
 
3:07 PM
@KendallFrey and translation
 
@MadaraUchiha going to install the ES7 plugins :) Thank you for your help, that is so much cleaner than a nested promise loop
 
@SterlingArcher If you're using Bluebird (which you should, since you're server-side), you should totally enable Babel transpiling async/await functions into Promise.coroutine() calls
The default that comes with Babel isn't (nearly) as good.
 
@KendallFrey Scott Kelly: "Got to see the superbowl afterall!"
 
@towc as long as there's no skewing, it should be easy
 
(I am) and I'm not sure what a coroutine is
Let me take a peek
 
3:09 PM
The result is mostly the same, the difference is in the error handling and reporting.
@SterlingArcher await/async is a fancy name for a coroutine.
 
@KendallFrey so where would I start?
 
You can use a coroutine today with bluebird like so:
 
@towc One more question: What is the 3D object you are trying to render?
 
@KendallFrey an image rectangle
 
3:10 PM
const myCoroutine = Promise.coroutine(function*() {
  yield Promise.delay(500);
  return 42;
});

myCoroutine().then(console.log); // 42 after half a second
 
[ a, b, c ]
[ d, e, f ]
[ 0, 0, 1 ]

setTransform provides me the means of changing a, b, c, d, e, f
 
// Which is the exact same as
async function myCoroutine() {
  await Promise.delay(500);
  return 42;
}
 
that goes against

[ x ]
[ y ]
[ 1 ]

of course
 
It's only more readable,
 
c and f must be translation in x, and y, of course...
but not sure about the rest
 
3:11 PM
Isn't that a generator function?
 
yeah translation can be handled separately
 
@SterlingArcher Yes, by wrapping it with Promise.coroutine(), it causes it to yield to promises
 
I wonder if Esailjia ever thought Bluebird would be so freaking powerful
 
what you can do, I think, is take points 1,0,0 and 0,1,0 and apply the desired rotation, then plug the results into the 2x2 matrix
 
npm install babel-presets-stage-0 --save
fuck
I always do that shit
 
3:12 PM
ignoring the z-component
 
babel should be saved as a dev dep
noob
 
--save-dev
babel-node isn't for production, you compile your production ahead of time yes?
 
Yeah but why? Doesn't ES7 need to be transpiled or it could be incompatible?
 
in which case, babel and components should be installed as dev dependencies not runtime deps
 
3:14 PM
My github code is my production code
 
@KendallFrey wut? 2x2 matrix? maybe you meant 3x3 bidimensional matrix? Also, the desired rotation like that would just give me the z rotation
 
Should that be compiled code?
 
no
github should provide the tools to make the build
 
Ok good good, that's what I'm doing
 
and as x/y I must feed the screen x/y position, not the 3d space x/y
 
3:15 PM
babel doesn't recommend using babel-node for production is all I'm saying
 
Technically I don't have a production yet then
 
so you will (assuming) have a /dist folder you place the compiled output into for your final production server
(so you don't need to run babel-node)
 
Oh yes def!
 
@towc the canvas transform is made up of a 2x2 matrix for rotation/scaling/skew, and 2 coords for translation, and then 3 coords that would normally be perspective
 
yes, so install all your babel shit as a devDependancy with --save-dev
 
3:15 PM
As of now, the only reason I have my "prod server" is for home development on my chromebook
 
and your core modules (runtime needed) with --save
 
It's a dev server for now
Gotchaaaa thanks!
Didn't know that
This is why you got a shoutout on my GH page
> @rlemon -- Helping design, teach, and create the express node routing system. Also screamed BABEL at me several times.
 
> With the --production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies.
 
@towc If you rotate those two vectors in 3D space, then drop the z coord, you'll end up with two 2D vectors that go in your canvas transform matrix
 
from the npm docs
if you're curious
 
3:17 PM
But in production mode, my repo would be compiled into ES5, right?
 
yes
 
I can't wait until there's no need to compile ES6 code
 
but once node updates, you just stop the compile step (theoretically)
 
@KendallFrey ok.... and?
hmmm
 
but realistically at that point you'll be using babel to compile es7 to es6
 
3:18 PM
I mean, node already handles most features natively already
 
oooh
 
you'll never stop using babel (or similar)
just accept that
 
I didn't even have to run the --harmony flag for =>, let const etc
I only needed babel for destructuring, generators and await/async
 
today
think about it, as JS matures we will not ever wanna wait
 
lol I accept it
 
3:19 PM
tools like babel will never go away
 
@towc well, what are you using to represent rotation? euler angles?
 
JS matures way faster than browsers do
 
my lovely friend my sisters and brothers
http://stackoverflow.com/questions/35272979/knockout-js-custom-validation-rule-for-logical-or-for-two-input-fields
 
they will just mature with the language
 
@KendallFrey spherical coordinates
 
3:20 PM
uh
 
Man I haven't seen a KO question in a while
 
what?
 
I really should learn it one day
@KendallFrey bro <3
 
why not? @KendallFrey
 
why not what
 
3:20 PM
@SterlingArcher ..
 
why not peanutbutter
 
@KendallFrey wrong person sorry xD
 
@user3037960 maybe make a demo of your problem
people love demos
 
ouuuh!
 
3:21 PM
Downside of babel -- it takes 3x longer to startup my app
 
who thaa fuck gave me (- )
 
@rlemon why not zoidberg?
 
@SterlingArcher who cares
it's all about runtime
 
dev me cares :D
lol kidding
 
3:23 PM
yea
well that is true. it slows down dev
 
Hrm, wrong number of args for SMEMBERS
 
but realistically, you won't be restarting the server that often
 
crap I fixed that last night.. it was a bitch
 
@SterlingArcher generally, try to postpone the side effects as much as possible
Less functions producing side effects = more functions which are super easy to read/write/test.
 
OoooooOOooOooOoooooooo...... bulma.io
<div class="columns">
  <div class="column">1</div>
  <div class="column">2</div>
  <div class="column">3</div>
  <div class="column">4</div>
  <div class="column">5</div>
</div>
THAT IS WHAT IM TALKING ABOUT!
none of this col-2-8 crap
 
3:24 PM
I cant make a demo of my problem - to much dependencies ... @rlemon
 
@rlemon HRNNGGG!!!!!
 
Its really something simple
 
@user3037960 you sure can, I think jsfiddle even provides KO as an option
 
when someone ever has already worked with knockout.js he would know how to solve
really? ok let me see
 
@rlemon Am I the only one that thinks bootstrap should not be used as a CSS library but as a LESS/SCSS library?
 
3:26 PM
@MadaraUchiha ofc. bootstrap is meant to be customized
 
const players = await Promise.all(games.map(smembersAsync));
const combined = games.map((game, i) => ({game, players: players[i]}));
 
fuck tho
 
(disregarding trivial landing pages and shite like that)
 
Bulma looks nice as hell
 
@MadaraUchiha I'm getting a wrong # of args for smembers error -- I think I need an error handler attached to the function
 
3:26 PM
1
Q: How to select all list items but list items dont have nested child of <ul> or <ol>

Gobinath MahalingamI want select all list item in child of ".favdelParentFold" but make sure list items not have any nested child of <ul> . If list items have any nested child "<ul>" I dont want to triggers it. HTML <li class="favdelParentFold"> <a href=""><span class="caret-right"></span></a> <span clas...

 
@GobinathMahalingam 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.
 
I don't think I've used col-n-m in the past year or so
 
grid system based on flex... I never knew I would love it that much
 
Not quite sure how to.. bind one? I guess?
 
I define my own classes, and use imports and mixins from bootstrap if I need to.
 
3:27 PM
When i click on fold2.1 i need to get values "fold2.1" and "fold2" and also when i click on "doc 6" i need to get "doc6" , "fold2.1" and "fold2" values. same as "fold2.2" also pls guide me
 
Ah, my bad then
games.map(game => smembersAsync(game))
The map callback has more than one argument, if smbmebers accepts more than one argument, it might interfere.
 
hot damn, I will totally be using this in my next project
 
:D :does a happy dance:
 
@rlemon features?
Aside from the grid system?
 
3:30 PM
[ { game: 'game-5',
    players: [ '1', '2', '3', '4', '5', '6', '7', '8', '10', '90' ] },
  { game: 'game-1', players: [ '1', '2', '3', '4', '26' ] },
  { game: 'game-2',
    players: [ '1', '2', '3', '4', '5', '6', '7', '8' ] },
  { game: 'game-3', players: [ '0', '3', '4', '8', '9' ] },
  { game: 'game-4', players: [ '1', '2', '3', '4', '5' ] } ]
 
@MadaraUchiha looks similar feature set to purecss.io but it appears to be much much much nicer to work with
 
@MadaraUchiha you're the best. So much prettier than what I wrote
 
@SterlingArcher \o/
 
Now let's see if I can make a man dropdown outta this biotch
 
// removed rtc
 
3:32 PM
!!youtube black balloon goo goo dolls
 
function foo(a,b) {
  c.push({a:a,b:b});
  // other things
}
is there some new es2015/6 hottness to simplify that push call?
given the property names are the same as the var names and are all arguments
 
c.push({a, b})
object shorthand is the inverse of destructuring and works when the var/prop name are the same
 
Cool
Ty
 
@rlemon Wow. I haven't thought about that song in forever. Good tune, though.
 
3:39 PM
@Loktar finally convinced the gf she needs a gaming pc. Recommendations on a monitor?
 
@rlemon if you want to return a new array with the new object in place, you can further shorten to
 
My lobby works!
 
return [...c, {a,b}];
@SterlingArcher \o/ Rejoice!
 
@RyanKinal "90s station" on Google music. Good stuff.
 
3:39 PM
Next step, allow lobby creation so I can get rid of these pesky static games
 
user3119231
@SterlingArcher awesome o/
 
Sweet
 
@MadaraUchiha thanks again :) async await is my new fav
@RyanKinal!!!
 
@SterlingArcher o/
 
Dude how have you been?
 
3:40 PM
Woah
Blast from the past
o/ @RyanKinal
 
Not bad not bad
 
@MadaraUchiha that's literally me learning ES6
 
Nothing overly exciting happening
 
I wanna puppy :(
 
3:41 PM
"Destructuring is my favorite thing.. omg generators are my new favorite thing... HRNNGGG async await is my favorite thing"
@rlemon please get a pug named Abelard
 
I mean, except for a couple things... my brother and his wife just had a kid, which is cool. My band's album is getting close to being done.
@SterlingArcher How have you been?
 
@RyanKinal doing well, loving work, making a game, and trying not to burn my house down :D
 
Haha
 
Congrats on the album! Post here when it's done?
 
that is sometimes harder than it sounds
 
3:43 PM
I hope you're also succeeding at not burning your house down?
 
the burning the house down bit
 
@SterlingArcher Thanks. Will do.
 
So far I've only burned a quesadilla
 
That is a far better thing to burn than a house
 
I suppose I haven't actually burned anything
but I did have that gas leak
 
3:43 PM
@SterlingArcher Doing work, making love, trying well, and burning a game down.
 
lol
 
> The phones for you I think it's the devil
 
I'm starting a new thing, where my commits are quotes from Grandma's Boy
 
3:46 PM
There was a girl in highschool who called me Satan...
Sorry, the devil thing reminded me of that
 
I have that picture somewhere
 
I wish people would stop calling me god and start calling me satan.
I guarantee satan is better in bed, so saying "oh my god" doesn't really make sense.
 
@RyanKinal are you sure she wasn't dyslexic and was trying to call you Santa?
 
Could be!
@rlemon rofl
 
3:47 PM
OH SANTA
 
Forgot about that one
 
@RyanKinal album cover?
I THINK SO!
 
@SterlingArcher that's the kinda shit I'd put pants on and walk away for
 
I'd soldier through it
 
Ryan Kinal's debut album... "Your Soul is Mine"... sensitive acoustic music that may or may not consume your soul.
 
3:48 PM
when you play it backwards it is actually Ryan just reading the jQuery source code
 
> 10/10 went to hell and back - Some reviewer, probably
 
NOOOOOOO
 
rofl
 
@SterlingArcher Is that a big red elf in your pants or are you just happy to see the snow?
 
3:49 PM
@ssube good god
 
s/god/santa/
 
had to be said.
 
omfg
bad lemon
 
Bad Lemon... my next band name
 
3:51 PM
what are the other band members names?
first only is fine
 
My current band? Rose, Joel, Sebastian, and Nick
 
do you have a girl drummer?
 
Singer
 
if you want to be a real band, you have to have a girl drummer
 
I mean... I could maybe convince Nick to get a sex change?
He's seeing a girl named Tyler... which is mostly a boy's name... does that count?
 
3:53 PM
> Joel Jammin' featuring Ryan T, little Nicky, and The RS band.
 
wtf lol
 
if you're going to make a band name, make it long and awkward and people will remember it.
and you have to change your last name to start with a T
 
Yes. Long and awkward are things people remember.
 
but that is a minor detail
 
user3119231
the glorious dragon archer
 
3:54 PM
@RyanKinal Ubiquitous Synergy Seeker is doing alright
 
-1
Q: How to use php var with javascript var like (+ - * /)?

mongmongmong seeseeHow to use php var with javascript var like (+ - * /) ? <script> var xx = "10"; </script> <?PHP $xx = "20"; ?> anyone have idea for plus $xx with var xx

 
But that's an awesome name
 
> dead men in raincoats.
 
@rlemon oh, we hired one of those
 
then at least you have a gimmick
 
3:55 PM
@rlemon I like my benq personally
 
Etc works on server !
Oh wow !
 
@Abhishrek o/
 
All my asus ones have been fine as well
 
RTC
 
@Loktar yea I have not had problems with my LGs
 
3:56 PM
And hi @RyanKinal
 
I have an LG that my son now uses, has lasted forever
 
didn't know if there was something new for gaming I'm unaware of aside from 4k
 
but yeah I assume you aren't going to get her anything crazy
 
man, the web installer for visual studio is a pain in the butt
 
well I mean there are 144hz monitors with freesync or gsync
 
3:56 PM
budget is $2500 for the entire build
tower + monitor
 
@KarelG all the installers for VS have always been :(
 
Did you see the ping @rlemon @Loktar ?
 
the iso one works well. but a big download
 
@Loktar how can you sit there with SCORE 938 in the JS tag and not be pushing for Gold ._.
 
@Abhishrek hah yeah my kids play that
 
3:57 PM
You sicken me
 
@SterlingArcher LOL damn I didn't know I was that close
 
SICKENING
 
Fun game
 
Any knex friends here? Is there anything wrong with this?
 
@Abhishrek yeah there was a mod in the early 2k's for Halflife exactly like it
 
3:58 PM
export function up() {
  return database.schema.createTableIfNotExists('users', function (table) {
    table.increments('id').primary();
    table.string('first_name', 255);
  }).then(function (table) {
    return database.schema.createTableIfNotExists('user_emails', function (table) {
      table.increments('id').primary();
      table.string('email', 255);
      table.integer('user_id').references('users.id');
    });
  }).return();
}
 
?
oh
I got excited
 
The Specialists @Abhishrek is the one I played the most
@corvid I made my kids get rid of the one knex set they had
 
I saw its dev talk about the process cool / insp. Guy
 
@SterlingArcher yayyyy
 
@corvid what is the trailing return() for?
 
3:59 PM
 
@ssube Probably nothing, but I don't you have to complete the transaction via the promise/callback?
 

« first day (1941 days earlier)      last day (3006 days later) »