« first day (1708 days earlier)      last day (3240 days later) » 

12:05 AM
!!unban afonsomatos
 
Aaaaand I am in my house.
 
@Mosho afonsomatos freed from mindjail!
 
^ sitting on my patio enjoying a beer
 
@rlemon YEAH
congrats, man!
 
@Mosho afonsomatos isn't in mindjail.
 
12:11 AM
congrats! :D
 
!!ban Mosho
 
@phenomnomnominal I can't mindjail Mosho, they're an owner.
 
See my kickass patio
 
12:26 AM
Nice mom
 
I like the way you classed it up with camping chairs and Busch
 
@rlemon grats buddy!
@rlemon how far from Vancouver are you?
 
4 days
 
by foot?
 
@twiz look I just moved in.
@phenomnomnominal bro, Canada is big.
4-5 day drive to BC
 
12:32 AM
@rlemon damn, I'm only gonna be there a week.
 
haha ok I basically just show up look at the last message and say something sarcastic. Its what I do...
 
Fridge doesn't come to tomorrow. So I have a bucket of ice and beer
 
Hey there!
 
@JelaniThompson 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.
 
Hi Jelani, I'm copy
 
12:40 AM
Hi @copy, I'm @phenomnomnominal
 
@phenomnomnominal why you little
 
I'm creating my first node app, that needs to connect to Postgres. I'm trying to decide on an ORM, Sequelize or Bookshelf. Anyone have any recommendations? Is Sequelize still more "mature" than Bookshelf?
 
@AwalGarg how do I RSVP for your wedding?
also does chrome preload the first google result now? page seems to render before I've even finished the click lol
@Tanner I'm not sure; I don't have experience with any of those tools
if you are new then I would go with whatever has the most documentation and tutorials out there
 
12:56 AM
hello
People at my company (mainly back-end devs who are sometimes forced to write front-end code) are angling to use CoffeeScript. My position is, I don't need training wheels for my JavaScript. I wonder if there are any good things to tell them that don't sound like me being a jerk.
Hey, devdocs is pretty sweet. Glad I stumbled in here.
 
Write something small in coffeescript and see if you like it
 
I did. I didn't.
 
Why didn't you like it?
 
Seems like it's an abstraction that could get you into trouble.
 
So tell them that
 
1:06 AM
I don't know what needs to be "fixed" about POJS.
@Meredith I'm waiting for the right time. My feeling is that if I come out too strongly against it now I may blunt my own argument by being too aggressive. But if I wait too long to fight it, it may gather too much momentum.
 
Well, if you wait for the opportune moment, you'll probably miss it
 
Coffeescript sucks
Nobody here likes it
 
Yeah it does suck
 
@Robusto suggest babel to them
it has pretty much all of what is actually useful in CS
 
1:33 AM
I dunno why need any overlays on JavaScript.
 
Anyone here used Typescript?
 
Well, they make javascript better
 
I don't get why that sort of thing is even necessary. JavaScript is plenty simple to use and wonderfully expressive.
 
They're just annoying
 
@Meredith I don't see how. All they do is make it different. And cumbersome.
 
1:36 AM
They usually list their advantages on their websites
 
Marketing.
 
@Robusto babel gives you the upcoming JS features in ES6 and ES7
among other goodies
 
@twiz yep, lots.
@copy cough.
 
I don't consider babel as part of the coffeescript/typescript crowd
 
@Robusto have you ever worked on a project with say 50 devs?
 
1:41 AM
@Meredith it's a transpiler just like those two
 
Cause TypeScript sure as hell makes that better.
 
Babel just lets you use features that aren't widespread yet
 
@phenomnomnominal What makes it better for large projects?
Or large teams anyway.
 
@twiz Types. Just makes tooling so much better
Especially when you have people who aren't experienced with the idiosyncrasies of JS
 
@Meredith not just
 
1:45 AM
ah. Yea, that would make sense.
 
A junior dev comes in, changes something, and their build breaks with a good error on why the typing was wrong? That's awesome.
 
you can say the same about coffeescript, as it gives you destructuring, arrow functions, spread/rest etc.
 
@Mosho What does babel do besides add stuff from es6/7?
 
You lose a bit of expressiveness, sure. But that's actually what you want. One way to do each thing, not a million.
 
babel gives you ES7 strawman features which are very far from getting into the language
 
1:46 AM
^ this.
 
Do you ever have trouble with npm packages not being compatible?
 
and you get JSX, flowtype, and other transformers
 
You could say that any "feature" of CoffeeScript might be in ES10
 
As in they won't get in or they won't get in for a few years?
 
that's why the name was changed from 6to5 to babel
 
1:46 AM
@twiz nope, because it's a superset, so JS is still valid TS
 
I haven't tried much with it yet, but I was having trouble getting it to work with plain JS.
I was probably just doing something stupid.
 
I've used it with Webpack and Browserify on different projects, works totally fine.
DefinitelyTyped is great too
 
That lets you basically specify types for a specific JS file right? something like that?
 
Yep
You declare all the interfaces so the tooling can treat references to other bits of code as though they are typed.
 
cool
 
1:50 AM
Still just using Babel on small things though
 
@Meredith stage 0 means you made a github repo with the proposal and submitted it
stage 1 means you added some structure (reasons to include, rigorous description)
proposals at both stage 0 and 1 mean the committee hasn't taken a look yet
 
2:16 AM
I need to require a file, but can't use require, is this too gross: eval(fs.readFileSync('./conf.js').toString())
 
not 100% equivalent, but.. should work..
it could mess us your scope, but if you control the content of the file, it should be fine.
 
Yeah it seems to
It's only ever gonna be a config file, that a user will write, looking something like this:
module.exports = {
    environments: [
        'http://localhost:3000',
        'http://localhost:4000'
    ],
	beforeProtractor: function () { ... },
	afterProtractor: function () { ... };
	}
};
 
"that a user will write" scared me
 
I was using just a require but I can't find a good way to mock that.
 
I'd skip eval() and use new Function(). there is supposedly some sandboxing you can do.
 
2:21 AM
@Luggage it's only ever going to run as part of a build, so they'd be fucking themselves if they do anything dumb
 
oh, ok
 
I'm using rewire for all the rest of my mocking, but that can only mock variables that are global to a module, and because that file might not exist I have to check for it before I require it, which means a function, which means not global. It's all rather convoluted.
 
2:35 AM
Is it possible to do jquery animations on react components?
 
Can't you use css animations instead?
 
@nick uhh, umm, no idea.
 
@Meredith I tried to but was unable to understand how the transition group worked. And since I'm already using jquery for UI, I thought it was a better idea.
 
also morning
I am splitting my sleep schedule now. 4 hours at night, get up at 5, sleep 4 hours somewhere between evening and before. Worked out okayish for like 3 days now.
 
Whatever works for you I guess
 
2:43 AM
So, is it? If so, can you point me to a resource (tutorial/book) on this? Or give me an example on how to attach a $.fadeOut() or $.slideDown() on a virtual DOM element?
 
@Jovito not asking for much?
 
So its impossible? Too hard?
 
@Jovito you can use React.findDOMNode(virtualElement) to find the ... dom node. and use jQuery on it to your heart's content. Also, don't do it.
BTW, Contrary to popular belief, React isn't magic. It still use vanilla DOM Nodes backstage. So you can technically use React, Angular, Backbone, jQuery 2.x, jQuery 1.x, jQuery plugins, Ember.js, and even meteor together.
 
How do you report typos in the ES6 spec?
 
send a pull request
naw i would guess you send a message to ecma international
also, holy fuck that ES6 spec page must be the longest web page I've ever loaded
 
2:57 AM
@phenomnomnominal bugs.ecmascript.org/…
 
^^this guy knows whats up
 
@AwalGarg oh sweet, and it's already been reported, good
 
np
I have 3 bugs to file there and I am just too lazy. Guess I will wait for other people to do it :P
 
> My son asked me if 1 + 1 equals 11. I'm afraid he'll grow up to be a Javascript developer
:|
 
Better throw him out before he starts
 
3:29 AM
I'm running my internet from my phone for the next 11 hours
first time I'll likely ever come close to going over my 8gb phone plan
 
Not many people on tonight. I guess everyone is out? How is everyone doing? Any interesting topic?
 
Everyone is here. Just nothing to talk. Zombies.
 
Be nice. :)
So, I was looking at some HTML5 meeting.js demos... anyone see any of those yet? They look really impressive and simple... However, I wanted to know if they really are.
Anyone else try them out yet?
 
Rust is nice. Mozilla found a solution to them same problems pure immutability fixes, with a more complicated system but still allowing (some) mutability
 
On the HTML5 Rocks Site it says something about having to use a special server however on this other site it looks like everything is truly integrated in with the browswer so you dont really need a special type of server to do video conferencing.
(can you fill me on on Rust) I forgot what that project was... is that an i/o project?
 
3:40 AM
Rust is a programming language.
 
:)
 
Wants to be low level and high level together I think.
 
I'm mostly just going to stick to native JavaScript... Its going to be pretty difficult to get me to use a coffeescript version (fyi) ;)
 
@AwalGarg High level if possible with zero cost abstractions and a quite complicated type system
 
@copy but it provides system level APIs right?
 
3:43 AM
Not more than other languages
 
So rust is suppose to add threads to html/javascript somehow?
 
The low level part is that it can run without GC and the data structures are compact
 
@copy where is it targeted to use?
 
someone can answer me a quick question about angular.js?
 
As a replacement to C++ or C, mostly
 
3:46 AM
So, what do I need to do so run Rust? I have to install some binary package and then have my server load it and wait on some port? So its kinda like node.js? Or is this just totally some new language?
C and C++ can learn something from a for in loop like in JavaScript however... to be honest I kinda like calling my functions functions not "fn" like in rust?
 
@Asher a programming language requires a compiler/interpreter. nothing else.
 
I dont know... I've seen some coffee script and I kinda just said to myself... I think I'm going to stick with normal javascript.
I'm not sure what you mean by requiring a compiler or interpreter. Yeah, thats true. Its cool that there are people working on a new language however. Personally I think there needs to be more features like .prototype added to javascript so that you can make your own elements.
 
@Vitim.us maybe
 
@Vitim.us just ask
 
I have no idea wth you are talking about. Am I too stupid to understand this?
 
3:50 AM
I want to generate a html string from a template.html
 
@Vitim.us You want to stringify an html document?
 
I don't want to render the fragment, just replace some variables and get the result HTML string
 
@Vitim.us $compile?
 
Guessing your trying to do some regex on the original html? Not fun?
(might be fast) if you dont use regex and just use find?
 
@Asher no, I did a template of a table, and I need to display it inside the google maps infowindow
 
3:55 AM
Okay, nice so you built the html as a text string and just want to add it to the DOM?
It sounds like what your trying to do is maybe more complicated.
 
I want to apply data like this {name:"foo", age: 1} to a template like this <p>{{name}}</p><p>{{age}}</p> which is on the template.html file
but I need to get a string like <p>foo</p><p>1</p>
 
:) Good idea. There maybe a native JSON strigify?
(thinking it would be nice if there was a JSON to XML function.)
 
I already have the data parsed, just don't know to to make the angular compile thing
 
I wrote a js object to html converter
 
@Nick Nice.
 
:)
 
Tbh I'd probably just render it in a hidden element then grab the innerHTML
 
@SomeKittens already gave him the answer
 
@Vitim.us You should look at Nicks github... It maybe does something similar. Also, Nick looking back at your code. Is there maybe a way to simplify it? He is basically looking for a simple JSON to XML converter.
 
var $scope = $rootScope.$new();
$scope.name = "foo"; $scope.age = 1;
$el = $compile('<div><p>{{ name }}</p><p>{{ age }}</p><div>')($scope);
$scope.$digest();
console.log($el.html());
But that's probably overkill, i'd just use lodash.com/docs#template
 
4:07 AM
@phenomnomnominal that what I was looking for
 
hmm, mocha is not defining describe globally :/
nvm I am stupid
 
@AwalGarg seems likely
 
c'mon it is easy to forget calling .setup :/
!!afk
 
4:23 AM
$rootScope is not defined :(, I can't call it inside a controller?
 
@Vitim.us you need to inject it...
 
oh I did it!
 
Good, I was starting to write and was getting worried about you. :)
 
digest trowed exception but I changed it to apply and worked
@phenomnomnominal thank you!
 
I feel like I just helped you do something really wrong.
 
4:33 AM
:)
(that looks like a lot of non-native javascript mixed in with angular.js) What are you trying to do @Vitim.us? :)
 
if ctrl + k isn't working then use a paste service
 
or y'know, click the button
"fixed font"
 
idk why doesn't work
 
@Vitim.us Please don't post unformatted code - hit Ctrl+K before sending, and see the faq.
 
hey sir lemon, how was your day today?
 
4:40 AM
anyway, I tried command-k control-k and the button
the google maps API expects a htmlstring not a DOM Element
 
Thats odd.
Is this a custom overlay or something?
 
no its the popover that opens when you click on a maker
 new google.maps.InfoWindow({
    content: infoWindowHtml
});
 
And you need infoWindowHtml to be text... sure.
(just thinking of any other ways)
 
or I do that or I start concatenating tags that would be a pain
 
I mean if you really wanted to you could just make a custom <div> and place it where you want in CSS ... or I guess you have to use the API then.
?
 
4:46 AM
honestly I don't have the time to roll out my own
and sync then when the user drag the view would be a pain
 
Yeah, thats for sure!
Also, dont forget to maybe think about Open Street Maps. I wrote something for that once... its kinda nice too.
function MapOpen(locations, id, style) {

  if(style == null) {
    style = {};
    style.height = "300px";
    style.width = "300px";
    style.zoom = 5;
  }

  var map = new OpenLayers.Map(id);
  var mapnik = new OpenLayers.Layer.OSM(); // if you want to show that its an OpenStreetMap
  map.addLayer(mapnik);

  var markers = new OpenLayers.Layer.Markers("Markers");
  map.addLayer(markers);
  var marks = OpenMarkers(locations, markers)
  map.setCenter(marks.center, style.zoom);

}
 
9
Q: AngularJS ng-include inside of Google Maps InfoWindow?

jacobI'm trying to include a template file views/infowindow.html as the content of my InfoWindow from service I wrote to initiate the google maps api: for ( var count = locations.length, i = 0; i < count; i++ ) { var latLng = locations[i], marker = new google.maps.Marker({ … }), ...

@Vitim.us ^ that looks like it would help you.
 
5:57 AM
in a hashTable generation, If I am multiplying the var hash = charCodeAt(i) * Math.pow(31, i) and after that do a modulus of the bucket length(137 say), what happens when hash value greater than the range .. like integeer is +-65536
hm. looks like yesterday was a great friday
 
You're supposed to hash by the length of the array
So the hash value won't be bigger than the length of the array
here's the code from my textbook
int hash (char* v, int M){
    int h = 0, a = 127;
    for(; *v != 0; v++)
        h = (a*h + *v) % M;
    return h;
}
M is the table size
 
 
1 hour later…
7:11 AM
@argentum47 not an off today? :P
 
is it good to use _.tap for side-effects from a lodash chain??
 
7:26 AM
@AwalGarg nope .. saturday sunday is holiday ... you think I would sats on such meager salary
 
@argentum47 :D sup?
 
nwjs will be up
but after I reach the binary trees
 
linked list done?
 
morning
 
yeah .. sortof .. simple linked list and doubly linked list ..
what more do you suggest on it ?
 
7:30 AM
dunno :/ I thought you were making a family relation tree or something?
 
yeah.. that I think is with trees .. linked list's concept of linking nodes is useful for linking the nodes in trees ..
 
v8 shipped arrow functions back btw. for the forth time.
 
so I have to update my google chrome..
 
nah, will take time to land in chromium.
 
@AwalGarg Are they in Canary?
#tooLazyToCheck
 
7:35 AM
@monners in the present state of the v8 repo. no idea when chromium will update.
you can get them if you compile chromium yourself with the latest pull I think
 
Looks like FF already supports this syntax...
 
!!orly
 
I am going to skip the hash table, they are too mind blogging ..
 
@monners FF also supports rest parameters, default parameters, iterables, proxies, short object function notation, destructuring etc. since long. it is pretty fast at implementing harmony features.
 
7:44 AM
@AwalGarg Yeah, FF is kinda to JavaScript what Chrome is to CSS
They're both pushing hard on different fronts, which is always good for us :D
I almost always use FF for quickly trying out JS concepts. That scratchpad feature is awesome.
 
yeah I love scratchpad as well. specially the ability to set its keybindings to that of sublime in one click
 
Oh?
 
^ that
 
does it have emacs key bindings?
 
yes, emacs, vim, and some "default" whatever that means
 
7:50 AM
How do you get to Editor Preferences?
 
devtools -> settings (the cog icon on the top right)
 
Nice
 
@royhowie that guy is famous, so no :P
 
@AwalGarg stackoverflow.com/users/435112/tjholowaychuk he managed to get to 1400 rep on an unregistered account
 
7:54 AM
yeah. all his answers are pretty short as well
 
google.com/… he has a lot of unregistered accounts
 
> client=safari
 
THE
i want to learn by watching someone developing a javascript or jQuery app from scratch, any suggetions ?
i am interested in good coding practices
 
@THE There are lots of good tutorial sites out there. Pick one and sign up.
 
THE
@monners couldn't find any real life sort of tut
 
7:59 AM
@THE code academy?
 
THE
for a medium or large real life app example
 
eloquentjavascript.net
 
tutsplus.com - Their courses typically follow building an actual app
Otherwise, there are plenty of blogs out there
 
tutorials are mostly not a good way to begin to learn.
 
ok so I build this small es6 command line quiz, which supports plugins that act like questions
 
8:01 AM
I disagree (so long as you follow through with actually building something that applies the concepts)
 
yeah well not many people do follow and there are a lot of bad things in the name "tutorials" so it is basically not the best option :/
 
THE
YES i agreee
i want to see real life app like medium
 
why
 
@AwalGarg I just dove in and started learning js
 
THE
@AwalGarg I want to learn most things in a go, architecture, good practices, new features etc
 
8:05 AM
and I want to own google
 
@AwalGarg hey google will be mine
 
@AwalGarg Granted, but that could be said of any learning resource. My point was mainly that the best kinds of resources are those that show a concept being used in a practical context, and then urge the student to experiment with it.
 
@monners agreed. I am only saying that the present state of tutorials on the web is not really nice so it is difficult to say that. But I agree with your point.
documentation, OTOH, like mdn, is pretty good.
 
THE
brb
 
@AwalGarg I typically point new devs to books, as they tend to be of a higher quality than random search results.
 
8:09 AM
@monners true. Which books do you usually recommend?
 
@monners but there's always something fun about wandering aimlessly
 
For the absolute beginner (and any new project manager), I insist they read this. It's pretty old now, but it's very good at highlighting important best practices
Plus it's follow-along in code, so more practical than other introduction texts
 
nice
 
@AwalGarg github.com/luna/luna he made this; pretty cool
 
@royhowie wow neat!
 
8:15 AM
I think it's about time to retire my old portfolio site
 
@monners isn't the point of a portfolio to display your current skills?
 
@royhowie Exactly. Mine hasn't been touched in over two years. I built that site when I was only six months in
Still, hurray for 3d transforms!
Oh God, PHP...
 
@monners just set up a simple (placeholder) site
 
Yeah, that's what I'm going to do. Just a matter of time.
 
haha I also made one a while ago in excitement. then never updated it :P
 
8:25 AM
i thought tj was leaving for Go,instead he decieded to write his own language,interesting
 
I met TJ once
 
@vamsiampolu he did leave for Go stackoverflow.com/questions/24584427/…
 
Well, met, meaning he had headphones on and I was in the same room...
 
you can say you met TJ 0.30000000000000004 times.
 
@AwalGarg 0.1 + 0.2 times
 
8:28 AM
My brain runs Ruby. It's not particularly fast, but it's easy to figure out what I meant.
 
@royhowie correct. 0.060000000000000005 internet points for you.
 
!!google time in india
 
@AwalGarg is that 0.01 + 0.05 ?
 
yes
 
8:30 AM
@AwalGarg I figured only 0.01 and 0.05 wouldn't have a nice binary representation
0.02, 0.03, and 0.04 are nice
 
@royhowie 0.7999999999999999 more internet points for you
 
would you suggest Eloquent JS to someone who is starting out?
 
!!google eloquent js
 
@vamsiampolu yes
 
8:31 AM
ok
 
@AwalGarg 0.5 + 0.2 + 0.1, but enough of that
 
@royhowie -0.7000000000000001 points for making it needlessly complicated
!!> 0.7 + 0.1
 
@AwalGarg 0.7999999999999999
 
yeah, I just realized that was the same
@AwalGarg 0.1 - 0.8; good try
@AwalGarg that one was obvious because of your other post
 
:D
 
8:33 AM
does Caprica use babel yet?
 
@JanDvorak some of the excersizes in the book were pretty daunting(there was a markdown parser in version 1 of the book chapter: higher order functions)
 
haven't looked that far, sorry
Just peeked at appendix a. These were left out, really?
 
@AwalGarg You might like this book lamberta.github.io/html5-animation
 
@monners nice
@argentum47 nice
@argentum47 looks a lot like sublime text with more chrome and less responsive.
 
8:49 AM
:P responsive ?
 
just the normal speed and feel
sublime mostly works instantly. like no delays or whatever.
there is a similar zed, which is also not as fast. but it is quite different than normal text editors. trying to use it these days.
 
ow.. well ... but you wudn't use scratchpad for real projects..
 
I keep switching between sublime and atom
There are parts of Atom I love, but Sublime is so much more stable and predictable
 
@argentum47 nah, it is just for testing and experimenting.
@monners yeah the stability of sublime is what I love.
!!afk brb
 
after I did emacs for 8 months, I find it difficult to use other editors .. I just do C-xC-s and the line gets cut due to C-x .. :D its annoying ..
 
8:52 AM
@AwalGarg And the speed. Unfortunately, sometimes I have to deal with legacy projects that require working on massive dist files. Atom doesn't like files above a certain size.
 
9:10 AM
which es6 compiler should I go with babel, traceur or something else?
 
Whatever ReactJS ships with me thinks (based purely on how likely it is to be commonly understood)
 
kangax.github.io shows that babel supports more es6 features than any transpiler
and also it supports jsx (which I think is reactjs, I am not using it though)
 
ReactJS is JSX, looking now to see what transpiler they use
I think they roll their own
 
9:27 AM
babel supports JSX out of the box
 
Babel it is!
 
9:46 AM
So going with Babel.. thanks guys
 
@phenomnomnominal See, my response to that is: get people who are experienced with JavaScript.
 
@Robusto I live in New Zealand. There's a massive shortage of that. And we're transitioning from a .NET backend driven site to an SPA powered by our API. We should just fire everyone? Instead of investing time in people who already know how the business works AND getting more robust software?
 
@phenomnomnominal To each his own, I guess. I live in New England, where we don't have a shortage like yours.
 
So you'd still just fire 40 or 50 people?
Ignore the investment you've already made in them?
 
Don't set up a straw man and then try to beat me with it.
 
9:53 AM
When tooling can solve that problem, and give you a more reliable end result.
 
Your asking leading questions now, and trying to bully me with them.
 
I'm not trying to bully anything.
 
You're being very aggressive.
 
How exactly?
 
Read the transcript.
 
9:55 AM
I'm well aware of what I wrote.
 
@Robusto take a break
 
break's over
 
I'm not so sure. I'm not the one who was behaving like what I was kicked for.
 
g2g food
 
So I've lived my life without this room for a long time. I can get by without it a lot longer. See ya.
 
9:59 AM
only about a pager long and you quit...
 
Swell. Good luck with all those experienced JavaScript devs.
 

« first day (1708 days earlier)      last day (3240 days later) »