« first day (1662 days earlier)      last day (3303 days later) » 

8:04 PM
CSSTransitionGroup is shit. They are still looking at solutions handling animations.
 
>2015
>using CSS instead of jquery
 
Maybe use componentWillMount and componentWillUnmount to add a class and trigger a re-render. The problem is delaying unmount.
 
Neat
 
If anyone gives a shit, here's the slide from my talk last night, they probably don't mean much without any context, but meh.
 
@Loktar they should take a page from the velocity or gsap book
 
8:08 PM
@Shmiddty yeah i figured it
 
I'm having an error that I can't understand: Looking for the index of an object in an array isn't returning what it should be.

https://jsfiddle.net/ev0e1cjg/
 
@rlemon people suggest just using those instead right now
 
@darkyen00 What was your solution?
 
what I want is a better declaritive way honestly
 
Yeah
 
8:08 PM
@Deep Look up what indexOf does
 
isn't jQuery considering Velocity?
 
<fadeout time={200}>Some stuff</fadeout>
 
I would also like to see: shouldComponentMount
 
@Shmiddty whys that?
 
I know what indexOf does, its a 2d array, not a 1d array.
 
8:09 PM
Prevent the mounting of a component from within that component
 
just do a conditional render of the children
my lazyloader does exactly that
 
It makes more sense (I hope) if you look at the code in the fiddle. It doesn't "run", but it is valid afaik
 
same with another loader/spinner I made
 
It returns -1 if the value isn't found
 
Here's the searching function:
function indexOfRowContainingLevel(id, matrix) {
  for (var i=0, len=matrix.length; i<len; i++) {
    for (var j=0, len2=matrix[i].length; j<len2; j++) {
      if (matrix[i][j] === id) { return [i,j]; }
    }
  }
  return -1;
}
 
8:10 PM
return (
                <div style={preloadHeight} className={classes}>
                    {this.state.visible ? this.props.children : ''}
                </div>
            );
 
i forgot to rename it, but it returns row AND columns in an array
 
@Deep why would it return an array?
 
Ok I see what you're doing now
 
app.get('/csv/:id', function(req, res) {
	if( !req.params.id in store ) {
		res.end('invalid request');
	}
	var tracks = store[req.params.id].items.slice();
	var keyOrder = Object.keys(tracks[0]);
	var csvString = keyOrder.join(',') + '\n';
	csvString += tracks.map(function(track) {
		var ret = [];
		keyOrder.forEach(function(key) {
			ret.push(track[key]);
		});
		return ret;
	}).join('\n');
	res.end(csvString);
});
 
oh nvm
 
8:11 PM
would key order be retained here? *guaranteed I mean.
 
just wrap whatever content with <LazyLoad></LazyLoad> and it loads based on the scroll
but yeah I mean you can do that with anything using this.props.children
that reminds me I need to get my spinner/fadein/overlay loader component on GH today
 
Anyone here use Select2
 
does my problem make more sense now?
 
Yeah but I don't feel like fixing the syntax errors
 
@Loktar Yeah, we employ that convention in a lot of places, but some situations seem like it may be better to control internally. Does React prevent mounting if props don't validate against the specified PropTypes?
also, {this.state.visible ? this.props.children : ''} -> {this.state.visible && this.props.children}
 
8:14 PM
nice ty :P
 
object `a` has a property `start` that points to object `b`
object `b` is at position `[0,0]` in 2d array `c`. looking for `a.start` in `c` returns `-1`, not `b`
what syntax errors?
 
Uncaught SyntaxError: Unexpected token ,
 
@Shmiddty back in days i wrote something to see if a tab is active or not
 
@Shmiddty and no it doesn't prevent it
only warns you
 
if its not ... don't animate
thats exactly what we do in RAF
 
8:15 PM
oh, thats just because I cut out all the bits you don't need to see
 
Can you guys do me a favor and simply test this fiddle by clicking day/week/month/ and tell me if the canvas graphs work jsfiddle.net/h42tv3xv
 
@Shmiddty also thats cool you guys are using react!
 
@Loktar There are situations where you only want a component to be mounted if all of its requisite properties have been specified. It seems better to control that from within the component to me
 
love to hear more people using it, heh I want it to become popular so my next job will be dealing with it, rather than angular.
 
8:16 PM
there, syntax errors fixed
 
@Loktar Plot Twist: Your next job will be using BOTH. AT THE SAME TIME!
 
It does return [0,0]
 
@Shmiddty yeah I could see a benefit there if required props aren't sent it seems like it should prevent rendering
 
bleh nah I love flux + react
 
8:17 PM
 
but yeah you have to actually specify isRequired in addition to the type so that is a weird decision by the react team to have the component render regardless
never really considered that.
 
do people play video games before work?
 
I used to play before school
and during school :p
 
@KendallFrey sometimes
very quickly though
 
never.
 
8:18 PM
then it must be something to do with the code I removed. If you try it on the actual site, it doesn't work
 
I used to play Count her strike before work it used to make me focussed.
 
today I played like 20 minutes on my Atari Lynx
 
Now that I'm getting up long before work, I play KSP before work
feels odd, but I like it
 
@rlemon some help ?
 
I think its because I'm cloning an object
Lesson learned: Don't just copy code off SO.
 
8:20 PM
@darkyen00 with?
 
@darkyen00 getting there!
@KendallFrey I avoid it. Too easy to lose track of the time
 
Oh if I forget, Skype will remind me
 
@Loktar Yeah. I've been trying to get everyone on the displayName/propTypes train for a while now. Finally making some headway
 
good! Thats the only way people should be making components
 
Agreed!
 
8:22 PM
@KendallFrey I play 3DS games on the subway almost every day on my way to work
 
@rlemon you wrote typesetting
which is closest to this jsfiddle.net/d4aegur8/3
 
My gaming performance during the commute usually gives me a good idea of how well I'll be focused at work :P
 
@nderscore Ever miss your stop?
 
HAMMERTIME!
 
any clue on how can i make text swap smoother ?
 
8:23 PM
@Shmiddty Never from gaming. Only from sleeping.
 
@darkyen00 nope
 
well your library makes it possible x)
 
Though I will intentionally take a longer route instead of transferring if I really need a few more minutes of game time
 
There were a few times when I was taking the train to work where I'd be so engrossed in something that I'd miss my stop
 
8:23 PM
HAMMERTIME!
 
@darkyen00 all my lib does it break up your html
that is it
does no animating itself.
 
its awesome, I need to find a reason to use it.
 
@rlemon got it.
 
@darkyen00 You could use a visibility:hidden element with the correct text to get an accurate spacer
 
could also just use react canvas and say FU dom
and not worry about the transitioning element bs
 
8:25 PM
@Shmiddty that will only work with one character that too it won't be perfect
milk and iiii
are very differently spaced
 
@Loktar that's the thing - there's not many use cases, and it's going to be abused
 
Better solution would be to somehow measure how much space the text is going to take
 
@phenomnomnominal yeah definitely
 
placing a display: inline-block; container
and then swapping words inside the container
 
but if done right, it looks pretty powerful
@darkyen00 canvas can measure text.
/me stops pinging @darkyen00
/me doesn't actually care
 
8:26 PM
nvm wait
i can fucking use canvas !
because who cares about text selectability :P
 
my right foot fell asleep
 
@darkyen00 facebook.github.io/react/docs/… <span class="spacer" style={{width:...}}/> Put a transition on that class. Start at leaving width, adjust to entering width
do it on the appropriate events
 
@darkyen00 oh I was even thinking of just measuring the text on a temp/hidden canvas
 
yeah
node.getOffsetWidth()
 
@Loktar syncing it with html's style is a pita (atleast for canvas noobs like me)
@Shmiddty just gimme about 10 minutes :-)
 
8:29 PM
Easier to just get the width of the element. It should be a computed value
 
I set a record today. 4.5 hours with headphones on with no music
how the hell do i do that
 
psh
I always forget to take my phones off until they make my ears hurt
 
@SterlingArcher I imagine it involves putting them in, not turning on music, waiting 4.5 hours, masturbating furiously, then taking them out. Did I miss anything?
 
@Shmiddty you forgot the bit where you have to be a little bit silly
 
i don't know but it turns ing gray @ssube — Mariksel Azemaj 26 secs ago
 
8:38 PM
dat engerlishs
> Stack Overflow is currently offline for maintenance
pls
 
It's official. I no longer know how to spell Moon.
 
> git commit -am 'I am not a smart man :/'
 
I just had the most vicious stomach rumbling I'm scared people heard it
 
8:43 PM
@Loktar wanna help me test? (basically make sure it works for users other than just me)
or anyone who uses google music and has some playlists
and doesn't mind disabling security for a minute ;)
 
I don't playlist things
 
forgot that bit :D
 
@NickDugger that running man seems as that guy in breaking bad
 
@NickDugger Oh god I love franklin's face at the end
 
dead inside
 
8:46 PM
@Loktar letteringjs is more popular than my typesetting.js
notifier.js jQuery plugin is more popular than my notifier.js vanilla.
 
your notifications thing? I made one too
back when I had free time
 
you sure did.
 
nobody uses it; not even me...
I make lots of useless things
 
@NickDugger why's the guy running with the 4k?
 
4k what?
 
8:48 PM
 
@darkyen00 i like it
 
How would I code the following?

Object x is either a shallow or a deep copy of object y. If y.type = "shallow", do a shallow copy, else if y.type = "deep", do a deep copy.

My problem is that I need to access a property before it exists
I have the functions to do the copying, its just that I'm unsure how to code the selection
 
why wouldn't the href= append to the base url:
<a href='?home=home' onclick='return false' onmousedown='javascript:swapContent("home=home", more_content)'>Home</a>
 
Oh wow
 
8:52 PM
@Meredith @phenomnomnominal what?
 
@phenomnomnominal who ?
 
@phpPluginMaster what are you actually trying to do?
 
There's just...a lot there that we need to talk about
 
build an onclick event where if you click any url it replaces the div content, and replaces the url without an actual refresher
 
@darkyen00 looks like you're on the right track. Keep tweaking those animation times and you'll get there
 
8:54 PM
@Meredith who?
 
You
 
@phpPluginMaster nothing big you are almost outdated by 2 decades on javascript good practices
2
jsfiddle.net/d4aegur8/5 < am quite happy with this
 
I think the first thing you need to do is start using event listeners
That's going to save you a lot of trouble in the future
 
@darkyen00 what's the proper way to show the user how to do it?
 
Thats UX
but these days in js you dont do "javascript:"
 
8:55 PM
@SomeGuy works. you can export at least. I have no session management so I'll have to do that later
and the import
 
think a soft hyperlink
 
I know what you're trying to do
And you can do it that way
 
zomg
 
But it's just not a particularly good way of doing it
 
we are about to celebrate 20th anniversary of the biggest mistake of programming ?
(or did i miss it ?)
 
8:56 PM
@darkyen00 your birth?
 
@Meredith how do you do a soft hyperlink?
 
@phenomnomnominal no javascripts.
 
Like I said, start using event listeners then we'll go from there
 
@phpPluginMaster Did you follow the advice we gave you last time?
 
And I recommend reading some books on javascript
 
8:57 PM
i will once i debug the link stuff
 
That aren't from the early 2000s
 
Brush up on your JS, read a book
 
@deep take a class?
 
Read a book
 
@deep i read online books
 
8:58 PM
September 1995
 
What books are you reading?
 
0 to hero jquery
 
ES1 for dummies?
 
the video book
 
I haven't heard of that book
 
8:58 PM
esl for dumies?
 
But from what I've seen, it isn't a very good one
 
(That was a joke)
 
Eloquent JS is a good book
 
@rlemon hey yeah im about to leave
 
8:59 PM
(If that was its name)
 
@phpPluginMaster How many times have we told you to not use jquery? Many.
 
I'm already scared that it's from a youtube user called "Javascript Planet"
 
I can when I get home (maybe have a lot of shit going on)
but tomorrow for sure
 
@phpPluginMaster a good place to start learning javascript would be codecademy
 
See Ya Loktar!
 
8:59 PM
o/
 
This is like w3schools all over again
 
or khan academy or atleast egghead.io
 
@Loktar I'll bug ya tonight if I get around to implementing session support
 
Ok is this actually made by microsoft?
 
just realized there is none
 

« first day (1662 days earlier)      last day (3303 days later) »