« first day (1719 days earlier)      last day (3235 days later) » 

9:00 AM
What are some lighter weight alternatives to socket.io for publishing messages to multiple connected users?
 
@Neil or args = args.concat([channel, user, message]); ?
splitting into three lines is a bit cleaner for me, then each line has it's own clear step
 
@AaronHarding also, though maybe push would be better in this case
 
Is there anyway to force javascript to copy an array without making a reference and loop!? I am analysing image data and using loop to copy cause performance issues
sorry for bad english
 
@Manzik Anything that performs the copy is going to have these sorts of performance issues
 
9:03 AM
!!> var arr1 = [1, 2, 3]; var arr2 = arr1.slice(); arr1.push(4); console.log(arr1, arr2);
 
@MadaraUchiha "undefined" Logged: [1,2,3,4],[1,2,3]
 
@Manzik You could call .slice() but it wouldn't be faster
 
slice loops internally, so...
 
might be optimized, but still
 
9:04 AM
OK, thanks guys I will try these
 
ideally you wouldn't need to copy the entire image contents in the first place
 
JSON.parse(JSON.stringify(obj))
 
I am comparing two image datas
To see the differences between them
 
@Manzik You can do that without making a copy of them
 
@Manzik sounds expensive. Make sure to do that in a Web Worker
 
9:05 AM
Hi got a bit of a complex question, I've been developing a form solution for my place of work. All is going well with it, I've been using ckeditor to create the form and then parse it out to get fields, names of fields etc. They can then have some validation on them etc.

I've run into a bit of a wall though because now I need to incorporate diagrams and charts.
I already have some code to handle diagrams and can use google charts to handle them. But how should I do this with my ckeditor. I initially thought with the map to build on this plugin http://ckeditor.com/addon/wenzgmap (or another
 
compare current frame and last frame
 
@MadaraUchiha XD
 
@JanDvorak what about nodejs/iojs apps
 
@MadaraUchiha Does it make a difference?
 
Unless you're Barney you can't pull it off ;P
 
9:06 AM
@Manzik It won't freeze the tab.
 
@DrogoNevets thank you so much, man!
 
@RichardHousham I doubt anyone in this room uses ckeditor
 
@MadaraUchiha Yeah, you'r right but I don't need the page to be responsible, I need faster proccessing
@MadaraUchiha Can I split works between CPU cores with webworkers?
 
@Manzik Yes, Web Workers are threads
 
@MadaraUchiha oh well, it's more the thought that I'm trying to get down.
Rabbit hole 1 or 2.
 
9:08 AM
It's WYSIWYG editor?
 
@uselesschien Yes
 
@Neil How?
 
@Manzik Well I don't see why you would need to
you call getImageData, right?
You can call getImageData of a second frame, and then compare the data directly
 
Hello
 
9:15 AM
If you want to use webworkers, you pass both instances.. you don't need to perform a copy
 
@chozilla 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.
 
wow not even saying hello is ok?
 
@chozilla lol
!!tell chozilla bot
 
@chozilla Everyone in the room is giving you the cold shoulder
 
@chozilla I'm actually a bot, so don't reply to me.
 
9:20 AM
So question, did anyone here ever had to align a div as a tooltip and remembers all the little things you have to check for if you want them to automatically be aligned depending on the edge of the screen and width of content of the tooltip and things like that? Is is basically a AABB check for 3 elements or is it more complicated than that?
 
@Neil It's frames of webcam and I do it with requestanimationframe and I must save the current frame array to previous frame array each time the requestanimationframe function calls
 
@chozilla You mean you want the tooltip to go to the left if the element is too close to the right edge of the page, etc?
 
@MadaraUchiha correct. also up and down and respect the screen edges.
 
@GNi33 pleasure! we have a monthly budget for random charity that we find as we go through the month, and last months was left over, so you win!
 
9:22 AM
I was wondering why this code failed to run as expected. Me.Stupid. i.imgur.com/1l39GVf.png
 
although we give too much to charity IMO
 
@uselesschien Don't use $__REQUEST
Use $__GET or $__POST
 
this suddenly became the php channel?
 
@chozilla +1
@MadaraUchiha also isnt it $_REQUEST not $__REQUEST
 
9:24 AM
@DrogoNevets Right, I haven't PHPed in a very long time
 
@Manzik Hmm, have you considered using two canvases?
 
:o
 
@Neoares lol even that is a strange suggestion in a JS channel ;)
 
@chozilla Which?
 
Rather than save the frame to an array, just alternate canvases.. no copying
 
9:25 AM
@Neil No
@Neil Haven't tried it
 
@chozilla Sounds like you just want to make sure that the bounding box of the tooltip is inside the bounding box of the viewport
 
give it a shot.. I think it will save you a lot of time
 
@MadaraUchiha yes but also flip the alignment if i can so it goes to the left edge or the right of the element it depends to.
 
Anyone fancy giving some code a quick look over? (~50 lines)
 
@BenFortune shoot ahead (also maybe describe what you want to do with the code)
 
@Neil OK, thanx, I'll give it a try
 
Anyone fancy giving some code a quick look over? (~5.8k lines)
 
m59
@uselesschien link?
 
m59
o mai
 
9:30 AM
I wrote that for fun
 
m59
I don't really have time to look it over much, I was mainly just curious if you really had 5k lines in one file.
How do you keep your brain properly enclosed in your skull?
 
@m59 I have no idea.
 
m59
I had to have surgery just clicking the link.
;D
 
@uselesschien What's the advantage over jQuery? Since it seems to do the same thing
 
@BenFortune Faster.
JSPerf's down, I had benchmarks
 
9:33 AM
@MadaraUchiha yes indeed. awesome.
 
@AwalGarg oh, thanks a lot
 
Does it support new APIs? (Fetch, Promises)
 
@uselesschien There's a typo on line 5129. You miswrote "lowercase" as "lowecase"
 
9:34 AM
@uselesschien deprecate HILO and write something new. libs are old now :D
 
@BenFortune Haven't changed it much since mid-2013.
@AwalGarg I'm on it. HiloJS 2.
 
m59
@uselesschien libs are bad. modules = win
 
@m59 HiloJS 2 is modular.
 
m59
Is it?
 
Yep.
 
m59
9:36 AM
I just see 5k lines lol.
 
That's an abandoned project.
 
You realized you spelled "lowecase" wrong and threw away the whole thing?
 
@ivarni lol, lo. The typo was in the comment. So, it doesn't really matter.
 
@uselesschien name it something else. PHPv2 or something.
 
Oh, wait, it has a website. erikroyall.github.io/hilo
@AwalGarg eek
 
9:42 AM
@uselesschien congrats on creating a next-gen library. I can finally switch from MooTools ;)
 
!!orly
 
people use mootools lol
 
I do, it works great with Angular
 
m59
@uselesschien unless I'm not clever enough, that isn't modular
 
9:43 AM
@chozilla yeah I am just being snarky to eric :P
 
@m59 The code in the gist isn't.
 
Jsfiddle uses mootools.
 
m59
looking at the repo itself
How could I include some functions without the entire library?
 
@chozilla doesn't angular do everything mootools does for you though?
 
you can't
 
9:45 AM
@DrogoNevets Angular has a rotten-(jquery)-core that i dont want to use.
 
m59
var hide = require('hilo/fx/hide')
 
@DrogoNevets also: classes.
 
@chozilla You mean JQLite? jquery is optional in angular
 
@ivarni yea i mean JQLite, which i would swich out for mootools any day of the week.
 
@m59 i think he meant his version 2 would be modular, not this one.
 
9:46 AM
@m59 2 years ago, not even jQuery was modular
 
m59
is jQuery modular now?
 
not really. but you can do a custom build.
 
It supports AMD now.
 
Hey guys does dropzone.js submit file with out ajax??
http://stackoverflow.com/questions/23716048/non-ajax-post-using-dropzone-js
 
9:48 AM
Anyway I am quite happy what I can do with AngularJS and MooTools. s1.darkaura.de
 
I am liking C this time. I should tell the lounge, I think.
 
Awal's leaving us!
!!s/C/PHP/
 
@uselesschien That didn't make much sense. Use the !!/help command to learn more.
@uselesschien I am liking PHP this time. I should tell the lounge, I think. (source)
 
Indeed. After I make something usable with C, I'll laugh at you people.
 
Writer a faster PHP-NG parser.
hahahahahahaha
 
9:53 AM
How do I start getting real world NodeJS experience? Do I join an open source project?
 
You guys don't seem to like PHP... even when it suffers the same problems JS does.
 
@chozilla ng-class and it has jqLite, the first thing I learnt about angular was "Stop using jQuery as a crutch"
 
6 hours ago, by Awal Garg
The PHP community is way more mature than you kids. They accept happily that their language is shitty and continue doing awesome things with it.
 
I need a cool project name for a under the radar project, any ideas?
 
9:58 AM
writing a canvas library sucks btw.
 
@uselesschien projectcodename.com/# found this
i settled for obsidian!
 
@uselesschien true story
 
@DrogoNevets It's not generating cool names :/ And half of them start with Ruby
 
@uselesschien none of mine started with ruby
 
10:04 AM
@AwalGarg Don't let your girlfriend know
@DrogoNevets oh
 
@uselesschien PHP is my girlfriend.
2
 
@AwalGarg What amazing things have you yet to see with PHP?
 
@MadaraUchiha variable variables
 
@FlorianMargaine I don't consider that amazing, I consider that confusing
 
10:13 AM
@MadaraUchiha you're just not smart enough
 
Anything you do with variable variables in PHP should be an array or an associative array.
 
It's not confusing. It's just way to easy to have any code using them be confusing
 
I agree.
 
@JanDvorak Please find a single instance where the statement I made above is wrong.
53 secs ago, by Madara Uchiha
Anything you do with variable variables in PHP should be an array or an associative array.
 
I have another question, I want to draw some random triangle that their colors is from webcam image. I made it using canvas: manzik.co/tmp/Triangle%20Cam%20(ACTIVE) but I want it to be faster. I tried ivank library that draws using webgl but it was slower! Any ideas?
 
10:15 AM
@MadaraUchiha I agree with that stament
 
@JanDvorak Great, so variable variables are not "amazing" in any way, since there's always a better way of achieving the same effect.
 
@MadaraUchiha one case would be when you normally operate these variables independently but sometimes you want a bulk operation to modify all of them in some way
 
@JanDvorak Where does an associative array fall short?
 
@MadaraUchiha verbosity
 
$arr["single"] = someOperation($arr["single"]); // single
array_map($arr, someOperation); // bulk
 
10:17 AM
$arr[""] is overhead
 
how many CPUs do FF developer edition use?
 
How the hell is that more verbose than ${"arr" . $something}?
 
it's more verbose than $$something
 
Anyone?
 
I have a JQuery event ` $('something').bind('change', function() { xyz happens here}`. How can I call the same event on a blur ?
 
10:19 AM
forEach(array("foo", "bar", "quux") as $var) { $$k = ...}
 
how about $thing->$someproperty = $thing;
 
@PreetiMaurya make a javascript function
yeah, crazy
 
@JanDvorak That is horrible -_-
 
@PreetiMaurya you can bind two events at once
use on, though
@MadaraUchiha is it?
 
How ? any example ?
 
10:20 AM
forEach($arr as $key => $value) { ... }
 
!!tell preeti jquery on
 
@JanDvorak A lot more than that ^ for sure.
 
$('something').on('change blur', function() {})
 
@FlorianMargaine what if two different actions trigger the same ? Like a blur on input or change in select box?
 
10:21 AM
@PreetiMaurya define a function
 
Thanks @JanDvorak
 
why are we doing php
 
Because some people have no tact with public display of affection.
 
@afonsomatos inertia
 
@afonsomatos because it's still better than doing Perl
 
10:25 AM
or ASP
 
oh god ASP is awful
my dad used to code in ASP
 
Let's say I assign a onclick like this:
 
@bodycountPP 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.
 
$('#tableGrid').find('tr').eq(i).find('td').eq(j).attr('onclick', 'AssignImage(this)');
How do I access the sender's id here? function AssignImage(e) {
alert(e);
}
 
> $('#tableGrid').find('tr').eq(i).find('td').eq(j).attr('onclick', 'AssignImage(this)');?
 
10:27 AM
ew
 
^ hahahahahahaha
 
@Neoares haha so true
 
10:29 AM
@MadaraUchiha I.. don't understand? How will I know what I haven't seen yet?
 
@uselesschien auch
comball breaker
 
@MadaraUchiha (@FlorianMargaine) I use variable variables when meta programming. I am glad they exist. I don't use PHP for web backend anymore, though. More like glue/shell scripts/automata/etc.
 
"The original Symbol of Canada was originally going to be a wheel of cheese but was voted out due to most Canadians being lactose intolerant."
 
@AwalGarg I use node for those.
 
10:34 AM
is that a joke?
I don't get canadian jokes
 
@MadaraUchiha Indeed. Ruby people use Ruby. Quite fascinating, but Python people use... Python!
 
@Neoares Finally got my Canadian history exam results back.. I got an EH
 
but what's the matter with canadian people?
 
10:44 AM
@MadaraUchiha Where did you get that photograph of me?!
 
"When I try an example from Stackoverflow"
 
@uselesschien I think that gif is nightmare material
 
lol
thecodinglove.com/post/121761880990/… When a web developer understands that Microsoft Edge is just IE’s reincarnation
 
@uselesschien That one was fun
 
MDN even calls it IE12
 
10:49 AM
They had to call it Microsoft Edge because of the Internet Explorer's Logo
The name sounds good, let's see if the actual browser is too.
 
It'll keep you on the edge of insanity just like IE
 
Haha true
New css prefix coming -edge, prepare your sass mixins
 
!!hahano
 
This is how you do things, but it won't work in all browsers, i.e
 
10:51 AM
How do I get my go daddy server ready for a NodeJS app, how do I install NodeJS on it?
 
is edge going to be automatically updatable? So we don't have to deal with the future old-edge shit
 
Hope so
 
a question, do github forks only exist in github?
or are a part of git itself?
 
git has clone and patches.
 
oh so github takes advantage of clones and tracks changes, so it can then be pull requested?
 
10:54 AM
yes
 
It just renames them.
 
Linus doesn't like this. I almost concur with him. Almost.
 
how can I test FF developer edition multi-thread?
 
what if I delete a fork after my desired pull request has been merged?
is it alright?
 
yes. just like deleting a clone doesn't do anything with the original repo, or vice-versa.
 
10:56 AM
@afonsomatos yes, I guess
 
can I delete a fork after submiting a pull request, but that pull request is not merged yet?
 
I don't know but I think that won't work.
 
yeah.. I shouldn't probably do it
 
How did I just do git init successfully in a non-empty folder? Isn't that a requirement?
 
10:59 AM
I strongly feel that objectProto needs a pluck
 
I believe SmartGit required the folder to be empty implicitly.
There's a reason for that
 
No, git doesn't.
 
@uselesschien stop watching that site and continue working!!!! :c
 
@StevensHaen what is?
 
@StevensHaen You can git init in a non empty folder, but in that case your remote repository needs to be empty
 
11:01 AM
That would be a pain in the ass, to initialize every repo with an empty folder. If you want, you can ignore folders within the folder you initialized by just not adding them to the stage area.
 
remote is not empty, I was getting ready to clone in a full folder
 
@Neoares Yeah, right, I work at AOL.
 
@afonsomatos when they tell me I can't use jQuery
 
@uselesschien sounds painful. have you tried a bus stand instead?
 
11:03 AM
@Neoares wot
 
@uselesschien wot what?
 
Dude, you should be thankful.
 
That thecodinglove website must be pretty new.
I already went through the same gif 10 times.
 
Stoked about going to the React Europe conference tomorrow, anyone else going?
 
no
 
11:07 AM
no
 
should I start learning .NET?
oh wait, it was a no chain?
 
no
 
'Should' depends on your goals.
 
I wish we had JS conferences here where I live
 
11:11 AM
@afonsomatos Lisbon? Isn't LXJS a thing?
 
that was in 2013
or is it still happening?
 
There is a jQueryConf in Bang, IN
 
seems they took a break this year
 
Bang?
 
Bangalore
It's 750km from my city
 
11:13 AM
My country is not even 750km
 
@afonsomatos Ha ha!
 
@argentum47 o/
 
@afonsomatos lol
 
literally it's 500km
 
11:13 AM
@AwalGarg \o/
 
@argentum47 Hi, got my tees
 
like'em ?
 
@afonsomatos we're eating your country
 
@argentum47 yup
 
has anyone faced a problem where you have your dev tools open and you have a functionality where clicking on something should delete the cookie, but it doesn't
 
11:16 AM
@argentum47 Using Chrome?
 
SISTITE
 
MALLEUS TEMPUS!
 
@Enijar yup , also occurs in firefox on a mac machine .. didn't check on linux
 
TEMPUS FUGIT!
 
@argentum47 I develop on a Mac, I'll test this out... Never seen this issue before.
 
11:19 AM
ok.. and if it doesn't occur with you its fine, then maybe its just an angular issue..
 
@afonsomatos lol
 
angular is indeed an issue
 
I had seen a joke in that site where morgan freeman leaves with lunch plate. the title was "when someone talks about code while having lunch"
 
11:26 AM
when I show the intern a time-saving feature i.minus.com/iXajjBGYza7mI.gif
 
lol that last one
 
What's wrong with talking code during lunch?
 
Ugh. Stupid GIFs. About stupid things. Just why are you spamming this shit? :|
 
"you idiot!! this shit!"
 
GIFs are such a waste of time
 
11:35 AM
@RoelvanUden You can bin the non cat ones
 
Me trying to implement Promises. Any suggestions?
 
@uselesschien start with promises.. don't attempt to fix old code :P
 
@Neil Actually, fixing old code to work with promises (a little at a time) is doable.
@uselesschien Where are you stuck?
 
@MadaraUchiha if you're switching to promises, it usually isn't because you're working with a single callback
 
11:46 AM
I haven't started yet. Reading the P/A+ spec.
 
!!tell uselesschien google html5rocks promises
 
Read the first result ^
 
I am getting a SyntaxError: missing ) after argument list for this line of JQuery

"$("select[name='reason_id']").on('change',Quantity);" what's wrong here?
 
Guys, I'm not using promises. I'm implementing them.
 
11:49 AM
@uselesschien Aha
 
Working on something similar to fetch.
 
@uselesschien Any particular reason you're not using native or bluebird promises?
 
@MadaraUchiha Curiosity.
 
!!afk
 
11:56 AM
@uselesschien don't support browsers without native promises.
 
@AwalGarg uselesschien is afk.
 
@CapricaSix shutup
 
@BenjaminGruenbaum why should everyone use bluebird? :/
 
@AwalGarg that's exactly what I'm trying to do
!!afk
 
11:58 AM
@uselesschien :((
 

« first day (1719 days earlier)      last day (3235 days later) »