« first day (1426 days earlier)      last day (3532 days later) » 

9:00 PM
@SecondRikudo y u no download, host, bundle and shim?
 
@phenomnomnominal Userscript
 
    // expose mousetrap to the global object
    window.Mousetrap = Mousetrap;

    // expose mousetrap as an AMD module
    if (typeof define === 'function' && define.amd) {
        define(Mousetrap);
    }
}) (window, document);
mousetrap loads itself.
 
@SecondRikudo you didn't append your script to the body.
You realize that, right?
 
problem with userscripts is that .onload is not always fired
I learned that the hard way
 
@SecondRikudo oh yeah, that shit sucks.
Although I'm pretty suprised my highlighting still works.
 
9:01 PM
@BenjaminGruenbaum ...
 
:D
document.body.appendChild(script)
 
holy shit @BenjaminGruenbaum when did you get so much rep.
 
I prefer head
 
@rlemon who doesn't?
 
@BenjaminGruenbaum
 
9:02 PM
well, he's married so...
 
@phenomnomnominal haha, I answer promise questions now to help people learn that so there's that.
 
Now I get undefined is not a function :|
 
Well, I think it's a bit more subtle than that, @rlemon - yes, more context would be nice... But if you have folks knee-jerk validating flags on completely inoffensive messages then that's a clear sign that the flagging system has been perverted in the minds of those using it, and context is thus less likely to make a difference. Fix the underlying problems first, then fix the rough edges. — Shog9 ♦ 10 mins ago
 
I have over 250 answers on that tag with over 500 upvotes. I also had some popular answers.
@SecondRikudo because bork is not defined
 
@BenjaminGruenbaum wanna help me record all instances of flags being incorrectly validated?
 
9:03 PM
@BenjaminGruenbaum Sure it is
(function() {
    var bork = (function($, Mousetrap) {
        Mousetrap.bind("b o r k", function() {
            var bork = function(text) {
                var subs = [[/a([nu])/g, 'u$1'], [/A([nu])/g, 'U$1'], [/a\B/g, 'e'], [/A\B/g, 'E'], [/en\b/g, 'ee'], [/\Bew/g, 'oo'], [/\Be\b/g, 'e-a'], [/\be/g, 'i'], [/\bE/g, 'I'], [/\Bf/g, 'ff'], [/\Bir/g, 'ur'], [/(\w*?)i(\w*?)$/g, '$1ee$2'], [/\bow/g, 'oo'], [/\bo/g, 'oo'], [/\bO/g, 'Oo'], [/the/g, 'zee'], [/The/g, 'Zee'], [/th\b/g, 't'], [/\Btion/g, 'shun'], [/\Bu/g, 'oo'], [/\BU/g, 'Oo'], [/v/g, 'f'], [/V/g, 'F'], [/w/g, 'w'], [/W/g, 'W'], [/([
It's actually the first thing that's defined.
 
That's in an IIFE
 
@SecondRikudo not on window
 
Wait a minute...
 
Why'd you put the function in ()s?
 
9:04 PM
!!afk home and shit
 
We have a MAME arcade, but the rom list is all jacked up. 30% don't seem to work. If anybody knows how to clean that up, I'm all ears. MAME cabinet isn't on the internet, though
 
Also, holy regex :O
 
@BenjaminGruenbaum Yeah, regex isn't mine XD
It's taken directly from the PHP manual
 
w
t
Lol, php manual, figures.
 
(Type bork when on any article to see the magic :D)
 
9:05 PM
What lines throw the 'undefined' is not a function bit?
 
Docoomenteteeon
 
Funnily, it says 26
But 26 is the last line.
 
Lemme put it up on jsfiddle for a moment there
I'm an idiot.
document.body.append(
 
appendChild?
 
9:09 PM
@SecondRikudo so does it work now mr. JS gold badge?
2
 
Why yes, it does.
 
I don't like firefox any more
 
This is why I prefer working with a proper IDE, sublime just doesn't give you any indication that something is wrong.
 
@BenjaminGruenbaum :-)
 
@SecondRikudo Brain could've told you that
 
9:11 PM
just got IntelliJ license. It looks like it might do Javascript, but I've only set it up for Java
 
@Zirak Not on thursday night it couldn't.
 
Our break area at work :d
now you see why I have a mask on
 
Looks nice :)
 
Can't seem to get the MAME working right. Some of the games don't play right
 
@taco Because of your ugly face?
 
9:12 PM
@Zirak I wear the mask while I'm playing
so that's not it
 
Not everyone has a beautiful yellow face like you Zirak >:(
I couldn't be man enough for that stache even if I worked out for years.
 
or you @BenjaminGruenbaum
 
Or me what?
 
nothing, no homo :p
 
Aw... maybe next time then
 
9:14 PM
get me drunk, then maybe
 
@BenjaminGruenbaum I did get a nodejs app up and running with promises. So I have that going for me though.
 
Promise.resolve(); // this is a nodejs app running with promises, I can run this app with node thisfilesname.js
 
@SecondRikudo nice, i still haven't tackled promises
@SecondRikudo is your code public?
 
Good for you though :D
 
How to add a new line in an append (jquery)?
 
9:15 PM
@Clarinetking 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.
 
@taco github.com/Ralt/pastie for a small project using promises
 
@taco Not really, but I don't mind showing it.
 
Thanks @FlorianMargaine
 
But not here, I don't want @BenjaminGruenbaum to laugh at how my code sucks and how I shouldn't deserve me hard whored earned gold JavaScript badge.
 
Gonna get back to work, then going to a dinner, so later all
 
9:17 PM
@SecondRikudo aw common :( I was having fun
 
@BenjaminGruenbaum serious review please ^ (I know it's small)
 
Already reviewed room rules and I don't believe I violated any so again, does anyone know how to append a newline? Also I hope everyone's having a good day :)
 
Isn't the first Promise.promisifyAll(mongo); enough? Do you actually need to promisify all the others @SecondRikudo ?
 
@Clarinetking string += '\n'
 
9:19 PM
Oh wait, they're different requires.
So yeah, you probably do
 
@BenjaminGruenbaum They're all different object.
On different files
 
OF COURSE :D Thanks friend :D
 
So yeah.
 
promisifyAll walks the chain recursively, but different files, so yeah.
If it's always an array you can use .spread instead of results = results[0];
 
9:23 PM
"1,234.51234321321".match(/([0-9][,.]?){5}/)
gives:
"1,234.5", "5"]
 
@BenjaminGruenbaum Well the method that generates it is called toArraySync so I guess it's always an array.
I'll read on .spread now.
 
should it not give 3 items in the array?
 
@SuperUberDuper there's only one capturing group
 
It's not an array of promises though @BenjaminGruenbaum, an array of objects.
 
@SecondRikudo that's a good idea. Also - doesn't matter if it's an array of promises.
 
"5" is what?
 
Everyone's talking about really complex stuff and I'm just sitting here looking like an idiot xD When will I get as good as you guys?
 
9:24 PM
Oh, yeah, I see, looking nice, I'll add a todo
 
"1,234.51234321321".match(/([0-9][,.]?){5}/)
["1,234.5", "5"]
"1,234.51234321321".match(/([0-9][,.]?){5}/g)
["1,234.5", "12343", "21321"]
 
@Clarinetking It depends. It just takes time.
 
@SuperUberDuper the last result of the capturing group in that match
 
Yeah, it'd be nice if people stopped treating my questions as jokes though. People need to remember we were all new to coding once
 
@Clarinetking people here are volunteers, willing to help most of the time. Sometimes, we just don't want to answer though. Not because you're a noob, not because we don't like you, just that we don't feel like it
or maybe we just don't see your question
 
9:29 PM
Fair enough :) I'm just a bit miffed when someone tells me how simple my question is, as though it's not worth even pointing it out. I do appreciate it though. I learn code alone with no help so Stack Overflow helps loads
Fixed
 
just use SO
also, you can edit your messages in this chat
 
Interesting typo...
 
hit the up arrow
 
Wow :) Nice :)
 
aaaand time to go on main to ask a question
 
9:31 PM
ColdFusion + Regex = hell
 
regex, isn't that the thing where it's like a wildcard except you personalize it?
 
!!s/\s\+[^=]+/ /
 
that's a bit broadly defined, but i think it fits
 
@Zirak ColdFusion = hell (source)
 
@Zirak can't argue there
 
9:34 PM
So @BenjaminGruenbaum anything else catches your eye?
 
@Clarinetking uuuh somehow?
 
@SecondRikudo I think Mongo is a horrible excuse for a data store, so there's that :D
 
@Clarinetking quick intro to regex: regular-expressions.info
 
a bit like sm(a|e)ll is small or smell?
 
If it works for you though - good.
 
9:34 PM
@BenjaminGruenbaum Alternatives?
 
And if you say SQL Server I will physically come to you and strangle you.
 
Take pictures
 
@Clarinetking more complicated, but also more complete and enlightening "intro" to regex: swtch.com/~rsc/regexp/regexp1.html
 
Thanks Florian :)
 
9:35 PM
@BenjaminGruenbaum My users are about to have some pretty arbitrary data. SQL isn't a good fit.
If I go with SQL, I would surely end up with userId | propertyName | propertyValue and I seriously don't want that.
 
userId | propertyId | propertyValue
 
@copy That's not much better
 
also propertyType
to know which table to hit
 
I don't even know what you're talking about
 
It's a hack. That's where NoSQL comes to the rescue.
 
9:44 PM
Hmm, does anybody else notice jsfiddle lock-up somewhat frequently?
 
lock-up?
 
Yeah; like the entire page is non-responsive; can't edit anything can't click anything.
 
Entity–attribute–value model (EAV) is a data model to describe entities where the number of attributes (properties, parameters) that can be used to describe them is potentially vast, but the number that will actually apply to a given entity is relatively modest. In mathematics, this model is known as a sparse matrix. EAV is also known as object–attribute–value model, vertical database model and open schema. == Structure of an EAV table == This data representation is analogous to space-efficient methods of storing a sparse matrix, where only non-empty values are stored. In an EAV data model, each...
 
@copy @BenjaminGruenbaum hates Mongo, suggested SQL as alternative, told him I'd devolve to EAV and I don't like it.
 
@SecondRikudo postgresql's hstore is pretty good afaik
 
9:45 PM
What arbitrary data?
 
actually better than mongodb from all I heard
 
I've been trying to use it for protoyping the past two days, and it's done this both days at some point. I think I hit Command-Delete and it happened.
 
You think you'll need to store the entire digitized discography of Mozart for one of those users and then infographics about ducks for another?
 
@BenjaminGruenbaum Lotsa text in different forms and parts of a page.
 
@SecondRikudo SQL is ok for that
 
9:47 PM
@SecondRikudo show me an example.
 
@BenjaminGruenbaum Don't have one yet. It's all a concept.
 
Also, for the record PostgreSQL makes faster JSON queries than MongoDB, and it doesn't randomly drop your data.
If it's just a concept don't worry about the DB yet anyway.
 
So how bad is it if jsh only supported chrome?
 
@Zirak Very good.
 
7.5/10 badness units
 
9:49 PM
@BenjaminGruenbaum Also true, which kinda makes this entire discussion rather pointless :P
I will read on Postgres' JSON queries though. Do you have good resources other than the obvious ones?
 
@Zirak I mean, it'd be nice if it supported other browsers, I'd be lovely if I could use a chrome-style javascript "console" when not in Chrome.
 
So far FF has screwed me over on focusing in general, editability, giving the prompt focus, and accepting any input
 
@SecondRikudo obvious ones are really enough.
 
kk
Guys what advantages does extending with Object.create have over extending without it?
 
Sometimes you make me sad :D
What do you mean by 'extending without it'?
 
9:53 PM
I know, I have gaps in my JS education, and I have a golden JS badge.
 
Object.create creates a new object with a given prototype.
 
@BenjaminGruenbaum obj.prototype = Object.create(parent.prototype) vs obj.prototype = parent.prototype
 
What do you exactly think assigning to .prototype does?
 
@SecondRikudo Gaps? More like black holes
 
@copy :P
 
9:55 PM
.prototype is a property of functions that sets the prototype of objects created when invoking that function as a constructor.
You should read "The Good Parts"
 
I probably should.
 
It's a book exactly for that sort of "hole filling" but take it with a grain of salt, it's also pretty short.
famous image:
 
@BenjaminGruenbaum You missed "PHP: The Good Parts"
Oh, no, my bad, it's right there.
 
PHP has good parts, having good parts doesn't automatically make a language good.
inb4 shaddup copy
 
I have both of those books
 
10:00 PM
Is there any value to the bigger JavaScript book? I've leafed through it a bit and it just seems like the sort of stuff I'd just google if I couldn't remember.
 
No, in 2014 there probably isn't.
JS docs online used to suck in 2008
 
PHP and Javascript both suck and I am convinced their popularity is some bizarre self perpetuating cycle of craaay
 
@Erik 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.
 
@Erik oh hi there random internet dude.
 
@Erik PHP will die soon and JavaScript only lives because it's the only browser language
 
10:05 PM
It's really hard to blame PHP's popularity on anything but it being useful. There were alternatives when it got popular and there are alternatives now and it's still very popular.
 
@copy I concur
 
Not disagreeing with what you said though
 
Not a PHP fan, but its popularity was definitely earned.
JS also fought with alternatives on the web (Flash, Java, Silverlight, Director, VBScript etc) and won. So there's that.
 
PHP has always just been dead simple to get started
 
I feel as if both languages encourage dirty habits and shitty engineering and I am hoping to the browser consortium gods that they come up with a better answer.
 
10:07 PM
@Erik shitty engineering will happen anyway.
 
@Erik name one language that doesn't encourage dirty habbits and shitty engineering.
 
@Loktar That's absolutely the only reason it got such a good start
 
inb4 lisp
 
He who cannot dance places blame on the floor.
 
yeah I agree @copy
 
10:07 PM
Well, most strongly typed languages don't actively encourage insane practices.
 
@copy I agree, just like Python.
 
@BenjaminGruenbaum Not for web
 
@Erik strong/weak typing can mean several different things and isn't well defined - so you're going to have to be more specific than that.
 
This chatroom summed up in two messages, if I've ever seen it.
> "Erik: PHP and Javascript both suck"
> "Caprica Six: Eric, welcome to the JavaScript chat!"
 
10:08 PM
@copy yeah, because it wasn't as easy as php to learn.
 
@copy have you worked with Django? I've been looking at the ORM and it's fantastic. Might even convince me to use an ORM.

This room in a nutshell.

Jul 16 '13 at 17:12, 31 seconds total – 4 messages, 3 users, 0 stars

Bookmarked Jul 16 '13 at 17:13 by SomeKittens Ux2666

2
 
@SomeKittensUx2666 meh, it's fantastic up until you need it to do something not obvious and then it sort of makes you do hoops in the air.
 
@BenjaminGruenbaum Yeeeeep - the thing that's always kept me from jumping face-first into the ORM pool
There are always corner cases.
 
@SomeKittensUx2666 Okay, yours might beat mine.
 
@SomeKittensUx2666 How did I not know of this
You receive 7 internets
 
10:10 PM
There's also a lot of boilerplate involved in your classes, but that's manageable. I don't know if Django's ORM can do the reverse.
In C# the ORM will generate the classes from me automatically mostly from the DB schema and that's nice.
You can always just .raw when you get stuck in django, though that kind of breaks the abstraction.
 
cc @FlorianMargaine and other french people
 
Ruby does ORM pretty well
 
not reading subs might make it better :P
 
How does that bookmarking thing work?
 
@Erik I hope you're not talking about ActiveRecord
 
10:13 PM
Nvm, found where the bookmarking thing is.
 
@BenjaminGruenbaum Yeah, I hate bypassing the library I'm using.
 
@SomeKittensUx2666 I am amaze
 
@SomeKittensUx2666 Yeah, agreed
 
@rlemon why'd he put a post it note on the LCD screen :O
 
I stick postits on the edge of my screens
not on them, but on the borders
 
10:17 PM
Edge is ok
 
the wall to the right of me is also covered in sticky notes and pinned sheets of paper
and a few discs thumb tacked to the wall in paper sleeves
 
@rlemon heh... We actually did that at my office
Not that much elaborate though
Mostly space invaders and stuff like this
 
awesome
:D
 
real french people are kick ass
 
10:21 PM
An office facing us had stuff like android robot
 
As opposed to false French people like Canadians?
 
@copy Quebecois*
 
Or a big smiley, another had a big heart
 
Oh, right
 
Well they're still there. Just haven't been touched in a couple months
Anyway gotta go, gnight
 
10:22 PM
night
 
Has anyone else been getting logged out?
 
has happened to me in the past
 
It's been happening pretty regularly to me
 
meta post
 
10:32 PM
I'll get a round tuit
 
Not me, happened in the past but usually it just works
 
10:50 PM
in angular how do you set the value of element in link function
eg I cant do this:
		element.val() ='test';
 
That's correct
instead you'd want to do something like <div>{{ test }}</div>
in the HTML
3288
Q: How do I "think in AngularJS" if I have a jQuery background?

Mark RajcokHow do I “think in AngularJS” if I have a jQuery background? Suppose I'm familiar with developing client-side applications in jQuery, but now I'd like to start using AngularJS. Can you describe the paradigm shift that is necessary? Here are a few questions that might help you frame an answer: ...

 
@SuperUberDuper element.val("test")
 
genius
I feel like a total noob
 
11:17 PM
Morning
 
@SuperUberDuper perhaps a super-uber-duper-noob?
 
@Zirak I have the perfect domain name for it. consolelo.gs
 
@phenomnomnominal o/
how's kiwi life?
 
who's kiwi?
or what's kiwi?
or does kiwi exist?
or does kiwi kiwi?
 
buffalo buffalo
 
11:25 PM
in this context: someone from New Zealand
 
oh, ok
 
kiwi is a bird, native to New Zealand. natives from New Zealand are called Kiwis.
it is also a fruit
!!wiki kiwi
 
Kiwi (pronounced /kiːwiː/) or kiwis are flightless birds native to New Zealand, in the genus Apteryx and family Apterygidae. At around the size of a domestic chicken, kiwi are by far the smallest living ratites (which also consist of ostriches, emus, rheas, and cassowaries), and lay the largest egg in relation to their body size of any species of bird in the world. DNA sequence comparisons have yielded the surprising conclusion that kiwi are much more closely related to the extinct Malagasy elephant birds than to the moa they shared New Zealand with. There are five recognised species, two of which...
 
!!urban kiwi
 
!!wiki kiwifruit
 
11:26 PM
The kiwifruit or Chinese gooseberry (often shortened to kiwi), is the edible berry of a woody vine in the genus Actinidia. The most common cultivar group of kiwifruit ('Hayward') is oval, about the size of a large hen's egg (5–8 cm (2.0–3.1 in) in length and 4.5–5.5 cm (1.8–2.2 in) in diameter). It has a fibrous, dull greenish-brown skin and bright green or golden flesh with rows of tiny, black, edible seeds. The fruit has a soft texture and a sweet but unique flavor, and today is a commercial crop in several countries, such as Italy, New Zealand, Chile, Greece, and France. == History == Kiwifruit...
@monners Kiwi A game played in an enclosed court by two players who strike a ball with raquets. aka the greatest sport ever.
 
um, squash?
 
@rlemon kiwi life is dandy, but I'm off to bali and singapore for a few weeks tomorrow so yay. Need a holiday very badly.
 
I guess so?
 
!!urban kiwi 2
 
@rlemon No definition found for 2 kiwi
@rlemon [kiwi](http://kiwi.urbanup.com/723189) Kiwi - 1 - A small, brown, flightless, nocturnal, endangered bird native to New Zealand / Aotearoa. The name of the bird comes from the high-pitched 'call' it makes.
Kiwi - 2 - Slang for a person born in New Zealand. Synonymous with hard-working individuals, talented artists & relaxed easy-going people .
Kiwi - 3 - This is what the rest of the world, for some unknown reason, calls 'KIWIFRUIT'. Laziness an(snip)
 
11:27 PM
2 kiwi 1 cup
 
@phenomnomnominal nice. are they your choices? why those places?
 
Bali because it's close, hot, well priced and I haven't been there. Singapore because I have a mate living there
 
Singapore's fuckin' expensive
 
cool. hope you have fun
 
Nice though
 
11:28 PM
The place I'm staying in Bali has a personal butler.
Don't know how to handle that.
 
That's fancy that is
Treat them like a bartender?
 
get a steak at 3am
 
So they'll ignore me because I'm not a pretty girl?
 
@phenomnomnominal enjoy your holiday!
 
Treat em like a gay bartender
 
11:30 PM
> Hey Sailor, how about you get me a gin an number.. ohh I mean gin an tonic. * wink *.
 
@monners so just sex them?
I wonder if there are ts&cs
ugh, so much to do today before I go though.
 
fucking Kerbal Space Program
 
@KendallFrey you might want to try to get to outer space passing through earth
not efficient, but could work
 
Cool! Looks like my bower mercurial resolver is gonna go into 1.4.x
 
11:55 PM
✓ "Take the biggest fucking lifting rocket you can find, take it into orbit and then fire it."
 

« first day (1426 days earlier)      last day (3532 days later) »