« first day (1717 days earlier)      last day (3224 days later) » 

12:47 AM
<script type="text/javascript">
'use strict';

function RandomBinary() {
	return Math.round(Math.random());
}

function BinaryString(k,n) {
	var arr = new Array(k*n);
	for(i=0; i<k*n; i++) {
		arr[i] = RandomBinary();
	}

	return arr;
}

var nrOfIndividuals = 10;
var nrOfVariables = 2;
var nrOfBitsPerVariable = 10;

var individuals = new Array(nrOfIndividuals);

for(var i=0; i<nrOfIndividuals; i++) {
	individuals[i] = BinaryString(nrOfBitsPerVariable,nrOfVariables);
}

document.write(individuals[1]);
The loop in the script above terminates after the first iteration. Can anyone shed some light on why this is?
F.e. the document.write writes "undefined" but if I change it to individuals[0] it prints just fine.
 
jesus christ 17 phpspec bugs closed at once
morning btw
 
@Pickett i in BinaryString is undeclared, overwriting... guess which other i. Also, don't use document.write, use console.log.
also, dat naming convention...
 
@JanDvorak Stupid me... thanks! yeah I'm a beginner as you can tell hehe. What is the usual naming convention?
 
also, new Array(size) isn't as useful as you might think. Javascript arrays auto-expand just fine.
camel case is fine, but nrOf seems redundant to me.
 
ok, agreed. Thank you!
 
1:02 AM
 
lol
 
When @Loktar's house is a-rockin, he's having sex.
@rlemon I'm down for a hangout if that's still going
 
@AwalGarg morning
I need mo' sleep.
 
@rlemon Another idea for the extension: timer on message for how long you have to edit.
 
I'm rubbish at writing. In a rut again
only 1/3 of the way through
 
 
1 hour later…
2:14 AM
@SomeKittens thoughts:
0
Q: Nested transclude directive renders inner transcluded content in wrong place

elwynI have a myList directive, which transcludes it's content. The problem occurs when I try and nest a <my-list> element inside another <my-list>. JS Fiddle: http://jsfiddle.net/fqj5svhn/ The directive: var MyListDirective = (function () { function MyListDirective() { this.restrict =...

 
@phenomnomnominal one sec
 
ta, I'll pass it along
 
I am starting to feel that verbose logging is better than step through debugging :/
 
@AwalGarg both have their places.
 
@phenomnomnominal I still have a .00001 chance
 
2:27 AM
@phenomnomnominal what'd you tell him now?
 
@SomeKittens in reference to sperm ratings
 
who what now?
@php_purest I think we can all agree you were a mistake.
 
Funny mistake.
 
put this into the console:
x=document.createElement(atob("aDE="));x.innerText=atob("Tk9UIEZVTk5Z");x.style.color=atob("cmVk");x.style[atob("Zm9udFNpemU=")]="120px";x.style[atob("cG9zaXRpb24=")]="fixed";x.style.top="40%";x.style.left="40%";x.style[atob("dGV4dEFsaWdu")]="center";x.style.zIndex=99999;document.body.appendChild(x);setInterval(function(){x.style.display=x.style.display===atob("YmxvY2s=")?"none":atob("YmxvY2s=")},500);
 
2:29 AM
4 hours ago, by SomeKittens
@php_purest I wrote that code
 
guys any ideas, how to fetch data in controller. The way I did is not the best one
http://plnkr.co/edit/1ItQLvu3O1gjROXR39QN?p=preview
 
!!> atob("Tk9UIEZVTk5Z")
 
@phenomnomnominal "NOT FUNNY"
 
@SomeKittens ^ cache atob to save a lot of bytes
 
@php_purest bye for 5 minutes
 
2:29 AM
I dont want the url to get updated with what I pass along
 
@phenomnomnominal aww don't kick him :P
 
It's copypasta from here:
yesterday, by SomeKittens
@php_purest Run this code to find out how funny you are:
He didn't even bother changing it
 
how to remove a branch from github (not git)
 
@AwalGarg git push origin --delete <branchName>
 
@SomeKittens neat thanks! TIL
 
2:35 AM
5883
A: Delete a Git branch both locally and remotely

Matthew RankinUpdated Answer on 1-Feb-2012 As of Git v1.7.0, you can delete a remote branch using git push origin --delete <branchName> which is easier to remember than git push origin :<branchName> which was added in Git v1.5.0 "to delete a remote branch or a tag." Therefore, the version of Git you ha...

 
2:50 AM
how do you report a scammer?
 
@php_purest Post on meta.stackexchange.com
 
@php_purest What kind of scammer?
 
I think he is referring to this:
in Room for sdd and php_purest, 4 mins ago, by php_purest
sounds fishy to me
 
@AwalGarg Man, I'd love to see what would happen to that project.
 
2:58 AM
@SomeKittens he even asked him what your code does :P
 
@Shmiddty whaaaaaat
@AwalGarg where?
 
and the next two messages after that
 
@AwalGarg oh, he knows what it does, now he's trying to get everyone else to run it
 
ah, lol
I am so tempted to go and troll both of them right now :D
 
3:03 AM
@KingCodeFish 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.
 
@KingCodeFish You're a programmer and you use WordPress for your personal site? For shame!
 
@SomeKittens lol dude I guess you can argue with 30% of the web ;)
 
@KingCodeFish uh huh.
 
30% of the web is not personal site of programmers. But more than 30% of the web is shameful. Yes.
 
What do you guys use then, let me guess raw no-cms brute strength lol.
 
3:09 AM
@KingCodeFish gotta be honest, the first thing that I said "EW" about on that page wasn't the wordpress.
 
@KingCodeFish I built my own static site generator
 
but also, you're 13
Sorry for the ping @SomeKittens
 
nothing wrong with being young, something wrong with being young and arrogant.
4
 
And sorry for that one @SomeKittens
and that one @SomeKittens
 
please tell me if I'm being arrogant in any way. I will always try to watch out for that.
 
3:11 AM
There’s something satisfying about CMSes
I need to build one that isn’t terrible
Not one with features or really any utility at all for anyone else; no, just for me, just for that feeling. Like using a trackpad on Mac OS.
 
obviously building a CMS would be the best learning experience anyone could get
 
class="no-overflow-y ua-chrome ua-chrome-43 ua-chrome-43-0 ua-chrome-43-0-2357 ua-chrome-43-0-2357-130 ua-desktop ua-desktop-linux ua-webkit ua-webkit-537 ua-webkit-537-36 js js flexbox canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow
opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg 
(had to break that up into two lines)
 
@KingCodeFish Well, no. It’s just one.
 
@KingCodeFish I'd say the best one is building a compiler.
If I had to pick one
 
in web-based areas...
 
3:12 AM
@minitech a scammer looking for help on their project all over the world
 
@minitech boom
 
Build a search engine
 
@SomeKittens Still conceptual at this point
 
build something that you will use yourself
 
@minitech this is how we get CMSs
 
3:13 AM
!!xkcd standards
 
No, no. Like I said, I don’t want to share it. I just want my own.
Yours is no good @SomeKittens because it was not invented here
 
ive seen that b4
 
@KingCodeFish The node engine or XKCD?
@minitech It was invented "here" (talk about pointers...)
 
caprica six's comment
 
3:15 AM
(Seriously, though: I appreciate the link, but also hate Angular. So I won’t be using it.)
 
@KingCodeFish Does wordpress seriously account for 30% of all websites? I'd like to see the statistics on that
 
@KingCodeFish You're in for a treat <- arguably the best webcomic
@minitech ....hate Angular? butbutbutbutbut you must have hit the wrong keys!
no one could ever hate Angular!
 
I didn't like angular either :P
 
@SomeKittens We've got a few people here that still need to learn that lesson
 
3:16 AM
And I don't see what angular 2 brings much in profit.
 
learn what lesson?
 
Nothing personal, Angular – well, it’s kind of personal – but I like my progressive enhancement
 
@KingCodeFish Word of warning, messages that don't add value (such as lol) are frowned upon here
 
And @SomeKittens, although it’s probably not important for editing one’s own pages, edit.jade looks like it has an HTML injection vulnerability.
 
I WARNED YOU, N00B!!
 
3:17 AM
ok sry mistake, 19% runs on wp but 70% runs with no cms so yeah its awesome
 
@minitech Yeah, I'm the only one who can get there. It compiles to a static site anyway.
 
n00b intensifies!
 
@SomeKittens k thnx for the heads up
 
@minitech IT IS PERSONAL!
FIGHT ME
 
@SomeKittens I never got full clarification there. What's your affiliation with Angular?
 
3:19 AM
he is misko hevery
 
@Shmiddty On the GH org, not a core contributor, core contrib to angular-hint and Batarang
 
disguised
 
@SomeKittens Cool! Congrats! Huzzah!
 
It's my one accomplishment in 2+ years of professional programming, so I flaunt it whenever I can.
Well, that and getting this retweeted by Jeff Atwood
 
Didn't you also teach JavaScript?
 
3:21 AM
@php_purest You look a LOT like me. It's eerie.
 
@copy Yep, for a year and a half. Sadly, the program shut down...
 
@SomeKittens The eyes. They burn!
 
That's an accomplishment
 
@copy I guess so, depends on where you stick the goalposts.
@Shmiddty muhahahaha!
 
“Self-taught” doesn’t exist!
 
3:27 AM
My accomplishment is sitting in this room all day long.
 
I am still married. Does that count as an accomplishment?
 
I'm ten years into a relationship without being married, does that count as an accomplishment?
 
Yes
@php_purest: Thank you for bringing it up; they’ve been suspended.
 
3:44 AM
Everytime some one gets suspended for fishy behavior, I imagine the scene before that - mods discussing whether or not to party with unicorns after suspension in a very serious mood in a secret private room always ending on the same conclusion.
 
@minitech I feel like that's splitting hairs
 
@Shmiddty I feel like differentiating learning from a person talking from learning from a person writing is splitting hairs.
Or whatever the equivalent of splitting hairs is when it’s less about arguing and more about feeling superior.
 
> Open Open Sans
https://www.google.com/fonts/specimen/Open+Sans
 
@minitech Isn't it less "method" and more "how formal"?
I could be self taught by asking programmers lots of questions, that's still talking
 
3:56 AM
@SomeKittens What’s “formal”? (I would differentiate it by “how interactive”, if anything, but… I don’t.)
 
@minitech For the sake of argument, let's go with accredited. (yes, bootcamps are not "self-taught")
i.e. I went to a formal place of education where someone else made the syllabus and decided what I had to do to "pass"
so, not "self-taught" so much as "What I learn is decided by me"
 
Right, and one of those is a lot less pretentious…
 
@minitech yeah, both can be pretentious.
and you're "self-taught" after a year or two in the industry anyway
 
Oh, we're talking about self-important assholes. Got it
Something is causing this tab to hang when I switch back to it from another tab...
 
TIL that the phrase software "patch" is from a physical patch applied to Mark 1 paper tape to modify the program. http://t.co/v8iVq6Hjar
 
4:09 AM
@Shmiddty Too many kittens
 
Would love some reviewers (cc @taco) gist.github.com/SomeKittens/59d5804f7e87378d480a
 
4:28 AM
ok especser is pretty much complete now. repo: github.com/awalGarg/especser try: awal.js.org/especser prefer using the keyboard not the mouse. review/feedback appreciated.
 
5:10 AM
@AwalGarg I'll trade for feedback on my article
 
5:29 AM
@AwalGarg ^^ first thing I noticed
ctl + p made the header go away, don't know how to get it back
oh, hit ctl + p again
 
@AwalGarg Once I've opened a topic I would have expected ESC to close it again and take me back to search, and maybe arrow keys to flip through the list of opened topics on the left?
 
I like the search history
 
oops, I broke it. Cleared the IndexedDB, reloaded the page and started typing in the search box: i.stack.imgur.com/N7ZSg.png
 
@SomeKittens opened your link and it says "Whoops. We seem to have missed the gist of that gist you were looking for."
 
@AwalGarg Yep, deleted it
Lemme pull that back up
 
@SomeKittens yeah I tried to make a small initial intro thingy. it allows you to double click to close it after you pull the spec.
 
Actually, this is close enough: github.com/SomeKittens/Data-Warehouse/blob/…
@AwalGarg it's good! The overlap isn't.
 
@ivarni I did consider that. Basically there are a lot of ways different apps handle it so I just tried to do it the sublime text way :P
@SomeKittens I am terribly terrible at CSS (which is terrible as well so you can imagine..)
@ivarni I can't reproduce. Did you clear it from devtools? I store a mark in localstorage so clearing from indexedDB will break it yes.
@SomeKittens reading
 
5:59 AM
@AwalGarg Aha, yes I cleared from devtools but didn't clear localstorage so that could be why. Reason I did it was the very first time I came to the page I had to click the "Update" button manually before I could search and I was trying to reproduce that
 
@AwalGarg Hah, no sweat. I'm just as bad.
 
@AwalGarg Maybe the first time a new browser with empty localstorage/indexeddb comes along it should automatically trigger fetching the spec?
 
@ivarni yeah clearing localstorage will make it work back :) you can always hit the clear store button to wipe indexedDB
@ivarni it downloads a lot (~4megs) of data so I ask for permission like a good boy :P
the spec is large.
1700 sections.
 
@AwalGarg wouldn't it be "terrifically terrible", since you're terrific at being terrible?
 
6:15 AM
@AwalGarg CSS is simple. They just have visual rules instead of abstract logic rules. 95% of the world's population would say CSS is easier.
 
@SomeKittens very nice read. my only nitpicks are a few capitalization issues here are there.
@royhowie I am also terrible at words.
 
@AwalGarg whereabouts?
 
@Sheepy it is not usable for what it is used. simple is not enough.
> Each get pulls a category
should be "Each Get..."
 
@SomeKittens why do you uppercase sql?
 
@royhowie it's an abbreviation: Structured Query Language
 
6:17 AM
isn't the new thing to use lowercase sql?
@SomeKittens I know SQL is supposed to be uppercased (I wrote it lowercase mostly for ironic effect). I meant SQL statements.
 
oh, because I click "autoformat"
 
'select' instead of 'SELECT'
 
Also all instances of "postgres" should be "Postgres" or "PostgreSQL" AFAIK. postgres is the binary right?
 
hmm, I don't know
 
!!afk brb in a while
 
6:25 AM
@AwalGarg Debatable. Most (almost all) websites are powered by CSS.
 
@Sheepy AwalGarg is afk: brb in a while
 
customer.populate().then(_.bind(function () {
    this.init();
}, this));
^ seeing this in the codebase makes me sad
 
because it's ES3-compatible?
not that you need ES3 compatibility on node, though
 
Becase customer.populate().then(this.init)is a tiny bit easier to read
 
that doesn't preserve the context, does it?
 
6:29 AM
nope, but in this case it doesn't need to
 
0
Q: Promises not resolving or rejecting

vamsiampoluI am trying to get the promises to resolve correctly,while debugging the worker,the worker sends the payload using onmessage. I create a worker using a singleton,the callWorker creates a promise which is resolved in onmessage. var checkIntersectionWithAllLayers = function checkIntersectionWith...

promises stuck in a pending state forever,help
 
@JanDvorak and by the way customer.populate().then(this.init.bind(this)) does preserve context while still beeing a -lot- bit easier to read :)
no wait I take that back, that's ugly too
I guess trying to not rely on this in the first place is moar betterer
 
Build an MCVE. You'll probably figure out the problem while doing so, and if you don't, you'll have a nice, clear example for people to help you with. There's far too much unrelated code above. — T.J. Crowder 2 days ago
 
Morning!
 
I did,I stripped the code of everything unessecary and only left the nessecary code.
 
6:36 AM
I'm this close from discarding OOP as a paradigm
 
@JanDvorak I've refactored it to customer.populate().then(init) now
 
@SomeKittens Never heard those terms before. Maybe it's related to the feature dimensions? They could be represented as a table (or a matrix)
 
7:01 AM
hello why var xxxx=document.createTextNode("/u0026");
doesn't work?
 
@FastSnail you mean \u0026?
you might also want to try &amp;
 
@royhowie that will literally put "&amp;" because the parameter refers to the actual text content.
 
@AwalGarg I meant if he's wants to write to the DOM in the actual HTML file
should've clarified
 
ah. well, sounds like an XY problem :/
 
@royhowie i actually want to show ↲.
like enter\
 
7:10 AM
@FastSnail is that the right code?
unicode-table.com/en/#0026 has \u0026 as an ampersand
 
@royhowie i took it from a stackovrflow .
 
@FastSnail link?
 
!!> '\u23CE'
 
@AwalGarg "⏎"
 
7:14 AM
@FastSnail but that doesn't list \u0026 as the correct code…
 
@AwalGarg that's working but it's little bit different it has borders
 
!!> '\u21BC'
 
@royhowie "↼"
 
!!> '\u21b5'
 
@royhowie "↵"
 
7:16 AM
@royhowie i tried var mtex=document.createTextNode("&#8627");
since it doesn't work i found a site that convert text &codes to /unicode .it was wrong may be
 
does that work?
 
ohh ! yes that works
tnx
 
@royhowie I am curious how you found it ^^
@FastSnail also if you just want the html entity, here it is: amp-what.com/unicode/search/%E2%86%B2
 
@AwalGarg I figured all the arrows were next to each other, so I looped 25 on either side of 21bc
 
ahh. nice
 
7:19 AM
@AwalGarg ok nice site.so we can't use &#8626 with javascript righ
 
@FastSnail you can but it is better to use what @royhowie suggested with JS. Use the HTML entity in your markup instead if/when required.
 
here's some further reference unicode-table.com/en/#arrows
 
link found a search :D
 
tnx help these sites
 
7:22 AM
@AwalGarg here's what I used, by the way:
!!>var mid = parseInt('21bc', 16); for (var i = mid - 25; i < mid + 25; i++) console.log(i.toString(16), String.fromCharCode(i))
 
@royhowie "undefined" Logged: "21a3","↣","21a4","↤","21a5","↥","21a6","↦","21a7","↧","21a8","↨","21a9","↩","2‌​1aa","↪","21ab","↫","21ac","↬","21ad","↭","21ae","↮","21af","↯","21b0","↰","21b1"‌​,"↱","21b2","↲","21b3","↳","21b4","↴","21b5","↵","21b6","↶","21b7","↷","21b8","↸"‌​,"21b9","↹","21ba","↺","21bb","↻","21bc","↼","21bd","↽","21be","↾","21bf","↿","21‌​c0","⇀","21c1","⇁","21c2","⇂","21c3","⇃","21c4","⇄","21c5","⇅","21c6","⇆","21c (snip)
 
neat! I'll remember this for future.
 
You have to use String.fromCharCode because '\u' + code won't work
since '\u' will be interpreted first (and is missing the four hexadecimal characters following it)
 
actually i'm making touch typing application.
 
what's the use of it?
 
7:29 AM
like the mobile version of 10fastfingers.com …?
 
hmm yes but in my app i give specific keys to practice unlike words
the problem is unicode enter mark is small.
 
but that doesn't encourage real typing, does it…?
@FastSnail then just apply a class to those boxes and add .return-arrow { font-size: 2em; } to your CSS
 
well first i give f and j and enter keys to practice .there is a modes for words sentances and finally a game like z-type.
yes @royhowie well i know it but currently they all have same class.
 
then give them different classes…? You're differentiating between the content, why can't you add a class to specific boxes as you generate them?
 
@FastSnail just in case you don't know, you can apply multiple classes to the same element.
 
7:35 AM
ok ok i think giving different class is fine.but because of this enter mark i have to change classes .only because of this enter.
 
@FastSnail not change, add
<div class="char extra-large">...</div>
 
classes represent a DOMTokenList.
 
where normally it might be
<div class="char">...</div>
 
ahh ok that's a good idea.2
 
@FastSnail that is just what the others have been saying
 
7:37 AM
You also want to use Element.classList instead of just element.class += ' class'
 
@royhowie why?
 
@FastSnail because it's just better. You don't have to worry about spaces between class names.
have a look at the methods on that page
 
hmm ok i will use that
 
@royhowie why does that make it better though? better should be due to performance or some such, DOM classes with a space are perfectly readable
 
@DrogoNevets less room for programmer error
 
7:41 AM
@DrogoNevets you may end up with classes like foo bar bar bar
 
since you just use el.classList.add('someClass')
 
@AwalGarg that would pollute DOM but not change anything
 
I prefer classList by a long-shot but it needs to be shimmed on IE9 if browser support matters
Apart from that, it makes for much more readable code
 
@DrogoNevets polluting the dom sounds like a valid reason to me
 
@AwalGarg i think its a very edge case though, i've never seen it happen like that
 
7:48 AM
yeah that, I agree with.
 
Also, if you have an element with class foo bar bar then the code to remove the bar class would be more complex than it needs to be
I think the real benefit of classList comes when you need to remove a class, not adding it
 
ng-class FTW :P
 
Morning
 
I have one tricky question
 
pls
 
7:57 AM
go on
 
var name = "ganesh";
var obj = {
    name: "venkateshwar",
    getName: function() {
        function xyz() {
            console.log(this.name);
        }
        xyz();
    }
}
 
nothing tricky in here?
 
when I call obj.getName(), I am getting "ganesh" instead of "Venkateshwar"
 
unlikely
oh, right
 
anyway to modify it so that I can get "venkateshwar" instead of "ganesh"
 
7:58 AM
xyz doesn't get called in the context of obj
 
lost context due to nested functions
 
Florian, congrats!!
 
@JanDvorak try console.log(obj.name)
 
hallo florian
 
7:59 AM
good morning
 
@Mr_Green is not using nested functions an object?
 
@Mr_Green you can use bind. or call. or apply.
 

« first day (1717 days earlier)      last day (3224 days later) »