« first day (1877 days earlier)      last day (3054 days later) » 
00:00 - 20:0020:00 - 00:00

12:34 AM
hello
I am doing a js course on codeschool and have a question as to why they are doing something a certain way
 
yes lord vader
 
Its in regard to closures, why have a function that all it does is return another function, that feels like the parent function could just be thrown out like method 2
 
That's a contrived example made to illustrate a point
It's not a very good example
 
you could then pass that returned function around
and it would always have that closure
 
But let's roll with it
 
12:37 AM
it's a factory
kinda
 
var milleniumFalconGreeting = buildCloseTickerMaker('Millenium Falcon');
milleniumFalconGreeting('Leah');

var names = ['Luke', 'C3P0'];
names.forEach(milleniumFalconGreeting);
 
so its an easy way to greet everyone aboard that space ship?
Method 1 is beneficial because there might be multiple names on a transport?
 
read about currying
it's a functional pattern. instead of having a function where you need to specify both the name and the spaceship, you have a function that generates greeting functions for every ship
it may be hard to see the benefit here, since like @Zirak said, it's pretty contrived
 
currying sound like closures to me
 
currying uses closures
 
12:45 AM
erm, sort of. I wouldn't read too much into this example, it's a bit wonky. Here're some better articles:
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures
- http://stackoverflow.com/questions/111102/how-do-javascript-closures-work
(Man there're like 0 good resources on this)
 
I don't think he means he doesn't understand closures
at all, that is
 
He was just looking for applications and examples, right?
 
1. I am confused about closrues, SO link will help, thank @Zirak
2. examples would help me understand closures
 
which is why I mentioned currying
can also read about dependency injection which leverages closures
 
In all honesty, "closures" is just a really fancy way of saying "scope exists"
Lexical scoping + functions being values = closures, sort of
 
12:49 AM
I will keep going with the course hopefully the exercises will help.
 
Good luck
 
thanks for now @Zirak, @Mosho
 
 
3 hours later…
4:11 AM
holy shit, someone is actually selling my animations.... wow....
wow, this guy really goes around selling stuff he sees on codepen... I assume that technically there's nothing illegal with that, right? codecanyon.net/user/wptpnet
 
No, I would think that it's definitely illegal. Contact codecanyon and have him removed
 
If you had posted it on your website it'd be illegal
But codepen forces you to use an open license
 
precisely
I recently got added to codepen's dev team's slack chat. Going to ask them if they can get a box for me to tick to make me chose a proper license
 
4:29 AM
I'd take it as a compliment
 
we'll, I'd rather have him give me half of his money for example :P
license: the code is for everyone to use as long as very clearly properly credited on display at all times with a link to this pen (unless it's used by the author), and half of the person's earnings directly and indirectly connected to this pen go to the author
perfect, right?
and holy shit it's late (GMT+0)
 
 
1 hour later…
5:40 AM
@rlemon
 
 
2 hours later…
8:33 AM
what is this preset thing in babel
 
@BenjaminGruenbaum huh, I didn't knew phabricator was open source!
I seem to like it very much, and I am gonna switch to it on my private server from gitlab :P gitlab is too much and too less for me
 
Hi guys, anyone here experienced with the MAX_PATH limitation when working with deep npm modules in Windows?
Seems like the only solution is to buy a Mac or install Linux?
 
8:50 AM
For a project like babel - it should be inclusive.
 
I initially thought it is Facebook's own creation (those PHP fanboys). Then I saw babel using it, and I thought, well, seb is at facebook now so maybe... then I googled. But yeah, I have no idea whether it is better or not for babel.
 
 
1 hour later…
10:13 AM
@TrungDQ When do you even get this error?
 
10:27 AM
@TrungDQ switching to linux is generally a good idea for developers. And the path size limitation is a known one, but AFAIK, npm 3 doesn't face that anymore.
So upgrading to npm 3 can let you keep on windows :/
 
10:49 AM
If you just have the 'too long path to delete files' error, just use a tool to deal with it.
It doesn't really warrant the hassle of switching to Linux
Zomg Chakra JS engine is going open source.
 
11:07 AM
@TrungDQ update your node.
@RoelvanUden yup, pretty awesome.
 
11:31 AM
got phabricator up and running \o/
 
11:57 AM
@Luggage's map is cute, how do I edit it?
 
4th button is "Add Marker"
 
eeeeeee
 
crl
12:16 PM
I wish we could do !!learn confirm "$if($rand()<5, $1 $2, $1 not $2)" "(?:if )?(.*is)(.*)"
but I don't see how to code the $if on Cap
 
i didn't know in javascript, functions are objects
this is weird
 
crl
extended objects kinda
 
extended objects?
 
@Abhishrek why not? I am getting an SBI account now that I am not a minor :P
tis better than all your private fakeos anyways
 
@crl boink
That face in the end says "Am I still getting the treat?"
 
crl
:)
 
1:02 PM
hello!
 
@ITProGuy 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.
 
someone know if there is some possibility to execute a function after a redirect page? (In the same js function)
 
crl
you're pretty much in a new page and context after a redirect
 
yeah, maybe using ajax?
or some another tricky trick
 
crl
is the page after redirect yours?
 
1:05 PM
yes
 
crl
so you can do what you want yes
 
my mind is a completely mess now, I think that I don't realize how to code this
some hint?
 
crl
if you want to preserve some JS context between 'pages', you could try to do a SPA
 
SPA
I don't even know what is SPA. I have to check
I'm a novice js coder
 
another color discussion since the famous blue/white dress
 
1:08 PM
SPA is a type of bath.
 
lol
 
!!define spa
 
@AwalGarg spa A health resort near a mineral spring or hot spring.
 
it's also a small town in the ardennes (belgium)
 
crl
yea, SPA is just doing everything through ajax
 
1:09 PM
oh belgium...
oh I see
single page application
 
crl
Le circuit de Spa-Francorchamps est un circuit automobile situé à proximité de Francorchamps dans la province de Liège, en Belgique. Il accueille chaque année le Grand Prix de Belgique de Formule 1 et la course d'endurance des 24 Heures de Spa, ainsi que d'autres courses nationales et internationales. C'est un des circuits préférés des pilotes en raison de la variété de son tracé dans le paysage montueux de l'Ardenne belge qui permet aux pilotes de mettre leur talent en valeur. On le surnomme parfois le « toboggan des Ardennes ». Bien que le nom de la ville de Spa, voisine, y soit associé, aucune...
 
hahah
good circuit btw
 
it's one of the most favorited circuits of cracers
but the financials aren't good ... not bad, but not good even :/
 
well, I'm used to watch f1 and this past year was really boring, even in spa or barcelona. Same ... anywhere
with past year I mean last season
sad
@crl do you recommend this method? stackoverflow.com/a/21875422/3693864
 
yes, it's boring lately
 
1:16 PM
FIA's fault
 
crl
@ITProGuy yea it's fine for redirecting in JS, but be aware that it refreshes to a whole new page
 
it's caused by FIA (they changes the rulings too often, trying to "improve it" by trail and error), Ecclestone (he leads this as dictatorship, keeping most money) and constructors (gap between constructors causes imbalance)
 
@crl I think that for me it's OK. There's no problem for me if the whole page is refreshed
@KarelG yup, it's a shame.
would love that the old times (schumacher in ferrari alo in renautl) could return
even earlier
enabling refuelings and stuff
 
that would cause more imbalance because small constructors couldn't afford a lot fuels
 
crl
F1 should go open-source
 
1:34 PM
Hello partners, I guess that this chat is to talk about JavaScript (not about a JavaScript question in particular). Sorry is my first time ;-)
 
@caballerog 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.
 
2:09 PM
I now have exactly 1200 rep
nevermind... had to downvote a moron
 
:o
today is sunday. Just enjoy the day today
carpe diem
 
carpe diem is for fools
 
@ndugger Why?
 
crl
!!tr en carpe diem
 
crl
2:22 PM
can't even detect latin, boo google
 
!!tr en "carpe diem"
 
indonesian ? huh
!!wiki carpe diem
 
Carpe diem is a Latin aphorism, usually translated "seize the day", taken from book 1 of the Roman poet Horace's work Odes (23 BC). == TranslationEdit == Carpe is the second-person singular present active imperative of carpō "pick or pluck" used by Horace to mean "enjoy, seize, use, make use of". Diem is the accusative case of the noun dies "day". A more literal translation of "carpe diem" would thus be "pluck the day [as it is ripe]"—i.e., enjoy the moment. == HistoryEdit == === SourcesEdit === Text from Odes 1.11: === In ancient literatureEdit === Perhaps the first written express...
 
crl
carp today
 
2:47 PM
nevermind; figured out how I want to handle it
 
3:08 PM
carpe diem is like seize the day
enjoy every day like it's the last one
because actually it can be the last one :P
 
instead, I work hard every day like it's my last. What will they say about me when I'm gone? Hopefully that I worked hard and contributed to humanity.
 
crl
today is the last moment of that day being today, so enjoy it
 
3:32 PM
keh
 
tl;dr
 
antix ?
 
ok, prettier but not too long: internetcensus2012.bitbucket.org/paper.html (@copy if you haven't already read this, it might interest you :))
 
3:50 PM
> Many of them are based on Linux and allow login to standard BusyBox with empty or default credentials.
that's because the owner dgaf (didn't give a fuck)
 
4:13 PM
@KarelG It's the name of my current personal project
 
He guys
how would you go about building this i.imgur.com/Br1KwjY.jpg
I mean the date selection thing
 
@AlexanderSolonik I generally don't suggest plugins, but you should grab moment.js and Pikaday -- or, just google for Data/time picker modules.
 
notice that its note just a input with a datepicker dropdown
@ndugger absolutly .. fbut for something this complicated , i bet i would need a existing solution !
i mean datepickers are complicated :D
 
You never need an existing solution.
 
crl
so you just want a click handler on the calendar?
 
4:17 PM
no
@ndugger did't get u ...
@crl i think i just found what i might need
 
I mean, just because something is complicated, does not mean that you shouldn't try to build it yourself. building complex things is the best way to learn.
 
@ndugger we think alike ;)
except i can't experiment on a live project :) .. on my personal projects i experiment alot !
 
crl
used this lib some years ago output.jsbin.com/UmUbipa/latest
 
whats the name of the lib
?
full calender ?
 
crl
without the typo, yes
 
4:22 PM
;)
 
crl
just saying, I don't know if it's better
 
its suppose to a really good lib !
it gets recommended alot .. but its quite heavy ! i did't knw i cld use it for this purpose
but will probably give it a shot !
 
crl
it's larger in space, not just showing days, meant for events
 
:)
Hmm '
anyways TY !
hv a nice day !
 
@ndugger have fun with that :)
 
4:38 PM
^ has events
 
@AwalGarg Pretty cool
You can also scan the whole internet with a single machine with zmap
 
Anyone want to suggest a synonym for ?
 
well, there's ES6, which was the old label. Not really sure what you're after.
 
okay, never mind
 
crl
4:59 PM
 
docker is such a POS
@vaultah Not a synonym, but I'd prefer , and not . See , etc.
 
crl
shit, the jsfiddle right blue thing (collaboration or something) appeared
hmm why: jsfiddle.net/crl/0zoho5ee/1? it's supposed to open the native file chooser on click
 
5:20 PM
@crl you can't dispatch the same event twice, maybe? Just create a new click event, and dispatch that instead
 
crl
hmm ok, probably that, thanks
 
@crl Well, it's because the 1st click event overwrites the 2nd one. Try adding a timeout: jsfiddle.net/JacquesMarais/0zoho5ee/2
 
crl
wow, hard to explain indeed
 
@copy I scanned the internet once (well, the top 1b websites to depth 2), it was terrible.
 
@JacquesMarais @crl this. Also, just emit the delay argument. The event dispatching completes before any microjobs are run.
 
crl
5:26 PM
ok gracias
 
@AwalGarg Ok
 
@BenjaminGruenbaum Why was it terrible?
 
Can we remove the weird tags from description? they take so much space :(
 
Go for it
 
room topic changed to JavaScript: Topic: JavaScript, ECMAScript. Read this: rules.javascriptroom.com. Before asking inform yourself on the XY problem goo.gl/taIqf | devdocs.io Documentation™ Helps. WooHoo ES2015 (ES6) released! [ecmascript] [es6] [javascript] [nodejs] [promises]
 
5:32 PM
@copy because it took a lot of CPU.
 
@copy done
Now I can see the star queue \o/
 
@BenjaminGruenbaum Oh, but did you get some interesting results?
 
@BenjaminGruenbaum shouldn't it be spending more time waiting because of network IO?
 
crl
I guess it runs all in parallel? would be a terrible idea :)
 
@copy Because rule #34 is confirmed.
 
5:36 PM
Well atleast on linux, the number of parallel outbound connections is limited ^^ and the limit is most definitely way less than the total IPv4 space
 
@AwalGarg Yeah, but mass scanners work around that
 
@BenjaminGruenbaum Has anyone compared it to its firefox/chrome counterparts yet?
 
@copy that's possible? :O
 
the last boss in Wolfenstein: New Order is confusing
 
@MadaraUchiha It is not yet opensourced. Just announced that it will be, in January.
 
5:39 PM
.. and kinda annoying
 
Guys, do any of you here use Windows 10?
 
@copy yes, got a lot - investigated JavaScript language usage in popular websites. Got to use the big cs lab. Was fun overall but also kind of terrible because I didn't plan it well from the get go.
@MadaraUchiha a tiny bit better, probably :P
@AwalGarg you do realize that at some point you max out on IO and become CPU bound again for parsing - right?
I repinned the owners thing to give it until the weekend - hope you guys don't mind that
and gals
 
5:54 PM
@BenjaminGruenbaum hmm, ok
 
crl
6:09 PM
pff you can't even chain event handers in jquery, disappointed (using it because some UI lib imports it)
@KendallFrey regex challenge, a regex that returns true if all alphabet letters are present (The quick brown fox jumps over the lazy dog)
it's maybe easy
 
jquery?! Did I wake up in 2005?
 
crl
[a-z] is a or, but it'd need a and
 
@crl It's not easy
 
crl
ah :)
 
@crl it is possible, but would be atleast 26! chars long
 
crl
6:19 PM
I see
 
.*?a.*? is for character a. Build these for all the characters. Then arrange them in all possible ways, and join all of them with |.
 
11
Q: Stack Exchange Chat Status - adding Hangouts-style avatars to chat

Nathan Osman About Stack Exchange chat is awesome. But there are a couple of missing features that would complete the experience: Showing how far each user has read Indicating when a user is typing This script aims to solve both of those problems. Screenshot Download / Install Instructions for ...

 
so that's like 4732! :O
Maybe there is a more efficient method @copy or someone can think off :D
 
crl
| is or, are you sure to use it?
 
you join the different arrangements with |, not the regex for each character.
 
crl
6:23 PM
ah ok, crazy long yea
stackoverflow.com/questions/469913/… . (don't even need the ?=)
 
> Whenever a new message is read or you start typing, the script sends a small packet of information to the central server. This information is then sent to everyone else in the room who has installed the script.
sneaky
 
@AwalGarg Server is open source (and canon server is operated by a mod)
 
still sneaky :(
 
I'm going to have to read/ask more about whether I can use it with private rooms
But if I read the request correctly, it doesn't track the messages you or others type
It just sends whether you're typing or not, and what's the last message you've seen when you change tabs.
 
buffers are going to be the death of my brain cells
 
6:28 PM
@MadaraUchiha Well, how does it verify that the user sending the request to the central server is the one he claims he is? What if I send them random payloads informing mod Madara Uchiha is typing since the last 80 hours or so?
 
@AwalGarg I genuinely don't know.
You can ask that on the stackapps thread.
 
asked
 
7:11 PM
@AwalGarg why is it that people from india say "I have a doubt" instead of "I have a question" ?
 
@tereško For exactly the same reason they know Hindi better than English. It started at some point, and is now eternal glory.
In the end, it doesn't really matter.
@argentum47 oh my, that's brutally awesome
 
so, is there no word for "question" in Hindi?
 
coz we are doubtful if the doubt qualifies as a question
@AwalGarg chuckles
 
crl
!!youtube sonique
 
@tereško Not sure why you would think so, sure we have.
 
well .. for same reason why japanese language for long time didn't have a separate name for "blue" and "green": it just happened so
 
I wonder how they expressed blue flims
 
Your funny isn't working
 
hm. using fluxible w/o react isn't working either
 
7:17 PM
I'm always a super funny guy
 
!!s/fun/pu/
 
@AwalGarg I'm always a super puny guy (source)
 
@argentum47 you checked hangouts? ^_^
 
checking
 
7:20 PM
!!s/pu/hor/
 
@phenomnomnominal @AwalGarg I'm always a super horny guy (source) (source)
 
discord isn't cool ... #flux #fluxxible #need-help da faq
@AwalGarg checked and rofl
 
:D
 
crl
7:40 PM
how can I match each character of a string with a regex? I know it's stupid (can do split), but just wondering
 
Regular expressions can't have a variable number of matching groups
 
!!> "hello".replace(/./g, 'noob ')
 
@ndugger "noob noob noob noob noob "
 
crl
ok let's say I know the number of letters
 
Well, they could, but they don't
You can either use split of formulate a real question
 
crl
7:42 PM
"ab".match(/something/) -> ["ab", "a", "b"]
 
@copy Since he wants to match each character, isn't that equivalent to ^(?:<your pattern>).+$?
 
!!> 'hello'.match(/./g)
 
@ndugger "h,e,l,l,o"
 
crl
ah.. indeed g
 
@AwalGarg He means capture
 
7:43 PM
oh, well, ignore me then
@Abhishrek azure control is slow as fuck right now :(
 
This is probably the wrong question, but how do I use fs.createReadStream in conjunction with a Buffer?
 
I'm so hungry
 
I need to poop, but I want to figure out buffer->stream first
 
crl
what is the buffer from?
 
7:57 PM
a video file that I uploaded from my client
 
@ndugger You can use the raw stream.Readable
 
that seems to be what I'm looking for
 
00:00 - 20:0020:00 - 00:00

« first day (1877 days earlier)      last day (3054 days later) »