« first day (1510 days earlier)      last day (3663 days later) » 

14:00
ikr
whoa, really? how do you control where they fall dwn, then? I'd imagine it being able to kill someone if it fell from that high
I don't think I have a launcher
they have chutes @Kippie
chutes are prone to failing, though
they are also light
mine was made from cardboard tubes
balsa wood 'fins' or w/e they are called
14:01
Ah, thought they'd have some added weights for balance
Just dump on lots of glue
Hello, i have a small problem with JS/jQuery .replace.
hello, what is your question
The heaviest thing in them is the engine, which is probably <20g after firing
@Gecko jquery doesn't have replace() function
14:03
@tereško He did give two options
:D
@Kippie They do, but barely any
Yay unformatted code
sry, i have fail :/
yay , abuse of innerHTML
It is okay young grasshopper, when one falls one must get up.
Stand and fight!
14:04
1 message moved to Trash can
 if ($(entry[e]).text().indexOf("[" + pseudo + "]:") === 0) {
     var ret = conv.replace(entry[e], '<img src="'.concat(imgOut.url, '" title="" alt="">', entry[e]));
     $(selector).html(ret);
 }
@Gecko needs help with this code ^
there, everyone is better now :P
Thank you
console.hack("cmd");
I can only read code if it has syntax highlighting.
???why
@NickDugger there is a chrome extension for that iirc
14:05
I was joking, for the record
my current problem is, if i send the same message many time, the first is replaced and the arrow was added
define many times
fast or slow?
Like that:
[o][o][Gecko]: a
[Gecko]: a
!!afk need to get work done, @KendallFrey @NickDugger can one of you please remember to ping me if the rocket looks like it is about to launch
thanks!
Fast or slow is not the problem, my problem is to use replace only on the last match
14:06
I don't think you're wanting to use replace, are you? Do you mean to use the jQuery method, replaceWith?
@rlemon will do
tyvm
We have until 9:45 until the window closes
38 minutes
what does !!afk do?
14:24
~20 minutes left in the launch window
Nah... it's not gonna launch today I think
They're making "one last attempt"
^
Cross your balls people
...at fixing the problem
It's gonna take longer than 20 minutes, from what they described. Not feeling very hopeful
I doubt it too
14:25
CROSS THOSE BALLS
@Sippy done
screw that, it hurts
How does one even do that?
Lol
@Kippie careful manipulation
ooo someone just said Roger!
9:44 is T0
14:28
T0 at 14:44 :D
I doubt it
That's the last minute in the window
CRAZY
MAVERICKS
oh, thy're doing it
Link!
14:29
Thanks
@KendallFrey last 'attempt' still
still not a guarantee
they're doing it hnnng hnnng
If it's a go, they sure are cutting it close
I was already having a good day, if it is a go my day just got better :P
@NickDugger Well, launch windows are basically arbitrary
If they launched 5 minutes later probably nothing bad would happen
14:31
your mum is arbitrary
@NickDugger OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
Never engage Kendall in a 'yo momma' war.
@NickDugger Well, I know one thing she isn't
sleeping with you
That was not your best.
of course not
ew
14:32
slam.
@Sippy that's the sound... ugh, forget this
@KendallFrey :D
fuck off
BOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO‌​OOOOOOOOOOOOOOOOO
14:35
dat guy is a scrub
BOOO NASA BOOOOOOOOO
NEEEEEEEEEEEEERD
BOOOOOOOOOOOOOO
what happen? They cancel?
Maybe tomorrow
14:38
@Kippie launch controller is a scrub
Roger is really popular
ok so HTML room sucks :P I have three 'options' which can be either radio or grouped buttons
only concern is that one of the three options is conditional on other things, and cannot be selected always
so buttons are more visible for 'disabled' but radios make more sense overall
I'm torn
are you using bootstrap? if so, grouped, styled buttons will be nice and clear. otherwise, just use radios.
since it's impossible to style buttons without bootstrap, the choice should be obvious.
14:53
@rlemon you're tearing me apart Lisa.
@ssube impossible why? more difficult I'll give you but impossible seems a bit strong!
@idodev Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
@BenjaminGruenbaum You're lying I never hit you!
@ssube I am using bootstrap! I'll probably try both and see how they look
@rlemon They played that at a theater near my house last winter, with the two leads showing up to intro it and stuff. Was great.
but I always like to hear what others think about design stuff.
14:57
So many plastic spoons.
@idodev After writing the original button styling code in bootstrap, the lead developer went on walkabout and was lost near the suspected location of r'lyeh. After that, the secrets to styling buttons were buried to keep anyone from having the same awful experience, and have since been lost to the sands of time like so much perkiness.
Joe
Joe
Good morning js!
Is it poor practice to use the vanilla js syntax document.tagName? I guess what I want to know is how poor practice is it? I'm reviewing some of my predecessors code, and I've never even seen anyone use this syntax nor can I find reliable documentation
@ssube we dishonour him surely with this abandonment of hope and button-styling-innovation
Joe
Joe
So I don't think that is it.. it looks like he was attempting to grab an element by a tag. But he may be getting an element like this [name="x"] doing: document.x
hard to tell because hes got the id and name set the same
getElementsByTagName ?
querySelector("[name=foo]")
which are we talking here?
Joe
Joe
15:14
literally
document.x
where the element has an id="x" and name="x"
and its getting that element somehow...
well you don't need document
I can't remember the term for that
Joe
Joe
what is happening and where can I read the documentation :D also TY all
@all what is the term for the functionality we see now that if an element has a name or an ID it is an assumed element in JS
<div id="foo"></div>
<script>
console.log(foo); // gives you the element
</script>
@Joe is this what you're talking about? if so, yes that is bad practice.
Joe
Joe
correct it is and I agree
it is handy for doing quick testing and demo's
but in production code you shouldn't use it
I just can't remember the name of it now
Joe
Joe
15:17
yea apparently, it was my predecessors favorite thing, and its all over production
Afternoon. I want to randomly float / move some elements on a HTML5 canvas. Is there a plugin for something like this, or is it simple enough without?
find him and yell at him
Joe
Joe
thats part 2 of my plan
part 1 is to knowledge up on the subject matter.. so I can effectively yell at him
@tmyie define "elements"
and you don't need a library
svg, image, gif, whichever
15:19
@tmyie What do you mean randomly move? Slowly move in random directions?
yeah :)
ok well i'll give you a high level description of it
sound good?
Joe
Joe
me? ya sure
@tmyie It's pretty easy to write, I'd do it by hand. You'll have to write the animation code anyway (have point A and point B, when the object reaches B copy B to A and generate a new random point for B).
Okay, thanks ssube :) Will do so
15:21
step 1) create an object to store the x/y position and velocities of the element
step 2) create two recursive loops, one that updates the object position and one that paints it
step 3) in the update loop elm.x += elm.velocityX and the same for Y and check the boundaries of the object here as well.
step 4) in the paint loop clear the canvas and repaint the elements on their respective x/y position
step 5) crack open a beer because you're done
great :)
here is random movement on canvas: codepen.io/rlemon/pen/wpnyG (it isn't the simplest example, but it is the first one I found a link too)
@rlemon That's if you want conservation of momentum in some fashion.
@ssube otherwise you'll need speed and x/y
You can also just take two points and lerp between them based on (time % duration) / duration
When (time % duration) == 0 replace point B.
15:23
there are many ways to determine movement, I personally always think of it in velocities
@rlemon schrodinger's elements, IIRC. DOM0 elems.
ta
@AwalGarg nahh, it has a more legit name than that
15:24
but i'll use that as a starting point
Joe
Joe
got it
thanks
@Joe ohh cool.
well good luck with the legacy crap :P
Joe
Joe
haha thanks much take it easy all!
204
A: Do DOM tree elements with ids become global variables?

bobinceWhat is supposed to happen is that ‘named elements’ are added as apparent properties of the document object. This is a really bad idea, as it allows element names to clash with real properties of document. IE made the situation worse by also adding named elements as properties of the window obje...

and here is a SO issue discussing it
> So… crazy as it seems this behavior is now technically safe to use in the latest version of all major browsers in standards mode. But while named access can seem somewhat convenient , it should not be used.
@rlemon I know that avatar lol
<[^>]+
15:26
Bobo or w/e
he's a good guy it seems
all over main :P
hahahaha
@rlemon <3 bobince
He's epic
Author of some of the best keks around here.
You probably know him from stuff like:
Wow, SO looks differently now
Joe
Joe
@rlemon wait what? Technically safe to use in all major browsers, but should not be used
No, I know him from the most famous answer on stack overflow
@Joe do 100% of your clients use the latest IE?
are you 100% sure you're not opening up conflicts with variable names
15:29
@KendallFrey oh the zalgo one
there are a number of caveats you can look up
4428
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

Joe
Joe
haha im absolutely going to get away from using this because 0% of my clients use mdoern IE
but just saying thats an interesting stance
@Joe because it is safe in modern browsers but unfortunately people don't always use them. aside from that; just because something is possible, doesn't mean it should be done.
Joe
Joe
very true
@BenjaminGruenbaum Have you seen the new style they're proposing?
15:31
It should not be used because it might be un-usable in future, I guess.
@KendallFrey yeah
nahh it's on spec
It's in meta
it's future safe, but it is bad code :P
it's becoming oxymoronic now :p but ok.
Maybe it gets deprecated from spec or something?
(just guessing)
15:32
It doesn't work in firefox strict mode
but it is handy at dev time, so I won't want it to be deprecated :p
@BenjaminGruenbaum It seems to be working for me, what am I missing?
@AwalGarg ducks and unicorns
try adding them, you get a reference error since they're not defined, hence jQuery doesn't work
jsfiddle.net/awalGarg/unLh2z0q @BenjaminGruenbaum it is working in FF :(
Dec 19 '13 at 20:55, by copy
@BenjaminGruenbaum Not in Firefox standards mode though
I meant strict as in html strict standards mode vs html4 mode, that might have changed since a year ago though
ok.
TIL
15:43
"quircks mode"
^ really bad idea
Hello
Hie
^ really great idea
ahh stackoverflow.com/a/25325330/3459110 this describes why it should not be used
@RyanKinal I love that site.
PPK is pretty brilliant
15:50
> This is one reason why jQuery is so popular: if you do $("#myDiv").remove(), and there is no element with an id of myDiv, no error will be thrown
what?
so jquery helps me avoid a try catch block, wow!
Well, either a try/catch, or just checking whether your element exists before trying to use it.
I don't see many try/catch blocks in JS, tbh
yea...
@RyanKinal One place where they are prominent: XHR for old ie :P
@AwalGarg some people don't like seeing the errors in their code
they prefer to let stuff silently fail
I hate those people, FTR.
15:54
True
And those people love jquery, so you...
user1596138
Yeah I would check for that element before trying to remove it..
(as the answer says)
IMO, it is irresponsible to let stuff silently fail.
user1596138
Strange things can happen lol
15:55
Silent failure, ironically, is also one reason why people don't like jQuery. — Ryan Kinal 18 secs ago
+1
var elm = qsa('#foo');
if( elm ) elm.parentNode.removeChild(elm);
it really isn't that hard without jQuery
in jQuery it also isn't hard or long
var elm = $('#foo');
if( elm.length ) elm.remove();
that .remove() method is coming to vanilla \o/
user1596138
I'd much rather have a reference to the element, then manipulate it
@rlemon Phrasing
@someDoge same
user1596138
15:58
So the check just makes sense
2 hours ago, by rlemon
I'm sorry if I'm referencing the wrong measurement, but it was like 13" long and maybe 1.5" diameter
user1596138
@rlemon yea I'm agreeing :P
@someDoge and I'm agreeing with your agreement
user1596138
Agreed
user1596138
15:59
I'm so tired
@rlemon $('#foo').remove(); is enough
user1596138
!!afk dying if the coffee doesn't finish in time
jquery likes to swallow errors, remember?
s/errors//
heh... jQuery swallows

« first day (1510 days earlier)      last day (3663 days later) »