« first day (1747 days earlier)      last day (3195 days later) » 

10:02 AM
i have a string - Hi User UserName
 
@arjun 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.
 
I have a question on Javascript, if any one is free , interested to help?
2
 
@BenFortune is the workspace implementation sane?
 
> 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.
@ivarni u troll
 
@OctavianDamiean 2.9
 
10:05 AM
@arjun sure, go ahead. Next time, just ask your question
 
@MadaraUchiha Thanks for the concern, but I figured this one out myself. :)

Okay, next question everyone how do I get the module scope inside the module?
 
get what inside the what?
 
e_e
 
0
Q: Get href list from element list in Javascript

VandervalsI know I can do this with a simple for loop but I'm trying to understand better how to use forEach. What I'm trying to do is, having a list of "a" elements coming from a querySelectorAll(), to obtain an array with the href attributes. What is wrong? var links = document.querySelectorAll("a"...

So many people telling the OP to forEach a NodeList
 
Something like this :\
module.scope["foo"]=1;
Now I can use `foo` anywhere inside my module :|
 
10:11 AM
@BenjaminGruenbaum mostly depends on your taste, but any kind of pop/rock/rap from India is mostly a POS. I personally like music from A.R. Rahman, and Kailash Kher.
 
!!s/India/last 10 years/
 
@JanDvorak @BenjaminGruenbaum mostly depends on your taste, but any kind of pop/rock/rap from last 10 years is mostly a POS. I personally like music from A.R. Rahman, and Kailash Kher. (source)
 
@JanDvorak you are programmer. use "decade" ffs
 
@AwalGarg k
 
@AwalGarg do you want to go back to being anal greg?
 
10:14 AM
!!s/10 years/decade/
 
@JanDvorak @JanDvorak @BenjaminGruenbaum mostly depends on your taste, but any kind of pop/rock/rap from last decade is mostly a POS. I personally like music from A.R. Rahman, and Kailash Kher. (source) (source)
 
@Mosho You're weak.
 
you clearly haven't seen me bench
 
@MadaraUchiha Is that even a pokemon type?
 
!!s/fro.+de//
 
10:16 AM
@Cerbrus @JanDvorak @JanDvorak @BenjaminGruenbaum mostly depends on your taste, but any kind of pop/rock/rap is mostly a POS. I personally like music from A.R. Rahman, and Kailash Kher. (source) (source) (source)
 
@Mosho You're right, I haven't. Just like I haven't seen your yesterday :/
 
I was at a hasidic wedding
 
Is there a google docs like collaboration thingy for markdown?
 
I wasn't happy about it either
 
hasidic? Heavily Acidic?
 
10:17 AM
!!urban hasidic
 
@Mosho No definition found for hasidic
 
Hah
!!wiki hasidic
 
Hasidic Judaism (from the Hebrew: חסידות‎, Sephardic pronunciation: [ħasiˈdut]; Ashkenazic pronunciation: [χaˈsidus]; Israeli pronunciation: [χasiˈdut]), meaning "piety" (or "loving-kindness"), is a branch of Orthodox Judaism that promotes spirituality through the popularization and internalization of Jewish mysticism as the fundamental aspect of the faith. It was founded in 18th-century Eastern Europe by Rabbi Israel Baal Shem Tov as a reaction against overly legalistic Judaism. His example began the characteristic veneration of leadership in Hasidism as embodiments and intercessors of Divinity...
 
here we go
 
Ah
 
10:18 AM
@Cerbrus nonsense. Hotel California? Wind of change? anything from Blackmore's night?
 
@JanDvorak Woo! someone did bite after all :P
 
@Cerbrus what style do you consider Celtic Woman to be? They're awesome, both together and their solo careers
 
I don't know them
 
Check them
 
(By name, at least)
I'll have a look when I get home
 
10:21 AM
I'd much rather listen to Sweet Child o' Mine than anything Madonna produced in the last ten years or Nicki Minage produced ever.
 
!!s/Mina/Crin/
 
@Cerbrus I'd much rather listen to Sweet Child o' Mine than anything Madonna produced in the last ten years or Nicki Cringe produced ever. (source)
 
@Cerbrus almost :p
 
I'd rather listen to a song where I can't understand half the lyrics because they're in irish than because they're intentionnaly unintelligibel
 
I want to listen to O Children
 
10:28 AM
because of Harry Potter?
@AwalGarg still better than Hey Mama :-D
 
@JanDvorak yes because of Harry Potter indeed.
 
Codewars now has es1015 and react support!
 
\o/
 
!!youtube mama mcr lyrics
 
10:31 AM
talking about mama...
 
@uselesschien I think we can make a userscript to render text inside google docs as markdown in a sideframe, and type only markdown in the docs window with font set to monospace.
 
@AwalGarg uselesschien is afk: 7-day ban
 
@Neoares great song
 
The lyric on the screen....
 
@CapricaSix where have I heard that recently?! oh yes, two times already by you. now stop, bot.
 
10:32 AM
!!youtube the slowest drink in the saddest bar on the snowiest day in the greatest city
 
...and we all know how easy it is to write userscripts for any google app.
</s>
 
@Neoares too drowned in screaming
!!youtube blackmore's night
 
Great choice
 
10:34 AM
@JanDvorak that's the point :)
 
If anyone wants to read some incredible lyrics, try anything by La Dispute
 
@Neoares what kind of beauty is in that?
 
amazing music too, but certainly not in @JanDvorak's taste
 
oh.
 
@JanDvorak there's beauty in pain and anger
 
10:35 AM
... masochism?
 
@JanDvorak blinded people can't see
 
@JanDvorak catharsis?
 
and that's no screaming lol
 
life is nothing but a slow death anyway
2
 
!!youtube at least give me my dreams back, you negligent whore
 
want scream?
now you can say it xD
 
!!youtube mongol horde staff to the refund counter
 
@Neoares try that ^
 
@Neoares 2 Corinthians 4:4? - The god of this age has blinded the minds of unbelievers, so that they cannot see the light of the gospel that displays the glory of Christ, who is the image of God.
 
10:38 AM
@phenomnomnominal the other one is harder :P
 
@Neoares but not better :P
@ivarni well said
 
@phenomnomnominal 2:40
 
!!youtube defeater bastards
 
!!rename room songs lml.
 
10:42 AM
@Neoares That didn't make much sense. Use the !!/help command to learn more.
 
yes it does :(
@phenomnomnominal I don't like the only-screaming songs
except Children of Bodom, because they are gods
and that's why my profile photo is their vocalist
 
Adept are waaaay too whingey for me
sound like fucking parkway drive
 
what's whingey? xD
!!urban whingey
 
@Neoares whingey complaining about things all the time
 
o.o
 
10:48 AM
he sings through his nose
 
one thing I've learnt in my short life: I almost never like a song the first time I listen to it. My "love meter" for a song is more "how much time did it take for the song to fully grow on me"
 
there is a code for restarting all event ? (restore to default, like when user loads the page) ? I have very event: slideUp(), hide(), show(), slidetoggle() and ... . now I need to a code for restarting all of them.
 
@MadaraUchiha Sorry, I had to go to lunch
 
@Sajad for events you mean JS states or actual HTML states like checkboxes?
 
@towc js (jquery)
 
10:52 AM
@Sajad oh, event listeners?
 
@towc what ?
 
@Sajad nvm... you actually mean everything that was changed with js?
 
history.go(0) ?
 
@Sajad Unless you save the state of the DOM before you modified it, no, you can't "reset" the DOM without reloading the page.
 
there is some code that allows you to do that. It's quite complicated and I wouldn't reccomend using it. It's much better to just keep track of them by hand
 
10:54 AM
@MadaraUchiha alright ! thanks
@towc ok thanks
 
you could document.write the responseText for an XMLHTTPRequest on window.location.href
but it's not reccomended at all
it's plain bad
it literally is like loading the page
if you want to do that, just be careful on window.location.href: make sure it specifies an html file, otherwise add index to the string which can have .html, .htm, .php and many other extensions
 
except it keeps the old javascript loaded
 
!!youtube nightwish amaranth
 
!!youtube bacarra where is the love
 
10:58 AM
@JanDvorak yeah, then if you really want to be cocky about that, just remove everything from the page, and add a seamless iframe taking up the whole page, then insert everything onto it. The js will then still work. Just make sure to remove any event listeners on window and the iframe
 
!!undo 24744875
@towc also, any pending timeouts
 
yup
cancel animation frames
that's all I think?
 
also kill pending ajax requests
 
and anything async
 
mutation observers on the document
 
11:01 AM
right...
wait...
what are those? Just event listeners?
 
sorta
 
like Obect.watch?
 
!!mdn mutation observer
 
note: don't confuse Bacarra with Baracuda
 
11:04 AM
@CapricaSix that's nice! First time I've heard about it
 
AHHHH! I just finished my earley parser! :D :D :D
 
^ same melody as Amaranth, different text
 
rather...my earley recognizer :P
 
0
Q: Implementing a Job Queue with Node.js or setup Cluster Node.js?

I'll-Be-BackA server (node.js) could receive a lot of requests from Browser via Web Socket. node.js could get overloaded and I have read Cluster Node.js is the solution to this problem. Then I also read implementing a Job Queue like Node-Kue and Redis might be solution to solve this problem too? So how th...

 
11:07 AM
@I'll-Be-Back How many users are you expecting?
NodeJS can easily handle 40k/50k concurrent users without choking
 
I see can be expanded to 500 in the future
 
Does jsFiddle/jsbin support adding additional files to the "project" like plunker does ?
 
Really
 
@towc Yeah, UK
 
and you downloaded it at 10am, right?
btw, did it finish? How is it?
 
11:08 AM
@AwalGarg Dunno, still installing. No SSD at work :(
@towc Started as soon as I got in, 9AM
It's in the upgrade process now, 25%
 
so, I'm in GMT+1, it's 1PM and still no popup >:(
 
@towc Did you try forcing it yet?
 
I still don't get how to do it
 
@MadaraUchiha I didn't realise that. So what is the purpose of having Job Queue like Node-Kue?
 
@MadaraUchiha depends on hardware, and your code
 
11:10 AM
gefore experience doesan't auto update to win 10 drivers
doesn't even recognize the old drivers when you upgrade
aaand thinks the win10 drivers are older than the win8 ones
 
good luck handling 50k concurrent connections if each request involves filesystem stuff.
 
@towc Elevated command prompt, wuauclt.exe /updatenow
 
Edge opens really fucking fast.
 
@AwalGarg caching?
 
@BenFortune Thanks, I shall be back later.
 
11:12 AM
@BenFortune elevated? What does that mean? 0.o
 
@towc Open as admin
 
and how do I do that? Google is 1 tab away, too much
 
Edge doesn't support class
woo
 
how to disable typos system for my inputs ?
 
@JoshLeBlanc wait wut? The html class?
 
11:13 AM
@Sajad ?
 
@JoshLeBlanc ?
 
@towc Right click, run as admin :|
 
Err, ES6
 
@JoshLeBlanc proxies and reflect?
 
Many browsers don't support es6 class yet. Was that really so unexpected?
 
11:14 AM
@BenFortune you must have gone to MIT to learn about this, you're a total genius!
 
@RoelvanUden when I write a wrong word in the input, it draws a red line under it ! how disable it ?
 
@RoelvanUden kinda sorta
 
No, it just supports everything else I tried
 
@Sajad In what?
 
Spellchecker in input text i assume
 
11:15 AM
@RoelvanUden em, what different ? html, or js
 
@JoshLeBlanc Will I want to cry looking at Edge, or does it look decent?
 
@RoelvanUden or in the text field.
 
@Sajad Sounds like a browser implementation
 
@BenFortune I did that update command from an admin console. now what?
 
 
11:16 AM
@Sajad Which browser do you use?
 
does precisely nothing...
 
@BenFortune then I can not do anything ?
@CallumBarclay chrome
 
@towc Gewd, now open windows update.
 
@towc Did you check windows update?
 
16 minutes into w10 a I've bluescreened
 
11:17 AM
@Sajad No, it's a chrome feature. You can't disable it.
 
@RoelvanUden You can :>
 
@RoelvanUden ah ok, thanks.
 
@Sajad Nyehhh. Try right clicking the input box, and look for spellcheck or something.
 
@BenFortune Oh, rly?
 
@RoelvanUden uninstall all dictionaries
 
11:17 AM
Settings > Advanced > Languages > Disable Spell checking
 
@JoshLeBlanc Graphic card drivers are still funky. This is to be expected. :)
 
In chrome at least
 
@BenFortune He wants to disable it from HTML I presume
 
@RoelvanUden Oh, fat chance that's happening
 
In that case, he's shit out of luck :>
 
11:18 AM
technically you can do anything you want with the software you install on your PC.
 
@AwalGarg Until you sign agreements. Then they can practically do anything they want with you.
 
@BenFortune like.. the icon? Nothing changed
 
Cool @Sajad ^
 
11:19 AM
in chrome you can also right click on input box -> spell checker options -> uncheck enable
 
@towc Nothing to do with the icon :) Windows update will handle it all, then a notification will popup when finished
For anyone getting errors, Delete everything in C:\Windows\SoftwareDistribution\Download and run wuauclt.exe /updatenow
 
oh, yeah!
 
are you sure about installing W10 the first day? xD
 
@BenFortune I did that update window just shows "347megs of updates available. click to install" something
 
@Neoares Why not? Been using the tech preview as a DD for the last 4 months or so
@AwalGarg Needs to be completely up-to-date I think
Also only works if you've reserved it
 
11:24 AM
I did reserve it.
 
Then install the updates? Are they mandatory?
 
user3119231
´@towc Im finished already :D
 
user3119231
o/
 
Mine's "Installing features and drivers 52%"
 
user3119231
 
11:29 AM
@Maurize You waved.
 
@Maurize \o
sorry :P
 
user3119231
 
user3119231
@BenFortune
 
I'm still at "getting setup files", no percentage or anything
 
user3119231
11:30 AM
@towc hm, that is not good. But installation takes a loooong time :D
 
> Oops, I accidentally conquered the whole world
 
I do also have an extremely low connection, not sure how to check the speed
@JanDvorak by?
 
Abstract: "can not confirm or refute the claims of the EMDrive" Headline: "Scientists Confirm 'Impossible' EM Drive Propulsion"
 
ha!
 
11:36 AM
cc @rlemon
 
"unable to disprove" sounds less cool, doesn't it?
 
@JoshLeBlanc does it remove everything on your pc?
 
@towc Nope,
 
every video, the file system... it all still works, right?
 
11:38 AM
jQuery(document).on('click','#soir', function(){
var options1 = $('select[name=hour] option'),
    min = 9,
    max = options1.length-12,
    rand = Math.floor(Math.random() * (max - min + 1)) + min;
var random_option_value1 = options1.eq( rand ).prop('selected', true);
});
 
Grr "one important update is available" -> Microsoft Visual Studio 2010 Service Pack 1
 
Is there a problem with it --'
I got the message $(...) is not a function..
 
@Baldráni Are you running that before jQuery is loaded?
 
@Baldráni well, options1.length is nothing...
 
I guess "$ is not a function" is the reason the first line reads "jQuery(document)"
 
11:39 AM
@CallumBarclay No not even I'm trying to run it in the consol
 
No power at the office today. I feel like I'm not going to get anything done
 
Actually it work if im not putin the on('click'...) event
 
@Baldráni And is jQuery loaded in your console?
 
@JoshLeBlanc Wel... not of you're gonna hang on the chat :P
 
Well I guess since i can use the selector
 
11:40 AM
@CallumBarclay ...
 
var options1 = $('select[name=hour] option'),
    min = 9,
    max = options1.length-12,
    rand = Math.floor(Math.random() * (max - min + 1)) + min;
var random_option_value1 = options1.eq( rand ).prop('selected', true);
this is working *
 
*working
 
jQuery(document).on('click','#soir', function.prop('selected', true);
});
 
@jonhnsnow can't program on my phone
 
This is not...
 
11:41 AM
@JanDvorak Well maybe it isn't. Thought I'd go over the deadly obvious stuff first.
@Baldráni Try $('#soir').on('click, function(){ ... });
 
@JoshLeBlanc Actually, you can
It's just not as easy :P
 
@Baldráni how about $('#soir').on('click', function(){})?
 
@CallumBarclay that's an idea
 
@Baldráni function is not a valid variable name
 
11:42 AM
$('#soir').on('click', function(){
var options1 = $('select[name=hour] option'),
    min = 9,
    max = options1.length-12,
    rand = Math.floor(Math.random() * (max - min + 1)) + min;
var random_option_value1 = options1.eq( rand ).prop('selected', true);
});
VM1308:2 Uncaught TypeError: $(...).on is not a function
    at <anonymous>:2:12
    at Object.InjectedScript._evaluateOn (<anonymous>:905:140)
    at Object.InjectedScript._evaluateAndWrap (<anonymous>:838:34)
    at Object.InjectedScript.evaluate (<anonymous>:694:21)
 
"No updates are available" fu windows t(=.=t)
 
@Baldráni is that the only code?
 
@JanDvorak An error of typo
 
@Baldráni is that in the console? Console defines its own $
 
try consoling $
see what it gets
 
11:43 AM
@towc Yup the only I want to run
$
e(a, b)
 
that's... unusual
 
I actually have an other part but running properly
 
@Baldráni mind if we read?
 
@towc what should is ee ?
Nup
not at all
var matin='<button id="matin" type="button">Matin</button>';
var soir='<button id="soir" type="button">Soir</button>';

$(document).ready(function(){
$('body').append(matin);
$('body').append(soir);

var options2 = $('select[name=minute] option'),
    min     = 1,
    max     = options2.length,
    rand    = Math.floor(Math.random() * (max - min + 1)) + min;
var random_option_value2 = options2.eq( rand ).prop('selected', true);
});
This is running well
 
g = function(x) { return x*2; }
f = g
(x = 5)
What does this return, and why?
No cheating :P
 
11:46 AM
runs it
 
@Baldráni there must be something in the middle
 
@BenFortune u running w10? :d
 
Based on what I recall reading, 5
 
Well you need the first one, because event delegation
 
@towc Between the two function ?
 
11:46 AM
@KendallFrey Why?
 
@MadaraUchiha I recall reading that it inserts a semicolon if possible
 
@Baldráni yup
 
@MadaraUchiha 10, you're calling the function
 
@towc Well nop ^^
 
g(x=5)
 
11:47 AM
This is the full code
 
@KendallFrey That's true, but it doesn't insert between a function symbol and its parenthesis :)
@BenFortune is correct
 
@Baldráni -_- it's an iframe
 
@MadaraUchiha I should clarify
 
you can't access the iframe's js
 
@Neoares Not yet, should be done in 10 minutes or so
 
11:48 AM
@BenFortune still checking requirements >:(
 
I recall that upon reaching a newline, it would insert a statement-terminating semicolon if it would be syntactically valid to do so.
 
@towc That shit took like an hour for me
 
@towc Gneee ?
 
I'm obviously wrong :P
 
@KendallFrey Not exactly
 
11:49 AM
@Baldráni wait, where are you running it?
 
@towc On a page with tampermonkey
 
on jsbin/codepen/jsfiddle...?
 
Long story short, it would parse the code, and when it finds a syntax error it would look for the nearest line feed and try to insert a semicolon there.
 
@Baldráni do you have a link?
 
11:50 AM
plus it inserts a semicolon eagerly after return for some reason
 
@towc Nup sorry its private file :/
 
@MadaraUchiha why does it parse return as if there was a semicolon though?
 
@Baldráni but you're not running it in an iframe, right?
 
@Baldráni whose?
 
@towc Well nop nop
 
11:52 AM
!!hi
 
@user3783598 Hello
 
@KendallFrey Because return with no parameters is checked first, IIRC
 
That hello feature... Is it something someone made up to get a girl to talk to them? ;P
 
Ah, "restricted productions"
I shall have to do more reading...
 
@MadaraUchiha sems like a bad idea anyways
!!erase 24746312
 
11:54 AM
@JanDvorak That didn't make much sense. Maybe you meant: erase, flash
 
@JohnSnow Given that @Zirak ends up crying and masturbating to the jQuery docs every night (often simultaneously), I'm going to have to say, yes.
4
 
@JanDvorak That didn't make much sense. Maybe you meant: ban
@JanDvorak tehe
 
@Zirak FR ^
 
11:59 AM
Hmm, no explanation on why such productions are restricted. What's the practical purpose for not allowing a newline between a return and its expression?
 

« first day (1747 days earlier)      last day (3195 days later) »