« first day (1688 days earlier)      last day (3266 days later) » 

5:01 PM
@Catgocat it's the standard way
You can reimplement getopt if you want
 
Anyone else here suffering a depression because of an eye-disease?
 
Oh ok, I thought you were refering to the npm module
 
Maybe TMI but I just discovered I have glaucoma...
 
@GabrielTomitsuka :( How bad?
 
@Abhishrek hi !
 
5:04 PM
@Catgocat well, the node module probably reimplements the api
 
commandline arguments? what is this, DOS? steve jobs discovered the mouse in 1892, use it.
 
give or take a century
 
@havingagoatit good morning sir, my name is john, how can i help you ?
 
Fair enough
 
5:06 PM
@MadaraUchiha Early stage, but I'm fucking 13. I've got a small blind spot in the lower-left corner of my view.
 
year: 1.9X10^3
 
@GabrielTomitsuka Treatment?
 
@Abhishrek hi how are you ?
 
command lines are so cute
 
@MadaraUchiha I'm taking my medication correctly.
 
5:06 PM
as you get older it gets worse. enjoy.
 
am functional
 
I'm 29 with perm spots in my vision
 
@rlemon Did you put a magnet next to your eyes again?
 
yes
 
We went over this
 
5:08 PM
@rlemon Thank you!
 
Great to know :) Actually, I already knew it.
 
@Abhishrek awesome can you help with a function I am having trouble with
 
@Catgocat while(true) { console.log('So cute') }?
 
Maybe
 
5:08 PM
noooooooooo
var cute = console.log.bind(this, "So cute")
setInterval(cute, 1000)
My dream is to make a useful command line app
 
@Catgocat 1000? Meh. Waaay too much.
 
@Abhishrek ok well the last function is not working for me , i want it so that if i click anywhere but the menu it will collapse and remove the class active from a button
 
@GabrielTomitsuka I said cute not aggressive
 
@Abhishrek $(document).ready(function () {
    var $navToggle = $('.nav-toggle');
    $(".navbtn").click(function () {
        if($navToggle.hasClass('active')){
            $('#menu').multilevelpushmenu('collapse');
            $navToggle.removeClass('active');
            $(this).addClass('active');
        }
        else{
            $('#menu').multilevelpushmenu('expand');
            $navToggle.addClass('active');
            $(this).removeClass('active');
        }
    });
$(".navbtn").hover(function () {
 
no sorry
 
5:11 PM
@Catgocat These are called CLIs.
 
i am unable of understanding jQuery
 
yea that
 
@Abhishrek no problem thanks anyway
 
@Catgocat It's really easy to build one.
I'm working on one for that startup I started with Uni.
 
@GabrielTomitsuka how
i mean I have an idea how to do it
 
5:13 PM
@Catgocat learn bash
It is very easy
 
Let me check if there's a tutorial on how to do this with Node online; If not I'll make one and send you.
 
what is bash
 
google knows
 
@AwalGarg Why learning Bash when you can do #!/usr/bin/env node?
 
This guy is pretty smart ^
 
5:16 PM
wtf is that?
 
He taped his toothbrush to a pistol
and started shooting
 
ohhhh
 
@GabrielTomitsuka because you will still have to know bash or your apps will likely be broken
better learn bash and then use node with commander or whatever
 
@GabrielTomitsuka It's Why + Infinitive Verb, not present continuous
Correct: Why learn Bash ?
Wrong: Why learning Bash ?
 
@Catgocat everyone hates you.
 
5:17 PM
@AwalGarg dis you see the observable proposal?
!!afk homework
 
@Catgocat Thank you Stannis
 
@BenjaminGruenbaum no
 
that proposal was indecent.
 
Sad story, I have better grades in my English exams than in my native language exams
 
@Catgocat Ok, Mr. Grammar Nazi.
@MadaraUchiha GoT mention intended?
 
5:19 PM
english is the javascript of languages
kinda messy but works anywhere
 
Portuguese is hard, don't try to learn it.
 
@Luggage I'd say english is stuck at es3 then
 
some engines (people) are, if we want to stick with the analogy
like most of my extended family is basically IE 5.5
 
IE? It's Microsoft Edge now.
 
in language ability and appearance
 
5:20 PM
@GabrielTomitsuka Stannis is a grammar nazi
 
no, javascript is a dialect of ecmascript. dialects can be stuck at an older version of the spec as well.
 
Don't know if you noticed
I found that to be the most amusing part of the entire series
 
@Catgocat Eu falo português e alemão. Eu tava zuando quando falei que não falava português direito.
 
IE failed so much that microsoft had to rename it to Microsoft Edge.
 
ok, now we're being pedantic about an analogy.
 
5:21 PM
@Luggage :D
 
Also, German is 8x harder than Portuguese.
 
You know who spoke german?
Hitler.
 
@Catgocat Don't mention this name.
 
edge sounds great. shame it won't immedately fix people stuck on old pcs/oss/browsers for oehter reasons
 
@Catgocat how do you know?
 
5:22 PM
flagging as extreme right propaganda
 
@GabrielTomitsuka did you seriously just flag 'hitler'
 
@Luggage Now you're being meta about pedants discussing an analogy.
 
kicked.
 
@GabrielTomitsuka Flags aren't toys.
 
@GabrielTomitsuka that, not this
 
5:22 PM
now, when you get back. grow up and don't flag such silly things
 
@SomeKittens you've just gone 3 levels deep. big mistake.
 
@Luggage edge sounds gr.. whhhhat
 
@Luggage BWUOOOOOOMMM
 
@SomeKittens Own :( Ok
 
yea, edge sounds great. I said it.
 
5:24 PM
How dare you
 
@rlemon Yes yes
 
I see no reason to switch from chrome for my own use.. but I like the idea of windows coming with an evergreen browser
 
It's funny how they had to find a name that started with the letter E because of the logo.
 
that doesnt' fall back into ie7-quirks-poop-mode at the drop of a hat
 
@Luggage form Chrome? <input type="website">
 
5:25 PM
I type 'form' a lot by accident. I can't help it
 
Now in our if statements we'll have to add Edge
 
don't browser detect
 
browser detection? eww
 
that is stupid
feature detection and call it a day
!!afk
 
Feature detection > browser detection
 
5:26 PM
the only reasont o do browser detection is to give the user a handy link to update their browser
else { return "http://chrome.google.com"; }
 
browser detection is great and does all the things
 
if (navigator.appCodeName != "Explorer" && navigator.appCodeName != "Edge") ...
 
You know who used browser detection?
Hitler.
 
@Luggage how do you know?
 
There wasn't internet back in the day noob.
 
5:28 PM
@Catgocat Eh, ||
 
@GabrielTomitsuka why?
 
@AwalGarg || = OR and && = AND
 
The opening sentence of Mein Kampf: "if (window.userAgent.indexOf(..."
 
@GabrielTomitsuka that's... news to me /s Why OR?
 
@Luggage In the final days of the war, during the Battle of Berlin in 1945, Hitler married his long-time lover, Eva Braun. On 30 April 1945, less than two days later, the two committed suicide to avoid capture by the Red Army, and their corpses were burned.
 
5:30 PM
That's what browser detection leads to.
 
On 1 May 1945, Internet Explorer surpassed Netscape on downloads.
 
hehe
 
@GabrielTomitsuka HAHAHAHAHA
 
I have to get back to study.
!afk studying hardcore
 
2 messages moved to Trash can
 
5:33 PM
java isn't THAT bad
inb4 bin
 
@AwalGarg first gut would be legacy
and simply that frontend and backend are sometimes separated
 
@AwalGarg it would most likely break a ton of web forms, which use different origins
 
@Abhishrek give me an example of such a form
@FlorianMargaine :(
@FlorianMargaine that's why we have Access-control headers ;)
 
5:42 PM
meh ever used mailchimp ?
 
@AwalGarg we didn't 10 years ago
 
@Abhishrek yes
 
@Catgocat Hitler was a drugged asshole, an extremist, a mass murderer, one of the worst strategists Germany ever saw(Winter Campaign in the USSR 1942-43) and an idiot. He wanted to conquer the world and thought that Germans(p.s. Austrians considered themselves German at that time) were better than everyone else. You just read Mein Kampf and said he wasn't that bad. I just don't get it.
 
@FlorianMargaine so because of people from 10 years ago, we have to have this stupid csrf crap in every form?
 
@AwalGarg yeah, same reason we have to deal with html
 
5:44 PM
god what a horrible world
where do I complain about this @FlorianMargaine?
 
@AwalGarg ask your mom
 
:( I am serious
IETF mailing list?
 
how guys, quick JS question:
 
<form action="//snapick.us11.list-manage.com/subscribe/post?u=c72f0e0df244aa618bb354e05&amp;id=258d8d4dad" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> @AwalGarg
 
whatwg mailing list, maybe
 
5:47 PM
g_list.random();
What does that do, if g_list is a global variable with an array of objects
 
@Abhishrek access control headers
 
@AwalGarg such forms exist on tons of websites
 
There's a function defined called random(array) in global - is that called in that case?
 
and suppose you add Access Control Headers and drop CSRF
 
stupid fucking legacy crap
 
5:48 PM
how will you handle a browser thats old ? and won't follow SOP ?
 
@AskeB. there's no Array.prototype.random method, no
but it's possible to add it
 
@Abhishrek you don't. and you shouldn't.
IE is already vulnerable.
 
there's "vulnerable" and "vulnerable"
 
lol still most of our banks use it.
 
making the service secure doesn't make it secure on old browsers.
 
5:49 PM
@FlorianMargaine ah right, thanks, found that function. Thanks. JS newbie ;)
 
@AwalGarg also awal used any banking payment portal ?
 
@AskeB. should I care that you're a JS newbie?
 
Not sure. But now it's there.
 
@Abhishrek yes, but 3d payments verification don't require cross origin form submission, and the old method is now deprecated in favor of it.
 
you mean 3D secure, but anyways
 
5:51 PM
@FlorianMargaine are you sure whatwg is the right place for this and not ietf?
yeah that
 
@AwalGarg A lot of gateways still use embeddable forms
where the user can enter his bank details
like credit card then they can send them to banks site
 
that is stupid and inherently insecure.
 
so that their customer doesn't has to do all the madness
 
@FlorianMargaine Thanks anyway though. You saved me a lot of time, so your words were appreciated. That was probably my point. Now it is anyway ;) Cya
 
@AwalGarg and how do you propose we improve it ?
using an iframe ? which falls into SOP ? and won't let you access its contents ??
 
5:53 PM
@Abhishrek by having the client do the madness, not necessarly the user though. It could be done by the browser.
> Hey there is this special case for which we need to open this big security hole.
> Sure. We will let the rest of the 80% websites suffer and force them to use random large tokens, but cater for the minority
 
ps the embeddable iframe is used by most of the ones i used in past few months though i'd like Oauth 2.0 like handshake for payments more prominently seen
@AwalGarg i am not defending the allowance -_- i am merely reasoning for why it still exists
 
@FlorianMargaine whatwg says : mailing list for web designers and discussion and feedback on the spec :/
 
yes, it's about the html spec
 
@Abhishrek the reasoning is way too narrow in scope that it makes no sense to support it
@FlorianMargaine who controls the http protocol, status codes and headers?
IANA?
 
@AwalGarg that's not it...
you want to change how browsers behave
 
5:58 PM
@AwalGarg If you're so smart, why don't you make your own protocol
 
@FlorianMargaine and the browsers follow the http spec? no?
 
CORS is a browser limitation
curl doesn't give a shit about CORS
 
What phone do hackers use
 
@Catgocat no phone
@AwalGarg CORS is not part of the http spec
 
u mean they have like cool glasses that do all the things
 
5:59 PM
@FlorianMargaine ahh right, duh
 
@Catgocat no, I mean literally no phone
because they don't want to be tracked
 
so they use a phablet?
 
a colleague at work is like that
he has only his computer
and travels around the world
 
@copy that makes no sense either. I never claimed to be "so smart" and I never said that the protocol is bad. It is awesome, simple and scalable. I am criticizing a spot in the implementation.
 
@AwalGarg how we do it is just use oauth 2.0 like redirection, (for payments) do you think thats secure ? l
 
6:00 PM
brb 5mins
 
@FlorianMargaine My summer holidays are coming and I'm planning to spend most of my time programming (I have some goals). It will only be 2 months because then school starts and I have no time. How do you think I should organize myself?
 
I don't know
I was an MMORPG nolife back when I was at school
 
when did you start coding
 
4 years ago or something
 
really
are you a genius or something
 
6:06 PM
Far from it
 
This is what I want to do if I have the time ^
 
@Abhishrek Idk I am scrolling through the whatwg mailing list to find anything similar :/
 
@AwalGarg look for it
 
@BenjaminGruenbaum I did and found only this: esdiscuss.org/topic/deep-object-observing doesn't have any details :/ maybe I am looking at the wrong thread though
 
@AwalGarg an observable is like an event emitter on steroids, it's an event emitter with .map .filter and so on - there is a proposal for those for ES2016
(ES7)
 
6:22 PM
@BenjaminGruenbaum how would we create one? like ob = new Observable; .. ob.on(foo, bar);?
 
@BadgerCat haahah
@BadgerCat És brasileiro?
 
No french please.
 
@AwalGarg var obs = new Rx.Subject(); rx.onNext(bar);
so basically - yeah.
 
And no, I'm mexican.
 
6:24 PM
@BenjaminGruenbaum does this have any documentation at this point?
 
@AwalGarg see motivating example here: github.com/jhusain/asyncgenerator , here's the proposal: github.com/zenparsing/es-observable
You can look at RxJS for tutorials etc
 
@BenjaminGruenbaum neat, thanks!
 
sure thing
 
@BenjaminGruenbaum should I remove my thread from esdiscuss?
 
@AwalGarg you can't remove a thread, it's there. See if it gets any replies.
 
6:27 PM
oh, ok.
 
Does Google store my voice pattern in their profile of me when searching by voice?
 
is there a sync way to do input in node.js ?
something like readline.question
 
@Catgocat commander
 
something built-in
 
6:35 PM
@Catgocat Yes
 
@copy what is it
 
I don't know
 
very funny Mr. Copy
 
@Catgocat see how commander is written, then write it yourself - inbuilt.
 
6:37 PM
Or look in the documentation
 
(or just pester one of the maintainers)
 
@Catgocat devdocs.io/iojs/readline promisify this api, then use async runner
 
var readline = require('readline');

var rl = readline.createInterface({
	input: process.stdin,
	output: process.stdout
});

var arr = [];

function ask() {
	if (arr.length < 5) {
		rl.question("Insert value", function(r){ arr.push(r); ask() })

	} else {
		console.log(arr)
	}
}


ask();
Is there a better way to do this ^
 
yes
 
@AwalGarg commander doesn't do REPLs
@SomeKittens see, the joke is that I'm one of the maintainers
 
6:40 PM
@SomeKittens but it makes it easy :/ no?
 
@AwalGarg No.
 
ok :(
!!afk
 
var rl = require('readline').createInterface({
	input: process.stdin,
	output: process.stdout
});


(function ask(arr){
	if (arr.length < 5) {
		rl.question("Insert value: ", function(r) {
			arr.push(r);
			ask(arr);
		})
	} else {
		console.log(arr)
	}
}([]))
Is this ok? ^
 
does it work?
 
Yes
 
6:43 PM
the IIFE is weird
 
You like the arguments parentheses out don't you ?
 
The first one was clearer.
Remember we write code for other programmers (that only incidentally runs on computers)
 
@Catgocat What's the point of the extra scope here?
Just for the recursion?
 
Yes ?
And to save lines
 
@Catgocat this isn't a good case for recursion.
Use a while/for loop.
 
6:52 PM
@MadaraUchiha Why not
@MadaraUchiha The rl.question is async, while loop will break it..
 
@Catgocat Promises then
 
@MadaraUchiha I forgot Promises
 
@Catgocat Recursion is when you have a problem that you can solve by making it smaller
 
Hum
 
6:54 PM
Ok then
 
I can count the elements in an array by counting all the elements from 0 to length - 1, and add one
 
I'll look into that
 
@MadaraUchiha how else would you do cps with callbacks?
 
So I can do return count(arr.slice(0, -1)) + 1 or something like that
@BenjaminGruenbaum o/
 
@MadaraUchiha how would that help?
 
6:55 PM
@BenjaminGruenbaum cps?
 
continuation passing style, nvm, ignore that.
I was just pointing out that unless he can use generators or async/await he must use recursion there.
 
You know you can actually read from stdin synchronously, I wasn't just messing around
 
Or a library that does it for him.
 
@BenjaminGruenbaum assuming r1.questionAsync returns a promise, I don't see why he can't chain promises
 
@MadaraUchiha please, go ahead and write it with promises without recursion, the same example.
 
6:56 PM
@BenjaminGruenbaum My whole company is on fire at the moment
So that would have to wait :P
 
@MadaraUchiha then why are you in chat?
@Catgocat inb4 your use of recursion is perfectly acceptable there.
 
In iojs do you guys put "use strict" before requiring modules or after?
 
!!xkcd compiling
 
@Catgocat stuff imported is automatically in strict mode.
 
6:57 PM
@BenjaminGruenbaum Does iojs even support modules yet?
 
when I use ES6 features in the main file it tells me to use "use strict"
 
(async function(){
     let arr = [];
     while(arr.length < 5){
          arr.push(await rl.question("Insert value: "));
     }
     console.log(arr);
})()
 
async ?
await ?
 
@Catgocat so use strict.
 
is that ES6??
 
6:58 PM
guys my client wanted a quick edit and now its turned into hours
 
@Catgocat you can't use those since you're not one of the cool kids.
@IPAddress good thing you charge hourly.
 
I dont know why the youtube iframe is being hijacked by a google maps iframe
any help please
 
and i know theres some inline code
 

« first day (1688 days earlier)      last day (3266 days later) »