« first day (2202 days earlier)      last day (2746 days later) » 

1:00 PM
Maybe i have to use something like phaser.js
 
1:10 PM
node 7.0 released, is this old news?
 
@corvid yesterday
6.9 is LTS now too
 
what does LTS mean?
 
long term support
It's basically the version you'd use if you don't want to keep updating it
 
@SuperUberDuper 2 buttons can be pressed at the same time with touchevents just tested it and it works!
 
@BenFortune Well, you're still going to update it, otherwise you wouldn't care about if it's supported or not :P
 
1:12 PM
hey, any angular 1 gurus that remember/know if you can change the directive element? e.g. it should replace <custom-directive>....</custom-directive> -> <li>...</li> ?
I think there used to be a way to specify this, but that could be angular 1.2 era
 
@Busata AFAIK, you can't do that
You can restrict the directive to attribute usage though
<li custom-directive>
 
@OliverSalzburg I meant it's not updated as often, but yeah :P
 
hmm
 
@BenFortune :) poor boy have to explain everybody today what LTS means :D
 
@BenFortune I think a more fitting description is that it will receive updates for a long time, without introducing any semver-major changes
 
1:16 PM
@Busata you can use the 'replace' attribute in the directive definition - but it is deprecated.
 
@BrianSchantz Welcome to the JavaScript chat! Please review the room 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.
 
@Busata docs.angularjs.org/api/ng/service$compile#-replace-deprecated-will-be-r‌​emoved-in-next-major-release-i-e-v2-0-
On second thought...
Meh, link breaks. Look at replace param of $compile
 
What happened to badger?
 
Oh, @BrianSchantz already mentioned it :P
 
We killed and ate her.
 
1:19 PM
Was that necessary?
 
shrug
 
WAS THAT NECESSARY?
I THINK NOT
 
@OliverSalzburg yup, was aware that replace was 'deprecated', but mm, probably misremembering something
 
@Busata Well, I guess replace was true by default in the olde days and was switched to false later
 
@OliverSalzburg yea, but there used to be a time where template content was by default wrapped in a div I think, and you were able to change that div element in to something else, but meh
your 'A' suggestion works :) thanks
just had to change it from .component -> directive
 
1:27 PM
anyone here work with electron much? Running into a bit of a problem. Want to use sqlite3 and knex with electron
 
attribute does exactly what I want anyway, so doesn't matter
 
@corvid What's the problem?
You can use native addons but they have to be pre-built for a specific platform if you're going to ship it
 
in the spirit of Halloween I changed my gravatar.
 
@BenFortune gives me a whole lot of errors. Maybe it's because of webpack?
 
@rlemon haha brilliant
 
1:30 PM
for what it is, was a surprising amount of work
 
Build errors?
Might need github.com/webpack/node-loader for sqlite3
 
@Zirak I'm gonna have to bail
 
@BenFortune I tried putting it in externals, using this boilerplate. For some reason, MongoDB works completely fine, but not sqlite3, and I would prefer sqlite
 
That's because sqlite is a native module, written in c++.
 
1:38 PM
Hi all, is it possible to use one to use onchange on the name attr of many selects?
 
What about something like pouchdb?
 
Array.from(document.querySelectorAll(selector)).forEach(item => item.addEventListener('change', handler));
 
I am trying something like this $(".addressBookShipping").change(function () {});
 
@BenFortune the main thing I am hoping for is to distribute a file with my app containing some "base" data that can easily be removed and seeded
 
and what isn't working
 
1:41 PM
I have many selects with that class
@rlemon its not firing, I assume its because there are many selects all with the same name/class
 
@corvid Just use a JSON file for your initial data
 
problem is somewhere else then
 
@rlemon ahh i see
@rlemon thanks
 
good luck
 
@BenFortune gonna extend past that for sure
 
1:47 PM
If I want to find an element above the one i am in what is the best function to use?
is .prev? the best
 
@StephenWolfe That's a problem. Avoid doing that. Why do you want it?
 
parentNode
?
 
ohh, element.
nevermind, I was thinking of function caller.
 
@StephenWolfe above? or sibling?
 
above
 
1:49 PM
so the parent in the tree?
or the sibling before the element
 
they are form elements
 
@rlemon lol nice one on the avatar
 
all in the same form,
same level
 
The Lemon King!
@StephenWolfe okay, those are called sibling elements
 
<div id="a">
    <div id="b" />
    <div id="c" />
    <div id="d" />
</div>
If you have element #c, which do you want?
 
1:50 PM
##b
 
ok, previous sibling.
 
You can self-close divs?
 
@littlepootis heh no
 
@littlepootis you can in psuedocode and JSX.
 
@littlepootis He just did :P
 
1:50 PM
@Luggage xhtml
perfectly valid
 
also that, but who uses xhtml?
 
you just did
:D
 
xTREMEhtml
only for the brave
 
No, that was LTML.
Luggage's Terrible Markup Language
 
I would use that
 
1:52 PM
So Pre and Closest do not work for me.
 
Is it supported in Safari?
 
n.previousSibling
 
.prev() in jQuery
 
Oh I just realised the select is in a div then above that div there is the element i want
can i tail it?
like .prev().prev('.myClass')
 
.prevAll
 
1:55 PM
@StephenWolfe How does that go above anything?
 
@PeeHaa you can't trust "above" to mean parent
he asked for the above node but wanted a sibling before
 
@rlemon did you spooky up your bio for halloween too?
 
yessir
 
heh
 
1:57 PM
@rlemon Hm that didnt work eaither
 
want me to make yours spooky?
@StephenWolfe make a demo then
because your terminology is off.
 
We need moar halloweenvatars! \o/
 
@rlemon js fiddle?
 
sure
 
oh it's rick and morty
(that went over my head)
 
1:58 PM
what is?
 
@StephenWolfe consider not needing "turn left at the third <div>" type of direction in your code. It makes it difficult to change later.
your profile message
> "Nobody exists on purpose..."
 
yes
 
@PeeHaa Mine doesn't need changing
 
Hello Guys… is anyone familiar with jest js function mocking behavior?
 
hyuhyuhyu
 
2:00 PM
@BenjaminGruenbaum it's fine, I'll bail as well then (cc @MadaraUchiha)
 
@BenFortune :P
 
@rlemon so I cant even get my alert to work now in the jsfiddle. jsfiddle.net/ym471pz6
 
include jQuery @StephenWolfe ;)
 
new js resolution : stop wrongfully importing object properties as named import as this ~will~ break in the future https://t.co/YCtzTMtkQ4
is this true?
trying to find a sauce or something
 
2:09 PM
@rlemon fuuu
that's good
so subtle
 
@elsololobo didi I not in external resources?
 
@rlemon noice
 
@Luggage ahh yes
 
Hey peeps. I'm pulling my hair out trying to get a simple js regex to validate a contact number to work... without much success... anyone here that has some regex skills?
 
@MartenTerblanche Welcome to the JavaScript chat! Please review the room 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.
 
2:09 PM
@MartenTerblanche Just ask your question instead
 
in knex, how can you set a boolean field to false on insert, and true on update? I have tried: table.boolean('edited').defaultTo(false).onUpdate(true)
 
> Nobody exists on purpose. Nobody belongs anywhere. Everybody's going to die. Come watch TV?
great quote
 
@StepehenWolfe as I opened it, there was no jQuery. After including it the alert was fired
 
10 digits or + with 11 digits /[+\d]\d{9}\d{0,2}/
 
@elsololobo ahh it wasnt saved
 
2:10 PM
:P
 
@corvid I don't think you can, that way. There is only one default on the table column.
 
so it will be somthing like
0831231234
+27831231234
 
@corvid triggers
 
f triggers.
 
^
 
2:11 PM
@ssube equal pay
feminism
clapping
have I found it yet?
;)
 
@ssube I always thought those were somewhat bad practice
 
clapping is a new one
 
user6820627
what does badger mean?
 
you never knew the clapping trigger?
 
s/somewhat/very/
 
2:12 PM
@corvid they are. So is what you're doing. :)
 
trigger is my trigger word. Going to the safespace chat room
 
holy fuck man. university students are going insane. you can't clap anymore, it is a trigger. you must click or snap your fingers
 
$.trigger('clap')
 
I can't snap. I am being snap-shamed.
 
@LearnHowToBeTransparent someone who badges
 
2:13 PM
@ssube what should I be doing?
 
@rlemon eh, it's not a demographic you should take too seriously, most of them are unemployed communists anyway. :P
 
I don't really understand knex
 
@corvid just make that part of your update or something simple
 
knew is just making SQL for you. That's it.
 
jsfiddle.net/ym471pz6/6 so now I just need to find out why I cant get the value from above
 
2:13 PM
@rlemon click?
 
@ssube "ignore them they'll go away" is exactly what we thought about flat earth nutters
they're just growing in numbers
 
@rlemon it's getting to the point that I am starting to worry about a collapse of western civilization in the coming decades
 
@Zirak @MadaraUchiha is bailing anyway
So is nick
 
@tereško rest of the world isn't too hot right now either.
 
@rlemon citation needed. They're growing in loudness, but...
 
2:14 PM
We should beer next week though
 
Some people will always use freedom of speech to spread wrong-minded crap.
 
user6820627
 
@ssube flat earthers are gaining popularity because celebs are getting on board.
 
I don't think the flat earth movement is really picking up members
 
not that it is a concerning number, but they are growing in numbers.
 
2:15 PM
yes, but celebrities are well-known for their comprehensive idiocy
 
@Luggage therefore we should outlaw free speech
 
It's like the Turkish coup attempt, you let people spread misinformation and then label them as idiots.
 
@ssube yes, then ignorant youth pick up on it
 
@tereško no. It's just something you need to deal with.
 
Otherwise they hold these opinions in private which means you can't tell
 
2:15 PM
@rlemon how do we reeech dese keeeds?
 
Was the turkish coup the idiots?
 
@Luggage it is widely believed now that it was staged to "flush out" opposition.
 
@Luggage both sides came out covered in shit, so I think they all were.
 
@ssube give them time. they will hopefully see logic. if not we leave them behind when we all fuck off to mars
 
I thought it was the army trying to re-secularize thier government that is going down the theocracy path
ohh, yea, staged. That I can see.
 
2:17 PM
@BenjaminGruenbaum actually, based on Turkey's history "military coup" has been a standard system of "checks and balances" there
 
@tereško yes, but that one was speical
 
@Luggage staged, no. I would go with - prematurely instigated .
 
yea.. we'll likely never know
also, possibly all of the above.
 
I have 3 Turkish friends, one with a BSc in political science and they all told me it's stage from the moment it started.
Like, when people still thought the opposition was winning.
 
2:19 PM
@rlemon I couldn't snap my fingers until I was 19
 
I see that, but if you keep this as an analogy to flat eathers.. you are saying that they are the ones that are right..
 
@BenFortune some people never can
same with whistling
 
@BenFortune really? babies have smaller bones, you'd think snapping a finger would be easier then
 
Apparently usage of the word "paddy" isn't PC because it "offends" the Irish
 
@BenFortune hahah
 
2:20 PM
I can't stand the feeling of my fingers pushing against each other, so I'll never really try to hard ot learnt o snap them.
 
@Luggage I once sprained my finger from trying it too much
 
if we aren't allowed to say "paddy" anymore, what will people from the midwest put on their hamburgers?
 
@BenFortune "irish" are usually thought of as "white". You can offend then, as long as you make sure that they dont identify as female
@BenFortune basically this: youtube.com/watch?v=q9APB-N6ChQ
 
@tereško Haha wtf
 
2:23 PM
cv-pls stackoverflow.com/questions/40264826/… (typo, tried to use $$ for jQ)
 
> Thou art fornicating with a Caucasian gentleman.
> Thou art a fellow of the Caucasian race.
 
what an amazing man.
 
@Loktar That's glorious, what a smooth guy
I bet the ladies are drowning
 
!!s/ing/ing toddlers right now/
 
@ssube I bet the ladies are drowning toddlers right now (source)
 
2:24 PM
@BenFortune twss
 
hm, I was going for the Archer reference, but that came out a little too dark
 
lmao
Did anyone ever see that browser that could handle a new session in each tab? Can anyone remember what it's called?
 
lynx
 
chrome in incognito mode?
 
Nah, it was fairly new
@Luggage Can't do new sessions per tab can it? IE from the same site
 
2:26 PM
got me
 
 
@ssube Don't even understand what OP is complaining about
 
@PeeHaa it's actually a legit question, I was mistaken. OP is trying to figure out why $$ isn't allowed but $ is allowed, even without an import.
 
Ah yes I see the last edit
 
@rlemon is it possible in this scenario jsfiddle.net/ym471pz6/11 to get the value of job_id?
 
2:30 PM
HTMLElement has a click method, NodeLists do not;. $ is querySelector, $$ is querySelectorAll — rlemon 9 secs ago
@ssube ^^
unless I'm 100% missing the point of the Q
 
@StephenWolfe Your arrow function loses it's this binding
 
chrome adds $ and $$ shortcuts
 
@BenFortune okay so how to I pass it in?
 
@StephenWolfe don't use lambda expressions
 
don't use an arrow function.
but that doesn't fix it, still
 
2:33 PM
don't use js
 
$('.addressBookShipping').on('change', e => {
      job_id = $(e)...
 
yea, PHP does magic on the front end.
 
@PeeHaa I try not too
 
so much interaction
 
HTMLElement has a click method, NodeLists do not;. $ is querySelector, $$ is querySelectorAll — rlemon 3 mins ago
wait wat
 
2:34 PM
Also what is it with people and using alert for debugging
fucking stop it
 
That's... confusing
 
console.log = window.alert.bind(window); // enjoy
5
 
@BenFortune console.log?
 
@PeeHaa what is confusing?
chrome adds shortcuts for qs and qsa
open your console and type $$
 
@StephenWolfe Please
 
2:35 PM
@rlemon he would have gotten a "click is not a function" rather than the error he is saying he got
 
job_id is not a sibling of your <select>, so.. that probalby explains why .prevAll() doesn't do what you wan
 
@rlemon I believe you. Just odd random shortcuts to me
 
@bitten 'cannot find name X' is not an error I'm used to seeing
 
@PeeHaa do you know about $n?
 
Won't he need to go up to the form then use .find('.job_id')?
 
2:36 PM
If you are having that much trouble selecting other element, choose a new method. Do you think it'll be pleasant when you need to add another <div> later for styling? No, you'll have to go re-write all your selectors.
 
@rlemon yeah, me neither.. that's why i didn't want to say his error but "the error he is saying he got" lol
 
@BenFortune I didnt know console.log worked on js fiddle
 
@bitten VM135:1 Uncaught ReferenceError: $n is not defined
 
@StephenWolfe console.log works anywhere
 
oh :P
nvm stupid :D
 
2:36 PM
$(selector).click() <- works
$$(selector).click() <-- not works

no jQuery imported
I work with what I got
 
Yeah. I have seen it in my console
 
looks like he's wondering what the short cuts are doing
 
@BenFortune I mean I could find the window to view it, looks like it can be view just with normal developer tools
 
@rlemon both should error out if you aren't including jQ
 
@BenFortune unless you have an old ie and console isn't started yet ;)
 
2:37 PM
but one isn't
 
I assume they fixed that by now
 
@StephenWolfe It's usually the first place you should look when debugging
@PeeHaa Yeah, but who uses IE for debugging :D
 
@ssube no, the first will not error
 
@BenFortune s/for debugging/
 
document.querySelector('div').click() // no error, HTMLElements _have_ a click method.
$ = querySelector in chrome console.
 
2:38 PM
@BenFortune :) well I dont evey debug in the past websites. So didnt know how to use it.
 
const $ = ::document.querySelector;
 
@PeeHaa let n be any number between 0 and 4
 
anyway found out how to now
 
@bitten Yeah yeah. I already found out my own stupid ;-)
 
New Amaranthe :D
@Loktar
She's so hot I can't even
 
2:39 PM
@BenFortune that isn't valid code, what is it supposed to dod
 
@William Sure it is.
 
@Luggage What would it be if not ?
 
@BenFortune has :: been finalized?
 
@SterlingArcher photo!
 
It's basically const $ = document.querySelector.bind(document);
 
2:40 PM
@rlemon no. That syntax might even be dropped.
 
it doesn't work in my browser
 
so then it isn't valid code
I don't consider if valid until the spec if signed off on
 
@StephenWolfe choose a method for finding other elements that is not dependent on the exact structure
 
it isn't valid at all
 
2:41 PM
like go up to the form, then find the child with the name of X
Not "go past three <div>s, turn left at the <span>, you can't miss it"
 
@Luggage like perant form then child of the form
 
@SterlingArcher not bad
 
is there a list of all the new javascript features that doesn't involve reading the specification
 
@William no
 
fuck. I should create one then
 
2:43 PM
good luck
 
I want it to have one to one versions between the new spec and good old javascipt
 
@Neoares there is
It's on github
 
Hello, If any of you could take a look and have a solutio to this http://stackoverflow.com/questions/40248024/to-have-the-bootstrap-dropdown-options-drop-outside-the-div would appreciate.
Thanks
 
@William there are millions of those lists all over the internet
 
ok i just need one
i want it like hyperpolyglot.org
 
too bad there isn't like a es6-features.org or something
 
thank you rlemon
 
It was the second result on the link I posted gtfo william
 
@StephenWolfe get it, yet?
 
@SterlingArcher hah yeah I was listening to this the other day
 
2:49 PM
@Luggage job_id = $(this).parent().parent().find('.job_id').val();
 
god I hate you
 
@Luggage that worked
 
@StephenWolfe you are chaining parent()s so you can sill dependent on the exact structure.
see .parents() or .closest()
 
@Luggage yeh I figured that but it was the best I could do lol
job_id = $(this).parents('form').find('.job_id').val();
that also works
 
It works for now.
but .parents() returns multiple items.. you only ever want one.
 
2:51 PM
what is this ??
a form element?
 
this is the <select> that the onChange event is on
 
@rlemon shhhh
 
$('.job_id', this.form).val();
 
2:53 PM
I was leading toward .closest('form') since I forgot that inputs have a form property
 
html5 form elements have a .form property
use it, love it.
 
do you know the minimum IE needed for that?
i can't find it on CanIUse and MDN doesn't list the compatibility of that property individual
 

« first day (2202 days earlier)      last day (2746 days later) »