« first day (2227 days earlier)      last day (2720 days later) » 
01:00 - 21:0021:00 - 00:00

1:31 AM
Hey guys
 
hey guy
 
How is u
 
u is fine
 
hi
@littlepootis yu no bed?
 
Great :-)
 
1:33 AM
@bitten I woke up hours ago
 
it's early
 
For me, 2am is early.
 
7am isn't so bad, i guess
 
11am is earley
:DD
 
2am is late
i did some very late spring cleaning today and i'm only just finishing up
 
1:36 AM
heh
that's.. nice, Aaron
 
spring cleaning in November, this is the time of hoarding
hoarding warm things
 
@lix i just don't spring clean but i guess what i'm doing is spring cleaning
@littlepootis :3
well good night
 
good night :-)
 
good night
 
2:18 AM
@SterlingArcher Lol I guess I'm still a florida boy
 
 
1 hour later…
3:40 AM
@bitten You probably need to enable keepalives. search ServerAliveInterval. Mine is 60, works great
without that the server disconnects you. the keepalive prevents the server from dropping you for being silent too long
Ive had connections for weeks straight
 
 
6 hours later…
9:44 AM
Performance comparison of AngularJs 1.x and AngularJs 2 through contacts manger application

Angular 2 Angular 1
a.App size (html+JS) 342.8KB 77.9KB
b.Heap size 27.8MB 18.6MB
c.Total Loading Time 2530ms 3470ms
d.Page visible at 1250ms 3500ms
e.DOM nodes 24K - 72K 25K - 49K
f.Scripting time / 51.9%(1315ms) 76.6%(2661ms)
Total time - (%)
g.Rendering time / 26.5%(672ms) 9.5%(331ms)
if interested you can check the details here, medium.com/@hearsid/…
 
10:38 AM
Why does this sound like spam?
 
@li
@littlepootis Not a spam sir, if anyone reads my article I won't get any money or anything, I just want opinion of some smart people in the js community on some good content I wrote.
 
11:00 AM
Hello every one... i am using reactjs language to develope a web app. And use ES6 to deploye it. Now u want a dara grid with full feature like groupby,editing,delete confirm ,add and.. but unfortunatly i didnt find any component in react... i decide to use dxdatagrid devextreme in react it is ok but when i want to use it in ES6 syntax i cant use dxgrid.... can any one help me... tnk you
 
@leman17 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.
 
Thank you @CapricaSix ... and this is my question with jsfiddle example stackoverflow.com/questions/40631191/devextreame-use-in-reactjs
 
@doug65536 thanks ^^
i'll try it next week
 
11:51 AM
@littlepootis you around
nevermind have a good day
 
12:15 PM
I feel like we have JavaScript anti-fatigue, things are moving too slow.
 
hi
im getting this error on my console and not sure what it is 12:18:16.064 TypeError: prev is undefined
.success()chartBuilder.js:71
b.Callbacks/c()jquery-1.9.1.min.js:3
b.Callbacks/p.fireWith()jquery-1.9.1.min.js:3
k()jquery-1.9.1.min.js:5
.send/r()jquery-1.9.1.min.js:5
1chartBuilder.js:71:9
 
Hi @user3504751
 
@BenjaminGruenbaum hi there
the line on chartbuilder says this just so you have more info on this
prev.find('.sparkLineStats').sparkline(currSubGraphData, {
 
Right, prev is undefined. The error literally says this.
 
yes
 
12:22 PM
That's what the error is.
 
if($.browser.msie  && parseInt($.browser.version, 10) === 8) {

								prev.find('.sparkLineStats').sparkline(currSubGraphData, {
									width: 80,//Width of the chart - Defaults to 'auto' - May be any valid css width - 1.5em, 20px, etc (using a number without a unit specifier won't do what you want) - This option does nothing for bar and tristate chars (see barWidth)
									height: 40,//Height of the chart - Defaults to 'auto' (line height of the containing tag)
									lineColor: '#ffffff',//Used by line and discrete charts to specify the colour of the line drawn as a CSS values string
 
oh god, that's terrible, still doesn't solve the issue, you're still not showing me where you define prev.
 
ah sorry Benjamin one sec
here it is as a var
$.ajax({
	'url' : config.csvPath,
	'method' : 'get',
	'success' : function(response){

		var chartData = Papa.parse(response);

		var sectionId = 1;

		var prev;
		var builderCache = [[],[],[]];

		for(var i in chartData.data){

			var currData = chartData.data[i];

			if(currData && currData[0] != ""){

				if(currData[0].indexOf(':') !== -1){
					sectionId = currData[0].split(':')[1];
				}
				else if(currData[0] == '->'){

					var currSubGraphData = [];

					if(sectionId == 2){

						for(var j = 1; j < currData.length; j++){
 
urgh, audioElement.duration is just the duration described by the file. audioElement.currentTime only goes up to the effective duration, before the browser stops playing any sound, and then jumps to audioElement.duration... is there any way of finding out the effective duration without playing the audio/hacking around?
for example, in my audio file, there's a pause at the end, and I have a bar that displays the progress of the file
the bar goes .1, .2, .3, .4, .5, .6, .7 and then suddenly 1
because the last 30% is not strong enough for it to be played by the browser, so it just ignores it I guess?
the bar is literally getting audio.currentTime / audio.duration
by using my own time functions (like a game loop), it's fixable, in that the bar will go for the full duration, and include the .8 and .9
but that loop can have a few issues, and if there's a way to find out the effective duration instead it would be better UI-wise anyway, as the user only actually cares about the time span in which the audio is played
well, that's in chrome at least
android's chrome still works fine
and so does firefox
 
1:12 PM
hi
 
0
Q: How can I secure my Endpoints API without user login

Charles HennesseyI'm developing an android app and I want to restrict access to my API to my website and mobile application. I'm not interested in having the user login into my app, rather, registering the client. I've refrenced these resources for this task: how to make google endpoints inaccessible from the...

There is no way, is there?
 
1:29 PM
Use your mother's maiden name as "secret key".
 
user6820627
stackoverflow.com/questions/40704017/… if you want to solve this for fun.
 
user6820627
stackoverflow.com/questions/40704475/… do you think the OP doesn't know anything about JS or OP knows but OP didn't share JS code?
 
@littlepootis well I am trying to write a decentish solution
 
hi, is it possible to find a json object key based on a pattern? for example, if i have json object as {"key1": "value1", "key2", "value2", "patr1": "value3", "patr2", "value4"} i want to get all values which has keys with "patr". is it possible??
 
@WaseemAkram 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.
 
1:44 PM
Cool @CapricaSix
 
hi guys
I have this function, that is supposed to check if a module is an npm installed package or not
function isNpmModule(moduleName: string): boolean {
    try {
        require.resolve(moduleName);
        return true;
    } catch(e) {
        return false;
    }
}
when I build my project with webpack
I get the following message
WARNING in ./src/DependencyGraph/isNpmModule.js
Critical dependencies:
12:8-35 the request of a dependency is an expression
 @ ./src/DependencyGraph/isNpmModule.js 12:8-35
is this something I should worry about?
 
Just watched dr. strangelove, so many things make sense now
 
2:05 PM
Hey guys, I've got some experience with javascript, but I'm new to requirejs
 
@Psioniax 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 am trying to build an app using typescript, which isn't hard, but eventually, after compiling all the .ts files in a big main.js file, I include it in a webpage
And I get a Mismatched anonymous define() module error in the console, but the code which should get executed, well, still gets executed
 
@Psioniax Why requirejs with TypeScript?
 
Because types are required
 
Because I am trying to divide the project in classes, which get imported in a main.ts file
 
2:09 PM
TypeScript supports import
out of the box!
 
Yeah, that's what I do, but then when I compile the Typescript files to Javascript
I get that error
 
Share the Error :D
 
3 mins ago, by Psioniax
And I get a Mismatched anonymous define() module error in the console, but the code which should get executed, well, still gets executed
 
I can share the source if you need it, it's not even one hour of work
 
2:19 PM
@Psioniax that seems like an error coming from RequireJS
not typescript
 
Yes, I know it is
 
that might have to do with some module you are using
 
It's just 3 modules I defined myself
 
how did you define them?
 
By using typescript - export class User { ... }
Which, after complied, gives me
define("user", ["require", "exports", "message"], function (require, exports, message_1) { ... });
Where message is defined above, using the same technique, but without any other dependecies
 
2:28 PM
github.com/awalGarg/curl-tap-sh/pull/2 fucking hilarious. typical bashist cc @FlorianMargaine @Zirak
 
@AwalGarg Look at that magnificent beard. He clearly knows what he's doing.
 
@MadaraUchiha Yup. I am so tempted to accept the PR, even :D
 
@Abhishrek I just swapped the script tags in my document, such as js-cookie gets loaded first and then requirejs and now everything works fine
 
3:04 PM
@rlemon - whenever you're around, know where I can get perforated sheet metal like this in canada? metalsupermarkets.com/wp-content/uploads/2016/06/… like a single sheet?
 
 
1 hour later…
4:18 PM
@AwalGarg neat
 
4:33 PM
Hey guys
Does anyone have any information on how I separate users in socket.io? like so I can give them an ID and know who from who?
I'm presuming I'd need to use Socket#id:String when a connection occurs and push a client object into an array, though I'm not sure
 
4:49 PM
Hello!
I'm having some unexpected issues
apparently an object's attribute goes read-only for no discernible reason, when changing one of its characters (it's a string)
 
@AwalGarg s/0/EXIT/
and I don't get what's funny? it's a typical use case of bash traps
 
guys, quick node.js question, is it better to open database connection and store all routes inside or open database connections inside routes?
express.js to be more precise
 
as most things: it depends
how often do you make the connections? How much data? Is it sensitive? How many hops away is the database?
 
42 hops
 
5:06 PM
what's the ping? Bandwidth...?
all things you need to consider :P
but if it's a personal project or eventually it'll go in the hands of someone who knows what he's doing, just do what's simplest for you :)
unless the point was to learn how to best do it
 
well i am rewriting current website that has 5k daily users
 
and what kind of information does it contain?
 
it is using wordpress atm ,and i am rewriting it to use mongodb and express.js
So it has that cms part
it loads pages and contents from database
it also has that lander page which has search
 
yes, that's what databases do :/
 
this search sends alot of GET requests via AJAX to this express.js backend
 
5:10 PM
but does that connection also provide for passwords or private files?
 
no
 
why move away from wordpress?
 
because CMS is external
Because we need to use our custom stuff here
its real mess
 
do the database entries change very often?
 
5:11 PM
so we just created some simple CMS for creating objects
 
It's just 5k users, towc.
Not 5m.
 
Well I don t know
I also wonder
when I create new page in database, i need to restart my node.js application to be able to see it
 
@littlepootis that's still a fair amount to deal with in court
 
i mean the url route from the object
 
in what, m8?
 
5:12 PM
So I have these objects that have URL attribute which can be read like app.get(/:route)
 
Oh, European laws.
 
if info that your ToU said would protect would get leaked, imagine all of the lawsuits
 
but i need to restart app in order for express to see newly added objects
 
don't you have courts in India?
just called differently?
 
to read their routes to be more precise
 
5:13 PM
suing is uncommon
 
@littlepootis just because you haven't done it or you haven't heard about them from companies you've worked in, it doesn't mean there aren't any :)
if a company has a legal department with more than 1 person in it, it's because they need it
well, that's my view at least
and as a l33t h4xx0r, they're the ones you need to listen to first, and sometimes even explain things to :)
 
is there a way to destructure an object and kinda strip the keys?
turning {x:0, y:2, z:0} into 0,2,0 for example
 
@Kunok it's ok to store the data in your local server box. Remember that nodejs has a limit of storage, so either make nodejs store more, or be mindful of how much you store
@bitten var x = [x.x, x.y, x.z]?
dammit... remove the var
it's not destructuring, but there's barely a reason you need it
 
@towc "Cannot read property 'x' of undefined"
;_:
 
or build a function that uses for...in
 
5:18 PM
it's just i have this rotation object, of the above
and the function needs .set(x,y,z)
 
Object.values(o)
 
so maybe i can
const {x,y,z} = object; other.set(x,y,z) ?
@littlepootis oo
 
function toArr( x ){
	var ar = [];
	for( s in x )
		ar.push( x[s] );
	x = ar;
}
var obj = {x: 0, y: 2, z:0};
toArr( obj );
or yeah actually
Object.values makes sense -_-
 
...Object.values(o) works great
 
5:22 PM
@bitten I'd rather read .set( o.x, o.y, o.z )
 
it might not read too well
 
don't be the lazy guy
 
so const { x, y, z } = newPosition; this.position.set(x, y, z); over this.position.set(...Object.values(newPosition));
@towc heh i'd rather have easier to read code
 
how about this.position.set( newPosition.x, newPosition.y, newPosition.z )
@bitten exactly
or if it's that much of a problem, make this.position.setObj have a single object argument
 
@towc yeah i could do that too. it's just this happens a few times and i think it started to look less readable
this.position.set(newPosition.x, newPosition.y, newPosition.z);
this.rotation.set(newRotation.x, newRotation.y, newRotation.z);
so many dupes
 
5:26 PM
this.position.setObj( newPosition ):
this.rotation.setObj( newRotation );
 
but i can live with any of them really
@towc then i have to extend the position and rotation objects
i'm using three
 
or, if newPosition and newRotation are just new.position and new.rotation:
this.position.setObj( newObj );
this.position.setObj( newObj );
 
@towc three doesn't let you do that, they are read only
 
or if you wanna be real clever
POSITION = 0b1;
ROTATION = 0b10
this.setObj( newObj, POSITION | ROTATION );
@bitten make your own middle function :P
 
@towc i've never looked into threejs middleware :P
 
5:30 PM
it's really not that hard...
WhateverConstructor.prototype.position.setObj = function( o ){
	this.position.set( o.x, o.y, o.z );
}
or just a global function:
setPositionObj( a, b ){
	a.position.set( b.x, b.y, b.z );
}
 
i've installed three through npm though
 
or ya know, in a utility object
 
@towc that's a nicer idea
 
@bitten that doesn't change things, you can still provide your own scripts :)
The prototype declaration can be anywhere in the code as long as it's before your first use
 
i didn't realise that there would be so many solutions >.>
 
5:33 PM
javascriptland: where everything is the same in the end, and most things aren't themselves
that sounded funnier in my head
 
ok ... what the fuck: sudo npm -g i npm
 
whatcha working on either way?
 
@towc lol
 
why npm cant update itself unless I use npm to install npm?
 
@towc a little game for my friends and i's christmas dinner
to find out who your 'match' is
 
5:36 PM
keep us updated ;)
 
i did it last year and now it's tradition
will do!
i'm only going to spend a few evenings on it but i'll let you know how it goes
i'll probably have some questions too :3
i can't get react and threejs to play too nicely together though, i can't figure it out
 
sure
 
i can make it work but meh
 
@tereško don't sudo
 
for a christmas family thing it sounds like a lot of work :P
3d things? react?
 
5:38 PM
@towc friends*
 
@littlepootis how else will I update global packages?
 
yeah, it's a nice excuse to experiment a bit
 
oh, k, you need to show off :P
 
@towc haha! sadly no one knows what react is and even less care about threejs
so no points for me there
 
@tereško npm config set prefix '~/.npm-packages'
export PATH="$PATH:$HOME/.npm-packages/bin"
 
5:39 PM
why?
 
@bitten D: what's the point of life?
 
Because you'll need to run them as sudo otherwise.
 
@towc there is none ;_:
 
And if you sudo npm, package post-install scripts will be run as sudo.
And that's bad.
 
@littlepootis because they are global packages used by other users ... like cron
is npm untrusted?
 
5:41 PM
In that case, I'd create a location writeable by ALL. (or.. readable).
@tereško Well, considering how easy it is to publish, update, break stuff, I wouldn't trust it.
 
well .. shit, it is untrusted, since it can execute commands when installing
 
@towc one thing i want to do, and have never done before, is have the level 'infinite'. it's like a side scroller get as far as you can so i want it to keep generating the level as you go
 
why is javascript ecosystem so ungodly fucked?
 
before i google and research, do you have anything that i can study?
@tereško because javascript developers made it
tehee
 
5:44 PM
I want to publish a package to npm that has a post-install script that does rm -rf /* and watch the world burn.
 
@bitten my method was looking at a few examples without bothering with the code, while thinking at edge cases that you may encounter with coding your later, and seeing how they handle it. Once you got mostly all edge cases you could think of in your head, it means you should already have a good enough system in place that you could use. Then just code that yourself
ideally you shouldn't encounter any problems, although it won't be a perfect prototype. But it's fair to say that it's pointless to try to be perfect the first time around
 
@towc yeah, the edge cases i thought of was, as you have to survive for 20 seconds then collect something, that the thing you have to collect could be behind a tree/fence/object in your way
so i was going to spawn this collectable first, and then spawn all the others, and if they are within x units distance of the collectable, then just move it away a bit?
 
yeah, sure
 
so it's pretty simple
 
but I doubt that's the only edge case you'd encounter
 
5:47 PM
@littlepootis you should just get a commit-bit on lwip project
 
if you feel comfortable already, go ahead and try to code it
 
too many objects making the path impossible?
 
@bitten if you're doing the research well, you'd have hundreds of points in your head
 
@towc yeah, but my first approach is always so naive. like i was just going to generate the chunks on every 250th tick
and spawn enough items to fill the time until the next 250th tick or something
 
try it and see how you could improve it
or write it on paper first
I mean, a game is like any other program. The only thing that changes is the general objective you're trying to achieve
in your case, is making something that the users can enjoy
if you want to add a moral to it, that too
 
5:50 PM
@towc yeah i have the story and all that down okay
@towc i try and write down a lot already, i have the above problem on paper anyway
 
6:03 PM
@FlorianMargaine That's the funny part - it is a typical thing to do in bash, but hardly improves code structure, hence "typical bashist". And btw, 0 works the same :)
 
@littlepootis I shouldn't tell you this but you are missing a flag
 
--no-preserve-root? :)
 
ya, lol
 
@littlepootis check hangouts
 
@doug65536 Wait, /* doesn't require a flag.
I successfully broke a vm.
By just sudo npm i -g pkgname
 
6:18 PM
@littlepootis yeah? that's pretty stupid. I thought rm was less dumb
I suppose the shell globs it into a bunch of explicit files and directories ._.
 
Even running this as normal user would be bad..
 
@littlepootis that's brutal
 
6:42 PM
@AwalGarg sure, 0 works the same, but EXIT is much more readable
I wonder, how fast is open()?
 
@FlorianMargaine, @dystroy (what does he go as now?) I'll be skiing in Val Thorens right smack in the beginning of January, and flying back from Lyon airport at the 8th. Is that anywhere close to any of you?
Also, @ThiefMaster, I'm 99% sure I'll be spending the 30th of December in Geneva, same question
 
Hi all
I've just read through the Node LTS documentation
It states that LTS supports for Node versions < 4 will be dropped soon
I was wondering how the many NPM-modules will go about this?
Eg. there's native support for Promises in v4
 
node 4 should still be supported for a little over 1 year: github.com/nodejs/LTS
 
Also we haven't had a hangout in ages (@rlemon)
 
Does this mean NPM-modules will all update their codebase to use Promises with the possibility that dependants can not update?
@Luggage you're right. But what about packages that support versions below Node v4?
 
6:50 PM
There is nothing enforcing people to update their packages. Also, some people use 3rd party Promise implementations anyway, even if node supports it.
 
Does that mean the whole Node / NPM world has to run on / require Node v4 from December on?
 
many packages will 'just work' on all node versions.
 
@Voles Nobody has to do anything, you can specify in your package.json exactly what you do and don't support.
 
npm is the wild west.
 
LTS means support on part of the node foundation and node contributors, which includes things like security fixes
 
6:51 PM
@FlorianMargaine Ah, you were talking about readability. Sure.
 
@Luggage you're right, but with Node ending LTS-support for versions below 4 (so eg. without Promise support) won't there be a massive amount of packages finally using Promises?
 
There already are
Read more carefully what LTS means: github.com/nodejs/LTS#lts-plan
It's not imposing anything on the node ecosystem, merely on node itself
 
Only if you can get ALL those developers to update thier code. Good luck. Fortunately, that doesn't matter.
any compliant promise implementation will be compatible with the others.
 
@Zirak you're right, it's maintenance mode that will end next month for Node versions smaller than 4
 
In other words.. just don't worry about that. You'll likely run unto SOME package one day that has some compatibility problems the the popular ones tend to be fine.
 
6:54 PM
That means they'll stop updating the relevant branches altogether
 
@Zirak @DenysSéguret lives in Lyon
 
So it's safe to update packages and let them use Promises even if eg. v0.10 doesn't support them anymore?
 
That depends on the package.
 
@DenysSéguret Cool! I'll be in the airport at the 8th of January, is it in any way close to you?
 
What would be the criteria not to update?
 
6:55 PM
if it breaks when you try
 
@Voles Yes, unless you're running on v0.10
 
Especially now that the Node foundation stops mainenance
 
ok, i think we've answered this to death.
 
And if you're running on v0.10 you have other problems
Just ask @rlemon
 
@Luggage I'm talking about packages where other packages depend on
So I have no control over if it breaks / doesn't ...
 
6:56 PM
Yea, i know, and the answer is still "depend on the package"
 
That's what semver is for, though. That and the engine field in package.json
 
Ok, thanks. I was looking for some feedback about this from the community
 
which is not always used..
 
@Voles NodeJS doesn't officially support 0.10 anymore.
So I don't feel bad about not supporting it myself.
 
@MadaraUchiha ok, that's clear
 
6:57 PM
People who need support can use tools like shrinkwrap to keep themselves safe against breaking updates.
 
hah, shrinkwrap has it's own problems, but yes.. in theory.
 
Note that current NodeJS is actually iojs renamed, and iojs didn't support 0.12 or previous versions after iojs v2 was released IIRC.
 
ermergerd Geneva airport is so close to CERN google.com/maps/dir/…
Maybe I'll come, say hi, and leave abashedly
 
@Zirak How do you think they have the space to research time travel?
The use the airport's hangars.
 
They fly a lot?
 
7:20 PM
@Zirak soooo many problems
@Zirak no we have not, scheduling is a bitch with timezones
 
Hi, I need a little info.. do you know of any library to asynchronously load a resource. i've googled and found lots, but what I want is for the library to support making n simultaneous requests to a resource and have only one request made.
To explain:

library.get('dummy.gif', function (img) { /* something here */ });
library.get('dummy.gif', function (img) { /* something here, but this should not let the browser trigger a new requet for dummy.gif if the previous line hasn't finished yet */ });
😰
anyone?
hello?
i know i may be spamming, but it's 1 am here and i need to know if there's a library that does this
:(
 
 
1 hour later…
8:45 PM
@Prasanth why can't you just make the abstraction yourself?
actually, all you need are promises
 
Hi, I'm new to Javascript. I got an unsorted list which items are changing constantly and I have set up an onclick listener which fires when the user is clicking at the unsorted list. Is there an easy way to get the index of the clicked listitem without setting up an clicklistener for all elements in the list?
 
01:00 - 21:0021:00 - 00:00

« first day (2227 days earlier)      last day (2720 days later) »