« first day (1874 days earlier)      last day (3296 days later) » 

05:00
and people still make books about html?
Yes, yes, and yes. You reminds me, I have a late book...
user406009
@twiz I think you will be forced to create two separate APIs at some level.
@twiz You won't be in the "learn javascript by watching youtube" camp, would you?
By that I meant two separate URLs.
user406009
At best, to minimize code duplication, you could make your AJAX request return HTML instead of JSON.
05:02
@twiz it's possible to have a form submit normally or use ajax, but I question it's value. JS is a normal part of web pages
also, you'll loose out on a LOT of functionality without JS
@Luggage Yea, I'm not really concerned, I just consider it a good practice if you its not to difficult.
user406009
@Luggage The issues is that you would have different results from both approaches. You want the normal form POST request to do a redirect.
It is difficult.
@Luggage Yea, I'm not really concerned, I just consider it a good practice if its not to difficult.
user406009
You want the AJAX POST request to modify the current page using some new data you got from the POST request.
05:03
whoa
SO brokeded
Event firefox, which once have multiple js enable/disable user options (e.g. always enable right click - still available as a flag) - has removed those checkboxes on the ground that "it allows users to 'break the internet' unintentionally".
@Luggage No. Not really. What I was suggesting is pretty easy. I was just hoping there was a more elegant solution.
well, simple in theory, but it's a lot of work, just to make it work for one crazy guy that's on IE 5.5 with JS turned off.
Or using a kindle or something stupid.
kindles have js.
05:05
Not very good js.
Not my kindle anyway haha
how good does it need to be?
@Lalaland Yea, that's basically what I was thinking. If there is a certain variable included, do a redirect, otherwise just return json.
You just use the submit event, cancel default action and do youe ajax
@Luggage As I said. Not a javascript question.
and have the action and method specified on the <form> for when there is no JS
ohh, on the server? use the accepts header. That's what it's for
your ajax requests should say "accepts: text/json" or whatever the mimetype is
05:10
@Sheepy Its just kind of funny. I remember learning HTML back in like 2001 or something. Even then I didn't read books on it. Google was still better even on dial-up.
Ok, I keep making typos. Time to sleep.
Glad to know it is not youtube. Yeah, I still read books. They may not offer the latest and greatest but they offer great depth.
I like books, too
While my late library books are about music, I still buy and borrow programming books.
It isn't always easy to find good resources online. Especially for things that aren't as common
user406009
Programming books tend to do a good job of being consistent and comprehensive.
user406009
05:14
If you try to learn from a collection of different tutorials, it often leaves gaps..
Indeed.
Recently, online courses have gotten really good, though
(Or I've just become better at actually finishing courses recently :P)
Any online course recommendations?
Sure, hold on. I'll find the links
Technical:
http://opensecuritytraining.info/IntroX86.html
https://www.coursera.org/course/crypto
https://www.coursera.org/course/softwaresec
https://www.coursera.org/learn/machine-learning
Non-technical:
https://www.youtube.com/playlist?list=PL848F2368C90DDC3D
https://www.youtube.com/playlist?list=PLEA18FAF1AD9047B0
https://www.youtube.com/playlist?list=PL6A08EB4EEFF3E91F
ocw.mit.edu and oyc.yale.edu are quite good in general to find courses
Apart from the obvious Coursera, edX, Udacity, class-central.com etc.
I think I'm done :D
@Sheepy Let me know if you take any of them!
05:30
// Can anyone help me in this,
// Suppose i want to open a page and along with that page i want to show small window,
//so, in <body onload=myFunction()>
// and in myFunction()
var height = window.innerHeight / 2;
	var width = window.innerWidth / 2;
var myWindow = window.open("", "", "width=200, height=100 top=" + (height-50) + "px left=" + (width-100) + "px");
No time before new year I expect... so it's bookmark for now
05:43
My colleague recommended me frontendmasters.com
But thats $40 a month.
It has courses taught by Crockford and few other people like him.
@RahulDesai Meh, most of that stuff is the same you'd get out in the wild
I see.
Why do the other guys even answer the question that is about to be closed?
Points, I see.
Positive or ...... negative :P
06:17
points, yes
@Chirag Please format your code...
07:06
view-source:http://products.bose.com/static/email/15_holiday_6_NFL_us/index_h1.‌​html?mc=EM324106&et_cid=6650550&et_rid=467408959 <-- must see source
@AwalGarg For some reason I can't read the source of that specific page, only of bose.com
:P @RahulDesai
@JacquesMarais :P
morning!
@RahulDesai what are you upto
07:18
@Mornin' @nickB
my head spins round and round
@nickB morning
document.write('<td valign="top" style="padding:14px 14px 10px 14px;border-bottom:5px solid #ffffff" id="speakers"><a href="https://www.bose.com/products/speakers.html?' + trackSource + sourcecode + '" target="_blank" style="color:#000;text-decoration:none;font-family: Tahoma,sans-serif;font-size:12px;font-weight: bold;letter-spacing: 0.04em;line-height: 14px;"
onmouseover="document.getElementById(\'speakers\').style.borderColor = \'#00D9D9\';" onmouseout="document.getElementById(\'speakers\').style.borderColor = \'#ffffff\';">SPEAKERS</a></td>');
oh dear
Quality code
07:21
document.write() === document.fuck()
!!document.write() === document.fuck()
might be generated
@RahulDesai That didn't make much sense. Use the !!/help command to learn more.
of course it didnt :P
@BenjaminGruenbaum I am working with the team who wrote that :P
07:23
:P
technically, I was. Else I wouldn't be posting it here :P
I don't even see the sense in that command
you're not even comparing to see if the functions are the same
@Neil What command?
!!> document.write() === document.fuck()
8 mins ago, by Rahul Desai
document.write() === document.fuck()
@JacquesMarais "ReferenceError: document is not defined"
07:30
yep
Oh
:P document is not defined
!!> Date.now()
@RahulDesai 1449127898702
cool
I dint knew it was suppose to be !!>
@JacquesMarais define it and fuck it with .write()
07:36
document.fuckItUp = document.write;
document.fuckItUp();
document write should be slowly faded into deprecation oblivion
s/slow/immediate/
Lets just say I want to write a method inside a method.
Something like: `document.write.fuckIt()`
How do I inject this?
with prototype?
what does actually git-scm do?
I want document.write() to explode from the inside.
07:40
!!git-scm
@RahulDesai write() is a property on the document object
@nickB That didn't make much sense. Use the !!/help command to learn more.
Doesn't make sense to change the prototype
Functions are objects too
even if you could
07:40
oh it didn't
So you can do this
document.write.fuckIt() = ...
!!/help
s/()//
@nickB Information on interacting with me can be found at this page
@MadaraUchiha Awesome!
Thanks, man!
Cant wait to explode it now! lol
07:41
@MadaraUchiha Props to you for the recent events of lounge c++ room. They deserved a bit of slapping in the face with a trout
!!info git-scm
@RahulDesai Standard warning: Changing default objects and functions' behaviors is usually not recommended.
@nickB Command git-scm does not exist.
document.write.boom()
damn
07:42
@MadaraUchiha Why not?
@RahulDesai Because they are global and others might rely on them.
@RahulDesai Imagine if I did this:
is there any difference between git and git-scm?
@MadaraUchiha oh, right. Makes sense
document.getElementById = () => 'trololol';
@MadaraUchiha I am not familiar with => yet.
07:44
document.getElementById('#nyancat') === 'trololol'
@RahulDesai It's actually fairly simple
oh wow
() => value is the equivalent of function() { return value; } in new syntax
@Neil That looks nasty.
07:45
(x) => y --> function(x) { return y; }
I see.
It's got very little sophistication to it, it's basically to shorten passing and returning functions around
Not much typing, I see.
Let's go deeper!
^ and in that case (one argument) you can omit the parens too
07:46
why does my beard smell like indian food? I haven't eaten indian food in like a month
// The following two are equivalent

let fn = (x) => (y) => z;

function fn(x) {
  return function(y) {
    return z;
  }
}
let fn = x => y => z;
All these new ES6 stuff.. :P
=> is basically "returns"
But then, where would you do the calculation.
Lets say, something like, a+b=c
?
07:48
let add = (a, b) => a + b;
@RahulDesai let add = (a, b) => a+b; let c = add(1, 2) // 3
or:
let add = (a, b) => {
    let c = a + b;
    return c;
}
^ useful if you have more than one statement in your function
we are the new source of docs now :P
@phenomnomnominal not much sense to turn that into two statements though
07:50
@Neil in that case obviously not, no :)
just my personal preference, it really doesn't make any difference performance-wise
has everyone started using es6
Not all browsers are supporting it though.
it's almost 2016, so yes, most of us are using ES2015
07:53
ya. IE
what else
FF, chrome, and Edge do. That's fair enough of support.
Everyone is using a transpiler (mostly Babel, and TypeScript to some extent). There's no real excuse
@MadaraUchiha Thanks. I appreciate it.
Suffice to say, you, programmer, lose nothing to insist you support only browsers that support es6
your client may want it to work for ie6, in which case you should shoot him
lol
07:54
@phenomnomnominal So it looks like people are loving let from ES6
govt ppl like ie
@nickB and that, sir, is why I don't work for the government
@RahulDesai it's the new default
Guys, I wanna host a domain. What's the cheapest hosting?
ya. but your client can
07:55
with const being extremely useful too
There is free hosting as well, not sure if it gets cheaper than that. Depends on what exactly you want.
Yes, but you are also free to say, only es6, one month of development.. otherwise a month and 15 days
@phenomnomnominal Looks like they are trying to fix the functional scoping.
@AwalGarg Well, I used free hosting before, but it didn't work most of the time.
Like the website was down most of the time
they usually see the light when their wallets are involved
07:56
> Depends on what exactly you want.
There's almost no reason to use var anymore
Just a small website for my blog and projects
No server-side scripting requirement?
@JacquesMarais github pages
@AwalGarg Well, for Wordpress yes...
(PHP)
07:58
then either DigitalOcean or Linode. Those are my personal preferences.
@phenomnomnominal Can you host github pages on a domain?
Oh
@AwalGarg Ok thanks, I'll check that ones out.
@JacquesMarais Any reason you are using Wordpress and not a static site generator like Jekyll?
@AwalGarg Not really. I am just very used to WordPress
I could maybe use Github Pages
08:00
I suggest checking out static site generators. There are simple ones as well, if jekyll is too much for you.
Ok, thanks
My domain was just available. Then when I went over to another domain service, it's taken :O
Then buy it at the first one :)
(As long as it's not DynDNS)
wow, the fucknuts are really coming out of the woodworks on that lounge meta meltdown
crl
crl
hack a site, and put your site somewere on it
08:15
hi all
Hey @Julo0sS
:P @crl
crl
crl
@JacquesMarais is it just for a blog?
@crl Yep
I think I'll rather use another domain name anyways.
jacquesmarais.com Or something like that
I have the perfect idea. I'll just use a .io domain
crl
crl
maybe blogger.com too
Do they provide an option for a custom domain?
08:22
@JacquesMarais hint: en.wikipedia.org/wiki/.is
@ivarni Don't you think .io is better, many popular websites such as github use it..?
@JacquesMarais well, you could try to grab jacquesmara.is but in the end I don't really think it matters much
@ivarni Ohh I see what you mean with .is. Thanks for the idea. I think I'll use that :D
If it's just for hosting a site then most traffic will probably com via hyperlinks anyway and most people probably won't even notice what domain it is
get mara.is
then have cques as a subdomain
then your email can be [email protected]
08:28
@phenomnomnominal I like the way you think
convoluted as fuck. But #B4D455
crl
crl
wow .lol and .mom exist, we can finally make a @kendalls.mom
Or you could get jacquesmarais.me, and have a wildcard email.
:P
@AwalGarg Yea that could work
:P @phenomnomnominal
apache
that's just how I read ".eu"
lel xD
european union :(
.com was already taken
I still think neoar.es was good
and I'm from spain so...
how's the syrian thing playing out for your country?
crl
crl
08:34
is it just me or jsfiddle often bugs on selection
@Neoares Well EU === "eeew" so....
We're not a member but still have to ask "how high?" every time they say "jump"
crl
crl
x.replace(/[A-Z0-9]{6}/, s=>s.toLowerCase()) <3 js
with a /g ofc
text-transform: lowercase <3 css
08:54
hello
Hey @GeoPhoenix
crl
crl
!!urban phoenix 4
@crl pheonix Mispelling of phoenix.
@crl Phoenix The capital of the state of Arizona and 4th largest city in the United States of America.
@crl Phoenix a gorgeous teenage girl who has an interesting personality. She is slightly shy, but is spunky and cool at the same time. She is very artistic and fun to be around.
09:00
That's blasphemy. Phoenix is Dumbledore's pet bird's species' name.
@ivarni ¬¬
crl
crl
are you shooting at him?
kinda
If I have an array and I am using formdata to post to express server, while constructing the body .. do I have to do JSON.stringify(array) while appending to formData and JSON.parse in the server ?
express server :o
new meta
09:04
Can anyone help me in angular JS?
crl
crl
@anyone not here yet
@Neoares Typical EU behaviour :p
@ivarni did you mean USA?
I have to edit posted jason data form onclick in AJS
what is new meta and why expressjs is new meta
09:05
:P @crl
@Neoares sssh, they get offended when you mention all the shooting
!!afk Dead
@ivarni k
crl
crl
what are the <!--StartFragment--> when copy/pasting some html?
browser does this?
Mine doesn't, not if I copy via inspector and not if I copy from the page
Which browser is this?
crl
crl
09:09
copy html from any site in a contenteditable or textarea
voog.github.io/wysihtml check here (to see the source)
or maybe it's that specific wysiwyg that does it, but I'd be surprised, hm let me checl
Tried it here: jsbin.com/rujufegova/edit?html,output but didn't get that with Chrome
@FlorianMargaine Why ? What do I miss ?
yesterday, by Awal Garg
16 mins ago, by Madara Uchiha
1 min ago, by ivarni
@Cerbrus More of a train-wreck
crl
crl
@ivarni Oh you're right, that's the wysi that does it, thanks
@AwalGarg I still don't get it :(
I guess I missed too much of the recent history of the js room
09:14
@DenysSéguret click the train-wreck link, "TheCatPlusPlus" is a lounge regular
there was a meltdown over moderating in the c++ lounge
13 hours ago, by Awal Garg
Lounge might move to miaou
@AwalGarg oh, ok
it's almost clear now
Get ready for the invasion
It probably won't happen. Other invasions were announced before. In any case there's no problem for me, people can come in and out.
(the previous message shouldn't be interpreted as a specific invitation)
09:29
Hello everyone
@AkshayJ 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.
crl
crl
how would you best troll c++?
I'd come with: "I don't see how c++ is better than c, since c==c++"
Why would you want to troll ?
crl
crl
just for fun :), normal people don't take it too seriously :)
a humoristic troll, not an aggressive one, a patroll in one word
keep on painting ;)
09:34
@crl tell them they are awesome
crl
crl
hehe, maybe later, a bit scared by their reactions
@Zirak coincidence: I have to do some perl at work too :(
does anyone get travis ci here?
I don't get the meaning of this script... github.com/behrangsa/generator-fiddle/blob/develop/.travis.yml
09:59
@crl don't.
crl
crl
:d ok
@crl Ask them the difference between Java and C++.. that they seem so similar with their classes and such ;)
Oh dear that would create an explosion I think
@BenjaminGruenbaum Yup - absolutely don't
And yes, don't do that
are you going to ask'em now ? so i can join the lounge and watch the fireworks
crl
crl
10:03
ok ok, was just a joke
c++ers are a bit butthurt with java
The lounge seems perfectly capable of creating its own drama of butthurt
they have to justify not switching to java somehow I suppose
@ivarni true
Well, who is claiming to be a more elite troll than me
I would never claim to be more of a troll than someone else. I leave that honor to you
crl
crl
10:11
@chmod666telkitty you're gorgeous, otherwise
@crl look what you've done, now they're coming here as well :/
crl
crl
Rebel Melanie Elizabeth Wilson (born Melanie Elizabeth Bownds; 2 March 1980) is an Australian stand-up comedian, actress, writer and entrepreneur. After graduating from the Australian Theatre for Young People in 2003, she began appearing as Toula on the SBS comedy series Pizza and the sketch comedy series The Wedge. In 2008, Wilson wrote, produced and starred in the musical comedy series Bogan Pride. The following year, she won the Tropfest best actress award for her role in Bargain and made a guest appearance in City Homicide. Shortly after moving to the United States, Wilson was cast as Brynn...
10:24
@Neil you don't have enough pop corn to properly enjoy watching rome burn
You profile are even worse than mine, crl, at least I have 1k+ rep being as lazy as I am. Look at your profile, just look at it. It has been 22 months, not even 1k rep ~cries 4 u~
@sehe it's still too expensive to buy here
we have to settle for half-eaten pieces of chewing gum
@chmod666telkitty look at my profile :P I don't use to ask/answer
you are fine, at least you didn't challenge my title
@chmod666telkitty Check out this profile then
10:27
I have checked it out, what about it?
1 liner, I love it!
crl
crl
@chmod666telkitty :) laughs
precise is the key to attention retention
awal:~$ chmod 666 telkitty
chmod: cannot access ‘telkitty’: No such file or directory
BM Garg
!!urban BM
10:29
@AwalGarg BM acronym for bad mannered, used by korean computer players.
@Neoares ?
nothing, that sounded like "you don't exist"
what could be the reason for 401 on XHR if manual navigation works?
How did you send the XHR request?
eh i was logged in in chrome
that was the reason
10:36
Ah, well if you send it via fetch, it does not send cookies by default. That's a common tripping point.
The good old xhr constructor works fine, OTOH.
@AwalGarg Interesting. how do I change this default?
put {credentials: "same-origin"} in the options
@AwalGarg doesn't seem to work
maybe it's because of the cors plugin that I'm using
uh
If it is cors, use "include" instead.
Hellou
10:42
@Jairo 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.
problem with cors?
you can use "chromium-browser --disable-web-security" or pass the parameter in the link if windows, and test if it is cors problem
> A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'null' is therefore not allowed access.
uh
@BartekBanachewicz where are you sending the request from?
localhost? or do u have a server?
@BartekBanachewicz: am reading your blog.
nice!
user3119231
10:47
Whatsup
user3119231
gratz @AwalGarg for room ownership
What would be (most)efficient way of executing N callbacks that are scheduled to run at some point in the future? N callbacks (N>=50) needs to be executed in future at some point A.Or even, group of N callbacks needs to be executed in points A, B, C...
So for example N callbacks needs to be executed for 15 seconds (A)
N callbacks needs to be executed for 30 seconds (B)…
user3119231
you mean you need different intervals?
" needs to be executed for 15 seconds (A) "? What? I don't quite get what you're saying there
@Srle use promises and wait for all promises to resolve before moving to block B
10:52
imagine betting mechanism, in which you can settle the trade of duration equal to 15seconds, and other 50 users can do the same
I assume it doesn't matter how long it takes
and after 15 seconds you need to determine outcome of the bet
user3119231
In this case simply check if all bets are done. (?)
and you want to avoid delays as much as possible (im saying delays because setTimeout can cause delays)
oh, so we're talking about backend?
10:53
A callback running for 15 seconds doesn't make much sense. How do you know how much running time does the callback have?
@Neil, yes backend
15 seconds could be a timeout for an operation, but it shouldn't be a means of waiting
@Awal Garg, i can but with construction like setTimeout which maybe is not suitable for this case because large number of callbacks
@Srle because you don't think you can finish in time?
Not sure I understand why it wouldn't be suitable
@Neil, probably, but again i dont see any other way around
10:56
setTimeout alone can't help here because it runs in the same thread. You will need to pick workers on your way.
@Awal Garg that could be good direction
it always helps me to understand what your bottlenecks are
once you know that, you know what needs to be put in separate threads
@Neil in this case, he is bound to put his "callbacks" in the workers, because workers won't interrupt the main thread. (I am assuming browser-land, if it is in node, ignore me)

« first day (1874 days earlier)      last day (3296 days later) »