« first day (1943 days earlier)      last day (3003 days later) » 

crl
9:07 AM
!!>var a=[5,6,7]; a.foo=2; a.map(function(i){return i+this.foo})
 
@crl ["NaN","NaN","NaN"]
 
!!> var a=[5,6,7]; a.foo=2; a.map((i,_,a) => i+a.foo)
 
@DenysSéguret [7,8,9]
 
That's quality coding, that
 
crl
yea using the same var name :)
 
9:11 AM
of course you could remove the ,_,a
 
crl
I know yep
 
Anyone know if you can create "aliases" for imports? Similar to what Angular2 does with CORE_DIRECTIVES? I checked their code but stll not 100% sure if it's something native to javascript ES2015 or their magic: I want to go from import {function1, function2, function3...} to import {allTheFunction} ...
 
@Wobbley Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@Wobbley import allTheFunction from 'module';
 
@Wobbley you mean without prefixes ? Not ̀import *`
 
9:12 AM
@Ben
ops
 
import * as allTheFunction from 'module' will work
Then allTheFunction.function1()
 
I want to get a subset of the exported functions from a file but not all of them. These functions are often used togehter though, and I don't want to have to list them all up. I will probably just refactor the files so they make more sense to import fully. I was just curious
I see someone on my project is basically using import and importing like 6 out of the 8 exports from the file, I just find it messy
 
@Wobbley Group your exports for common functions?
 
Was thinking of an alias could be created, or just import everything even if it is not used (I see it some other files aswell, and we just switched to ES2015)
 
what's the problem with import * ?
 
9:15 AM
Not saying it was a problem, was just curious if it was possible. As I saw the other day angular allows you to gorup directive. @BenFortune Right, I did not think of it that way, thanks :)
*group directives
 
export const common = { function1, function2, function3 };
 
Yeah I just didn't think about it that way, quite obvious, thank you :)
 
No worries haha.
 
I usually crawl in the dark abyss of the back, but wanted to try coding in the light
 
ES2015+ is the future.
 
9:18 AM
shouldn't this question be converted into wiki
104
Q: Angularjs code/naming conventions

DalorzoDoes anyone know if exists any official or most accepted reference for Angular naming conventions to use when we build our applications? Angular has a lot of different type of components such as filters, directives, services and so on. Wouldn't you agree that having a reference naming convention...

 
Hey guys, I want to remove bower entirely and use NPM, but here goes the fun part: if I install jQuery with NPM, it will fail with post-install script(because of node-gyp requiring Python) on Windows. Is there a workaround? I don't want to install Python on all the test servers and etc
 
@Mathematics No, it should be deleted.
 
crl
well.. angular
 
@BenFortune look at the accepted answer doing nothing but link to answer
 
@halfzebra Client-side scripts with NPM is bad.
2
 
9:19 AM
+100 votes for what
 
Is there a "standalone" app for this? I already use things like Slack, Discord, and Hipchat. Would be nice to not have more tabs open (i moved them to seperate apps as well)
 
@Wobbley Nope :x
 
@BenFortune bower ships the same code, it just doesn't run the scipts from package.json, can you explain why is that bad?
 
Well, I created an Electron wrapper which I use, haven't redistributed it yet though.
 
Curses, it seems pretty useful, and I do hang out in other programming languages slack channels :p Oh well I can just idle here :)
 
9:25 AM
Other channels are not even close to the awesomeness that is room 17.
 
@halfzebra Just because you can, doesn't mean you should. Unless you're using webpack or a similar bundler then it just shouldn't be used on it's own.
 
@BenFortune yes... But I won't step into that battle ^^
 
For the very reason you've specified, you're having problems with something as simple as installing it.
 
@BenFortune that's the point, I'm using webpack and all the fun stuff
 
@BenFortune wroooong
 
9:27 AM
hey anyone knows what these are called:
 
@phenomnomnominal Why?
 
they are from 1997 or so. cc old people @DenysSéguret @FlorianMargaine ^
 
@BenFortune because it's totally possible to do it, without fragmenting the module ecosystem like bower did
 
@AwalGarg It looks like it's a keyboard
 
@DenysSéguret ... the pieces on it
cmon dude
cc @SomeGuy @Abhishrek @argentum47 @littlepootis ^
 
9:30 AM
.
 
crl
c'mon
 
nope, none of that
 
I wanna say Zaks
But I think that's wrong
 
ok I found this: fatbraintoys.com/toy_companies/fat_brain_toy_co/…, but they are too big :(
 
@AwalGarg Dado squares
Oh that's what you linked lol
 
9:37 AM
Hi guys, just a quick question for you, when using jQuery ajax, when wrapping it (I know this is a bit pointless, just a test thing) can you do something that allows the person using the function to choose where to put the result? for example, var where = 'html'; and in the success of the ajax: $("#selector").where(result);?
 
wow they are 3" lol. mine are just 1" ones I think
 
@SamSwift웃 $("#selector")[where](result);
 
Cheers for that! Perfect!
 
@AwalGarg We had them in school, can't for the life of me remember the original one's name
 
crl
or element.children[where].textContent = result
 
9:41 AM
@halfzebra you need python.
 
crl
@SamSwift웃 are you implying you have multiple elements with the same id?
 
@FlorianMargaine 99% of the npm packages install and work just fine without python.
 
@RoelvanUden except this 1% :-)
 
Thus, you don't "need" python for 99% of the things ;)
 
@crl, as yet there aren't any elements, I am doing my own wrapper for jQuery's ajax just to see if I can, it'll never reach production code, just a way to learn about things like ajax and how scripting in JS works, it's not something I have worked on much so I wanna do more :P
 
9:44 AM
for his case, he needs python.
 
Or just use a different source.
 
he ran npm install jquery
 
Do note that he's talking about moving from bower to npm, where bower works just fine without all that python pollution.
 
crl
hm not 'pollution', python eh
 
Of course it is, why do you need Python and VS to install jQuery?
 
9:48 AM
Try telling .NET developers "Oh yeah you need to install python to install jQuery via npm". They'll look at you, frowning, going "fuck this shit" and will simply download it through a different package manager. :)
 
I made a thing
 
user3119231
Fullscreen mode?
 
@Maurice Nah, just wrapped it in Electron haha. Going to add some menus, shortcuts and plugins.
 
@BenFortune trent in the arquade chat found it google.ca/search?q=PlayPlax+construction+toy playplax
 
@jarvis Oh nice. Lol 60's.
 
9:56 AM
(aurora's doing stupid stuff again so I am using this account btw)
 
@RoelvanUden "jquery": "git://github.com/jquery/jquery.git#1.8.3" did the trick
 
@BenFortune yeah they are really old but solid man
 
@halfzebra Why such an old version?
 
jeeze 2k to get them here
 
@BenFortune legacy stuff
 
10:00 AM
@jarvis They're British aren't they?
 
yeah
 
And that sounds about right, since they're "vintage" :P
You can get a 3d printer and make your own for less than that lol.
 
err, 2k INR :P
 
Ohhhhhhhhhhhhhhhhhh
 
1.5k for the toy itself, though
 
10:01 AM
That's like, £20
 
@BenFortune you giving it free ?
 
@Mathematics Giving what?
 
angularJS guru - do we have here
@BenFortune £20
 
wat
 
hey guys
Talking about good practices, Do you have anything against the practice of NEVER setting the value undefined to a variable?
 
10:12 AM
@DiegoFaria like, you can do that, when you whant to avoid using 'delete', because it's slow
 
just set it to null
that's why it exists
 
yep ^
@halfzebra setting to null I think it will have the same behavior as setting to undefined
 
exactly, I think using null will be the best answer
 
then, its always best to never set the undefined value, so the meaning of undefined will always be: "this variable has never been setted"
 
10:55 AM
@DiegoFaria Not necessarily the same behavior depending on how you do checks
It's more clear that null was intentional though
 
Do someone here have experience with Virtual box, using bridged adapter and trying to have a network traffic between host (laptop) and the server (virtual machine)
1) VM can communicate with the internet
2) laptop can communicate with the internet
3) laptop can ping VM
4) VM cannot ping laptop
==> end result; cannot get webpage by browser
i have checked firewall of VM and couldn't find wrong things
 
@KarelG that looks like ICMP being blocked on your laptop
 
gotch check my host firewall then
 
11:12 AM
@KarelG what does "cannot get webpage by browser" mean?
 
well, it's to access an admin panel. It's available on <IP>:8080 port (i have opened the port by iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT . I'm using iptables-persistent package to keep it intact at boot
but when i use the browser, <IP>:8080 it fails (not able to connect)
 
@KarelG browser on your laptop can't connect to IP on your VM?
 
yes
however it can ping
 
@KarelG lsof -i :8080 on your VM
 
what's lsof ?
 
11:21 AM
@KarelG a command
 
"list open files"
 
list open files
yeah
 
nothing :P
 
it can also list open TCP ports
@KarelG that means your VM isn't listening on port 8080
so your web server isn't up or something
 
seems you're right
 
11:26 AM
@KarelG lsof -i :8080 is doing the same thing :)
 
i'm not familiar with that command :P a good thing yes
 
@KarelG maybe the port is actually 9090?
 
:P
funny typo
haha
that service didn't start because ... not enough memory space
;_;
 
well, it's not a VM configuration issue at least :)
 
lost a half day for that simple problem. And some people says that being an IT'er can be easy >.>
 
11:34 AM
@KarelG you just suck. It took me 3 sentences to help you out :P
 
i suck indeed
:-|
 
get better :)
I have wasted a lot of time these days with iptables NAT rules and the likes, so I know the feeling
learned a few options there and there
tcpdump is my friend
 
there should be a language called ragecode
 
if it's made by indian people, then it's worth the name
 
Haha
It will make you all mad as hell if its made by 80% of people who get CS degrees here
for them the best programming language is AI
type what you want and the answer shall serve you on its own
 
> If the question mentions PHP, someone might have a rant about how that language is bad and you should use this other language.
almost like me. People may use it, but i would still rant about that
just wow
some of the experiences in the comment threads has baffled me
like
> had a guy once copypaste a block of php into a .NET project and wonder why it wont compile.
 
is it legal to own a fox ?
 
in some countries you can
in my country, you may keep a buffalo as house animal
just checked ... black tailed prairy dog is also allowed here. heh
The black-tailed prairie dog (Cynomys ludovicianus), is a rodent of the family Sciuridae found in the Great Plains of North America from about the USA-Canada border to the USA-Mexico border. Unlike some other prairie dogs, these animals do not truly hibernate. The black-tailed prairie dog can be seen above ground in midwinter. A black-tailed prairie dog town in Texas was reported to cover 25,000 sq mi (64,000 km2) and included 400,000,000 individuals. Prior to habitat destruction, this species may have been the most abundant prairie dog in central North America. This species was one of two described...
 
12:01 PM
Anybody checkout the link I posted? It was Redditors complaining about SO :d
 
i am that "anybody"
some comments were right thought.
 
@taco It refers to the intersection between set of Reddit Users and Programming Beginners and People who got whooped on SO
union with a few good people ^^
 
@Abhishrek Foxes are beautiful animals.
Especially ones with 9 or so tails.
 
@MadaraUchiha I know, I want one :-/ now
lmao, right!
 
download firefox then
then you have a fox.
WITH FIRE
 
12:07 PM
Meh. You guys give me shit, but it keeps me on my toes
 
@MadaraUchiha I am sure if you will name your fox Naruto if you ever pet one
and then teach it dark ninja arts
 
@Abhishrek Nah, I'll name them Kurama, if anything.
 
lol
 
@taco just to clarify, do you have problems with the reddit post ? Or our reaction to it ?
 
< I haven't watched Naruto enough to remember it was called Kurama
did you watch the new DBZ though ?
 
12:11 PM
@Abhishrek Very sparingly.
I don't have much interest anymore, and Saitama owns them all in one punch anyway.
 
Hi
anyone have work with tpeahead.js
0
Q: typeahead remote with defaults not working

ShijinI am trying to create an auto suggest using typeahead,I need to implement remote data with defaults. Here is my code , var remoteTeams = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('team'), queryTokenizer: Bloodhound.tokenizers.whitespace, i...

 
Hi again guys, does anyone know a good tut for OOP JS?
 
@MadaraUchiha lol I found the new one an incredibly terrible approach at humor
 
@SamSwift웃 class MyAwesomeClass {}; now you can transfer your existing OOP skills to JS. You're welcome.
 
@RoelvanUden, wow, that simple... I've been trying to use the var obj = { /* things */ } version of it...
 
12:23 PM
Thats grand daddy old, but you might need a transpiler to transpile the class version to the obj version
Might we suggest using babeljs.io
 
ES6 introduced class. It's simply sugar for writing function MyAwesomeClass() and extending the prototype like MyAwesomeClass.prototype.moo = function() {}. You can use babel/typescript to transpile ES6 to ES5
 
@BadgerCat o/
 
@KarelG meh
Time for bed, good night guys
 
@Abhishrek Have you seen one punch man?
 
@MadaraUchiha Nope
@taco good night.
 
12:34 PM
@Abhishrek Go see one punch man
It's 4 hours total, completely worth it.
 
I read it as Go see one punch man man
@MadaraUchiha pushed on top of my to watch stack for sunday :-)
 
@Cereal you use one ?
 
Nope
I just know rlemon has a standing desk, so I thought it might interest him
 
Ah
@BenFortune No its not
you don't know the power of the dark side !
 
user3119231
12:47 PM
2 trains collided. What the fuck? Footage NFSW youtube.com/watch?v=tR9dq9iLXxs
 
user3119231
noteworthy that a catastrophe is needed to ensure that people help each other
 
Any suggestions for a library to create tree charts?
 
@Maurice Also noteworthy that, in case of a catastrophe, you need to iPhone that shit and get it on YouTube ASAP
 
user3119231
@OliverSalzburg nah, I think the guy used his "make video" function to activate the light
 
user3119231
BUT to upload it to youtube isn't okay.
 
12:57 PM
@Maurice It's actually "SHOCKING" ;D
 
user3119231
Makes me sad.
 
I dunno, lots of people die every day. I don't see why it's such a big deal. Sucks for the people who can't get to work on time :(
 
@Cereal doesn't look interesting
 
user3119231
@OliverSalzburg Ha, at least you don't make drama :D
 
user3119231
*a
 
1:10 PM
ow
such similarity - esp when you come on the list TWICE
@RyanKinal o/
 
@BenjaminGruenbaum @Zirak @SomeGuy goat-story.com/pages/mug
 
I can't put that on the table :(
 
comes with a stand
 
@Abhishrek \o
 
canary or chrome?
I just use chrome for now, but should I switch to canary?
canary is simply a more frequently updated version of chrome, although less stable, right?
 
it's the dev version of chrome
can break anyday
 
I always have stable installed
it is what your audience will be using
 
fair enough
 
1:45 PM
Hey, I have a question about code conventions. Are there any stats known about preference for:
function foo(){} vs var foo = function (){}
 
go for function foo(){}, named functions are hoisted on top
 
I know, but I need to convince some collegues
we currently have the following convention, use var for functions and only use one var keyword with commas
it looks so horrible
 
they are the same thing
aside from hoisting
pretty sure stack traces are even 'fixed'
if that was ever a problem
> only use one var keyword with commas
is pretty common
var a,b,c,d,e;
 
@rlemon yeah, pretty common
 
well, you can scare them with performance differences (jsperf.com/function-declaration-vs-function-expression/15)
 
1:51 PM
@Jonathan tell them that for every var something = function(){} used 1000 children die. Statistically it's probably true
 
:)
        var engineUrl = localStorageController.getSessionItem('configuration').ItessoEngineUrl,

            checkLinkedReservations = function checkLinkedReservations() {
                var url = engineUrl + 'Reservation/Group/HasSegments';
                return dataController.post(url, { GroupCode: self.groupCode() }, null, null, self);
            },

            checkPenaltyFreePeriod = function checkPenaltyFreePeriod() {
                var url = engineUrl + 'Reservation/Group/IsCancelFree';
 
if you disagree with the style, that is fine. perf differences and other small things are probably just going to piss off your collegues and make you look bad
they are terrible arguments against it
 
Looks horrid
 
user3119231
@Jonathan +1 for this: jonathan-ijzerman.nl
 
Ugh... How... Why
 
1:55 PM
don't leave gifs oneboxed
 
user3119231
how to?
 
1 message moved to Trash can
 
> // Reset values.
 
@rlemon Thought cap had a timeout for those?
 
don't play dumb, you know how to edit a message
 
1:56 PM
I love the really determined "."
 
@BenFortune only her own
she cannot edit other peoples messages
 
Ah, I thought she binned them
 
user3119231
okaay. Will box it in future.
 
@BenFortune I have/had a plugin to do that
need to re-write it for her and install it
 
That'd be nice. I'm in the middle of making an electron wrapper for the chat with plugin/theme/shortcut support.
 
1:58 PM
If I need recurring tasks, should I use cron, agenda, later, something else?
 
another "SO doesn't hold my hand so it is smelly!" post
 
user3119231
after months with you I finally learned to make fake links or "box" links. Format like a pro
 

« first day (1943 days earlier)      last day (3003 days later) »