« first day (2127 days earlier)      last day (2836 days later) » 

11:00 AM
@BenjaminGruenbaum GraphQL is the thing to do so? I havent came across this scenario before sorry.
 
You can implement a dirt cheap version of aggregating requests, no reason to actually implement GraphQL
 
@BenjaminGruenbaum how about using jQuery Promise here?
 
You'd base your aggregation on jQuery promises, but you should most likely prefer non jQuery native promises now
var ajaxQueue = [];
function ajaxGet(url) {
  var shouldFlush = false;
  if(ajaxQueue.length === 0) {
     shouldFlush = true;
  }
  try {
    return new Promise((resolve, reject) => {
      ajaxQueue.push({url, resolve, reject});
    });
  } finally {
    if(shouldFlush) flushAjaxQueue();
  }
}
var flushAjaxQueueTimeout = null;
function flushAjaxQueue() {
  clearTimeout(flushAjaxQueueTimeout);
  flushAjaxQueueTimeout = setTimeout(() => {
    var queue = ajaxQueue.slice();
    ajaxQueue = []; // reset queue;
Something like that, I wrote it in chat so don't expect it to parse :D
 
I would be a bad approach to issue 6 calls simultaneously and issue other 6 when they complete using jQuery then
 
Yes, the code above doesn't do it
 
11:07 AM
Im not talking about the code just discussing what I thought.
 
It fires one call which the calling code thinks is a regular ajax call but the actual code calls a ./aggregate route on the server that should return an object with fields that match urls.
 
I actually do not have server access for this.
 
Then talk to your server guy.
 
ok..thanks :)
 
Lack of initiative is not an excuse for contemplating bad engineering. You should take pride in your work :)
This is not something the client can or should solve on its own, your clients will appreciate the speedy load times.
@Mosho hey, I just wanted to thank you again for having my back this week :)
2
 
11:13 AM
@BenjaminGruenbaum Stuff happened?
 
yes actually I ws not at all aware that browsers have limits of concurrent ajax requests
for chrome/FF they say its 6 for IE they say its 2
 
@MadaraUchiha I had a week with a lot of stuff - and I had to leave office in the middle of the day a few times and take care of family stuff and we had a lot other issues.
 
@BenjaminGruenbaum I see
Sounds like you need a beer
Oh, you're heading out to Chicago tomorr,w right?
 
Well, if you want to grab one I'm in JFK right now, but I'll be in Chicago in a few hours :D
 
I see
Well, when you get back then :)
 
11:17 AM
I just had such a crazy week I didn't have time to relax, 12 hours of "I don't want to buy internet so I can rest" really helped me rest.
+ I love visiting the US, although it's as expensive and humid in JFK right now as it is in Tel Aviv.
 
Hello
 
Is it me you're looking for?
 
Me? Not you in specific, but hi Benji!
 
That's a song, also hi
 
hey, have u done socket programming?
 
11:20 AM
@Bajaj 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.
 
oh, haha. how is it going?
 
Well, busy week, currently in the airport waiting for my connection flight
I figured customs usually takes like 3 hours in JFK for non-us citizens but it took like 10 minutes lol
 
Nice :) @FlorianMargaine has convinced me to do networking next week. So I am preparing for headaches and stuff.
 
@Bajaj I've done a bit
 
!!nudge 10 backup
 
11:23 AM
UDP is hard
 
yes
 
@MadaraUchiha Nudge #4 registered.
 
Actually, my code is working locally bt not on the server
 
@MadaraUchiha I see you are still not used to using bash for your timers :P
 
@AwalGarg No, for various reasons
Reason #1 in this case is that I'm on Windows :D
 
11:26 AM
I wrote a notification server last weekend in Rust. That was real fun. Not as cool as dunst but it works well with i3status.
 
@BenFortune
Actually, my code is working locally bt not on the server
 
@Bajaj You already said that.
 
@MadaraUchiha nudge backup
 
@MadaraUchiha why i gets ban?
 
@SagarNaliyapara The last suspension I can see on your account was from March 15th, half a year ago.
Are you referring to that?
 
11:35 AM
not that one i got ban from using chat BOT @MadaraUchiha
 
@SagarNaliyapara Link?
 
@MadaraUchiha why you gives ban?
 
@BenFortune What should I do to solve it? Do you have any idea?
 
@BenjaminGruenbaum Hush now
 
23 hours ago, by Maurice
!!ban @SagarNaliyapara
23 hours ago, by Luggage
!!ban @SagarNaliyapara
 
11:36 AM
@MadaraUchiha why i gets hush?
 
23 hours ago, by Caprica Six
@Luggage @SagarNaliyapara added to mindjail.
 
@SagarNaliyapara that's a bot ban, it bans you from using the bot.
 
but why? @BenjaminGruenbaum
 
If you abused the bot, that's what you get - it's not up by StackOverflow - it's by @Maurice
 
how can i unban from it
 
11:37 AM
in Sandbox, yesterday, by Sagar Naliyapara
!!ban @littlepootis
 
Caprica is a private bot built by the people in this room
The owners of the bot decided to ban you.
 
@SagarNaliyapara do you promise to play nice?
 
It's not something a moderator can handle.
 
Did little pootis ask why he gets ban?
 
11:37 AM
ya sure
 
Just a heads up: this guy is a known troll who has offended me and a couple others here a few times.
 
Ask the person who banned you.
 
@BenjaminGruenbaum i promise
 
why little pootis gets ban?
 
@AwalGarg he is? Thanks for the heads up.
 
11:38 AM
i have already unban littel pootis
 
Sorry, I'll leave it up to @Luggage or @Maurice
 
But he is also pretty young. @SagarNaliyapara have you stopped spreading malware now and calling people names?
 
Take your case to them and convince either of them - or open an issue at github.com/JavaScriptRoom/culture/issues
 
it is not fair that anyone can ban anyone
 
@SagarNaliyapara Not anyone can ban anyone.
You can't ban anyone.
Only owners of this room (people with italic names) can ban people from using the bot.
 
11:39 AM
so how little pootis ban?
 
@MadaraUchiha Two normal users can ban anyone as well :)
 
@AwalGarg Seems broken, but w/e
 
i am not owner then also i have ban little pootis
awwwww
 
@SagarNaliyapara y u do dis
 
@MadaraUchiha The right way to fix this problem is to add Sagar as room owner
 
11:40 AM
@AwalGarg Of course.
 
i was just learning chat bot in sandbox room so that it does not gets disturb here
 
@SagarNaliyapara Please take it with the people who banned you, alternatively, open an ticket here: github.com/JavaScriptRoom/culture/issues
!!nudge 10
 
@MadaraUchiha Nudge #5 registered.
 
@Luggage @Maurice unban help?
 
jesus christ
 
11:47 AM
@littlepootis :-(
 
user3119231
@SagarNaliyapara Let's wait for @Luggage. I don't want to make a decision without him.
 
@SagarNaliyapara If you ban me there, I get banned everywhere.
Don't use the !!ban command. pls.
 
got it!
 
I've told you before.
 
Hey folks :) Is there a way of using an attribute inside of an array?
[ 'a', 'b', c: [ 'd' ]]
 
user3119231
11:52 AM
you want an object.
 
Yes, but don't.
And that's not how you do it.
 
@Maurice nope
 
@ChristophBühler { a: 'val', b: 'something else', c: [ 1, 2 ] }, objects
 
@MadaraUchiha nudge
 
@Victor I don't wanna do that
 
11:53 AM
You have no choice
 
@littlepootis how?
 
user3119231
arrays don't offer custom keys
 
@ChristophBühler well, this is not php, so you can't do it
 
user3119231
^
 
oh
Guess I'm gonna switch to PHP then
 
user3119231
11:53 AM
Use an object or go to php room.
 
@ChristophBühler x = [ 'a', 'b' ]; x.c = 'd';
 
@ChristophBühler lol
 
ok
thanks
 
11:54 AM
@Maurice they do, but no
 
user3119231
:-D
 
hi @AwalGarg
 
@Victor hello :)
 
hey @AwalGarg
 
@AwalGarg just discovered async.waterfall, and it is just awesome
hi @littlepootis :D
 
11:54 AM
@littlepootis hello :)
 
@Victor hey :D
 
@Victor nice :) Check out their implementations too and some other async primitives in JS like mutexes etc. Pretty fun stuff
 
@AwalGarg I will, thanks
however phpstorm is an idiot when it comes to code completion in js
it knows nothing
and underlines my code as error
 
user3119231
If I set port 80, 443 in xampp, do any other ports gets opened (by browser) ? My coworker thinks my cms is opening random ports on mass.
 
it only opens those ports
 
user3119231
11:59 AM
thank you, bro.
 
and ubuntu 16.04 remembers the screen brightness after I reboot <3
 
@SagarNaliyapara What's up?
!!unban @SagarNaliyapara
 
@Luggage @SagarNaliyapara freed from mindjail!
 
TIL property names are case sensitive, oops
 
everything is case sensitive in JS
 
12:22 PM
it is insensitive in my case
 
Thank you everyone for your love and support :D :P
!!nudge 1
 
@SagarNaliyapara Nudge #6 registered.
 
@SagarNaliyapara nudge
 
Is there a way to find from where in the source an XHR was initiated in Edge?
I'm seeing a request that results in a 404, but only in Edge :P
 
user3119231
12:32 PM
uhm, hard question
 
Oh, wait, this is HTTP/2
The request is for cdnjs.cloudflare.com/ajax/libs/chance/chance.js, which is not directly linked anywhere on the page
 
One easy way would be to hijack the global XHR (or fetch, if that's what you are using) constructor before anything else executes and make it call console.trace
 
Oh, I think it's related to source maps
cdnjs.cloudflare.com/ajax/libs/chance/1.0.3/chance.min.js.map refers to ./chance.js which causes the request
So much for that riddle!
Now why am I seeing a CORS violation, only in Chrome :P
 
@SagarNaliyapara yea, you no longer get to use the bot.
you were randomly banning people in the sandbox
your access is revoked. cc @Luggage
 
user3119231
I give up. PS is an art for itself
 
12:41 PM
hey guys
So I'm working with handlebars.js and I'm trying to create an each iterator to help me use the templating language to generate an HTML file with data that I have.
 
Did you undo my unban, @rlemon? Just curious
 
yes, I banned as well when pootis complained.
one day when user is offline most of it isn't a punishment
 
It's not a store where you sell things, it's an internal inventory ordering system with no money. People order, it logs, and sends communications to the accounting and inventory depts. I got all of the integrations set up. I'm just trying to make a layout for this thing.
 
I mean from like 10 minutes ago
 
he can take a break from the bot for a while.
@Luggage yes
 
12:43 PM
@Maurice Photoshop?
 
user3119231
yup
 
ok. just making sure I didn't undo your ban. No contest.
 
well we all tried to ban, I was just late to the party
I checked out the sandbox and he didn't try to just ban pootis
he can go without the bot for a little bit until he learns how it works.
 
But how will he learn to use it if he can't use it ;p
 
watching others
 
user3119231
12:45 PM
For example me, the last templar.
 
Read the docs, install it himself, watch.
 
Anyone use handlebars? mustache?
 
the bot doesn't bring anything essential to SO chat. It's just a toy. (sorry, @CapricaSix)
 
user3119231
on my bike, in my face.
 
guys, I found this regarding custom errors in js, but would it also work with something like class MyError extends Error?
 
12:47 PM
@Victor yes, but you will need to define the constructor.
 
@MassDebates yep, what's up?
 
@AwalGarg nothing fancy, right?
 
Right
 
Pretty sure there is an npm package for that..
 
user3119231
 
12:50 PM
there's an npm package for everything
 
Why not just use document.querySelector?
 
I want to make an npm package too :(
 
It's pretty easy to make an npm package actually
 
user3119231
create following console helper package: function log(s){ console.log(s); }; , trust me you will go places
 
sorry corvid, didn't see your response@
 
12:52 PM
even I've made two or three
 
I'm having trouble with making some iterators
I have a variety of spreadsheets and I'm trying to come up with a context file to match this template. i'm gonna have to change the template too, but this would be close to the resulting code:
 
I have published an npm package too. Here it is npmjs.com/package/jshp
 
@AwalGarg Bringing the awesomeness of PHP to JavaScript since 1870 lol
 
No, seriously.. I want to make something useful :|
 
Are you asking for suggestions on what to make? :)
 
12:56 PM
@cswl and I want a private repo on github, but no money
 
user3119231
^
 
user3119231
can agree with you
 
of course I could go to gitlab, but github is 10 times faster than gitlab
 
bitbucket does free git private repos
 
12:57 PM
@AwalGarg Yeah..
 
@AwalGarg is that serious business?
 
I keep all my home directory into repos on bitbucket... :|
 
@SterlingArcher SNEK!
 
@rlemon SterlingArcher is afk: pair programming time
 
@cswl TypeScript has support to infer types from JSDoc comments. If you can write a Flow like type checker (and not typed variant of JS) using TypeScript's type checking framework - that would make a great tool to put on npm.
 
12:59 PM
@ corvid
woops @corvid
 
@Victor It was serious when I wrote it. Then Github asked me to discontinue it. If you are a student, you can get free private Github repos and other things from education.github.com/pack
 
ulalaa
I really am a student so... going to use it
 
just use bitbucket. it's legit free.
 
or git init on your hard-drive with backups somewhere, but I think he wants the Github issue tracker and UI etc.
 
Do you want to see what I came up with for a context file?
 
1:02 PM
right, but bitbucket and github help with the collaborating without your own server or using email or some bs
 
@Luggage I hit enter too fast :) I think most people find Github's UI better
 
yea, i do, too.
 
@AwalGarg yeah
!!afk
 
I like emails and old style patches, so I use this instead: git.awalgarg.tk
 
but if i am choosing between a real free option or a hack that might get your repo deleted, i choose the shitty ui
the education pack might solve that, though
 
1:08 PM
@rlemon There was another guy that did that with a more realistic snake. I like this one better just because it's more goofy than anything.
 
ok, sent the request :D
 
@Victor nice wallpaper. here is mine imgur.com/a/B9a0R
 
@AwalGarg interesting. I use this 16.04's default 'cause it's clean
if I have .idea in my .gitignore
why does this happen?
$ git status
        modified:   .idea/dataSources.xml
        modified:   .idea/libraries/node_todo_node_modules.xml
        modified:   .idea/sqldialects.xml
        modified:   .idea/vcs.xml
 
@Victor Yeah, unity defaults are pretty clean in general. How long have you been using Linux for, if I may ask?
 
@AwalGarg hm, maybe 3 years
and I stopped using windows since then. Well, I use it for cs go, call of duty, photoshop, lightroom etc
 
1:22 PM
@Victor Ubuntu being the only distro you tried?
 
@AwalGarg yep
you?
 
@Victor I started with Ubuntu. Used Fedora, Arch, Gentoo, Slackware, Mint, Manjaro, Debian and some others. Settled on Arch in the end for now.
 
oh so that's the thing with that "A" in your wallpaper
I didn't get it at first
 
It is the Arch Linux official logo
 
could you enlighten me with that gitignore thing, please?
 
1:25 PM
Wild guess: You added .idea after checking in those files into git already
 
@AwalGarg Well, that looks quite easy.. :|
 
@cswl If that is not sarcasm, then I salute your courage :D
 
@SterlingArcher the new TAA album is on spotify :)
 
@GNi33 SterlingArcher is afk: pair programming time
 
@AwalGarg looks like a nice config
 
1:29 PM
@GNi33 Thank you :)
 
will try some of that stuff
 
@AwalGarg damn nice!
 
you just use i3 right? no DE?
 
@bitten thanks :)
@GNi33 Yes, that's right
 
I'll need to look into that, I've always used a DE as of now, not sure if I'd like it without one
but can I even use, let's say, GNOME in combination with awesome or i3? never tried
 
1:31 PM
So have any of you guys made use of background sync yet?
 
@GNi33 Yes, you can use i3's tiling features with GNOME or another DE. Many users do that.
 
sounds good, thanks
so I'll stick with a DE for now and give i3 a spin
 
@AwalGarg Xeon E5 feels great
 
@Victor The processor? I guess so. Everything not within my budget seems to feel great :(
 
@AwalGarg :))
I got part of my computer as a gift from dad's boss
I bought myself the rest
(aka the cpu and the display) :D
 
@littlepootis what's wrong with it?
I actually put this link here to get opinions from developers, so I can learn something
so feel free to criticize
 
@littlepootis this isn't what the name suggests, right?
 
@GNi33 it's ok. I like the heavier stuff they do. This is kinda soft for my taste
 
@Victor Good job putting things up publicly! I suggest using Code Review for getting a code review since that is a lot of code. Also try to split your commits into smaller patches, that makes code review easier :)
 
yeah, I'll need to give it a few more listens
but they gradually got "softer" with pretty much every release they did, so I expected it, and it's not bad
 
1:44 PM
@AwalGarg I know. I wasn't sure what I wanted this to become so that's why I haven't pushed yet
from now on, the commits will be as concise as possible
but @littlepootis @GNi33 what are you talking about?
 
oh that's your repository?
 
@GNi33 yeah :))
 
we're talking about the crazy amount of dependencies you got going on there
 
okay guys, I'm just seeing what is going wrong with this example: codepen.io/anon/pen/grqOwK I pasted code from this tutorial: jaskokoyn.com/2013/08/07/…
 
but I don't even know what your application is supposed to do, so...
 
1:46 PM
@GNi33 many of them are for webpack, transpile, compress etc. I think you wouldn't expect me to write my own webpack and transpilers not to have a ton of dependencies, right?
 
shouldn't those handle their dependencies themselves?
 
anyone?
 
but this isn't your fault, dependency hell is everywhere at this point
 
@GNi33 not entirely. like... I am having webpack, but the css-loader is my choice. I make use of those myself so I included them in the file.
@AwalGarg tell me more about the code review stuff you recommended, you meant I should submit this as a question on the code review SE site?
 
@MassDebates you're not initializing handlebars
 
1:50 PM
Awesome, thanks. I'll look that up.
 
@Victor Yes. But I suggest splitting the code into smaller amounts and asking for review in parts.
 
it's not so much actually, there are like 5k lines
 
@MassDebates use this -> handlebarsjs.com
 
I've been on that
 
official documentation, shows you everything that this blog post shows you too
 
1:51 PM
@Victor 5k is a lot for code review :) Even 500 is a lot!
 
Got it var source = $("#entry-template").html(); var template = Handlebars.compile(source);
 
@AwalGarg yeah, when it comes to review... it's much. if you have time some day, maybe you'll look at the things I currently have in /bin
 
@MassDebates yep, that should do the trick
 
CV Please It's a dupe
 
Already dun it lol
I see your ping, I'll get back to you after my sync
!!afk sync :(
 

« first day (2127 days earlier)      last day (2836 days later) »