« first day (2157 days earlier)      last day (2806 days later) » 
00:00 - 13:0015:00 - 00:00

Anonymous
12:00 AM
@Abhishrek You've already played LF2, right?
 
1:17 AM
guys, is there an NPM for velocity.js?
btw, I feel like we still need to adhere to bower (for frontend) while everyone seems like they are focused on using NPM for frontend + backend.
last time I used request.js for my react app
and realised request.js doesn't work well in frontend code
If I used bower, we would've straightaway chose to use super-agent
we struggled at using request.js for 1 day, pretty much wasted our time until we found super-agent
 
the velocity repo says yes: github.com/julianshapiro/velocity
searhc for NPM.
 
ah, it's called velocity-animate
i see
so confusing
 
probably because their is another package for velocity templates
 
yeah, I love your front-photo btw
 
you can always check the name in the package.json if they don't put it in the readme: github.com/julianshapiro/velocity/blob/master/package.json#L2
 
1:22 AM
I want to kiss on your chick
Ah, right
 
github.com/github/fetch instead of superagent
 
I actually had a look at it though
But I want to reserve using word "Fetch" for later on, when actual "fetch" is natively supported on browsers
 
this is a polyfill for that
 
I love fetch balls btw
@Luggage right
 
it uses the name fetch because it uses the same API. It's to give you the fetch feature before you browser has it
 
1:26 AM
yeah but I just want to reserve the keyword for actual native function later on
IDK, Maybe I am a weirdo
 
you don't understand. You can wait until every browser out there has it.. or you can use it today
Are you going to wait until your LAST user gets a browser with fetch?
 
idk man, maybe superagent also uses fetch too, but it creates abstraction.
 
since it's the same api, you just drop it once browser support it natively. That is the point of a polyfilll
 
I love fetch and superagent
 
'creates abstraction'?
fethc uses promises, the standard. superagent uses callbacks
 
1:28 AM
yeah, i mean, within superagent, it can possibly have
if(fetch supported)
   fetch
else
   shitty old way
well, you can always use promises on your own right
and normally you would put "fetch" in your API controller code, which possibly uses promise anyways
 
if (!window.fetch) { require('fetch'); }
Don't use fetch if you don't want to. It's your choice. But your reasons make no sense.
 
IDK man, I just love fetch and superagent. but my heart goes to superagent over fetch for now. I'm still using SCP for copying files, you mad?
I mean, I'd use fetch though
 
no, scp is a standard way to copy files..
just like fetch is a standard
 
I love them all, I support equallity
"wat"?
is that a criticism?
 
no, a typo.
 
1:32 AM
yeah
I mean, I just recently moved over to superagent & request.js from jquery ajax. I was super fan of jQuery ajax though
 
why superagent AND request.js?
 
request.js didn't work well on frontend
 
@nicematt ofcourse
Good Morning folks :D
@SterlingArcher how far are yu from crystal city?
 
howdy
 
I mean, fetch.js is a great library. I would love to support it's awesomeness but I wouldn't abuse keyword "fetch" until it's natively supported on everywhere
 
1:36 AM
then i guess you'll never use fetch, since you'll have to wait until every last one of your users it on new browsers that don't even exist yet
unlike the rest of the developers just use a polyfill to fill in missing features and get to use all the latest toys
 
I love approach of polyfills
however, I'm talking specifically about fetch
fetch has a special meaning to me
actually, function "fetch" is basically the most important feature of all frontend applications
and I just want to be serious with using this keyword
 
it has a special meaing to everyone else, too, that is why there is a spec
I don't think you know what a polyfill is
 
well, not everyone know everything about universe
is fetch native function in node.js too?
 
a polyfill uses the same API as a standard features that isn't supported yet so that you CAN use the same keyword. It's the same API, so once the all the browser supports it you just stop using the pollyfil, but keep all your code
 
hmm yeah, lovely idea. I support what you are saying.
 
1:41 AM
also.. you don't have to replace the global 'fetch' anyway. use modules and not globals
 
However, I just do not want to wrap around my the most important feature around an if statement
 
Again.. if you want to use superaget, that's fine. But your REASON to avoid fetch does not make sense.
no if statement! that's the whole point
 
I mean, I would appreciate using "polyfill" for everything else apart from fetch
I just want my fetch straight-forward native function coming straight from all browsers
but I guess I need to wait for now... I'm sad
 
ok.. you haven't listened to a word I said and still dont' know what a polyfill is
ALL polyfills use a reserved word. That is the point
The fill in amissing feature so you DON'T have an if statement
 
right
 
1:44 AM
so why a polyfil for "everything else"
 
but let's say you use fetch.js on IE6~7. window.fetch will be "undefined"
 
true. that's WHY you use a polyfil.
but i think fetch is IE10+ anyway
the polyfil, i mean.
 
in that case within your polyfill code, it would still require
if(window.fetch === undefined)
   use sad ajax
anyways, good chat. everyone has different opinion
 
ajax is ajax. you can use it right no without fetch, or superagent or anything
superagect uses XmlHttpRequest, too.
fethc is just a differnt API.
 
just keep in your mind there are group of people in the world who would still wait for "fetch" to be supported on all browsers or all major browser manufacturers announce "boys, it's safe to use native fetch, ditch fetch.js"
 
1:47 AM
ok, well, then good luck not using any new JS from the last 5 years
 
I'm only talking about fetch
 
why is fetch special?
why are you willing to polyfill array methods and Map and anythign else vbut not fetch?
 
because it's a special word
 
They are all special words
 
dear fetch,

I love you, please become fully mature.
 
1:49 AM
it doesn't matter once it is. Not everyone is on a new browser
 
Time 4 pho
if you know what I mean, it's 12AM
 
push is better than fetch
also it has pretty good browser support
 
I find that conversation hilarious
 
payload = []
payload.hashtags = new Array('#cool', '#future', "#2016")
payload.tweet = 'fetch is obsolete'
payload.push();
stick that in ur node.js
then you can do <script src="node.js"></script> and payload will contain your tweet from the server
 
@Ryan That's a lot of bad practices in 4 lines
For*
 
2:04 AM
yeah, editing
actually you should use ES6, so payload.tweet = `fetch is obsolete`
 
@Luggage considering ES3 came out the year I was born, that's pretty doable
 
Yeah a lot of the JS from the past 5 years is pretty mediocre
Repeal ES6 please
then add decorators that don't need to be in classes
and adopt Python's statement-breaking rules
thanks, -- Ryan
 
They should have added a clone unary rtl to make prototypal inheritence easy and appealing
Sure, there's Object.create, but it is largely ignored
 
2:29 AM
How would you go about putting this in API controller code?
Would you wrap around another layer of promise?
or does it support synchronous flag?
nvm
fetch uses promise
 
i hate my mom is that normal
 
2:44 AM
yes
 
@littlepootis do you live with your parents
 
she has done things to mess with me intentionally
@littlepootis the sucky part if I plan to mary a female she will likely be like my mom
 
lol, no. Unless you really look for someone like that.
 
have you heard of the oedipus complex?
 
2:47 AM
yep
 
WTF
Not compatible with your operating system or architecture: fsevents@1.0.14
FETCH!!
 
ignore it
 
how?
 
um..? By ignoring it?
 
shit
it literally does not install
 
2:50 AM
fsevents never installs for me (on Linux and FreeBSD)
it throws the same error.
 
it's for OSX
 
I just ignore it.
 
I'm on Windows 10
 
If fetch doesn't install, look for other error messages.
 
I've been using windows for 24 years now
ok, going back to superagent
 
2:52 AM
it's an optional dependency of one of the dev-dependences, most likely
you'll run into fsevents in many packages on npm
 
shit the hell...
should I bower from now on?
 
it is NOT a dependency of fetch: npmjs.com/package/fsevents
no, bower is dead.
show me the error line that mentions fsevents
 
don't say that man, I used bower before
 
or the entire error
i've used bower before, too
 
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
 
2:53 AM
but sometimes things die
yea, see, optional dependency. it's not a problem
if only you had actually read the line instead of shitting your pants
 
"whatwg-fetch": "^1.0.0"
is in there
but problem is it does not work
 
then what was the error?
 
export const fetchRegisterHELP = (opts) => {
    const { studentId, dob, degreeType, studentStatus, firstLang, countryOrigin, creatorId,
        gender, background, degreeDetails, altContact, preferredName, completedHsc, hscMark,
        completedIelts, ieltsMark, completedToefl, toeflMark, completedTafe, tafeMark, completedCult,
        cultMark, completedInsearchDeep, insearchDeepMark, completedInsearchDiploma, insearchDiplomaMark,
        completedFoundationCourse, foundationCourseMark } = opts;
 
because that was not an error
 
It just fails
 
2:55 AM
"just fails"?
 
it doesn't goes to the server, it just fails in test
console.log(fetch === undefined);
prints nothing
 
ok.. so it DID install
 
yeah
console.log(fetch === undefined);
console.log('huh?');
Does not print 'huh'
 
so.. um. you know that you still have the load the .js file in your app, right? just installing form npm isn't it.
 
@Luggage not really
 
2:56 AM
import 'whatwg-fetch';
right there
 
this in node or browser?
 
from chai test
mocha --compilers js:babel-core/register --recursive tests/.
this is how I invoke tests
 
Ugh, these tools have been made to make our "work" easy. But the "meta work" now takes more time than actual "work".
 
ok.. but is this in node or the browser?
tests can run in either
 
node
 
2:59 AM
> For a node.js implementation, try node-fetch.
from the readme on whatwg-fetch
 
@littlepootis who do you hate more mom or dad?
 
lmao what kind of question is that?
 
import fetch from 'node-fetch';
 
I'm basically ignored by both, so I neither love or hate them.
 
use the right package. read the readme.
 
3:00 AM
I think I should run chai on browser side
but I'm not sure how
because this is a client app
 
well, you'll need one package for node, one for browser. but they both use the same api
 
right
 
I'm not really sure why they have two separate packages. Many libraries use the same one for browser and node
 
i know right? - #superagent
 
stick with superagent if you like it.
nothign wrong with that.
 
3:03 AM
right
hey, btw
 
I just prefer promises since I use them everywhere else.
 
what's the parent most scope in node?
window === undefined fails
 
global
 
but don't use global in node.
just declare your variables normally, and they'll be local to the file/module
 
I just want to
if(global){
   import node fetch
} else {
   import fetch
}
 
3:06 AM
Nah, don't depend on that
 
also you can't import inside an if. use require().
 
what do you recommend?
 
@Luggage wat. why can't you?
 
I think you can
 
you just can't. It's the law.
 
3:09 AM
@Luggage What do you recommend in this case?
 
like why
 
I don't make the rules
Call up Mr. Javascript and complain.
 
So weird.
Allows require.
 
right, because require is just a normal function call
so.. that's fin,e jsut use require() until System.load() is standard
 
ok ditching fetch
it's unstable
 
3:10 AM
You're unstable.
 
wtf is System.load()? :Oooooooo
 
I mean System.import(): 2ality.com/2014/09/…
not sure if that's still a standard.. but there is systemjs that uses it
it's not commonly used outside of SystemJS, I don't think.
 
@Luggage I'm stable
 
I'm experimental
 
I'm early access, like your mom.
Public beta
 
3:21 AM
I'm snake
 
user4196492
when I create an expiration date on a cookie, does it use Military time or regular time?
 
it uses Korean time standard
 
user4196492
is that a joke?
 
3:48 AM
no
 
user4196492
do cookies only work on web domains and not HTML files?
 
user4196492
I noticed a problem when doing it
 
Cookies only work in North Korea
 
user4196492
@littlepootis I will contact Kim Jung Un
 
user4196492
Chrome doesn't support cookies on local files
 
user4196492
3:51 AM
that is upsetting
 
Well, they are local files. Start a local server.
 
user4196492
there is a way to enable them I see
 
user4196492
I am doing research and typing here, so
 
user4196492
how the heck do I enable this
 
user4196492
I looked through chrome:/flags already and found nothing
 
5:14 AM
Is there a library that provides react's abstraction of different DOM behavior related to form elements into just onChange and value standalone?
 
 
1 hour later…
6:18 AM
can you set an object property to act like a const?
 
@towc Object.freeze, defineProperty's configurable, etc.
 
@littlepootis Object.freeze is too different, and the rest are "hacks", it's not clear from the code what is it you want to do
but yeah, it's possible, I get that
 
defineProperty is not a hack :(
 
6:46 AM
guys
wtf is Array.forEach
 
6:58 AM
@Zirak hrmm?
 
user2620028
im sure you didn't need that link... but cheeky response :P
 
user4196492
hey guys! I have a little challenge. Try to decrypt this:

5,-5,4,8,-2,-5,-3,-2,-4,5,4,-2,3,4:LjslEl`(%fpr%
 
user4196492
try to figure out the method I used first
 
7:14 AM
@Mosho Array.prototype.forEach()?
Because there's no Array.forEach
 
@littlepootis there is. non-standard spidermonkey extension. same for all other array methods. (cc @Mosho)
 
Speaking of non-standard additions..
 
Hello :) Can someone help me with an angular question please?
 
Nashorn uses the backticks for "shell code" execution.
 
PHP does that too. Bash too. something like that in perl as well. Not very non-standard if your standards are low.
 
7:17 AM
But it's incompatible with ES6.
@AwalGarg Your standards are skewed.
 
Does anyone know how to use $scope.variable in html ng-if statements?
<a ng-if="{{variable}}">
 
@littlepootis btw check hangouts
 
there's nothing new
 
Does caching static resources in a serviceworker have any significant advantage over using HTTP cache headers?
 
@AwalGarg yeah, must be it I guess
it's polyfilled by babel-polyfill
at least an older version
and the clowns at react-helmet were using it up to 2.2.0
 
7:33 AM
you see this via cap
!!> Object.getOwnPropertyNames(Array);
!!> Array.forEach([1, 2, 3], el => console.log)
 
@AwalGarg "undefined"
@AwalGarg ["join","reverse","sort","push","pop","shift","unshift","splice","concat","slic‌​e","isArray","lastIndexOf","indexOf","forEach","map","filter","every","some","red‌​uce","reduceRight","from","of","prototype","length","name"]
 
but why is it polyfilled by babel :\
 
@CapricaSix oh wow.
 
Why everyone. I want to share new NPM module I just released yesterday and have 92 downloads...
https://www.npmjs.com/package/run-middleware
https://github.com/AminaG/node-run-middleware/blob/master/example.js
What do you think?
 
7:52 AM
why to you too :)
 
@Aminadav Why!
 
Why would I want to replace a function call that my IDE will rename for me if I refactor with a string?
 
@ivarni your IDE renames your things? Tell your IDE to behave
or put the IDE down and get another one
 
If I rename a function at one spot, it renames it in every place that function is called, yes
That's kinda the point :p
 
that's kinda bad
well, I'd prefer to tell it to do it, if I want to
 
7:55 AM
what about comments where the function is mentioned? What bout.. docs?
 
You prefer that once you rename function foo in one place all the other places it were called now throw errors because it's now undefined?
I guess we all have our cups of tea :)
 
@ivarni so you run the vim script to rename/find every instance of foo and choose whether to replace or not
good job
 
I stopped reading at "vim"
 
vim is a better tool for this job, yeah..
 
not like you can't do it in sublime, brackets or similar
 
7:57 AM
luddites...
 
you should be able to do it in your IDE
 
vim users like me feel excluded :(
this community should be more inclusive
:(
 
Oops. I mean Hi... not why...
 
"Ok google tweet abandon room 17"
 
@towc That's what I've been saying all along. IDEs should do that. Using a NPM module that effectively replaces a function call with something that relies on a string seem pointless to me
 
8:03 AM
npm module?
 
@ivarni oh right, thought it was unrelated. I stopped at "why" and "I have 92 downloads" blocked the rest completely for me
 
oh lol
 
I probably should have @ mr why, but I figured the context was there
 
@littlepootis if you don't use vim, you deserve much worse things ;)
@ivarni fair enough
 
For a moment there I thought everyone was insane
 
8:04 AM
you weren't wrong
 
I thought that you don't judge here people. Ok, my English is not "perfect". I don't want to read everything I write many times before. I think you should talk about the subject and not about the person.
 
I was talking about the subject, I don't see why I would need to use that module. You asked what I think about it and I replied.
 
@Aminadav hey, the "why" was just funny and we accept it. It was kinda sad when we saw that you didn't actually have a question and were just looking for approval of yourself
 
Fun fact, you get 40-50 downloads (can't remember the exact number) every time you release a new version and all the mirrors grab it
 
I didn't thought to mention that, but someone told me that he is amazed from that...
 
8:07 AM
@Aminadav here you go looking for approval and compliments again
 
Want actual usage, see registry.npmjs.org/-/_view/… and replace lodash in the URL with the module name you're looking for
 
learn from @littlepootis. He's not a useless fuck, but acts like one
with offense obviously, @littlepootis ;)
 
Now wait, that URL came out wrong
Just see stackoverflow.com/a/18796904/957731 and fix that URL to the correct package name
I'm apparently incapable of doing it atm
 
8:41 AM
Hi guys, I don't know if I'm allowed to ask, if not excuse me. Beeing a beginner I have done a lot of questions, so I am not allowed to ask any question anymore, but I really need to do one for a specific problem I am facing. I am trying to answer as many question as possible but I still am not allowed to ask questions. I would really appreciate if you could upvote the answer you think are most worth so that I canask again. Again I'm really sorry if I'm not allowed to ask this kind of things
 
@Daniele Welcome to the JavaScript chat! Please review the room 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.
 
@CapricaSix ok thanks
 
@Daniele how about you ask us?
 
Yeah, asking for upvotes is not OK on any part of stackoverflow and you're likely to get yelled at at best
 
WHY! (inside joke)
 
8:47 AM
eeek
But as towc said, you can ask questions here though like the main site you're not guaranteed an answer
 
9:24 AM
@Daniele Question lock is different from answer lock; your questions does not look bad individually, you simply asked too much. Search more and ask less. Once you get the hang of it you should find most answers quicker than asking a new question.
 
@Sheepy Thanks a lot I will follow your advise
 
9:43 AM
TIL:
!!> var a = 0, b = 2; switch(0){ case a: console.log(1); break; case b: console.log(2); break}
 
@towc "undefined" Logged: 1
 
you can use variables as case conditions
 
9:58 AM
!!> switch(0) { case Math.random(): console.log('what are the odds?'); break; default: console.log('That\'s neat');}
 
@ivarni "undefined" Logged: "That's neat"
 
10:51 AM
hi there ..evening to all
from india
i have a html nested table like <table><tbody><tr x><table><tbody><tr></tr></tbody></table></tr><tr x><table><tbody></tbody></table></tr></tbody></table>
 
I'm sorry
 
i want to select all tr which contain x <tr x>.. Note :- in real html which i have to do this operation there is no x .i have included it for ex.. how can i select all..pls guide
 
You want to select all <tr> elements that contain x, but what is x? an attribute? child elements?
 
nothing i have just included for example ..in original html there is no x like anything
 
Ah, so you just want all the <tr> elements?
 
10:57 AM
all the tr which is child of first table
note there is also child table and tr but i want all the tr for parent table
 
Actually not sure what the best solution to that would be, but something a bit like document.querySelectorAll('body > table > tbody > tr'). Quite possible there are better solutions
 
thanks for help..will try
 
There's also the first-child pseudo-class but I'm not sure it would be helpful here
Not nesting tables in the first place is also a good idea, it's not supposed to be a layout element
 
11:45 AM
"table >tbody > tr"
no..
I think you'll need to "mark" the table you want to get TRs from somehow. a class or something
 
Yeah, that's why I included body there
That selector could get ugly real quick though
 
yea, that can work
But.. then you'll wonder "why" later. I still think you should give it a class so you can give it a meaningful name
 
It does work, I tested it before I posted it, but depending on page structure it will probably turn into one brittle beast
 
table.layoutTable > tbody >tr
 
js13kgames entry almost done towc.eu/game/glitch-maze The whole thing seems off tho :/
still need to add a menu
 
pTi
12:12 PM
hi
 
why
!!learn mrwhy <>http://chat.stackoverflow.com/transcript/message/32781252#32781252
 
@towc Command mrwhy learned
 
12:26 PM
you're a bad person
 
12:36 PM
:3
 
00:00 - 13:0015:00 - 00:00

« first day (2157 days earlier)      last day (2806 days later) »