« first day (1545 days earlier)      last day (3389 days later) » 

12:00 AM
@Mosho Here's an older demo (some debug info is in there): spaceships-game.herokuapp.com
It's multiplayer, so wait for others in the room to join
 
how do you respawn?
found it
 
github.com/SomeKittens/SPACESHIPS/issues/6 <- just for you, @phenomnomnominal
 
how do you load / unload javascript in single page applications
 
?
You load it all at the start, and unload it when the tab's closed.
 
@r3wt or use something like webpack which can inject bundles as they are needed
 
12:07 AM
ok, say my app has a route that takes an argument. based on this argument, i fetch some data and generate a chart. on subsequent trips to this route, i get the error "undefined is not a function", because the code for the previous chart still exists.
 
Is there some common and correct way to handle controllers/models for the common convention of having www.mysite.com/data/ and www.mysite.com/data/:id? As in, is this consolidated into a single model and controller?
 
@r3wt Sounds like a bug in your overwriting process
 
SomeKittens i don't know what that means.
 
12:22 AM
Can you paste your code that handles the generated chart?
 
its highcharts
the front end is home brew
i just load in the script for the view then remove it later and delete the app.module property but the code still lingers
what i did was i took sammy js and made me a nice little mvc with js but the broken part is the module loader/unloader
 
Not sure if it's efficient.
 
is there a similar concept to python's any() in underscore? Eg, returns true if anything within the iterable is true. any(['a' in name.lower() for name in names]) for example.
 
[].some
Also omit the brackets in Python to make it lazy
 
12:40 AM
when underscore says something has an alias, does that just mean an alternate name for the same method?
 
does it seem like the syntax for angularjs controllers keeps changing?
 
dunno. Had the same problem myself, redshift
 
im reading tutorials on angularjs and everyone seems to be writing different ways
 
that is a problem I found with angular... so many ways to do things, so for starting out, it felt frustrating that finding two sources had completely different info
 
ze docs
I used the docs and this room to learn Angular. Was pretty much all I needed.
 
12:46 AM
the official docs are great, but when something is outside of the scope of the docs when the problems arise
 
ok so for this code...
.controller('StoreController', function($scope){
$scope.product = gem;
});
 
Looks pretty standard (aside from the fact that you're depending on globals)
 
i need to add brackets like so: .controller('StoreController', ['$scope', function($scope){
$scope.product = gem;
}]);
 
ah, ok
 
docs says to add brackets (it's a dependency, right?)
 
12:48 AM
both of those do exactly the same thing BUT the second one can be minified.
 
trying to wrap my head around why
yea ok i thikn that's it
is that the reason?
 
Most minifiers worth their salt change function parameters so function (somekittens) becomes function(a)
This is a problem for Angular, because it depends on the names of the parameters to determine what to inject.
minifiers won't touch raw strings, so the second one (while a bit redundant) ensures that the injection will work properly post-minification.
Does that make sense?
 
could i think about it this way...the brackets are merely for dependencies to that specific controller? just like saying the module method: angular.module('myApp', []) ?
 
@SomeKittens interesting to see what you guys will do with it
spaceships, that is
 
@redshift Both are ways of injecting dependencies into the controller. The second one allows for minification.
@Mosho Yeah! I'm excited. My brother and I have been designing games for ages, just never executed.
 
12:51 AM
@SomeKittens thanks I'll add brackets from here on out then
 
I could never stick to making a game
 
@redshift I don't use them, as I don't minify my code. Once I start minifying, I'll need to get around to that.
@Mosho well, here's hoping we will.
The room will be in on the Alpha/Beta/etc
 
I'm a bit confused about this, particularly the "params" section within the service. I know a service is what I want, and I have a very generic ReSTFuL backend. What does the param mean?
 
@SomeKittens good luck :D
off to bed
 
1:09 AM
@redshift it also work without brackets. by using the bracket type, you exactly specify the dependency. But without bracket it will automatically look for the dependency you specified.
app.controller('StoreController',  function($scope){
    $scope.product = gem;
});
would work, because Angulaur automatically look for the arguments names, and if there is anything with this name that is injectable, it will inject it
 
thanks
is this code still valid? Or, are the variables outside the controller's scope?
(function() {
var app = angular.module('gemStore', []);

app.controller('StoreController', function(){
this.products = gems;
});

var gems = [
{ name: 'Azurite', price: 2.95 },
{ name: 'Bloodstone', price: 5.95 },
{ name: 'Zircon', price: 3.95 },
];
})();
 
trailing "," in the gems array
 
oops
 
well, it should.
 
@redshift create either a gems service or a gems constant
 
1:13 AM
@SomeKittens i don't know what a 'service' is yet:) still learning
 
What tutorial are you going through?
 
@SomeKittens codeschool.
 
Neat. You should get to services soon
 
yea, but why do some use 'this' keyword and some use $scope?
 
Go is so much fun, I'm afraid that once I emerge from the depths of it, I'll accidentally hate javascript
 
1:15 AM
@NickDugger 'Go'?
 
@redshift Not sure. $scope is much more popular.
 
@SomeKittens it seems the 'older' tutorials use 'this'
but newer angularjs tuts use $scope
 
sup gangsters?
 
wondering if something has changed in the angularjs versions
 
1:17 AM
Makes sense - use $scope.
@rlemon You again
 
Me again
don't you know I'm everywhere
 
If you're everywhere, why aren't you here, helping me debug.
 
if I could SO while at the gym and while driving I would never have to leave you
 
@rlemon, learn Go with me. I feel like a proper programmer now, instead of a "javascript developer" lol
 
Go is on my list, behind Python but ahead of Rebol
 
1:18 AM
@NickDugger Just so long as you don't go through the tutorial and then declare how you've "pretty much mastered" it.
 
@SomeKittens lol, I still don't claim to have mastered javascript
I wanted to laern Ruby, but Go caught my attention... Ruby will have to wait
then Python after Ruby
well... maybe C++ after Go... we'll see how sane I feel
 
Not saying you will, I just know people like that.
 
I wanna learn python only because of all the cool shit written in python I wanna play with
Go would be nice for work, but then again so could RUST
 
yea seems every job these days wants python
 
C++ I have to work with, but I avoid it
I don't like C++
 
1:21 AM
Is it bad that I'm learning new languages so I can make more money in the future? I mean, I enjoy it too, but money is useful... lol
 
I used to write quite a bit of C#, it's a fun language.
but it's crap without a .net library behind it
and I can't deal with the MS dependency
when I say "crap" I mean, I have no uses for it without .net behind it
 
What I find odd about Go is the type declaration is after the name of the variable, so ...
 
I really wouldn't mind learning lisp
 
@NickDugger If your goal is to make more money, there are much better things to study than languages.
Salary negotiation, for instance.
 
c := []string{ }
I already make more than I deserve, lol. I just want to raise my earning potential
trying to be smart about my future
 
1:23 AM
then stop underselling yourself
 
man filters are f*cking awesome in angularjs
 
> "I already make more than I deserve, lol."
 
Do you know how much I get paid for having 0 education and being 22 years old? It's more than anyone else my age, in my position
 
@NickDugger just know one thing..."you can always make more money, but you can't make more time"
@NickDugger more than justin bieber??
 
wat
 
1:25 AM
bieber gonna bieber
 
@NickDugger Somehow, I doubt that.
 
I don't make more than everyone I know in my position, but I do make the most out of my immediate family. that is nice
 
I skipped the whole "entry level thing" and went straight to $65k with full benefits, just because I rocked the interview lol
 
my mom got angry at christmas because I gave her an expensive gift :?
 
@NickDugger When I was your age, I was making 80k + bennies + equity.
...I just said "When I was your age" with no irony at all.
 
1:26 AM
+ equity? nice
Where at?
 
@NickDugger I now make well over that
 
@NickDugger 22... at 22 I was making $35K a year ;) at 18 I was make $45K
life is fucky
 
@NickDugger in my 20s i thought 36k was a lot...then i got paid 50k in my mid 20s and i thought i was rich....now im in my early 30s and i make six figures ...it's easy if you just keep working on yourself
 
San Francisco
 
Ah yeah, but the price of living is a bitch
 
1:27 AM
yea, I don't feel so bad now that Kittens and I compared pay scales vs cost of living
 
pretty much. CoL is terrible, but salaries are niiiiiice
 
I love/hate how in Go, unused variables is an error
 
I might not make as much, but damn does it ever last.
 
Average SE salary on the peninsula is 195k
 
dont' realy have to make much $$ ....just save it often and save it as early as possible
you'll retire in 40-50s easily
 
1:28 AM
Also, finally found a use for ST; every other language besides javascript... lol
 
@redshift I have a savings rate of just over 50%
@NickDugger what do you write JS in now?
 
@SomeKittens yea man that's the way to do it if you can!!
i save 30% ...would save more if not for the fiance lol
 
(Also, my intention was not to one-up you with salary, but to provide context for your next job hunt - you can always do better)
 
I've been writing my JS in Brackets for quite a while. I bought ST and didn't like it so it's been just sitting on my HDD. Go sucks in Brackets, so I finally have a use for ST
@SomeKittens don't worry, I don't get offended; plus I got what you meant
 
1:32 AM
@NickDugger FTR there are lots of education-less regulars in the room. You would think there would be less with nice positions...
 
I never finished college, I have some.
 
I barely finished HS
 
I did a semester, which included a ceramics class... lol
I got C's and D's in HS
 
I dropped out of HS 2 credits shy a d had to take em a few years later.
I still say I graduated in 04 tho. Fuxk it
 
I never graduated from HS
Got accepted into College after Junior year :P
 
1:35 AM
Clown college, mind you.
 
School is for... people that aren't me
 
Sure, but then I went on to real college
 
I got offered a full time Dev position in grade 12 so dropped half my classes and took the job
 
I'd go back to school if it was free, or at least very cheap. Otherwise I can't justify the costs
 
@NickDugger ever thought of moving to SF?
 
1:36 AM
@SomeKittens No
 
Problem isn't cost of school. Problem is how do I pay bills without my full time job.
 
That too...
 
I wouldn't go back. Too much time.
 
I just want to learn things. Everything. If I could know everything, I'd be a happy man.
 
Wouldn't go back, hated academia
 
1:39 AM
I would love to go to uni one day, but I don't see that happening until I'm retired or don't need a full time job
so when I do go, it'll be for something other than CS, something else I like as a hobby
maybe physics
 
Butt Pirating
 
just to learn more about the things I love really.
 
I'd love to be an HS Chem teacher some day
 
I read be as do
I prefer do
 
nah, she be all about dem beakers and shit
 
1:41 AM
She might judge you on the sturdiness of your tubes
 
@FlorianMargaine @dystroy reddit.com/r/pics/comments/2rnycn/…
 
and she may or may not be all about the base
get it? ha
 
Extremists kinda remind me of the Krikkit people in Hitchhiker's Guide; they discover they're not the only ones around so they decide to destroy everything.
 
They're kinda like if Cybermen and Daleks had a fuckfest; out popped terrorists
 
1:52 AM
@monners Ah, kinda like the USAians
 
@OliverSalzburg Eh?
!!google USAians
 
That's what I thought.
 
Us Americans might like sticking our noses into the rest of the world's problems, but we also police and bring to justice horrible criminals
 
@NickDugger They never caught me. Not once.
 
1:55 AM
Just you wait and see... OSAMA!!!
Osama BinBiden
 
Hissss
 
s := make([]int, 20) // Allocate 20 ints as a single block of memory.
s[3] = 7             // Assign one of them.
r := -2              // Declare another local variable.
return &s[3], &r     // & takes the address of an object.
What does "address of an object" mean?
 
@NickDugger It's where you send their mail
If you mean, in computereering terms, it's email
 
@NickDugger Memory address.
 
@SomeKittens is there any more detail to go into? Not sure what that is exactly
 
It points to the location in memory where 7 is stored. If the memory is changed, the pointer's "value" will change.
I'm bad at explaining.
 
How about this... how is s[3] different from &s[3]?
 
s[3] is the value of the object, &s[3] is the object (?)
(I don't know Go)
 
THis is my first compiled, statically typed language. It's a curve, but I'm determined to understand it
 
2:06 AM
lol
that dog makes me smile.
 
@Loktar You smiling at that picture makes me smile
 
@rlemon for your understanding as well as mine, when I did Println(c[1], &s[1]) I got "world" 0xc082006190
whatever that last part is is what I get when I refer to the "address"
 
hrmph. This might be pretty dumb, but when using ng-repeat, would there be a way to say "if there is nothing in the list to repeat, do x"?
 
@KendallFrey You smiling at @Loktar smiling at that picture makes me smile.
 
@NickDugger yes, that is effectively the array index of the object in RAM
think of RAM as an array of bytes
 
2:13 AM
@KendallFrey Ohh, neat
 
@phenomnomnominal You make me smile
 
Go makes me smile, does that count?
 
@Loktar so I've been going to the gym for like two months now. I've got pretty strong considering the time frame, and can now bench 225 for 3. I weigh in at like 183 and lifting that much weight literally hurts my hands if i'm not wearing gloves. how the hell does he bench 400 ?!
 
with his mouth
 
Maybe by going to the gym for 200 months?
 
2:15 AM
I used to swim laps in the early morning... shit happened
 
s/swim/dance on/
 
oh geez, if statements do not require parens in Go... I might add them anyways...
 
Don't use convention from language A in language B
 
... fair enough
for x := 0; x < 5; x++ {
    fmt.Println("index:", x)
}
so weird
 
get over it
try befunge
that will change your perception of what weird is
 
2:21 AM
anything that's not javascript is gonna seem weird until I learn more
my knowledge is basically just javascript, php, and a little bit of C#
 
here's an infinite loop in befunge:
>v
^<
yes, that is exactly what it looks like
 
I mean, it makes sense... interesting
that's cool syntax. Looks like a fun language to play with lol
 
it is really cool
who said flow control needs to be one-dimensional?
or even exist at all? (REBEL)
who said code needs to be text? (Piet)
it may not even be visible to the naked eye (Whitespace)
I love esoteric languages
 
fmt.Printf("key=%s, value=%d\n", key, value) -- What does "s" and "d" stand for? I know what this code is doing, but why did they choose s and d? How will I remember that?
 
those are format specifiers, much like in C
 
2:27 AM
Using the fmt package is for sissies !
 
remembering them is a two-step process:
Read the docs
Remember them
eventually you'll just know
 
ah, just googled format specifiers, and I got a list of C ones, that seem to be the same
s is string, d is decimal
simple
 
They are probably mostly similar
@NickDugger lol
 
Don't lol at my ignorance :(
 
I'm loling at how "simple" it is minutes after having no idea how to "remember that"
 
2:30 AM
I didn't even know what it was, I just had to learn what it was called, and it was the first result on google lol
 
Is it fair to be annoyed of people who just add more code to handle weird states instead of just fixing it so you don't get into the weird state in the first place?
 
no, because I do that
It's much easier to do it that way than fix someone else's code.
 
@KendallFrey you're the problem
 
I know
If I didn't exist, my life would be so much easier.
 
2:35 AM
(that sounds suicidal, I'm not)
 
@KendallFrey Have you tried just going mad?
 
Have you tried php?
 
3:09 AM
When reading someone elses code, which would you prefer?
var dog Animal = Animal { }
or
dog := Animal { }
is the second one simple enough to understand?
 
I don't know what either of those statements is supposed to do
Assign two variables at once?
 
It's Go
 
Ohhhhhh!
 
More like Go fuck yourself.
 
3:11 AM
Harsh, but fair
 
:= is nearly universally an assignment operator
on the other hand, = can mean several things
 
alright. I hadn't seen := before so I wasn't sure if it was readable
 
I think the second example is a bit better, mainly because it's less verbose
the first example has its merits too
 
I still think it's weird to have the type after the name
var poopy string = "k"
 
I think you're weird to think that matters :P
 
3:14 AM
I just hadn't seen it before, so it threw me off. I'm used to staring at C#, where it's not that way
 
C# has its wtfs too
My favourite is int[][,]
 
what's a good javascript based editor that can render LaTeX and code blocks?
 
4:18 AM
!!rimshot
 
@SomeKittens That didn't make much sense. Use the !!/help command to learn more.
 
!!learn rimshot <>http://media.giphy.com/media/SUeUCn53naadO/giphy.gif
 
@SomeKittens Command rimshot learned
 
4:45 AM
Is it a co-incidnce that most screen resolutions are multiple of 120, if not then why 120?
 
HI
 
@Mayuran 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 am Developing a Web Application . I need Help to Create a Jquery Base Treeview with Dynamic Tabs creating base on the Selected Treeview node. please help
 
5:04 AM
@KendallFrey what's bad about that?
 
5:31 AM
@rlemon hahah
yeah man idk
thats why I called bs
 
@rlemon Hahaha
 
user2620028
 
5:47 AM
0
Q: Jquery : Post Request is breaking while uploading multiple images

Shreshtt BhattI am using Plupload js plugin to upload multiple images in one request. This plugin is working like if someone adding 5 images at a time then post request will go 5 times to upload each of images separately. As we know Post request require unique csrf token but in my case due to same token after ...

 
6:08 AM
@NickDugger Is the var dog Animal = Animal {} javascript / dog:= Animal{} javascript?
I've never seen syntax like that before
 
6:55 AM
@HatterisMad I saw that, the 5 th paragraph says "I don't really know for sure, probably memory constraints", and also that the convention has been in the industry previously, I was thinking why? :P
 
user2620028
@argentum fair enough i didn't read it all the way through hahaha
 
7:19 AM
Glad to know its Thursday already. :)
@argentum47 Waadddupp!
HNY
 
user3949359
Has anyone used headhesive in here? It supposedly makes your header fixed. Is it better than a jquery/bootstrap solution
 
user3949359
?
 
Hey, could you guys read the comments on the following question and tell me what @slebetman is trying to convey? I have absolutely no idea what he's saying:
0
Q: Is this the 'standard' way to define inheritance chains in JavaScript?

Aviv CohnI'm trying to understand inheritance in Javascript. I know that every object has a prototype, which is an object it inherits properties from. I know that the .prototype property exists only on functions, and it is the object that will be set asthe prototype of objects created from this function,...

 
0
Q: How to enable resize on JsPlumb widget?

SajeetharanAm building a list of widgets with JSPlumb and AngularJS, i need to enable resize using the handler on each widget. There is an example already on it, i have implemented , but resize does not happen. here is my code, HTML: <div ng-controller="CustomWidgetCtrl" plumb-item class="item" resizeable>

 
7:35 AM
@RahulDesai little busy, looking how to use the "fog" to upload to aws.
Happy nu year btw
 
Ok.
 
7:58 AM
@BenjaminGruenbaum.. That would be a nice hook
I didn't understand the use of possiblyUnhandledRejectionHandled
 
@NaeemShaikh if the promise library made a mistake.
 
got that.. You mean it was treated unhandled but later was handled?
 
Yes, there is an example in the gist
 
@BenjaminGruenbaum can you help with my question
 
Please do not ping people who have not spoken to you before. It is considered bad etiquette in this room. I don't really have time for a question now - maybe later.
 
8:09 AM
ok
 
8:32 AM
Is there a technical reason why a debugger; statement does not make use of source maps? Shouldn't it be possible for the dev tools to show the original source even when debugging (e.g. the way it does for console messages)? Similarly, is there a reason why a stack trace in an error does not make use of source maps?
 
!!work or play
 
@Shea work
 
!!review or dive in
 
@Shea review
 
@RoelvanUden yes, of course it should be possible and it indeed is in theory. It's supposed to work in the chrome devtools for example (debugging is why we have source maps in the first place). However to be fair it didn't work for me either and I didn't look too much into it.
 
8:37 AM
@Shea surprise! There's a gun to your head, and death in his eyes! But you know jiu jitsu! Body slam superstar @Shea LaBeouf!
 
@phenomnomnominal Hello lol
 
@BenjaminGruenbaum Right, I didn't find a lot of useful info on it, but it seems I'm not the only one for whom it doesn't work as intended. I suspect not fully implemented yet, or something along those lines
 
I'm your idea man, care to hear a new one?
 
8:42 AM
What would explain I can't upgrade postrgresql to 9.4 on my ubuntu server 14.04.01 LTS (I could upgrade my desktop one with a simple apt-get upgrade) ?
 
A terminology dictionary site
 
@Shea Urban Dictionary
 
But can you search for groups of terms related to specific activities or things?
Like an appendix for everything
Bam! billion dollars right there
 
lets become prisoners
 
I tried it, it wasn't that great
 
8:52 AM
@SecondRikudo USA is a really scary place
 
please get me out of here
 
Systems related question: Assume that I pushed my code to GitHub, is there a way to have it automatically pushed to the live site hosted at (suppose) GoDaddy?
 
What's the best way to conditionally add a class with angular?
 
ng-class
 
@yeswanth 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.
 
8:57 AM
I guess it's bad that idfw frameworks
 
9:10 AM
@yeswanth oh yeh no shit haha, cheers!
 
@Shea well, you seem to be in one of the less-terrible states
 
Idk, but God help any citizens who are worse off being in a state other than California.
 
terms like "south" and "bible belt" come to mind
 
Guys, I recently came across a site where you have a video and transcript below it. The transcript is clickable, if someone clicks on a particular sentence, the video starts playing from that particular point. Also, whatever the person is saying in the video, that part gets highlighted in the transcript.

Any idea how to implement this? I Googled but I didnt find anything promising.
 
!!tell Rahul google html video jump to time
 
Sorry, I can't get you the site URL.
 
@tereško A family that practices bigotry together is a family that stays together
 
@Shea isn't that covered under "inbreeding"
ok , ok .. I'm being way too harsh
 
that there's a close family
lol
 
but anyway, speaking as someone from EU, we view your country with mix of amusement and unease
 
9:27 AM
gotta laugh to keep from crying, right?
 
@SecondRikudo Thank you! That helps, indeed. Now, how do I highlight the sentence in the transcript that is being red? Should I add a <span> to each of them and have a way to identify each span using an ID? If I go into that path, how do I do it for any set of videos and corresponding transcripts?
Do you have any better idea than mine?
 
@RahulDesai Dude, seriously. Try something, and if you're stuck, we'll help you
That last question you could have answered yourself by googling
So can this one.
 
@SecondRikudo My apologizes. My googling skills are not as good as yours. Working on it.
I was just trying to develop the logic that I will program. NVM
 
uh morning guys ... did I join in this conversation at the start of a racism riot?
 
0
Q: how to properly call photobooth.js

RaoulI am currently trying to use photobooth.js to make a simple photobooth page. I know very little about JS and webpages, but it seemed the best solution for what I have in mind. My problem is that when I load the script (no dependencies, according to the website) and try to use it in my basic app, ...

 
9:38 AM
@Raoul 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.
 
Anyone here played with kendo ui much ?
I've been building a generic wrapper round it and MVC on the server
 

« first day (1545 days earlier)      last day (3389 days later) »