« first day (2036 days earlier)      last day (3135 days later) » 

12:00
right. ofcourse this is only possible with JS. obviously.
Not sure if they're serious.
How are they going to deal with cosmic rays?
@AwalGarg api involves one function: getSunlight ()
@littlepootis jquery
Yes. jQuery's memory-corruption-detection plugin.
@littlepootis probably exists
12:13
0
Q: Getting single product out of categories

MathematicsI have JSON like this, ProductCategories {id, name, number of products, etc..} Products {id, url, etc...} Products are nested within Product Categories and I can get specific Category using this, var cat = $.grep(categories, function (e) { return e.ID == categoryId; })[0]); How can I ge...

So I got a brochure for some cloud hosting provider on my desk. I visit their website, it says "Please only use this website with IE11 or Edge. It will not work otherwise."
does anyone has a second to look into this ?
Even Azure isn't that messed up
If I write below code in NodeJS environment. What is the procedure to convert this require() syntax to browser code?
*js/scripts.js*

    require('./module1.js');
    require('./module2.js');
@overexchange there's none in ECMA. You need a 3rd party library.
12:20
NodeJS understands require() syntax. Do we have procedure to convert this syntax to browser specific syntax?
there's no browser-specific syntax
@overexchange browserify.org
Maybe that's something for you
you might want to use a AMD or CommonJS loader, or just bundle them for web using browserify or webpack
JS module loader - CommonJS, AMD, ES6_modules
JS module bundler - Browserify, webpack, requires, Esperanto & rollup(ES6)
12:23
see you know that already
I learnt that NodeJS has commonJS module as core functionality
I have index.html/module1.js/module2.js/scripts.js. scripts.js includes other two files(module1.js & module2.js). I want scripts.js having both module1 and module2 code that can run in browser.
@overexchange so use one of the things you've mentioned?
@littlepootis you might want to ... but it will get worse before it gets better
I just love how re-usable webpacks configs are
To use commonjs, How should I proceed? Because NodeJS has the commonJS functionality as core
12:29
var cat = $.grep(categories, function (e) { return e.ID == categoryId; })[0]);
what if I need a product which is nested in categories ?
it can be any category
@overexchange dunno use requirejs or something
@littlepootis there is browser specific syntax defined in Annex B of the es6 spec.
@seasonqwe 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.
I'm pokomon
12:41
@seasonqwe I'm digimon
let's get ridiculous!
for (var key in input) {
    if (x) {
        doSomething();
    } else if (y)
        doSomethingElse();
    else
        continue;
}
What's wrong there? -.-
Style aside...
@Cerbrus not sure else if works correctly with no-brace...
It does
But isn't else continue pointless?
12:51
then nothing obvious
@Cerbrus else continue is redundant
I don't know of any reason it wouldn't work
yes, it's useless, but it works
@BartekBanachewicz We have a winner :D
@Cerbrus pointless, yes, broken, no. style
12:52
I often write that kind of thing myself though
~style~
@Cerbrus you said style aside. I don't like this question -_-
I'm gonna remove that continue and wrap the else if in {}
@AwalGarg javascript at its finest
realTypeOf... Right
More like stubbornProgrammersTypeOf
12:55
@AwalGarg that looks wrong
the regexp case is simply wrong
it won't return correctly for class Foo {}
Nor for "/a/", which is a string.
@FlorianMargaine it would return "function" which is correct IMO
@FlorianMargaine what should it return?
12:56
but yeah the code itself is rubbish and looks like someone who doesn't know JS but wants to whine about it wrote it.
!!>/^\/.+\//.test("/some/path")
@Cerbrus true
So I bought Dark Souls III last night, and I can't even beat the first boss LOL
oops
Oh, this path is an regex!
@AwalGarg s/IMO//
13:05
@littlepootis well, if you special case new Date to return date, then class Foo {} should return foo
new Date is not analogous to class Foo {} at all
either you are acting stupid or just trolling :P
@AwalGarg how is new Date different from new Foo?
@FlorianMargaine it is not. but it is different from class Foo {}
oh sorry, you're playing stupid
go on, I'm out
you wrote "class Foo {} should return foo" ._.
13:13
what happens if you try to export a variable called default with import/export syntax?
@Loktar have you tried dark souls yet? This is the first game since Ratchet and Clank that I've died in the tutorial, and that's because I jumped off a building! But this... this is heart wrenching. I've died 6 times in the tutorial alone ._.
I'm in love, and I hate it.
@SterlingArcher Please don't turn into Taylor Swift. Please.
I don't get it
@corvid almost reads like a joke :)
@SterlingArcher that is dark souls
13:22
my reply should be, "I don't know, what?"
@doug65536 why? export const default = undefined, but then if you use require('./my_module'), the default member is usually under .default unless you use add-module-exports
no I meant, your question is just like a joke is. not it "is a joke" :)
nevemind D:
Oh I kinda get what you mean but I was honestly curious haha
@SterlingArcher "I'm in love, and I hate it."
oh hush maple leaf
@SterlingArcher lol yea I've played it
@FlorianMargaine @Loktar \o/
not #3 though
you know what day it is!
happy FRIDAY @rlemon and @FlorianMargaine
13:29
The graphics are insane man
ITS FRIDAY FRIDAY GOTTA GET DOWN ON FRIDAY!
oh shit
happy friday \o/
I've never played a game with such intense hitbox collision detection
LOL
13:29
lol
I suck
dude
yay weekend when I cant get any sleep!!! woohooo D:
[text](link)
13:30
Im in too bad of a mood for chat lol
wtf?
@Learning why are you inviting me to a room
oolala
;) ;)
Wow a room owner just got suspended from that indian android room and he didn't even say anything bad
I was about to get schooled by @Learning
13:34
@BenFortune I wrote that
@ndugger don't take credit for @Learning amazing work
@Loktar lol, I wrote it as a quick and dirty example of how canvas works for him. He's supposed to write his own using mine as a reference.
lol I'm just joking man
is it bad practice to use require within an if statement?
13:38
Literally in the condition or just a conditional require?
if (process.env.NODE_ENV === 'development') {
  const webpack = require('webpack');
  // ... stuff here
} else {
}
thats fine
It's fine, but since I write ES6, I have imports, which I just shove them all up at the top.
import foot from "./ass";
@ndugger The reason I don't want to do that is these are dev dependencies, so they wouldn't be installed in production, the client would be webpacked, not sure how that's supposed to be handled
13:41
-2
Q: How does require() work in browser?

overexchangeIn the below code, module_loaders/index.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Some page</title> </head> <body> <h1>My webpack page</h1> <script src="js/scripts.js"></script> </body> </html> module_loaders/js/module1....

@corvid You should have a dev build process, and a production build process. That's what we do, anyways
wow I just went through the edit que for a bit... so terrible
Ah I see, it's super easy to build the client but I am not sure what you're supposed to do with the server. Have two webpacks, then use module.exports = [ClientWebpack, ServerWebpack]?
@corvid you can have 2 different configs based on prod/dev
they just spit out 2 different build files
I have that for my client, webpack.config.dev.js and webpack.config.prod.js, and both those work fine
13:44
yeah I actually have a shared base config, then a release and dev which use the shared base one for common settings
I generally use this boilerplate but it doesn't include the express part (changed it for a regular web app)
I would like my solution.
hah yeah my webpack configs look very similar to those @corvid
@ndugger :yes using your code as a reference i came up with this fiddle but only animation is not working rest i am able to get 4 rectangles as i have 4 users in my database table:jsbin.com/ceyigeheto/edit?html,css,js,output
13:47
@Learning I'm looking at it now; you were missing jquery for one; now there's another issue
I don't even get the squares to render
yeah that boilerplate, once I figured out what they were doing, seem incredibly stable and easy to modify... too bad it doesn't include anything about a server :\
i have web service in my local
so you wont be able to see any output
@ton.yeung What do you mean? That's in development, no?
Well, then I'm not gonna bother debugging this.
yeah, what I am currently doing is using webpack-dev-middleware in development, and just sending the dist/ file in production, is this what people do?
13:51
@Learning give me a moment; you fucked up the code real bad
I feel like there is some inconsistency because server files aren't handled by webpack, they're just handled by babel-register, is that a problem?
@ndugger:if you want i can publish my web servicce for you and give you url
@ndugger:if you want detail i have added details here
3
Q: Update html canvas tag on every ajax request with new data

LearningI want to update my canvas on every ajax request if new user is found or there is new connection of existing users. I have users and connections between them: var data=[ { "Id": 38, "Connections":[39,40], "Name":"ABc" }, ...

No thanks; just gimme a minute
13:55
so assuming I have a path object in node
how do I get that path + ../..
Is it safe to assume relative pathing?
stop posting the same question
I want my solution.
@ton.yeung this is what I am doing, not sure if it appears to be right
13:57
@SterlingArcher it's not safe to assume anything
@SterlingArcher damn it I wanted to downvote it and you stole the link
Scroll up
@Waxi are you overexchange?
And don't downvote unless you feel it's a bad question, not because he spammed it
@SterlingArcher lol back then it was -2
@SterlingArcher it's obviously awful
@rlemon lol There can only be one.
13:58
Just making sure you're not being a dick <3
Cause it's still in an experimental branch where I was trying something, but that's a good catch cause I need to remove it
ST update, yay. Improved syntax highlighting is nice.

« first day (2036 days earlier)      last day (3135 days later) »