« first day (1470 days earlier)      last day (3461 days later) » 
00:00 - 20:0020:00 - 00:00

12:02 AM
so much for talking to the bot.
@BadgerGirl xoxoxo
(I'm slow on the uptake)
 
@Shmiddty <3
 
how has your birthdayday been?
 
It just started 2 hours ago :P
 
Give me all the details. Has it been as exciting as it is in my head?
 
And I've already eaten 500kcal
 
12:07 AM
Did @copy jump out of a cake? I feel like that is something that he would do.
But it would be a real cake
and he'd just be covered in cake
And then there would be this moment where he realizes that he's covered in cake
and that you just really love cake
but it's too late
 
I've eaten him?
 
yes.
that is where I was going with that.
 
He's going to take me out shopping, he said I could buy 10 things.
 
foolish man
or, perhaps, trusting
 
Binary 10
 
12:11 AM
111
 
@BadgerGirl I recommend having him buy you a boat as the first thing.
You should buy a boat.
 
Yes :D
Or an island
 
and the second thing should be a unicorn.
that flies and farts rainbows.
 
Or a koala that does the same thing
 
omg. that's a thing now
you just made a thing
a brilliant thing
The rest of the world hasn't caught up yet
So behind the times.
It's like they don't even know about flying koalas that fart rainbows.
What plebeians.
 
12:16 AM
I want a koala now
 
I hear they're vicious
they'll bite your ovaries off
 
I'm a badger, I'm sure I would win in a battle
 
!!youtube badger vs koala
 
It was just going in for a hug :(
 
12:19 AM
Right? Dude ruined the moment
 
12:43 AM
 
lol
 
finally got it working :)
 
why didn't she use 2 hands wtf
@Dave is that yours?
 
yeh :)
 
that looks really damn cool
 
12:43 AM
thanks
 
12:57 AM
awesome thing is going on here
 
@hamism 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.
 
i get it
 
 
1 hour later…
user2620028
2:01 AM
@Jhawins i just pulled the starter relay off my ducati and shorted the wires between the relay and she started. Looks like im buying a relay lol.
 
user2985029
2:35 AM
.
 
3:25 AM
anyway to hide an element (as well as take it out of its position) in jquery?
 
hello every one :)
 
 
3 hours later…
6:08 AM
hi
 
user2620028
hi
 
I Want to know More about javascript , which book or website is best for it?
 
@FlorianMargaine Thank you
 
7:18 AM
 
8:01 AM
Can anybody suggest a lightweight websocket backend (nodejs) which really only deals with ws connections without creepy xhr fallbacks and stuff ? Please ping me.
 
@FlorianMargaine but... js the good parts is available freely ...?
 
8:18 AM
@AwalGarg no.
 
8:31 AM
hi
 
@flawr 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.
 
@AwalGarg it is pirated.
Try any famous book, you'll find a copy online. Doesn't mean it's not pirated.
@jAndy you can choose the transports in socket.io. it may be a bit bloated, but at least it's the most battle-tested one.
 
i'm new to js and tried to make a small program for manipulating images on a canvas. but my first problems o far was that i could not get the program to wait until the image was loaded. i postet it on as question but didn't get any answer, can i post it here or should i ask it again on stackoverflow?
 
@flawr either use promises, or imgEl.onload
 
i used .onload on the image, but other code that is supposed to run after the image was loaded is still executed BEFORE the image is loaded
 
8:41 AM
@flawr Let me guess, you did img.onload = something() ?
 
exactly
 
Yeah, the parentheses at the end of something() ? That's you calling the function right away. You want onload to receive the function, drop the parens.
 
i did it like img.onload = function(){ /*my code */};
so this function would not be called on this line yet, but on the onload event, right?
 
oh, that's the correct way, odd. Can you reproduce the problem in liveweave.com or jsbin.com or whichever?
 
just started a jsfiddle, hope that works too?
 
8:44 AM
@flawr are you doing this locally? Is the image locally hosted?
 
yes, well it works locally but also if i load it from a server.
but i just want my other code to wait untill the image is loaded.
 
So you want toGrayScale to wait until everything has been loaded
 
exactly
but up to now i was not able to figure out how this is done the right way
 
Welcome to asynchronous fun. You want to either pass a callback to Handler which is called when everything has been loaded, or raise some event, or use promises, or...erm...other stuff.
Going with the first (probably most straightforward at this point) option, your Handler will receive a 3rd argument, a callback function, which you'd call after you finish with everything
 
how can Handler check if everything is finished?
 
8:48 AM
You have self.finish = true there, right?
 
yes
 
So you know when you've finished
After that, call said argument
 
i tried to achieve that with the while loop but that loop kept hanging long after the image was loaded
but you say i should pass a function to Hanlder
that will be called afterwards
that basically runs all the rest of the code i want to run
 
Why would you use a while loop to do this?
 
i know it is an ugly 'solution' but it was the only way i could think off
well then thank you very much for your advice! js is still pretty confusing for me but i think i am slowly advancing=)
 
8:52 AM
Rock on
 
\m/ =)
can you recommend a book/resource for learning javascript? (i already know quite a bit of java, and a bit of other languages)
 
or that
 
codecademy.com this will help you understand objects and the prototypes in javascript
 
8:58 AM
Not really (it's sad), but there are some acceptable ones. chat.stackoverflow.com/rooms/17/conversation/… and docs.webplatform.org/wiki/beginners
 
registerware :-/
 
@Zirak is the second site ready yet?
 
thank you very much for your advice, it helped me a lot!
 
@JanDvorak still worth it :D
 
@AwalGarg For some values of "ready"
 
9:00 AM
hehe ok
 
umm.. learnXinY doesn't mention "hello"[0] and it suggests using ==
 
...bad
hold on, did we tell him about mdn?
 
XY does link to MDN
2
 
9:22 AM
good morning
@jAndy Faye
 
9:55 AM
@phenomnomnominal hey ! i need your help with web-workers
could u please spend some time ?
 
@darkyen00 I can offer you 50% of my attention for 10 minutes?
 
@phenomnomnominal purr -fect
@phenomnomnominal there is something called flux by facebook.
I am trying to squeeze performance out of an iPhone 4S
and to learn flux, i am implementing a lib that does the model and state management
also stores the things to work offline (etc)
I would like to run all the logic in the worker thread
and just run the react powered ui in the main thread
 
Haven't done any coding since school started
Decided to stay up until 6 am coding tonight
 
the worker exposes states which the views render
 
I feel a lot better now
 
9:57 AM
and these states are always updated.
 
I guess I should go to sleep now
 
@darkyen00 yep makes sense
 
@phenomnomnominal anything done in this field ahead of me ?
right now i am using web-pack and building 2 files : worker.js / app.js (should be called ui.js)
they both require one file app.js which baiscally defines an app module
and allows communicating b/w worker and the master
 
I'd suggest looking at whether you can have the script inline, loading another JS file for the worker is annoying
 
@phenomnomnominal webpack spits a unified output file 8-)
its like browserify but also inlines other assets :D
 
10:05 AM
yep I know what it is, didn't know that about worker files though, that's cool
 
the issue is
 
The thing you need to make sure of though is that you don't put all the work in the worker and not use the main thread at all
cause that would be stupid
 
@phenomnomnominal main thread has the dom-diff
react things, animations, everything else [like scroll handlers etc]
 
the most heavy lifting the worker is doing is updating states, so even when like 200 messages come per second
the update event will fire once and react does the quick magic of rendering :-)
earlier every event running on main thread made it lag in scroll when i saved to db and updated states.
i though want to build the app in a single file
and then automatically create the worker.
but guess that would be too much code to write :-x
 
10:08 AM
yep you can do that
 
how so ?
inlining everything ?
 
Well you could do something that turns your defined functions into blobs and then passes them into your workers
how are you managing your workers? new workers or a worker pool?
 
just one worker running in back, forever.
 
i gotta go bro, sounds interesting though, tell me what you come up with
 
sure.
Yikes !
Zirak, Parsons, WV
101 1
more yikes !
@Zirak ^T_T ?
 
10:53 AM
 
whew
Applied to german job, and all the fields had german labels
It had an "english" page, but it was still written in german
Google translate don't fail me now
 
@Neil We'll help you :)
 
@darkyen00 Yes...?
 
@Zirak how come you haven't answered a single thing at emacs ?
@BadgerGirl happy birthday sis.
 
11:37 AM
@BadgerGirl Very appreciative :)
Pretty sure I couldn't learn german in under a week
The initial job application was written in english, so I'm hoping that means I don't have to know German
 
in HTML / CSS / WebDesign, 4 mins ago, by PeeHaa
I have been thinking about the idea of having miss @CapricaSix post stars to a dedicated twitter account for no other reason than "this could be fun". /cc @rlemon
 
@PeeHaa IIRC, this was discussed previously and marked
by no other than our great, holy, awesome, superguy @Zirak!!!!
 
Ah yes. I found the issue. Let me read it and possibly ask le great @Zirak to reopen
ow it's still open
 
11:58 AM
@BadgerGirl Happy birthday! :D
 
Hi JavaScript!
 
@PeeHaa what happened to your avatar?
 
@BenjaminGruenbaum @WesleyCrushed halloweenified the thing
 
@Unihedron Hi Java!
 
user652649
@SomeGuy you should really put red john on. it's perfect
 
user652649
12:05 PM
have you seen "the mentalist"?
 
I haven't
And yeah, updated
 
user652649
:D
 
@WesleyCrushed "The mentalist" is amazing, I've seen only three episodes, but it's already mindblowing.
 
user652649
at some point it becomes very repetitive. but episodes about red john are cool and it's a decent series to watch :P
 
how to make github gists show as parsed html and not the html code itself?
 
12:22 PM
hi
 
@user2073081 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.
 
@AwalGarg Use md
 
@copy no. I want that gist to parse my html
and show that as output
 
Use md
Convert html to md
 
@copy how?
 
@AwalGarg You mean render the html directly?
 
Rename filename.html to filename.md
 
@copy :( it is escaping all span elements :( :( :(
@Unihedron yeah
@erikroyall it only works for 15yo who earn $400k
 
Give it a try.
Remove all the crap expect what's in the body
Markdown parses html as-is.
@AwalGarg If you don't trust me, try pasting your html here. markable.in/editor
!!afk
 
12:44 PM
@AwalGarg also script elements
 
1:02 PM
ok, time to add some content to my site and fix those links going nowhere!
 
1:31 PM
Going through older answers - why would anyone downvote this?
Same here any idea why this would get downvoted?
Strategic?
 
1:56 PM
How do I implement posix character class regex in js?
...and btw, why aren't they present by default in the first place?
 
@AwalGarg why?
 
@Unihedron because I need to use them...
the punct posix class
 
 
2 hours later…
3:45 PM
main.resources = { IMAGE: [], AUDIO: []};
main.addResource = function(src, type) {
var i = main.resources[type].indexOf(src);
if(!i) main.resources[type].push(src);
};
 
@NikolaR. 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.
 
‌​
 
why do I get
"Uncaught TypeError: Cannot read property 'indexOf' of undefined"
when I call resources.addResource('assets/spritesheet.jpg',ResourceType.IMAGE);
how can I dynamically get object's property?
I believe [type] is the problem since 'resources' is an object, not an array
damn... uppercase keys were problem...
 
4:04 PM
Hey guys i need some assistance with this question stackoverflow.com/questions/26564146/dojo-dgrid-databinding
 
 
1 hour later…
5:10 PM
is it an accepted thing to do true*1 to get 1 from true and false*1 to get 0 from false?
let's say I have an array, [true, false], from which I want to get the string '01', and not 'truefalse'...
I'd have to turn all of the trues into 1s and all of the falses into 0s first
I could do array[index]?1:0, but meh
 
AngularJs, What is the correct way to have Global Variables? It seams like using $rootScope is very frowned upon and using Services that only return data is also very frowned upon. So what is the not frowned upon way?
 
might be even less readable than array[index]*1
@NoahHuppert window.nameOfVariable
 
@towc +true and +false
!!> console.log(+true, +false)
 
@AwalGarg good point
 
@AwalGarg "undefined" Logged: 1,0
 
5:14 PM
thx
 
;-)
 
that might be even less readable tho
+(array[index])
I'd never guess why would one do such thing in his code
should I still use it?
 
using + in front of variables is a known way to convert them to numbers. Unless you are writing code for politicians to read, you'd be fine.
 
If I use window.foo could I use it in my views?
 
@NoahHuppert what do you mean?
@AwalGarg I actually only knew about *1
 
5:16 PM
Could I do {{window.foo}} ?
 
anyway XD
@NoahHuppert guess you could
 
@towc If you super duper care for readability, use
!!> console.log(Number(true), Number(false));
 
@AwalGarg "SyntaxError: missing ) after argument list"
 
@AwalGarg if you say so I can't do anything but trust you
 
@AwalGarg "undefined" Logged: 1,0
 
5:17 PM
I'll just use +true
 
use Number
use strict
use PHP
 
of course! the best way to turn anything into a number is PHP. Let me set up server files for my li'l program XD
 
towc, Doesn't look like you can do {{window.siteUrl}}
 
@towc If you really wanna add numbers, then use jquery.
 
5:20 PM
@NoahHuppert then have a scoped variable be equal to your global one
 
now, this was rumbling in my head for a while: I have a function, at which end I have:
if(condition) return something;
doThisOtherThing() //if condition is false
is it worth putting an else before doThisOtherThing() ?
if(condition) return something;
else doThisOtherThing() //if condition is false
like that
 
5:41 PM
Have a great week everyone.
 
Hi ]
 
[ hi
 
hi ]
 
6:39 PM
] Hi [
 
[ Hi ]
 
@RobertMallow 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.
 
@CapricaSix Thanks
 
@CapricaSix you stupid dumb bot!
 
@CapricaSix any way to help me? I need a way to create a good question when I can't think straight
maybe a corrector of bad quality question
@AwalGarg why you are so offensive to him!
o. oook this room is dead I should go.
bye
 
6:49 PM
@RobertMallow she's just a bot, not a real person
 
@CapricaSix have a good day my friend and thanks for your welcome
!
 
no problem my friend
3
 
@CapricaSix shut up
 
this is how its shaping up.
 
@darkyen00 why don't you use comment blocks?
 
6:58 PM
yay! I made another little thing! codepen.io/MateiGCopot/pen/gyEBz
quite easy to do, but I'm proud of it
(20 mins work)
 
2
Q: Sub.prototype = new Base() vs Sub.prototype = Base.prototype

Maciej SzThere are many resources online about JavaScript prototyping and inheritance. Most of which use code similar to this: function Base() {} function Sub() {} with inheritance implemented like this: Sub.prototype = new Base(); But I am wondering what is wrong with inheritance implemented this w...

Good question ^
 
ist illegal to copy discourse.org design? if so to what extent?
 
> Content is by-nc-sa, Discourse logo and “Discourse Forum” ®, Civilized Discourse Construction Kit, Inc.
 
> Civilized Discussion. On the Internet.
 
@Shmiddty sublime, and now its a habit.
 
7:00 PM
product pitch sounds like BS
 
The logo is registered trademark
The design, without anything specified, is property of Discourse Inc, so it is illegal to copy it without their expressed permission.
Also "to what extent?" what? It's either legal or illegal, and it is illegal.
 
mmm I will copy and gradually make a fix here and there then
thanks
to what extent of design is illegal copying
 
@Shmiddty you like the concept though ?
 
@SecondRikudo well there might be a distinction of getting a cease and desist before any further action, or immediately being taken to court
 
7:02 PM
for example if main post design is changed
and also what Tom said
 
@TomW I doubt it's worth their time to take it to court, not to mention it's not easy finding out who owns the site anyway
 
I'm not sure whether that depends more on the zealousness of the copyright owner or the law thought to have been infringed though
 
But they might file a DMCA notice.
 
@SecondRikudo who.is
:)
 
@RobertMallow My personal websites are registered on Madara Uchiha who lives in the Land of Fire, Underground.
 
7:03 PM
I host my site offshore if that makes a difference
 
Good luck prosecuting me...
@RobertMallow Why do you feel the need to copy their design...?
 
@SecondRikudo well given that they don't contact your hosting provider :)
well you know.. Im bad at design like very bad
and that design is just awesome
 
@RobertMallow Hire a designer...
Or take your chances, and be ready to take it off if needed
What are you making?
 
I have pockets full of holes Rikudo ;)
if you know what I mean
I will inform myself better anyway
 
Sounds like you need to get some new pants then.
 
7:05 PM
> Discourse is 100% free open source software, now and forever.
 
no design is awesome for long
 
@TomW But the site?
 
ah, I see
 
If the site is MIT as well, yeah, you can take the design freely and do whatever you want with it.
 
im building a forum that is a little different from traditional forums and got more control over moderation and many other things I cant disclose now for fear of someone steals the idea
@TomW you get the full Discourse if you pay of course
the one with plugins etc
@SecondRikudo mmm
better search for a MIT licensed site then
I started this "adventure" because of my experience on topix.com
no moderation whatsoever and its full of trolls
well what ive gotta say? thank you for your help and everything since im here :) gotta work so see ya when Im more free
bye
!
 
7:19 PM
0
Q: Dojo DGrid Databinding

devdarI have a dgrid with data. The user executes a query request and a json object is returned. I would like to bind the results from a ajax request which returns a json object to the grid. How can i bind the data.relatives to relativesData. Under is what i have attempted. Dgrid var relativesData = ...

 
> yoMama: "so fat"
-_- XD
it's pretty well explained
you could work a bit on code variable renaming
 
@towc lol after spending half an hour on it, I got bored so inserted it :P
@towc the nsfw ones?
 
@AwalGarg those, but there are also some that don't really make sense
like, myObj.thisMethod
 
haha right
 
just by looking at it I wouldn't get what it does
use stuff like myObj.logThis
 
7:49 PM
> typeof awal would also return Person
That's wrong
 
@towc noted
 
Besides that, you're not explaining anything
 
gotta go urgently right now
cya later
 
@AwalGarg also: Person(){say:function(){stuff}}, then you call awal.sayHello, which doesn't exist
 
00:00 - 20:0020:00 - 00:00

« first day (1470 days earlier)      last day (3461 days later) »